From python-checkins at python.org Tue Sep 1 09:34:27 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 07:34:27 -0000 Subject: [Python-checkins] r74613 - in python/branches/py3k: Doc/includes/mp_pool.py Doc/library/os.rst Objects/listsort.txt Objects/rangeobject.c Tools/pybench/README Message-ID: Author: georg.brandl Date: Tue Sep 1 09:34:27 2009 New Revision: 74613 Log: #6814: remove traces of xrange(). Modified: python/branches/py3k/Doc/includes/mp_pool.py python/branches/py3k/Doc/library/os.rst python/branches/py3k/Objects/listsort.txt python/branches/py3k/Objects/rangeobject.c python/branches/py3k/Tools/pybench/README Modified: python/branches/py3k/Doc/includes/mp_pool.py ============================================================================== --- python/branches/py3k/Doc/includes/mp_pool.py (original) +++ python/branches/py3k/Doc/includes/mp_pool.py Tue Sep 1 09:34:27 2009 @@ -98,17 +98,17 @@ t = time.time() A = list(map(pow3, range(N))) - print('\tmap(pow3, xrange(%d)):\n\t\t%s seconds' % \ + print('\tmap(pow3, range(%d)):\n\t\t%s seconds' % \ (N, time.time() - t)) t = time.time() B = pool.map(pow3, range(N)) - print('\tpool.map(pow3, xrange(%d)):\n\t\t%s seconds' % \ + print('\tpool.map(pow3, range(%d)):\n\t\t%s seconds' % \ (N, time.time() - t)) t = time.time() C = list(pool.imap(pow3, range(N), chunksize=N//8)) - print('\tlist(pool.imap(pow3, xrange(%d), chunksize=%d)):\n\t\t%s' \ + print('\tlist(pool.imap(pow3, range(%d), chunksize=%d)):\n\t\t%s' \ ' seconds' % (N, N//8, time.time() - t)) assert A == B == C, (len(A), len(B), len(C)) Modified: python/branches/py3k/Doc/library/os.rst ============================================================================== --- python/branches/py3k/Doc/library/os.rst (original) +++ python/branches/py3k/Doc/library/os.rst Tue Sep 1 09:34:27 2009 @@ -396,7 +396,7 @@ Close all file descriptors from *fd_low* (inclusive) to *fd_high* (exclusive), ignoring errors. Availability: Unix, Windows. Equivalent to:: - for fd in xrange(fd_low, fd_high): + for fd in range(fd_low, fd_high): try: os.close(fd) except OSError: Modified: python/branches/py3k/Objects/listsort.txt ============================================================================== --- python/branches/py3k/Objects/listsort.txt (original) +++ python/branches/py3k/Objects/listsort.txt Tue Sep 1 09:34:27 2009 @@ -606,7 +606,7 @@ def fill(n): from random import random - return [random() for i in xrange(n)] + return [random() for i in range(n)] def mycmp(x, y): global ncmp Modified: python/branches/py3k/Objects/rangeobject.c ============================================================================== --- python/branches/py3k/Objects/rangeobject.c (original) +++ python/branches/py3k/Objects/rangeobject.c Tue Sep 1 09:34:27 2009 @@ -431,7 +431,7 @@ rangeiter_new, /* tp_new */ }; -/* Return number of items in range/xrange (lo, hi, step). step > 0 +/* Return number of items in range (lo, hi, step). step > 0 * required. Return a value < 0 if & only if the true value is too * large to fit in a signed long. */ Modified: python/branches/py3k/Tools/pybench/README ============================================================================== --- python/branches/py3k/Tools/pybench/README (original) +++ python/branches/py3k/Tools/pybench/README Tue Sep 1 09:34:27 2009 @@ -260,10 +260,7 @@ # Run test rounds # - # NOTE: Use xrange() for all test loops unless you want to face - # a 20MB process ! - # - for i in xrange(self.rounds): + for i in range(self.rounds): # Repeat the operations per round to raise the run-time # per operation significantly above the noise level of the @@ -305,7 +302,7 @@ a = 1 # Run test rounds (without actually doing any operation) - for i in xrange(self.rounds): + for i in range(self.rounds): # Skip the actual execution of the operations, since we # only want to measure the test's administration overhead. From python-checkins at python.org Tue Sep 1 09:40:54 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 07:40:54 -0000 Subject: [Python-checkins] r74614 - in python/trunk/Doc: library/string.rst tutorial/inputoutput.rst Message-ID: Author: georg.brandl Date: Tue Sep 1 09:40:54 2009 New Revision: 74614 Log: #6813: better documentation for numberless string formats. Modified: python/trunk/Doc/library/string.rst python/trunk/Doc/tutorial/inputoutput.rst Modified: python/trunk/Doc/library/string.rst ============================================================================== --- python/trunk/Doc/library/string.rst (original) +++ python/trunk/Doc/library/string.rst Tue Sep 1 09:40:54 2009 @@ -220,7 +220,7 @@ The grammar for a replacement field is as follows: .. productionlist:: sf - replacement_field: "{" `field_name` ["!" `conversion`] [":" `format_spec`] "}" + replacement_field: "{" [`field_name`] ["!" `conversion`] [":" `format_spec`] "}" field_name: arg_name ("." `attribute_name` | "[" `element_index` "]")* arg_name: (`identifier` | `integer`)? attribute_name: `identifier` @@ -228,7 +228,7 @@ conversion: "r" | "s" format_spec: -In less formal terms, the replacement field starts with a *field_name* that specifies +In less formal terms, the replacement field can start with a *field_name* that specifies the object whose value is to be formatted and inserted into the output instead of the replacement field. The *field_name* is optionally followed by a *conversion* field, which is @@ -249,7 +249,7 @@ "First, thou shalt count to {0}" # References first positional argument "Bring me a {}" # Implicitly references the first positional argument - "From {} to {}" # Same as "From {0] to {1}" + "From {} to {}" # Same as "From {0} to {1}" "My quest is {name}" # References keyword argument 'name' "Weight in tons {0.weight}" # 'weight' attribute of first positional arg "Units destroyed: {players[0]}" # First element of keyword argument 'players'. Modified: python/trunk/Doc/tutorial/inputoutput.rst ============================================================================== --- python/trunk/Doc/tutorial/inputoutput.rst (original) +++ python/trunk/Doc/tutorial/inputoutput.rst Tue Sep 1 09:40:54 2009 @@ -123,11 +123,11 @@ Basic usage of the :meth:`str.format` method looks like this:: - >>> print 'We are the {0} who say "{1}!"'.format('knights', 'Ni') + >>> print 'We are the {} who say "{}!"'.format('knights', 'Ni') We are the knights who say "Ni!" The brackets and characters within them (called format fields) are replaced with -the objects passed into the :meth:`~str.format` method. The number in the +the objects passed into the :meth:`~str.format` method. A number in the brackets refers to the position of the object passed into the :meth:`~str.format` method. :: @@ -149,6 +149,15 @@ ... other='Georg') The story of Bill, Manfred, and Georg. +``'!s'`` (apply :func:`str`) and ``'!r'`` (apply :func:`repr`) can be used to +convert the value before it is formatted. :: + + >>> import math + >>> print 'The value of PI is approximately {}.'.format(math.pi) + The value of PI is approximately 3.14159265359. + >>> print 'The value of PI is approximately {!r}.'.format(math.pi) + The value of PI is approximately 3.141592653589793. + An optional ``':'`` and format specifier can follow the field name. This allows greater control over how the value is formatted. The following example truncates Pi to three places after the decimal. From python-checkins at python.org Tue Sep 1 09:42:40 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 07:42:40 -0000 Subject: [Python-checkins] r74615 - in python/branches/py3k: Doc/library/string.rst Doc/tutorial/inputoutput.rst Message-ID: Author: georg.brandl Date: Tue Sep 1 09:42:40 2009 New Revision: 74615 Log: Recorded merge of revisions 74614 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74614 | georg.brandl | 2009-09-01 09:40:54 +0200 (Di, 01 Sep 2009) | 1 line #6813: better documentation for numberless string formats. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/string.rst python/branches/py3k/Doc/tutorial/inputoutput.rst Modified: python/branches/py3k/Doc/library/string.rst ============================================================================== --- python/branches/py3k/Doc/library/string.rst (original) +++ python/branches/py3k/Doc/library/string.rst Tue Sep 1 09:42:40 2009 @@ -194,7 +194,7 @@ The grammar for a replacement field is as follows: .. productionlist:: sf - replacement_field: "{" `field_name` ["!" `conversion`] [":" `format_spec`] "}" + replacement_field: "{" [`field_name`] ["!" `conversion`] [":" `format_spec`] "}" field_name: arg_name ("." `attribute_name` | "[" `element_index` "]")* arg_name: (`identifier` | `integer`)? attribute_name: `identifier` @@ -202,7 +202,7 @@ conversion: "r" | "s" | "a" format_spec: -In less formal terms, the replacement field starts with a *field_name* that specifies +In less formal terms, the replacement field can start with a *field_name* that specifies the object whose value is to be formatted and inserted into the output instead of the replacement field. The *field_name* is optionally followed by a *conversion* field, which is @@ -223,7 +223,7 @@ "First, thou shalt count to {0}" # References first positional argument "Bring me a {}" # Implicitly references the first positional argument - "From {} to {}" # Same as "From {0] to {1}" + "From {} to {}" # Same as "From {0} to {1}" "My quest is {name}" # References keyword argument 'name' "Weight in tons {0.weight}" # 'weight' attribute of first positional arg "Units destroyed: {players[0]}" # First element of keyword argument 'players'. @@ -243,6 +243,7 @@ "Harold's a clever {0!s}" # Calls str() on the argument first "Bring out the holy {name!r}" # Calls repr() on the argument first + "More {!a}" # Calls ascii() on the argument first The *format_spec* field contains a specification of how the value should be presented, including such details as field width, alignment, padding, decimal Modified: python/branches/py3k/Doc/tutorial/inputoutput.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/inputoutput.rst (original) +++ python/branches/py3k/Doc/tutorial/inputoutput.rst Tue Sep 1 09:42:40 2009 @@ -126,12 +126,12 @@ Basic usage of the :meth:`str.format` method looks like this:: - >>> print('We are the {0} who say "{1}!"'.format('knights', 'Ni')) + >>> print('We are the {} who say "{}!"'.format('knights', 'Ni')) We are the knights who say "Ni!" The brackets and characters within them (called format fields) are replaced with -the objects passed into the :meth:`~str.format` method. The number in the -brackets refers to the position of the object passed into the +the objects passed into the :meth:`~str.format` method. A number in the +brackets can be used to refer to the position of the object passed into the :meth:`~str.format` method. :: >>> print('{0} and {1}'.format('spam', 'eggs')) @@ -152,6 +152,15 @@ other='Georg')) The story of Bill, Manfred, and Georg. +``'!a'`` (apply :func:`ascii`), ``'!s'`` (apply :func:`str`) and ``'!r'`` +(apply :func:`repr`) can be used to convert the value before it is formatted:: + + >>> import math + >>> print('The value of PI is approximately {}.'.format(math.pi)) + The value of PI is approximately 3.14159265359. + >>> print('The value of PI is approximately {!r}.'.format(math.pi)) + The value of PI is approximately 3.141592653589793. + An optional ``':'`` and format specifier can follow the field name. This allows greater control over how the value is formatted. The following example truncates Pi to three places after the decimal. From python-checkins at python.org Tue Sep 1 09:46:27 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 07:46:27 -0000 Subject: [Python-checkins] r74616 - python/trunk/Doc/tutorial/classes.rst Message-ID: Author: georg.brandl Date: Tue Sep 1 09:46:26 2009 New Revision: 74616 Log: #6808: clarification. 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 Tue Sep 1 09:46:26 2009 @@ -331,9 +331,9 @@ attribute that is a function object, a method object is created by packing (pointers to) the instance object and the function object just found together in an abstract object: this is the method object. When the method object is called -with an argument list, it is unpacked again, a new argument list is constructed -from the instance object and the original argument list, and the function object -is called with this new argument list. +with an argument list, a new argument list is constructed from the instance +object and the argument list, and the function object is called with this new +argument list. .. _tut-remarks: From python-checkins at python.org Tue Sep 1 09:53:37 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 07:53:37 -0000 Subject: [Python-checkins] r74617 - python/trunk/Doc/library/math.rst Message-ID: Author: georg.brandl Date: Tue Sep 1 09:53:37 2009 New Revision: 74617 Log: #6765: hint that log(x, base) is not very sophisticated. Modified: python/trunk/Doc/library/math.rst Modified: python/trunk/Doc/library/math.rst ============================================================================== --- python/trunk/Doc/library/math.rst (original) +++ python/trunk/Doc/library/math.rst Tue Sep 1 09:53:37 2009 @@ -166,8 +166,10 @@ .. function:: log(x[, base]) - Return the logarithm of *x* to the given *base*. If the *base* is not specified, - return the natural logarithm of *x* (that is, the logarithm to base *e*). + With one argument, return the natural logarithm of *x* (to base *e*). + + With two arguments, return the logarithm of *x* to the given *base*, + calculated as ``log(x)/log(base)``. .. versionchanged:: 2.3 *base* argument added. @@ -183,7 +185,8 @@ .. function:: log10(x) - Return the base-10 logarithm of *x*. + Return the base-10 logarithm of *x*. This is usually more accurate + than ``log(x, 10)``. .. function:: pow(x, y) From python-checkins at python.org Tue Sep 1 10:00:47 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 08:00:47 -0000 Subject: [Python-checkins] r74618 - in python/trunk/Doc: library/signal.rst reference/datamodel.rst Message-ID: Author: georg.brandl Date: Tue Sep 1 10:00:47 2009 New Revision: 74618 Log: #6810: add a link to the section about frame objects instead of just a description where to find it. Modified: python/trunk/Doc/library/signal.rst python/trunk/Doc/reference/datamodel.rst Modified: python/trunk/Doc/library/signal.rst ============================================================================== --- python/trunk/Doc/library/signal.rst (original) +++ python/trunk/Doc/library/signal.rst Tue Sep 1 10:00:47 2009 @@ -211,9 +211,9 @@ exception to be raised. The *handler* is called with two arguments: the signal number and the current - stack frame (``None`` or a frame object; for a description of frame objects, see - the reference manual section on the standard type hierarchy or see the attribute - descriptions in the :mod:`inspect` module). + stack frame (``None`` or a frame object; for a description of frame objects, + see the :ref:`description in the type hierarchy ` or see the + attribute descriptions in the :mod:`inspect` module). .. _signal-example: Modified: python/trunk/Doc/reference/datamodel.rst ============================================================================== --- python/trunk/Doc/reference/datamodel.rst (original) +++ python/trunk/Doc/reference/datamodel.rst Tue Sep 1 10:00:47 2009 @@ -959,6 +959,8 @@ If a code object represents a function, the first item in :attr:`co_consts` is the documentation string of the function, or ``None`` if undefined. + .. _frame-objects: + Frame objects .. index:: object: frame From python-checkins at python.org Tue Sep 1 10:02:04 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 08:02:04 -0000 Subject: [Python-checkins] r74619 - python/branches/py3k/Doc/c-api/typeobj.rst Message-ID: Author: georg.brandl Date: Tue Sep 1 10:02:03 2009 New Revision: 74619 Log: #6754: remove old struct member nb_inplace_divide. Modified: python/branches/py3k/Doc/c-api/typeobj.rst Modified: python/branches/py3k/Doc/c-api/typeobj.rst ============================================================================== --- python/branches/py3k/Doc/c-api/typeobj.rst (original) +++ python/branches/py3k/Doc/c-api/typeobj.rst Tue Sep 1 10:02:03 2009 @@ -1052,7 +1052,6 @@ binaryfunc nb_inplace_add; binaryfunc nb_inplace_subtract; binaryfunc nb_inplace_multiply; - binaryfunc nb_inplace_divide; binaryfunc nb_inplace_remainder; ternaryfunc nb_inplace_power; binaryfunc nb_inplace_lshift; From python-checkins at python.org Tue Sep 1 10:03:26 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 08:03:26 -0000 Subject: [Python-checkins] r74620 - python/branches/py3k/Doc/includes/shoddy.c Message-ID: Author: georg.brandl Date: Tue Sep 1 10:03:26 2009 New Revision: 74620 Log: #6732: fix return value of module init function in example. Modified: python/branches/py3k/Doc/includes/shoddy.c Modified: python/branches/py3k/Doc/includes/shoddy.c ============================================================================== --- python/branches/py3k/Doc/includes/shoddy.c (original) +++ python/branches/py3k/Doc/includes/shoddy.c Tue Sep 1 10:03:26 2009 @@ -95,4 +95,5 @@ Py_INCREF(&ShoddyType); PyModule_AddObject(m, "Shoddy", (PyObject *) &ShoddyType); + return m; } From python-checkins at python.org Tue Sep 1 10:06:04 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 08:06:04 -0000 Subject: [Python-checkins] r74621 - python/trunk/Doc/library/optparse.rst Message-ID: Author: georg.brandl Date: Tue Sep 1 10:06:03 2009 New Revision: 74621 Log: #6638: fix wrong parameter name and markup a class. Modified: python/trunk/Doc/library/optparse.rst Modified: python/trunk/Doc/library/optparse.rst ============================================================================== --- python/trunk/Doc/library/optparse.rst (original) +++ python/trunk/Doc/library/optparse.rst Tue Sep 1 10:06:03 2009 @@ -1171,19 +1171,20 @@ the list of arguments to process (default: ``sys.argv[1:]``) ``values`` - object to store option arguments in (default: a new instance of optparse.Values) + object to store option arguments in (default: a new instance of + :class:`optparse.Values`) and the return values are ``options`` - the same object that was passed in as ``options``, or the optparse.Values + the same object that was passed in as ``values``, or the optparse.Values instance created by :mod:`optparse` ``args`` the leftover positional arguments after all options have been processed The most common usage is to supply neither keyword argument. If you supply -``options``, it will be modified with repeated ``setattr()`` calls (roughly one +``values``, it will be modified with repeated ``setattr()`` calls (roughly one for every option argument stored to an option destination) and returned by :meth:`parse_args`. From python-checkins at python.org Tue Sep 1 10:11:15 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 08:11:15 -0000 Subject: [Python-checkins] r74622 - in python/branches/py3k: Doc/library/_thread.rst Doc/library/codecs.rst Doc/library/ctypes.rst Doc/library/math.rst Doc/library/optparse.rst Doc/library/os.rst Doc/library/signal.rst Doc/library/stdtypes.rst Doc/reference/datamodel.rst Doc/tutorial/classes.rst Misc/ACKS Misc/NEWS Message-ID: Author: georg.brandl Date: Tue Sep 1 10:11:14 2009 New Revision: 74622 Log: Merged revisions 74542,74544-74548,74550,74554-74555,74578,74588,74590,74603,74616-74618,74621 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74542 | georg.brandl | 2009-08-23 23:28:56 +0200 (So, 23 Aug 2009) | 1 line Restore alphabetic order. ........ r74544 | georg.brandl | 2009-08-24 19:12:30 +0200 (Mo, 24 Aug 2009) | 1 line #6775: fix python.org URLs in README. ........ r74545 | georg.brandl | 2009-08-24 19:14:29 +0200 (Mo, 24 Aug 2009) | 1 line #6772: mention utf-8 as utf8 alias. ........ r74546 | georg.brandl | 2009-08-24 19:20:40 +0200 (Mo, 24 Aug 2009) | 1 line #6725: spell "namespace" consistently. ........ r74547 | georg.brandl | 2009-08-24 19:22:05 +0200 (Mo, 24 Aug 2009) | 1 line #6718: fix example. ........ r74548 | georg.brandl | 2009-08-24 19:24:27 +0200 (Mo, 24 Aug 2009) | 1 line #6677: mention "deleting" as an alias for removing files. ........ r74550 | georg.brandl | 2009-08-24 19:48:40 +0200 (Mo, 24 Aug 2009) | 1 line #6677: note that rmdir only removes empty directories. ........ r74554 | georg.brandl | 2009-08-27 20:59:02 +0200 (Do, 27 Aug 2009) | 1 line Typo fix. ........ r74555 | georg.brandl | 2009-08-27 21:02:43 +0200 (Do, 27 Aug 2009) | 1 line #6787: reference fix. ........ r74578 | tarek.ziade | 2009-08-29 15:33:21 +0200 (Sa, 29 Aug 2009) | 1 line fixed #6801: symmetric_difference_update also accepts pipe ........ r74588 | georg.brandl | 2009-08-30 10:35:01 +0200 (So, 30 Aug 2009) | 1 line #6803: fix old name. ........ r74590 | georg.brandl | 2009-08-30 13:51:53 +0200 (So, 30 Aug 2009) | 1 line #6801: fix copy-paste oversight. ........ r74603 | georg.brandl | 2009-08-31 08:38:29 +0200 (Mo, 31 Aug 2009) | 1 line other -> others where multiple arguments are accepted. ........ r74616 | georg.brandl | 2009-09-01 09:46:26 +0200 (Di, 01 Sep 2009) | 1 line #6808: clarification. ........ r74617 | georg.brandl | 2009-09-01 09:53:37 +0200 (Di, 01 Sep 2009) | 1 line #6765: hint that log(x, base) is not very sophisticated. ........ r74618 | georg.brandl | 2009-09-01 10:00:47 +0200 (Di, 01 Sep 2009) | 1 line #6810: add a link to the section about frame objects instead of just a description where to find it. ........ r74621 | georg.brandl | 2009-09-01 10:06:03 +0200 (Di, 01 Sep 2009) | 1 line #6638: fix wrong parameter name and markup a class. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/_thread.rst python/branches/py3k/Doc/library/codecs.rst python/branches/py3k/Doc/library/ctypes.rst python/branches/py3k/Doc/library/math.rst python/branches/py3k/Doc/library/optparse.rst python/branches/py3k/Doc/library/os.rst python/branches/py3k/Doc/library/signal.rst python/branches/py3k/Doc/library/stdtypes.rst python/branches/py3k/Doc/reference/datamodel.rst python/branches/py3k/Doc/tutorial/classes.rst python/branches/py3k/Misc/ACKS python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Doc/library/_thread.rst ============================================================================== --- python/branches/py3k/Doc/library/_thread.rst (original) +++ python/branches/py3k/Doc/library/_thread.rst Tue Sep 1 10:11:14 2009 @@ -147,7 +147,7 @@ module is available, interrupts always go to the main thread.) * Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is - equivalent to calling :func:`exit`. + equivalent to calling :func:`_thread.exit`. * Not all built-in functions that may block waiting for I/O allow other threads to run. (The most popular ones (:func:`time.sleep`, :meth:`file.read`, Modified: python/branches/py3k/Doc/library/codecs.rst ============================================================================== --- python/branches/py3k/Doc/library/codecs.rst (original) +++ python/branches/py3k/Doc/library/codecs.rst Tue Sep 1 10:11:14 2009 @@ -891,7 +891,8 @@ name, together with a few common aliases, and the languages for which the encoding is likely used. Neither the list of aliases nor the list of languages is meant to be exhaustive. Notice that spelling alternatives that only differ in -case or use a hyphen instead of an underscore are also valid aliases. +case or use a hyphen instead of an underscore are also valid aliases; therefore, +e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec. Many of the character sets support the same languages. They vary in individual characters (e.g. whether the EURO SIGN is supported or not), and in the Modified: python/branches/py3k/Doc/library/ctypes.rst ============================================================================== --- python/branches/py3k/Doc/library/ctypes.rst (original) +++ python/branches/py3k/Doc/library/ctypes.rst Tue Sep 1 10:11:14 2009 @@ -1592,7 +1592,7 @@ The returned function prototype creates functions that use the standard C calling convention. The function will release the GIL during the call. If *use_errno* is set to True, the ctypes private copy of the system - :data:`errno` variable is exchanged with the real :data:`errno` value bafore + :data:`errno` variable is exchanged with the real :data:`errno` value before and after the call; *use_last_error* does the same for the Windows error code. Modified: python/branches/py3k/Doc/library/math.rst ============================================================================== --- python/branches/py3k/Doc/library/math.rst (original) +++ python/branches/py3k/Doc/library/math.rst Tue Sep 1 10:11:14 2009 @@ -150,8 +150,10 @@ .. function:: log(x[, base]) - Return the logarithm of *x* to the given *base*. If the *base* is not specified, - return the natural logarithm of *x* (that is, the logarithm to base *e*). + With one argument, return the natural logarithm of *x* (to base *e*). + + With two arguments, return the logarithm of *x* to the given *base*, + calculated as ``log(x)/log(base)``. .. function:: log1p(x) @@ -162,7 +164,8 @@ .. function:: log10(x) - Return the base-10 logarithm of *x*. + Return the base-10 logarithm of *x*. This is usually more accurate + than ``log(x, 10)``. .. function:: pow(x, y) Modified: python/branches/py3k/Doc/library/optparse.rst ============================================================================== --- python/branches/py3k/Doc/library/optparse.rst (original) +++ python/branches/py3k/Doc/library/optparse.rst Tue Sep 1 10:11:14 2009 @@ -1166,19 +1166,20 @@ the list of arguments to process (default: ``sys.argv[1:]``) ``values`` - object to store option arguments in (default: a new instance of optparse.Values) + object to store option arguments in (default: a new instance of + :class:`optparse.Values`) and the return values are ``options`` - the same object that was passed in as ``options``, or the optparse.Values + the same object that was passed in as ``values``, or the optparse.Values instance created by :mod:`optparse` ``args`` the leftover positional arguments after all options have been processed The most common usage is to supply neither keyword argument. If you supply -``options``, it will be modified with repeated ``setattr()`` calls (roughly one +``values``, it will be modified with repeated ``setattr()`` calls (roughly one for every option argument stored to an option destination) and returned by :meth:`parse_args`. Modified: python/branches/py3k/Doc/library/os.rst ============================================================================== --- python/branches/py3k/Doc/library/os.rst (original) +++ python/branches/py3k/Doc/library/os.rst Tue Sep 1 10:11:14 2009 @@ -947,12 +947,12 @@ .. function:: remove(path) - Remove the file *path*. If *path* is a directory, :exc:`OSError` is raised; see - :func:`rmdir` below to remove a directory. This is identical to the - :func:`unlink` function documented below. On Windows, attempting to remove a - file that is in use causes an exception to be raised; on Unix, the directory - entry is removed but the storage allocated to the file is not made available - until the original file is no longer in use. Availability: Unix, + Remove (delete) the file *path*. If *path* is a directory, :exc:`OSError` is + raised; see :func:`rmdir` below to remove a directory. This is identical to + the :func:`unlink` function documented below. On Windows, attempting to + remove a file that is in use causes an exception to be raised; on Unix, the + directory entry is removed but the storage allocated to the file is not made + available until the original file is no longer in use. Availability: Unix, Windows. @@ -997,7 +997,10 @@ .. function:: rmdir(path) - Remove the directory *path*. Availability: Unix, Windows. + Remove (delete) the directory *path*. Only works when the directory is + empty, otherwise, :exc:`OSError` is raised. In order to remove whole + directory trees, :func:`shutil.rmtree` can be used. Availability: Unix, + Windows. .. function:: stat(path) @@ -1099,9 +1102,9 @@ .. function:: unlink(path) - Remove the file *path*. This is the same function as :func:`remove`; the - :func:`unlink` name is its traditional Unix name. Availability: Unix, - Windows. + Remove (delete) the file *path*. This is the same function as + :func:`remove`; the :func:`unlink` name is its traditional Unix + name. Availability: Unix, Windows. .. function:: utime(path, times) Modified: python/branches/py3k/Doc/library/signal.rst ============================================================================== --- python/branches/py3k/Doc/library/signal.rst (original) +++ python/branches/py3k/Doc/library/signal.rst Tue Sep 1 10:11:14 2009 @@ -205,9 +205,9 @@ exception to be raised. The *handler* is called with two arguments: the signal number and the current - stack frame (``None`` or a frame object; for a description of frame objects, see - the reference manual section on the standard type hierarchy or see the attribute - descriptions in the :mod:`inspect` module). + stack frame (``None`` or a frame object; for a description of frame objects, + see the :ref:`description in the type hierarchy ` or see the + attribute descriptions in the :mod:`inspect` module). .. _signal-example: Modified: python/branches/py3k/Doc/library/stdtypes.rst ============================================================================== --- python/branches/py3k/Doc/library/stdtypes.rst (original) +++ python/branches/py3k/Doc/library/stdtypes.rst Tue Sep 1 10:11:14 2009 @@ -1724,12 +1724,12 @@ .. method:: update(other, ...) set |= other | ... - Update the set, adding elements from *other*. + Update the set, adding elements from all others. .. method:: intersection_update(other, ...) set &= other & ... - Update the set, keeping only elements found in it and *other*. + Update the set, keeping only elements found in it and all others. .. method:: difference_update(other, ...) set -= other | ... @@ -2478,9 +2478,9 @@ their implementation of the context management protocol. See the :mod:`contextlib` module for some examples. -Python's :term:`generator`\s and the ``contextlib.contextfactory`` :term:`decorator` +Python's :term:`generator`\s and the ``contextlib.contextmanager`` :term:`decorator` provide a convenient way to implement these protocols. If a generator function is -decorated with the ``contextlib.contextfactory`` decorator, it will return a +decorated with the ``contextlib.contextmanager`` decorator, it will return a context manager implementing the necessary :meth:`__enter__` and :meth:`__exit__` methods, rather than the iterator produced by an undecorated generator function. Modified: python/branches/py3k/Doc/reference/datamodel.rst ============================================================================== --- python/branches/py3k/Doc/reference/datamodel.rst (original) +++ python/branches/py3k/Doc/reference/datamodel.rst Tue Sep 1 10:11:14 2009 @@ -864,6 +864,8 @@ If a code object represents a function, the first item in :attr:`co_consts` is the documentation string of the function, or ``None`` if undefined. + .. _frame-objects: + Frame objects .. index:: object: frame Modified: python/branches/py3k/Doc/tutorial/classes.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/classes.rst (original) +++ python/branches/py3k/Doc/tutorial/classes.rst Tue Sep 1 10:11:14 2009 @@ -51,8 +51,8 @@ .. _tut-scopes: -Python Scopes and Name Spaces -============================= +Python Scopes and Namespaces +============================ Before introducing classes, I first have to tell you something about Python's scope rules. Class definitions play some neat tricks with namespaces, and you @@ -87,7 +87,7 @@ :keyword:`del` statement. For example, ``del modname.the_answer`` will remove the attribute :attr:`the_answer` from the object named by ``modname``. -Name spaces are created at different moments and have different lifetimes. The +Namespaces are created at different moments and have different lifetimes. The namespace containing the built-in names is created when the Python interpreter starts up, and is never deleted. The global namespace for a module is created when the module definition is read in; normally, module namespaces also last @@ -381,9 +381,9 @@ attribute that is a function object, a method object is created by packing (pointers to) the instance object and the function object just found together in an abstract object: this is the method object. When the method object is called -with an argument list, it is unpacked again, a new argument list is constructed -from the instance object and the original argument list, and the function object -is called with this new argument list. +with an argument list, a new argument list is constructed from the instance +object and the argument list, and the function object is called with this new +argument list. .. _tut-remarks: Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Tue Sep 1 10:11:14 2009 @@ -791,6 +791,7 @@ Truida Wiedijk Felix Wiemann Gerry Wiener +Frank Wierzbicki Bryce "Zooko" Wilcox-O'Hearn John Williams Sue Williams Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Tue Sep 1 10:11:14 2009 @@ -1549,6 +1549,9 @@ - Issue #4204: Fixed module build errors on FreeBSD 4. +- Issue #6801 : symmetric_difference_update also accepts |. + Thanks to Carl Chenet. + C-API ----- From python-checkins at python.org Tue Sep 1 10:12:13 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 08:12:13 -0000 Subject: [Python-checkins] r74623 - python/branches/py3k/Misc/NEWS Message-ID: Author: georg.brandl Date: Tue Sep 1 10:12:13 2009 New Revision: 74623 Log: Remove old news entry that got merged. Modified: python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Tue Sep 1 10:12:13 2009 @@ -1549,9 +1549,6 @@ - Issue #4204: Fixed module build errors on FreeBSD 4. -- Issue #6801 : symmetric_difference_update also accepts |. - Thanks to Carl Chenet. - C-API ----- From python-checkins at python.org Tue Sep 1 10:13:17 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 01 Sep 2009 08:13:17 -0000 Subject: [Python-checkins] r74624 - in python/branches/release31-maint: Doc/c-api/typeobj.rst Doc/includes/mp_pool.py Doc/includes/shoddy.c Doc/library/_thread.rst Doc/library/codecs.rst Doc/library/ctypes.rst Doc/library/math.rst Doc/library/optparse.rst Doc/library/os.rst Doc/library/signal.rst Doc/library/stdtypes.rst Doc/library/string.rst Doc/reference/datamodel.rst Doc/tutorial/classes.rst Doc/tutorial/inputoutput.rst Misc/ACKS Misc/NEWS Objects/listsort.txt Objects/rangeobject.c Tools/pybench/README Message-ID: Author: georg.brandl Date: Tue Sep 1 10:13:16 2009 New Revision: 74624 Log: Merged revisions 74613,74615,74619-74620,74622 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ................ r74613 | georg.brandl | 2009-09-01 09:34:27 +0200 (Di, 01 Sep 2009) | 1 line #6814: remove traces of xrange(). ................ r74615 | georg.brandl | 2009-09-01 09:42:40 +0200 (Di, 01 Sep 2009) | 9 lines Recorded merge of revisions 74614 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74614 | georg.brandl | 2009-09-01 09:40:54 +0200 (Di, 01 Sep 2009) | 1 line #6813: better documentation for numberless string formats. ........ ................ r74619 | georg.brandl | 2009-09-01 10:02:03 +0200 (Di, 01 Sep 2009) | 1 line #6754: remove old struct member nb_inplace_divide. ................ r74620 | georg.brandl | 2009-09-01 10:03:26 +0200 (Di, 01 Sep 2009) | 1 line #6732: fix return value of module init function in example. ................ r74622 | georg.brandl | 2009-09-01 10:11:14 +0200 (Di, 01 Sep 2009) | 73 lines Merged revisions 74542,74544-74548,74550,74554-74555,74578,74588,74590,74603,74616-74618,74621 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74542 | georg.brandl | 2009-08-23 23:28:56 +0200 (So, 23 Aug 2009) | 1 line Restore alphabetic order. ........ r74544 | georg.brandl | 2009-08-24 19:12:30 +0200 (Mo, 24 Aug 2009) | 1 line #6775: fix python.org URLs in README. ........ r74545 | georg.brandl | 2009-08-24 19:14:29 +0200 (Mo, 24 Aug 2009) | 1 line #6772: mention utf-8 as utf8 alias. ........ r74546 | georg.brandl | 2009-08-24 19:20:40 +0200 (Mo, 24 Aug 2009) | 1 line #6725: spell "namespace" consistently. ........ r74547 | georg.brandl | 2009-08-24 19:22:05 +0200 (Mo, 24 Aug 2009) | 1 line #6718: fix example. ........ r74548 | georg.brandl | 2009-08-24 19:24:27 +0200 (Mo, 24 Aug 2009) | 1 line #6677: mention "deleting" as an alias for removing files. ........ r74550 | georg.brandl | 2009-08-24 19:48:40 +0200 (Mo, 24 Aug 2009) | 1 line #6677: note that rmdir only removes empty directories. ........ r74554 | georg.brandl | 2009-08-27 20:59:02 +0200 (Do, 27 Aug 2009) | 1 line Typo fix. ........ r74555 | georg.brandl | 2009-08-27 21:02:43 +0200 (Do, 27 Aug 2009) | 1 line #6787: reference fix. ........ r74578 | tarek.ziade | 2009-08-29 15:33:21 +0200 (Sa, 29 Aug 2009) | 1 line fixed #6801: symmetric_difference_update also accepts pipe ........ r74588 | georg.brandl | 2009-08-30 10:35:01 +0200 (So, 30 Aug 2009) | 1 line #6803: fix old name. ........ r74590 | georg.brandl | 2009-08-30 13:51:53 +0200 (So, 30 Aug 2009) | 1 line #6801: fix copy-paste oversight. ........ r74603 | georg.brandl | 2009-08-31 08:38:29 +0200 (Mo, 31 Aug 2009) | 1 line other -> others where multiple arguments are accepted. ........ r74616 | georg.brandl | 2009-09-01 09:46:26 +0200 (Di, 01 Sep 2009) | 1 line #6808: clarification. ........ r74617 | georg.brandl | 2009-09-01 09:53:37 +0200 (Di, 01 Sep 2009) | 1 line #6765: hint that log(x, base) is not very sophisticated. ........ r74618 | georg.brandl | 2009-09-01 10:00:47 +0200 (Di, 01 Sep 2009) | 1 line #6810: add a link to the section about frame objects instead of just a description where to find it. ........ r74621 | georg.brandl | 2009-09-01 10:06:03 +0200 (Di, 01 Sep 2009) | 1 line #6638: fix wrong parameter name and markup a class. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/c-api/typeobj.rst python/branches/release31-maint/Doc/includes/mp_pool.py python/branches/release31-maint/Doc/includes/shoddy.c python/branches/release31-maint/Doc/library/_thread.rst python/branches/release31-maint/Doc/library/codecs.rst python/branches/release31-maint/Doc/library/ctypes.rst python/branches/release31-maint/Doc/library/math.rst python/branches/release31-maint/Doc/library/optparse.rst python/branches/release31-maint/Doc/library/os.rst python/branches/release31-maint/Doc/library/signal.rst python/branches/release31-maint/Doc/library/stdtypes.rst python/branches/release31-maint/Doc/library/string.rst python/branches/release31-maint/Doc/reference/datamodel.rst python/branches/release31-maint/Doc/tutorial/classes.rst python/branches/release31-maint/Doc/tutorial/inputoutput.rst python/branches/release31-maint/Misc/ACKS python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Objects/listsort.txt python/branches/release31-maint/Objects/rangeobject.c python/branches/release31-maint/Tools/pybench/README Modified: python/branches/release31-maint/Doc/c-api/typeobj.rst ============================================================================== --- python/branches/release31-maint/Doc/c-api/typeobj.rst (original) +++ python/branches/release31-maint/Doc/c-api/typeobj.rst Tue Sep 1 10:13:16 2009 @@ -1052,7 +1052,6 @@ binaryfunc nb_inplace_add; binaryfunc nb_inplace_subtract; binaryfunc nb_inplace_multiply; - binaryfunc nb_inplace_divide; binaryfunc nb_inplace_remainder; ternaryfunc nb_inplace_power; binaryfunc nb_inplace_lshift; Modified: python/branches/release31-maint/Doc/includes/mp_pool.py ============================================================================== --- python/branches/release31-maint/Doc/includes/mp_pool.py (original) +++ python/branches/release31-maint/Doc/includes/mp_pool.py Tue Sep 1 10:13:16 2009 @@ -98,17 +98,17 @@ t = time.time() A = list(map(pow3, range(N))) - print('\tmap(pow3, xrange(%d)):\n\t\t%s seconds' % \ + print('\tmap(pow3, range(%d)):\n\t\t%s seconds' % \ (N, time.time() - t)) t = time.time() B = pool.map(pow3, range(N)) - print('\tpool.map(pow3, xrange(%d)):\n\t\t%s seconds' % \ + print('\tpool.map(pow3, range(%d)):\n\t\t%s seconds' % \ (N, time.time() - t)) t = time.time() C = list(pool.imap(pow3, range(N), chunksize=N//8)) - print('\tlist(pool.imap(pow3, xrange(%d), chunksize=%d)):\n\t\t%s' \ + print('\tlist(pool.imap(pow3, range(%d), chunksize=%d)):\n\t\t%s' \ ' seconds' % (N, N//8, time.time() - t)) assert A == B == C, (len(A), len(B), len(C)) Modified: python/branches/release31-maint/Doc/includes/shoddy.c ============================================================================== --- python/branches/release31-maint/Doc/includes/shoddy.c (original) +++ python/branches/release31-maint/Doc/includes/shoddy.c Tue Sep 1 10:13:16 2009 @@ -95,4 +95,5 @@ Py_INCREF(&ShoddyType); PyModule_AddObject(m, "Shoddy", (PyObject *) &ShoddyType); + return m; } Modified: python/branches/release31-maint/Doc/library/_thread.rst ============================================================================== --- python/branches/release31-maint/Doc/library/_thread.rst (original) +++ python/branches/release31-maint/Doc/library/_thread.rst Tue Sep 1 10:13:16 2009 @@ -147,7 +147,7 @@ module is available, interrupts always go to the main thread.) * Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is - equivalent to calling :func:`exit`. + equivalent to calling :func:`_thread.exit`. * Not all built-in functions that may block waiting for I/O allow other threads to run. (The most popular ones (:func:`time.sleep`, :meth:`file.read`, Modified: python/branches/release31-maint/Doc/library/codecs.rst ============================================================================== --- python/branches/release31-maint/Doc/library/codecs.rst (original) +++ python/branches/release31-maint/Doc/library/codecs.rst Tue Sep 1 10:13:16 2009 @@ -891,7 +891,8 @@ name, together with a few common aliases, and the languages for which the encoding is likely used. Neither the list of aliases nor the list of languages is meant to be exhaustive. Notice that spelling alternatives that only differ in -case or use a hyphen instead of an underscore are also valid aliases. +case or use a hyphen instead of an underscore are also valid aliases; therefore, +e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec. Many of the character sets support the same languages. They vary in individual characters (e.g. whether the EURO SIGN is supported or not), and in the Modified: python/branches/release31-maint/Doc/library/ctypes.rst ============================================================================== --- python/branches/release31-maint/Doc/library/ctypes.rst (original) +++ python/branches/release31-maint/Doc/library/ctypes.rst Tue Sep 1 10:13:16 2009 @@ -1592,7 +1592,7 @@ The returned function prototype creates functions that use the standard C calling convention. The function will release the GIL during the call. If *use_errno* is set to True, the ctypes private copy of the system - :data:`errno` variable is exchanged with the real :data:`errno` value bafore + :data:`errno` variable is exchanged with the real :data:`errno` value before and after the call; *use_last_error* does the same for the Windows error code. Modified: python/branches/release31-maint/Doc/library/math.rst ============================================================================== --- python/branches/release31-maint/Doc/library/math.rst (original) +++ python/branches/release31-maint/Doc/library/math.rst Tue Sep 1 10:13:16 2009 @@ -150,8 +150,10 @@ .. function:: log(x[, base]) - Return the logarithm of *x* to the given *base*. If the *base* is not specified, - return the natural logarithm of *x* (that is, the logarithm to base *e*). + With one argument, return the natural logarithm of *x* (to base *e*). + + With two arguments, return the logarithm of *x* to the given *base*, + calculated as ``log(x)/log(base)``. .. function:: log1p(x) @@ -162,7 +164,8 @@ .. function:: log10(x) - Return the base-10 logarithm of *x*. + Return the base-10 logarithm of *x*. This is usually more accurate + than ``log(x, 10)``. .. function:: pow(x, y) Modified: python/branches/release31-maint/Doc/library/optparse.rst ============================================================================== --- python/branches/release31-maint/Doc/library/optparse.rst (original) +++ python/branches/release31-maint/Doc/library/optparse.rst Tue Sep 1 10:13:16 2009 @@ -1166,19 +1166,20 @@ the list of arguments to process (default: ``sys.argv[1:]``) ``values`` - object to store option arguments in (default: a new instance of optparse.Values) + object to store option arguments in (default: a new instance of + :class:`optparse.Values`) and the return values are ``options`` - the same object that was passed in as ``options``, or the optparse.Values + the same object that was passed in as ``values``, or the optparse.Values instance created by :mod:`optparse` ``args`` the leftover positional arguments after all options have been processed The most common usage is to supply neither keyword argument. If you supply -``options``, it will be modified with repeated ``setattr()`` calls (roughly one +``values``, it will be modified with repeated ``setattr()`` calls (roughly one for every option argument stored to an option destination) and returned by :meth:`parse_args`. 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 Sep 1 10:13:16 2009 @@ -396,7 +396,7 @@ Close all file descriptors from *fd_low* (inclusive) to *fd_high* (exclusive), ignoring errors. Availability: Unix, Windows. Equivalent to:: - for fd in xrange(fd_low, fd_high): + for fd in range(fd_low, fd_high): try: os.close(fd) except OSError: @@ -947,12 +947,12 @@ .. function:: remove(path) - Remove the file *path*. If *path* is a directory, :exc:`OSError` is raised; see - :func:`rmdir` below to remove a directory. This is identical to the - :func:`unlink` function documented below. On Windows, attempting to remove a - file that is in use causes an exception to be raised; on Unix, the directory - entry is removed but the storage allocated to the file is not made available - until the original file is no longer in use. Availability: Unix, + Remove (delete) the file *path*. If *path* is a directory, :exc:`OSError` is + raised; see :func:`rmdir` below to remove a directory. This is identical to + the :func:`unlink` function documented below. On Windows, attempting to + remove a file that is in use causes an exception to be raised; on Unix, the + directory entry is removed but the storage allocated to the file is not made + available until the original file is no longer in use. Availability: Unix, Windows. @@ -997,7 +997,10 @@ .. function:: rmdir(path) - Remove the directory *path*. Availability: Unix, Windows. + Remove (delete) the directory *path*. Only works when the directory is + empty, otherwise, :exc:`OSError` is raised. In order to remove whole + directory trees, :func:`shutil.rmtree` can be used. Availability: Unix, + Windows. .. function:: stat(path) @@ -1099,9 +1102,9 @@ .. function:: unlink(path) - Remove the file *path*. This is the same function as :func:`remove`; the - :func:`unlink` name is its traditional Unix name. Availability: Unix, - Windows. + Remove (delete) the file *path*. This is the same function as + :func:`remove`; the :func:`unlink` name is its traditional Unix + name. Availability: Unix, Windows. .. function:: utime(path, times) Modified: python/branches/release31-maint/Doc/library/signal.rst ============================================================================== --- python/branches/release31-maint/Doc/library/signal.rst (original) +++ python/branches/release31-maint/Doc/library/signal.rst Tue Sep 1 10:13:16 2009 @@ -205,9 +205,9 @@ exception to be raised. The *handler* is called with two arguments: the signal number and the current - stack frame (``None`` or a frame object; for a description of frame objects, see - the reference manual section on the standard type hierarchy or see the attribute - descriptions in the :mod:`inspect` module). + stack frame (``None`` or a frame object; for a description of frame objects, + see the :ref:`description in the type hierarchy ` or see the + attribute descriptions in the :mod:`inspect` module). .. _signal-example: Modified: python/branches/release31-maint/Doc/library/stdtypes.rst ============================================================================== --- python/branches/release31-maint/Doc/library/stdtypes.rst (original) +++ python/branches/release31-maint/Doc/library/stdtypes.rst Tue Sep 1 10:13:16 2009 @@ -1724,12 +1724,12 @@ .. method:: update(other, ...) set |= other | ... - Update the set, adding elements from *other*. + Update the set, adding elements from all others. .. method:: intersection_update(other, ...) set &= other & ... - Update the set, keeping only elements found in it and *other*. + Update the set, keeping only elements found in it and all others. .. method:: difference_update(other, ...) set -= other | ... @@ -2478,9 +2478,9 @@ their implementation of the context management protocol. See the :mod:`contextlib` module for some examples. -Python's :term:`generator`\s and the ``contextlib.contextfactory`` :term:`decorator` +Python's :term:`generator`\s and the ``contextlib.contextmanager`` :term:`decorator` provide a convenient way to implement these protocols. If a generator function is -decorated with the ``contextlib.contextfactory`` decorator, it will return a +decorated with the ``contextlib.contextmanager`` decorator, it will return a context manager implementing the necessary :meth:`__enter__` and :meth:`__exit__` methods, rather than the iterator produced by an undecorated generator function. 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 Tue Sep 1 10:13:16 2009 @@ -194,7 +194,7 @@ The grammar for a replacement field is as follows: .. productionlist:: sf - replacement_field: "{" `field_name` ["!" `conversion`] [":" `format_spec`] "}" + replacement_field: "{" [`field_name`] ["!" `conversion`] [":" `format_spec`] "}" field_name: arg_name ("." `attribute_name` | "[" `element_index` "]")* arg_name: (`identifier` | `integer`)? attribute_name: `identifier` @@ -202,7 +202,7 @@ conversion: "r" | "s" | "a" format_spec: -In less formal terms, the replacement field starts with a *field_name* that specifies +In less formal terms, the replacement field can start with a *field_name* that specifies the object whose value is to be formatted and inserted into the output instead of the replacement field. The *field_name* is optionally followed by a *conversion* field, which is @@ -223,7 +223,7 @@ "First, thou shalt count to {0}" # References first positional argument "Bring me a {}" # Implicitly references the first positional argument - "From {} to {}" # Same as "From {0] to {1}" + "From {} to {}" # Same as "From {0} to {1}" "My quest is {name}" # References keyword argument 'name' "Weight in tons {0.weight}" # 'weight' attribute of first positional arg "Units destroyed: {players[0]}" # First element of keyword argument 'players'. @@ -243,6 +243,7 @@ "Harold's a clever {0!s}" # Calls str() on the argument first "Bring out the holy {name!r}" # Calls repr() on the argument first + "More {!a}" # Calls ascii() on the argument first The *format_spec* field contains a specification of how the value should be presented, including such details as field width, alignment, padding, decimal 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 Sep 1 10:13:16 2009 @@ -864,6 +864,8 @@ If a code object represents a function, the first item in :attr:`co_consts` is the documentation string of the function, or ``None`` if undefined. + .. _frame-objects: + Frame objects .. index:: object: frame Modified: python/branches/release31-maint/Doc/tutorial/classes.rst ============================================================================== --- python/branches/release31-maint/Doc/tutorial/classes.rst (original) +++ python/branches/release31-maint/Doc/tutorial/classes.rst Tue Sep 1 10:13:16 2009 @@ -51,8 +51,8 @@ .. _tut-scopes: -Python Scopes and Name Spaces -============================= +Python Scopes and Namespaces +============================ Before introducing classes, I first have to tell you something about Python's scope rules. Class definitions play some neat tricks with namespaces, and you @@ -87,7 +87,7 @@ :keyword:`del` statement. For example, ``del modname.the_answer`` will remove the attribute :attr:`the_answer` from the object named by ``modname``. -Name spaces are created at different moments and have different lifetimes. The +Namespaces are created at different moments and have different lifetimes. The namespace containing the built-in names is created when the Python interpreter starts up, and is never deleted. The global namespace for a module is created when the module definition is read in; normally, module namespaces also last @@ -381,9 +381,9 @@ attribute that is a function object, a method object is created by packing (pointers to) the instance object and the function object just found together in an abstract object: this is the method object. When the method object is called -with an argument list, it is unpacked again, a new argument list is constructed -from the instance object and the original argument list, and the function object -is called with this new argument list. +with an argument list, a new argument list is constructed from the instance +object and the argument list, and the function object is called with this new +argument list. .. _tut-remarks: Modified: python/branches/release31-maint/Doc/tutorial/inputoutput.rst ============================================================================== --- python/branches/release31-maint/Doc/tutorial/inputoutput.rst (original) +++ python/branches/release31-maint/Doc/tutorial/inputoutput.rst Tue Sep 1 10:13:16 2009 @@ -126,12 +126,12 @@ Basic usage of the :meth:`str.format` method looks like this:: - >>> print('We are the {0} who say "{1}!"'.format('knights', 'Ni')) + >>> print('We are the {} who say "{}!"'.format('knights', 'Ni')) We are the knights who say "Ni!" The brackets and characters within them (called format fields) are replaced with -the objects passed into the :meth:`~str.format` method. The number in the -brackets refers to the position of the object passed into the +the objects passed into the :meth:`~str.format` method. A number in the +brackets can be used to refer to the position of the object passed into the :meth:`~str.format` method. :: >>> print('{0} and {1}'.format('spam', 'eggs')) @@ -152,6 +152,15 @@ other='Georg')) The story of Bill, Manfred, and Georg. +``'!a'`` (apply :func:`ascii`), ``'!s'`` (apply :func:`str`) and ``'!r'`` +(apply :func:`repr`) can be used to convert the value before it is formatted:: + + >>> import math + >>> print('The value of PI is approximately {}.'.format(math.pi)) + The value of PI is approximately 3.14159265359. + >>> print('The value of PI is approximately {!r}.'.format(math.pi)) + The value of PI is approximately 3.141592653589793. + An optional ``':'`` and format specifier can follow the field name. This allows greater control over how the value is formatted. The following example truncates Pi to three places after the decimal. Modified: python/branches/release31-maint/Misc/ACKS ============================================================================== --- python/branches/release31-maint/Misc/ACKS (original) +++ python/branches/release31-maint/Misc/ACKS Tue Sep 1 10:13:16 2009 @@ -789,6 +789,7 @@ Truida Wiedijk Felix Wiemann Gerry Wiener +Frank Wierzbicki Bryce "Zooko" Wilcox-O'Hearn John Williams Sue Williams Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Tue Sep 1 10:13:16 2009 @@ -1462,6 +1462,9 @@ - Issue #4204: Fixed module build errors on FreeBSD 4. +- Issue #6801 : symmetric_difference_update also accepts |. + Thanks to Carl Chenet. + C-API ----- Modified: python/branches/release31-maint/Objects/listsort.txt ============================================================================== --- python/branches/release31-maint/Objects/listsort.txt (original) +++ python/branches/release31-maint/Objects/listsort.txt Tue Sep 1 10:13:16 2009 @@ -606,7 +606,7 @@ def fill(n): from random import random - return [random() for i in xrange(n)] + return [random() for i in range(n)] def mycmp(x, y): global ncmp Modified: python/branches/release31-maint/Objects/rangeobject.c ============================================================================== --- python/branches/release31-maint/Objects/rangeobject.c (original) +++ python/branches/release31-maint/Objects/rangeobject.c Tue Sep 1 10:13:16 2009 @@ -431,7 +431,7 @@ rangeiter_new, /* tp_new */ }; -/* Return number of items in range/xrange (lo, hi, step). step > 0 +/* Return number of items in range (lo, hi, step). step > 0 * required. Return a value < 0 if & only if the true value is too * large to fit in a signed long. */ Modified: python/branches/release31-maint/Tools/pybench/README ============================================================================== --- python/branches/release31-maint/Tools/pybench/README (original) +++ python/branches/release31-maint/Tools/pybench/README Tue Sep 1 10:13:16 2009 @@ -260,10 +260,7 @@ # Run test rounds # - # NOTE: Use xrange() for all test loops unless you want to face - # a 20MB process ! - # - for i in xrange(self.rounds): + for i in range(self.rounds): # Repeat the operations per round to raise the run-time # per operation significantly above the noise level of the @@ -305,7 +302,7 @@ a = 1 # Run test rounds (without actually doing any operation) - for i in xrange(self.rounds): + for i in range(self.rounds): # Skip the actual execution of the operations, since we # only want to measure the test's administration overhead. From nnorwitz at gmail.com Tue Sep 1 23:42:13 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 1 Sep 2009 17:42:13 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090901214213.GA24324@python.psfb.org> More important issues: ---------------------- test_ssl leaked [446, -26, 0] references, sum=420 Less important issues: ---------------------- test_cmd_line leaked [-25, 0, -25] references, sum=-50 test_file2k leaked [0, 84, -84] references, sum=0 test_smtplib leaked [-30, -72, 0] references, sum=-102 test_socketserver leaked [0, 80, -3] references, sum=77 test_sys leaked [0, 21, -21] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [-8, 8, 0] references, sum=0 From python-checkins at python.org Wed Sep 2 00:27:58 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 01 Sep 2009 22:27:58 -0000 Subject: [Python-checkins] r74625 - in python/trunk: Lib/test/test_descr.py Misc/NEWS Objects/classobject.c Objects/funcobject.c Message-ID: Author: benjamin.peterson Date: Wed Sep 2 00:27:57 2009 New Revision: 74625 Log: remove the check that classmethod's argument is a callable Modified: python/trunk/Lib/test/test_descr.py python/trunk/Misc/NEWS python/trunk/Objects/classobject.c python/trunk/Objects/funcobject.c Modified: python/trunk/Lib/test/test_descr.py ============================================================================== --- python/trunk/Lib/test/test_descr.py (original) +++ python/trunk/Lib/test/test_descr.py Wed Sep 2 00:27:57 2009 @@ -1391,13 +1391,9 @@ self.assertEqual(super(D,D).goo(), (D,)) self.assertEqual(super(D,d).goo(), (D,)) - # Verify that argument is checked for callability (SF bug 753451) - try: - classmethod(1).__get__(1) - except TypeError: - pass - else: - self.fail("classmethod should check for callability") + # Verify that a non-callable will raise + meth = classmethod(1).__get__(1) + self.assertRaises(TypeError, meth) # Verify that classmethod() doesn't allow keyword args try: Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Sep 2 00:27:57 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- classmethod no longer checks if its argument is callable. + - Issue #6750: A text file opened with io.open() could duplicate its output when writing from multiple threads at the same time. Modified: python/trunk/Objects/classobject.c ============================================================================== --- python/trunk/Objects/classobject.c (original) +++ python/trunk/Objects/classobject.c Wed Sep 2 00:27:57 2009 @@ -2226,10 +2226,6 @@ PyMethod_New(PyObject *func, PyObject *self, PyObject *klass) { register PyMethodObject *im; - if (!PyCallable_Check(func)) { - PyErr_BadInternalCall(); - return NULL; - } im = free_list; if (im != NULL) { free_list = (PyMethodObject *)(im->im_self); Modified: python/trunk/Objects/funcobject.c ============================================================================== --- python/trunk/Objects/funcobject.c (original) +++ python/trunk/Objects/funcobject.c Wed Sep 2 00:27:57 2009 @@ -659,12 +659,6 @@ return -1; if (!_PyArg_NoKeywords("classmethod", kwds)) return -1; - if (!PyCallable_Check(callable)) { - PyErr_Format(PyExc_TypeError, "'%s' object is not callable", - callable->ob_type->tp_name); - return -1; - } - Py_INCREF(callable); cm->cm_callable = callable; return 0; From python-checkins at python.org Wed Sep 2 09:26:46 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 02 Sep 2009 07:26:46 -0000 Subject: [Python-checkins] r74626 - peps/trunk/pep-0386.txt Message-ID: Author: tarek.ziade Date: Wed Sep 2 09:26:46 2009 New Revision: 74626 Log: changed the post.dev marker according to latest state Modified: peps/trunk/pep-0386.txt Modified: peps/trunk/pep-0386.txt ============================================================================== --- peps/trunk/pep-0386.txt (original) +++ peps/trunk/pep-0386.txt Wed Sep 2 09:26:46 2009 @@ -251,7 +251,7 @@ The pseudo-format supported is:: - N.N[.N]+[abc]N[.N]+[.(dev|post)N+|(devN+postN+)] + N.N[.N]+[abc]N[.N]+[.postN+][.devN+] Some examples probably make it clearer:: @@ -267,7 +267,7 @@ ... < V('1.0c1') ... < V('1.0.dev456') ... < V('1.0') - ... < V('1.0.dev456post623') + ... < V('1.0.post623.dev456') ... < V('1.0.post456')) True @@ -276,7 +276,7 @@ (e.g. Twisted [#twisted]_). For example *after* a "1.2.0" release there might be a "1.2.0-r678" release. We used "post" instead of "r" because the "r" is ambiguous as to whether it indicates a pre- or post-release. -Last ".dev456post623" is a development version of a post-release. +Last ".post623.dev456" is a development version of a post-release. ``verlib`` provides a ``RationalVersion`` class and a ``suggest_rational_version`` function. @@ -310,7 +310,7 @@ - the main version part - the pre-release part -- the `devpost` marker part +- the `postdev` marker part Examples :: From python-checkins at python.org Wed Sep 2 22:31:26 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 02 Sep 2009 20:31:26 -0000 Subject: [Python-checkins] r74627 - python/branches/py3k/Doc/reference/datamodel.rst Message-ID: Author: georg.brandl Date: Wed Sep 2 22:31:26 2009 New Revision: 74627 Log: #6819: fix typo. Modified: python/branches/py3k/Doc/reference/datamodel.rst Modified: python/branches/py3k/Doc/reference/datamodel.rst ============================================================================== --- python/branches/py3k/Doc/reference/datamodel.rst (original) +++ python/branches/py3k/Doc/reference/datamodel.rst Wed Sep 2 22:31:26 2009 @@ -666,7 +666,7 @@ of the shared library file. Custom classes - Custon class types are typically created by class definitions (see section + Custom class types are typically created by class definitions (see section :ref:`class`). A class has a namespace implemented by a dictionary object. Class attribute references are translated to lookups in this dictionary, e.g., ``C.x`` is translated to ``C.__dict__["x"]`` (although there are a number of From python-checkins at python.org Wed Sep 2 22:33:30 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 02 Sep 2009 20:33:30 -0000 Subject: [Python-checkins] r74628 - python/branches/py3k/Lib/pstats.py Message-ID: Author: georg.brandl Date: Wed Sep 2 22:33:30 2009 New Revision: 74628 Log: Use true kwonly arg instead of **kwds hackaround. Modified: python/branches/py3k/Lib/pstats.py Modified: python/branches/py3k/Lib/pstats.py ============================================================================== --- python/branches/py3k/Lib/pstats.py (original) +++ python/branches/py3k/Lib/pstats.py Wed Sep 2 22:33:30 2009 @@ -70,20 +70,8 @@ print_stats(5).print_callers(5) """ - def __init__(self, *args, **kwds): - # I can't figure out how to explictly specify a stream keyword arg - # with *args: - # def __init__(self, *args, stream=sys.stdout): ... - # so I use **kwds and sqauwk if something unexpected is passed in. - self.stream = sys.stdout - if "stream" in kwds: - self.stream = kwds["stream"] - del kwds["stream"] - if kwds: - keys = kwds.keys() - keys.sort() - extras = ", ".join(["%s=%s" % (k, kwds[k]) for k in keys]) - raise ValueError("unrecognized keyword args: %s" % extras) + def __init__(self, *args, stream=None): + self.stream = stream or sys.stdout if not len(args): arg = None else: From python-checkins at python.org Wed Sep 2 22:34:14 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 02 Sep 2009 20:34:14 -0000 Subject: [Python-checkins] r74629 - python/branches/py3k/Lib/quopri.py Message-ID: Author: georg.brandl Date: Wed Sep 2 22:34:14 2009 New Revision: 74629 Log: Use true booleans and a bit more PEP8. Modified: python/branches/py3k/Lib/quopri.py Modified: python/branches/py3k/Lib/quopri.py ============================================================================== --- python/branches/py3k/Lib/quopri.py (original) +++ python/branches/py3k/Lib/quopri.py Wed Sep 2 22:34:14 2009 @@ -41,7 +41,7 @@ -def encode(input, output, quotetabs, header = 0): +def encode(input, output, quotetabs, header=False): """Read 'input', apply quoted-printable encoding, and write to 'output'. 'input' and 'output' are files with readline() and write() methods. @@ -54,7 +54,7 @@ if b2a_qp is not None: data = input.read() - odata = b2a_qp(data, quotetabs = quotetabs, header = header) + odata = b2a_qp(data, quotetabs=quotetabs, header=header) output.write(odata) return @@ -105,9 +105,9 @@ if prevline is not None: write(prevline, lineEnd=stripped) -def encodestring(s, quotetabs = 0, header = 0): +def encodestring(s, quotetabs=False, header=False): if b2a_qp is not None: - return b2a_qp(s, quotetabs = quotetabs, header = header) + return b2a_qp(s, quotetabs=quotetabs, header=header) from io import BytesIO infp = BytesIO(s) outfp = BytesIO() @@ -116,14 +116,14 @@ -def decode(input, output, header = 0): +def decode(input, output, header=False): """Read 'input', apply quoted-printable decoding, and write to 'output'. 'input' and 'output' are files with readline() and write() methods. If 'header' is true, decode underscore as space (per RFC 1522).""" if a2b_qp is not None: data = input.read() - odata = a2b_qp(data, header = header) + odata = a2b_qp(data, header=header) output.write(odata) return @@ -159,13 +159,13 @@ if new: output.write(new) -def decodestring(s, header = 0): +def decodestring(s, header=False): if a2b_qp is not None: - return a2b_qp(s, header = header) + return a2b_qp(s, header=header) from io import BytesIO infp = BytesIO(s) outfp = BytesIO() - decode(infp, outfp, header = header) + decode(infp, outfp, header=header) return outfp.getvalue() From python-checkins at python.org Wed Sep 2 22:34:53 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 02 Sep 2009 20:34:53 -0000 Subject: [Python-checkins] r74630 - in python/branches/py3k/Doc/library: os.path.rst os.rst ossaudiodev.rst parser.rst pdb.rst persistence.rst pickle.rst pickletools.rst pipes.rst pkgutil.rst poplib.rst pprint.rst profile.rst pty.rst pwd.rst py_compile.rst pyclbr.rst pydoc.rst pyexpat.rst python.rst queue.rst quopri.rst random.rst re.rst readline.rst reprlib.rst resource.rst rlcompleter.rst runpy.rst select.rst shelve.rst shlex.rst shutil.rst signal.rst site.rst smtplib.rst sndhdr.rst socket.rst socketserver.rst Message-ID: Author: georg.brandl Date: Wed Sep 2 22:34:52 2009 New Revision: 74630 Log: Switch more function arguments docs to new-style. Modified: python/branches/py3k/Doc/library/os.path.rst python/branches/py3k/Doc/library/os.rst python/branches/py3k/Doc/library/ossaudiodev.rst python/branches/py3k/Doc/library/parser.rst python/branches/py3k/Doc/library/pdb.rst python/branches/py3k/Doc/library/persistence.rst python/branches/py3k/Doc/library/pickle.rst python/branches/py3k/Doc/library/pickletools.rst python/branches/py3k/Doc/library/pipes.rst python/branches/py3k/Doc/library/pkgutil.rst python/branches/py3k/Doc/library/poplib.rst python/branches/py3k/Doc/library/pprint.rst python/branches/py3k/Doc/library/profile.rst python/branches/py3k/Doc/library/pty.rst python/branches/py3k/Doc/library/pwd.rst python/branches/py3k/Doc/library/py_compile.rst python/branches/py3k/Doc/library/pyclbr.rst python/branches/py3k/Doc/library/pydoc.rst python/branches/py3k/Doc/library/pyexpat.rst python/branches/py3k/Doc/library/python.rst python/branches/py3k/Doc/library/queue.rst python/branches/py3k/Doc/library/quopri.rst python/branches/py3k/Doc/library/random.rst python/branches/py3k/Doc/library/re.rst python/branches/py3k/Doc/library/readline.rst python/branches/py3k/Doc/library/reprlib.rst python/branches/py3k/Doc/library/resource.rst python/branches/py3k/Doc/library/rlcompleter.rst python/branches/py3k/Doc/library/runpy.rst python/branches/py3k/Doc/library/select.rst python/branches/py3k/Doc/library/shelve.rst python/branches/py3k/Doc/library/shlex.rst python/branches/py3k/Doc/library/shutil.rst python/branches/py3k/Doc/library/signal.rst python/branches/py3k/Doc/library/site.rst python/branches/py3k/Doc/library/smtplib.rst python/branches/py3k/Doc/library/sndhdr.rst python/branches/py3k/Doc/library/socket.rst python/branches/py3k/Doc/library/socketserver.rst Modified: python/branches/py3k/Doc/library/os.path.rst ============================================================================== --- python/branches/py3k/Doc/library/os.path.rst (original) +++ python/branches/py3k/Doc/library/os.path.rst Wed Sep 2 22:34:52 2009 @@ -218,7 +218,7 @@ links encountered in the path (if they are supported by the operating system). -.. function:: relpath(path[, start]) +.. function:: relpath(path, start=None) Return a relative filepath to *path* either from the current directory or from an optional *start* point. Modified: python/branches/py3k/Doc/library/os.rst ============================================================================== --- python/branches/py3k/Doc/library/os.rst (original) +++ python/branches/py3k/Doc/library/os.rst Wed Sep 2 22:34:52 2009 @@ -204,18 +204,17 @@ Return the current process's user id. Availability: Unix. -.. function:: getenv(varname[, value]) +.. function:: getenv(key, default=None) - Return the value of the environment variable *varname* if it exists, or *value* - if it doesn't. *value* defaults to ``None``. Availability: most flavors of - Unix, Windows. + Return the value of the environment variable *key* if it exists, or + *default* if it doesn't. Availability: most flavors of Unix, Windows. -.. function:: putenv(varname, value) +.. function:: putenv(key, value) .. index:: single: environment variables; setting - Set the environment variable named *varname* to the string *value*. Such + Set the environment variable named *key* to the string *value*. Such changes to the environment affect subprocesses started with :func:`os.system`, :func:`popen` or :func:`fork` and :func:`execv`. Availability: most flavors of Unix, Windows. @@ -326,11 +325,11 @@ Unix. -.. function:: unsetenv(varname) +.. function:: unsetenv(key) .. index:: single: environment variables; deleting - Unset (delete) the environment variable named *varname*. Such changes to the + Unset (delete) the environment variable named *key*. Such changes to the environment affect subprocesses started with :func:`os.system`, :func:`popen` or :func:`fork` and :func:`execv`. Availability: most flavors of Unix, Windows. @@ -847,15 +846,14 @@ doesn't open the FIFO --- it just creates the rendezvous point. -.. function:: mknod(filename[, mode=0o600, device]) +.. function:: mknod(filename[, mode=0o600[, device]]) Create a filesystem node (file, device special file or named pipe) named - *filename*. *mode* specifies both the permissions to use and the type of node to - be created, being combined (bitwise OR) with one of ``stat.S_IFREG``, - ``stat.S_IFCHR``, ``stat.S_IFBLK``, - and ``stat.S_IFIFO`` (those constants are available in :mod:`stat`). - For ``stat.S_IFCHR`` and - ``stat.S_IFBLK``, *device* defines the newly created device special file (probably using + *filename*. *mode* specifies both the permissions to use and the type of node + to be created, being combined (bitwise OR) with one of ``stat.S_IFREG``, + ``stat.S_IFCHR``, ``stat.S_IFBLK``, and ``stat.S_IFIFO`` (those constants are + available in :mod:`stat`). For ``stat.S_IFCHR`` and ``stat.S_IFBLK``, + *device* defines the newly created device special file (probably using :func:`os.makedev`), otherwise it is ignored. @@ -1123,7 +1121,7 @@ Availability: Unix, Windows. -.. function:: walk(top[, topdown=True [, onerror=None[, followlinks=False]]]) +.. function:: walk(top, topdown=True, onerror=None, followlinks=False) .. index:: single: directory; walking Modified: python/branches/py3k/Doc/library/ossaudiodev.rst ============================================================================== --- python/branches/py3k/Doc/library/ossaudiodev.rst (original) +++ python/branches/py3k/Doc/library/ossaudiodev.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`ossaudiodev` --- Access to OSS-compatible audio devices ============================================================= Modified: python/branches/py3k/Doc/library/parser.rst ============================================================================== --- python/branches/py3k/Doc/library/parser.rst (original) +++ python/branches/py3k/Doc/library/parser.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`parser` --- Access Python parse trees =========================================== @@ -165,7 +164,7 @@ numbering information. -.. function:: st2list(st[, line_info]) +.. function:: st2list(st, line_info=False, col_info=False) This function accepts an ST object from the caller in *st* and returns a Python list representing the equivalent parse tree. The resulting list @@ -183,7 +182,7 @@ This information is omitted if the flag is false or omitted. -.. function:: st2tuple(st[, line_info]) +.. function:: st2tuple(st, line_info=False, col_info=False) This function accepts an ST object from the caller in *st* and returns a Python tuple representing the equivalent parse tree. Other than returning a @@ -194,7 +193,7 @@ information is omitted if the flag is false or omitted. -.. function:: compilest(st[, filename='']) +.. function:: compilest(st, filename='') .. index:: builtin: exec @@ -293,7 +292,7 @@ ST objects have the following methods: -.. method:: ST.compile([filename]) +.. method:: ST.compile(filename='') Same as ``compilest(st, filename)``. @@ -308,14 +307,14 @@ Same as ``issuite(st)``. -.. method:: ST.tolist([line_info]) +.. method:: ST.tolist(line_info=False, col_info=False) - Same as ``st2list(st, line_info)``. + Same as ``st2list(st, line_info, col_info)``. -.. method:: ST.totuple([line_info]) +.. method:: ST.totuple(line_info=False, col_info=False) - Same as ``st2tuple(st, line_info)``. + Same as ``st2tuple(st, line_info, col_info)``. .. _st-examples: Modified: python/branches/py3k/Doc/library/pdb.rst ============================================================================== --- python/branches/py3k/Doc/library/pdb.rst (original) +++ python/branches/py3k/Doc/library/pdb.rst Wed Sep 2 22:34:52 2009 @@ -79,7 +79,7 @@ The module defines the following functions; each enters the debugger in a slightly different way: -.. function:: run(statement[, globals[, locals]]) +.. function:: run(statement, globals=None, locals=None) Execute the *statement* (given as a string) under debugger control. The debugger prompt appears before any code is executed; you can set breakpoints and @@ -90,14 +90,14 @@ explanation of the built-in :func:`exec` or :func:`eval` functions.) -.. function:: runeval(expression[, globals[, locals]]) +.. function:: runeval(expression, globals=None, locals=None) Evaluate the *expression* (given as a string) under debugger control. When :func:`runeval` returns, it returns the value of the expression. Otherwise this function is similar to :func:`run`. -.. function:: runcall(function[, argument, ...]) +.. function:: runcall(function, *args, **kwds) Call the *function* (a function or method object, not a string) with the given arguments. When :func:`runcall` returns, it returns whatever the function call @@ -111,7 +111,7 @@ being debugged (e.g. when an assertion fails). -.. function:: post_mortem([traceback]) +.. function:: post_mortem(traceback=None) Enter post-mortem debugging of the given *traceback* object. If no *traceback* is given, it uses the one of the exception that is currently @@ -147,9 +147,9 @@ .. versionadded:: 3.1 The *skip* argument. - .. method:: run(statement[, globals[, locals]]) - runeval(expression[, globals[, locals]]) - runcall(function[, argument, ...]) + .. method:: run(statement, globals=None, locals=None) + runeval(expression, globals=None, locals=None) + runcall(function, *args, **kwds) set_trace() See the documentation for the functions explained above. Modified: python/branches/py3k/Doc/library/persistence.rst ============================================================================== --- python/branches/py3k/Doc/library/persistence.rst (original) +++ python/branches/py3k/Doc/library/persistence.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - .. _persistence: **************** Modified: python/branches/py3k/Doc/library/pickle.rst ============================================================================== --- python/branches/py3k/Doc/library/pickle.rst (original) +++ python/branches/py3k/Doc/library/pickle.rst Wed Sep 2 22:34:52 2009 @@ -141,7 +141,7 @@ The :mod:`pickle` module provides the following functions to make the pickling process more convenient: -.. function:: dump(obj, file[, protocol, \*, fix_imports=True]) +.. function:: dump(obj, file, protocol=None, \*, fix_imports=True) Write a pickled representation of *obj* to the open file object *file*. This is equivalent to ``Pickler(file, protocol).dump(obj)``. @@ -162,7 +162,7 @@ map the new Python 3.x names to the old module names used in Python 2.x, so that the pickle data stream is readable with Python 2.x. -.. function:: dumps(obj[, protocol, \*, fix_imports=True]) +.. function:: dumps(obj, protocol=None, \*, fix_imports=True) Return the pickled representation of the object as a :class:`bytes` object, instead of writing it to a file. @@ -179,7 +179,7 @@ map the new Python 3.x names to the old module names used in Python 2.x, so that the pickle data stream is readable with Python 2.x. -.. function:: load(file, [\*, fix_imports=True, encoding="ASCII", errors="strict"]) +.. function:: load(file, \*, fix_imports=True, encoding="ASCII", errors="strict") Read a pickled object representation from the open file object *file* and return the reconstituted object hierarchy specified therein. This is @@ -202,7 +202,7 @@ *errors* tell pickle how to decode 8-bit string instances pickled by Python 2.x; these default to 'ASCII' and 'strict', respectively. -.. function:: loads(bytes_object, [\*, fix_imports=True, encoding="ASCII", errors="strict"]) +.. function:: loads(bytes_object, \*, fix_imports=True, encoding="ASCII", errors="strict") Read a pickled object hierarchy from a :class:`bytes` object and return the reconstituted object hierarchy specified therein @@ -247,7 +247,7 @@ The :mod:`pickle` module exports two classes, :class:`Pickler` and :class:`Unpickler`: -.. class:: Pickler(file[, protocol, \*, fix_imports=True]) +.. class:: Pickler(file, protocol=None, \*, fix_imports=True) This takes a binary file for writing a pickle data stream. @@ -295,7 +295,7 @@ Use :func:`pickletools.optimize` if you need more compact pickles. -.. class:: Unpickler(file, [\*, fix_imports=True, encoding="ASCII", errors="strict"]) +.. class:: Unpickler(file, \*, fix_imports=True, encoding="ASCII", errors="strict") This takes a binary file for reading a pickle data stream. Modified: python/branches/py3k/Doc/library/pickletools.rst ============================================================================== --- python/branches/py3k/Doc/library/pickletools.rst (original) +++ python/branches/py3k/Doc/library/pickletools.rst Wed Sep 2 22:34:52 2009 @@ -2,7 +2,8 @@ ================================================== .. module:: pickletools - :synopsis: Contains extensive comments about the pickle protocols and pickle-machine opcodes, as well as some useful functions. + :synopsis: Contains extensive comments about the pickle protocols and + pickle-machine opcodes, as well as some useful functions. This module contains various constants relating to the intimate details of the :mod:`pickle` module, some lengthy comments about the implementation, and a @@ -12,7 +13,7 @@ :mod:`pickletools` module relevant. -.. function:: dis(pickle[, out=None, memo=None, indentlevel=4]) +.. function:: dis(pickle, out=None, memo=None, indentlevel=4) Outputs a symbolic disassembly of the pickle to the file-like object *out*, defaulting to ``sys.stdout``. *pickle* can be a string or a file-like object. Modified: python/branches/py3k/Doc/library/pipes.rst ============================================================================== --- python/branches/py3k/Doc/library/pipes.rst (original) +++ python/branches/py3k/Doc/library/pipes.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`pipes` --- Interface to shell pipelines ============================================= Modified: python/branches/py3k/Doc/library/pkgutil.rst ============================================================================== --- python/branches/py3k/Doc/library/pkgutil.rst (original) +++ python/branches/py3k/Doc/library/pkgutil.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`pkgutil` --- Package extension utility ============================================ Modified: python/branches/py3k/Doc/library/poplib.rst ============================================================================== --- python/branches/py3k/Doc/library/poplib.rst (original) +++ python/branches/py3k/Doc/library/poplib.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`poplib` --- POP3 protocol client ====================================== @@ -24,7 +23,7 @@ A single class is provided by the :mod:`poplib` module: -.. class:: POP3(host[, port[, timeout]]) +.. class:: POP3(host, port=POP3_PORT[, timeout]) This class implements the actual POP3 protocol. The connection is created when the instance is initialized. If *port* is omitted, the standard POP3 port (110) @@ -33,12 +32,13 @@ be used). -.. class:: POP3_SSL(host[, port[, keyfile[, certfile]]]) +.. class:: POP3_SSL(host, port=POP3_SSL_PORT, keyfile=None, certfile=None[, timeout]) This is a subclass of :class:`POP3` that connects to the server over an SSL encrypted socket. If *port* is not specified, 995, the standard POP3-over-SSL port is used. *keyfile* and *certfile* are also optional - they can contain a PEM formatted private key and certificate chain file for the SSL connection. + *timeout* works as in the :class:`POP3` constructor. One exception is defined as an attribute of the :mod:`poplib` module: @@ -160,7 +160,7 @@ POP3 servers you will use before trusting it. -.. method:: POP3.uidl([which]) +.. method:: POP3.uidl(which=None) Return message digest (unique id) list. If *which* is specified, result contains the unique id for that message in the form ``'response mesgnum uid``, otherwise Modified: python/branches/py3k/Doc/library/pprint.rst ============================================================================== --- python/branches/py3k/Doc/library/pprint.rst (original) +++ python/branches/py3k/Doc/library/pprint.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`pprint` --- Data pretty printer ===================================== @@ -27,7 +26,7 @@ .. First the implementation class: -.. class:: PrettyPrinter(...) +.. class:: PrettyPrinter(indent=1, width=80, depth=None, stream=None) Construct a :class:`PrettyPrinter` instance. This constructor understands several keyword parameters. An output stream may be set using the *stream* @@ -62,21 +61,20 @@ >>> pp.pprint(tup) ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead', (...))))))) -The :class:`PrettyPrinter` class supports several derivative functions: -.. Now the derivative functions: +The :class:`PrettyPrinter` class supports several derivative functions: -.. function:: pformat(object[, indent[, width[, depth]]]) +.. function:: pformat(object, indent=1, width=80, depth=None) Return the formatted representation of *object* as a string. *indent*, *width* and *depth* will be passed to the :class:`PrettyPrinter` constructor as formatting parameters. -.. function:: pprint(object[, stream[, indent[, width[, depth]]]]) +.. function:: pprint(object, stream=None, indent=1, width=80, depth=None) Prints the formatted representation of *object* on *stream*, followed by a - newline. If *stream* is omitted, ``sys.stdout`` is used. This may be used + newline. If *stream* is ``None``, ``sys.stdout`` is used. This may be used in the interactive interpreter instead of the :func:`print` function for inspecting values (you can even reassign ``print = pprint.pprint`` for use within a scope). *indent*, *width* and *depth* will be passed to the @@ -191,7 +189,8 @@ pprint Example -------------- -This example demonstrates several uses of the :func:`pprint` function and its parameters. +This example demonstrates several uses of the :func:`pprint` function and its +parameters. >>> import pprint >>> tup = ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead', Modified: python/branches/py3k/Doc/library/profile.rst ============================================================================== --- python/branches/py3k/Doc/library/profile.rst (original) +++ python/branches/py3k/Doc/library/profile.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - .. _profile: ******************** @@ -235,7 +234,7 @@ reading the source code for these modules. -.. function:: run(command[, filename]) +.. function:: run(command, filename=None, sort=-1) This function takes a single argument that can be passed to the :func:`exec` function, and an optional file name. In all cases this routine attempts to @@ -264,8 +263,8 @@ for the number of calls, tottime - for the total time spent in the given function (and excluding time made in calls - to sub-functions), + for the total time spent in the given function (and excluding time made in + calls to sub-functions), percall is the quotient of ``tottime`` divided by ``ncalls`` @@ -285,24 +284,25 @@ calls. Note that when the function does not recurse, these two values are the same, and only the single figure is printed. + If *sort* is given, it can be one of ``'stdname'`` (sort by filename:lineno), + ``'calls'`` (sort by number of calls), ``'time'`` (sort by total time) or + ``'cumulative'`` (sort by cumulative time). The default is ``'stdname'``. + -.. function:: runctx(command, globals, locals[, filename]) +.. function:: runctx(command, globals, locals, filename=None) This function is similar to :func:`run`, with added arguments to supply the globals and locals dictionaries for the *command* string. -Analysis of the profiler data is done using the :class:`Stats` class. - -.. note:: - The :class:`Stats` class is defined in the :mod:`pstats` module. +Analysis of the profiler data is done using the :class:`pstats.Stats` class. .. module:: pstats :synopsis: Statistics object for use with the profiler. -.. class:: Stats(filename[, stream=sys.stdout[, ...]]) +.. class:: Stats(*filenames, stream=sys.stdout) This class constructor creates an instance of a "statistics object" from a *filename* (or set of filenames). :class:`Stats` objects are manipulated by @@ -342,7 +342,7 @@ accumulated into a single entry. -.. method:: Stats.add(filename[, ...]) +.. method:: Stats.add(*filenames) This method of the :class:`Stats` class accumulates additional profiling information into the current profiling object. Its arguments should refer to @@ -359,7 +359,7 @@ :class:`profile.Profile` and :class:`cProfile.Profile` classes. -.. method:: Stats.sort_stats(key[, ...]) +.. method:: Stats.sort_stats(*keys) This method modifies the :class:`Stats` object by sorting it according to the supplied criteria. The argument is typically a string identifying the basis of @@ -426,7 +426,7 @@ .. This method is provided primarily for compatibility with the old profiler. -.. method:: Stats.print_stats([restriction, ...]) +.. method:: Stats.print_stats(*restrictions) This method for the :class:`Stats` class prints out a report as described in the :func:`profile.run` definition. @@ -455,7 +455,7 @@ then proceed to only print the first 10% of them. -.. method:: Stats.print_callers([restriction, ...]) +.. method:: Stats.print_callers(*restrictions) This method for the :class:`Stats` class prints a list of all functions that called each function in the profiled database. The ordering is identical to @@ -473,7 +473,7 @@ the current function while it was invoked by this specific caller. -.. method:: Stats.print_callees([restriction, ...]) +.. method:: Stats.print_callees(*restrictions) This method for the :class:`Stats` class prints a list of all function that were called by the indicated function. Aside from this reversal of direction of Modified: python/branches/py3k/Doc/library/pty.rst ============================================================================== --- python/branches/py3k/Doc/library/pty.rst (original) +++ python/branches/py3k/Doc/library/pty.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`pty` --- Pseudo-terminal utilities ======================================== Modified: python/branches/py3k/Doc/library/pwd.rst ============================================================================== --- python/branches/py3k/Doc/library/pwd.rst (original) +++ python/branches/py3k/Doc/library/pwd.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`pwd` --- The password database ==================================== Modified: python/branches/py3k/Doc/library/py_compile.rst ============================================================================== --- python/branches/py3k/Doc/library/py_compile.rst (original) +++ python/branches/py3k/Doc/library/py_compile.rst Wed Sep 2 22:34:52 2009 @@ -22,7 +22,7 @@ Exception raised when an error occurs while attempting to compile the file. -.. function:: compile(file[, cfile[, dfile[, doraise]]]) +.. function:: compile(file, cfile=None, dfile=None, doraise=False) Compile a source file to byte-code and write out the byte-code cache file. The source code is loaded from the file name *file*. The byte-code is written to @@ -34,10 +34,10 @@ written to ``sys.stderr``, but no exception is raised. -.. function:: main([args]) +.. function:: main(args=None) Compile several source files. The files named in *args* (or on the command - line, if *args* is not specified) are compiled and the resulting bytecode is + line, if *args* is ``None``) are compiled and the resulting bytecode is cached in the normal manner. This function does not search a directory structure to locate source files; it only compiles files named explicitly. Modified: python/branches/py3k/Doc/library/pyclbr.rst ============================================================================== --- python/branches/py3k/Doc/library/pyclbr.rst (original) +++ python/branches/py3k/Doc/library/pyclbr.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`pyclbr` --- Python class browser support ============================================== @@ -17,7 +16,7 @@ modules. -.. function:: readmodule(module[, path=None]) +.. function:: readmodule(module, path=None) Read a module and return a dictionary mapping class names to class descriptor objects. The parameter *module* should be the name of a @@ -26,7 +25,7 @@ of ``sys.path``, which is used to locate module source code. -.. function:: readmodule_ex(module[, path=None]) +.. function:: readmodule_ex(module, path=None) Like :func:`readmodule`, but the returned dictionary, in addition to mapping class names to class descriptor objects, also maps top-level Modified: python/branches/py3k/Doc/library/pydoc.rst ============================================================================== --- python/branches/py3k/Doc/library/pydoc.rst (original) +++ python/branches/py3k/Doc/library/pydoc.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`pydoc` --- Documentation generator and online help system =============================================================== Modified: python/branches/py3k/Doc/library/pyexpat.rst ============================================================================== --- python/branches/py3k/Doc/library/pyexpat.rst (original) +++ python/branches/py3k/Doc/library/pyexpat.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`xml.parsers.expat` --- Fast XML parsing using Expat ========================================================= @@ -56,7 +55,7 @@ Returns an explanatory string for a given error number *errno*. -.. function:: ParserCreate([encoding[, namespace_separator]]) +.. function:: ParserCreate(encoding=None, namespace_separator=None) Creates and returns a new :class:`xmlparser` object. *encoding*, if specified, must be a string naming the encoding used by the XML data. Expat doesn't Modified: python/branches/py3k/Doc/library/python.rst ============================================================================== --- python/branches/py3k/Doc/library/python.rst (original) +++ python/branches/py3k/Doc/library/python.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - .. _python: *********************** Modified: python/branches/py3k/Doc/library/queue.rst ============================================================================== --- python/branches/py3k/Doc/library/queue.rst (original) +++ python/branches/py3k/Doc/library/queue.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`queue` --- A synchronized queue class =========================================== @@ -100,7 +99,7 @@ guarantee that a subsequent call to put() will not block. -.. method:: Queue.put(item[, block[, timeout]]) +.. method:: Queue.put(item, block=True, timeout=None) Put *item* into the queue. If optional args *block* is true and *timeout* is None (the default), block if necessary until a free slot is available. If @@ -116,7 +115,7 @@ Equivalent to ``put(item, False)``. -.. method:: Queue.get([block[, timeout]]) +.. method:: Queue.get(block=True, timeout=None) Remove and return an item from the queue. If optional args *block* is true and *timeout* is None (the default), block if necessary until an item is available. Modified: python/branches/py3k/Doc/library/quopri.rst ============================================================================== --- python/branches/py3k/Doc/library/quopri.rst (original) +++ python/branches/py3k/Doc/library/quopri.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`quopri` --- Encode and decode MIME quoted-printable data ============================================================== @@ -19,7 +18,7 @@ sending a graphics file. -.. function:: decode(input, output[,header]) +.. function:: decode(input, output, header=False) Decode the contents of the *input* file and write the resulting decoded binary data to the *output* file. *input* and *output* must either be file objects or @@ -30,7 +29,7 @@ Mail Extensions) Part Two: Message Header Extensions for Non-ASCII Text". -.. function:: encode(input, output, quotetabs) +.. function:: encode(input, output, quotetabs, header=False) Encode the contents of the *input* file and write the resulting quoted-printable data to the *output* file. *input* and *output* must either be file objects or @@ -38,20 +37,22 @@ ``input.readline()`` returns an empty string. *quotetabs* is a flag which controls whether to encode embedded spaces and tabs; when true it encodes such embedded whitespace, and when false it leaves them unencoded. Note that spaces - and tabs appearing at the end of lines are always encoded, as per :rfc:`1521`. + and tabs appearing at the end of lines are always encoded, as per + :rfc:`1521`. *header* is a flag which controls if spaces are encoded as + underscores as per :rfc:`1522`. -.. function:: decodestring(s[,header]) +.. function:: decodestring(s, header=False) Like :func:`decode`, except that it accepts a source string and returns the corresponding decoded string. -.. function:: encodestring(s[, quotetabs]) +.. function:: encodestring(s, quotetabs=False, header=False) Like :func:`encode`, except that it accepts a source string and returns the - corresponding encoded string. *quotetabs* is optional (defaulting to 0), and is - passed straight through to :func:`encode`. + corresponding encoded string. *quotetabs* and *header* are optional + (defaulting to ``False``), and are passed straight through to :func:`encode`. .. seealso:: Modified: python/branches/py3k/Doc/library/random.rst ============================================================================== --- python/branches/py3k/Doc/library/random.rst (original) +++ python/branches/py3k/Doc/library/random.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`random` --- Generate pseudo-random numbers ================================================ Modified: python/branches/py3k/Doc/library/re.rst ============================================================================== --- python/branches/py3k/Doc/library/re.rst (original) +++ python/branches/py3k/Doc/library/re.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`re` --- Regular expression operations =========================================== @@ -446,7 +445,7 @@ form. -.. function:: compile(pattern[, flags]) +.. function:: compile(pattern, flags=0) Compile a regular expression pattern into a regular expression object, which can be used for matching using its :func:`match` and :func:`search` methods, @@ -556,7 +555,7 @@ string. -.. function:: match(pattern, string[, flags]) +.. function:: match(pattern, string, flags=0) If zero or more characters at the beginning of *string* match the regular expression *pattern*, return a corresponding :class:`MatchObject` instance. @@ -569,7 +568,7 @@ instead. -.. function:: split(pattern, string[, maxsplit=0, flags=0]) +.. function:: split(pattern, string, maxsplit=0, flags=0) Split *string* by the occurrences of *pattern*. If capturing parentheses are used in *pattern*, then the text of all groups in the pattern are also returned @@ -609,7 +608,7 @@ Added the optional flags argument. -.. function:: findall(pattern, string[, flags]) +.. function:: findall(pattern, string, flags=0) Return all non-overlapping matches of *pattern* in *string*, as a list of strings. The *string* is scanned left-to-right, and matches are returned in @@ -619,7 +618,7 @@ beginning of another match. -.. function:: finditer(pattern, string[, flags]) +.. function:: finditer(pattern, string, flags=0) Return an :term:`iterator` yielding :class:`MatchObject` instances over all non-overlapping matches for the RE *pattern* in *string*. The *string* is @@ -628,7 +627,7 @@ match. -.. function:: sub(pattern, repl, string[, count, flags]) +.. function:: sub(pattern, repl, string, count=0, flags=0) Return the string obtained by replacing the leftmost non-overlapping occurrences of *pattern* in *string* by the replacement *repl*. If the pattern isn't found, @@ -677,7 +676,7 @@ Added the optional flags argument. -.. function:: subn(pattern, repl, string[, count, flags]) +.. function:: subn(pattern, repl, string, count=0, flags=0) Perform the same operation as :func:`sub`, but return a tuple ``(new_string, number_of_subs_made)``. @@ -752,7 +751,7 @@ :meth:`~RegexObject.match` method. -.. method:: RegexObject.split(string[, maxsplit=0]) +.. method:: RegexObject.split(string, maxsplit=0) Identical to the :func:`split` function, using the compiled pattern. @@ -767,12 +766,12 @@ Identical to the :func:`finditer` function, using the compiled pattern. -.. method:: RegexObject.sub(repl, string[, count=0]) +.. method:: RegexObject.sub(repl, string, count=0) Identical to the :func:`sub` function, using the compiled pattern. -.. method:: RegexObject.subn(repl, string[, count=0]) +.. method:: RegexObject.subn(repl, string, count=0) Identical to the :func:`subn` function, using the compiled pattern. @@ -870,7 +869,7 @@ 'c3' -.. method:: MatchObject.groups([default]) +.. method:: MatchObject.groups(default=None) Return a tuple containing all the subgroups of the match, from 1 up to however many groups are in the pattern. The *default* argument is used for groups that @@ -893,7 +892,7 @@ ('24', '0') -.. method:: MatchObject.groupdict([default]) +.. method:: MatchObject.groupdict(default=None) Return a dictionary containing all the *named* subgroups of the match, keyed by the subgroup name. The *default* argument is used for groups that did not @@ -904,8 +903,8 @@ {'first_name': 'Malcom', 'last_name': 'Reynolds'} -.. method:: MatchObject.start([group]) - MatchObject.end([group]) +.. method:: MatchObject.start(group=0) + MatchObject.end(group=0) Return the indices of the start and end of the substring matched by *group*; *group* defaults to zero (meaning the whole matched substring). Return ``-1`` if @@ -928,7 +927,7 @@ 'tony at tiger.net' -.. method:: MatchObject.span([group]) +.. method:: MatchObject.span(group=0) For :class:`MatchObject` *m*, return the 2-tuple ``(m.start(group), m.end(group))``. Note that if *group* did not contribute to the match, this is Modified: python/branches/py3k/Doc/library/readline.rst ============================================================================== --- python/branches/py3k/Doc/library/readline.rst (original) +++ python/branches/py3k/Doc/library/readline.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`readline` --- GNU readline interface ========================================== Modified: python/branches/py3k/Doc/library/reprlib.rst ============================================================================== --- python/branches/py3k/Doc/library/reprlib.rst (original) +++ python/branches/py3k/Doc/library/reprlib.rst Wed Sep 2 22:34:52 2009 @@ -1,7 +1,6 @@ :mod:`reprlib` --- Alternate :func:`repr` implementation ======================================================== - .. module:: reprlib :synopsis: Alternate repr() implementation with size limits. .. sectionauthor:: Fred L. Drake, Jr. Modified: python/branches/py3k/Doc/library/resource.rst ============================================================================== --- python/branches/py3k/Doc/library/resource.rst (original) +++ python/branches/py3k/Doc/library/resource.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`resource` --- Resource usage information ============================================== Modified: python/branches/py3k/Doc/library/rlcompleter.rst ============================================================================== --- python/branches/py3k/Doc/library/rlcompleter.rst (original) +++ python/branches/py3k/Doc/library/rlcompleter.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`rlcompleter` --- Completion function for GNU readline =========================================================== Modified: python/branches/py3k/Doc/library/runpy.rst ============================================================================== --- python/branches/py3k/Doc/library/runpy.rst (original) +++ python/branches/py3k/Doc/library/runpy.rst Wed Sep 2 22:34:52 2009 @@ -19,7 +19,7 @@ The :mod:`runpy` module provides a single function: -.. function:: run_module(mod_name[, init_globals] [, run_name][, alter_sys]) +.. function:: run_module(mod_name, init_globals=None, run_name=None, alter_sys=False) Execute the code of the specified module and return the resulting module globals dictionary. The module's code is first located using the standard import Modified: python/branches/py3k/Doc/library/select.rst ============================================================================== --- python/branches/py3k/Doc/library/select.rst (original) +++ python/branches/py3k/Doc/library/select.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`select` --- Waiting for I/O completion ============================================ @@ -24,7 +23,7 @@ string, as would be printed by the C function :cfunc:`perror`. -.. function:: epoll([sizehint=-1]) +.. function:: epoll(sizehint=-1) (Only supported on Linux 2.5.44 and newer.) Returns an edge polling object, which can be used as Edge or Level Triggered interface for I/O events; see Modified: python/branches/py3k/Doc/library/shelve.rst ============================================================================== --- python/branches/py3k/Doc/library/shelve.rst (original) +++ python/branches/py3k/Doc/library/shelve.rst Wed Sep 2 22:34:52 2009 @@ -14,7 +14,7 @@ lots of shared sub-objects. The keys are ordinary strings. -.. function:: open(filename[, flag='c'[, protocol=None[, writeback=False]]]) +.. function:: open(filename, flag='c', protocol=None, writeback=False) Open a persistent dictionary. The filename specified is the base filename for the underlying database. As a side-effect, an extension may be added to the @@ -84,7 +84,7 @@ implementation used. -.. class:: Shelf(dict[, protocol=None[, writeback=False]]) +.. class:: Shelf(dict, protocol=None, writeback=False) A subclass of :class:`collections.MutableMapping` which stores pickled values in the *dict* object. @@ -99,7 +99,7 @@ memory and make sync and close take a long time. -.. class:: BsdDbShelf(dict[, protocol=None[, writeback=False]]) +.. class:: BsdDbShelf(dict, protocol=None, writeback=False) A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`!next`, :meth:`previous`, :meth:`last` and :meth:`set_location` which are available @@ -112,7 +112,7 @@ as for the :class:`Shelf` class. -.. class:: DbfilenameShelf(filename[, flag='c'[, protocol=None[, writeback=False]]]) +.. class:: DbfilenameShelf(filename, flag='c', protocol=None, writeback=False) 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 Modified: python/branches/py3k/Doc/library/shlex.rst ============================================================================== --- python/branches/py3k/Doc/library/shlex.rst (original) +++ python/branches/py3k/Doc/library/shlex.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`shlex` --- Simple lexical analysis ======================================== @@ -18,7 +17,7 @@ The :mod:`shlex` module defines the following functions: -.. function:: split(s[, comments[, posix]]) +.. function:: split(s, comments=False, posix=True) Split the string *s* using shell-like syntax. If *comments* is :const:`False` (the default), the parsing of comments in the given string will be disabled @@ -28,13 +27,14 @@ .. note:: - Since the :func:`split` function instantiates a :class:`shlex` instance, passing - ``None`` for *s* will read the string to split from standard input. + Since the :func:`split` function instantiates a :class:`shlex` instance, + passing ``None`` for *s* will read the string to split from standard + input. The :mod:`shlex` module defines the following class: -.. class:: shlex([instream[, infile[, posix]]]) +.. class:: shlex(instream=None, infile=None, posix=False) A :class:`shlex` instance or subclass instance is a lexical analyzer object. The initialization argument, if present, specifies where to read characters @@ -111,7 +111,7 @@ :meth:`pop_source` methods. -.. method:: shlex.push_source(stream[, filename]) +.. method:: shlex.push_source(newstream, newfile=None) Push an input source stream onto the input stack. If the filename argument is specified it will later be available for use in error messages. This is the @@ -124,7 +124,7 @@ used internally when the lexer reaches EOF on a stacked input stream. -.. method:: shlex.error_leader([file[, line]]) +.. method:: shlex.error_leader(infile=None, lineno=None) This method generates an error message leader in the format of a Unix C compiler error label; the format is ``'"%s", line %d: '``, where the ``%s`` is replaced Modified: python/branches/py3k/Doc/library/shutil.rst ============================================================================== --- python/branches/py3k/Doc/library/shutil.rst (original) +++ python/branches/py3k/Doc/library/shutil.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`shutil` --- High-level file operations ============================================ @@ -86,7 +85,7 @@ match one of the glob-style *patterns* provided. See the example below. -.. function:: copytree(src, dst[, symlinks=False[, ignore=None]]) +.. function:: copytree(src, dst, symlinks=False, ignore=None) Recursively copy an entire directory tree rooted at *src*. The destination directory, named by *dst*, must not already exist; it will be created as well @@ -114,7 +113,7 @@ ultimate tool. -.. function:: rmtree(path[, ignore_errors[, onerror]]) +.. function:: rmtree(path, ignore_errors=False, onerror=None) .. index:: single: directory; deleting Modified: python/branches/py3k/Doc/library/signal.rst ============================================================================== --- python/branches/py3k/Doc/library/signal.rst (original) +++ python/branches/py3k/Doc/library/signal.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`signal` --- Set handlers for asynchronous events ====================================================== @@ -82,7 +81,8 @@ .. data:: ITIMER_REAL - Decrements interval timer in real time, and delivers :const:`SIGALRM` upon expiration. + Decrements interval timer in real time, and delivers :const:`SIGALRM` upon + expiration. .. data:: ITIMER_VIRTUAL @@ -182,14 +182,14 @@ .. function:: siginterrupt(signalnum, flag) - Change system call restart behaviour: if *flag* is :const:`False`, system calls - will be restarted when interrupted by signal *signalnum*, otherwise system calls will - be interrupted. Returns nothing. Availability: Unix (see the man page - :manpage:`siginterrupt(3)` for further information). - - Note that installing a signal handler with :func:`signal` will reset the restart - behaviour to interruptible by implicitly calling :cfunc:`siginterrupt` with a true *flag* - value for the given signal. + Change system call restart behaviour: if *flag* is :const:`False`, system + calls will be restarted when interrupted by signal *signalnum*, otherwise + system calls will be interrupted. Returns nothing. Availability: Unix (see + the man page :manpage:`siginterrupt(3)` for further information). + + Note that installing a signal handler with :func:`signal` will reset the + restart behaviour to interruptible by implicitly calling + :cfunc:`siginterrupt` with a true *flag* value for the given signal. .. function:: signal(signalnum, handler) Modified: python/branches/py3k/Doc/library/site.rst ============================================================================== --- python/branches/py3k/Doc/library/site.rst (original) +++ python/branches/py3k/Doc/library/site.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`site` --- Site-specific configuration hook ================================================ @@ -142,6 +141,6 @@ .. versionadded:: 2.7 -XXX Update documentation -XXX document python -m site --user-base --user-site +.. XXX Update documentation +.. XXX document python -m site --user-base --user-site Modified: python/branches/py3k/Doc/library/smtplib.rst ============================================================================== --- python/branches/py3k/Doc/library/smtplib.rst (original) +++ python/branches/py3k/Doc/library/smtplib.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`smtplib` --- SMTP protocol client ======================================= @@ -17,7 +16,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). -.. class:: SMTP([host[, port[, local_hostname[, timeout]]]]) +.. class:: SMTP(host='', port=0, local_hostname=None[, timeout]) A :class:`SMTP` instance encapsulates an SMTP connection. It has methods that support a full repertoire of SMTP and ESMTP operations. If the optional @@ -32,13 +31,13 @@ :meth:`sendmail`, and :meth:`quit` methods. An example is included below. -.. class:: SMTP_SSL([host[, port[, local_hostname[, keyfile[, certfile[, timeout]]]]]]) +.. class:: SMTP_SSL(host='', port=0, local_hostname=None, keyfile=None, certfile=None[, timeout]) A :class:`SMTP_SSL` instance behaves exactly the same as instances of :class:`SMTP`. :class:`SMTP_SSL` should be used for situations where SSL is required from the beginning of the connection and using :meth:`starttls` is not appropriate. If *host* is not specified, the local host is used. If - *port* is omitted, the standard SMTP-over-SSL port (465) is used. *keyfile* + *port* is zero, the standard SMTP-over-SSL port (465) is used. *keyfile* and *certfile* are also optional, and can contain a PEM formatted private key and certificate chain file for the SSL connection. The optional *timeout* parameter specifies a timeout in seconds for blocking operations like the @@ -46,7 +45,7 @@ will be used). -.. class:: LMTP([host[, port[, local_hostname]]]) +.. class:: LMTP(host='', port=LMTP_PORT, local_hostname=None) The LMTP protocol, which is very similar to ESMTP, is heavily based on the standard SMTP client. It's common to use Unix sockets for LMTP, so our :meth:`connect` @@ -142,7 +141,7 @@ for connection and for all messages sent to and received from the server. -.. method:: SMTP.connect([host[, port]]) +.. method:: SMTP.connect(host='localhost', port=0) Connect to a host on a given port. The defaults are to connect to the local host at the standard SMTP port (25). If the hostname ends with a colon (``':'``) @@ -151,9 +150,9 @@ the constructor if a host is specified during instantiation. -.. method:: SMTP.docmd(cmd, [, argstring]) +.. method:: SMTP.docmd(cmd, args='') - Send a command *cmd* to the server. The optional argument *argstring* is simply + Send a command *cmd* to the server. The optional argument *args* is simply concatenated to the command, separated by a space. This returns a 2-tuple composed of a numeric response code and the actual @@ -167,7 +166,7 @@ :exc:`SMTPServerDisconnected` will be raised. -.. method:: SMTP.helo([hostname]) +.. method:: SMTP.helo(name='') Identify yourself to the SMTP server using ``HELO``. The hostname argument defaults to the fully qualified domain name of the local host. @@ -178,7 +177,7 @@ It will be implicitly called by the :meth:`sendmail` when necessary. -.. method:: SMTP.ehlo([hostname]) +.. method:: SMTP.ehlo(name='') Identify yourself to an ESMTP server using ``EHLO``. The hostname argument defaults to the fully qualified domain name of the local host. Examine the @@ -239,7 +238,7 @@ No suitable authentication method was found. -.. method:: SMTP.starttls([keyfile[, certfile]]) +.. method:: SMTP.starttls(keyfile=None, certfile=None) Put the SMTP connection in TLS (Transport Layer Security) mode. All SMTP commands that follow will be encrypted. You should then call :meth:`ehlo` @@ -261,7 +260,7 @@ SSL/TLS support is not available to your python interpreter. -.. method:: SMTP.sendmail(from_addr, to_addrs, msg[, mail_options, rcpt_options]) +.. method:: SMTP.sendmail(from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]) Send mail. The required arguments are an :rfc:`822` from-address string, a list of :rfc:`822` to-address strings (a bare string will be treated as a list with 1 Modified: python/branches/py3k/Doc/library/sndhdr.rst ============================================================================== --- python/branches/py3k/Doc/library/sndhdr.rst (original) +++ python/branches/py3k/Doc/library/sndhdr.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`sndhdr` --- Determine type of sound file ============================================== Modified: python/branches/py3k/Doc/library/socket.rst ============================================================================== --- python/branches/py3k/Doc/library/socket.rst (original) +++ python/branches/py3k/Doc/library/socket.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`socket` --- Low-level networking interface ================================================ Modified: python/branches/py3k/Doc/library/socketserver.rst ============================================================================== --- python/branches/py3k/Doc/library/socketserver.rst (original) +++ python/branches/py3k/Doc/library/socketserver.rst Wed Sep 2 22:34:52 2009 @@ -1,4 +1,3 @@ - :mod:`socketserver` --- A framework for network servers ======================================================= From python-checkins at python.org Wed Sep 2 22:37:16 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 02 Sep 2009 20:37:16 -0000 Subject: [Python-checkins] r74631 - python/trunk/Doc/c-api/buffer.rst Message-ID: Author: georg.brandl Date: Wed Sep 2 22:37:16 2009 New Revision: 74631 Log: #6821: fix signature of PyBuffer_Release(). Modified: python/trunk/Doc/c-api/buffer.rst Modified: python/trunk/Doc/c-api/buffer.rst ============================================================================== --- python/trunk/Doc/c-api/buffer.rst (original) +++ python/trunk/Doc/c-api/buffer.rst Wed Sep 2 22:37:16 2009 @@ -254,9 +254,9 @@ +------------------------------+---------------------------------------------------+ -.. cfunction:: void PyBuffer_Release(PyObject *obj, Py_buffer *view) +.. cfunction:: void PyBuffer_Release(Py_buffer *view) - Release the buffer *view* over *obj*. This should be called when the buffer + Release the buffer *view*. This should be called when the buffer is no longer being used as it may free memory from it. From python-checkins at python.org Thu Sep 3 09:27:31 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 03 Sep 2009 07:27:31 -0000 Subject: [Python-checkins] r74632 - python/trunk/Doc/tutorial/introduction.rst Message-ID: Author: georg.brandl Date: Thu Sep 3 09:27:26 2009 New Revision: 74632 Log: #6828: fix wrongly highlighted blocks. Modified: python/trunk/Doc/tutorial/introduction.rst Modified: python/trunk/Doc/tutorial/introduction.rst ============================================================================== --- python/trunk/Doc/tutorial/introduction.rst (original) +++ python/trunk/Doc/tutorial/introduction.rst Thu Sep 3 09:27:26 2009 @@ -138,7 +138,6 @@ 4.0 >>> abs(a) # sqrt(a.real**2 + a.imag**2) 5.0 - >>> In interactive mode, the last printed expression is assigned to the variable ``_``. This means that when you are using Python as a desk calculator, it is @@ -152,7 +151,6 @@ 113.0625 >>> round(_, 2) 113.06 - >>> This variable should be treated as read-only by the user. Don't explicitly assign a value to it --- you would create an independent local variable with the @@ -193,7 +191,9 @@ Note that newlines still need to be embedded in the string using ``\n``; the newline following the trailing backslash is discarded. This example would print -the following:: +the following: + +.. code-block:: text This is a rather long string containing several lines of text just as you would do in C. @@ -209,7 +209,9 @@ -H hostname Hostname to connect to """ -produces the following output:: +produces the following output: + +.. code-block:: text Usage: thingy [OPTIONS] -h Display this usage message @@ -224,7 +226,9 @@ print hello -would print:: +would print: + +.. code-block:: text This is a rather long string containing\n\ several lines of text much as you would do in C. From python-checkins at python.org Thu Sep 3 14:31:39 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 03 Sep 2009 12:31:39 -0000 Subject: [Python-checkins] r74633 - python/trunk/Doc/library/marshal.rst Message-ID: Author: georg.brandl Date: Thu Sep 3 14:31:39 2009 New Revision: 74633 Log: #6757: complete the list of types that marshal can serialize. Modified: python/trunk/Doc/library/marshal.rst Modified: python/trunk/Doc/library/marshal.rst ============================================================================== --- python/trunk/Doc/library/marshal.rst (original) +++ python/trunk/Doc/library/marshal.rst Thu Sep 3 14:31:39 2009 @@ -37,12 +37,14 @@ Not all Python object types are supported; in general, only objects whose value is independent from a particular invocation of Python can be written and read by -this module. The following types are supported: ``None``, integers, long -integers, floating point numbers, strings, Unicode objects, tuples, lists, sets, -dictionaries, and code objects, where it should be understood that tuples, lists -and dictionaries are only supported as long as the values contained therein are -themselves supported; and recursive lists and dictionaries should not be written -(they will cause infinite loops). +this module. The following types are supported: booleans, integers, long +integers, floating point numbers, complex numbers, strings, Unicode objects, +tuples, lists, sets, frozensets, dictionaries, and code objects, where it should +be understood that tuples, lists, sets, frozensets and dictionaries are only +supported as long as the values contained therein are themselves supported; and +recursive lists, sets and dictionaries should not be written (they will cause +infinite loops). The singletons :const:`None`, :const:`Ellipsis` and +:exc:`StopIteration` can also be marshalled and unmarshalled. .. warning:: From python-checkins at python.org Thu Sep 3 14:34:10 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 03 Sep 2009 12:34:10 -0000 Subject: [Python-checkins] r74634 - in python/branches/py3k: Doc/library/marshal.rst Message-ID: Author: georg.brandl Date: Thu Sep 3 14:34:10 2009 New Revision: 74634 Log: Merged revisions 74633 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74633 | georg.brandl | 2009-09-03 14:31:39 +0200 (Do, 03 Sep 2009) | 1 line #6757: complete the list of types that marshal can serialize. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/marshal.rst Modified: python/branches/py3k/Doc/library/marshal.rst ============================================================================== --- python/branches/py3k/Doc/library/marshal.rst (original) +++ python/branches/py3k/Doc/library/marshal.rst Thu Sep 3 14:34:10 2009 @@ -36,12 +36,14 @@ Not all Python object types are supported; in general, only objects whose value is independent from a particular invocation of Python can be written and read by -this module. The following types are supported: ``None``, integers, -floating point numbers, strings, bytes, bytearrays, tuples, lists, sets, -dictionaries, and code objects, where it should be understood that tuples, lists -and dictionaries are only supported as long as the values contained therein are -themselves supported; and recursive lists and dictionaries should not be written -(they will cause infinite loops). +this module. The following types are supported: booleans, integers, floating +point numbers, complex numbers, strings, bytes, bytearrays, tuples, lists, sets, +frozensets, dictionaries, and code objects, where it should be understood that +tuples, lists, sets, frozensets and dictionaries are only supported as long as +the values contained therein are themselves supported; and recursive lists, sets +and dictionaries should not be written (they will cause infinite loops). The +singletons :const:`None`, :const:`Ellipsis` and :exc:`StopIteration` can also be +marshalled and unmarshalled. There are functions that read/write files as well as functions operating on strings. From nnorwitz at gmail.com Thu Sep 3 19:27:18 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 3 Sep 2009 13:27:18 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090903172718.GA21029@python.psfb.org> More important issues: ---------------------- test_urllib2_localnet leaked [-280, 0, 0] references, sum=-280 Less important issues: ---------------------- test_cmd_line leaked [25, 0, 0] references, sum=25 test_distutils leaked [25, -25, 0] references, sum=0 test_file2k leaked [-91, 0, 0] references, sum=-91 test_smtplib leaked [-102, -85, 85] references, sum=-102 test_socketserver leaked [0, 80, -80] references, sum=0 test_ssl leaked [0, 339, -339] references, sum=0 test_sys leaked [0, 42, -21] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, 0, -8] references, sum=-8 From python-checkins at python.org Thu Sep 3 21:40:08 2009 From: python-checkins at python.org (armin.rigo) Date: Thu, 03 Sep 2009 19:40:08 -0000 Subject: [Python-checkins] r74635 - python/trunk/Lib/test/crashers/slot_tp_new.py Message-ID: Author: armin.rigo Date: Thu Sep 3 21:40:07 2009 New Revision: 74635 Log: Found the next crasher by thinking about this logic in PyPy. Added: python/trunk/Lib/test/crashers/slot_tp_new.py (contents, props changed) Added: python/trunk/Lib/test/crashers/slot_tp_new.py ============================================================================== --- (empty file) +++ python/trunk/Lib/test/crashers/slot_tp_new.py Thu Sep 3 21:40:07 2009 @@ -0,0 +1,11 @@ +""" +Infinite C recursion involving PyObject_GetAttr in slot_tp_new. +""" + +class X(object): + class __metaclass__(type): + pass + __new__ = 5 + +X.__metaclass__.__new__ = property(X) +print X() From python-checkins at python.org Thu Sep 3 21:42:03 2009 From: python-checkins at python.org (armin.rigo) Date: Thu, 03 Sep 2009 19:42:03 -0000 Subject: [Python-checkins] r74636 - python/trunk/Lib/test/crashers/new_logic.py Message-ID: Author: armin.rigo Date: Thu Sep 3 21:42:03 2009 New Revision: 74636 Log: Does not terminate: consume all memory without responding to Ctrl-C. I am not too sure why, but you can surely find out by gdb'ing a bit... Added: python/trunk/Lib/test/crashers/new_logic.py (contents, props changed) Added: python/trunk/Lib/test/crashers/new_logic.py ============================================================================== --- (empty file) +++ python/trunk/Lib/test/crashers/new_logic.py Thu Sep 3 21:42:03 2009 @@ -0,0 +1,10 @@ +""" +Does not terminate: consume all memory without responding to Ctrl-C. +I am not too sure why, but you can surely find out by gdb'ing a bit... +""" + +class X(object): + pass + +X.__new__ = X +X() From python-checkins at python.org Thu Sep 3 21:45:28 2009 From: python-checkins at python.org (armin.rigo) Date: Thu, 03 Sep 2009 19:45:28 -0000 Subject: [Python-checkins] r74637 - in python/trunk/Lib/test/crashers: new_logic.py slot_tp_new.py Message-ID: Author: armin.rigo Date: Thu Sep 3 21:45:27 2009 New Revision: 74637 Log: Sorry, sorry! Ignore my previous two commits. I mixed up the version of python with which I tried running the crashers. They don't crash the current HEAD. Removed: python/trunk/Lib/test/crashers/new_logic.py python/trunk/Lib/test/crashers/slot_tp_new.py Deleted: python/trunk/Lib/test/crashers/new_logic.py ============================================================================== --- python/trunk/Lib/test/crashers/new_logic.py Thu Sep 3 21:45:27 2009 +++ (empty file) @@ -1,10 +0,0 @@ -""" -Does not terminate: consume all memory without responding to Ctrl-C. -I am not too sure why, but you can surely find out by gdb'ing a bit... -""" - -class X(object): - pass - -X.__new__ = X -X() Deleted: python/trunk/Lib/test/crashers/slot_tp_new.py ============================================================================== --- python/trunk/Lib/test/crashers/slot_tp_new.py Thu Sep 3 21:45:27 2009 +++ (empty file) @@ -1,11 +0,0 @@ -""" -Infinite C recursion involving PyObject_GetAttr in slot_tp_new. -""" - -class X(object): - class __metaclass__(type): - pass - __new__ = 5 - -X.__metaclass__.__new__ = property(X) -print X() From python-checkins at python.org Thu Sep 3 22:37:58 2009 From: python-checkins at python.org (jack.diederich) Date: Thu, 03 Sep 2009 20:37:58 -0000 Subject: [Python-checkins] r74638 - in python/branches/py3k: Lib/test/test_telnetlib.py Misc/ACKS Message-ID: Author: jack.diederich Date: Thu Sep 3 22:37:58 2009 New Revision: 74638 Log: - apply issue 6582 to test all the write methods of telnetlib - add patch author to ACKS - possibly fix test timeouts on non-linux platforms Modified: python/branches/py3k/Lib/test/test_telnetlib.py python/branches/py3k/Misc/ACKS 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 Thu Sep 3 22:37:58 2009 @@ -305,6 +305,48 @@ sb_data = self.sb_getter() self.sb_seen += sb_data +class SocketProxy(object): + ''' a socket proxy that re-defines sendall() ''' + def __init__(self, real_sock): + self.socket = real_sock + self._raw_sent = b'' + def __getattr__(self, k): + return getattr(self.socket, k) + def sendall(self, data): + self._raw_sent += data + self.socket.sendall(data) + +class TelnetSockSendall(telnetlib.Telnet): + def open(self, *args, **opts): + telnetlib.Telnet.open(self, *args, **opts) + self.sock = SocketProxy(self.sock) + +class WriteTests(TestCase): + '''The only thing that write does is replace each tl.IAC for + tl.IAC+tl.IAC''' + setUp = _read_setUp + tearDown = _read_tearDown + + def _test_write(self, data): + self.telnet.sock._raw_sent = b'' + self.telnet.write(data) + after_write = self.telnet.sock._raw_sent + self.assertEqual(data.replace(tl.IAC,tl.IAC+tl.IAC), + after_write) + + def test_write(self): + self.telnet = TelnetSockSendall() + data_sample = [b'data sample without IAC', + b'data sample with' + tl.IAC + b' one IAC', + b'a few' + tl.IAC + tl.IAC + b' iacs' + tl.IAC, + tl.IAC, + b''] + self.telnet.open(HOST, self.port) + for d in data_sample: + self.dataq.put([b'']) + self._test_write(d) + self.telnet.close() + tl = telnetlib class TelnetDebuglevel(tl.Telnet): @@ -382,16 +424,17 @@ def _test_debuglevel(self, data, expected_msg): """ helper for testing debuglevel messages """ self.setUp() - self.dataq.put(data) + self.dataq.put(data + [EOF_sigil]) 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)) + telnet.close() self.tearDown() - def test_debuglevel(self): + def test_debuglevel_reads(self): # test all the various places that self.msg(...) is called given_a_expect_b = [ # Telnet.fill_rawq @@ -402,15 +445,26 @@ (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_debuglevel_write(self): + self.setUp() + telnet = TelnetDebuglevel(HOST, self.port) + telnet.set_debuglevel(1) + self.dataq.put([b'', EOF_sigil]) + self.dataq.join() + telnet.write(b'xxx') + expected = "send b'xxx'\n" + self.assertTrue(expected in telnet._messages, + msg=(telnet._messages, expected)) + telnet.close() + self.tearDown() + def test_main(verbose=None): - support.run_unittest(GeneralTests, ReadTests, OptionTests) + support.run_unittest(GeneralTests, ReadTests, WriteTests, OptionTests) if __name__ == '__main__': test_main() Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Thu Sep 3 22:37:58 2009 @@ -772,6 +772,7 @@ Charles Waldman Richard Walker Larry Wall +Rodrigo Steinmuller Wanderley Greg Ward Barry Warsaw Steve Waterbury From python-checkins at python.org Thu Sep 3 22:45:21 2009 From: python-checkins at python.org (brett.cannon) Date: Thu, 03 Sep 2009 20:45:21 -0000 Subject: [Python-checkins] r74639 - python/branches/py3k/Lib/importlib/test/benchmark.py Message-ID: Author: brett.cannon Date: Thu Sep 3 22:45:21 2009 New Revision: 74639 Log: Rework importlib benchmarks so that they measure number of executions within a second instead of some fixed number. Keeps benchmark faster by putting a cap on total execution time. Before a run using importlib took longer by some factor, but now it takes roughly the same amount of time as using the built-in __import__. Modified: python/branches/py3k/Lib/importlib/test/benchmark.py Modified: python/branches/py3k/Lib/importlib/test/benchmark.py ============================================================================== --- python/branches/py3k/Lib/importlib/test/benchmark.py (original) +++ python/branches/py3k/Lib/importlib/test/benchmark.py Thu Sep 3 22:45:21 2009 @@ -1,69 +1,70 @@ +"""Benchmark some basic import use-cases.""" +# XXX +# - Bench from source (turn off bytecode generation) +# - Bench from bytecode (remove existence of source) +# - Bench bytecode generation +# - Bench extensions from . import util from .source import util as source_util -import gc -import decimal import imp import importlib import sys import timeit -def bench_cache(import_, repeat, number): - """Measure the time it takes to pull from sys.modules.""" +def bench(name, cleanup=lambda: None, *, seconds=1, repeat=3): + """Bench the given statement as many times as necessary until total + executions take one second.""" + stmt = "__import__({!r})".format(name) + timer = timeit.Timer(stmt) + for x in range(repeat): + total_time = 0 + count = 0 + while total_time < seconds: + try: + total_time += timer.timeit(1) + finally: + cleanup() + count += 1 + else: + # One execution too far + if total_time > seconds: + count -= 1 + yield count + +def from_cache(repeat): + """sys.modules""" name = '' + module = imp.new_module(name) + module.__file__ = '' + module.__package__ = '' with util.uncache(name): - module = imp.new_module(name) sys.modules[name] = module - runs = [] - for x in range(repeat): - start_time = timeit.default_timer() - for y in range(number): - import_(name) - end_time = timeit.default_timer() - runs.append(end_time - start_time) - return min(runs) - - -def bench_importing_source(import_, repeat, number, loc=100000): - """Measure importing source from disk. - - For worst-case scenario, the line endings are \\r\\n and thus require - universal newline translation. - - """ - name = '__benchmark' - with source_util.create_modules(name) as mapping: - with open(mapping[name], 'w') as file: - for x in range(loc): - file.write("{0}\r\n".format(x)) - with util.import_state(path=[mapping['.root']]): - runs = [] - for x in range(repeat): - start_time = timeit.default_timer() - for y in range(number): - try: - import_(name) - finally: - del sys.modules[name] - end_time = timeit.default_timer() - runs.append(end_time - start_time) - return min(runs) - - -def main(import_): - args = [('sys.modules', bench_cache, 5, 500000), - ('source', bench_importing_source, 5, 10000)] - test_msg = "{test}, {number} times (best of {repeat}):" - result_msg = "{result:.2f} secs" - gc.disable() - try: - for name, meth, repeat, number in args: - result = meth(import_, repeat, number) - print(test_msg.format(test=name, repeat=repeat, - number=number).ljust(40), - result_msg.format(result=result).rjust(10)) - finally: - gc.enable() + for result in bench(name, repeat=repeat): + yield result + + +def builtin_mod(repeat): + """Built-in module""" + name = 'errno' + if name in sys.modules: + del sys.modules[name] + for result in bench(name, lambda: sys.modules.pop(name), repeat=repeat): + yield result + + +def main(import_, repeat=3): + __builtins__.__import__ = import_ + benchmarks = from_cache, builtin_mod + for benchmark in benchmarks: + print(benchmark.__doc__, "[", end=' ') + sys.stdout.flush() + results = [] + for result in benchmark(repeat): + results.append(result) + print(result, end=' ') + sys.stdout.flush() + print("]", "best is", max(results)) if __name__ == '__main__': From python-checkins at python.org Thu Sep 3 23:25:21 2009 From: python-checkins at python.org (brett.cannon) Date: Thu, 03 Sep 2009 21:25:21 -0000 Subject: [Python-checkins] r74640 - in python/trunk: Lib/test/test_platform.py Misc/NEWS Message-ID: Author: brett.cannon Date: Thu Sep 3 23:25:21 2009 New Revision: 74640 Log: test_platform fails on OS X Snow Leopard because the UNIX command to get the canonical version, sw_vers, leaves off trailing zeros in the version number (e.g. 10.6 instead of 10.6.0). Test now compensates by tacking on extra zeros for the test comparison. Fixes issue #6806. Modified: python/trunk/Lib/test/test_platform.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/test/test_platform.py ============================================================================== --- python/trunk/Lib/test/test_platform.py (original) +++ python/trunk/Lib/test/test_platform.py Thu Sep 3 23:25:21 2009 @@ -156,7 +156,13 @@ break fd.close() self.assertFalse(real_ver is None) - self.assertEquals(res[0], real_ver) + result_list = res[0].split('.') + expect_list = real_ver.split('.') + len_diff = len(result_list) - len(expect_list) + # On Snow Leopard, sw_vers reports 10.6.0 as 10.6 + if len_diff > 0: + expect_list.extend(['0'] * len_diff) + self.assertEquals(result_list, expect_list) # res[1] claims to contain # (version, dev_stage, non_release_version) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Thu Sep 3 23:25:21 2009 @@ -1328,6 +1328,9 @@ Tests ----- +- Issue #6806: test_platform failed under OS X 10.6.0 because ``sw_ver`` leaves + off the trailing 0 in the version number. + - Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to Lib/lib-tk/test/test_tkinter/test_loadtk. With this, these tests demonstrate the same behaviour as test_ttkguionly (and now also test_tk) which is to From python-checkins at python.org Thu Sep 3 23:29:20 2009 From: python-checkins at python.org (brett.cannon) Date: Thu, 03 Sep 2009 21:29:20 -0000 Subject: [Python-checkins] r74641 - in python/branches/py3k: Lib/test/test_platform.py Message-ID: Author: brett.cannon Date: Thu Sep 3 23:29:20 2009 New Revision: 74641 Log: Merged revisions 74640 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74640 | brett.cannon | 2009-09-03 14:25:21 -0700 (Thu, 03 Sep 2009) | 7 lines test_platform fails on OS X Snow Leopard because the UNIX command to get the canonical version, sw_vers, leaves off trailing zeros in the version number (e.g. 10.6 instead of 10.6.0). Test now compensates by tacking on extra zeros for the test comparison. Fixes issue #6806. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_platform.py 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 Thu Sep 3 23:29:20 2009 @@ -149,7 +149,13 @@ break fd.close() self.assertFalse(real_ver is None) - self.assertEquals(res[0], real_ver) + result_list = res[0].split('.') + expect_list = real_ver.split('.') + len_diff = len(result_list) - len(expect_list) + # On Snow Leopard, sw_vers reports 10.6.0 as 10.6 + if len_diff > 0: + expect_list.extend(['0'] * len_diff) + self.assertEquals(result_list, expect_list) # res[1] claims to contain # (version, dev_stage, non_release_version) From python-checkins at python.org Thu Sep 3 23:32:00 2009 From: python-checkins at python.org (brett.cannon) Date: Thu, 03 Sep 2009 21:32:00 -0000 Subject: [Python-checkins] r74642 - in python/branches/release31-maint: Lib/test/test_platform.py Message-ID: Author: brett.cannon Date: Thu Sep 3 23:32:00 2009 New Revision: 74642 Log: Merged revisions 74641 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74641 | brett.cannon | 2009-09-03 14:29:20 -0700 (Thu, 03 Sep 2009) | 14 lines Merged revisions 74640 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74640 | brett.cannon | 2009-09-03 14:25:21 -0700 (Thu, 03 Sep 2009) | 7 lines test_platform fails on OS X Snow Leopard because the UNIX command to get the canonical version, sw_vers, leaves off trailing zeros in the version number (e.g. 10.6 instead of 10.6.0). Test now compensates by tacking on extra zeros for the test comparison. Fixes issue #6806. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/test/test_platform.py Modified: python/branches/release31-maint/Lib/test/test_platform.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_platform.py (original) +++ python/branches/release31-maint/Lib/test/test_platform.py Thu Sep 3 23:32:00 2009 @@ -149,7 +149,13 @@ break fd.close() self.assertFalse(real_ver is None) - self.assertEquals(res[0], real_ver) + result_list = res[0].split('.') + expect_list = real_ver.split('.') + len_diff = len(result_list) - len(expect_list) + # On Snow Leopard, sw_vers reports 10.6.0 as 10.6 + if len_diff > 0: + expect_list.extend(['0'] * len_diff) + self.assertEquals(result_list, expect_list) # res[1] claims to contain # (version, dev_stage, non_release_version) From nnorwitz at gmail.com Fri Sep 4 00:40:49 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 3 Sep 2009 18:40:49 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090903224049.GA12630@python.psfb.org> More important issues: ---------------------- test_distutils leaked [25, 0, 0] references, sum=25 test_urllib2_localnet leaked [-269, 0, 280] references, sum=11 Less important issues: ---------------------- test_asynchat leaked [139, -139, 0] references, sum=0 test_popen2 leaked [-25, 58, -58] references, sum=-25 test_smtplib leaked [88, 73, 18] references, sum=179 test_socketserver leaked [0, 0, 78] references, sum=78 test_threadedtempfile leaked [102, -102, 0] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 From python-checkins at python.org Fri Sep 4 08:59:21 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 06:59:21 -0000 Subject: [Python-checkins] r74643 - in python/trunk: Lib/webbrowser.py Misc/NEWS Message-ID: Author: georg.brandl Date: Fri Sep 4 08:59:20 2009 New Revision: 74643 Log: Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. Modified: python/trunk/Lib/webbrowser.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/webbrowser.py ============================================================================== --- python/trunk/Lib/webbrowser.py (original) +++ python/trunk/Lib/webbrowser.py Fri Sep 4 08:59:20 2009 @@ -625,7 +625,9 @@ # and prepend to _tryorder for cmdline in _userchoices: if cmdline != '': - _synthesize(cmdline, -1) + cmd = _synthesize(cmdline, -1) + if cmd[1] is None: + register(cmdline, None, GenericBrowser(cmdline), -1) cmdline = None # to make del work if _userchoices was empty del cmdline del _userchoices Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Sep 4 08:59:20 2009 @@ -364,6 +364,9 @@ Library ------- +- Issue #2666: Handle BROWSER environment variable properly for unknown browser + names in the webbrowser module. + - Issue #6054: Do not normalize stored pathnames in tarfile. - Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN From python-checkins at python.org Fri Sep 4 09:55:19 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 07:55:19 -0000 Subject: [Python-checkins] r74644 - in python/trunk: README configure configure.in Message-ID: Author: georg.brandl Date: Fri Sep 4 09:55:14 2009 New Revision: 74644 Log: #5047: remove Monterey support from configure. Modified: python/trunk/README python/trunk/configure python/trunk/configure.in Modified: python/trunk/README ============================================================================== --- python/trunk/README (original) +++ python/trunk/README Fri Sep 4 09:55:14 2009 @@ -532,14 +532,6 @@ and type NMAKE. Threading and sockets are supported by default in the resulting binaries of PYTHON15.DLL and PYTHON.EXE. -Monterey (64-bit AIX): The current Monterey C compiler (Visual Age) - uses the OBJECT_MODE={32|64} environment variable to set the - compilation mode to either 32-bit or 64-bit (32-bit mode is - the default). Presumably you want 64-bit compilation mode for - this 64-bit OS. As a result you must first set OBJECT_MODE=64 - in your environment before configuring (./configure) or - building (make) Python on Monterey. - Reliant UNIX: The thread support does not compile on Reliant UNIX, and there is a (minor) problem in the configure script for that platform as well. This should be resolved in time for a Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Fri Sep 4 09:55:14 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74044 . +# From configure.in Revision: 74072 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -2057,7 +2057,7 @@ if test -z "$MACHDEP" then ac_sys_system=`uname -s` - if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + if test "$ac_sys_system" = "AIX" \ -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then ac_sys_release=`uname -v` else @@ -2306,9 +2306,6 @@ AR="\$(srcdir)/Modules/ar_beos" RANLIB=: ;; - Monterey*) - RANLIB=: - without_gcc=;; *) without_gcc=no;; esac fi @@ -3917,10 +3914,6 @@ 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 @@ -3988,8 +3981,6 @@ 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. @@ -4596,15 +4587,6 @@ 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 @@ -14688,7 +14670,6 @@ else LDSHARED='$(CC) -G' fi;; SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';; - Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; atheos*) LDSHARED="gcc -shared";; *) LDSHARED="ld";; @@ -14727,7 +14708,6 @@ then CCSHARED="-fPIC" else CCSHARED="-Kpic -belf" fi;; - Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; *) CCSHARED="";; Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Fri Sep 4 09:55:14 2009 @@ -235,7 +235,7 @@ if test -z "$MACHDEP" then ac_sys_system=`uname -s` - if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + if test "$ac_sys_system" = "AIX" \ -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then ac_sys_release=`uname -v` else @@ -457,9 +457,6 @@ AR="\$(srcdir)/Modules/ar_beos" RANLIB=: ;; - Monterey*) - RANLIB=: - without_gcc=;; *) without_gcc=no;; esac]) AC_MSG_RESULT($without_gcc) @@ -581,10 +578,6 @@ 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 AC_DEFINE(__EXTENSIONS__, 1, [Defined on Solaris to see additional function prototypes.]) @@ -645,8 +638,6 @@ 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. @@ -900,15 +891,6 @@ 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 AC_SUBST(BASECFLAGS) @@ -1722,7 +1704,6 @@ else LDSHARED='$(CC) -G' fi;; SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';; - Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; atheos*) LDSHARED="gcc -shared";; *) LDSHARED="ld";; @@ -1759,7 +1740,6 @@ then CCSHARED="-fPIC" else CCSHARED="-Kpic -belf" fi;; - Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; *) CCSHARED="";; From python-checkins at python.org Fri Sep 4 10:07:32 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 08:07:32 -0000 Subject: [Python-checkins] r74645 - python/branches/py3k/Lib/pydoc.py Message-ID: Author: georg.brandl Date: Fri Sep 4 10:07:32 2009 New Revision: 74645 Log: #5221: fix related topics: SEQUENCEMETHODS[12] doesnt exist any more. Modified: python/branches/py3k/Lib/pydoc.py Modified: python/branches/py3k/Lib/pydoc.py ============================================================================== --- python/branches/py3k/Lib/pydoc.py (original) +++ python/branches/py3k/Lib/pydoc.py Fri Sep 4 10:07:32 2009 @@ -1557,7 +1557,7 @@ 'global': ('global', 'NAMESPACES'), 'if': ('if', 'TRUTHVALUE'), 'import': ('import', 'MODULES'), - 'in': ('in', 'SEQUENCEMETHODS2'), + 'in': ('in', 'SEQUENCEMETHODS'), 'is': 'COMPARISON', 'lambda': ('lambda', 'FUNCTIONS'), 'not': 'BOOLEAN', @@ -1643,12 +1643,12 @@ 'PRECEDENCE': 'EXPRESSIONS', 'OBJECTS': ('objects', 'TYPES'), 'SPECIALMETHODS': ('specialnames', 'BASICMETHODS ATTRIBUTEMETHODS ' - 'CALLABLEMETHODS SEQUENCEMETHODS1 MAPPINGMETHODS ' - 'SEQUENCEMETHODS2 NUMBERMETHODS CLASSES'), + 'CALLABLEMETHODS SEQUENCEMETHODS MAPPINGMETHODS ' + 'NUMBERMETHODS CLASSES'), 'BASICMETHODS': ('customization', 'hash repr str SPECIALMETHODS'), 'ATTRIBUTEMETHODS': ('attribute-access', 'ATTRIBUTES SPECIALMETHODS'), 'CALLABLEMETHODS': ('callable-types', 'CALLS SPECIALMETHODS'), - 'SEQUENCEMETHODS': ('sequence-types', 'SEQUENCES SEQUENCEMETHODS2 ' + 'SEQUENCEMETHODS': ('sequence-types', 'SEQUENCES SEQUENCEMETHODS ' 'SPECIALMETHODS'), 'MAPPINGMETHODS': ('sequence-types', 'MAPPINGS SPECIALMETHODS'), 'NUMBERMETHODS': ('numeric-types', 'NUMBERS AUGMENTEDASSIGNMENT ' @@ -1672,8 +1672,8 @@ 'DICTIONARIES': ('typesmapping', 'DICTIONARYLITERALS'), 'DICTIONARYLITERALS': ('dict', 'DICTIONARIES LITERALS'), 'ATTRIBUTES': ('attribute-references', 'getattr hasattr setattr ATTRIBUTEMETHODS'), - 'SUBSCRIPTS': ('subscriptions', 'SEQUENCEMETHODS1'), - 'SLICINGS': ('slicings', 'SEQUENCEMETHODS2'), + 'SUBSCRIPTS': ('subscriptions', 'SEQUENCEMETHODS'), + 'SLICINGS': ('slicings', 'SEQUENCEMETHODS'), 'CALLS': ('calls', 'EXPRESSIONS'), 'POWER': ('power', 'EXPRESSIONS'), 'UNARY': ('unary', 'EXPRESSIONS'), From python-checkins at python.org Fri Sep 4 10:09:33 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 08:09:33 -0000 Subject: [Python-checkins] r74646 - in python/branches/py3k/Lib: cProfile.py profile.py Message-ID: Author: georg.brandl Date: Fri Sep 4 10:09:32 2009 New Revision: 74646 Log: Remove backwards compatibility stuff from profile/cProfile. Modified: python/branches/py3k/Lib/cProfile.py python/branches/py3k/Lib/profile.py Modified: python/branches/py3k/Lib/cProfile.py ============================================================================== --- python/branches/py3k/Lib/cProfile.py (original) +++ python/branches/py3k/Lib/cProfile.py Fri Sep 4 10:09:32 2009 @@ -56,11 +56,6 @@ result = prof.print_stats() return result -# Backwards compatibility. -def help(): - print("Documentation for the profile/cProfile modules can be found ") - print("in the Python Library Reference, section 'The Python Profiler'.") - # ____________________________________________________________ class Profile(_lsprof.Profiler): Modified: python/branches/py3k/Lib/profile.py ============================================================================== --- python/branches/py3k/Lib/profile.py (original) +++ python/branches/py3k/Lib/profile.py Fri Sep 4 10:09:32 2009 @@ -92,11 +92,6 @@ else: return prof.print_stats() -# Backwards compatibility. -def help(): - print("Documentation for the profile module can be found ") - print("in the Python Library Reference, section 'The Python Profiler'.") - if os.name == "mac": import MacOS def _get_time_mac(timer=MacOS.GetTicks): @@ -588,8 +583,6 @@ return mean #**************************************************************************** -def Stats(*args): - print('Report generating functions are in the "pstats" module\a') def main(): usage = "profile.py [-o output_file_path] [-s sort] scriptfile [arg] ..." From python-checkins at python.org Fri Sep 4 10:17:04 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 08:17:04 -0000 Subject: [Python-checkins] r74647 - in python/trunk: Lib/Cookie.py Misc/NEWS Message-ID: Author: georg.brandl Date: Fri Sep 4 10:17:04 2009 New Revision: 74647 Log: Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. Modified: python/trunk/Lib/Cookie.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/Cookie.py ============================================================================== --- python/trunk/Lib/Cookie.py (original) +++ python/trunk/Lib/Cookie.py Fri Sep 4 10:17:04 2009 @@ -624,7 +624,9 @@ if type(rawdata) == type(""): self.__ParseString(rawdata) else: - self.update(rawdata) + # self.update() wouldn't call our custom __setitem__ + for k, v in rawdata.items(): + self[k] = v return # end load() Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Sep 4 10:17:04 2009 @@ -364,6 +364,9 @@ Library ------- +- Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments + as documented. + - Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. From python-checkins at python.org Fri Sep 4 10:22:01 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 08:22:01 -0000 Subject: [Python-checkins] r74648 - python/branches/py3k/Lib/http/cookies.py Message-ID: Author: georg.brandl Date: Fri Sep 4 10:22:00 2009 New Revision: 74648 Log: Remove pseudo-end markers from http.cookies. Modified: python/branches/py3k/Lib/http/cookies.py Modified: python/branches/py3k/Lib/http/cookies.py ============================================================================== --- python/branches/py3k/Lib/http/cookies.py (original) +++ python/branches/py3k/Lib/http/cookies.py Fri Sep 4 10:22:00 2009 @@ -236,7 +236,6 @@ return str else: return '"' + _nulljoin( map(_Translator.get, str, str) ) + '"' -# end _quote _OctalPatt = re.compile(r"\\[0-3][0-7][0-7]") @@ -282,7 +281,6 @@ res.append( chr( int(str[j+1:j+4], 8) ) ) i = j+4 return _nulljoin(res) -# end _unquote # The _getdate() routine is used to set the expiration time in # the cookie's HTTP header. By default, _getdate() returns the @@ -348,18 +346,15 @@ # Set default attributes for K in self._reserved: dict.__setitem__(self, K, "") - # end __init__ def __setitem__(self, K, V): K = K.lower() if not K in self._reserved: raise CookieError("Invalid Attribute %s" % K) dict.__setitem__(self, K, V) - # end __setitem__ def isReservedKey(self, K): return K.lower() in self._reserved - # end isReservedKey def set(self, key, val, coded_val, LegalChars=_LegalChars): # First we verify that the key isn't a reserved word @@ -373,7 +368,6 @@ self.key = key self.value = val self.coded_value = coded_val - # end set def output(self, attrs=None, header = "Set-Cookie:"): return "%s %s" % ( header, self.OutputString(attrs) ) @@ -393,7 +387,6 @@ // end hiding --> """ % ( self.OutputString(attrs).replace('"',r'\"')) - # end js_output() def OutputString(self, attrs=None): # Build up our result @@ -424,9 +417,6 @@ # Return the result return _semispacejoin(result) - # end OutputString -# end Morsel class - # @@ -470,7 +460,6 @@ Override this function to modify the behavior of cookies. """ return val, val - # end value_encode def value_encode(self, val): """real_value, coded_value = value_encode(VALUE) @@ -480,24 +469,20 @@ """ strval = str(val) return strval, strval - # end value_encode def __init__(self, input=None): if input: self.load(input) - # end __init__ def __set(self, key, real_value, coded_value): """Private method for setting a cookie's value""" M = self.get(key, Morsel()) M.set(key, real_value, coded_value) dict.__setitem__(self, key, M) - # end __set def __setitem__(self, key, value): """Dictionary style assignment.""" rval, cval = self.value_encode(value) self.__set(key, rval, cval) - # end __setitem__ def output(self, attrs=None, header="Set-Cookie:", sep="\015\012"): """Return a string suitable for HTTP.""" @@ -506,7 +491,6 @@ for K,V in items: result.append( V.output(attrs, header) ) return sep.join(result) - # end output __str__ = output @@ -524,7 +508,6 @@ for K,V in items: result.append( V.js_output(attrs) ) return _nulljoin(result) - # end js_output def load(self, rawdata): """Load cookies from a string (presumably HTTP_COOKIE) or @@ -537,7 +520,6 @@ else: self.update(rawdata) return - # end load() def __ParseString(self, str, patt=_CookiePattern): i = 0 # Our starting point @@ -566,8 +548,7 @@ rval, cval = self.value_decode(V) self.__set(K, rval, cval) M = self[K] - # end __ParseString -# end BaseCookie class + class SimpleCookie(BaseCookie): """SimpleCookie @@ -581,9 +562,7 @@ def value_encode(self, val): strval = str(val) return strval, _quote( strval ) -# end SimpleCookie -# ########################################################### def _test(): From python-checkins at python.org Fri Sep 4 10:28:01 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 08:28:01 -0000 Subject: [Python-checkins] r74649 - python/branches/py3k/Lib/http/cookies.py Message-ID: Author: georg.brandl Date: Fri Sep 4 10:28:01 2009 New Revision: 74649 Log: Turn some comments into docstrings. Modified: python/branches/py3k/Lib/http/cookies.py Modified: python/branches/py3k/Lib/http/cookies.py ============================================================================== --- python/branches/py3k/Lib/http/cookies.py (original) +++ python/branches/py3k/Lib/http/cookies.py Fri Sep 4 10:28:01 2009 @@ -226,12 +226,12 @@ } def _quote(str, LegalChars=_LegalChars): - # - # If the string does not need to be double-quoted, - # then just return the string. Otherwise, surround - # the string in doublequotes and precede quote (with a \) - # special characters. - # + r"""Quote a string for use in a cookie header. + + If the string does not need to be double-quoted, then just return the + string. Otherwise, surround the string in doublequotes and quote + (with a \) special characters. + """ if all(c in LegalChars for c in str): return str else: @@ -304,18 +304,15 @@ (weekdayname[wd], day, monthname[month], year, hh, mm, ss) -# -# A class to hold ONE key,value pair. -# In a cookie, each such pair may have several attributes. -# so this class is used to keep the attributes associated -# with the appropriate key,value pair. -# This class also includes a coded_value attribute, which -# is used to hold the network representation of the -# value. This is most useful when Python objects are -# pickled for network transit. -# - class Morsel(dict): + """A class to hold ONE key,value pair. + + In a cookie, each such pair may have several attributes, so this class is + used to keep the attributes associated with the appropriate key,value pair. + This class also includes a coded_value attribute, which is used to hold + the network representation of the value. This is most useful when Python + objects are pickled for network transit. + """ # RFC 2109 lists these attributes as reserved: # path comment domain # max-age secure version @@ -449,8 +446,7 @@ # See this module's docstring for example usage. # class BaseCookie(dict): - # A container class for a set of Morsels - # + """A container class for a set of Morsels.""" def value_decode(self, val): """real_value, coded_value = value_decode(STRING) @@ -551,7 +547,7 @@ class SimpleCookie(BaseCookie): - """SimpleCookie + """ SimpleCookie supports strings as cookie values. When setting the value using the dictionary assignment notation, SimpleCookie calls the builtin str() to convert the value to a string. Values From python-checkins at python.org Fri Sep 4 13:19:35 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 11:19:35 -0000 Subject: [Python-checkins] r74650 - python/trunk/Lib/test/test_funcattrs.py Message-ID: Author: georg.brandl Date: Fri Sep 4 13:19:34 2009 New Revision: 74650 Log: #5101: add back tests to test_funcattrs that were lost during unittest conversion, and make some PEP8 cleanups. Modified: python/trunk/Lib/test/test_funcattrs.py Modified: python/trunk/Lib/test/test_funcattrs.py ============================================================================== --- python/trunk/Lib/test/test_funcattrs.py (original) +++ python/trunk/Lib/test/test_funcattrs.py Fri Sep 4 13:19:34 2009 @@ -13,15 +13,20 @@ self.fi = F() self.b = b - def cannot_set_attr(self,obj, name, value, exceptions): - # This method is not called as a test (name doesn't start with 'test'), - # but may be used by other tests. - try: setattr(obj, name, value) - except exceptions: pass - else: self.fail("shouldn't be able to set %s to %r" % (name, value)) - try: delattr(obj, name) - except exceptions: pass - else: self.fail("shouldn't be able to del %s" % name) + def cannot_set_attr(self, obj, name, value, exceptions): + # Helper method for other tests. + try: + setattr(obj, name, value) + except exceptions: + pass + else: + self.fail("shouldn't be able to set %s to %r" % (name, value)) + try: + delattr(obj, name) + except exceptions: + pass + else: + self.fail("shouldn't be able to del %s" % name) class FunctionPropertiesTest(FuncAttrsTest): @@ -32,15 +37,15 @@ def test_dir_includes_correct_attrs(self): self.b.known_attr = 7 self.assertTrue('known_attr' in dir(self.b), - "set attributes not in dir listing of method") + "set attributes not in dir listing of method") # Test on underlying function object of method self.f.a.im_func.known_attr = 7 self.assertTrue('known_attr' in dir(self.f.a), - "set attribute on unbound method implementation in class not in " - "dir") + "set attribute on unbound method implementation in " + "class not in dir") self.assertTrue('known_attr' in dir(self.fi.a), - "set attribute on unbound method implementations, should show up" - " in next dir") + "set attribute on unbound method implementations, " + "should show up in next dir") def test_duplicate_function_equality(self): # Body of `duplicate' is the exact same as self.b @@ -56,9 +61,29 @@ self.assertEqual(test(), 3) # self.b always returns 3, arbitrarily def test_func_globals(self): - self.assertEqual(self.b.func_globals, globals()) + self.assertIs(self.b.func_globals, globals()) self.cannot_set_attr(self.b, 'func_globals', 2, TypeError) + def test_func_closure(self): + a = 12 + def f(): print a + c = f.func_closure + self.assertTrue(isinstance(c, tuple)) + self.assertEqual(len(c), 1) + # don't have a type object handy + self.assertEqual(c[0].__class__.__name__, "cell") + self.cannot_set_attr(f, "func_closure", c, TypeError) + + def test_empty_cell(self): + def f(): print a + try: + f.func_closure[0].cell_contents + except ValueError: + pass + else: + self.fail("shouldn't be able to read an empty cell") + a = 12 + def test_func_name(self): self.assertEqual(self.b.__name__, 'b') self.assertEqual(self.b.func_name, 'b') @@ -96,16 +121,20 @@ self.assertEqual(c.func_code, d.func_code) self.assertEqual(c(), 7) # self.assertEqual(d(), 7) - try: b.func_code = c.func_code - except ValueError: pass - else: self.fail( - "func_code with different numbers of free vars should not be " - "possible") - try: e.func_code = d.func_code - except ValueError: pass - else: self.fail( - "func_code with different numbers of free vars should not be " - "possible") + try: + b.func_code = c.func_code + except ValueError: + pass + else: + self.fail("func_code with different numbers of free vars should " + "not be possible") + try: + e.func_code = d.func_code + except ValueError: + pass + else: + self.fail("func_code with different numbers of free vars should " + "not be possible") def test_blank_func_defaults(self): self.assertEqual(self.b.func_defaults, None) @@ -126,13 +155,16 @@ self.assertEqual(first_func(3, 5), 8) del second_func.func_defaults self.assertEqual(second_func.func_defaults, None) - try: second_func() - except TypeError: pass - else: self.fail( - "func_defaults does not update; deleting it does not remove " - "requirement") + try: + second_func() + except TypeError: + pass + else: + self.fail("func_defaults does not update; deleting it does not " + "remove requirement") -class ImplicitReferencesTest(FuncAttrsTest): + +class InstancemethodAttrTest(FuncAttrsTest): def test_im_class(self): self.assertEqual(self.f.a.im_class, self.f) self.assertEqual(self.fi.a.im_class, self.f) @@ -159,9 +191,12 @@ self.assertEqual(self.fi.id(), id(self.fi)) self.assertNotEqual(self.fi.id(), id(self.f)) # Test usage - try: self.f.id.unknown_attr - except AttributeError: pass - else: self.fail("using unknown attributes should raise AttributeError") + try: + self.f.id.unknown_attr + except AttributeError: + pass + else: + self.fail("using unknown attributes should raise AttributeError") # Test assignment and deletion self.cannot_set_attr(self.f.id, 'unknown_attr', 2, AttributeError) self.cannot_set_attr(self.fi.id, 'unknown_attr', 2, AttributeError) @@ -171,35 +206,50 @@ self.assertEqual(self.f.a.known_attr, 7) self.assertEqual(self.fi.a.known_attr, 7) + class ArbitraryFunctionAttrTest(FuncAttrsTest): def test_set_attr(self): + # setting attributes only works on function objects self.b.known_attr = 7 self.assertEqual(self.b.known_attr, 7) for func in [self.f.a, self.fi.a]: - try: func.known_attr = 7 - except AttributeError: pass - else: self.fail("setting attributes on methods should raise error") + try: + func.known_attr = 7 + except AttributeError: + pass + else: + self.fail("setting attributes on methods should raise error") def test_delete_unknown_attr(self): - try: del self.b.unknown_attr - except AttributeError: pass - else: self.fail("deleting unknown attribute should raise TypeError") + try: + del self.b.unknown_attr + except AttributeError: + pass + else: + self.fail("deleting unknown attribute should raise TypeError") def test_setting_attrs_duplicates(self): - try: self.f.a.klass = self.f - except AttributeError: pass - else: self.fail("setting arbitrary attribute in unbound function " - " should raise AttributeError") + try: + self.f.a.klass = self.f + except AttributeError: + pass + else: + self.fail("setting arbitrary attribute in unbound function " + " should raise AttributeError") self.f.a.im_func.klass = self.f for method in [self.f.a, self.fi.a, self.fi.a.im_func]: self.assertEqual(method.klass, self.f) def test_unset_attr(self): for func in [self.b, self.f.a, self.fi.a]: - try: func.non_existent_attr - except AttributeError: pass - else: self.fail("using unknown attributes should raise " - "AttributeError") + try: + func.non_existent_attr + except AttributeError: + pass + else: + self.fail("using unknown attributes should raise " + "AttributeError") + class FunctionDictsTest(FuncAttrsTest): def test_setting_dict_to_invalid(self): @@ -216,13 +266,13 @@ # Setting dict is only possible on the underlying function objects self.f.a.im_func.__dict__ = d # Test assignment - self.assertEqual(d, self.b.__dict__) - self.assertEqual(d, self.b.func_dict) + self.assertIs(d, self.b.__dict__) + self.assertIs(d, self.b.func_dict) # ... and on all the different ways of referencing the method's func - self.assertEqual(d, self.f.a.im_func.__dict__) - self.assertEqual(d, self.f.a.__dict__) - self.assertEqual(d, self.fi.a.im_func.__dict__) - self.assertEqual(d, self.fi.a.__dict__) + self.assertIs(d, self.f.a.im_func.__dict__) + self.assertIs(d, self.f.a.__dict__) + self.assertIs(d, self.fi.a.im_func.__dict__) + self.assertIs(d, self.fi.a.__dict__) # Test value self.assertEqual(self.b.known_attr, 7) self.assertEqual(self.b.__dict__['known_attr'], 7) @@ -234,12 +284,18 @@ self.assertEqual(self.fi.a.known_attr, 7) def test_delete_func_dict(self): - try: del self.b.__dict__ - except TypeError: pass - else: self.fail("deleting function dictionary should raise TypeError") - try: del self.b.func_dict - except TypeError: pass - else: self.fail("deleting function dictionary should raise TypeError") + try: + del self.b.__dict__ + except TypeError: + pass + else: + self.fail("deleting function dictionary should raise TypeError") + try: + del self.b.func_dict + except TypeError: + pass + else: + self.fail("deleting function dictionary should raise TypeError") def test_unassigned_dict(self): self.assertEqual(self.b.__dict__, {}) @@ -250,6 +306,7 @@ d[self.b] = value self.assertEqual(d[self.b], value) + class FunctionDocstringTest(FuncAttrsTest): def test_set_docstring_attr(self): self.assertEqual(self.b.__doc__, None) @@ -273,6 +330,7 @@ self.assertEqual(self.b.__doc__, None) self.assertEqual(self.b.func_doc, None) + class StaticMethodAttrsTest(unittest.TestCase): def test_func_attribute(self): def f(): @@ -286,7 +344,7 @@ def test_main(): - test_support.run_unittest(FunctionPropertiesTest, ImplicitReferencesTest, + test_support.run_unittest(FunctionPropertiesTest, InstancemethodAttrTest, ArbitraryFunctionAttrTest, FunctionDictsTest, FunctionDocstringTest, StaticMethodAttrsTest) From python-checkins at python.org Fri Sep 4 13:20:54 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 11:20:54 -0000 Subject: [Python-checkins] r74651 - in python/branches/py3k: Lib/test/test_funcattrs.py Message-ID: Author: georg.brandl Date: Fri Sep 4 13:20:54 2009 New Revision: 74651 Log: Recorded merge of revisions 74650 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74650 | georg.brandl | 2009-09-04 13:19:34 +0200 (Fr, 04 Sep 2009) | 1 line #5101: add back tests to test_funcattrs that were lost during unittest conversion, and make some PEP8 cleanups. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_funcattrs.py 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 Fri Sep 4 13:20:54 2009 @@ -56,8 +56,29 @@ self.assertEqual(test(), 3) # self.b always returns 3, arbitrarily def test___globals__(self): - self.assertEqual(self.b.__globals__, globals()) - self.cannot_set_attr(self.b, '__globals__', 2, (AttributeError, TypeError)) + self.assertIs(self.b.__globals__, globals()) + self.cannot_set_attr(self.b, '__globals__', 2, + (AttributeError, TypeError)) + + def test___closure__(self): + a = 12 + def f(): print(a) + c = f.__closure__ + self.assertTrue(isinstance(c, tuple)) + self.assertEqual(len(c), 1) + # don't have a type object handy + self.assertEqual(c[0].__class__.__name__, "cell") + self.cannot_set_attr(f, "__closure__", c, AttributeError) + + def test_empty_cell(self): + def f(): print(a) + try: + f.__closure__[0].cell_contents + except ValueError: + pass + else: + self.fail("shouldn't be able to read an empty cell") + a = 12 def test___name__(self): self.assertEqual(self.b.__name__, 'b') @@ -90,16 +111,20 @@ self.assertEqual(c.__code__, d.__code__) self.assertEqual(c(), 7) # self.assertEqual(d(), 7) - try: b.__code__ = c.__code__ - except ValueError: pass - else: self.fail( - "__code__ with different numbers of free vars should not be " - "possible") - try: e.__code__ = d.__code__ - except ValueError: pass - else: self.fail( - "__code__ with different numbers of free vars should not be " - "possible") + try: + b.__code__ = c.__code__ + except ValueError: + pass + else: + self.fail("__code__ with different numbers of free vars should " + "not be possible") + try: + e.__code__ = d.__code__ + except ValueError: + pass + else: + self.fail("__code__ with different numbers of free vars should " + "not be possible") def test_blank_func_defaults(self): self.assertEqual(self.b.__defaults__, None) @@ -120,13 +145,16 @@ self.assertEqual(first_func(3, 5), 8) del second_func.__defaults__ self.assertEqual(second_func.__defaults__, None) - try: second_func() - except TypeError: pass - else: self.fail( - "func_defaults does not update; deleting it does not remove " - "requirement") + try: + second_func() + except TypeError: + pass + else: + self.fail("__defaults__ does not update; deleting it does not " + "remove requirement") -class ImplicitReferencesTest(FuncAttrsTest): + +class InstancemethodAttrTest(FuncAttrsTest): def test___class__(self): self.assertEqual(self.fi.a.__self__.__class__, self.F) @@ -146,31 +174,45 @@ self.fi.id = types.MethodType(id, self.fi) self.assertEqual(self.fi.id(), id(self.fi)) # Test usage - try: self.fi.id.unknown_attr - except AttributeError: pass - else: self.fail("using unknown attributes should raise AttributeError") + try: + self.fi.id.unknown_attr + except AttributeError: + pass + else: + self.fail("using unknown attributes should raise AttributeError") # Test assignment and deletion self.cannot_set_attr(self.fi.id, 'unknown_attr', 2, AttributeError) + class ArbitraryFunctionAttrTest(FuncAttrsTest): def test_set_attr(self): self.b.known_attr = 7 self.assertEqual(self.b.known_attr, 7) - try: self.fi.a.known_attr = 7 - except AttributeError: pass - else: self.fail("setting attributes on methods should raise error") + try: + self.fi.a.known_attr = 7 + except AttributeError: + pass + else: + self.fail("setting attributes on methods should raise error") def test_delete_unknown_attr(self): - try: del self.b.unknown_attr - except AttributeError: pass - else: self.fail("deleting unknown attribute should raise TypeError") + try: + del self.b.unknown_attr + except AttributeError: + pass + else: + self.fail("deleting unknown attribute should raise TypeError") def test_unset_attr(self): for func in [self.b, self.fi.a]: - try: func.non_existent_attr - except AttributeError: pass - else: self.fail("using unknown attributes should raise " - "AttributeError") + try: + func.non_existent_attr + except AttributeError: + pass + else: + self.fail("using unknown attributes should raise " + "AttributeError") + class FunctionDictsTest(FuncAttrsTest): def test_setting_dict_to_invalid(self): @@ -183,11 +225,11 @@ d = {'known_attr': 7} self.b.__dict__ = d # Test assignment - self.assertEqual(d, self.b.__dict__) + self.assertIs(d, self.b.__dict__) # ... and on all the different ways of referencing the method's func self.F.a.__dict__ = d - self.assertEqual(d, self.fi.a.__func__.__dict__) - self.assertEqual(d, self.fi.a.__dict__) + self.assertIs(d, self.fi.a.__func__.__dict__) + self.assertIs(d, self.fi.a.__dict__) # Test value self.assertEqual(self.b.known_attr, 7) self.assertEqual(self.b.__dict__['known_attr'], 7) @@ -196,9 +238,12 @@ self.assertEqual(self.fi.a.known_attr, 7) def test_delete___dict__(self): - try: del self.b.__dict__ - except TypeError: pass - else: self.fail("deleting function dictionary should raise TypeError") + try: + del self.b.__dict__ + except TypeError: + pass + else: + self.fail("deleting function dictionary should raise TypeError") def test_unassigned_dict(self): self.assertEqual(self.b.__dict__, {}) @@ -209,6 +254,7 @@ d[self.b] = value self.assertEqual(d[self.b], value) + class FunctionDocstringTest(FuncAttrsTest): def test_set_docstring_attr(self): self.assertEqual(self.b.__doc__, None) @@ -224,6 +270,7 @@ del self.b.__doc__ self.assertEqual(self.b.__doc__, None) + def cell(value): """Create a cell containing the given value.""" def f(): @@ -242,6 +289,7 @@ a = 1729 return f.__closure__[0] + class CellTest(unittest.TestCase): def test_comparison(self): # These tests are here simply to exercise the comparison code; @@ -254,6 +302,7 @@ self.assertTrue(cell(-36) == cell(-36.0)) self.assertTrue(cell(True) > empty_cell()) + class StaticMethodAttrsTest(unittest.TestCase): def test_func_attribute(self): def f(): @@ -267,7 +316,7 @@ def test_main(): - support.run_unittest(FunctionPropertiesTest, ImplicitReferencesTest, + support.run_unittest(FunctionPropertiesTest, InstancemethodAttrTest, ArbitraryFunctionAttrTest, FunctionDictsTest, FunctionDocstringTest, CellTest, StaticMethodAttrsTest) From python-checkins at python.org Fri Sep 4 13:25:38 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 11:25:38 -0000 Subject: [Python-checkins] r74652 - python/trunk/Doc/library/ftplib.rst Message-ID: Author: georg.brandl Date: Fri Sep 4 13:25:37 2009 New Revision: 74652 Log: #6756: add some info about the "acct" parameter. Modified: python/trunk/Doc/library/ftplib.rst Modified: python/trunk/Doc/library/ftplib.rst ============================================================================== --- python/trunk/Doc/library/ftplib.rst (original) +++ python/trunk/Doc/library/ftplib.rst Fri Sep 4 13:25:37 2009 @@ -147,7 +147,8 @@ ``'anonymous@'``. This function should be called only once for each instance, after a connection has been established; it should not be called at all if a host and user were given when the instance was created. Most FTP commands are - only allowed after the client has logged in. + only allowed after the client has logged in. The *acct* parameter supplies + "accounting information"; few systems implement this. .. method:: FTP.abort() From python-checkins at python.org Fri Sep 4 13:32:18 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 11:32:18 -0000 Subject: [Python-checkins] r74653 - python/trunk/Doc/tutorial/errors.rst Message-ID: Author: georg.brandl Date: Fri Sep 4 13:32:18 2009 New Revision: 74653 Log: #6777: dont discourage usage of Exception.args or promote usage of Exception.message. 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 Sep 4 13:32:18 2009 @@ -165,14 +165,11 @@ The except clause may specify a variable after the exception name (or tuple). The variable is bound to an exception instance with the arguments stored in ``instance.args``. For convenience, the exception instance defines -:meth:`__getitem__` and :meth:`__str__` so the arguments can be accessed or -printed directly without having to reference ``.args``. +:meth:`__str__` so the arguments can be printed directly without having to +reference ``.args``. -But use of ``.args`` is discouraged. Instead, the preferred use is to pass a -single argument to an exception (which can be a tuple if multiple arguments are -needed) and have it bound to the ``message`` attribute. One may also -instantiate an exception first before raising it and add any attributes to it as -desired. :: +One may also instantiate an exception first before raising it and add any +attributes to it as desired. :: >>> try: ... raise Exception('spam', 'eggs') @@ -288,28 +285,28 @@ """Exception raised for errors in the input. Attributes: - expression -- input expression in which the error occurred - message -- explanation of the error + expr -- input expression in which the error occurred + msg -- explanation of the error """ - def __init__(self, expression, message): - self.expression = expression - self.message = message + def __init__(self, expr, msg): + self.expr = expr + self.msg = msg class TransitionError(Error): """Raised when an operation attempts a state transition that's not allowed. Attributes: - previous -- state at beginning of transition + prev -- state at beginning of transition next -- attempted new state - message -- explanation of why the specific transition is not allowed + msg -- explanation of why the specific transition is not allowed """ - def __init__(self, previous, next, message): - self.previous = previous + def __init__(self, prev, next, msg): + self.prev = prev self.next = next - self.message = message + self.msg = msg Most exceptions are defined with names that end in "Error," similar to the naming of the standard exceptions. From python-checkins at python.org Fri Sep 4 17:41:41 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 15:41:41 -0000 Subject: [Python-checkins] r74654 - python/branches/py3k Message-ID: Author: georg.brandl Date: Fri Sep 4 17:41:40 2009 New Revision: 74654 Log: Blocked revisions 74653 via svnmerge ........ r74653 | georg.brandl | 2009-09-04 13:32:18 +0200 (Fr, 04 Sep 2009) | 1 line #6777: dont discourage usage of Exception.args or promote usage of Exception.message. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Fri Sep 4 18:12:33 2009 From: python-checkins at python.org (chris.withers) Date: Fri, 04 Sep 2009 16:12:33 -0000 Subject: [Python-checkins] r74655 - python/trunk/Lib/httplib.py Message-ID: Author: chris.withers Date: Fri Sep 4 18:12:32 2009 New Revision: 74655 Log: Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. Modified: python/trunk/Lib/httplib.py Modified: python/trunk/Lib/httplib.py ============================================================================== --- python/trunk/Lib/httplib.py (original) +++ python/trunk/Lib/httplib.py Fri Sep 4 18:12:32 2009 @@ -554,10 +554,7 @@ def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left - value = '' - - # XXX This accumulates chunks by repeated string concatenation, - # which is not efficient as the number or size of chunks gets big. + value = [] while True: if chunk_left is None: line = self.fp.readline() @@ -570,22 +567,22 @@ # close the connection as protocol synchronisation is # probably lost self.close() - raise IncompleteRead(value) + raise IncompleteRead(''.join(value)) if chunk_left == 0: break if amt is None: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) elif amt < chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self.chunk_left = chunk_left - amt - return value + return ''.join(value) elif amt == chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self._safe_read(2) # toss the CRLF at the end of the chunk self.chunk_left = None - return value + return ''.join(value) else: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) amt -= chunk_left # we read the whole chunk, get another @@ -606,7 +603,7 @@ # we read everything; close the "file" self.close() - return value + return ''.join(value) def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads. From python-checkins at python.org Fri Sep 4 18:32:22 2009 From: python-checkins at python.org (chris.withers) Date: Fri, 04 Sep 2009 16:32:22 -0000 Subject: [Python-checkins] r74656 - python/trunk/Misc/NEWS Message-ID: Author: chris.withers Date: Fri Sep 4 18:32:22 2009 New Revision: 74656 Log: news entry matching r74655 Modified: python/trunk/Misc/NEWS Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Sep 4 18:32:22 2009 @@ -364,6 +364,11 @@ Library ------- +- Issue #6838: Use a list to accumulate the value instead of + repeatedly concatenating strings in httplib's + HTTPResponse._read_chunked providing a significant speed increase + when downloading large files servend with a Transfer-Encoding of 'chunked'. + - Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. From python-checkins at python.org Fri Sep 4 18:51:16 2009 From: python-checkins at python.org (chris.withers) Date: Fri, 04 Sep 2009 16:51:16 -0000 Subject: [Python-checkins] r74657 - in python/branches/release26-maint: Lib/httplib.py Misc/NEWS Message-ID: Author: chris.withers Date: Fri Sep 4 18:51:16 2009 New Revision: 74657 Log: Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. Modified: python/branches/release26-maint/Lib/httplib.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 Fri Sep 4 18:51:16 2009 @@ -544,10 +544,7 @@ def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left - value = '' - - # XXX This accumulates chunks by repeated string concatenation, - # which is not efficient as the number or size of chunks gets big. + value = [] while True: if chunk_left is None: line = self.fp.readline() @@ -560,22 +557,22 @@ # close the connection as protocol synchronisation is # probably lost self.close() - raise IncompleteRead(value) + raise IncompleteRead(''.join(value)) if chunk_left == 0: break if amt is None: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) elif amt < chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self.chunk_left = chunk_left - amt - return value + return ''.join(value) elif amt == chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self._safe_read(2) # toss the CRLF at the end of the chunk self.chunk_left = None - return value + return ''.join(value) else: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) amt -= chunk_left # we read the whole chunk, get another @@ -596,7 +593,7 @@ # we read everything; close the "file" self.close() - return value + return ''.join(value) def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads. Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Fri Sep 4 18:51:16 2009 @@ -72,6 +72,11 @@ Library ------- +- Issue #6838: Use a list to accumulate the value instead of + repeatedly concatenating strings in httplib's + HTTPResponse._read_chunked providing a significant speed increase + when downloading large files servend with a Transfer-Encoding of 'chunked'. + - Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN payloads are now ordered by integer value rather than lexicographically. From python-checkins at python.org Fri Sep 4 19:04:16 2009 From: python-checkins at python.org (chris.withers) Date: Fri, 04 Sep 2009 17:04:16 -0000 Subject: [Python-checkins] r74658 - in python/branches/py3k: Lib/http/client.py Misc/NEWS Message-ID: Author: chris.withers Date: Fri Sep 4 19:04:16 2009 New Revision: 74658 Log: Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. Modified: python/branches/py3k/Lib/http/client.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/http/client.py ============================================================================== --- python/branches/py3k/Lib/http/client.py (original) +++ python/branches/py3k/Lib/http/client.py Fri Sep 4 19:04:16 2009 @@ -518,10 +518,7 @@ def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left - value = b"" - - # XXX This accumulates chunks by repeated string concatenation, - # which is not efficient as the number or size of chunks gets big. + value = [] while True: if chunk_left is None: line = self.fp.readline() @@ -534,22 +531,22 @@ # close the connection as protocol synchronisation is # probably lost self.close() - raise IncompleteRead(value) + raise IncompleteRead(b''.join(value)) if chunk_left == 0: break if amt is None: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) elif amt < chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self.chunk_left = chunk_left - amt - return value + return b''.join(value) elif amt == chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self._safe_read(2) # toss the CRLF at the end of the chunk self.chunk_left = None - return value + return b''.join(value) else: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) amt -= chunk_left # we read the whole chunk, get another @@ -570,7 +567,7 @@ # we read everything; close the "file" self.close() - return value + return b''.join(value) def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads. Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Sep 4 19:04:16 2009 @@ -68,6 +68,11 @@ Library ------- +- Issue #6838: Use a list to accumulate the value instead of + repeatedly concatenating strings in http.client's + HTTPResponse._read_chunked providing a significant speed increase + when downloading large files servend with a Transfer-Encoding of 'chunked'. + - Trying to import a submodule from a module that is not a package, ImportError should be raised, not AttributeError. From python-checkins at python.org Fri Sep 4 19:13:14 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 17:13:14 -0000 Subject: [Python-checkins] r74659 - python/branches/py3k Message-ID: Author: georg.brandl Date: Fri Sep 4 19:13:13 2009 New Revision: 74659 Log: Recorded merge of revisions 74655-74656 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74655 | chris.withers | 2009-09-04 18:12:32 +0200 (Fr, 04 Sep 2009) | 2 lines Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. ........ r74656 | chris.withers | 2009-09-04 18:32:22 +0200 (Fr, 04 Sep 2009) | 1 line news entry matching r74655 ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Fri Sep 4 19:13:30 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 17:13:30 -0000 Subject: [Python-checkins] r74660 - python/branches/release26-maint Message-ID: Author: georg.brandl Date: Fri Sep 4 19:13:30 2009 New Revision: 74660 Log: Recorded merge of revisions 74655-74656 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74655 | chris.withers | 2009-09-04 18:12:32 +0200 (Fr, 04 Sep 2009) | 2 lines Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. ........ r74656 | chris.withers | 2009-09-04 18:32:22 +0200 (Fr, 04 Sep 2009) | 1 line news entry matching r74655 ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Fri Sep 4 19:15:17 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 17:15:17 -0000 Subject: [Python-checkins] r74661 - in python/branches/py3k/Lib: cProfile.py profile.py Message-ID: Author: georg.brandl Date: Fri Sep 4 19:15:16 2009 New Revision: 74661 Log: Remove the just-removed "help" from __all__. Modified: python/branches/py3k/Lib/cProfile.py python/branches/py3k/Lib/profile.py Modified: python/branches/py3k/Lib/cProfile.py ============================================================================== --- python/branches/py3k/Lib/cProfile.py (original) +++ python/branches/py3k/Lib/cProfile.py Fri Sep 4 19:15:16 2009 @@ -4,7 +4,7 @@ Compatible with the 'profile' module. """ -__all__ = ["run", "runctx", "help", "Profile"] +__all__ = ["run", "runctx", "Profile"] import _lsprof Modified: python/branches/py3k/Lib/profile.py ============================================================================== --- python/branches/py3k/Lib/profile.py (original) +++ python/branches/py3k/Lib/profile.py Fri Sep 4 19:15:16 2009 @@ -39,7 +39,7 @@ import marshal from optparse import OptionParser -__all__ = ["run", "runctx", "help", "Profile"] +__all__ = ["run", "runctx", "Profile"] # Sample timer for use with #i_count = 0 From python-checkins at python.org Fri Sep 4 19:15:46 2009 From: python-checkins at python.org (chris.withers) Date: Fri, 04 Sep 2009 17:15:46 -0000 Subject: [Python-checkins] r74662 - in python/branches/release31-maint: Lib/http/client.py Misc/NEWS Message-ID: Author: chris.withers Date: Fri Sep 4 19:15:46 2009 New Revision: 74662 Log: Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. Modified: python/branches/release31-maint/Lib/http/client.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 Fri Sep 4 19:15:46 2009 @@ -518,10 +518,7 @@ def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left - value = b"" - - # XXX This accumulates chunks by repeated string concatenation, - # which is not efficient as the number or size of chunks gets big. + value = [] while True: if chunk_left is None: line = self.fp.readline() @@ -534,22 +531,22 @@ # close the connection as protocol synchronisation is # probably lost self.close() - raise IncompleteRead(value) + raise IncompleteRead(b''.join(value)) if chunk_left == 0: break if amt is None: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) elif amt < chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self.chunk_left = chunk_left - amt - return value + return b''.join(value) elif amt == chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self._safe_read(2) # toss the CRLF at the end of the chunk self.chunk_left = None - return value + return b''.join(value) else: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) amt -= chunk_left # we read the whole chunk, get another @@ -570,7 +567,7 @@ # we read everything; close the "file" self.close() - return value + return b''.join(value) def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads. Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Sep 4 19:15:46 2009 @@ -50,6 +50,11 @@ Library ------- +- Issue #6838: Use a list to accumulate the value instead of + repeatedly concatenating strings in http.client's + HTTPResponse._read_chunked providing a significant speed increase + when downloading large files servend with a Transfer-Encoding of 'chunked'. + - Have importlib raise ImportError if None is found in sys.modules for a module. From python-checkins at python.org Fri Sep 4 19:17:04 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 04 Sep 2009 17:17:04 -0000 Subject: [Python-checkins] r74663 - python/branches/release31-maint Message-ID: Author: georg.brandl Date: Fri Sep 4 19:17:03 2009 New Revision: 74663 Log: Recorded merge of revisions 74658 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r74658 | chris.withers | 2009-09-04 19:04:16 +0200 (Fr, 04 Sep 2009) | 2 lines Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. ........ Modified: python/branches/release31-maint/ (props changed) From martin at v.loewis.de Fri Sep 4 19:23:09 2009 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Fri, 04 Sep 2009 19:23:09 +0200 Subject: [Python-checkins] r74657 - in python/branches/release26-maint: Lib/httplib.py Misc/NEWS In-Reply-To: References: Message-ID: <4AA14CFD.5060603@v.loewis.de> > Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. Can you please use svnmerge when merging between branches? Regards, Martin P.S. CC'ing, in case you are not subscribed to python-checkins. From python-checkins at python.org Fri Sep 4 20:24:41 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 04 Sep 2009 18:24:41 -0000 Subject: [Python-checkins] r74664 - in python/branches/py3k: Lib/ctypes/test/test_cast.py Lib/ctypes/test/test_funcptr.py Lib/ctypes/test/test_functions.py Lib/ctypes/test/test_incomplete.py Lib/ctypes/test/test_memfunctions.py Lib/ctypes/test/test_objects.py Lib/ctypes/test/test_pointers.py Lib/ctypes/test/test_prototypes.py Lib/ctypes/test/test_random_things.py Lib/ctypes/test/test_returnfuncptrs.py Lib/ctypes/test/test_slicing.py Lib/ctypes/test/test_stringptr.py Lib/ctypes/test/test_unicode.py Misc/NEWS Modules/_ctypes/cfield.c Message-ID: Author: thomas.heller Date: Fri Sep 4 20:24:41 2009 New Revision: 74664 Log: Issue 6239: ctypes.c_char_p return value must return bytes. Modified: python/branches/py3k/Lib/ctypes/test/test_cast.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_memfunctions.py python/branches/py3k/Lib/ctypes/test/test_objects.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_random_things.py python/branches/py3k/Lib/ctypes/test/test_returnfuncptrs.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_unicode.py python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/_ctypes/cfield.c 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 Fri Sep 4 20:24:41 2009 @@ -73,7 +73,7 @@ # This didn't work: bad argument to internal function s = c_char_p("hiho") self.assertEqual(cast(cast(s, c_void_p), c_char_p).value, - "hiho") + b"hiho") try: c_wchar_p 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 Fri Sep 4 20:24:41 2009 @@ -97,8 +97,8 @@ strchr = lib.my_strchr strchr.restype = c_char_p strchr.argtypes = (c_char_p, c_char) - self.assertEqual(strchr("abcdefghi", "b"), "bcdefghi") - self.assertEqual(strchr("abcdefghi", "x"), None) + self.assertEqual(strchr(b"abcdefghi", b"b"), b"bcdefghi") + self.assertEqual(strchr(b"abcdefghi", b"x"), None) strtok = lib.my_strtok @@ -111,16 +111,16 @@ size = len(init) + 1 return (c_char*size)(*init) - s = "a\nb\nc" + s = b"a\nb\nc" b = c_string(s) ## b = (c_char * (len(s)+1))() ## b.value = s ## b = c_string(s) - self.assertEqual(strtok(b, b"\n"), "a") - self.assertEqual(strtok(None, b"\n"), "b") - self.assertEqual(strtok(None, b"\n"), "c") + self.assertEqual(strtok(b, b"\n"), b"a") + self.assertEqual(strtok(None, b"\n"), b"b") + self.assertEqual(strtok(None, b"\n"), b"c") self.assertEqual(strtok(None, b"\n"), None) if __name__ == '__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 Fri Sep 4 20:24:41 2009 @@ -177,7 +177,7 @@ f.argtypes = None f.restype = c_char_p result = f(b"123") - self.assertEqual(result, "123") + self.assertEqual(result, b"123") result = f(None) self.assertEqual(result, None) 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 Fri Sep 4 20:24:41 2009 @@ -17,9 +17,9 @@ SetPointerType(lpcell, cell) c1 = cell() - c1.name = "foo" + c1.name = b"foo" c2 = cell() - c2.name = "bar" + c2.name = b"bar" c1.next = pointer(c2) c2.next = pointer(c1) @@ -30,7 +30,7 @@ for i in range(8): result.append(p.name) p = p.next[0] - self.assertEqual(result, ["foo", "bar"] * 4) + self.assertEqual(result, [b"foo", b"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_memfunctions.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_memfunctions.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_memfunctions.py Fri Sep 4 20:24:41 2009 @@ -37,7 +37,7 @@ def test_cast(self): a = (c_ubyte * 32)(*map(ord, "abcdef")) - self.assertEqual(cast(a, c_char_p).value, "abcdef") + self.assertEqual(cast(a, c_char_p).value, b"abcdef") self.assertEqual(cast(a, POINTER(c_byte))[:7], [97, 98, 99, 100, 101, 102, 0]) self.assertEqual(cast(a, POINTER(c_byte))[:7:], Modified: python/branches/py3k/Lib/ctypes/test/test_objects.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_objects.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_objects.py Fri Sep 4 20:24:41 2009 @@ -24,7 +24,7 @@ >>> array._objects {'4': b'foo bar'} >>> array[4] -'foo bar' +b'foo bar' >>> It gets more complicated when the ctypes instance itself is contained 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 Fri Sep 4 20:24:41 2009 @@ -140,10 +140,10 @@ func.restype = c_char_p argv = (c_char_p * 2)() argc = c_int( 2 ) - argv[0] = 'hello' - argv[1] = 'world' + argv[0] = b'hello' + argv[1] = b'world' result = func( byref(argc), argv ) - assert result == 'world', result + self.assertEqual(result, b'world') def test_bug_1467852(self): # http://sourceforge.net/tracker/?func=detail&atid=532154&aid=1467852&group_id=71702 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 Fri Sep 4 20:24:41 2009 @@ -92,14 +92,14 @@ func.argtypes = POINTER(c_char), self.assertEqual(None, func(None)) - self.assertEqual("123", func("123")) + self.assertEqual(b"123", func(b"123")) self.assertEqual(None, func(c_char_p(None))) - self.assertEqual("123", func(c_char_p("123"))) + self.assertEqual(b"123", func(c_char_p(b"123"))) - self.assertEqual("123", func(c_buffer("123"))) - ca = c_char("a") - self.assertEqual("a", func(pointer(ca))[0]) - self.assertEqual("a", func(byref(ca))[0]) + self.assertEqual(b"123", func(c_buffer(b"123"))) + ca = c_char(b"a") + self.assertEqual(ord(b"a"), func(pointer(ca))[0]) + self.assertEqual(ord(b"a"), func(byref(ca))[0]) def test_c_char_p_arg(self): func = testdll._testfunc_p_p @@ -107,14 +107,14 @@ func.argtypes = c_char_p, self.assertEqual(None, func(None)) - self.assertEqual("123", func("123")) + self.assertEqual(b"123", func(b"123")) self.assertEqual(None, func(c_char_p(None))) - self.assertEqual("123", func(c_char_p("123"))) + self.assertEqual(b"123", func(c_char_p(b"123"))) - self.assertEqual("123", func(c_buffer("123"))) - ca = c_char("a") - self.assertEqual("a", func(pointer(ca))[0]) - self.assertEqual("a", func(byref(ca))[0]) + self.assertEqual(b"123", func(c_buffer(b"123"))) + ca = c_char(b"a") + self.assertEqual(ord(b"a"), func(pointer(ca))[0]) + self.assertEqual(ord(b"a"), func(byref(ca))[0]) def test_c_void_p_arg(self): func = testdll._testfunc_p_p @@ -122,14 +122,14 @@ func.argtypes = c_void_p, self.assertEqual(None, func(None)) - self.assertEqual("123", func(b"123")) - self.assertEqual("123", func(c_char_p("123"))) + self.assertEqual(b"123", func(b"123")) + self.assertEqual(b"123", func(c_char_p(b"123"))) self.assertEqual(None, func(c_char_p(None))) - self.assertEqual("123", func(c_buffer("123"))) + self.assertEqual(b"123", func(c_buffer(b"123"))) ca = c_char("a") - self.assertEqual("a", func(pointer(ca))[0]) - self.assertEqual("a", func(byref(ca))[0]) + self.assertEqual(ord(b"a"), func(pointer(ca))[0]) + self.assertEqual(ord(b"a"), func(byref(ca))[0]) func(byref(c_int())) func(pointer(c_int())) 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 Fri Sep 4 20:24:41 2009 @@ -69,7 +69,7 @@ out = self.capture_stderr(cb, "spam") self.assertEqual(out.splitlines()[-1], "TypeError: " - "unsupported operand type(s) for /: 'int' and 'str'") + "unsupported operand type(s) for /: 'int' and 'bytes'") if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_returnfuncptrs.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_returnfuncptrs.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_returnfuncptrs.py Fri Sep 4 20:24:41 2009 @@ -12,12 +12,12 @@ get_strchr = dll.get_strchr get_strchr.restype = CFUNCTYPE(c_char_p, c_char_p, c_char) strchr = get_strchr() - self.assertEqual(strchr("abcdef", "b"), "bcdef") - self.assertEqual(strchr("abcdef", "x"), None) - self.assertEqual(strchr("abcdef", 98), "bcdef") - self.assertEqual(strchr("abcdef", 107), None) - self.assertRaises(ArgumentError, strchr, "abcdef", 3.0) - self.assertRaises(TypeError, strchr, "abcdef") + self.assertEqual(strchr(b"abcdef", b"b"), b"bcdef") + self.assertEqual(strchr(b"abcdef", b"x"), None) + self.assertEqual(strchr(b"abcdef", 98), b"bcdef") + self.assertEqual(strchr(b"abcdef", 107), None) + self.assertRaises(ArgumentError, strchr, b"abcdef", 3.0) + self.assertRaises(TypeError, strchr, b"abcdef") def test_without_prototype(self): dll = CDLL(_ctypes_test.__file__) Modified: python/branches/py3k/Lib/ctypes/test/test_slicing.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_slicing.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_slicing.py Fri Sep 4 20:24:41 2009 @@ -109,7 +109,7 @@ dll.my_strdup.errcheck = errcheck try: res = dll.my_strdup(s) - self.assertEqual(res, s.decode()) + self.assertEqual(res, s) finally: del dll.my_strdup.errcheck Modified: python/branches/py3k/Lib/ctypes/test/test_stringptr.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_stringptr.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_stringptr.py Fri Sep 4 20:24:41 2009 @@ -35,10 +35,10 @@ # c_char_p and Python string is compatible # c_char_p and c_buffer is NOT compatible self.assertEqual(x.str, None) - x.str = "Hello, World" - self.assertEqual(x.str, "Hello, World") - b = c_buffer("Hello, World") - self.assertRaises(TypeError, setattr, x, "str", b) + x.str = b"Hello, World" + self.assertEqual(x.str, b"Hello, World") + b = c_buffer(b"Hello, World") + self.assertRaises(TypeError, setattr, x, b"str", b) def test_functions(self): @@ -48,15 +48,15 @@ # c_char_p and Python string is compatible # c_char_p and c_buffer are now compatible strchr.argtypes = c_char_p, c_char - self.assertEqual(strchr("abcdef", "c"), "cdef") - self.assertEqual(strchr(c_buffer("abcdef"), "c"), "cdef") + self.assertEqual(strchr(b"abcdef", b"c"), b"cdef") + self.assertEqual(strchr(c_buffer(b"abcdef"), b"c"), b"cdef") # POINTER(c_char) and Python string is NOT compatible # POINTER(c_char) and c_buffer() is compatible strchr.argtypes = POINTER(c_char), c_char - buf = c_buffer("abcdef") - self.assertEqual(strchr(buf, "c"), "cdef") - self.assertEqual(strchr("abcdef", "c"), "cdef") + buf = c_buffer(b"abcdef") + self.assertEqual(strchr(buf, b"c"), b"cdef") + self.assertEqual(strchr(b"abcdef", b"c"), b"cdef") # XXX These calls are dangerous, because the first argument # to strchr is no longer valid after the function returns! 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 Fri Sep 4 20:24:41 2009 @@ -94,15 +94,15 @@ def test_ascii_ignore(self): ctypes.set_conversion_mode("ascii", "ignore") - self.assertEqual(func("abc"), "abc") - self.assertEqual(func("abc"), "abc") - self.assertEqual(func("\xe4\xf6\xfc\xdf"), "") + self.assertEqual(func("abc"), b"abc") + self.assertEqual(func("abc"), b"abc") + self.assertEqual(func("\xe4\xf6\xfc\xdf"), b"") def test_ascii_replace(self): ctypes.set_conversion_mode("ascii", "replace") - self.assertEqual(func("abc"), "abc") - self.assertEqual(func("abc"), "abc") - self.assertEqual(func("\xe4\xf6\xfc\xdf"), "????") + self.assertEqual(func("abc"), b"abc") + self.assertEqual(func("abc"), b"abc") + self.assertEqual(func("\xe4\xf6\xfc\xdf"), b"????") def test_buffers(self): ctypes.set_conversion_mode("ascii", "strict") Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Sep 4 20:24:41 2009 @@ -68,6 +68,8 @@ Library ------- +- Issue #6239: ctypes.c_char_p return value must return bytes. + - Issue #6838: Use a list to accumulate the value instead of repeatedly concatenating strings in http.client's HTTPResponse._read_chunked providing a significant speed increase Modified: python/branches/py3k/Modules/_ctypes/cfield.c ============================================================================== --- python/branches/py3k/Modules/_ctypes/cfield.c (original) +++ python/branches/py3k/Modules/_ctypes/cfield.c Fri Sep 4 20:24:41 2009 @@ -1428,7 +1428,8 @@ return NULL; } #endif - return PyUnicode_FromString(*(char **)ptr); + return PyBytes_FromStringAndSize(*(char **)ptr, + strlen(*(char **)ptr)); } else { Py_INCREF(Py_None); return Py_None; From python-checkins at python.org Fri Sep 4 20:37:04 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 04 Sep 2009 18:37:04 -0000 Subject: [Python-checkins] r74665 - in python/branches/release31-maint: Lib/ctypes/test/test_cast.py Lib/ctypes/test/test_funcptr.py Lib/ctypes/test/test_functions.py Lib/ctypes/test/test_incomplete.py Lib/ctypes/test/test_memfunctions.py Lib/ctypes/test/test_objects.py Lib/ctypes/test/test_pointers.py Lib/ctypes/test/test_prototypes.py Lib/ctypes/test/test_random_things.py Lib/ctypes/test/test_returnfuncptrs.py Lib/ctypes/test/test_slicing.py Lib/ctypes/test/test_stringptr.py Lib/ctypes/test/test_unicode.py Misc/NEWS Modules/_ctypes/cfield.c Message-ID: Author: thomas.heller Date: Fri Sep 4 20:37:03 2009 New Revision: 74665 Log: Merged revisions 74664 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74664 | thomas.heller | 2009-09-04 20:24:41 +0200 (Fr, 04 Sep 2009) | 1 line Issue 6239: ctypes.c_char_p return value must return bytes. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/ctypes/test/test_cast.py python/branches/release31-maint/Lib/ctypes/test/test_funcptr.py python/branches/release31-maint/Lib/ctypes/test/test_functions.py python/branches/release31-maint/Lib/ctypes/test/test_incomplete.py python/branches/release31-maint/Lib/ctypes/test/test_memfunctions.py python/branches/release31-maint/Lib/ctypes/test/test_objects.py python/branches/release31-maint/Lib/ctypes/test/test_pointers.py python/branches/release31-maint/Lib/ctypes/test/test_prototypes.py python/branches/release31-maint/Lib/ctypes/test/test_random_things.py python/branches/release31-maint/Lib/ctypes/test/test_returnfuncptrs.py python/branches/release31-maint/Lib/ctypes/test/test_slicing.py python/branches/release31-maint/Lib/ctypes/test/test_stringptr.py python/branches/release31-maint/Lib/ctypes/test/test_unicode.py python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Modules/_ctypes/cfield.c Modified: python/branches/release31-maint/Lib/ctypes/test/test_cast.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_cast.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_cast.py Fri Sep 4 20:37:03 2009 @@ -73,7 +73,7 @@ # This didn't work: bad argument to internal function s = c_char_p("hiho") self.assertEqual(cast(cast(s, c_void_p), c_char_p).value, - "hiho") + b"hiho") try: c_wchar_p Modified: python/branches/release31-maint/Lib/ctypes/test/test_funcptr.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_funcptr.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_funcptr.py Fri Sep 4 20:37:03 2009 @@ -97,8 +97,8 @@ strchr = lib.my_strchr strchr.restype = c_char_p strchr.argtypes = (c_char_p, c_char) - self.assertEqual(strchr("abcdefghi", "b"), "bcdefghi") - self.assertEqual(strchr("abcdefghi", "x"), None) + self.assertEqual(strchr(b"abcdefghi", b"b"), b"bcdefghi") + self.assertEqual(strchr(b"abcdefghi", b"x"), None) strtok = lib.my_strtok @@ -111,16 +111,16 @@ size = len(init) + 1 return (c_char*size)(*init) - s = "a\nb\nc" + s = b"a\nb\nc" b = c_string(s) ## b = (c_char * (len(s)+1))() ## b.value = s ## b = c_string(s) - self.assertEqual(strtok(b, b"\n"), "a") - self.assertEqual(strtok(None, b"\n"), "b") - self.assertEqual(strtok(None, b"\n"), "c") + self.assertEqual(strtok(b, b"\n"), b"a") + self.assertEqual(strtok(None, b"\n"), b"b") + self.assertEqual(strtok(None, b"\n"), b"c") self.assertEqual(strtok(None, b"\n"), None) if __name__ == '__main__': Modified: python/branches/release31-maint/Lib/ctypes/test/test_functions.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_functions.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_functions.py Fri Sep 4 20:37:03 2009 @@ -177,7 +177,7 @@ f.argtypes = None f.restype = c_char_p result = f(b"123") - self.assertEqual(result, "123") + self.assertEqual(result, b"123") result = f(None) self.assertEqual(result, None) Modified: python/branches/release31-maint/Lib/ctypes/test/test_incomplete.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_incomplete.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_incomplete.py Fri Sep 4 20:37:03 2009 @@ -17,9 +17,9 @@ SetPointerType(lpcell, cell) c1 = cell() - c1.name = "foo" + c1.name = b"foo" c2 = cell() - c2.name = "bar" + c2.name = b"bar" c1.next = pointer(c2) c2.next = pointer(c1) @@ -30,7 +30,7 @@ for i in range(8): result.append(p.name) p = p.next[0] - self.assertEqual(result, ["foo", "bar"] * 4) + self.assertEqual(result, [b"foo", b"bar"] * 4) # to not leak references, we must clean _pointer_type_cache from ctypes import _pointer_type_cache Modified: python/branches/release31-maint/Lib/ctypes/test/test_memfunctions.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_memfunctions.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_memfunctions.py Fri Sep 4 20:37:03 2009 @@ -37,7 +37,7 @@ def test_cast(self): a = (c_ubyte * 32)(*map(ord, "abcdef")) - self.assertEqual(cast(a, c_char_p).value, "abcdef") + self.assertEqual(cast(a, c_char_p).value, b"abcdef") self.assertEqual(cast(a, POINTER(c_byte))[:7], [97, 98, 99, 100, 101, 102, 0]) self.assertEqual(cast(a, POINTER(c_byte))[:7:], Modified: python/branches/release31-maint/Lib/ctypes/test/test_objects.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_objects.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_objects.py Fri Sep 4 20:37:03 2009 @@ -24,7 +24,7 @@ >>> array._objects {'4': b'foo bar'} >>> array[4] -'foo bar' +b'foo bar' >>> It gets more complicated when the ctypes instance itself is contained Modified: python/branches/release31-maint/Lib/ctypes/test/test_pointers.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_pointers.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_pointers.py Fri Sep 4 20:37:03 2009 @@ -140,10 +140,10 @@ func.restype = c_char_p argv = (c_char_p * 2)() argc = c_int( 2 ) - argv[0] = 'hello' - argv[1] = 'world' + argv[0] = b'hello' + argv[1] = b'world' result = func( byref(argc), argv ) - assert result == 'world', result + self.assertEqual(result, b'world') def test_bug_1467852(self): # http://sourceforge.net/tracker/?func=detail&atid=532154&aid=1467852&group_id=71702 Modified: python/branches/release31-maint/Lib/ctypes/test/test_prototypes.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_prototypes.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_prototypes.py Fri Sep 4 20:37:03 2009 @@ -92,14 +92,14 @@ func.argtypes = POINTER(c_char), self.assertEqual(None, func(None)) - self.assertEqual("123", func("123")) + self.assertEqual(b"123", func(b"123")) self.assertEqual(None, func(c_char_p(None))) - self.assertEqual("123", func(c_char_p("123"))) + self.assertEqual(b"123", func(c_char_p(b"123"))) - self.assertEqual("123", func(c_buffer("123"))) - ca = c_char("a") - self.assertEqual("a", func(pointer(ca))[0]) - self.assertEqual("a", func(byref(ca))[0]) + self.assertEqual(b"123", func(c_buffer(b"123"))) + ca = c_char(b"a") + self.assertEqual(ord(b"a"), func(pointer(ca))[0]) + self.assertEqual(ord(b"a"), func(byref(ca))[0]) def test_c_char_p_arg(self): func = testdll._testfunc_p_p @@ -107,14 +107,14 @@ func.argtypes = c_char_p, self.assertEqual(None, func(None)) - self.assertEqual("123", func("123")) + self.assertEqual(b"123", func(b"123")) self.assertEqual(None, func(c_char_p(None))) - self.assertEqual("123", func(c_char_p("123"))) + self.assertEqual(b"123", func(c_char_p(b"123"))) - self.assertEqual("123", func(c_buffer("123"))) - ca = c_char("a") - self.assertEqual("a", func(pointer(ca))[0]) - self.assertEqual("a", func(byref(ca))[0]) + self.assertEqual(b"123", func(c_buffer(b"123"))) + ca = c_char(b"a") + self.assertEqual(ord(b"a"), func(pointer(ca))[0]) + self.assertEqual(ord(b"a"), func(byref(ca))[0]) def test_c_void_p_arg(self): func = testdll._testfunc_p_p @@ -122,14 +122,14 @@ func.argtypes = c_void_p, self.assertEqual(None, func(None)) - self.assertEqual("123", func(b"123")) - self.assertEqual("123", func(c_char_p("123"))) + self.assertEqual(b"123", func(b"123")) + self.assertEqual(b"123", func(c_char_p(b"123"))) self.assertEqual(None, func(c_char_p(None))) - self.assertEqual("123", func(c_buffer("123"))) + self.assertEqual(b"123", func(c_buffer(b"123"))) ca = c_char("a") - self.assertEqual("a", func(pointer(ca))[0]) - self.assertEqual("a", func(byref(ca))[0]) + self.assertEqual(ord(b"a"), func(pointer(ca))[0]) + self.assertEqual(ord(b"a"), func(byref(ca))[0]) func(byref(c_int())) func(pointer(c_int())) Modified: python/branches/release31-maint/Lib/ctypes/test/test_random_things.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_random_things.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_random_things.py Fri Sep 4 20:37:03 2009 @@ -69,7 +69,7 @@ out = self.capture_stderr(cb, "spam") self.assertEqual(out.splitlines()[-1], "TypeError: " - "unsupported operand type(s) for /: 'int' and 'str'") + "unsupported operand type(s) for /: 'int' and 'bytes'") if __name__ == '__main__': unittest.main() Modified: python/branches/release31-maint/Lib/ctypes/test/test_returnfuncptrs.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_returnfuncptrs.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_returnfuncptrs.py Fri Sep 4 20:37:03 2009 @@ -12,12 +12,12 @@ get_strchr = dll.get_strchr get_strchr.restype = CFUNCTYPE(c_char_p, c_char_p, c_char) strchr = get_strchr() - self.assertEqual(strchr("abcdef", "b"), "bcdef") - self.assertEqual(strchr("abcdef", "x"), None) - self.assertEqual(strchr("abcdef", 98), "bcdef") - self.assertEqual(strchr("abcdef", 107), None) - self.assertRaises(ArgumentError, strchr, "abcdef", 3.0) - self.assertRaises(TypeError, strchr, "abcdef") + self.assertEqual(strchr(b"abcdef", b"b"), b"bcdef") + self.assertEqual(strchr(b"abcdef", b"x"), None) + self.assertEqual(strchr(b"abcdef", 98), b"bcdef") + self.assertEqual(strchr(b"abcdef", 107), None) + self.assertRaises(ArgumentError, strchr, b"abcdef", 3.0) + self.assertRaises(TypeError, strchr, b"abcdef") def test_without_prototype(self): dll = CDLL(_ctypes_test.__file__) Modified: python/branches/release31-maint/Lib/ctypes/test/test_slicing.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_slicing.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_slicing.py Fri Sep 4 20:37:03 2009 @@ -109,7 +109,7 @@ dll.my_strdup.errcheck = errcheck try: res = dll.my_strdup(s) - self.assertEqual(res, s.decode()) + self.assertEqual(res, s) finally: del dll.my_strdup.errcheck Modified: python/branches/release31-maint/Lib/ctypes/test/test_stringptr.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_stringptr.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_stringptr.py Fri Sep 4 20:37:03 2009 @@ -35,10 +35,10 @@ # c_char_p and Python string is compatible # c_char_p and c_buffer is NOT compatible self.assertEqual(x.str, None) - x.str = "Hello, World" - self.assertEqual(x.str, "Hello, World") - b = c_buffer("Hello, World") - self.assertRaises(TypeError, setattr, x, "str", b) + x.str = b"Hello, World" + self.assertEqual(x.str, b"Hello, World") + b = c_buffer(b"Hello, World") + self.assertRaises(TypeError, setattr, x, b"str", b) def test_functions(self): @@ -48,15 +48,15 @@ # c_char_p and Python string is compatible # c_char_p and c_buffer are now compatible strchr.argtypes = c_char_p, c_char - self.assertEqual(strchr("abcdef", "c"), "cdef") - self.assertEqual(strchr(c_buffer("abcdef"), "c"), "cdef") + self.assertEqual(strchr(b"abcdef", b"c"), b"cdef") + self.assertEqual(strchr(c_buffer(b"abcdef"), b"c"), b"cdef") # POINTER(c_char) and Python string is NOT compatible # POINTER(c_char) and c_buffer() is compatible strchr.argtypes = POINTER(c_char), c_char - buf = c_buffer("abcdef") - self.assertEqual(strchr(buf, "c"), "cdef") - self.assertEqual(strchr("abcdef", "c"), "cdef") + buf = c_buffer(b"abcdef") + self.assertEqual(strchr(buf, b"c"), b"cdef") + self.assertEqual(strchr(b"abcdef", b"c"), b"cdef") # XXX These calls are dangerous, because the first argument # to strchr is no longer valid after the function returns! Modified: python/branches/release31-maint/Lib/ctypes/test/test_unicode.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_unicode.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_unicode.py Fri Sep 4 20:37:03 2009 @@ -94,15 +94,15 @@ def test_ascii_ignore(self): ctypes.set_conversion_mode("ascii", "ignore") - self.assertEqual(func("abc"), "abc") - self.assertEqual(func("abc"), "abc") - self.assertEqual(func("\xe4\xf6\xfc\xdf"), "") + self.assertEqual(func("abc"), b"abc") + self.assertEqual(func("abc"), b"abc") + self.assertEqual(func("\xe4\xf6\xfc\xdf"), b"") def test_ascii_replace(self): ctypes.set_conversion_mode("ascii", "replace") - self.assertEqual(func("abc"), "abc") - self.assertEqual(func("abc"), "abc") - self.assertEqual(func("\xe4\xf6\xfc\xdf"), "????") + self.assertEqual(func("abc"), b"abc") + self.assertEqual(func("abc"), b"abc") + self.assertEqual(func("\xe4\xf6\xfc\xdf"), b"????") def test_buffers(self): ctypes.set_conversion_mode("ascii", "strict") Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Sep 4 20:37:03 2009 @@ -50,6 +50,8 @@ Library ------- +- Issue #6239: ctypes.c_char_p return value must return bytes. + - Issue #6838: Use a list to accumulate the value instead of repeatedly concatenating strings in http.client's HTTPResponse._read_chunked providing a significant speed increase Modified: python/branches/release31-maint/Modules/_ctypes/cfield.c ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/cfield.c (original) +++ python/branches/release31-maint/Modules/_ctypes/cfield.c Fri Sep 4 20:37:03 2009 @@ -1428,7 +1428,8 @@ return NULL; } #endif - return PyUnicode_FromString(*(char **)ptr); + return PyBytes_FromStringAndSize(*(char **)ptr, + strlen(*(char **)ptr)); } else { Py_INCREF(Py_None); return Py_None; From benjamin at python.org Fri Sep 4 22:27:26 2009 From: benjamin at python.org (Benjamin Peterson) Date: Fri, 4 Sep 2009 15:27:26 -0500 Subject: [Python-checkins] r74657 - in python/branches/release26-maint: Lib/httplib.py Misc/NEWS In-Reply-To: <4AA14CFD.5060603@v.loewis.de> References: <4AA14CFD.5060603@v.loewis.de> Message-ID: <1afaf6160909041327s41429258ubf1215e055a9efa9@mail.gmail.com> 2009/9/4 "Martin v. L?wis" : >> Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. > > Can you please use svnmerge when merging between branches? > > Regards, > Martin > > P.S. CC'ing, in case you are not subscribed to python-checkins. And if you aren't subscribed, please do. -- Regards, Benjamin From nnorwitz at gmail.com Fri Sep 4 23:42:13 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 4 Sep 2009 17:42:13 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090904214213.GA4083@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 0, -339] references, sum=-339 test_urllib2_localnet leaked [-280, 0, 0] references, sum=-280 Less important issues: ---------------------- test_cmd_line leaked [25, 0, 0] references, sum=25 test_file2k leaked [-78, 80, -80] references, sum=-78 test_smtplib leaked [-88, 0, 0] references, sum=-88 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, -8, 0] references, sum=-8 From ziade.tarek at gmail.com Sat Sep 5 00:35:41 2009 From: ziade.tarek at gmail.com (=?ISO-8859-1?Q?Tarek_Ziad=E9?=) Date: Sat, 5 Sep 2009 00:35:41 +0200 Subject: [Python-checkins] Python Regression Test Failures refleak (2) In-Reply-To: <20090904214213.GA4083@python.psfb.org> References: <20090904214213.GA4083@python.psfb.org> Message-ID: <94bdd2610909041535n6d9391a3jcb5916b40b6948bf@mail.gmail.com> On Fri, Sep 4, 2009 at 11:42 PM, Neal Norwitz wrote: > More important issues: > ---------------------- > test_ssl leaked [0, 0, -339] references, sum=-339 > test_urllib2_localnet leaked [-280, 0, 0] references, sum=-280 Hi, I can see test_distutils in this list from time to time. But I can't reproduce the problem on my computer to try to solve it. I thaught it was because of the tests order, but build.sh doesn't seem to do a randomize test execution order. If anyone hase any useful hint or explanation/doc pointer to track those leaks.. Regards Tarek From python-checkins at python.org Sat Sep 5 11:04:14 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 05 Sep 2009 09:04:14 -0000 Subject: [Python-checkins] r74666 - python/trunk/Doc/library/stdtypes.rst Message-ID: Author: georg.brandl Date: Sat Sep 5 11:04:09 2009 New Revision: 74666 Log: #6841: remove duplicated word. 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 Sep 5 11:04:09 2009 @@ -2061,7 +2061,7 @@ :func:`update` accepts either another dictionary object or an iterable of key/value pairs (as a tuple or other iterable of length two). If keyword - arguments are specified, the dictionary is then is updated with those + arguments are specified, the dictionary is then updated with those key/value pairs: ``d.update(red=1, blue=2)``. .. versionchanged:: 2.4 From python-checkins at python.org Sat Sep 5 12:27:01 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 05 Sep 2009 10:27:01 -0000 Subject: [Python-checkins] r74667 - in python/trunk: configure configure.in pyconfig.h.in Message-ID: Author: mark.dickinson Date: Sat Sep 5 12:27:00 2009 New Revision: 74667 Log: Add configure-time checks for gamma and error functions. Modified: python/trunk/configure python/trunk/configure.in python/trunk/pyconfig.h.in Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Sat Sep 5 12:27:00 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74072 . +# From configure.in Revision: 74644 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -23366,7 +23366,105 @@ -for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round +for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +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 + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + +for ac_func in hypot lgamma log1p round tgamma do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Sat Sep 5 12:27:00 2009 @@ -3263,7 +3263,8 @@ [Define if tanh(-0.) is -0., or if platform doesn't have signed zeros]) fi -AC_CHECK_FUNCS([acosh asinh atanh copysign expm1 finite hypot log1p round]) +AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma]) +AC_CHECK_FUNCS([hypot lgamma log1p round tgamma]) AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include ]]) LIBS=$LIBS_SAVE Modified: python/trunk/pyconfig.h.in ============================================================================== --- python/trunk/pyconfig.h.in (original) +++ python/trunk/pyconfig.h.in Sat Sep 5 12:27:00 2009 @@ -165,6 +165,12 @@ /* Define if you have the 'epoll' functions. */ #undef HAVE_EPOLL +/* Define to 1 if you have the `erf' function. */ +#undef HAVE_ERF + +/* Define to 1 if you have the `erfc' function. */ +#undef HAVE_ERFC + /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H @@ -231,6 +237,9 @@ /* Define to 1 if you have the `gai_strerror' function. */ #undef HAVE_GAI_STRERROR +/* Define to 1 if you have the `gamma' function. */ +#undef HAVE_GAMMA + /* Define if you have the getaddrinfo function. */ #undef HAVE_GETADDRINFO @@ -357,6 +366,9 @@ /* Define to 1 if you have the `lchown' function. */ #undef HAVE_LCHOWN +/* Define to 1 if you have the `lgamma' function. */ +#undef HAVE_LGAMMA + /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL @@ -751,6 +763,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TERM_H +/* Define to 1 if you have the `tgamma' function. */ +#undef HAVE_TGAMMA + /* Define to 1 if you have the header file. */ #undef HAVE_THREAD_H From python-checkins at python.org Sat Sep 5 12:28:04 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 05 Sep 2009 10:28:04 -0000 Subject: [Python-checkins] r74668 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Sat Sep 5 12:28:04 2009 New Revision: 74668 Log: Blocked revisions 74667 via svnmerge ........ r74667 | mark.dickinson | 2009-09-05 11:27:00 +0100 (Sat, 05 Sep 2009) | 2 lines Add configure-time checks for gamma and error functions. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Sat Sep 5 12:36:24 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 05 Sep 2009 10:36:24 -0000 Subject: [Python-checkins] r74669 - in python/branches/py3k: configure configure.in pyconfig.h.in Message-ID: Author: mark.dickinson Date: Sat Sep 5 12:36:23 2009 New Revision: 74669 Log: Merged revisions 74667 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74667 | mark.dickinson | 2009-09-05 11:27:00 +0100 (Sat, 05 Sep 2009) | 2 lines Add configure-time checks for gamma and error functions. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/configure python/branches/py3k/configure.in python/branches/py3k/pyconfig.h.in Modified: python/branches/py3k/configure ============================================================================== --- python/branches/py3k/configure (original) +++ python/branches/py3k/configure Sat Sep 5 12:36:23 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74045 . +# From configure.in Revision: 74073 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.2. # @@ -23281,7 +23281,105 @@ -for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round +for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +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 + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + +for ac_func in hypot lgamma log1p round tgamma do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 Modified: python/branches/py3k/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Sat Sep 5 12:36:23 2009 @@ -3260,7 +3260,8 @@ [Define if tanh(-0.) is -0., or if platform doesn't have signed zeros]) fi -AC_CHECK_FUNCS([acosh asinh atanh copysign expm1 finite hypot log1p round]) +AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma]) +AC_CHECK_FUNCS([hypot lgamma log1p round tgamma]) AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include ]]) LIBS=$LIBS_SAVE Modified: python/branches/py3k/pyconfig.h.in ============================================================================== --- python/branches/py3k/pyconfig.h.in (original) +++ python/branches/py3k/pyconfig.h.in Sat Sep 5 12:36:23 2009 @@ -178,6 +178,12 @@ /* Define if you have the 'epoll' functions. */ #undef HAVE_EPOLL +/* Define to 1 if you have the `erf' function. */ +#undef HAVE_ERF + +/* Define to 1 if you have the `erfc' function. */ +#undef HAVE_ERFC + /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H @@ -244,6 +250,9 @@ /* Define to 1 if you have the `gai_strerror' function. */ #undef HAVE_GAI_STRERROR +/* Define to 1 if you have the `gamma' function. */ +#undef HAVE_GAMMA + /* Define if we can use gcc inline assembler to get and set x87 control word */ #undef HAVE_GCC_ASM_FOR_X87 @@ -374,6 +383,9 @@ /* Define to 1 if you have the `lchown' function. */ #undef HAVE_LCHOWN +/* Define to 1 if you have the `lgamma' function. */ +#undef HAVE_LGAMMA + /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL @@ -774,6 +786,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TERM_H +/* Define to 1 if you have the `tgamma' function. */ +#undef HAVE_TGAMMA + /* Define to 1 if you have the header file. */ #undef HAVE_THREAD_H From python-checkins at python.org Sat Sep 5 12:37:04 2009 From: python-checkins at python.org (mark.dickinson) Date: Sat, 05 Sep 2009 10:37:04 -0000 Subject: [Python-checkins] r74670 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Sat Sep 5 12:37:04 2009 New Revision: 74670 Log: Blocked revisions 74669 via svnmerge ................ r74669 | mark.dickinson | 2009-09-05 11:36:23 +0100 (Sat, 05 Sep 2009) | 9 lines Merged revisions 74667 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74667 | mark.dickinson | 2009-09-05 11:27:00 +0100 (Sat, 05 Sep 2009) | 2 lines Add configure-time checks for gamma and error functions. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Sat Sep 5 18:47:18 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 05 Sep 2009 16:47:18 -0000 Subject: [Python-checkins] r74671 - python/trunk/Doc/library/warnings.rst Message-ID: Author: georg.brandl Date: Sat Sep 5 18:47:17 2009 New Revision: 74671 Log: #6843: add link from filterwarnings to where the meaning of the arguments is covered. 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 Sep 5 18:47:17 2009 @@ -1,4 +1,3 @@ - :mod:`warnings` --- Warning control =================================== @@ -129,16 +128,16 @@ +---------------+----------------------------------------------+ * *message* is a string containing a regular expression that the warning message - must match (the match is compiled to always be case-insensitive) + must match (the match is compiled to always be case-insensitive). * *category* is a class (a subclass of :exc:`Warning`) of which the warning - category must be a subclass in order to match + category must be a subclass in order to match. * *module* is a string containing a regular expression that the module name must - match (the match is compiled to be case-sensitive) + match (the match is compiled to be case-sensitive). * *lineno* is an integer that the line number where the warning occurred must - match, or ``0`` to match all line numbers + match, or ``0`` to match all line numbers. Since the :exc:`Warning` class is derived from the built-in :exc:`Exception` class, to turn a warning into an error we simply raise ``category(message)``. @@ -299,10 +298,11 @@ .. function:: formatwarning(message, category, filename, lineno[, line]) - Format a warning the standard way. This returns a string which may contain - embedded newlines and ends in a newline. *line* is - a line of source code to be included in the warning message; if *line* is not supplied, - :func:`formatwarning` will try to read the line specified by *filename* and *lineno*. + Format a warning the standard way. This returns a string which may contain + embedded newlines and ends in a newline. *line* is a line of source code to + be included in the warning message; if *line* is not supplied, + :func:`formatwarning` will try to read the line specified by *filename* and + *lineno*. .. versionchanged:: 2.6 Added the *line* argument. @@ -310,10 +310,11 @@ .. function:: filterwarnings(action[, message[, category[, module[, lineno[, append]]]]]) - Insert an entry into the list of warnings filters. The entry is inserted at the - front by default; if *append* is true, it is inserted at the end. This checks - the types of the arguments, compiles the message and module regular expressions, - and inserts them as a tuple in the list of warnings filters. Entries closer to + Insert an entry into the list of :ref:`warnings filter specifications + `. The entry is inserted at the front by default; if + *append* is true, it is inserted at the end. This checks the types of the + arguments, compiles the *message* and *module* regular expressions, and + inserts them as a tuple in the list of warnings filters. Entries closer to the front of the list override entries later in the list, if both match a particular warning. Omitted arguments default to a value that matches everything. @@ -321,10 +322,11 @@ .. function:: simplefilter(action[, category[, lineno[, append]]]) - Insert a simple entry into the list of warnings filters. The meaning of the - function parameters is as for :func:`filterwarnings`, but regular expressions - are not needed as the filter inserted always matches any message in any module - as long as the category and line number match. + Insert a simple entry into the list of :ref:`warnings filter specifications + `. The meaning of the function parameters is as for + :func:`filterwarnings`, but regular expressions are not needed as the filter + inserted always matches any message in any module as long as the category and + line number match. .. function:: resetwarnings() From nnorwitz at gmail.com Sat Sep 5 23:41:48 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sat, 5 Sep 2009 17:41:48 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090905214148.GA25460@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 0, -420] references, sum=-420 Less important issues: ---------------------- test_asynchat leaked [-130, 0, 0] references, sum=-130 test_file2k leaked [0, 0, 69] references, sum=69 test_smtplib leaked [-163, 0, 2] references, sum=-161 test_sys leaked [42, -21, -21] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, 0, -8] references, sum=-8 From python-checkins at python.org Sun Sep 6 12:00:32 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 06 Sep 2009 10:00:32 -0000 Subject: [Python-checkins] r74672 - in python/trunk: Lib/plat-mac/aepack.py Lib/plat-mac/applesingle.py Lib/plat-mac/buildtools.py Lib/plat-mac/macresource.py Lib/test/test_aepack.py Mac/scripts/BuildApplet.py Makefile.pre.in Misc/NEWS configure configure.in Message-ID: Author: ronald.oussoren Date: Sun Sep 6 12:00:26 2009 New Revision: 74672 Log: Fix build issues on OSX 10.6 (issue 6802) Modified: python/trunk/Lib/plat-mac/aepack.py python/trunk/Lib/plat-mac/applesingle.py python/trunk/Lib/plat-mac/buildtools.py python/trunk/Lib/plat-mac/macresource.py python/trunk/Lib/test/test_aepack.py python/trunk/Mac/scripts/BuildApplet.py python/trunk/Makefile.pre.in python/trunk/Misc/NEWS python/trunk/configure python/trunk/configure.in Modified: python/trunk/Lib/plat-mac/aepack.py ============================================================================== --- python/trunk/Lib/plat-mac/aepack.py (original) +++ python/trunk/Lib/plat-mac/aepack.py Sun Sep 6 12:00:26 2009 @@ -58,7 +58,11 @@ # Some python types we need in the packer: # AEDescType = AE.AEDescType -FSSType = Carbon.File.FSSpecType +try: + FSSType = Carbon.File.FSSpecType +except AttributeError: + class FSSType: + pass FSRefType = Carbon.File.FSRefType AliasType = Carbon.File.AliasType Modified: python/trunk/Lib/plat-mac/applesingle.py ============================================================================== --- python/trunk/Lib/plat-mac/applesingle.py (original) +++ python/trunk/Lib/plat-mac/applesingle.py Sun Sep 6 12:00:26 2009 @@ -119,8 +119,13 @@ if not hasattr(infile, 'read'): if isinstance(infile, Carbon.File.Alias): infile = infile.ResolveAlias()[0] - if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)): - infile = infile.as_pathname() + + if hasattr(Carbon.File, "FSSpec"): + if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)): + infile = infile.as_pathname() + else: + if isinstance(infile, Carbon.File.FSRef): + infile = infile.as_pathname() infile = open(infile, 'rb') asfile = AppleSingle(infile, verbose=verbose) Modified: python/trunk/Lib/plat-mac/buildtools.py ============================================================================== --- python/trunk/Lib/plat-mac/buildtools.py (original) +++ python/trunk/Lib/plat-mac/buildtools.py Sun Sep 6 12:00:26 2009 @@ -15,7 +15,10 @@ import MacOS import macostools import macresource -import EasyDialogs +try: + import EasyDialogs +except ImportError: + EasyDialogs = None import shutil @@ -67,9 +70,13 @@ rsrcname=None, others=[], raw=0, progress="default", destroot=""): if progress == "default": - progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120) - progress.label("Compiling...") - progress.inc(0) + if EasyDialogs is None: + print "Compiling %s"%(os.path.split(filename)[1],) + process = None + else: + progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120) + progress.label("Compiling...") + progress.inc(0) # check for the script name being longer than 32 chars. This may trigger a bug # on OSX that can destroy your sourcefile. if '#' in os.path.split(filename)[1]: @@ -119,7 +126,11 @@ if MacOS.runtimemodel == 'macho': raise BuildError, "No updating yet for MachO applets" if progress: - progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120) + if EasyDialogs is None: + print "Updating %s"%(os.path.split(filename)[1],) + progress = None + else: + progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120) else: progress = None if not output: Modified: python/trunk/Lib/plat-mac/macresource.py ============================================================================== --- python/trunk/Lib/plat-mac/macresource.py (original) +++ python/trunk/Lib/plat-mac/macresource.py Sun Sep 6 12:00:26 2009 @@ -77,52 +77,38 @@ def open_pathname(pathname, verbose=0): """Open a resource file given by pathname, possibly decoding an AppleSingle file""" + # No resource fork. We may be on OSX, and this may be either + # a data-fork based resource file or a AppleSingle file + # from the CVS repository. try: - refno = Res.FSpOpenResFile(pathname, 1) + refno = Res.FSOpenResourceFile(pathname, u'', 1) except Res.Error, arg: - if arg[0] in (-37, -39): - # No resource fork. We may be on OSX, and this may be either - # a data-fork based resource file or a AppleSingle file - # from the CVS repository. - try: - refno = Res.FSOpenResourceFile(pathname, u'', 1) - except Res.Error, arg: - if arg[0] != -199: - # -199 is "bad resource map" - raise - else: - return refno - # Finally try decoding an AppleSingle file - pathname = _decode(pathname, verbose=verbose) - refno = Res.FSOpenResourceFile(pathname, u'', 1) - else: + if arg[0] != -199: + # -199 is "bad resource map" raise - return refno + else: + return refno + # Finally try decoding an AppleSingle file + pathname = _decode(pathname, verbose=verbose) + refno = Res.FSOpenResourceFile(pathname, u'', 1) def resource_pathname(pathname, verbose=0): """Return the pathname for a resource file (either DF or RF based). If the pathname given already refers to such a file simply return it, otherwise first decode it.""" + # No resource fork. We may be on OSX, and this may be either + # a data-fork based resource file or a AppleSingle file + # from the CVS repository. try: - refno = Res.FSpOpenResFile(pathname, 1) - Res.CloseResFile(refno) + refno = Res.FSOpenResourceFile(pathname, u'', 1) except Res.Error, arg: - if arg[0] in (-37, -39): - # No resource fork. We may be on OSX, and this may be either - # a data-fork based resource file or a AppleSingle file - # from the CVS repository. - try: - refno = Res.FSOpenResourceFile(pathname, u'', 1) - except Res.Error, arg: - if arg[0] != -199: - # -199 is "bad resource map" - raise - else: - return refno - # Finally try decoding an AppleSingle file - pathname = _decode(pathname, verbose=verbose) - else: + if arg[0] != -199: + # -199 is "bad resource map" raise + else: + return refno + # Finally try decoding an AppleSingle file + pathname = _decode(pathname, verbose=verbose) return pathname def open_error_resource(): Modified: python/trunk/Lib/test/test_aepack.py ============================================================================== --- python/trunk/Lib/test/test_aepack.py (original) +++ python/trunk/Lib/test/test_aepack.py Sun Sep 6 12:00:26 2009 @@ -60,6 +60,9 @@ import Carbon.File except: return + + if not hasattr(Carbon.File, "FSSpec"): + return o = Carbon.File.FSSpec(os.curdir) packed = aepack.pack(o) unpacked = aepack.unpack(packed) @@ -70,6 +73,8 @@ import Carbon.File except: return + if not hasattr(Carbon.File, "FSSpec"): + return o = Carbon.File.FSSpec(os.curdir).NewAliasMinimal() packed = aepack.pack(o) unpacked = aepack.unpack(packed) Modified: python/trunk/Mac/scripts/BuildApplet.py ============================================================================== --- python/trunk/Mac/scripts/BuildApplet.py (original) +++ python/trunk/Mac/scripts/BuildApplet.py Sun Sep 6 12:00:26 2009 @@ -12,7 +12,10 @@ import os import MacOS -import EasyDialogs +try: + import EasyDialogs +except ImportError: + EasyDialogs = None import buildtools import getopt @@ -32,7 +35,10 @@ try: buildapplet() except buildtools.BuildError, detail: - EasyDialogs.Message(detail) + if EasyDialogs is None: + print detail + else: + EasyDialogs.Message(detail) def buildapplet(): @@ -46,6 +52,10 @@ # Ask for source text if not specified in sys.argv[1:] if not sys.argv[1:]: + if EasyDialogs is None: + usage() + sys.exit(1) + filename = EasyDialogs.AskFileForOpen(message='Select Python source or applet:', typeList=('TEXT', 'APPL')) if not filename: Modified: python/trunk/Makefile.pre.in ============================================================================== --- python/trunk/Makefile.pre.in (original) +++ python/trunk/Makefile.pre.in Sun Sep 6 12:00:26 2009 @@ -770,6 +770,7 @@ (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)) -rm -f $(DESTDIR)$(BINDIR)/python-config (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config) + -test -d $(DESTDIR)$(LIBPC) || $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC) -rm -f $(DESTDIR)$(LIBPC)/python.pc (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python.pc) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sun Sep 6 12:00:26 2009 @@ -1189,6 +1189,8 @@ Build ----- +- Issue #6802: Fix build issues on MacOSX 10.6 + - Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6. - Issue 5390: Add uninstall icon independent of whether file Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Sun Sep 6 12:00:26 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74644 . +# From configure.in Revision: 74667 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -1911,7 +1911,6 @@ -ARCH_RUN_32BIT= UNIVERSAL_ARCHS="32-bit" @@ -3852,7 +3851,7 @@ { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -rm -f conftest* +rm -f -r conftest* @@ -4689,6 +4688,7 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" @@ -4714,12 +4714,22 @@ 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' + if test ${enable_universalsdk}; then + 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 + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -5381,7 +5391,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -5402,7 +5412,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -6500,7 +6510,7 @@ fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $was_it_defined" >&5 echo "${ECHO_T}$was_it_defined" >&6; } @@ -7030,7 +7040,7 @@ else ac_cv_type_uid_t=no fi -rm -f conftest* +rm -f -r conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 @@ -14457,13 +14467,15 @@ esac +ARCH_RUN_32BIT="" + case $ac_sys_system/$ac_sys_release in Darwin/[01567]\..*) LIBTOOL_CRUFT="-framework System -lcc_dynamic" if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -14475,7 +14487,93 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + if test "$cross_compiling" = yes; then + ac_osx_32bit=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(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 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 "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_osx_32bit=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 ) +ac_osx_32bit=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac @@ -15601,7 +15699,7 @@ else unistd_defines_pthreads=no fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 echo "${ECHO_T}$unistd_defines_pthreads" >&6; } @@ -17215,7 +17313,7 @@ $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f conftest* +rm -f -r conftest* ;; kame) @@ -17238,7 +17336,7 @@ ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-glibc) @@ -17259,7 +17357,7 @@ ipv6type=$i; ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-inet6) @@ -17297,7 +17395,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; v6d) @@ -17320,7 +17418,7 @@ ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; zeta) @@ -17342,7 +17440,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; esac @@ -25159,7 +25257,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi @@ -25429,7 +25527,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Sun Sep 6 12:00:26 2009 @@ -109,7 +109,6 @@ ]) AC_SUBST(UNIVERSALSDK) -ARCH_RUN_32BIT= AC_SUBST(ARCH_RUN_32BIT) UNIVERSAL_ARCHS="32-bit" @@ -947,6 +946,7 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" @@ -970,12 +970,22 @@ 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' + if test ${enable_universalsdk}; then + 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 + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -1508,6 +1518,8 @@ ;; esac + +ARCH_RUN_32BIT="" AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in Darwin/@<:@01567@:>@\..*) @@ -1515,7 +1527,7 @@ if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -1527,7 +1539,48 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + AC_TRY_RUN([[ + #include + int main(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 1; + } + ]], ac_osx_32bit=yes, + ac_osx_32bit=no, + ac_osx_32bit=no) + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac From python-checkins at python.org Sun Sep 6 12:03:32 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 10:03:32 -0000 Subject: [Python-checkins] r74673 - in python/trunk: Lib/test/test_bytes.py Misc/NEWS Objects/bytearrayobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 12:03:31 2009 New Revision: 74673 Log: Issue #6846: bytearray.pop was returning ints in the range [-128, 128) instead of [0, 256). Thanks Hagen F?rstenau for the report and fix. Modified: python/trunk/Lib/test/test_bytes.py python/trunk/Misc/NEWS python/trunk/Objects/bytearrayobject.c Modified: python/trunk/Lib/test/test_bytes.py ============================================================================== --- python/trunk/Lib/test/test_bytes.py (original) +++ python/trunk/Lib/test/test_bytes.py Sun Sep 6 12:03:31 2009 @@ -690,6 +690,8 @@ self.assertEqual(b.pop(-2), ord('r')) self.assertRaises(IndexError, lambda: b.pop(10)) self.assertRaises(OverflowError, lambda: bytearray().pop()) + # test for issue #6846 + self.assertEqual(bytearray(b'\xff').pop(), 0xff) def test_nosort(self): self.assertRaises(AttributeError, lambda: bytearray().sort()) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sun Sep 6 12:03:31 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6846: Fix bug where bytearray.pop() returns negative integers. + - classmethod no longer checks if its argument is callable. - Issue #6750: A text file opened with io.open() could duplicate its output Modified: python/trunk/Objects/bytearrayobject.c ============================================================================== --- python/trunk/Objects/bytearrayobject.c (original) +++ python/trunk/Objects/bytearrayobject.c Sun Sep 6 12:03:31 2009 @@ -2773,7 +2773,7 @@ if (PyByteArray_Resize((PyObject *)self, n - 1) < 0) return NULL; - return PyInt_FromLong(value); + return PyInt_FromLong((unsigned char)value); } PyDoc_STRVAR(remove__doc__, From python-checkins at python.org Sun Sep 6 12:05:28 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 10:05:28 -0000 Subject: [Python-checkins] r74674 - in python/branches/release26-maint: Lib/test/test_bytes.py Misc/NEWS Objects/bytearrayobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 12:05:28 2009 New Revision: 74674 Log: Merged revisions 74673 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74673 | mark.dickinson | 2009-09-06 11:03:31 +0100 (Sun, 06 Sep 2009) | 3 lines Issue #6846: bytearray.pop was returning ints in the range [-128, 128) instead of [0, 256). Thanks Hagen F?rstenau for the report and fix. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_bytes.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Objects/bytearrayobject.c Modified: python/branches/release26-maint/Lib/test/test_bytes.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_bytes.py (original) +++ python/branches/release26-maint/Lib/test/test_bytes.py Sun Sep 6 12:05:28 2009 @@ -691,6 +691,8 @@ self.assertEqual(b.pop(-2), ord('r')) self.assertRaises(IndexError, lambda: b.pop(10)) self.assertRaises(OverflowError, lambda: bytearray().pop()) + # test for issue #6846 + self.assertEqual(bytearray(b'\xff').pop(), 0xff) def test_nosort(self): self.assertRaises(AttributeError, lambda: bytearray().sort()) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sun Sep 6 12:05:28 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6846: Fix bug where bytearray.pop() returns negative integers. + - Issue #6707: dir() on an uninitialized module caused a crash. - Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. Modified: python/branches/release26-maint/Objects/bytearrayobject.c ============================================================================== --- python/branches/release26-maint/Objects/bytearrayobject.c (original) +++ python/branches/release26-maint/Objects/bytearrayobject.c Sun Sep 6 12:05:28 2009 @@ -2758,7 +2758,7 @@ if (PyByteArray_Resize((PyObject *)self, n - 1) < 0) return NULL; - return PyInt_FromLong(value); + return PyInt_FromLong((unsigned char)value); } PyDoc_STRVAR(remove__doc__, From python-checkins at python.org Sun Sep 6 12:19:24 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 10:19:24 -0000 Subject: [Python-checkins] r74675 - in python/branches/py3k: Lib/test/test_bytes.py Misc/NEWS Objects/bytearrayobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 12:19:23 2009 New Revision: 74675 Log: Merged revisions 74673 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74673 | mark.dickinson | 2009-09-06 11:03:31 +0100 (Sun, 06 Sep 2009) | 3 lines Issue #6846: bytearray.pop was returning ints in the range [-128, 128) instead of [0, 256). Thanks Hagen F?rstenau for the report and fix. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_bytes.py python/branches/py3k/Misc/NEWS python/branches/py3k/Objects/bytearrayobject.c 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 Sun Sep 6 12:19:23 2009 @@ -716,6 +716,8 @@ self.assertEqual(b.pop(-2), ord('r')) self.assertRaises(IndexError, lambda: b.pop(10)) self.assertRaises(OverflowError, lambda: bytearray().pop()) + # test for issue #6846 + self.assertEqual(bytearray(b'\xff').pop(), 0xff) def test_nosort(self): self.assertRaises(AttributeError, lambda: bytearray().sort()) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Sep 6 12:19:23 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6846: Fix bug where bytearray.pop() returns negative integers. + - Issue #6750: A text file opened with io.open() could duplicate its output when writing from multiple threads at the same time. Modified: python/branches/py3k/Objects/bytearrayobject.c ============================================================================== --- python/branches/py3k/Objects/bytearrayobject.c (original) +++ python/branches/py3k/Objects/bytearrayobject.c Sun Sep 6 12:19:23 2009 @@ -2705,7 +2705,7 @@ if (PyByteArray_Resize((PyObject *)self, n - 1) < 0) return NULL; - return PyLong_FromLong(value); + return PyLong_FromLong((unsigned char)value); } PyDoc_STRVAR(remove__doc__, From python-checkins at python.org Sun Sep 6 12:20:24 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 10:20:24 -0000 Subject: [Python-checkins] r74676 - in python/branches/release31-maint: Lib/test/test_bytes.py Misc/NEWS Objects/bytearrayobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 12:20:23 2009 New Revision: 74676 Log: Merged revisions 74675 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74675 | mark.dickinson | 2009-09-06 11:19:23 +0100 (Sun, 06 Sep 2009) | 10 lines Merged revisions 74673 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74673 | mark.dickinson | 2009-09-06 11:03:31 +0100 (Sun, 06 Sep 2009) | 3 lines Issue #6846: bytearray.pop was returning ints in the range [-128, 128) instead of [0, 256). Thanks Hagen F?rstenau for the report and fix. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/test/test_bytes.py python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Objects/bytearrayobject.c Modified: python/branches/release31-maint/Lib/test/test_bytes.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_bytes.py (original) +++ python/branches/release31-maint/Lib/test/test_bytes.py Sun Sep 6 12:20:23 2009 @@ -716,6 +716,8 @@ self.assertEqual(b.pop(-2), ord('r')) self.assertRaises(IndexError, lambda: b.pop(10)) self.assertRaises(OverflowError, lambda: bytearray().pop()) + # test for issue #6846 + self.assertEqual(bytearray(b'\xff').pop(), 0xff) def test_nosort(self): self.assertRaises(AttributeError, lambda: bytearray().sort()) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sun Sep 6 12:20:23 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6846: Fix bug where bytearray.pop() returns negative integers. + - Issue #6750: A text file opened with io.open() could duplicate its output when writing from multiple threads at the same time. Modified: python/branches/release31-maint/Objects/bytearrayobject.c ============================================================================== --- python/branches/release31-maint/Objects/bytearrayobject.c (original) +++ python/branches/release31-maint/Objects/bytearrayobject.c Sun Sep 6 12:20:23 2009 @@ -2705,7 +2705,7 @@ if (PyByteArray_Resize((PyObject *)self, n - 1) < 0) return NULL; - return PyLong_FromLong(value); + return PyLong_FromLong((unsigned char)value); } PyDoc_STRVAR(remove__doc__, From python-checkins at python.org Sun Sep 6 12:32:22 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 10:32:22 -0000 Subject: [Python-checkins] r74677 - python/trunk/Objects/bytearrayobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 12:32:21 2009 New Revision: 74677 Log: Issue #6847: s/bytes/bytearray/ in some bytearray error messages. Thanks Hagen F?rstenau. Modified: python/trunk/Objects/bytearrayobject.c Modified: python/trunk/Objects/bytearrayobject.c ============================================================================== --- python/trunk/Objects/bytearrayobject.c (original) +++ python/trunk/Objects/bytearrayobject.c Sun Sep 6 12:32:21 2009 @@ -2620,7 +2620,7 @@ if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (!_getbytevalue(value, &ival)) @@ -2655,7 +2655,7 @@ return NULL; if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (PyByteArray_Resize((PyObject *)self, n + 1) < 0) @@ -2756,7 +2756,7 @@ if (n == 0) { PyErr_SetString(PyExc_OverflowError, - "cannot pop an empty bytes"); + "cannot pop an empty bytearray"); return NULL; } if (where < 0) @@ -2794,7 +2794,7 @@ break; } if (where == n) { - PyErr_SetString(PyExc_ValueError, "value not found in bytes"); + PyErr_SetString(PyExc_ValueError, "value not found in bytearray"); return NULL; } if (!_canresize(self)) From python-checkins at python.org Sun Sep 6 12:33:12 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 10:33:12 -0000 Subject: [Python-checkins] r74678 - in python/branches/release26-maint: Objects/bytearrayobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 12:33:12 2009 New Revision: 74678 Log: Merged revisions 74677 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74677 | mark.dickinson | 2009-09-06 11:32:21 +0100 (Sun, 06 Sep 2009) | 1 line Issue #6847: s/bytes/bytearray/ in some bytearray error messages. Thanks Hagen F?rstenau. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Objects/bytearrayobject.c Modified: python/branches/release26-maint/Objects/bytearrayobject.c ============================================================================== --- python/branches/release26-maint/Objects/bytearrayobject.c (original) +++ python/branches/release26-maint/Objects/bytearrayobject.c Sun Sep 6 12:33:12 2009 @@ -2605,7 +2605,7 @@ if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (!_getbytevalue(value, &ival)) @@ -2640,7 +2640,7 @@ return NULL; if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (PyByteArray_Resize((PyObject *)self, n + 1) < 0) @@ -2741,7 +2741,7 @@ if (n == 0) { PyErr_SetString(PyExc_OverflowError, - "cannot pop an empty bytes"); + "cannot pop an empty bytearray"); return NULL; } if (where < 0) @@ -2779,7 +2779,7 @@ break; } if (where == n) { - PyErr_SetString(PyExc_ValueError, "value not found in bytes"); + PyErr_SetString(PyExc_ValueError, "value not found in bytearray"); return NULL; } if (!_canresize(self)) From python-checkins at python.org Sun Sep 6 12:34:48 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 10:34:48 -0000 Subject: [Python-checkins] r74679 - in python/branches/py3k: Objects/bytearrayobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 12:34:47 2009 New Revision: 74679 Log: Merged revisions 74677 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74677 | mark.dickinson | 2009-09-06 11:32:21 +0100 (Sun, 06 Sep 2009) | 1 line Issue #6847: s/bytes/bytearray/ in some bytearray error messages. Thanks Hagen F?rstenau. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Objects/bytearrayobject.c Modified: python/branches/py3k/Objects/bytearrayobject.c ============================================================================== --- python/branches/py3k/Objects/bytearrayobject.c (original) +++ python/branches/py3k/Objects/bytearrayobject.c Sun Sep 6 12:34:47 2009 @@ -2552,7 +2552,7 @@ if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (!_getbytevalue(value, &ival)) @@ -2587,7 +2587,7 @@ return NULL; if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (PyByteArray_Resize((PyObject *)self, n + 1) < 0) @@ -2688,7 +2688,7 @@ if (n == 0) { PyErr_SetString(PyExc_OverflowError, - "cannot pop an empty bytes"); + "cannot pop an empty bytearray"); return NULL; } if (where < 0) @@ -2726,7 +2726,7 @@ break; } if (where == n) { - PyErr_SetString(PyExc_ValueError, "value not found in bytes"); + PyErr_SetString(PyExc_ValueError, "value not found in bytearray"); return NULL; } if (!_canresize(self)) From python-checkins at python.org Sun Sep 6 12:35:38 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 10:35:38 -0000 Subject: [Python-checkins] r74680 - in python/branches/release31-maint: Objects/bytearrayobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 12:35:38 2009 New Revision: 74680 Log: Merged revisions 74679 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74679 | mark.dickinson | 2009-09-06 11:34:47 +0100 (Sun, 06 Sep 2009) | 9 lines Merged revisions 74677 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74677 | mark.dickinson | 2009-09-06 11:32:21 +0100 (Sun, 06 Sep 2009) | 1 line Issue #6847: s/bytes/bytearray/ in some bytearray error messages. Thanks Hagen F?rstenau. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Objects/bytearrayobject.c Modified: python/branches/release31-maint/Objects/bytearrayobject.c ============================================================================== --- python/branches/release31-maint/Objects/bytearrayobject.c (original) +++ python/branches/release31-maint/Objects/bytearrayobject.c Sun Sep 6 12:35:38 2009 @@ -2552,7 +2552,7 @@ if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (!_getbytevalue(value, &ival)) @@ -2587,7 +2587,7 @@ return NULL; if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (PyByteArray_Resize((PyObject *)self, n + 1) < 0) @@ -2688,7 +2688,7 @@ if (n == 0) { PyErr_SetString(PyExc_OverflowError, - "cannot pop an empty bytes"); + "cannot pop an empty bytearray"); return NULL; } if (where < 0) @@ -2726,7 +2726,7 @@ break; } if (where == n) { - PyErr_SetString(PyExc_ValueError, "value not found in bytes"); + PyErr_SetString(PyExc_ValueError, "value not found in bytearray"); return NULL; } if (!_canresize(self)) From python-checkins at python.org Sun Sep 6 12:54:28 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 06 Sep 2009 10:54:28 -0000 Subject: [Python-checkins] r74681 - in python/branches/release26-maint: Lib/plat-mac/aepack.py Lib/plat-mac/applesingle.py Lib/plat-mac/buildtools.py Lib/plat-mac/macresource.py Lib/test/test_aepack.py Mac/scripts/BuildApplet.py Misc/NEWS configure.in Message-ID: Author: ronald.oussoren Date: Sun Sep 6 12:54:28 2009 New Revision: 74681 Log: Merged revisions 74672 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74672 | ronald.oussoren | 2009-09-06 12:00:26 +0200 (Sun, 06 Sep 2009) | 1 line Fix build issues on OSX 10.6 (issue 6802) ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/plat-mac/aepack.py python/branches/release26-maint/Lib/plat-mac/applesingle.py python/branches/release26-maint/Lib/plat-mac/buildtools.py python/branches/release26-maint/Lib/plat-mac/macresource.py python/branches/release26-maint/Lib/test/test_aepack.py python/branches/release26-maint/Mac/scripts/BuildApplet.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/configure.in Modified: python/branches/release26-maint/Lib/plat-mac/aepack.py ============================================================================== --- python/branches/release26-maint/Lib/plat-mac/aepack.py (original) +++ python/branches/release26-maint/Lib/plat-mac/aepack.py Sun Sep 6 12:54:28 2009 @@ -58,7 +58,11 @@ # Some python types we need in the packer: # AEDescType = AE.AEDescType -FSSType = Carbon.File.FSSpecType +try: + FSSType = Carbon.File.FSSpecType +except AttributeError: + class FSSType: + pass FSRefType = Carbon.File.FSRefType AliasType = Carbon.File.AliasType Modified: python/branches/release26-maint/Lib/plat-mac/applesingle.py ============================================================================== --- python/branches/release26-maint/Lib/plat-mac/applesingle.py (original) +++ python/branches/release26-maint/Lib/plat-mac/applesingle.py Sun Sep 6 12:54:28 2009 @@ -119,8 +119,13 @@ if not hasattr(infile, 'read'): if isinstance(infile, Carbon.File.Alias): infile = infile.ResolveAlias()[0] - if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)): - infile = infile.as_pathname() + + if hasattr(Carbon.File, "FSSpec"): + if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)): + infile = infile.as_pathname() + else: + if isinstance(infile, Carbon.File.FSRef): + infile = infile.as_pathname() infile = open(infile, 'rb') asfile = AppleSingle(infile, verbose=verbose) Modified: python/branches/release26-maint/Lib/plat-mac/buildtools.py ============================================================================== --- python/branches/release26-maint/Lib/plat-mac/buildtools.py (original) +++ python/branches/release26-maint/Lib/plat-mac/buildtools.py Sun Sep 6 12:54:28 2009 @@ -15,7 +15,10 @@ import MacOS import macostools import macresource -import EasyDialogs +try: + import EasyDialogs +except ImportError: + EasyDialogs = None import shutil @@ -67,9 +70,13 @@ rsrcname=None, others=[], raw=0, progress="default", destroot=""): if progress == "default": - progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120) - progress.label("Compiling...") - progress.inc(0) + if EasyDialogs is None: + print "Compiling %s"%(os.path.split(filename)[1],) + process = None + else: + progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120) + progress.label("Compiling...") + progress.inc(0) # check for the script name being longer than 32 chars. This may trigger a bug # on OSX that can destroy your sourcefile. if '#' in os.path.split(filename)[1]: @@ -119,7 +126,11 @@ if MacOS.runtimemodel == 'macho': raise BuildError, "No updating yet for MachO applets" if progress: - progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120) + if EasyDialogs is None: + print "Updating %s"%(os.path.split(filename)[1],) + progress = None + else: + progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120) else: progress = None if not output: Modified: python/branches/release26-maint/Lib/plat-mac/macresource.py ============================================================================== --- python/branches/release26-maint/Lib/plat-mac/macresource.py (original) +++ python/branches/release26-maint/Lib/plat-mac/macresource.py Sun Sep 6 12:54:28 2009 @@ -79,8 +79,8 @@ AppleSingle file""" try: refno = Res.FSpOpenResFile(pathname, 1) - except Res.Error, arg: - if arg[0] in (-37, -39): + except (AttributeError, Res.Error), arg: + if isinstance(arg, AttributeError) or arg[0] in (-37, -39): # No resource fork. We may be on OSX, and this may be either # a data-fork based resource file or a AppleSingle file # from the CVS repository. @@ -106,8 +106,8 @@ try: refno = Res.FSpOpenResFile(pathname, 1) Res.CloseResFile(refno) - except Res.Error, arg: - if arg[0] in (-37, -39): + except (AttributeError, Res.Error), arg: + if instance(arg, AttributeError), or arg[0] in (-37, -39): # No resource fork. We may be on OSX, and this may be either # a data-fork based resource file or a AppleSingle file # from the CVS repository. Modified: python/branches/release26-maint/Lib/test/test_aepack.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_aepack.py (original) +++ python/branches/release26-maint/Lib/test/test_aepack.py Sun Sep 6 12:54:28 2009 @@ -59,6 +59,9 @@ import Carbon.File except: return + + if not hasattr(Carbon.File, "FSSpec"): + return o = Carbon.File.FSSpec(os.curdir) packed = aepack.pack(o) unpacked = aepack.unpack(packed) @@ -69,6 +72,8 @@ import Carbon.File except: return + if not hasattr(Carbon.File, "FSSpec"): + return o = Carbon.File.FSSpec(os.curdir).NewAliasMinimal() packed = aepack.pack(o) unpacked = aepack.unpack(packed) Modified: python/branches/release26-maint/Mac/scripts/BuildApplet.py ============================================================================== --- python/branches/release26-maint/Mac/scripts/BuildApplet.py (original) +++ python/branches/release26-maint/Mac/scripts/BuildApplet.py Sun Sep 6 12:54:28 2009 @@ -12,7 +12,10 @@ import os import MacOS -import EasyDialogs +try: + import EasyDialogs +except ImportError: + EasyDialogs = None import buildtools import getopt @@ -32,7 +35,10 @@ try: buildapplet() except buildtools.BuildError, detail: - EasyDialogs.Message(detail) + if EasyDialogs is None: + print detail + else: + EasyDialogs.Message(detail) def buildapplet(): @@ -46,6 +52,10 @@ # Ask for source text if not specified in sys.argv[1:] if not sys.argv[1:]: + if EasyDialogs is None: + usage() + sys.exit(1) + filename = EasyDialogs.AskFileForOpen(message='Select Python source or applet:', typeList=('TEXT', 'APPL')) if not filename: Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sun Sep 6 12:54:28 2009 @@ -185,6 +185,8 @@ Build ----- +- Issue #6802: Fix build issues on MacOSX 10.6 + - Issue 5390: Add uninstall icon independent of whether file extensions are installed. Modified: python/branches/release26-maint/configure.in ============================================================================== --- python/branches/release26-maint/configure.in (original) +++ python/branches/release26-maint/configure.in Sun Sep 6 12:54:28 2009 @@ -92,7 +92,6 @@ ]) AC_SUBST(UNIVERSALSDK) -ARCH_RUN_32BIT= AC_SUBST(ARCH_RUN_32BIT) UNIVERSAL_ARCHS="32-bit" @@ -921,6 +920,7 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" @@ -944,12 +944,22 @@ 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' + if test ${enable_universalsdk}; then + 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 + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -1519,6 +1529,8 @@ ;; esac + +ARCH_RUN_32BIT="" AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in Darwin/@<:@01567@:>@\..*) @@ -1526,7 +1538,7 @@ if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -1538,7 +1550,48 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + AC_TRY_RUN([[ + #include + int main(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 1; + } + ]], ac_osx_32bit=yes, + ac_osx_32bit=no, + ac_osx_32bit=no) + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac From python-checkins at python.org Sun Sep 6 13:01:15 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 06 Sep 2009 11:01:15 -0000 Subject: [Python-checkins] r74682 - in python/branches/py3k: Misc/NEWS configure configure.in Message-ID: Author: ronald.oussoren Date: Sun Sep 6 13:01:15 2009 New Revision: 74682 Log: Merged revisions 74672 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74672 | ronald.oussoren | 2009-09-06 12:00:26 +0200 (Sun, 06 Sep 2009) | 1 line Fix build issues on OSX 10.6 (issue 6802) ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Misc/NEWS python/branches/py3k/configure python/branches/py3k/configure.in Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Sep 6 13:01:15 2009 @@ -184,6 +184,8 @@ Build ----- +- Issue #6802: Fix build issues on MacOSX 10.6 + - Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6. - Issue 4601: 'make install' did not set the appropriate permissions on Modified: python/branches/py3k/configure ============================================================================== --- python/branches/py3k/configure (original) +++ python/branches/py3k/configure Sun Sep 6 13:01:15 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74073 . +# From configure.in Revision: 74669 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.2. # @@ -1908,7 +1908,6 @@ -ARCH_RUN_32BIT= UNIVERSAL_ARCHS="32-bit" @@ -3806,7 +3805,7 @@ { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -rm -f conftest* +rm -f -r conftest* @@ -4654,6 +4653,7 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" @@ -4679,12 +4679,22 @@ 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' + if test ${enable_universalsdk}; then + 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 + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -5346,7 +5356,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -5367,7 +5377,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -6465,7 +6475,7 @@ fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $was_it_defined" >&5 echo "${ECHO_T}$was_it_defined" >&6; } @@ -6995,7 +7005,7 @@ else ac_cv_type_uid_t=no fi -rm -f conftest* +rm -f -r conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 @@ -14388,13 +14398,15 @@ esac +ARCH_RUN_32BIT="" + case $ac_sys_system/$ac_sys_release in Darwin/[01567]\..*) LIBTOOL_CRUFT="-framework System -lcc_dynamic" if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -14406,7 +14418,93 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + if test "$cross_compiling" = yes; then + ac_osx_32bit=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(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 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 "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_osx_32bit=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 ) +ac_osx_32bit=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac @@ -15452,7 +15550,7 @@ else unistd_defines_pthreads=no fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 echo "${ECHO_T}$unistd_defines_pthreads" >&6; } @@ -16920,7 +17018,7 @@ $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f conftest* +rm -f -r conftest* ;; kame) @@ -16943,7 +17041,7 @@ ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-glibc) @@ -16964,7 +17062,7 @@ ipv6type=$i; ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-inet6) @@ -17002,7 +17100,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; v6d) @@ -17025,7 +17123,7 @@ ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; zeta) @@ -17047,7 +17145,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; esac @@ -25139,7 +25237,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi @@ -25409,7 +25507,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi Modified: python/branches/py3k/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Sun Sep 6 13:01:15 2009 @@ -109,7 +109,6 @@ ]) AC_SUBST(UNIVERSALSDK) -ARCH_RUN_32BIT= AC_SUBST(ARCH_RUN_32BIT) UNIVERSAL_ARCHS="32-bit" @@ -920,6 +919,7 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" @@ -943,12 +943,22 @@ 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' + if test ${enable_universalsdk}; then + 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 + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -1455,6 +1465,8 @@ ;; esac + +ARCH_RUN_32BIT="" AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in Darwin/@<:@01567@:>@\..*) @@ -1462,7 +1474,7 @@ if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -1474,7 +1486,48 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + AC_TRY_RUN([[ + #include + int main(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 1; + } + ]], ac_osx_32bit=yes, + ac_osx_32bit=no, + ac_osx_32bit=no) + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac From python-checkins at python.org Sun Sep 6 13:11:05 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 06 Sep 2009 11:11:05 -0000 Subject: [Python-checkins] r74683 - in python/branches/release31-maint: Misc/NEWS configure configure.in Message-ID: Author: ronald.oussoren Date: Sun Sep 6 13:11:04 2009 New Revision: 74683 Log: Merged revisions 74682 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74682 | ronald.oussoren | 2009-09-06 13:01:15 +0200 (Sun, 06 Sep 2009) | 9 lines Merged revisions 74672 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74672 | ronald.oussoren | 2009-09-06 12:00:26 +0200 (Sun, 06 Sep 2009) | 1 line Fix build issues on OSX 10.6 (issue 6802) ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/configure python/branches/release31-maint/configure.in Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sun Sep 6 13:11:04 2009 @@ -134,6 +134,8 @@ Build ----- +- Issue #6802: Fix build issues on MacOSX 10.6 + - Issue 4601: 'make install' did not set the appropriate permissions on directories. Modified: python/branches/release31-maint/configure ============================================================================== --- python/branches/release31-maint/configure (original) +++ python/branches/release31-maint/configure Sun Sep 6 13:11:04 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 73274 . +# From configure.in Revision: 73307 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.1. # @@ -1908,7 +1908,6 @@ -ARCH_RUN_32BIT= UNIVERSAL_ARCHS="32-bit" @@ -3806,7 +3805,7 @@ { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -rm -f conftest* +rm -f -r conftest* @@ -4649,6 +4648,7 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" @@ -4674,12 +4674,22 @@ 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' + if test ${enable_universalsdk}; then + 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 + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -5341,7 +5351,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -5362,7 +5372,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -6460,7 +6470,7 @@ fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $was_it_defined" >&5 echo "${ECHO_T}$was_it_defined" >&6; } @@ -6990,7 +7000,7 @@ else ac_cv_type_uid_t=no fi -rm -f conftest* +rm -f -r conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 @@ -13249,13 +13259,15 @@ esac +ARCH_RUN_32BIT="" + case $ac_sys_system/$ac_sys_release in Darwin/[01567]\..*) LIBTOOL_CRUFT="-framework System -lcc_dynamic" if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -13267,7 +13279,93 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + if test "$cross_compiling" = yes; then + ac_osx_32bit=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(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 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 "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_osx_32bit=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 ) +ac_osx_32bit=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac @@ -14313,7 +14411,7 @@ else unistd_defines_pthreads=no fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 echo "${ECHO_T}$unistd_defines_pthreads" >&6; } @@ -15781,7 +15879,7 @@ $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f conftest* +rm -f -r conftest* ;; kame) @@ -15804,7 +15902,7 @@ ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-glibc) @@ -15825,7 +15923,7 @@ ipv6type=$i; ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-inet6) @@ -15863,7 +15961,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; v6d) @@ -15886,7 +15984,7 @@ ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; zeta) @@ -15908,7 +16006,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; esac @@ -23893,7 +23991,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi @@ -24163,7 +24261,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi Modified: python/branches/release31-maint/configure.in ============================================================================== --- python/branches/release31-maint/configure.in (original) +++ python/branches/release31-maint/configure.in Sun Sep 6 13:11:04 2009 @@ -101,7 +101,6 @@ ]) AC_SUBST(UNIVERSALSDK) -ARCH_RUN_32BIT= AC_SUBST(ARCH_RUN_32BIT) UNIVERSAL_ARCHS="32-bit" @@ -911,6 +910,7 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" @@ -934,12 +934,22 @@ 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' + if test ${enable_universalsdk}; then + 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 + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -1488,6 +1498,8 @@ ;; esac + +ARCH_RUN_32BIT="" AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in Darwin/@<:@01567@:>@\..*) @@ -1495,7 +1507,7 @@ if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -1507,7 +1519,48 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + AC_TRY_RUN([[ + #include + int main(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 1; + } + ]], ac_osx_32bit=yes, + ac_osx_32bit=no, + ac_osx_32bit=no) + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac From python-checkins at python.org Sun Sep 6 14:23:19 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 06 Sep 2009 12:23:19 -0000 Subject: [Python-checkins] r74684 - in python/trunk: Lib/plat-mac/bundlebuilder.py Misc/NEWS Message-ID: Author: ronald.oussoren Date: Sun Sep 6 14:23:18 2009 New Revision: 74684 Log: Fix for issue 4937 Modified: python/trunk/Lib/plat-mac/bundlebuilder.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/plat-mac/bundlebuilder.py ============================================================================== --- python/trunk/Lib/plat-mac/bundlebuilder.py (original) +++ python/trunk/Lib/plat-mac/bundlebuilder.py Sun Sep 6 14:23:18 2009 @@ -341,7 +341,6 @@ "Python", # the Python core library "Resources/English.lproj", "Resources/Info.plist", - "Resources/version.plist", ] def isFramework(): Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sun Sep 6 14:23:18 2009 @@ -366,6 +366,8 @@ Library ------- +- Issue #4937: plat-mac/bundlebuilder revers to non-existing version.plist + - Issue #6838: Use a list to accumulate the value instead of repeatedly concatenating strings in httplib's HTTPResponse._read_chunked providing a significant speed increase @@ -1191,6 +1193,11 @@ Build ----- +- Add 2 new options to ``--with-universal-archs`` on MacOSX: + ``intel`` builds a distribution with ``i386`` and ``x86_64`` architectures, + while ``3-way`` builds a distribution with the ``ppc``, ``i386`` + and ``x86_64`` architectures. + - Issue #6802: Fix build issues on MacOSX 10.6 - Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6. From python-checkins at python.org Sun Sep 6 14:26:54 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 06 Sep 2009 12:26:54 -0000 Subject: [Python-checkins] r74685 - in python/branches/release26-maint: Lib/plat-mac/bundlebuilder.py Misc/NEWS Message-ID: Author: ronald.oussoren Date: Sun Sep 6 14:26:54 2009 New Revision: 74685 Log: Merged revisions 74684 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74684 | ronald.oussoren | 2009-09-06 14:23:18 +0200 (Sun, 06 Sep 2009) | 2 lines Fix for issue 4937 ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/plat-mac/bundlebuilder.py python/branches/release26-maint/Misc/NEWS 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 Sun Sep 6 14:26:54 2009 @@ -337,7 +337,6 @@ "Python", # the Python core library "Resources/English.lproj", "Resources/Info.plist", - "Resources/version.plist", ] def isFramework(): Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sun Sep 6 14:26:54 2009 @@ -74,6 +74,8 @@ Library ------- +- Issue #4937: plat-mac/bundlebuilder revers to non-existing version.plist + - Issue #6838: Use a list to accumulate the value instead of repeatedly concatenating strings in httplib's HTTPResponse._read_chunked providing a significant speed increase From python-checkins at python.org Sun Sep 6 15:07:26 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 06 Sep 2009 13:07:26 -0000 Subject: [Python-checkins] r74686 - python/branches/release26-maint/Lib/plat-mac/macresource.py Message-ID: Author: ronald.oussoren Date: Sun Sep 6 15:07:26 2009 New Revision: 74686 Log: broken minimal merge... Modified: python/branches/release26-maint/Lib/plat-mac/macresource.py Modified: python/branches/release26-maint/Lib/plat-mac/macresource.py ============================================================================== --- python/branches/release26-maint/Lib/plat-mac/macresource.py (original) +++ python/branches/release26-maint/Lib/plat-mac/macresource.py Sun Sep 6 15:07:26 2009 @@ -107,7 +107,7 @@ refno = Res.FSpOpenResFile(pathname, 1) Res.CloseResFile(refno) except (AttributeError, Res.Error), arg: - if instance(arg, AttributeError), or arg[0] in (-37, -39): + if isinstance(arg, AttributeError) or arg[0] in (-37, -39): # No resource fork. We may be on OSX, and this may be either # a data-fork based resource file or a AppleSingle file # from the CVS repository. From python-checkins at python.org Sun Sep 6 15:59:02 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 06 Sep 2009 13:59:02 -0000 Subject: [Python-checkins] r74687 - python/branches/py3k/Lib/locale.py Message-ID: Author: ronald.oussoren Date: Sun Sep 6 15:59:02 2009 New Revision: 74687 Log: Fix for issue 6393: Python crashes on OSX when $LANG is set to some (but not all) invalid values due to an invalid result from nl_langinfo Modified: python/branches/py3k/Lib/locale.py Modified: python/branches/py3k/Lib/locale.py ============================================================================== --- python/branches/py3k/Lib/locale.py (original) +++ python/branches/py3k/Lib/locale.py Sun Sep 6 15:59:02 2009 @@ -570,10 +570,22 @@ except Error: pass result = nl_langinfo(CODESET) + if not result and sys.platform == 'darwin': + # nl_langinfo can return an empty string + # when the setting has an invalid value. + # Default to UTF-8 in that case because + # UTF-8 is the default charset on OSX and + # returning nothing will crash the + # interpreter. + result = 'UTF-8' + setlocale(LC_CTYPE, oldloc) return result else: - return nl_langinfo(CODESET) + result = nl_langinfo(CODESET) + if not result and sys.platform == 'darwin': + # See above for explanation + result = 'UTF-8' ### Database From python-checkins at python.org Sun Sep 6 16:01:46 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 06 Sep 2009 14:01:46 -0000 Subject: [Python-checkins] r74688 - in python/branches/release31-maint: Lib/locale.py Message-ID: Author: ronald.oussoren Date: Sun Sep 6 16:01:46 2009 New Revision: 74688 Log: Merged revisions 74687 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74687 | ronald.oussoren | 2009-09-06 15:59:02 +0200 (Sun, 06 Sep 2009) | 3 lines Fix for issue 6393: Python crashes on OSX when $LANG is set to some (but not all) invalid values due to an invalid result from nl_langinfo ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/locale.py Modified: python/branches/release31-maint/Lib/locale.py ============================================================================== --- python/branches/release31-maint/Lib/locale.py (original) +++ python/branches/release31-maint/Lib/locale.py Sun Sep 6 16:01:46 2009 @@ -567,10 +567,22 @@ except Error: pass result = nl_langinfo(CODESET) + if not result and sys.platform == 'darwin': + # nl_langinfo can return an empty string + # when the setting has an invalid value. + # Default to UTF-8 in that case because + # UTF-8 is the default charset on OSX and + # returning nothing will crash the + # interpreter. + result = 'UTF-8' + setlocale(LC_CTYPE, oldloc) return result else: - return nl_langinfo(CODESET) + result = nl_langinfo(CODESET) + if not result and sys.platform == 'darwin': + # See above for explanation + result = 'UTF-8' ### Database From python-checkins at python.org Sun Sep 6 22:51:38 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 20:51:38 -0000 Subject: [Python-checkins] r74689 - python/trunk/Objects/longobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 22:51:37 2009 New Revision: 74689 Log: Remove redundant assignment Modified: python/trunk/Objects/longobject.c Modified: python/trunk/Objects/longobject.c ============================================================================== --- python/trunk/Objects/longobject.c (original) +++ python/trunk/Objects/longobject.c Sun Sep 6 22:51:37 2009 @@ -1579,7 +1579,6 @@ for (bits_per_char = -1; n; ++bits_per_char) n >>= 1; /* n <- total # of bits needed, while setting p to end-of-string */ - n = 0; while (_PyLong_DigitValue[Py_CHARMASK(*p)] < base) ++p; *str = p; From python-checkins at python.org Sun Sep 6 22:52:44 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 20:52:44 -0000 Subject: [Python-checkins] r74690 - in python/branches/release26-maint: Objects/longobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 22:52:43 2009 New Revision: 74690 Log: Merged revisions 74689 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74689 | mark.dickinson | 2009-09-06 21:51:37 +0100 (Sun, 06 Sep 2009) | 1 line Remove redundant assignment ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Objects/longobject.c Modified: python/branches/release26-maint/Objects/longobject.c ============================================================================== --- python/branches/release26-maint/Objects/longobject.c (original) +++ python/branches/release26-maint/Objects/longobject.c Sun Sep 6 22:52:43 2009 @@ -1409,7 +1409,6 @@ for (bits_per_char = -1; n; ++bits_per_char) n >>= 1; /* n <- total # of bits needed, while setting p to end-of-string */ - n = 0; while (_PyLong_DigitValue[Py_CHARMASK(*p)] < base) ++p; *str = p; From python-checkins at python.org Sun Sep 6 22:53:58 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 20:53:58 -0000 Subject: [Python-checkins] r74691 - in python/branches/py3k: Objects/longobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 22:53:58 2009 New Revision: 74691 Log: Merged revisions 74689 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74689 | mark.dickinson | 2009-09-06 21:51:37 +0100 (Sun, 06 Sep 2009) | 1 line Remove redundant assignment ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Objects/longobject.c Modified: python/branches/py3k/Objects/longobject.c ============================================================================== --- python/branches/py3k/Objects/longobject.c (original) +++ python/branches/py3k/Objects/longobject.c Sun Sep 6 22:53:58 2009 @@ -1862,7 +1862,6 @@ for (bits_per_char = -1; n; ++bits_per_char) n >>= 1; /* n <- total # of bits needed, while setting p to end-of-string */ - n = 0; while (_PyLong_DigitValue[Py_CHARMASK(*p)] < base) ++p; *str = p; From python-checkins at python.org Sun Sep 6 22:54:47 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 20:54:47 -0000 Subject: [Python-checkins] r74692 - in python/branches/release31-maint: Objects/longobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 6 22:54:47 2009 New Revision: 74692 Log: Merged revisions 74691 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74691 | mark.dickinson | 2009-09-06 21:53:58 +0100 (Sun, 06 Sep 2009) | 9 lines Merged revisions 74689 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74689 | mark.dickinson | 2009-09-06 21:51:37 +0100 (Sun, 06 Sep 2009) | 1 line Remove redundant assignment ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Objects/longobject.c Modified: python/branches/release31-maint/Objects/longobject.c ============================================================================== --- python/branches/release31-maint/Objects/longobject.c (original) +++ python/branches/release31-maint/Objects/longobject.c Sun Sep 6 22:54:47 2009 @@ -1862,7 +1862,6 @@ for (bits_per_char = -1; n; ++bits_per_char) n >>= 1; /* n <- total # of bits needed, while setting p to end-of-string */ - n = 0; while (_PyLong_DigitValue[Py_CHARMASK(*p)] < base) ++p; *str = p; From python-checkins at python.org Sun Sep 6 23:21:05 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 21:21:05 -0000 Subject: [Python-checkins] r74693 - in python/trunk: Include/py_curses.h Misc/NEWS Message-ID: Author: mark.dickinson Date: Sun Sep 6 23:21:05 2009 New Revision: 74693 Log: Issue #6848: Fix curses module build failure on OS X 10.6. Modified: python/trunk/Include/py_curses.h python/trunk/Misc/NEWS Modified: python/trunk/Include/py_curses.h ============================================================================== --- python/trunk/Include/py_curses.h (original) +++ python/trunk/Include/py_curses.h Sun Sep 6 23:21:05 2009 @@ -10,7 +10,12 @@ #ifdef _BSD_WCHAR_T_DEFINED_ #define _WCHAR_T #endif -#endif + +/* the following define is necessary for OS X 10.6; without it, the + Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python + can't get at the WINDOW flags field. */ +#define NCURSES_OPAQUE 0 +#endif /* __APPLE__ */ #ifdef __FreeBSD__ /* Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sun Sep 6 23:21:05 2009 @@ -1293,6 +1293,8 @@ Extension Modules ----------------- +- Issue #6848: Fix curses module build failure on OS X 10.6. + - Fix a segfault in expat when given a specially crafted input lead to the tokenizer not stopping. From python-checkins at python.org Sun Sep 6 23:23:06 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 21:23:06 -0000 Subject: [Python-checkins] r74694 - in python/branches/release26-maint: Include/py_curses.h Misc/NEWS Message-ID: Author: mark.dickinson Date: Sun Sep 6 23:23:05 2009 New Revision: 74694 Log: Merged revisions 74693 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74693 | mark.dickinson | 2009-09-06 22:21:05 +0100 (Sun, 06 Sep 2009) | 2 lines Issue #6848: Fix curses module build failure on OS X 10.6. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Include/py_curses.h python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Include/py_curses.h ============================================================================== --- python/branches/release26-maint/Include/py_curses.h (original) +++ python/branches/release26-maint/Include/py_curses.h Sun Sep 6 23:23:05 2009 @@ -10,7 +10,12 @@ #ifdef _BSD_WCHAR_T_DEFINED_ #define _WCHAR_T #endif -#endif + +/* the following define is necessary for OS X 10.6; without it, the + Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python + can't get at the WINDOW flags field. */ +#define NCURSES_OPAQUE 0 +#endif /* __APPLE__ */ #ifdef __FreeBSD__ /* Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sun Sep 6 23:23:05 2009 @@ -180,6 +180,8 @@ Extension Modules ----------------- +- Issue #6848: Fix curses module build failure on OS X 10.6. + - Fix expat to not segfault with specially crafted input. - Issue #4873: Fix resource leaks in error cases of pwd and grp. From python-checkins at python.org Sun Sep 6 23:23:19 2009 From: python-checkins at python.org (guilherme.polo) Date: Sun, 06 Sep 2009 21:23:19 -0000 Subject: [Python-checkins] r74695 - in python/branches/tk_and_idle_maintenance: Doc/c-api/buffer.rst Doc/conf.py Doc/library/codecs.rst Doc/library/constants.rst Doc/library/ctypes.rst Doc/library/ftplib.rst Doc/library/marshal.rst Doc/library/math.rst Doc/library/optparse.rst Doc/library/os.rst Doc/library/signal.rst Doc/library/socketserver.rst Doc/library/stdtypes.rst Doc/library/string.rst Doc/library/thread.rst Doc/library/unittest.rst Doc/library/urllib.rst Doc/library/warnings.rst Doc/reference/datamodel.rst Doc/tutorial/classes.rst Doc/tutorial/errors.rst Doc/tutorial/inputoutput.rst Doc/tutorial/introduction.rst Lib/Cookie.py Lib/SimpleXMLRPCServer.py Lib/decimal.py Lib/httplib.py Lib/new.py Lib/plat-mac/aepack.py Lib/plat-mac/applesingle.py Lib/plat-mac/buildtools.py Lib/plat-mac/bundlebuilder.py Lib/plat-mac/macresource.py Lib/tarfile.py Lib/test/decimaltestdata/extra.decTest Lib/test/test_aepack.py Lib/test/test_bytes.py Lib/test/test_descr.py Lib/test/test_funcattrs.py Lib/test/test_io.py Lib/test/test_platform.py Lib/test/test_tarfile.py Lib/test/test_unittest.py Lib/test/test_xmlrpc.py Lib/types.py Lib/unittest/case.py Lib/webbrowser.py Lib/xmlrpclib.py Mac/scripts/BuildApplet.py Makefile.pre.in Misc/ACKS Misc/NEWS Modules/_io/textio.c Objects/bytearrayobject.c Objects/classobject.c Objects/funcobject.c Objects/stringobject.c Objects/unicodeobject.c README configure configure.in pyconfig.h.in Message-ID: Author: guilherme.polo Date: Sun Sep 6 23:23:17 2009 New Revision: 74695 Log: Merged revisions 74542-74550,74553-74556,74558,74564,74569-74571,74575,74578,74581,74588,74590,74603-74604,74608,74614,74616-74618,74621,74625,74631-74633,74635-74637,74640,74643-74644,74647,74650,74652-74653,74655-74656,74666-74667,74671-74673,74677,74684 via svnmerge from svn+ssh://pythondev/python/trunk ........ r74542 | georg.brandl | 2009-08-23 18:28:56 -0300 (Sun, 23 Aug 2009) | 1 line Restore alphabetic order. ........ r74543 | kristjan.jonsson | 2009-08-24 08:39:31 -0300 (Mon, 24 Aug 2009) | 2 lines issue 6769 fix a mistake in instantiatiating the HTTPSConnection class. ........ r74544 | georg.brandl | 2009-08-24 14:12:30 -0300 (Mon, 24 Aug 2009) | 1 line #6775: fix python.org URLs in README. ........ r74545 | georg.brandl | 2009-08-24 14:14:29 -0300 (Mon, 24 Aug 2009) | 1 line #6772: mention utf-8 as utf8 alias. ........ r74546 | georg.brandl | 2009-08-24 14:20:40 -0300 (Mon, 24 Aug 2009) | 1 line #6725: spell "namespace" consistently. ........ r74547 | georg.brandl | 2009-08-24 14:22:05 -0300 (Mon, 24 Aug 2009) | 1 line #6718: fix example. ........ r74548 | georg.brandl | 2009-08-24 14:24:27 -0300 (Mon, 24 Aug 2009) | 1 line #6677: mention "deleting" as an alias for removing files. ........ r74549 | benjamin.peterson | 2009-08-24 14:42:36 -0300 (Mon, 24 Aug 2009) | 1 line fix pdf building by teaching latex the right encoding package ........ r74550 | georg.brandl | 2009-08-24 14:48:40 -0300 (Mon, 24 Aug 2009) | 1 line #6677: note that rmdir only removes empty directories. ........ r74553 | r.david.murray | 2009-08-26 22:04:59 -0300 (Wed, 26 Aug 2009) | 2 lines Remove leftover text from end of sentence. ........ r74554 | georg.brandl | 2009-08-27 15:59:02 -0300 (Thu, 27 Aug 2009) | 1 line Typo fix. ........ r74555 | georg.brandl | 2009-08-27 16:02:43 -0300 (Thu, 27 Aug 2009) | 1 line #6787: reference fix. ........ r74556 | kristjan.jonsson | 2009-08-27 19:20:21 -0300 (Thu, 27 Aug 2009) | 2 lines issue 6275 Add an "exc_value" attribute to the _AssertRaisesContext context manager in the unittest package. This allows further tests on the exception that was raised after the context manager exits. ........ r74558 | kristjan.jonsson | 2009-08-27 20:13:18 -0300 (Thu, 27 Aug 2009) | 2 lines Issue 6654 Allow the XML-RPC server to use the HTTP request path when dispatching. Added a MultiPathXMLRPCServer class that uses the feature, plus unit tests. ........ r74564 | mark.dickinson | 2009-08-28 10:25:02 -0300 (Fri, 28 Aug 2009) | 3 lines Issue #6794: Fix handling of NaNs in Decimal.compare_total and Decimal.compare_total_mag. ........ r74569 | benjamin.peterson | 2009-08-28 13:48:03 -0300 (Fri, 28 Aug 2009) | 1 line restricted environments are no more ........ r74570 | benjamin.peterson | 2009-08-28 13:49:56 -0300 (Fri, 28 Aug 2009) | 1 line remove more code for restricted execution ........ r74571 | lars.gustaebel | 2009-08-28 16:23:44 -0300 (Fri, 28 Aug 2009) | 7 lines Issue #6054: Do not normalize stored pathnames. No longer use tarfile.normpath() on pathnames. Store pathnames unchanged, i.e. do not remove "./", "../" and "//" occurrences. However, still convert absolute to relative paths. ........ r74575 | mark.dickinson | 2009-08-28 17:46:24 -0300 (Fri, 28 Aug 2009) | 1 line Silence gcc 'comparison always false' warning ........ r74578 | tarek.ziade | 2009-08-29 10:33:21 -0300 (Sat, 29 Aug 2009) | 1 line fixed #6801: symmetric_difference_update also accepts pipe ........ r74581 | amaury.forgeotdarc | 2009-08-29 15:14:40 -0300 (Sat, 29 Aug 2009) | 3 lines #6750: TextIOWrapped could duplicate output when several threads write to it. this affect text files opened with io.open(), and the print() function of py3k ........ r74588 | georg.brandl | 2009-08-30 05:35:01 -0300 (Sun, 30 Aug 2009) | 1 line #6803: fix old name. ........ r74590 | georg.brandl | 2009-08-30 08:51:53 -0300 (Sun, 30 Aug 2009) | 1 line #6801: fix copy-paste oversight. ........ r74603 | georg.brandl | 2009-08-31 03:38:29 -0300 (Mon, 31 Aug 2009) | 1 line other -> others where multiple arguments are accepted. ........ r74604 | mark.dickinson | 2009-08-31 11:46:07 -0300 (Mon, 31 Aug 2009) | 1 line Issue #6297: Add autogenerated Misc/python.pc file to make distclean target. Thanks Jerry Chen. ........ r74608 | senthil.kumaran | 2009-08-31 13:40:27 -0300 (Mon, 31 Aug 2009) | 3 lines Doc fix for the issue2637. ........ r74614 | georg.brandl | 2009-09-01 04:40:54 -0300 (Tue, 01 Sep 2009) | 1 line #6813: better documentation for numberless string formats. ........ r74616 | georg.brandl | 2009-09-01 04:46:26 -0300 (Tue, 01 Sep 2009) | 1 line #6808: clarification. ........ r74617 | georg.brandl | 2009-09-01 04:53:37 -0300 (Tue, 01 Sep 2009) | 1 line #6765: hint that log(x, base) is not very sophisticated. ........ r74618 | georg.brandl | 2009-09-01 05:00:47 -0300 (Tue, 01 Sep 2009) | 1 line #6810: add a link to the section about frame objects instead of just a description where to find it. ........ r74621 | georg.brandl | 2009-09-01 05:06:03 -0300 (Tue, 01 Sep 2009) | 1 line #6638: fix wrong parameter name and markup a class. ........ r74625 | benjamin.peterson | 2009-09-01 19:27:57 -0300 (Tue, 01 Sep 2009) | 1 line remove the check that classmethod's argument is a callable ........ r74631 | georg.brandl | 2009-09-02 17:37:16 -0300 (Wed, 02 Sep 2009) | 1 line #6821: fix signature of PyBuffer_Release(). ........ r74632 | georg.brandl | 2009-09-03 04:27:26 -0300 (Thu, 03 Sep 2009) | 1 line #6828: fix wrongly highlighted blocks. ........ r74633 | georg.brandl | 2009-09-03 09:31:39 -0300 (Thu, 03 Sep 2009) | 1 line #6757: complete the list of types that marshal can serialize. ........ r74635 | armin.rigo | 2009-09-03 16:40:07 -0300 (Thu, 03 Sep 2009) | 2 lines Found the next crasher by thinking about this logic in PyPy. ........ r74636 | armin.rigo | 2009-09-03 16:42:03 -0300 (Thu, 03 Sep 2009) | 3 lines Does not terminate: consume all memory without responding to Ctrl-C. I am not too sure why, but you can surely find out by gdb'ing a bit... ........ r74637 | armin.rigo | 2009-09-03 16:45:27 -0300 (Thu, 03 Sep 2009) | 4 lines Sorry, sorry! Ignore my previous two commits. I mixed up the version of python with which I tried running the crashers. They don't crash the current HEAD. ........ r74640 | brett.cannon | 2009-09-03 18:25:21 -0300 (Thu, 03 Sep 2009) | 7 lines test_platform fails on OS X Snow Leopard because the UNIX command to get the canonical version, sw_vers, leaves off trailing zeros in the version number (e.g. 10.6 instead of 10.6.0). Test now compensates by tacking on extra zeros for the test comparison. Fixes issue #6806. ........ r74643 | georg.brandl | 2009-09-04 03:59:20 -0300 (Fri, 04 Sep 2009) | 2 lines Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. ........ r74644 | georg.brandl | 2009-09-04 04:55:14 -0300 (Fri, 04 Sep 2009) | 1 line #5047: remove Monterey support from configure. ........ r74647 | georg.brandl | 2009-09-04 05:17:04 -0300 (Fri, 04 Sep 2009) | 2 lines Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. ........ r74650 | georg.brandl | 2009-09-04 08:19:34 -0300 (Fri, 04 Sep 2009) | 1 line #5101: add back tests to test_funcattrs that were lost during unittest conversion, and make some PEP8 cleanups. ........ r74652 | georg.brandl | 2009-09-04 08:25:37 -0300 (Fri, 04 Sep 2009) | 1 line #6756: add some info about the "acct" parameter. ........ r74653 | georg.brandl | 2009-09-04 08:32:18 -0300 (Fri, 04 Sep 2009) | 1 line #6777: dont discourage usage of Exception.args or promote usage of Exception.message. ........ r74655 | chris.withers | 2009-09-04 13:12:32 -0300 (Fri, 04 Sep 2009) | 2 lines Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings. ........ r74656 | chris.withers | 2009-09-04 13:32:22 -0300 (Fri, 04 Sep 2009) | 1 line news entry matching r74655 ........ r74666 | georg.brandl | 2009-09-05 06:04:09 -0300 (Sat, 05 Sep 2009) | 1 line #6841: remove duplicated word. ........ r74667 | mark.dickinson | 2009-09-05 07:27:00 -0300 (Sat, 05 Sep 2009) | 2 lines Add configure-time checks for gamma and error functions. ........ r74671 | georg.brandl | 2009-09-05 13:47:17 -0300 (Sat, 05 Sep 2009) | 1 line #6843: add link from filterwarnings to where the meaning of the arguments is covered. ........ r74672 | ronald.oussoren | 2009-09-06 07:00:26 -0300 (Sun, 06 Sep 2009) | 1 line Fix build issues on OSX 10.6 (issue 6802) ........ r74673 | mark.dickinson | 2009-09-06 07:03:31 -0300 (Sun, 06 Sep 2009) | 3 lines Issue #6846: bytearray.pop was returning ints in the range [-128, 128) instead of [0, 256). Thanks Hagen F?rstenau for the report and fix. ........ r74677 | mark.dickinson | 2009-09-06 07:32:21 -0300 (Sun, 06 Sep 2009) | 1 line Issue #6847: s/bytes/bytearray/ in some bytearray error messages. Thanks Hagen F?rstenau. ........ r74684 | ronald.oussoren | 2009-09-06 09:23:18 -0300 (Sun, 06 Sep 2009) | 2 lines Fix for issue 4937 ........ Modified: python/branches/tk_and_idle_maintenance/ (props changed) python/branches/tk_and_idle_maintenance/Doc/c-api/buffer.rst python/branches/tk_and_idle_maintenance/Doc/conf.py python/branches/tk_and_idle_maintenance/Doc/library/codecs.rst python/branches/tk_and_idle_maintenance/Doc/library/constants.rst python/branches/tk_and_idle_maintenance/Doc/library/ctypes.rst python/branches/tk_and_idle_maintenance/Doc/library/ftplib.rst python/branches/tk_and_idle_maintenance/Doc/library/marshal.rst python/branches/tk_and_idle_maintenance/Doc/library/math.rst python/branches/tk_and_idle_maintenance/Doc/library/optparse.rst python/branches/tk_and_idle_maintenance/Doc/library/os.rst python/branches/tk_and_idle_maintenance/Doc/library/signal.rst python/branches/tk_and_idle_maintenance/Doc/library/socketserver.rst python/branches/tk_and_idle_maintenance/Doc/library/stdtypes.rst python/branches/tk_and_idle_maintenance/Doc/library/string.rst python/branches/tk_and_idle_maintenance/Doc/library/thread.rst python/branches/tk_and_idle_maintenance/Doc/library/unittest.rst python/branches/tk_and_idle_maintenance/Doc/library/urllib.rst python/branches/tk_and_idle_maintenance/Doc/library/warnings.rst python/branches/tk_and_idle_maintenance/Doc/reference/datamodel.rst python/branches/tk_and_idle_maintenance/Doc/tutorial/classes.rst python/branches/tk_and_idle_maintenance/Doc/tutorial/errors.rst python/branches/tk_and_idle_maintenance/Doc/tutorial/inputoutput.rst python/branches/tk_and_idle_maintenance/Doc/tutorial/introduction.rst python/branches/tk_and_idle_maintenance/Lib/Cookie.py python/branches/tk_and_idle_maintenance/Lib/SimpleXMLRPCServer.py python/branches/tk_and_idle_maintenance/Lib/decimal.py python/branches/tk_and_idle_maintenance/Lib/httplib.py python/branches/tk_and_idle_maintenance/Lib/new.py python/branches/tk_and_idle_maintenance/Lib/plat-mac/aepack.py python/branches/tk_and_idle_maintenance/Lib/plat-mac/applesingle.py python/branches/tk_and_idle_maintenance/Lib/plat-mac/buildtools.py python/branches/tk_and_idle_maintenance/Lib/plat-mac/bundlebuilder.py python/branches/tk_and_idle_maintenance/Lib/plat-mac/macresource.py python/branches/tk_and_idle_maintenance/Lib/tarfile.py python/branches/tk_and_idle_maintenance/Lib/test/decimaltestdata/extra.decTest python/branches/tk_and_idle_maintenance/Lib/test/test_aepack.py python/branches/tk_and_idle_maintenance/Lib/test/test_bytes.py python/branches/tk_and_idle_maintenance/Lib/test/test_descr.py python/branches/tk_and_idle_maintenance/Lib/test/test_funcattrs.py python/branches/tk_and_idle_maintenance/Lib/test/test_io.py python/branches/tk_and_idle_maintenance/Lib/test/test_platform.py python/branches/tk_and_idle_maintenance/Lib/test/test_tarfile.py python/branches/tk_and_idle_maintenance/Lib/test/test_unittest.py python/branches/tk_and_idle_maintenance/Lib/test/test_xmlrpc.py python/branches/tk_and_idle_maintenance/Lib/types.py python/branches/tk_and_idle_maintenance/Lib/unittest/case.py python/branches/tk_and_idle_maintenance/Lib/webbrowser.py python/branches/tk_and_idle_maintenance/Lib/xmlrpclib.py python/branches/tk_and_idle_maintenance/Mac/scripts/BuildApplet.py python/branches/tk_and_idle_maintenance/Makefile.pre.in python/branches/tk_and_idle_maintenance/Misc/ACKS python/branches/tk_and_idle_maintenance/Misc/NEWS python/branches/tk_and_idle_maintenance/Modules/_io/textio.c python/branches/tk_and_idle_maintenance/Objects/bytearrayobject.c python/branches/tk_and_idle_maintenance/Objects/classobject.c python/branches/tk_and_idle_maintenance/Objects/funcobject.c python/branches/tk_and_idle_maintenance/Objects/stringobject.c python/branches/tk_and_idle_maintenance/Objects/unicodeobject.c python/branches/tk_and_idle_maintenance/README python/branches/tk_and_idle_maintenance/configure python/branches/tk_and_idle_maintenance/configure.in python/branches/tk_and_idle_maintenance/pyconfig.h.in Modified: python/branches/tk_and_idle_maintenance/Doc/c-api/buffer.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/c-api/buffer.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/c-api/buffer.rst Sun Sep 6 23:23:17 2009 @@ -254,9 +254,9 @@ +------------------------------+---------------------------------------------------+ -.. cfunction:: void PyBuffer_Release(PyObject *obj, Py_buffer *view) +.. cfunction:: void PyBuffer_Release(Py_buffer *view) - Release the buffer *view* over *obj*. This should be called when the buffer + Release the buffer *view*. This should be called when the buffer is no longer being used as it may free memory from it. Modified: python/branches/tk_and_idle_maintenance/Doc/conf.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/conf.py (original) +++ python/branches/tk_and_idle_maintenance/Doc/conf.py Sun Sep 6 23:23:17 2009 @@ -148,6 +148,9 @@ # Documents to append as an appendix to all manuals. latex_appendices = ['glossary', 'about', 'license', 'copyright'] +# Get LaTeX to handle Unicode correctly +latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}'} + # Options for the coverage checker # -------------------------------- Modified: python/branches/tk_and_idle_maintenance/Doc/library/codecs.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/codecs.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/codecs.rst Sun Sep 6 23:23:17 2009 @@ -863,7 +863,8 @@ name, together with a few common aliases, and the languages for which the encoding is likely used. Neither the list of aliases nor the list of languages is meant to be exhaustive. Notice that spelling alternatives that only differ in -case or use a hyphen instead of an underscore are also valid aliases. +case or use a hyphen instead of an underscore are also valid aliases; therefore, +e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec. Many of the character sets support the same languages. They vary in individual characters (e.g. whether the EURO SIGN is supported or not), and in the Modified: python/branches/tk_and_idle_maintenance/Doc/library/constants.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/constants.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/constants.rst Sun Sep 6 23:23:17 2009 @@ -62,7 +62,7 @@ Objects that when printed, print a message like "Use quit() or Ctrl-D (i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the - specified exit code, and when . + specified exit code. .. data:: copyright license Modified: python/branches/tk_and_idle_maintenance/Doc/library/ctypes.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/ctypes.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/ctypes.rst Sun Sep 6 23:23:17 2009 @@ -1601,7 +1601,7 @@ The returned function prototype creates functions that use the standard C calling convention. The function will release the GIL during the call. If *use_errno* is set to True, the ctypes private copy of the system - :data:`errno` variable is exchanged with the real :data:`errno` value bafore + :data:`errno` variable is exchanged with the real :data:`errno` value before and after the call; *use_last_error* does the same for the Windows error code. Modified: python/branches/tk_and_idle_maintenance/Doc/library/ftplib.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/ftplib.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/ftplib.rst Sun Sep 6 23:23:17 2009 @@ -147,7 +147,8 @@ ``'anonymous@'``. This function should be called only once for each instance, after a connection has been established; it should not be called at all if a host and user were given when the instance was created. Most FTP commands are - only allowed after the client has logged in. + only allowed after the client has logged in. The *acct* parameter supplies + "accounting information"; few systems implement this. .. method:: FTP.abort() Modified: python/branches/tk_and_idle_maintenance/Doc/library/marshal.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/marshal.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/marshal.rst Sun Sep 6 23:23:17 2009 @@ -37,12 +37,14 @@ Not all Python object types are supported; in general, only objects whose value is independent from a particular invocation of Python can be written and read by -this module. The following types are supported: ``None``, integers, long -integers, floating point numbers, strings, Unicode objects, tuples, lists, sets, -dictionaries, and code objects, where it should be understood that tuples, lists -and dictionaries are only supported as long as the values contained therein are -themselves supported; and recursive lists and dictionaries should not be written -(they will cause infinite loops). +this module. The following types are supported: booleans, integers, long +integers, floating point numbers, complex numbers, strings, Unicode objects, +tuples, lists, sets, frozensets, dictionaries, and code objects, where it should +be understood that tuples, lists, sets, frozensets and dictionaries are only +supported as long as the values contained therein are themselves supported; and +recursive lists, sets and dictionaries should not be written (they will cause +infinite loops). The singletons :const:`None`, :const:`Ellipsis` and +:exc:`StopIteration` can also be marshalled and unmarshalled. .. warning:: Modified: python/branches/tk_and_idle_maintenance/Doc/library/math.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/math.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/math.rst Sun Sep 6 23:23:17 2009 @@ -166,8 +166,10 @@ .. function:: log(x[, base]) - Return the logarithm of *x* to the given *base*. If the *base* is not specified, - return the natural logarithm of *x* (that is, the logarithm to base *e*). + With one argument, return the natural logarithm of *x* (to base *e*). + + With two arguments, return the logarithm of *x* to the given *base*, + calculated as ``log(x)/log(base)``. .. versionchanged:: 2.3 *base* argument added. @@ -183,7 +185,8 @@ .. function:: log10(x) - Return the base-10 logarithm of *x*. + Return the base-10 logarithm of *x*. This is usually more accurate + than ``log(x, 10)``. .. function:: pow(x, y) Modified: python/branches/tk_and_idle_maintenance/Doc/library/optparse.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/optparse.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/optparse.rst Sun Sep 6 23:23:17 2009 @@ -1171,19 +1171,20 @@ the list of arguments to process (default: ``sys.argv[1:]``) ``values`` - object to store option arguments in (default: a new instance of optparse.Values) + object to store option arguments in (default: a new instance of + :class:`optparse.Values`) and the return values are ``options`` - the same object that was passed in as ``options``, or the optparse.Values + the same object that was passed in as ``values``, or the optparse.Values instance created by :mod:`optparse` ``args`` the leftover positional arguments after all options have been processed The most common usage is to supply neither keyword argument. If you supply -``options``, it will be modified with repeated ``setattr()`` calls (roughly one +``values``, it will be modified with repeated ``setattr()`` calls (roughly one for every option argument stored to an option destination) and returned by :meth:`parse_args`. Modified: python/branches/tk_and_idle_maintenance/Doc/library/os.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/os.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/os.rst Sun Sep 6 23:23:17 2009 @@ -1067,12 +1067,12 @@ .. function:: remove(path) - Remove the file *path*. If *path* is a directory, :exc:`OSError` is raised; see - :func:`rmdir` below to remove a directory. This is identical to the - :func:`unlink` function documented below. On Windows, attempting to remove a - file that is in use causes an exception to be raised; on Unix, the directory - entry is removed but the storage allocated to the file is not made available - until the original file is no longer in use. Availability: Unix, + Remove (delete) the file *path*. If *path* is a directory, :exc:`OSError` is + raised; see :func:`rmdir` below to remove a directory. This is identical to + the :func:`unlink` function documented below. On Windows, attempting to + remove a file that is in use causes an exception to be raised; on Unix, the + directory entry is removed but the storage allocated to the file is not made + available until the original file is no longer in use. Availability: Unix, Windows. @@ -1121,7 +1121,10 @@ .. function:: rmdir(path) - Remove the directory *path*. Availability: Unix, Windows. + Remove (delete) the directory *path*. Only works when the directory is + empty, otherwise, :exc:`OSError` is raised. In order to remove whole + directory trees, :func:`shutil.rmtree` can be used. Availability: Unix, + Windows. .. function:: stat(path) @@ -1297,9 +1300,9 @@ .. function:: unlink(path) - Remove the file *path*. This is the same function as :func:`remove`; the - :func:`unlink` name is its traditional Unix name. Availability: Unix, - Windows. + Remove (delete) the file *path*. This is the same function as + :func:`remove`; the :func:`unlink` name is its traditional Unix + name. Availability: Unix, Windows. .. function:: utime(path, times) Modified: python/branches/tk_and_idle_maintenance/Doc/library/signal.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/signal.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/signal.rst Sun Sep 6 23:23:17 2009 @@ -211,9 +211,9 @@ exception to be raised. The *handler* is called with two arguments: the signal number and the current - stack frame (``None`` or a frame object; for a description of frame objects, see - the reference manual section on the standard type hierarchy or see the attribute - descriptions in the :mod:`inspect` module). + stack frame (``None`` or a frame object; for a description of frame objects, + see the :ref:`description in the type hierarchy ` or see the + attribute descriptions in the :mod:`inspect` module). .. _signal-example: Modified: python/branches/tk_and_idle_maintenance/Doc/library/socketserver.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/socketserver.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/socketserver.rst Sun Sep 6 23:23:17 2009 @@ -464,7 +464,7 @@ import socket import sys - HOST, PORT = "localhost" + HOST, PORT = "localhost", 9999 data = " ".join(sys.argv[1:]) # SOCK_DGRAM is the socket type to use for UDP sockets Modified: python/branches/tk_and_idle_maintenance/Doc/library/stdtypes.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/stdtypes.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/stdtypes.rst Sun Sep 6 23:23:17 2009 @@ -1765,7 +1765,7 @@ .. method:: update(other, ...) set |= other | ... - Update the set, adding elements from *other*. + Update the set, adding elements from all others. .. versionchanged:: 2.6 Accepts multiple input iterables. @@ -1773,7 +1773,7 @@ .. method:: intersection_update(other, ...) set &= other & ... - Update the set, keeping only elements found in it and *other*. + Update the set, keeping only elements found in it and all others. .. versionchanged:: 2.6 Accepts multiple input iterables. @@ -2061,7 +2061,7 @@ :func:`update` accepts either another dictionary object or an iterable of key/value pairs (as a tuple or other iterable of length two). If keyword - arguments are specified, the dictionary is then is updated with those + arguments are specified, the dictionary is then updated with those key/value pairs: ``d.update(red=1, blue=2)``. .. versionchanged:: 2.4 @@ -2549,9 +2549,9 @@ their implementation of the context management protocol. See the :mod:`contextlib` module for some examples. -Python's :term:`generator`\s and the ``contextlib.contextfactory`` :term:`decorator` +Python's :term:`generator`\s and the ``contextlib.contextmanager`` :term:`decorator` provide a convenient way to implement these protocols. If a generator function is -decorated with the ``contextlib.contextfactory`` decorator, it will return a +decorated with the ``contextlib.contextmanager`` decorator, it will return a context manager implementing the necessary :meth:`__enter__` and :meth:`__exit__` methods, rather than the iterator produced by an undecorated generator function. Modified: python/branches/tk_and_idle_maintenance/Doc/library/string.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/string.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/string.rst Sun Sep 6 23:23:17 2009 @@ -220,7 +220,7 @@ The grammar for a replacement field is as follows: .. productionlist:: sf - replacement_field: "{" `field_name` ["!" `conversion`] [":" `format_spec`] "}" + replacement_field: "{" [`field_name`] ["!" `conversion`] [":" `format_spec`] "}" field_name: arg_name ("." `attribute_name` | "[" `element_index` "]")* arg_name: (`identifier` | `integer`)? attribute_name: `identifier` @@ -228,7 +228,7 @@ conversion: "r" | "s" format_spec: -In less formal terms, the replacement field starts with a *field_name* that specifies +In less formal terms, the replacement field can start with a *field_name* that specifies the object whose value is to be formatted and inserted into the output instead of the replacement field. The *field_name* is optionally followed by a *conversion* field, which is @@ -249,7 +249,7 @@ "First, thou shalt count to {0}" # References first positional argument "Bring me a {}" # Implicitly references the first positional argument - "From {} to {}" # Same as "From {0] to {1}" + "From {} to {}" # Same as "From {0} to {1}" "My quest is {name}" # References keyword argument 'name' "Weight in tons {0.weight}" # 'weight' attribute of first positional arg "Units destroyed: {players[0]}" # First element of keyword argument 'players'. Modified: python/branches/tk_and_idle_maintenance/Doc/library/thread.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/thread.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/thread.rst Sun Sep 6 23:23:17 2009 @@ -156,7 +156,7 @@ module is available, interrupts always go to the main thread.) * Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is - equivalent to calling :func:`exit`. + equivalent to calling :func:`thread.exit`. * Not all built-in functions that may block waiting for I/O allow other threads to run. (The most popular ones (:func:`time.sleep`, :meth:`file.read`, Modified: python/branches/tk_and_idle_maintenance/Doc/library/unittest.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/unittest.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/unittest.rst Sun Sep 6 23:23:17 2009 @@ -888,6 +888,10 @@ with self.failUnlessRaises(some_error_class): do_something() + The context manager will store the caught exception object in its + :attr:`exc_value` attribute. This can be useful if the intention + is to perform additional checks on the exception raised. + .. versionchanged:: 2.7 Added the ability to use :meth:`assertRaises` as a context manager. Modified: python/branches/tk_and_idle_maintenance/Doc/library/urllib.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/urllib.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/urllib.rst Sun Sep 6 23:23:17 2009 @@ -203,9 +203,10 @@ .. function:: quote(string[, safe]) Replace special characters in *string* using the ``%xx`` escape. Letters, - digits, and the characters ``'_.-'`` are never quoted. The optional *safe* - parameter specifies additional characters that should not be quoted --- its - default value is ``'/'``. + digits, and the characters ``'_.-'`` are never quoted. By default, this + function is intended for quoting the path section of the URL.The optional + *safe* parameter specifies additional characters that should not be quoted + --- its default value is ``'/'``. Example: ``quote('/~connolly/')`` yields ``'/%7econnolly/'``. Modified: python/branches/tk_and_idle_maintenance/Doc/library/warnings.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/library/warnings.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/library/warnings.rst Sun Sep 6 23:23:17 2009 @@ -1,4 +1,3 @@ - :mod:`warnings` --- Warning control =================================== @@ -129,16 +128,16 @@ +---------------+----------------------------------------------+ * *message* is a string containing a regular expression that the warning message - must match (the match is compiled to always be case-insensitive) + must match (the match is compiled to always be case-insensitive). * *category* is a class (a subclass of :exc:`Warning`) of which the warning - category must be a subclass in order to match + category must be a subclass in order to match. * *module* is a string containing a regular expression that the module name must - match (the match is compiled to be case-sensitive) + match (the match is compiled to be case-sensitive). * *lineno* is an integer that the line number where the warning occurred must - match, or ``0`` to match all line numbers + match, or ``0`` to match all line numbers. Since the :exc:`Warning` class is derived from the built-in :exc:`Exception` class, to turn a warning into an error we simply raise ``category(message)``. @@ -299,10 +298,11 @@ .. function:: formatwarning(message, category, filename, lineno[, line]) - Format a warning the standard way. This returns a string which may contain - embedded newlines and ends in a newline. *line* is - a line of source code to be included in the warning message; if *line* is not supplied, - :func:`formatwarning` will try to read the line specified by *filename* and *lineno*. + Format a warning the standard way. This returns a string which may contain + embedded newlines and ends in a newline. *line* is a line of source code to + be included in the warning message; if *line* is not supplied, + :func:`formatwarning` will try to read the line specified by *filename* and + *lineno*. .. versionchanged:: 2.6 Added the *line* argument. @@ -310,10 +310,11 @@ .. function:: filterwarnings(action[, message[, category[, module[, lineno[, append]]]]]) - Insert an entry into the list of warnings filters. The entry is inserted at the - front by default; if *append* is true, it is inserted at the end. This checks - the types of the arguments, compiles the message and module regular expressions, - and inserts them as a tuple in the list of warnings filters. Entries closer to + Insert an entry into the list of :ref:`warnings filter specifications + `. The entry is inserted at the front by default; if + *append* is true, it is inserted at the end. This checks the types of the + arguments, compiles the *message* and *module* regular expressions, and + inserts them as a tuple in the list of warnings filters. Entries closer to the front of the list override entries later in the list, if both match a particular warning. Omitted arguments default to a value that matches everything. @@ -321,10 +322,11 @@ .. function:: simplefilter(action[, category[, lineno[, append]]]) - Insert a simple entry into the list of warnings filters. The meaning of the - function parameters is as for :func:`filterwarnings`, but regular expressions - are not needed as the filter inserted always matches any message in any module - as long as the category and line number match. + Insert a simple entry into the list of :ref:`warnings filter specifications + `. The meaning of the function parameters is as for + :func:`filterwarnings`, but regular expressions are not needed as the filter + inserted always matches any message in any module as long as the category and + line number match. .. function:: resetwarnings() Modified: python/branches/tk_and_idle_maintenance/Doc/reference/datamodel.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/reference/datamodel.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/reference/datamodel.rst Sun Sep 6 23:23:17 2009 @@ -959,6 +959,8 @@ If a code object represents a function, the first item in :attr:`co_consts` is the documentation string of the function, or ``None`` if undefined. + .. _frame-objects: + Frame objects .. index:: object: frame Modified: python/branches/tk_and_idle_maintenance/Doc/tutorial/classes.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/tutorial/classes.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/tutorial/classes.rst Sun Sep 6 23:23:17 2009 @@ -50,8 +50,8 @@ .. _tut-scopes: -Python Scopes and Name Spaces -============================= +Python Scopes and Namespaces +============================ Before introducing classes, I first have to tell you something about Python's scope rules. Class definitions play some neat tricks with namespaces, and you @@ -86,7 +86,7 @@ :keyword:`del` statement. For example, ``del modname.the_answer`` will remove the attribute :attr:`the_answer` from the object named by ``modname``. -Name spaces are created at different moments and have different lifetimes. The +Namespaces are created at different moments and have different lifetimes. The namespace containing the built-in names is created when the Python interpreter starts up, and is never deleted. The global namespace for a module is created when the module definition is read in; normally, module namespaces also last @@ -331,9 +331,9 @@ attribute that is a function object, a method object is created by packing (pointers to) the instance object and the function object just found together in an abstract object: this is the method object. When the method object is called -with an argument list, it is unpacked again, a new argument list is constructed -from the instance object and the original argument list, and the function object -is called with this new argument list. +with an argument list, a new argument list is constructed from the instance +object and the argument list, and the function object is called with this new +argument list. .. _tut-remarks: Modified: python/branches/tk_and_idle_maintenance/Doc/tutorial/errors.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/tutorial/errors.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/tutorial/errors.rst Sun Sep 6 23:23:17 2009 @@ -165,14 +165,11 @@ The except clause may specify a variable after the exception name (or tuple). The variable is bound to an exception instance with the arguments stored in ``instance.args``. For convenience, the exception instance defines -:meth:`__getitem__` and :meth:`__str__` so the arguments can be accessed or -printed directly without having to reference ``.args``. +:meth:`__str__` so the arguments can be printed directly without having to +reference ``.args``. -But use of ``.args`` is discouraged. Instead, the preferred use is to pass a -single argument to an exception (which can be a tuple if multiple arguments are -needed) and have it bound to the ``message`` attribute. One may also -instantiate an exception first before raising it and add any attributes to it as -desired. :: +One may also instantiate an exception first before raising it and add any +attributes to it as desired. :: >>> try: ... raise Exception('spam', 'eggs') @@ -288,28 +285,28 @@ """Exception raised for errors in the input. Attributes: - expression -- input expression in which the error occurred - message -- explanation of the error + expr -- input expression in which the error occurred + msg -- explanation of the error """ - def __init__(self, expression, message): - self.expression = expression - self.message = message + def __init__(self, expr, msg): + self.expr = expr + self.msg = msg class TransitionError(Error): """Raised when an operation attempts a state transition that's not allowed. Attributes: - previous -- state at beginning of transition + prev -- state at beginning of transition next -- attempted new state - message -- explanation of why the specific transition is not allowed + msg -- explanation of why the specific transition is not allowed """ - def __init__(self, previous, next, message): - self.previous = previous + def __init__(self, prev, next, msg): + self.prev = prev self.next = next - self.message = message + self.msg = msg Most exceptions are defined with names that end in "Error," similar to the naming of the standard exceptions. Modified: python/branches/tk_and_idle_maintenance/Doc/tutorial/inputoutput.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/tutorial/inputoutput.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/tutorial/inputoutput.rst Sun Sep 6 23:23:17 2009 @@ -123,11 +123,11 @@ Basic usage of the :meth:`str.format` method looks like this:: - >>> print 'We are the {0} who say "{1}!"'.format('knights', 'Ni') + >>> print 'We are the {} who say "{}!"'.format('knights', 'Ni') We are the knights who say "Ni!" The brackets and characters within them (called format fields) are replaced with -the objects passed into the :meth:`~str.format` method. The number in the +the objects passed into the :meth:`~str.format` method. A number in the brackets refers to the position of the object passed into the :meth:`~str.format` method. :: @@ -149,6 +149,15 @@ ... other='Georg') The story of Bill, Manfred, and Georg. +``'!s'`` (apply :func:`str`) and ``'!r'`` (apply :func:`repr`) can be used to +convert the value before it is formatted. :: + + >>> import math + >>> print 'The value of PI is approximately {}.'.format(math.pi) + The value of PI is approximately 3.14159265359. + >>> print 'The value of PI is approximately {!r}.'.format(math.pi) + The value of PI is approximately 3.141592653589793. + An optional ``':'`` and format specifier can follow the field name. This allows greater control over how the value is formatted. The following example truncates Pi to three places after the decimal. Modified: python/branches/tk_and_idle_maintenance/Doc/tutorial/introduction.rst ============================================================================== --- python/branches/tk_and_idle_maintenance/Doc/tutorial/introduction.rst (original) +++ python/branches/tk_and_idle_maintenance/Doc/tutorial/introduction.rst Sun Sep 6 23:23:17 2009 @@ -138,7 +138,6 @@ 4.0 >>> abs(a) # sqrt(a.real**2 + a.imag**2) 5.0 - >>> In interactive mode, the last printed expression is assigned to the variable ``_``. This means that when you are using Python as a desk calculator, it is @@ -152,7 +151,6 @@ 113.0625 >>> round(_, 2) 113.06 - >>> This variable should be treated as read-only by the user. Don't explicitly assign a value to it --- you would create an independent local variable with the @@ -193,7 +191,9 @@ Note that newlines still need to be embedded in the string using ``\n``; the newline following the trailing backslash is discarded. This example would print -the following:: +the following: + +.. code-block:: text This is a rather long string containing several lines of text just as you would do in C. @@ -209,7 +209,9 @@ -H hostname Hostname to connect to """ -produces the following output:: +produces the following output: + +.. code-block:: text Usage: thingy [OPTIONS] -h Display this usage message @@ -224,7 +226,9 @@ print hello -would print:: +would print: + +.. code-block:: text This is a rather long string containing\n\ several lines of text much as you would do in C. Modified: python/branches/tk_and_idle_maintenance/Lib/Cookie.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/Cookie.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/Cookie.py Sun Sep 6 23:23:17 2009 @@ -624,7 +624,9 @@ if type(rawdata) == type(""): self.__ParseString(rawdata) else: - self.update(rawdata) + # self.update() wouldn't call our custom __setitem__ + for k, v in rawdata.items(): + self[k] = v return # end load() Modified: python/branches/tk_and_idle_maintenance/Lib/SimpleXMLRPCServer.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/SimpleXMLRPCServer.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/SimpleXMLRPCServer.py Sun Sep 6 23:23:17 2009 @@ -161,8 +161,9 @@ """Mix-in class that dispatches XML-RPC requests. This class is used to register XML-RPC method handlers - and then to dispatch them. There should never be any - reason to instantiate this class directly. + and then to dispatch them. This class doesn't need to be + instanced directly when used by SimpleXMLRPCServer but it + can be instanced when used by the MultiPathXMLRPCServer """ def __init__(self, allow_none=False, encoding=None): @@ -237,7 +238,7 @@ self.funcs.update({'system.multicall' : self.system_multicall}) - def _marshaled_dispatch(self, data, dispatch_method = None): + def _marshaled_dispatch(self, data, dispatch_method = None, path = None): """Dispatches an XML-RPC method from marshalled (XML) data. XML-RPC methods are dispatched from the marshalled (XML) data @@ -499,7 +500,7 @@ # check to see if a subclass implements _dispatch and dispatch # using that method if present. response = self.server._marshaled_dispatch( - data, getattr(self, '_dispatch', None) + data, getattr(self, '_dispatch', None), self.path ) except Exception, e: # This should only happen if the module is buggy # internal error, report as HTTP server error @@ -596,6 +597,44 @@ flags |= fcntl.FD_CLOEXEC fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags) +class MultiPathXMLRPCServer(SimpleXMLRPCServer): + """Multipath XML-RPC Server + This specialization of SimpleXMLRPCServer allows the user to create + multiple Dispatcher instances and assign them to different + HTTP request paths. This makes it possible to run two or more + 'virtual XML-RPC servers' at the same port. + Make sure that the requestHandler accepts the paths in question. + """ + def __init__(self, addr, requestHandler=SimpleXMLRPCRequestHandler, + logRequests=True, allow_none=False, encoding=None, bind_and_activate=True): + + SimpleXMLRPCServer.__init__(self, addr, requestHandler, logRequests, allow_none, + encoding, bind_and_activate) + self.dispatchers = {} + self.allow_none = allow_none + self.encoding = encoding + + def add_dispatcher(self, path, dispatcher): + self.dispatchers[path] = dispatcher + return dispatcher + + def get_dispatcher(self, path): + return self.dispatchers[path] + + def _marshaled_dispatch(self, data, dispatch_method = None, path = None): + try: + response = self.dispatchers[path]._marshaled_dispatch( + data, dispatch_method, path) + except: + # report low level exception back to server + # (each dispatcher should have handled their own + # exceptions) + exc_type, exc_value = sys.exc_info()[:2] + response = xmlrpclib.dumps( + xmlrpclib.Fault(1, "%s:%s" % (exc_type, exc_value)), + encoding=self.encoding, allow_none=self.allow_none) + return response + class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher): """Simple handler for XML-RPC data passed through CGI.""" Modified: python/branches/tk_and_idle_maintenance/Lib/decimal.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/decimal.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/decimal.py Sun Sep 6 23:23:17 2009 @@ -2736,12 +2736,15 @@ other_nan = other._isnan() if self_nan or other_nan: if self_nan == other_nan: - if self._int < other._int: + # compare payloads as though they're integers + self_key = len(self._int), self._int + other_key = len(other._int), other._int + if self_key < other_key: if sign: return _One else: return _NegativeOne - if self._int > other._int: + if self_key > other_key: if sign: return _NegativeOne else: Modified: python/branches/tk_and_idle_maintenance/Lib/httplib.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/httplib.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/httplib.py Sun Sep 6 23:23:17 2009 @@ -554,10 +554,7 @@ def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left - value = '' - - # XXX This accumulates chunks by repeated string concatenation, - # which is not efficient as the number or size of chunks gets big. + value = [] while True: if chunk_left is None: line = self.fp.readline() @@ -570,22 +567,22 @@ # close the connection as protocol synchronisation is # probably lost self.close() - raise IncompleteRead(value) + raise IncompleteRead(''.join(value)) if chunk_left == 0: break if amt is None: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) elif amt < chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self.chunk_left = chunk_left - amt - return value + return ''.join(value) elif amt == chunk_left: - value += self._safe_read(amt) + value.append(self._safe_read(amt)) self._safe_read(2) # toss the CRLF at the end of the chunk self.chunk_left = None - return value + return ''.join(value) else: - value += self._safe_read(chunk_left) + value.append(self._safe_read(chunk_left)) amt -= chunk_left # we read the whole chunk, get another @@ -606,7 +603,7 @@ # we read everything; close the "file" self.close() - return value + return ''.join(value) def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads. Modified: python/branches/tk_and_idle_maintenance/Lib/new.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/new.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/new.py Sun Sep 6 23:23:17 2009 @@ -14,8 +14,4 @@ from types import MethodType as instancemethod from types import ModuleType as module -# CodeType is not accessible in restricted execution mode -try: - from types import CodeType as code -except ImportError: - pass +from types import CodeType as code Modified: python/branches/tk_and_idle_maintenance/Lib/plat-mac/aepack.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/plat-mac/aepack.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/plat-mac/aepack.py Sun Sep 6 23:23:17 2009 @@ -58,7 +58,11 @@ # Some python types we need in the packer: # AEDescType = AE.AEDescType -FSSType = Carbon.File.FSSpecType +try: + FSSType = Carbon.File.FSSpecType +except AttributeError: + class FSSType: + pass FSRefType = Carbon.File.FSRefType AliasType = Carbon.File.AliasType Modified: python/branches/tk_and_idle_maintenance/Lib/plat-mac/applesingle.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/plat-mac/applesingle.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/plat-mac/applesingle.py Sun Sep 6 23:23:17 2009 @@ -119,8 +119,13 @@ if not hasattr(infile, 'read'): if isinstance(infile, Carbon.File.Alias): infile = infile.ResolveAlias()[0] - if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)): - infile = infile.as_pathname() + + if hasattr(Carbon.File, "FSSpec"): + if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)): + infile = infile.as_pathname() + else: + if isinstance(infile, Carbon.File.FSRef): + infile = infile.as_pathname() infile = open(infile, 'rb') asfile = AppleSingle(infile, verbose=verbose) Modified: python/branches/tk_and_idle_maintenance/Lib/plat-mac/buildtools.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/plat-mac/buildtools.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/plat-mac/buildtools.py Sun Sep 6 23:23:17 2009 @@ -15,7 +15,10 @@ import MacOS import macostools import macresource -import EasyDialogs +try: + import EasyDialogs +except ImportError: + EasyDialogs = None import shutil @@ -67,9 +70,13 @@ rsrcname=None, others=[], raw=0, progress="default", destroot=""): if progress == "default": - progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120) - progress.label("Compiling...") - progress.inc(0) + if EasyDialogs is None: + print "Compiling %s"%(os.path.split(filename)[1],) + process = None + else: + progress = EasyDialogs.ProgressBar("Processing %s..."%os.path.split(filename)[1], 120) + progress.label("Compiling...") + progress.inc(0) # check for the script name being longer than 32 chars. This may trigger a bug # on OSX that can destroy your sourcefile. if '#' in os.path.split(filename)[1]: @@ -119,7 +126,11 @@ if MacOS.runtimemodel == 'macho': raise BuildError, "No updating yet for MachO applets" if progress: - progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120) + if EasyDialogs is None: + print "Updating %s"%(os.path.split(filename)[1],) + progress = None + else: + progress = EasyDialogs.ProgressBar("Updating %s..."%os.path.split(filename)[1], 120) else: progress = None if not output: Modified: python/branches/tk_and_idle_maintenance/Lib/plat-mac/bundlebuilder.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/plat-mac/bundlebuilder.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/plat-mac/bundlebuilder.py Sun Sep 6 23:23:17 2009 @@ -341,7 +341,6 @@ "Python", # the Python core library "Resources/English.lproj", "Resources/Info.plist", - "Resources/version.plist", ] def isFramework(): Modified: python/branches/tk_and_idle_maintenance/Lib/plat-mac/macresource.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/plat-mac/macresource.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/plat-mac/macresource.py Sun Sep 6 23:23:17 2009 @@ -77,52 +77,38 @@ def open_pathname(pathname, verbose=0): """Open a resource file given by pathname, possibly decoding an AppleSingle file""" + # No resource fork. We may be on OSX, and this may be either + # a data-fork based resource file or a AppleSingle file + # from the CVS repository. try: - refno = Res.FSpOpenResFile(pathname, 1) + refno = Res.FSOpenResourceFile(pathname, u'', 1) except Res.Error, arg: - if arg[0] in (-37, -39): - # No resource fork. We may be on OSX, and this may be either - # a data-fork based resource file or a AppleSingle file - # from the CVS repository. - try: - refno = Res.FSOpenResourceFile(pathname, u'', 1) - except Res.Error, arg: - if arg[0] != -199: - # -199 is "bad resource map" - raise - else: - return refno - # Finally try decoding an AppleSingle file - pathname = _decode(pathname, verbose=verbose) - refno = Res.FSOpenResourceFile(pathname, u'', 1) - else: + if arg[0] != -199: + # -199 is "bad resource map" raise - return refno + else: + return refno + # Finally try decoding an AppleSingle file + pathname = _decode(pathname, verbose=verbose) + refno = Res.FSOpenResourceFile(pathname, u'', 1) def resource_pathname(pathname, verbose=0): """Return the pathname for a resource file (either DF or RF based). If the pathname given already refers to such a file simply return it, otherwise first decode it.""" + # No resource fork. We may be on OSX, and this may be either + # a data-fork based resource file or a AppleSingle file + # from the CVS repository. try: - refno = Res.FSpOpenResFile(pathname, 1) - Res.CloseResFile(refno) + refno = Res.FSOpenResourceFile(pathname, u'', 1) except Res.Error, arg: - if arg[0] in (-37, -39): - # No resource fork. We may be on OSX, and this may be either - # a data-fork based resource file or a AppleSingle file - # from the CVS repository. - try: - refno = Res.FSOpenResourceFile(pathname, u'', 1) - except Res.Error, arg: - if arg[0] != -199: - # -199 is "bad resource map" - raise - else: - return refno - # Finally try decoding an AppleSingle file - pathname = _decode(pathname, verbose=verbose) - else: + if arg[0] != -199: + # -199 is "bad resource map" raise + else: + return refno + # Finally try decoding an AppleSingle file + pathname = _decode(pathname, verbose=verbose) return pathname def open_error_resource(): Modified: python/branches/tk_and_idle_maintenance/Lib/tarfile.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/tarfile.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/tarfile.py Sun Sep 6 23:23:17 2009 @@ -330,11 +330,6 @@ perm.append("-") return "".join(perm) -if os.sep != "/": - normpath = lambda path: os.path.normpath(path).replace(os.sep, "/") -else: - normpath = os.path.normpath - class TarError(Exception): """Base exception.""" pass @@ -956,7 +951,7 @@ """Return the TarInfo's attributes as a dictionary. """ info = { - "name": normpath(self.name), + "name": self.name, "mode": self.mode & 07777, "uid": self.uid, "gid": self.gid, @@ -964,7 +959,7 @@ "mtime": self.mtime, "chksum": self.chksum, "type": self.type, - "linkname": normpath(self.linkname) if self.linkname else "", + "linkname": self.linkname, "uname": self.uname, "gname": self.gname, "devmajor": self.devmajor, @@ -1815,10 +1810,9 @@ # Absolute paths are turned to relative paths. if arcname is None: arcname = name - arcname = normpath(arcname) drv, arcname = os.path.splitdrive(arcname) - while arcname[0:1] == "/": - arcname = arcname[1:] + arcname = arcname.replace(os.sep, "/") + arcname = arcname.lstrip("/") # Now, fill the TarInfo object with # information specific for the file. @@ -1947,16 +1941,6 @@ self._dbg(2, "tarfile: Skipped %r" % name) return - # Special case: The user wants to add the current - # working directory. - if name == ".": - if recursive: - if arcname == ".": - arcname = "" - for f in os.listdir(name): - self.add(f, os.path.join(arcname, f), recursive, exclude) - return - self._dbg(1, name) # Create a TarInfo object from the file. @@ -2123,9 +2107,8 @@ # Fetch the TarInfo object for the given name # and build the destination pathname, replacing # forward slashes to platform specific separators. - if targetpath[-1:] == "/": - targetpath = targetpath[:-1] - targetpath = os.path.normpath(targetpath) + targetpath = targetpath.rstrip("/") + targetpath = targetpath.replace("/", os.sep) # Create all upper directories. upperdirs = os.path.dirname(targetpath) @@ -2220,23 +2203,23 @@ (platform limitation), we try to make a copy of the referenced file instead of a link. """ - linkpath = tarinfo.linkname try: if tarinfo.issym(): - os.symlink(linkpath, targetpath) + os.symlink(tarinfo.linkname, targetpath) else: # See extract(). os.link(tarinfo._link_target, targetpath) except AttributeError: if tarinfo.issym(): - linkpath = os.path.join(os.path.dirname(tarinfo.name), - linkpath) - linkpath = normpath(linkpath) + linkpath = os.path.dirname(tarinfo.name) + "/" + \ + tarinfo.linkname + else: + linkpath = tarinfo.linkname try: self._extract_member(self.getmember(linkpath), targetpath) except (EnvironmentError, KeyError), e: - linkpath = os.path.normpath(linkpath) + linkpath = linkpath.replace("/", os.sep) try: shutil.copy2(linkpath, targetpath) except EnvironmentError, e: Modified: python/branches/tk_and_idle_maintenance/Lib/test/decimaltestdata/extra.decTest ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/decimaltestdata/extra.decTest (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/decimaltestdata/extra.decTest Sun Sep 6 23:23:17 2009 @@ -154,6 +154,22 @@ extr1302 fma 0E123 -Inf sNaN789 -> NaN Invalid_operation extr1302 fma -Inf 0E-456 sNaN148 -> NaN Invalid_operation +-- Issue #6794: when comparing NaNs using compare_total, payloads +-- should be compared as though positive integers; not +-- lexicographically as strings. +extr1400 comparetotal NaN123 NaN45 -> 1 +extr1401 comparetotal sNaN123 sNaN45 -> 1 +extr1402 comparetotal -NaN123 -NaN45 -> -1 +extr1403 comparetotal -sNaN123 -sNaN45 -> -1 +extr1404 comparetotal NaN45 NaN123 -> -1 +extr1405 comparetotal sNaN45 sNaN123 -> -1 +extr1406 comparetotal -NaN45 -NaN123 -> 1 +extr1407 comparetotal -sNaN45 -sNaN123 -> 1 + +extr1410 comparetotal -sNaN63450748854172416 -sNaN911993 -> -1 +extr1411 comparetotmag NaN1222222222222 -NaN999999 -> 1 + + -- max/min/max_mag/min_mag bug in 2.5.2/2.6/3.0: max(NaN, finite) gave -- incorrect answers when the finite number required rounding; similarly -- for the other thre functions Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_aepack.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/test_aepack.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/test_aepack.py Sun Sep 6 23:23:17 2009 @@ -60,6 +60,9 @@ import Carbon.File except: return + + if not hasattr(Carbon.File, "FSSpec"): + return o = Carbon.File.FSSpec(os.curdir) packed = aepack.pack(o) unpacked = aepack.unpack(packed) @@ -70,6 +73,8 @@ import Carbon.File except: return + if not hasattr(Carbon.File, "FSSpec"): + return o = Carbon.File.FSSpec(os.curdir).NewAliasMinimal() packed = aepack.pack(o) unpacked = aepack.unpack(packed) Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_bytes.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/test_bytes.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/test_bytes.py Sun Sep 6 23:23:17 2009 @@ -690,6 +690,8 @@ self.assertEqual(b.pop(-2), ord('r')) self.assertRaises(IndexError, lambda: b.pop(10)) self.assertRaises(OverflowError, lambda: bytearray().pop()) + # test for issue #6846 + self.assertEqual(bytearray(b'\xff').pop(), 0xff) def test_nosort(self): self.assertRaises(AttributeError, lambda: bytearray().sort()) Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_descr.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/test_descr.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/test_descr.py Sun Sep 6 23:23:17 2009 @@ -1391,13 +1391,9 @@ self.assertEqual(super(D,D).goo(), (D,)) self.assertEqual(super(D,d).goo(), (D,)) - # Verify that argument is checked for callability (SF bug 753451) - try: - classmethod(1).__get__(1) - except TypeError: - pass - else: - self.fail("classmethod should check for callability") + # Verify that a non-callable will raise + meth = classmethod(1).__get__(1) + self.assertRaises(TypeError, meth) # Verify that classmethod() doesn't allow keyword args try: Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_funcattrs.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/test_funcattrs.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/test_funcattrs.py Sun Sep 6 23:23:17 2009 @@ -13,15 +13,20 @@ self.fi = F() self.b = b - def cannot_set_attr(self,obj, name, value, exceptions): - # This method is not called as a test (name doesn't start with 'test'), - # but may be used by other tests. - try: setattr(obj, name, value) - except exceptions: pass - else: self.fail("shouldn't be able to set %s to %r" % (name, value)) - try: delattr(obj, name) - except exceptions: pass - else: self.fail("shouldn't be able to del %s" % name) + def cannot_set_attr(self, obj, name, value, exceptions): + # Helper method for other tests. + try: + setattr(obj, name, value) + except exceptions: + pass + else: + self.fail("shouldn't be able to set %s to %r" % (name, value)) + try: + delattr(obj, name) + except exceptions: + pass + else: + self.fail("shouldn't be able to del %s" % name) class FunctionPropertiesTest(FuncAttrsTest): @@ -32,15 +37,15 @@ def test_dir_includes_correct_attrs(self): self.b.known_attr = 7 self.assertTrue('known_attr' in dir(self.b), - "set attributes not in dir listing of method") + "set attributes not in dir listing of method") # Test on underlying function object of method self.f.a.im_func.known_attr = 7 self.assertTrue('known_attr' in dir(self.f.a), - "set attribute on unbound method implementation in class not in " - "dir") + "set attribute on unbound method implementation in " + "class not in dir") self.assertTrue('known_attr' in dir(self.fi.a), - "set attribute on unbound method implementations, should show up" - " in next dir") + "set attribute on unbound method implementations, " + "should show up in next dir") def test_duplicate_function_equality(self): # Body of `duplicate' is the exact same as self.b @@ -56,9 +61,29 @@ self.assertEqual(test(), 3) # self.b always returns 3, arbitrarily def test_func_globals(self): - self.assertEqual(self.b.func_globals, globals()) + self.assertIs(self.b.func_globals, globals()) self.cannot_set_attr(self.b, 'func_globals', 2, TypeError) + def test_func_closure(self): + a = 12 + def f(): print a + c = f.func_closure + self.assertTrue(isinstance(c, tuple)) + self.assertEqual(len(c), 1) + # don't have a type object handy + self.assertEqual(c[0].__class__.__name__, "cell") + self.cannot_set_attr(f, "func_closure", c, TypeError) + + def test_empty_cell(self): + def f(): print a + try: + f.func_closure[0].cell_contents + except ValueError: + pass + else: + self.fail("shouldn't be able to read an empty cell") + a = 12 + def test_func_name(self): self.assertEqual(self.b.__name__, 'b') self.assertEqual(self.b.func_name, 'b') @@ -96,16 +121,20 @@ self.assertEqual(c.func_code, d.func_code) self.assertEqual(c(), 7) # self.assertEqual(d(), 7) - try: b.func_code = c.func_code - except ValueError: pass - else: self.fail( - "func_code with different numbers of free vars should not be " - "possible") - try: e.func_code = d.func_code - except ValueError: pass - else: self.fail( - "func_code with different numbers of free vars should not be " - "possible") + try: + b.func_code = c.func_code + except ValueError: + pass + else: + self.fail("func_code with different numbers of free vars should " + "not be possible") + try: + e.func_code = d.func_code + except ValueError: + pass + else: + self.fail("func_code with different numbers of free vars should " + "not be possible") def test_blank_func_defaults(self): self.assertEqual(self.b.func_defaults, None) @@ -126,13 +155,16 @@ self.assertEqual(first_func(3, 5), 8) del second_func.func_defaults self.assertEqual(second_func.func_defaults, None) - try: second_func() - except TypeError: pass - else: self.fail( - "func_defaults does not update; deleting it does not remove " - "requirement") + try: + second_func() + except TypeError: + pass + else: + self.fail("func_defaults does not update; deleting it does not " + "remove requirement") -class ImplicitReferencesTest(FuncAttrsTest): + +class InstancemethodAttrTest(FuncAttrsTest): def test_im_class(self): self.assertEqual(self.f.a.im_class, self.f) self.assertEqual(self.fi.a.im_class, self.f) @@ -159,9 +191,12 @@ self.assertEqual(self.fi.id(), id(self.fi)) self.assertNotEqual(self.fi.id(), id(self.f)) # Test usage - try: self.f.id.unknown_attr - except AttributeError: pass - else: self.fail("using unknown attributes should raise AttributeError") + try: + self.f.id.unknown_attr + except AttributeError: + pass + else: + self.fail("using unknown attributes should raise AttributeError") # Test assignment and deletion self.cannot_set_attr(self.f.id, 'unknown_attr', 2, AttributeError) self.cannot_set_attr(self.fi.id, 'unknown_attr', 2, AttributeError) @@ -171,35 +206,50 @@ self.assertEqual(self.f.a.known_attr, 7) self.assertEqual(self.fi.a.known_attr, 7) + class ArbitraryFunctionAttrTest(FuncAttrsTest): def test_set_attr(self): + # setting attributes only works on function objects self.b.known_attr = 7 self.assertEqual(self.b.known_attr, 7) for func in [self.f.a, self.fi.a]: - try: func.known_attr = 7 - except AttributeError: pass - else: self.fail("setting attributes on methods should raise error") + try: + func.known_attr = 7 + except AttributeError: + pass + else: + self.fail("setting attributes on methods should raise error") def test_delete_unknown_attr(self): - try: del self.b.unknown_attr - except AttributeError: pass - else: self.fail("deleting unknown attribute should raise TypeError") + try: + del self.b.unknown_attr + except AttributeError: + pass + else: + self.fail("deleting unknown attribute should raise TypeError") def test_setting_attrs_duplicates(self): - try: self.f.a.klass = self.f - except AttributeError: pass - else: self.fail("setting arbitrary attribute in unbound function " - " should raise AttributeError") + try: + self.f.a.klass = self.f + except AttributeError: + pass + else: + self.fail("setting arbitrary attribute in unbound function " + " should raise AttributeError") self.f.a.im_func.klass = self.f for method in [self.f.a, self.fi.a, self.fi.a.im_func]: self.assertEqual(method.klass, self.f) def test_unset_attr(self): for func in [self.b, self.f.a, self.fi.a]: - try: func.non_existent_attr - except AttributeError: pass - else: self.fail("using unknown attributes should raise " - "AttributeError") + try: + func.non_existent_attr + except AttributeError: + pass + else: + self.fail("using unknown attributes should raise " + "AttributeError") + class FunctionDictsTest(FuncAttrsTest): def test_setting_dict_to_invalid(self): @@ -216,13 +266,13 @@ # Setting dict is only possible on the underlying function objects self.f.a.im_func.__dict__ = d # Test assignment - self.assertEqual(d, self.b.__dict__) - self.assertEqual(d, self.b.func_dict) + self.assertIs(d, self.b.__dict__) + self.assertIs(d, self.b.func_dict) # ... and on all the different ways of referencing the method's func - self.assertEqual(d, self.f.a.im_func.__dict__) - self.assertEqual(d, self.f.a.__dict__) - self.assertEqual(d, self.fi.a.im_func.__dict__) - self.assertEqual(d, self.fi.a.__dict__) + self.assertIs(d, self.f.a.im_func.__dict__) + self.assertIs(d, self.f.a.__dict__) + self.assertIs(d, self.fi.a.im_func.__dict__) + self.assertIs(d, self.fi.a.__dict__) # Test value self.assertEqual(self.b.known_attr, 7) self.assertEqual(self.b.__dict__['known_attr'], 7) @@ -234,12 +284,18 @@ self.assertEqual(self.fi.a.known_attr, 7) def test_delete_func_dict(self): - try: del self.b.__dict__ - except TypeError: pass - else: self.fail("deleting function dictionary should raise TypeError") - try: del self.b.func_dict - except TypeError: pass - else: self.fail("deleting function dictionary should raise TypeError") + try: + del self.b.__dict__ + except TypeError: + pass + else: + self.fail("deleting function dictionary should raise TypeError") + try: + del self.b.func_dict + except TypeError: + pass + else: + self.fail("deleting function dictionary should raise TypeError") def test_unassigned_dict(self): self.assertEqual(self.b.__dict__, {}) @@ -250,6 +306,7 @@ d[self.b] = value self.assertEqual(d[self.b], value) + class FunctionDocstringTest(FuncAttrsTest): def test_set_docstring_attr(self): self.assertEqual(self.b.__doc__, None) @@ -273,6 +330,7 @@ self.assertEqual(self.b.__doc__, None) self.assertEqual(self.b.func_doc, None) + class StaticMethodAttrsTest(unittest.TestCase): def test_func_attribute(self): def f(): @@ -286,7 +344,7 @@ def test_main(): - test_support.run_unittest(FunctionPropertiesTest, ImplicitReferencesTest, + test_support.run_unittest(FunctionPropertiesTest, InstancemethodAttrTest, ArbitraryFunctionAttrTest, FunctionDictsTest, FunctionDocstringTest, StaticMethodAttrsTest) Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_io.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/test_io.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/test_io.py Sun Sep 6 23:23:17 2009 @@ -2061,6 +2061,27 @@ self.assertEqual(f.errors, "replace") + def test_threads_write(self): + # Issue6750: concurrent writes could duplicate data + event = threading.Event() + with self.open(support.TESTFN, "w", buffering=1) as f: + def run(n): + text = "Thread%03d\n" % n + event.wait() + f.write(text) + threads = [threading.Thread(target=lambda n=x: run(n)) + for x in range(20)] + for t in threads: + t.start() + time.sleep(0.02) + event.set() + for t in threads: + t.join() + with self.open(support.TESTFN) as f: + content = f.read() + for n in range(20): + self.assertEquals(content.count("Thread%03d\n" % n), 1) + class CTextIOWrapperTest(TextIOWrapperTest): def test_initialization(self): Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_platform.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/test_platform.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/test_platform.py Sun Sep 6 23:23:17 2009 @@ -156,7 +156,13 @@ break fd.close() self.assertFalse(real_ver is None) - self.assertEquals(res[0], real_ver) + result_list = res[0].split('.') + expect_list = real_ver.split('.') + len_diff = len(result_list) - len(expect_list) + # On Snow Leopard, sw_vers reports 10.6.0 as 10.6 + if len_diff > 0: + expect_list.extend(['0'] * len_diff) + self.assertEquals(result_list, expect_list) # res[1] claims to contain # (version, dev_stage, non_release_version) Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_tarfile.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/test_tarfile.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/test_tarfile.py Sun Sep 6 23:23:17 2009 @@ -660,6 +660,76 @@ finally: shutil.rmtree(tempdir) + # Guarantee that stored pathnames are not modified. Don't + # remove ./ or ../ or double slashes. Still make absolute + # pathnames relative. + # For details see bug #6054. + def _test_pathname(self, path, cmp_path=None, dir=False): + # Create a tarfile with an empty member named path + # and compare the stored name with the original. + foo = os.path.join(TEMPDIR, "foo") + if not dir: + open(foo, "w").close() + else: + os.mkdir(foo) + + tar = tarfile.open(tmpname, self.mode) + tar.add(foo, arcname=path) + tar.close() + + tar = tarfile.open(tmpname, "r") + t = tar.next() + tar.close() + + if not dir: + os.remove(foo) + else: + os.rmdir(foo) + + self.assertEqual(t.name, cmp_path or path.replace(os.sep, "/")) + + def test_pathnames(self): + self._test_pathname("foo") + self._test_pathname(os.path.join("foo", ".", "bar")) + self._test_pathname(os.path.join("foo", "..", "bar")) + self._test_pathname(os.path.join(".", "foo")) + self._test_pathname(os.path.join(".", "foo", ".")) + self._test_pathname(os.path.join(".", "foo", ".", "bar")) + self._test_pathname(os.path.join(".", "foo", "..", "bar")) + self._test_pathname(os.path.join(".", "foo", "..", "bar")) + self._test_pathname(os.path.join("..", "foo")) + self._test_pathname(os.path.join("..", "foo", "..")) + self._test_pathname(os.path.join("..", "foo", ".", "bar")) + self._test_pathname(os.path.join("..", "foo", "..", "bar")) + + self._test_pathname("foo" + os.sep + os.sep + "bar") + self._test_pathname("foo" + os.sep + os.sep, "foo", dir=True) + + def test_abs_pathnames(self): + if sys.platform == "win32": + self._test_pathname("C:\\foo", "foo") + else: + self._test_pathname("/foo", "foo") + self._test_pathname("///foo", "foo") + + def test_cwd(self): + # Test adding the current working directory. + cwd = os.getcwd() + os.chdir(TEMPDIR) + try: + open("foo", "w").close() + + tar = tarfile.open(tmpname, self.mode) + tar.add(".") + tar.close() + + tar = tarfile.open(tmpname, "r") + for t in tar: + self.assert_(t.name == "." or t.name.startswith("./")) + tar.close() + finally: + os.chdir(cwd) + class StreamWriteTest(WriteTestBase): Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_unittest.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/test_unittest.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/test_unittest.py Sun Sep 6 23:23:17 2009 @@ -2821,6 +2821,21 @@ self.assertRaisesRegexp, Exception, re.compile('^Expected$'), Stub) + def testAssertRaisesExcValue(self): + class ExceptionMock(Exception): + pass + + def Stub(foo): + raise ExceptionMock(foo) + v = "particular value" + + ctx = self.assertRaises(ExceptionMock) + with ctx: + Stub(v) + e = ctx.exc_value + self.assertTrue(isinstance(e, ExceptionMock)) + self.assertEqual(e.args[0], v) + def testSynonymAssertMethodNames(self): """Test undocumented method name synonyms. Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_xmlrpc.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/test/test_xmlrpc.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/test/test_xmlrpc.py Sun Sep 6 23:23:17 2009 @@ -329,6 +329,66 @@ PORT = None evt.set() +def http_multi_server(evt, numrequests, requestHandler=None): + class TestInstanceClass: + def div(self, x, y): + return x // y + + def _methodHelp(self, name): + if name == 'div': + return 'This is the div function' + + def my_function(): + '''This is my function''' + return True + + class MyXMLRPCServer(SimpleXMLRPCServer.MultiPathXMLRPCServer): + def get_request(self): + # Ensure the socket is always non-blocking. On Linux, socket + # attributes are not inherited like they are on *BSD and Windows. + s, port = self.socket.accept() + s.setblocking(True) + return s, port + + if not requestHandler: + requestHandler = SimpleXMLRPCServer.SimpleXMLRPCRequestHandler + class MyRequestHandler(requestHandler): + rpc_paths = [] + + serv = MyXMLRPCServer(("localhost", 0), MyRequestHandler, + logRequests=False, bind_and_activate=False) + serv.socket.settimeout(3) + serv.server_bind() + try: + global ADDR, PORT, URL + ADDR, PORT = serv.socket.getsockname() + #connect to IP address directly. This avoids socket.create_connection() + #trying to connect to to "localhost" using all address families, which + #causes slowdown e.g. on vista which supports AF_INET6. The server listens + #on AF_INET only. + URL = "http://%s:%d"%(ADDR, PORT) + serv.server_activate() + paths = ["/foo", "/foo/bar"] + for path in paths: + d = serv.add_dispatcher(path, SimpleXMLRPCServer.SimpleXMLRPCDispatcher()) + d.register_introspection_functions() + d.register_multicall_functions() + serv.get_dispatcher(paths[0]).register_function(pow) + serv.get_dispatcher(paths[1]).register_function(lambda x,y: x+y, 'add') + evt.set() + + # handle up to 'numrequests' requests + while numrequests > 0: + serv.handle_request() + numrequests -= 1 + + except socket.timeout: + pass + finally: + serv.socket.close() + PORT = None + evt.set() + # This function prevents errors like: # def is_unavailable_exception(e): @@ -353,6 +413,7 @@ class BaseServerTestCase(unittest.TestCase): requestHandler = None request_count = 1 + threadFunc = staticmethod(http_server) def setUp(self): # enable traceback reporting SimpleXMLRPCServer.SimpleXMLRPCServer._send_traceback_header = True @@ -360,7 +421,7 @@ self.evt = threading.Event() # start server thread to handle requests serv_args = (self.evt, self.request_count, self.requestHandler) - threading.Thread(target=http_server, args=serv_args).start() + threading.Thread(target=self.threadFunc, args=serv_args).start() # wait for the server to be ready self.evt.wait(10) @@ -517,6 +578,18 @@ # This avoids waiting for the socket timeout. self.test_simple1() +class MultiPathServerTestCase(BaseServerTestCase): + threadFunc = staticmethod(http_multi_server) + request_count = 2 + def test_path1(self): + p = xmlrpclib.ServerProxy(URL+"/foo") + self.assertEqual(p.pow(6,8), 6**8) + self.assertRaises(xmlrpclib.Fault, p.add, 6, 8) + def test_path2(self): + p = xmlrpclib.ServerProxy(URL+"/foo/bar") + self.assertEqual(p.add(6,8), 6+8) + self.assertRaises(xmlrpclib.Fault, p.pow, 6, 8) + #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 BaseKeepaliveServerTestCase(BaseServerTestCase): @@ -923,6 +996,7 @@ xmlrpc_tests.append(GzipServerTestCase) except ImportError: pass #gzip not supported in this build + xmlrpc_tests.append(MultiPathServerTestCase) xmlrpc_tests.append(ServerProxyTestCase) xmlrpc_tests.append(FailingServerTestCase) xmlrpc_tests.append(CGIHandlerTestCase) Modified: python/branches/tk_and_idle_maintenance/Lib/types.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/types.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/types.py Sun Sep 6 23:23:17 2009 @@ -42,11 +42,7 @@ def _f(): pass FunctionType = type(_f) LambdaType = type(lambda: None) # Same as FunctionType -try: - CodeType = type(_f.func_code) -except RuntimeError: - # Execution in restricted environment - pass +CodeType = type(_f.func_code) def _g(): yield 1 @@ -70,15 +66,10 @@ try: raise TypeError except TypeError: - try: - tb = sys.exc_info()[2] - TracebackType = type(tb) - FrameType = type(tb.tb_frame) - except AttributeError: - # In the restricted environment, exc_info returns (None, None, - # None) Then, tb.tb_frame gives an attribute error - pass - tb = None; del tb + tb = sys.exc_info()[2] + TracebackType = type(tb) + FrameType = type(tb.tb_frame) + del tb SliceType = slice EllipsisType = type(Ellipsis) Modified: python/branches/tk_and_idle_maintenance/Lib/unittest/case.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/unittest/case.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/unittest/case.py Sun Sep 6 23:23:17 2009 @@ -104,6 +104,7 @@ if not issubclass(exc_type, self.expected): # let unexpected exceptions pass through return False + self.exc_value = exc_value #store for later retrieval if self.expected_regex is None: return True Modified: python/branches/tk_and_idle_maintenance/Lib/webbrowser.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/webbrowser.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/webbrowser.py Sun Sep 6 23:23:17 2009 @@ -625,7 +625,9 @@ # and prepend to _tryorder for cmdline in _userchoices: if cmdline != '': - _synthesize(cmdline, -1) + cmd = _synthesize(cmdline, -1) + if cmd[1] is None: + register(cmdline, None, GenericBrowser(cmdline), -1) cmdline = None # to make del work if _userchoices was empty del cmdline del _userchoices Modified: python/branches/tk_and_idle_maintenance/Lib/xmlrpclib.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/xmlrpclib.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/xmlrpclib.py Sun Sep 6 23:23:17 2009 @@ -1488,7 +1488,7 @@ ) else: chost, self._extra_headers, x509 = self.get_host_info(host) - self._connection = host, HTTPSConnection(chost, None, **(x509 or {})) + self._connection = host, HTTPS(chost, None, **(x509 or {})) return self._connection[1] ## Modified: python/branches/tk_and_idle_maintenance/Mac/scripts/BuildApplet.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Mac/scripts/BuildApplet.py (original) +++ python/branches/tk_and_idle_maintenance/Mac/scripts/BuildApplet.py Sun Sep 6 23:23:17 2009 @@ -12,7 +12,10 @@ import os import MacOS -import EasyDialogs +try: + import EasyDialogs +except ImportError: + EasyDialogs = None import buildtools import getopt @@ -32,7 +35,10 @@ try: buildapplet() except buildtools.BuildError, detail: - EasyDialogs.Message(detail) + if EasyDialogs is None: + print detail + else: + EasyDialogs.Message(detail) def buildapplet(): @@ -46,6 +52,10 @@ # Ask for source text if not specified in sys.argv[1:] if not sys.argv[1:]: + if EasyDialogs is None: + usage() + sys.exit(1) + filename = EasyDialogs.AskFileForOpen(message='Select Python source or applet:', typeList=('TEXT', 'APPL')) if not filename: Modified: python/branches/tk_and_idle_maintenance/Makefile.pre.in ============================================================================== --- python/branches/tk_and_idle_maintenance/Makefile.pre.in (original) +++ python/branches/tk_and_idle_maintenance/Makefile.pre.in Sun Sep 6 23:23:17 2009 @@ -770,6 +770,7 @@ (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)) -rm -f $(DESTDIR)$(BINDIR)/python-config (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config) + -test -d $(DESTDIR)$(LIBPC) || $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC) -rm -f $(DESTDIR)$(LIBPC)/python.pc (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python.pc) @@ -1176,7 +1177,8 @@ distclean: clobber -rm -f Lib/test/data/* -rm -f core Makefile Makefile.pre config.status \ - Modules/Setup Modules/Setup.local Modules/Setup.config + Modules/Setup Modules/Setup.local Modules/Setup.config \ + Misc/python.pc find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ -o -name '[@,#]*' -o -name '*.old' \ -o -name '*.orig' -o -name '*.rej' \ Modified: python/branches/tk_and_idle_maintenance/Misc/ACKS ============================================================================== --- python/branches/tk_and_idle_maintenance/Misc/ACKS (original) +++ python/branches/tk_and_idle_maintenance/Misc/ACKS Sun Sep 6 23:23:17 2009 @@ -783,6 +783,7 @@ Truida Wiedijk Felix Wiemann Gerry Wiener +Frank Wierzbicki Bryce "Zooko" Wilcox-O'Hearn John Williams Sue Williams @@ -794,7 +795,6 @@ Dik Winter Blake Winton Jean-Claude Wippler -Frank Wierzbicki Lars Wirzenius Chris Withers Stefan Witzel Modified: python/branches/tk_and_idle_maintenance/Misc/NEWS ============================================================================== --- python/branches/tk_and_idle_maintenance/Misc/NEWS (original) +++ python/branches/tk_and_idle_maintenance/Misc/NEWS Sun Sep 6 23:23:17 2009 @@ -12,6 +12,13 @@ Core and Builtins ----------------- +- Issue #6846: Fix bug where bytearray.pop() returns negative integers. + +- classmethod no longer checks if its argument is callable. + +- Issue #6750: A text file opened with io.open() could duplicate its output + when writing from multiple threads at the same time. + - Issue #6704: Improve the col_offset in AST for "for" statements with a target of tuple unpacking. @@ -359,6 +366,24 @@ Library ------- +- Issue #4937: plat-mac/bundlebuilder revers to non-existing version.plist + +- Issue #6838: Use a list to accumulate the value instead of + repeatedly concatenating strings in httplib's + HTTPResponse._read_chunked providing a significant speed increase + when downloading large files servend with a Transfer-Encoding of 'chunked'. + +- Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments + as documented. + +- Issue #2666: Handle BROWSER environment variable properly for unknown browser + names in the webbrowser module. + +- Issue #6054: Do not normalize stored pathnames in tarfile. + +- Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN + payloads are now ordered by integer value rather than lexicographically. + - Issue #6693: New functions in site.py to get user/global site packages paths. - The thread.lock type now supports weak references. @@ -1168,6 +1193,13 @@ Build ----- +- Add 2 new options to ``--with-universal-archs`` on MacOSX: + ``intel`` builds a distribution with ``i386`` and ``x86_64`` architectures, + while ``3-way`` builds a distribution with the ``ppc``, ``i386`` + and ``x86_64`` architectures. + +- Issue #6802: Fix build issues on MacOSX 10.6 + - Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6. - Issue 5390: Add uninstall icon independent of whether file @@ -1224,6 +1256,9 @@ - Issue #6556: Fixed the Distutils configuration files location explanation for Windows. +- Issue #6801 : symmetric_difference_update also accepts |. + Thanks to Carl Chenet. + C-API ----- @@ -1315,6 +1350,9 @@ Tests ----- +- Issue #6806: test_platform failed under OS X 10.6.0 because ``sw_ver`` leaves + off the trailing 0 in the version number. + - Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to Lib/lib-tk/test/test_tkinter/test_loadtk. With this, these tests demonstrate the same behaviour as test_ttkguionly (and now also test_tk) which is to Modified: python/branches/tk_and_idle_maintenance/Modules/_io/textio.c ============================================================================== --- python/branches/tk_and_idle_maintenance/Modules/_io/textio.c (original) +++ python/branches/tk_and_idle_maintenance/Modules/_io/textio.c Sun Sep 6 23:23:17 2009 @@ -1189,11 +1189,18 @@ static int _textiowrapper_writeflush(textio *self) { - PyObject *b, *ret; + PyObject *pending, *b, *ret; if (self->pending_bytes == NULL) return 0; - b = _PyBytes_Join(_PyIO_empty_bytes, self->pending_bytes); + + pending = self->pending_bytes; + Py_INCREF(pending); + self->pending_bytes_count = 0; + Py_CLEAR(self->pending_bytes); + + b = _PyBytes_Join(_PyIO_empty_bytes, pending); + Py_DECREF(pending); if (b == NULL) return -1; ret = PyObject_CallMethodObjArgs(self->buffer, @@ -1202,8 +1209,6 @@ if (ret == NULL) return -1; Py_DECREF(ret); - Py_CLEAR(self->pending_bytes); - self->pending_bytes_count = 0; return 0; } Modified: python/branches/tk_and_idle_maintenance/Objects/bytearrayobject.c ============================================================================== --- python/branches/tk_and_idle_maintenance/Objects/bytearrayobject.c (original) +++ python/branches/tk_and_idle_maintenance/Objects/bytearrayobject.c Sun Sep 6 23:23:17 2009 @@ -2620,7 +2620,7 @@ if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (!_getbytevalue(value, &ival)) @@ -2655,7 +2655,7 @@ return NULL; if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (PyByteArray_Resize((PyObject *)self, n + 1) < 0) @@ -2756,7 +2756,7 @@ if (n == 0) { PyErr_SetString(PyExc_OverflowError, - "cannot pop an empty bytes"); + "cannot pop an empty bytearray"); return NULL; } if (where < 0) @@ -2773,7 +2773,7 @@ if (PyByteArray_Resize((PyObject *)self, n - 1) < 0) return NULL; - return PyInt_FromLong(value); + return PyInt_FromLong((unsigned char)value); } PyDoc_STRVAR(remove__doc__, @@ -2794,7 +2794,7 @@ break; } if (where == n) { - PyErr_SetString(PyExc_ValueError, "value not found in bytes"); + PyErr_SetString(PyExc_ValueError, "value not found in bytearray"); return NULL; } if (!_canresize(self)) Modified: python/branches/tk_and_idle_maintenance/Objects/classobject.c ============================================================================== --- python/branches/tk_and_idle_maintenance/Objects/classobject.c (original) +++ python/branches/tk_and_idle_maintenance/Objects/classobject.c Sun Sep 6 23:23:17 2009 @@ -2226,10 +2226,6 @@ PyMethod_New(PyObject *func, PyObject *self, PyObject *klass) { register PyMethodObject *im; - if (!PyCallable_Check(func)) { - PyErr_BadInternalCall(); - return NULL; - } im = free_list; if (im != NULL) { free_list = (PyMethodObject *)(im->im_self); Modified: python/branches/tk_and_idle_maintenance/Objects/funcobject.c ============================================================================== --- python/branches/tk_and_idle_maintenance/Objects/funcobject.c (original) +++ python/branches/tk_and_idle_maintenance/Objects/funcobject.c Sun Sep 6 23:23:17 2009 @@ -659,12 +659,6 @@ return -1; if (!_PyArg_NoKeywords("classmethod", kwds)) return -1; - if (!PyCallable_Check(callable)) { - PyErr_Format(PyExc_TypeError, "'%s' object is not callable", - callable->ob_type->tp_name); - return -1; - } - Py_INCREF(callable); cm->cm_callable = callable; return 0; Modified: python/branches/tk_and_idle_maintenance/Objects/stringobject.c ============================================================================== --- python/branches/tk_and_idle_maintenance/Objects/stringobject.c (original) +++ python/branches/tk_and_idle_maintenance/Objects/stringobject.c Sun Sep 6 23:23:17 2009 @@ -4341,14 +4341,16 @@ } if (prec < 0) prec = 6; +#if SIZEOF_INT > 4 /* make sure that the decimal representation of precision really does need at most 10 digits: platforms with sizeof(int) == 8 exist! */ - if (prec > 0x7fffffffL) { + if (prec > 0x7fffffff) { PyErr_SetString(PyExc_OverflowError, "outrageously large precision " "for formatted float"); return -1; } +#endif if (type == 'f' && fabs(x) >= 1e50) type = 'g'; Modified: python/branches/tk_and_idle_maintenance/Objects/unicodeobject.c ============================================================================== --- python/branches/tk_and_idle_maintenance/Objects/unicodeobject.c (original) +++ python/branches/tk_and_idle_maintenance/Objects/unicodeobject.c Sun Sep 6 23:23:17 2009 @@ -8325,14 +8325,16 @@ return -1; if (prec < 0) prec = 6; +#if SIZEOF_INT > 4 /* make sure that the decimal representation of precision really does need at most 10 digits: platforms with sizeof(int) == 8 exist! */ - if (prec > 0x7fffffffL) { + if (prec > 0x7fffffff) { PyErr_SetString(PyExc_OverflowError, "outrageously large precision " "for formatted float"); return -1; } +#endif if (type == 'f' && fabs(x) >= 1e50) type = 'g'; Modified: python/branches/tk_and_idle_maintenance/README ============================================================================== --- python/branches/tk_and_idle_maintenance/README (original) +++ python/branches/tk_and_idle_maintenance/README Sun Sep 6 23:23:17 2009 @@ -104,26 +104,26 @@ Read comp.lang.python, a high-volume discussion newsgroup about Python, or comp.lang.python.announce, a low-volume moderated newsgroup for Python-related announcements. These are also accessible as -mailing lists: see http://www.python.org/community/lists.html for an +mailing lists: see http://www.python.org/community/lists/ for an overview of these and many other Python-related mailing lists. Archives are accessible via the Google Groups Usenet archive; see http://groups.google.com/. The mailing lists are also archived, see -http://www.python.org/community/lists.html for details. +http://www.python.org/community/lists/ for details. Bug reports ----------- To report or search for bugs, please use the Python Bug -Tracker at http://bugs.python.org. +Tracker at http://bugs.python.org/. Patches and contributions ------------------------- To submit a patch or other contribution, please use the Python Patch -Manager at http://bugs.python.org. Guidelines +Manager at http://bugs.python.org/. Guidelines for patch submission may be found at http://www.python.org/dev/patches/. If you have a proposal to change Python, you may want to send an email to the @@ -185,7 +185,7 @@ See also the platform specific notes in the next section. If you run into other trouble, see the FAQ -(http://www.python.org/doc/faq) for hints on what can go wrong, and +(http://www.python.org/doc/faq/) for hints on what can go wrong, and how to fix it. If you rerun the configure script with different options, remove all @@ -386,7 +386,7 @@ HP-UX ia64: When building on the ia64 (Itanium) platform using HP's compiler, some experience has shown that the compiler's optimiser produces a completely broken version of python - (see http://www.python.org/sf/814976). To work around this, + (see http://bugs.python.org/814976). To work around this, edit the Makefile and remove -O from the OPT line. To build a 64-bit executable on an Itanium 2 system using HP's @@ -406,7 +406,7 @@ if it remains set.) You still have to edit the Makefile and remove -O from the OPT line. -HP PA-RISC 2.0: A recent bug report (http://www.python.org/sf/546117) +HP PA-RISC 2.0: A recent bug report (http://bugs.python.org/546117) suggests that the C compiler in this 64-bit system has bugs in the optimizer that break Python. Compiling without optimization solves the problems. @@ -532,14 +532,6 @@ and type NMAKE. Threading and sockets are supported by default in the resulting binaries of PYTHON15.DLL and PYTHON.EXE. -Monterey (64-bit AIX): The current Monterey C compiler (Visual Age) - uses the OBJECT_MODE={32|64} environment variable to set the - compilation mode to either 32-bit or 64-bit (32-bit mode is - the default). Presumably you want 64-bit compilation mode for - this 64-bit OS. As a result you must first set OBJECT_MODE=64 - in your environment before configuring (./configure) or - building (make) Python on Monterey. - Reliant UNIX: The thread support does not compile on Reliant UNIX, and there is a (minor) problem in the configure script for that platform as well. This should be resolved in time for a @@ -1159,9 +1151,9 @@ is now maintained by the equally famous Barry Warsaw (it's no coincidence that they now both work on the same team). The latest version, along with various other contributed Python-related Emacs -goodies, is online at http://www.python.org/emacs/python-mode. And +goodies, is online at http://www.python.org/emacs/python-mode/. And if you are planning to edit the Python C code, please pick up the -latest version of CC Mode http://www.python.org/emacs/cc-mode; it +latest version of CC Mode http://www.python.org/emacs/cc-mode/; it contains a "python" style used throughout most of the Python C source files. (Newer versions of Emacs or XEmacs may already come with the latest version of python-mode.) Modified: python/branches/tk_and_idle_maintenance/configure ============================================================================== --- python/branches/tk_and_idle_maintenance/configure (original) +++ python/branches/tk_and_idle_maintenance/configure Sun Sep 6 23:23:17 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74044 . +# From configure.in Revision: 74667 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -1911,7 +1911,6 @@ -ARCH_RUN_32BIT= UNIVERSAL_ARCHS="32-bit" @@ -2057,7 +2056,7 @@ if test -z "$MACHDEP" then ac_sys_system=`uname -s` - if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + if test "$ac_sys_system" = "AIX" \ -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then ac_sys_release=`uname -v` else @@ -2306,9 +2305,6 @@ AR="\$(srcdir)/Modules/ar_beos" RANLIB=: ;; - Monterey*) - RANLIB=: - without_gcc=;; *) without_gcc=no;; esac fi @@ -3855,7 +3851,7 @@ { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -rm -f conftest* +rm -f -r conftest* @@ -3917,10 +3913,6 @@ 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 @@ -3988,8 +3980,6 @@ 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. @@ -4596,15 +4586,6 @@ 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 @@ -4707,6 +4688,7 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" @@ -4732,12 +4714,22 @@ 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' + if test ${enable_universalsdk}; then + 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 + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -5399,7 +5391,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -5420,7 +5412,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -6518,7 +6510,7 @@ fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $was_it_defined" >&5 echo "${ECHO_T}$was_it_defined" >&6; } @@ -7048,7 +7040,7 @@ else ac_cv_type_uid_t=no fi -rm -f conftest* +rm -f -r conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 @@ -14475,13 +14467,15 @@ esac +ARCH_RUN_32BIT="" + case $ac_sys_system/$ac_sys_release in Darwin/[01567]\..*) LIBTOOL_CRUFT="-framework System -lcc_dynamic" if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -14493,7 +14487,93 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + if test "$cross_compiling" = yes; then + ac_osx_32bit=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(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 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 "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_osx_32bit=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 ) +ac_osx_32bit=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac @@ -14688,7 +14768,6 @@ else LDSHARED='$(CC) -G' fi;; SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';; - Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; atheos*) LDSHARED="gcc -shared";; *) LDSHARED="ld";; @@ -14727,7 +14806,6 @@ then CCSHARED="-fPIC" else CCSHARED="-Kpic -belf" fi;; - Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; *) CCSHARED="";; @@ -15621,7 +15699,7 @@ else unistd_defines_pthreads=no fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 echo "${ECHO_T}$unistd_defines_pthreads" >&6; } @@ -17235,7 +17313,7 @@ $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f conftest* +rm -f -r conftest* ;; kame) @@ -17258,7 +17336,7 @@ ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-glibc) @@ -17279,7 +17357,7 @@ ipv6type=$i; ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-inet6) @@ -17317,7 +17395,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; v6d) @@ -17340,7 +17418,7 @@ ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; zeta) @@ -17362,7 +17440,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; esac @@ -23386,7 +23464,105 @@ -for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round +for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* 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 $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +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 + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + +for ac_func in hypot lgamma log1p round tgamma do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -25081,7 +25257,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi @@ -25351,7 +25527,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi Modified: python/branches/tk_and_idle_maintenance/configure.in ============================================================================== --- python/branches/tk_and_idle_maintenance/configure.in (original) +++ python/branches/tk_and_idle_maintenance/configure.in Sun Sep 6 23:23:17 2009 @@ -109,7 +109,6 @@ ]) AC_SUBST(UNIVERSALSDK) -ARCH_RUN_32BIT= AC_SUBST(ARCH_RUN_32BIT) UNIVERSAL_ARCHS="32-bit" @@ -235,7 +234,7 @@ if test -z "$MACHDEP" then ac_sys_system=`uname -s` - if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + if test "$ac_sys_system" = "AIX" \ -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then ac_sys_release=`uname -v` else @@ -457,9 +456,6 @@ AR="\$(srcdir)/Modules/ar_beos" RANLIB=: ;; - Monterey*) - RANLIB=: - without_gcc=;; *) without_gcc=no;; esac]) AC_MSG_RESULT($without_gcc) @@ -581,10 +577,6 @@ 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 AC_DEFINE(__EXTENSIONS__, 1, [Defined on Solaris to see additional function prototypes.]) @@ -645,8 +637,6 @@ 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. @@ -900,15 +890,6 @@ 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 AC_SUBST(BASECFLAGS) @@ -965,6 +946,7 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" @@ -988,12 +970,22 @@ 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' + if test ${enable_universalsdk}; then + 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 + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -1526,6 +1518,8 @@ ;; esac + +ARCH_RUN_32BIT="" AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in Darwin/@<:@01567@:>@\..*) @@ -1533,7 +1527,7 @@ if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -1545,7 +1539,48 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + AC_TRY_RUN([[ + #include + int main(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 1; + } + ]], ac_osx_32bit=yes, + ac_osx_32bit=no, + ac_osx_32bit=no) + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac @@ -1722,7 +1757,6 @@ else LDSHARED='$(CC) -G' fi;; SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';; - Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; atheos*) LDSHARED="gcc -shared";; *) LDSHARED="ld";; @@ -1759,7 +1793,6 @@ then CCSHARED="-fPIC" else CCSHARED="-Kpic -belf" fi;; - Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; *) CCSHARED="";; @@ -3283,7 +3316,8 @@ [Define if tanh(-0.) is -0., or if platform doesn't have signed zeros]) fi -AC_CHECK_FUNCS([acosh asinh atanh copysign expm1 finite hypot log1p round]) +AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma]) +AC_CHECK_FUNCS([hypot lgamma log1p round tgamma]) AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include ]]) LIBS=$LIBS_SAVE Modified: python/branches/tk_and_idle_maintenance/pyconfig.h.in ============================================================================== --- python/branches/tk_and_idle_maintenance/pyconfig.h.in (original) +++ python/branches/tk_and_idle_maintenance/pyconfig.h.in Sun Sep 6 23:23:17 2009 @@ -165,6 +165,12 @@ /* Define if you have the 'epoll' functions. */ #undef HAVE_EPOLL +/* Define to 1 if you have the `erf' function. */ +#undef HAVE_ERF + +/* Define to 1 if you have the `erfc' function. */ +#undef HAVE_ERFC + /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H @@ -231,6 +237,9 @@ /* Define to 1 if you have the `gai_strerror' function. */ #undef HAVE_GAI_STRERROR +/* Define to 1 if you have the `gamma' function. */ +#undef HAVE_GAMMA + /* Define if you have the getaddrinfo function. */ #undef HAVE_GETADDRINFO @@ -357,6 +366,9 @@ /* Define to 1 if you have the `lchown' function. */ #undef HAVE_LCHOWN +/* Define to 1 if you have the `lgamma' function. */ +#undef HAVE_LGAMMA + /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL @@ -751,6 +763,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TERM_H +/* Define to 1 if you have the `tgamma' function. */ +#undef HAVE_TGAMMA + /* Define to 1 if you have the header file. */ #undef HAVE_THREAD_H From python-checkins at python.org Sun Sep 6 23:24:55 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 21:24:55 -0000 Subject: [Python-checkins] r74696 - in python/branches/py3k: Include/py_curses.h Misc/NEWS Message-ID: Author: mark.dickinson Date: Sun Sep 6 23:24:55 2009 New Revision: 74696 Log: Merged revisions 74693 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74693 | mark.dickinson | 2009-09-06 22:21:05 +0100 (Sun, 06 Sep 2009) | 2 lines Issue #6848: Fix curses module build failure on OS X 10.6. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Include/py_curses.h python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Include/py_curses.h ============================================================================== --- python/branches/py3k/Include/py_curses.h (original) +++ python/branches/py3k/Include/py_curses.h Sun Sep 6 23:24:55 2009 @@ -10,7 +10,12 @@ #ifdef _BSD_WCHAR_T_DEFINED_ #define _WCHAR_T #endif -#endif + +/* the following define is necessary for OS X 10.6; without it, the + Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python + can't get at the WINDOW flags field. */ +#define NCURSES_OPAQUE 0 +#endif /* __APPLE__ */ #ifdef __FreeBSD__ /* Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Sep 6 23:24:55 2009 @@ -169,6 +169,8 @@ Extension Modules ----------------- +- Issue #6848: Fix curses module build failure on OS X 10.6. + - Fix a segfault that could be triggered by expat with specially formed input. - Issue #6561: '\d' in a regex now matches only characters with From python-checkins at python.org Sun Sep 6 23:26:46 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 06 Sep 2009 21:26:46 -0000 Subject: [Python-checkins] r74697 - in python/branches/release31-maint: Include/py_curses.h Misc/NEWS Message-ID: Author: mark.dickinson Date: Sun Sep 6 23:26:46 2009 New Revision: 74697 Log: Merged revisions 74696 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74696 | mark.dickinson | 2009-09-06 22:24:55 +0100 (Sun, 06 Sep 2009) | 9 lines Merged revisions 74693 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74693 | mark.dickinson | 2009-09-06 22:21:05 +0100 (Sun, 06 Sep 2009) | 2 lines Issue #6848: Fix curses module build failure on OS X 10.6. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Include/py_curses.h python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Include/py_curses.h ============================================================================== --- python/branches/release31-maint/Include/py_curses.h (original) +++ python/branches/release31-maint/Include/py_curses.h Sun Sep 6 23:26:46 2009 @@ -10,7 +10,12 @@ #ifdef _BSD_WCHAR_T_DEFINED_ #define _WCHAR_T #endif -#endif + +/* the following define is necessary for OS X 10.6; without it, the + Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python + can't get at the WINDOW flags field. */ +#define NCURSES_OPAQUE 0 +#endif /* __APPLE__ */ #ifdef __FreeBSD__ /* Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sun Sep 6 23:26:46 2009 @@ -125,6 +125,8 @@ Extension Modules ----------------- +- Issue #6848: Fix curses module build failure on OS X 10.6. + - Fix a segfault in expat. - Issue #4509: array.array objects are no longer modified after an operation From python-checkins at python.org Sun Sep 6 23:54:53 2009 From: python-checkins at python.org (guilherme.polo) Date: Sun, 06 Sep 2009 21:54:53 -0000 Subject: [Python-checkins] r74698 - python/branches/tk_and_idle_maintenance/Lib/idlelib/IOBinding.py Message-ID: Author: guilherme.polo Date: Sun Sep 6 23:54:53 2009 New Revision: 74698 Log: text.see is unecessary here and actually shows the second line (instead of the first one) when opening files larger than one page with newer Tk versions. Modified: python/branches/tk_and_idle_maintenance/Lib/idlelib/IOBinding.py Modified: python/branches/tk_and_idle_maintenance/Lib/idlelib/IOBinding.py ============================================================================== --- python/branches/tk_and_idle_maintenance/Lib/idlelib/IOBinding.py (original) +++ python/branches/tk_and_idle_maintenance/Lib/idlelib/IOBinding.py Sun Sep 6 23:54:53 2009 @@ -272,7 +272,6 @@ self.reset_undo() self.set_filename(filename) self.text.mark_set("insert", "1.0") - self.text.see("insert") self.updaterecentfileslist(filename) return True From nnorwitz at gmail.com Mon Sep 7 00:08:03 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sun, 6 Sep 2009 18:08:03 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090906220803.GA31341@python.psfb.org> More important issues: ---------------------- test_distutils leaked [0, 0, 25] references, sum=25 Less important issues: ---------------------- test_asynchat leaked [0, 0, 117] references, sum=117 test_cmd_line leaked [-25, 50, 0] references, sum=25 test_file2k leaked [-2, -80, 0] references, sum=-82 test_popen2 leaked [0, 25, -25] references, sum=0 test_smtplib leaked [-102, 0, 73] references, sum=-29 test_threading leaked [48, 48, 48] references, sum=144 From python-checkins at python.org Mon Sep 7 00:43:39 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 06 Sep 2009 22:43:39 -0000 Subject: [Python-checkins] r74699 - python/trunk/Python/bltinmodule.c Message-ID: Author: benjamin.peterson Date: Mon Sep 7 00:43:39 2009 New Revision: 74699 Log: PyObject_GetIter can set an error for its self just fine Modified: python/trunk/Python/bltinmodule.c Modified: python/trunk/Python/bltinmodule.c ============================================================================== --- python/trunk/Python/bltinmodule.c (original) +++ python/trunk/Python/bltinmodule.c Mon Sep 7 00:43:39 2009 @@ -968,14 +968,8 @@ /* Get iterator. */ curseq = PyTuple_GetItem(args, i+1); sqp->it = PyObject_GetIter(curseq); - if (sqp->it == NULL) { - static char errmsg[] = - "argument %d to map() must support iteration"; - char errbuf[sizeof(errmsg) + 25]; - PyOS_snprintf(errbuf, sizeof(errbuf), errmsg, i+2); - PyErr_SetString(PyExc_TypeError, errbuf); + if (sqp->it == NULL) goto Fail_2; - } /* Update len. */ curlen = _PyObject_LengthHint(curseq, 8); @@ -2463,13 +2457,8 @@ for (i = 0; i < itemsize; ++i) { PyObject *item = PyTuple_GET_ITEM(args, i); PyObject *it = PyObject_GetIter(item); - if (it == NULL) { - if (PyErr_ExceptionMatches(PyExc_TypeError)) - PyErr_Format(PyExc_TypeError, - "zip argument #%zd must support iteration", - i+1); + if (it == NULL) goto Fail_ret_itlist; - } PyTuple_SET_ITEM(itlist, i, it); } From python-checkins at python.org Mon Sep 7 07:18:06 2009 From: python-checkins at python.org (brett.cannon) Date: Mon, 07 Sep 2009 05:18:06 -0000 Subject: [Python-checkins] r74700 - peps/trunk/pep-3145.txt Message-ID: Author: brett.cannon Date: Mon Sep 7 07:18:06 2009 New Revision: 74700 Log: Add PEP 3145: Asynchronous I/O For subprocess.Popen Added: peps/trunk/pep-3145.txt (contents, props changed) Added: peps/trunk/pep-3145.txt ============================================================================== --- (empty file) +++ peps/trunk/pep-3145.txt Mon Sep 7 07:18:06 2009 @@ -0,0 +1,135 @@ +PEP: 3145 +Title: Asynchronous I/O For subprocess.Popen +Version: $Revision$ +Last-Modified: $Date$ +Author: (James) Eric Pruitt, Charles R. McCreary, Josiah Carlson +Status: Draft +Type: Standards Track +Content-Type: text/plain +Created: 04-Aug-2009 +Python-Version: 3.2 +Post-History: + +Abstract: + + In its present form, the ``subprocess.Popen`` implementation is prone to + dead-locking and blocking of the parent Python script while waiting on data + from the child process. This PEP proposes to make + ``subprocess.Popen`` more asynchronous to help alleviate these + problems. + +Motivation: + + A search for "python asynchronous subprocess" will turn up numerous + accounts of people wanting to execute a child process and communicate with + it from time to time reading only the data that is available instead of + blocking to wait for the program to produce data [1] [2] [3]. The current + behavior of the subprocess module is that when a user sends or receives + data via the stdin, stderr and stdout file objects, dead locks are common + and documented [4] [5]. While ``communicate`` can be used to alleviate some of + the buffering issues, it will still cause the parent process to block while + attempting to read data when none is available to be read from the child + process. + +Rationale: + + There is a documented need for asynchronous, non-blocking functionality in + ``subprocess.Popen`` [6] [7] [2] [3]. Inclusion of the code would improve the + utility of the Python standard library that can be used on Unix based and + Windows builds of Python. Practically every I/O object in Python has a + file-like wrapper of some sort. Sockets already act as such and for + strings there is ``StringIO``. Popen can be made to act like a file by simply + using the methods attached the the ``subprocess.Popen.stderr``, + ``stdout`` and + ``stdin`` file-like objects. But when using the read and write methods of + those options, you do not have the benefit of asynchronous I/O. In the + proposed solution the wrapper wraps the asynchronous methods to mimic a + file object. + +Reference Implementation: + + I have been maintaining a Google Code repository that contains all of my + changes including tests and documentation [9] as well as blog detailing + the problems I have come across in the development process [10]. + + I have been working on implementing non-blocking asynchronous I/O in the + ``subprocess.Popen`` module as well as a wrapper class for + ``subprocess.Popen`` + that makes it so that an executed process can take the place of a file by + duplicating all of the methods and attributes that file objects have. + + There are two base functions that have been added to the + ``subprocess.Popen`` + class: ``Popen.send`` and ``Popen._recv``, each with two separate implementations, + one for Windows and one for Unix based systems. The Windows + implementation uses ``ctypes`` to access the functions needed to control pipes + in the kernel 32 DLL in an asynchronous manner. On Unix based systems, + the Python interface for file control serves the same purpose. The + different implementations of ``Popen.send`` and ``Popen._recv`` have identical + arguments to make code that uses these functions work across multiple + platforms. + + When calling the ``Popen._recv`` function, it requires the pipe name be + passed as an argument so there exists the ``Popen.recv`` function that passes + selects ``stdout`` as the pipe for ``Popen._recv`` by default. + ``Popen.recv_err`` + selects ``stderr`` as the pipe by default. ``Popen.recv`` and + ``Popen.recv_err`` + are much easier to read and understand than + ``Popen._recv('stdout' ...)`` and + ``Popen._recv('stderr' ...)`` respectively. + + Since the ``Popen._recv`` function does not wait on data to be produced + before returning a value, it may return empty bytes. + ``Popen.asyncread`` + handles this issue by returning all data read over a given time + interval. + + The ``ProcessIOWrapper`` class uses the ``asyncread`` and + ``asyncwrite`` functions to + allow a process to act like a file so that there are no blocking issues + that can arise from using the ``stdout`` and ``stdin`` file objects produced from + a ``subprocess.Popen`` call. + + +References: + + [1] [ python-Feature Requests-1191964 ] asynchronous Subprocess + http://mail.python.org/pipermail/python-bugs-list/2006-December/ + 036524.html + + [2] Daily Life in an Ivory Basement : /feb-07/problems-with-subprocess + http://ivory.idyll.org/blog/feb-07/problems-with-subprocess + + [3] How can I run an external command asynchronously from Python? - Stack + Overflow + http://stackoverflow.com/questions/636561/how-can-i-run-an-external- + command-asynchronously-from-python + + [4] 18.1. subprocess - Subprocess management - Python v2.6.2 documentation + http://docs.python.org/library/subprocess.html#subprocess.Popen.wait + + [5] 18.1. subprocess - Subprocess management - Python v2.6.2 documentation + http://docs.python.org/library/subprocess.html#subprocess.Popen.kill + + [6] Issue 1191964: asynchronous Subprocess - Python tracker + http://bugs.python.org/issue1191964 + + [7] Module to allow Asynchronous subprocess use on Windows and Posix + platforms - ActiveState Code + http://code.activestate.com/recipes/440554/ + + [8] subprocess.rst - subprocdev - Project Hosting on Google Code + http://code.google.com/p/subprocdev/source/browse/doc/subprocess.rst?spec=svn2c925e935cad0166d5da85e37c742d8e7f609de5&r=2c925e935cad0166d5da85e37c742d8e7f609de5#437 + + [9] subprocdev - Project Hosting on Google Code + http://code.google.com/p/subprocdev + + [10] Python Subprocess Dev + http://subdev.blogspot.com/ + +Copyright: + + This P.E.P. is licensed under the Open Publication License; + http://www.opencontent.org/openpub/. + From python-checkins at python.org Mon Sep 7 08:12:01 2009 From: python-checkins at python.org (ronald.oussoren) Date: Mon, 07 Sep 2009 06:12:01 -0000 Subject: [Python-checkins] r74701 - in python/trunk: configure configure.in Message-ID: Author: ronald.oussoren Date: Mon Sep 7 08:12:00 2009 New Revision: 74701 Log: Fix typo in configure.in Modified: python/trunk/configure python/trunk/configure.in Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Mon Sep 7 08:12:00 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74667 . +# From configure.in Revision: 74672 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -1336,7 +1336,7 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-universal-archs=ARCH select architectures for universal build ("32-bit", - "64-bit" or "all") + "64-bit", "3-way", "intel" or "all") --with-framework-name=FRAMEWORK specify an alternate name of the framework built with --enable-framework @@ -4694,6 +4694,14 @@ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" ARCH_RUN_32BIT="arch -i386 -ppc" + elif test "$UNIVERSAL_ARCHS" = "intel" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + ARCH_RUN_32BIT="arch -i386" + + elif test "$UNIVERSAL_ARCHS" = "3-way" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -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;} @@ -4721,6 +4729,15 @@ # that's the first OS release where # 4-way builds make sense. cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "3-way"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "intel"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then + cur_target='10.5' fi else if test `arch` = "i386"; then @@ -14488,7 +14505,7 @@ LIBTOOL_CRUFT="" fi if test "$cross_compiling" = yes; then - ac_osx_32bit=no + ac_osx_32bit=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -14496,7 +14513,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -[ + #include int main(int argc, char*argv[]) { @@ -14505,7 +14522,7 @@ } else { return 1; } - ] + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Mon Sep 7 08:12:00 2009 @@ -114,7 +114,7 @@ UNIVERSAL_ARCHS="32-bit" AC_MSG_CHECKING(for --with-universal-archs) AC_ARG_WITH(universal-archs, - AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit" or "all")), + AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit", "3-way", "intel" or "all")), [ AC_MSG_RESULT($withval) UNIVERSAL_ARCHS="$withval" @@ -952,6 +952,14 @@ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" ARCH_RUN_32BIT="arch -i386 -ppc" + elif test "$UNIVERSAL_ARCHS" = "intel" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + ARCH_RUN_32BIT="arch -i386" + + elif test "$UNIVERSAL_ARCHS" = "3-way" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64" + ARCH_RUN_32BIT="arch -i386 -ppc" + else AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all]) @@ -977,6 +985,15 @@ # that's the first OS release where # 4-way builds make sense. cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "3-way"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "intel"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then + cur_target='10.5' fi else if test `arch` = "i386"; then @@ -1539,7 +1556,7 @@ else LIBTOOL_CRUFT="" fi - AC_TRY_RUN([[ + AC_TRY_RUN([ #include int main(int argc, char*argv[]) { @@ -1548,9 +1565,9 @@ } else { return 1; } - ]], ac_osx_32bit=yes, + ], ac_osx_32bit=yes, ac_osx_32bit=no, - ac_osx_32bit=no) + ac_osx_32bit=yes) if test "${ac_osx_32bit}" = "yes"; then case `arch` in From ncoghlan at gmail.com Mon Sep 7 12:59:34 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Mon, 07 Sep 2009 20:59:34 +1000 Subject: [Python-checkins] r74699 - python/trunk/Python/bltinmodule.c In-Reply-To: <4aa43b21.0b67f10a.201f.5825SMTPIN_ADDED@mx.google.com> References: <4aa43b21.0b67f10a.201f.5825SMTPIN_ADDED@mx.google.com> Message-ID: <4AA4E796.90004@gmail.com> benjamin.peterson wrote: > Author: benjamin.peterson > Date: Mon Sep 7 00:43:39 2009 > New Revision: 74699 > > Log: > PyObject_GetIter can set an error for its self just fine You're losing information with this change - the current error messages are the way they are so that you know *which* argument out of an arbitrary number of them isn't iterable. Consider: >>> a, b = [], 1 >>> zip(a, b) Traceback (most recent call last): File "", line 1, in TypeError: zip argument #2 must support iteration >>> map(str, a, b) Traceback (most recent call last): File "", line 1, in TypeError: argument 3 to map() must support iteration The current head is now much less helpful: >>> a, b = [], 1 >>> zip(a, b) Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not iterable >>> map(str, a, b) Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not iterable Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From python-checkins at python.org Mon Sep 7 15:02:20 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 07 Sep 2009 13:02:20 -0000 Subject: [Python-checkins] r74702 - python/trunk/Python/bltinmodule.c Message-ID: Author: benjamin.peterson Date: Mon Sep 7 15:02:15 2009 New Revision: 74702 Log: revert r74699 since it loses useful error information Modified: python/trunk/Python/bltinmodule.c Modified: python/trunk/Python/bltinmodule.c ============================================================================== --- python/trunk/Python/bltinmodule.c (original) +++ python/trunk/Python/bltinmodule.c Mon Sep 7 15:02:15 2009 @@ -968,8 +968,14 @@ /* Get iterator. */ curseq = PyTuple_GetItem(args, i+1); sqp->it = PyObject_GetIter(curseq); - if (sqp->it == NULL) + if (sqp->it == NULL) { + static char errmsg[] = + "argument %d to map() must support iteration"; + char errbuf[sizeof(errmsg) + 25]; + PyOS_snprintf(errbuf, sizeof(errbuf), errmsg, i+2); + PyErr_SetString(PyExc_TypeError, errbuf); goto Fail_2; + } /* Update len. */ curlen = _PyObject_LengthHint(curseq, 8); @@ -2457,8 +2463,13 @@ for (i = 0; i < itemsize; ++i) { PyObject *item = PyTuple_GET_ITEM(args, i); PyObject *it = PyObject_GetIter(item); - if (it == NULL) + if (it == NULL) { + if (PyErr_ExceptionMatches(PyExc_TypeError)) + PyErr_Format(PyExc_TypeError, + "zip argument #%zd must support iteration", + i+1); goto Fail_ret_itlist; + } PyTuple_SET_ITEM(itlist, i, it); } From python-checkins at python.org Mon Sep 7 15:03:49 2009 From: python-checkins at python.org (benjamin.peterson) Date: Mon, 07 Sep 2009 13:03:49 -0000 Subject: [Python-checkins] r74703 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Mon Sep 7 15:03:49 2009 New Revision: 74703 Log: Blocked revisions 74699,74702 via svnmerge ........ r74699 | benjamin.peterson | 2009-09-06 17:43:39 -0500 (Sun, 06 Sep 2009) | 1 line PyObject_GetIter can set an error for its self just fine ........ r74702 | benjamin.peterson | 2009-09-07 08:02:15 -0500 (Mon, 07 Sep 2009) | 1 line revert r74699 since it loses useful error information ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Mon Sep 7 18:17:41 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 07 Sep 2009 16:17:41 -0000 Subject: [Python-checkins] r74704 - in python/trunk: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Mon Sep 7 18:17:41 2009 New Revision: 74704 Log: Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier. Modified: python/trunk/Lib/decimal.py python/trunk/Lib/test/test_decimal.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/decimal.py ============================================================================== --- python/trunk/Lib/decimal.py (original) +++ python/trunk/Lib/decimal.py Mon Sep 7 18:17:41 2009 @@ -5512,7 +5512,7 @@ # if format type is 'g' or 'G' then a precision of 0 makes little # sense; convert it to 1. Same if format type is unspecified. if format_dict['precision'] == 0: - if format_dict['type'] in 'gG' or format_dict['type'] is None: + if format_dict['type'] is None or format_dict['type'] in 'gG': format_dict['precision'] = 1 # determine thousands separator, grouping, and decimal separator, and Modified: python/trunk/Lib/test/test_decimal.py ============================================================================== --- python/trunk/Lib/test/test_decimal.py (original) +++ python/trunk/Lib/test/test_decimal.py Mon Sep 7 18:17:41 2009 @@ -760,6 +760,9 @@ (',%', '123.456789', '12,345.6789%'), (',e', '123456', '1.23456e+5'), (',E', '123456', '1.23456E+5'), + + # issue 6850 + ('a=-7.0', '0.12345', 'aaaa0.1'), ] for fmt, d, result in test_values: self.assertEqual(format(Decimal(d), fmt), result) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Sep 7 18:17:41 2009 @@ -366,6 +366,9 @@ Library ------- +- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats + with no type specifier. + - Issue #4937: plat-mac/bundlebuilder revers to non-existing version.plist - Issue #6838: Use a list to accumulate the value instead of From python-checkins at python.org Mon Sep 7 18:19:35 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 07 Sep 2009 16:19:35 -0000 Subject: [Python-checkins] r74705 - in python/branches/release26-maint: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Mon Sep 7 18:19:35 2009 New Revision: 74705 Log: Merged revisions 74704 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74704 | mark.dickinson | 2009-09-07 17:17:41 +0100 (Mon, 07 Sep 2009) | 3 lines Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/decimal.py python/branches/release26-maint/Lib/test/test_decimal.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/decimal.py ============================================================================== --- python/branches/release26-maint/Lib/decimal.py (original) +++ python/branches/release26-maint/Lib/decimal.py Mon Sep 7 18:19:35 2009 @@ -5447,7 +5447,7 @@ # if format type is 'g' or 'G' then a precision of 0 makes little # sense; convert it to 1. Same if format type is unspecified. if format_dict['precision'] == 0: - if format_dict['type'] in 'gG' or format_dict['type'] is None: + if format_dict['type'] is None or format_dict['type'] in 'gG': format_dict['precision'] = 1 # record whether return type should be str or unicode Modified: python/branches/release26-maint/Lib/test/test_decimal.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_decimal.py (original) +++ python/branches/release26-maint/Lib/test/test_decimal.py Mon Sep 7 18:19:35 2009 @@ -716,6 +716,9 @@ ('>6', '123', ' 123'), ('^6', '123', ' 123 '), ('=+6', '123', '+ 123'), + + # issue 6850 + ('a=-7.0', '0.12345', 'aaaa0.1'), ] for fmt, d, result in test_values: self.assertEqual(format(Decimal(d), fmt), result) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Mon Sep 7 18:19:35 2009 @@ -74,6 +74,9 @@ Library ------- +- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats + with no type specifier. + - Issue #4937: plat-mac/bundlebuilder revers to non-existing version.plist - Issue #6838: Use a list to accumulate the value instead of From python-checkins at python.org Mon Sep 7 18:21:56 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 07 Sep 2009 16:21:56 -0000 Subject: [Python-checkins] r74706 - in python/branches/py3k: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Mon Sep 7 18:21:56 2009 New Revision: 74706 Log: Merged revisions 74704 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74704 | mark.dickinson | 2009-09-07 17:17:41 +0100 (Mon, 07 Sep 2009) | 3 lines Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/decimal.py python/branches/py3k/Lib/test/test_decimal.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/decimal.py ============================================================================== --- python/branches/py3k/Lib/decimal.py (original) +++ python/branches/py3k/Lib/decimal.py Mon Sep 7 18:21:56 2009 @@ -5592,7 +5592,7 @@ # if format type is 'g' or 'G' then a precision of 0 makes little # sense; convert it to 1. Same if format type is unspecified. if format_dict['precision'] == 0: - if format_dict['type'] in 'gG' or format_dict['type'] is None: + if format_dict['type'] is None or format_dict['type'] in 'gG': format_dict['precision'] = 1 # determine thousands separator, grouping, and decimal separator, and 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 Mon Sep 7 18:21:56 2009 @@ -749,6 +749,9 @@ (',%', '123.456789', '12,345.6789%'), (',e', '123456', '1.23456e+5'), (',E', '123456', '1.23456E+5'), + + # issue 6850 + ('a=-7.0', '0.12345', 'aaaa0.1'), ] for fmt, d, result in test_values: self.assertEqual(format(Decimal(d), fmt), result) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Sep 7 18:21:56 2009 @@ -70,6 +70,9 @@ Library ------- +- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats + with no type specifier. + - Issue #6239: ctypes.c_char_p return value must return bytes. - Issue #6838: Use a list to accumulate the value instead of From python-checkins at python.org Mon Sep 7 18:23:27 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 07 Sep 2009 16:23:27 -0000 Subject: [Python-checkins] r74707 - in python/branches/release31-maint: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Mon Sep 7 18:23:26 2009 New Revision: 74707 Log: Merged revisions 74706 via svnmerge from svn+ssh://pythondev at www.python.org/python/branches/py3k ................ r74706 | mark.dickinson | 2009-09-07 17:21:56 +0100 (Mon, 07 Sep 2009) | 10 lines Merged revisions 74704 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74704 | mark.dickinson | 2009-09-07 17:17:41 +0100 (Mon, 07 Sep 2009) | 3 lines Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/decimal.py python/branches/release31-maint/Lib/test/test_decimal.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/decimal.py ============================================================================== --- python/branches/release31-maint/Lib/decimal.py (original) +++ python/branches/release31-maint/Lib/decimal.py Mon Sep 7 18:23:26 2009 @@ -5592,7 +5592,7 @@ # if format type is 'g' or 'G' then a precision of 0 makes little # sense; convert it to 1. Same if format type is unspecified. if format_dict['precision'] == 0: - if format_dict['type'] in 'gG' or format_dict['type'] is None: + if format_dict['type'] is None or format_dict['type'] in 'gG': format_dict['precision'] = 1 # determine thousands separator, grouping, and decimal separator, and Modified: python/branches/release31-maint/Lib/test/test_decimal.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_decimal.py (original) +++ python/branches/release31-maint/Lib/test/test_decimal.py Mon Sep 7 18:23:26 2009 @@ -749,6 +749,9 @@ (',%', '123.456789', '12,345.6789%'), (',e', '123456', '1.23456e+5'), (',E', '123456', '1.23456E+5'), + + # issue 6850 + ('a=-7.0', '0.12345', 'aaaa0.1'), ] for fmt, d, result in test_values: self.assertEqual(format(Decimal(d), fmt), result) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Mon Sep 7 18:23:26 2009 @@ -52,6 +52,9 @@ Library ------- +- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats + with no type specifier. + - Issue #6239: ctypes.c_char_p return value must return bytes. - Issue #6838: Use a list to accumulate the value instead of From python-checkins at python.org Mon Sep 7 20:04:59 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 07 Sep 2009 18:04:59 -0000 Subject: [Python-checkins] r74708 - in python/trunk: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Mon Sep 7 20:04:58 2009 New Revision: 74708 Log: #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. Modified: python/trunk/Lib/decimal.py python/trunk/Lib/test/test_decimal.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/decimal.py ============================================================================== --- python/trunk/Lib/decimal.py (original) +++ python/trunk/Lib/decimal.py Mon Sep 7 20:04:58 2009 @@ -1555,10 +1555,9 @@ """Converts self to an int, truncating if necessary.""" if self._is_special: if self._isnan(): - context = getcontext() - return context._raise_error(InvalidContext) + raise ValueError("Cannot convert NaN to integer") elif self._isinfinity(): - raise OverflowError("Cannot convert infinity to int") + raise OverflowError("Cannot convert infinity to integer") s = (-1)**self._sign if self._exp >= 0: return s*int(self._int)*10**self._exp Modified: python/trunk/Lib/test/test_decimal.py ============================================================================== --- python/trunk/Lib/test/test_decimal.py (original) +++ python/trunk/Lib/test/test_decimal.py Mon Sep 7 20:04:58 2009 @@ -1489,6 +1489,16 @@ r = d.to_integral(ROUND_DOWN) self.assertEqual(Decimal(int(d)), r) + self.assertRaises(ValueError, int, Decimal('-nan')) + self.assertRaises(ValueError, int, Decimal('snan')) + self.assertRaises(OverflowError, int, Decimal('inf')) + self.assertRaises(OverflowError, int, Decimal('-inf')) + + self.assertRaises(ValueError, long, Decimal('-nan')) + self.assertRaises(ValueError, long, Decimal('snan')) + self.assertRaises(OverflowError, long, Decimal('inf')) + self.assertRaises(OverflowError, long, Decimal('-inf')) + def test_trunc(self): for x in range(-250, 250): s = '%0.2f' % (x / 100.0) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Sep 7 20:04:58 2009 @@ -366,6 +366,10 @@ Library ------- +- Issue #6795: int(Decimal('nan')) now raises ValueError instead of + returning NaN or raising InvalidContext. Also, fix infinite recursion + in long(Decimal('nan')). + - Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier. From python-checkins at python.org Mon Sep 7 20:08:12 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 07 Sep 2009 18:08:12 -0000 Subject: [Python-checkins] r74709 - in python/branches/py3k: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Mon Sep 7 20:08:12 2009 New Revision: 74709 Log: Merged revisions 74708 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74708 | mark.dickinson | 2009-09-07 19:04:58 +0100 (Mon, 07 Sep 2009) | 2 lines #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/decimal.py python/branches/py3k/Lib/test/test_decimal.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/decimal.py ============================================================================== --- python/branches/py3k/Lib/decimal.py (original) +++ python/branches/py3k/Lib/decimal.py Mon Sep 7 20:08:12 2009 @@ -1553,10 +1553,9 @@ """Converts self to an int, truncating if necessary.""" if self._is_special: if self._isnan(): - context = getcontext() - return context._raise_error(InvalidContext) + raise ValueError("Cannot convert NaN to integer") elif self._isinfinity(): - raise OverflowError("Cannot convert infinity to int") + raise OverflowError("Cannot convert infinity to integer") s = (-1)**self._sign if self._exp >= 0: return s*int(self._int)*10**self._exp 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 Mon Sep 7 20:08:12 2009 @@ -1543,6 +1543,11 @@ r = d.to_integral(ROUND_DOWN) self.assertEqual(Decimal(int(d)), r) + self.assertRaises(ValueError, int, Decimal('-nan')) + self.assertRaises(ValueError, int, Decimal('snan')) + self.assertRaises(OverflowError, int, Decimal('inf')) + self.assertRaises(OverflowError, int, Decimal('-inf')) + def test_trunc(self): for x in range(-250, 250): s = '%0.2f' % (x / 100.0) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Sep 7 20:08:12 2009 @@ -70,6 +70,10 @@ Library ------- +- Issue #6795: int(Decimal('nan')) now raises ValueError instead of + returning NaN or raising InvalidContext. Also, fix infinite recursion + in long(Decimal('nan')). + - Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier. From python-checkins at python.org Mon Sep 7 20:09:16 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 07 Sep 2009 18:09:16 -0000 Subject: [Python-checkins] r74710 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Mon Sep 7 20:09:16 2009 New Revision: 74710 Log: Blocked revisions 74709 via svnmerge ................ r74709 | mark.dickinson | 2009-09-07 19:08:12 +0100 (Mon, 07 Sep 2009) | 9 lines Merged revisions 74708 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74708 | mark.dickinson | 2009-09-07 19:04:58 +0100 (Mon, 07 Sep 2009) | 2 lines #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Mon Sep 7 20:09:46 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 07 Sep 2009 18:09:46 -0000 Subject: [Python-checkins] r74711 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Mon Sep 7 20:09:46 2009 New Revision: 74711 Log: Blocked revisions 74708 via svnmerge ........ r74708 | mark.dickinson | 2009-09-07 19:04:58 +0100 (Mon, 07 Sep 2009) | 2 lines #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. ........ Modified: python/branches/release26-maint/ (props changed) From brett at python.org Mon Sep 7 21:15:54 2009 From: brett at python.org (Brett Cannon) Date: Mon, 7 Sep 2009 12:15:54 -0700 Subject: [Python-checkins] r74701 - in python/trunk: configure configure.in In-Reply-To: <4aa4a437.1867f10a.47d5.ffff88faSMTPIN_ADDED@mx.google.com> References: <4aa4a437.1867f10a.47d5.ffff88faSMTPIN_ADDED@mx.google.com> Message-ID: Are you planning on forward-porting this to py3k, Ronald? On Sun, Sep 6, 2009 at 23:12, ronald.oussoren wrote: > Author: ronald.oussoren > Date: Mon Sep ?7 08:12:00 2009 > New Revision: 74701 > > Log: > Fix typo in configure.in > > > Modified: > ? python/trunk/configure > ? python/trunk/configure.in > > Modified: python/trunk/configure > ============================================================================== > --- python/trunk/configure ? ? ?(original) > +++ python/trunk/configure ? ? ?Mon Sep ?7 08:12:00 2009 > @@ -1,5 +1,5 @@ > ?#! /bin/sh > -# From configure.in Revision: 74667 . > +# From configure.in Revision: 74672 . > ?# Guess values for system-dependent variables and create Makefiles. > ?# Generated by GNU Autoconf 2.61 for python 2.7. > ?# > @@ -1336,7 +1336,7 @@ > ? --without-PACKAGE ? ? ? do not use PACKAGE (same as --with-PACKAGE=no) > ? --with-universal-archs=ARCH > ? ? ? ? ? ? ? ? ? ? ? ? ? select architectures for universal build ("32-bit", > - ? ? ? ? ? ? ? ? ? ? ? ? ?"64-bit" or "all") > + ? ? ? ? ? ? ? ? ? ? ? ? ?"64-bit", "3-way", "intel" or "all") > ? --with-framework-name=FRAMEWORK > ? ? ? ? ? ? ? ? ? ? ? ? ? specify an alternate name of the framework built > ? ? ? ? ? ? ? ? ? ? ? ? ? with --enable-framework > @@ -4694,6 +4694,14 @@ > ? ? ? ? ? ? ? ? ? UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" > ? ? ? ? ? ? ? ? ? ARCH_RUN_32BIT="arch -i386 -ppc" > > + ? ? ? ? ? ? ? ?elif test "$UNIVERSAL_ARCHS" = "intel" ; then > + ? ? ? ? ? ? ? ? ?UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" > + ? ? ? ? ? ? ? ? ?ARCH_RUN_32BIT="arch -i386" > + > + ? ? ? ? ? ? ? ?elif test "$UNIVERSAL_ARCHS" = "3-way" ; then > + ? ? ? ? ? ? ? ? ?UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -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;} > @@ -4721,6 +4729,15 @@ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# that's the first OS release where > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# 4-way builds make sense. > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cur_target='10.5' > + > + ? ? ? ? ? ? ? ? ? ? ? ? ? elif test "${UNIVERSAL_ARCHS}" = "3-way"; then > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cur_target='10.5' > + > + ? ? ? ? ? ? ? ? ? ? ? ? ? elif test "${UNIVERSAL_ARCHS}" = "intel"; then > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cur_target='10.5' > + > + ? ? ? ? ? ? ? ? ? ? ? ? ? elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cur_target='10.5' > ? ? ? ? ? ? ? ? ? ? ? ? ? ?fi > ? ? ? ? ? ? ? ? ? ?else > ? ? ? ? ? ? ? ? ? ? ? ? ? ?if test `arch` = "i386"; then > @@ -14488,7 +14505,7 @@ > ? ? ? ? ? ? LIBTOOL_CRUFT="" > ? ? fi > ? ? if test "$cross_compiling" = yes; then > - ?ac_osx_32bit=no > + ?ac_osx_32bit=yes > ?else > ? cat >conftest.$ac_ext <<_ACEOF > ?/* confdefs.h. ?*/ > @@ -14496,7 +14513,7 @@ > ?cat confdefs.h >>conftest.$ac_ext > ?cat >>conftest.$ac_ext <<_ACEOF > ?/* end confdefs.h. ?*/ > -[ > + > ? ? #include > ? ? int main(int argc, char*argv[]) > ? ? { > @@ -14505,7 +14522,7 @@ > ? ? ? } else { > ? ? ? ? ?return 1; > ? ? ? } > - ? ?] > + > ?_ACEOF > ?rm -f conftest$ac_exeext > ?if { (ac_try="$ac_link" > > Modified: python/trunk/configure.in > ============================================================================== > --- python/trunk/configure.in ? (original) > +++ python/trunk/configure.in ? Mon Sep ?7 08:12:00 2009 > @@ -114,7 +114,7 @@ > ?UNIVERSAL_ARCHS="32-bit" > ?AC_MSG_CHECKING(for --with-universal-archs) > ?AC_ARG_WITH(universal-archs, > - ? ?AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit" or "all")), > + ? ?AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit", "3-way", "intel" or "all")), > ?[ > ? ? ? ?AC_MSG_RESULT($withval) > ? ? ? ?UNIVERSAL_ARCHS="$withval" > @@ -952,6 +952,14 @@ > ? ? ? ? ? ? ? ? ? UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" > ? ? ? ? ? ? ? ? ? ARCH_RUN_32BIT="arch -i386 -ppc" > > + ? ? ? ? ? ? ? ?elif test "$UNIVERSAL_ARCHS" = "intel" ; then > + ? ? ? ? ? ? ? ? ?UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" > + ? ? ? ? ? ? ? ? ?ARCH_RUN_32BIT="arch -i386" > + > + ? ? ? ? ? ? ? ?elif test "$UNIVERSAL_ARCHS" = "3-way" ; then > + ? ? ? ? ? ? ? ? ?UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64" > + ? ? ? ? ? ? ? ? ?ARCH_RUN_32BIT="arch -i386 -ppc" > + > ? ? ? ? ? ? ? ? else > ? ? ? ? ? ? ? ? ? AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all]) > > @@ -977,6 +985,15 @@ > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# that's the first OS release where > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?# 4-way builds make sense. > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cur_target='10.5' > + > + ? ? ? ? ? ? ? ? ? ? ? ? ? elif test "${UNIVERSAL_ARCHS}" = "3-way"; then > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cur_target='10.5' > + > + ? ? ? ? ? ? ? ? ? ? ? ? ? elif test "${UNIVERSAL_ARCHS}" = "intel"; then > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cur_target='10.5' > + > + ? ? ? ? ? ? ? ? ? ? ? ? ? elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cur_target='10.5' > ? ? ? ? ? ? ? ? ? ? ? ? ? ?fi > ? ? ? ? ? ? ? ? ? ?else > ? ? ? ? ? ? ? ? ? ? ? ? ? ?if test `arch` = "i386"; then > @@ -1539,7 +1556,7 @@ > ? ? ? ? else > ? ? ? ? ? ? LIBTOOL_CRUFT="" > ? ? fi > - ? ?AC_TRY_RUN([[ > + ? ?AC_TRY_RUN([ > ? ? #include > ? ? int main(int argc, char*argv[]) > ? ? { > @@ -1548,9 +1565,9 @@ > ? ? ? } else { > ? ? ? ? ?return 1; > ? ? ? } > - ? ?]], ac_osx_32bit=yes, > + ? ?], ac_osx_32bit=yes, > ? ? ? ?ac_osx_32bit=no, > - ? ? ? ac_osx_32bit=no) > + ? ? ? ac_osx_32bit=yes) > > ? ? if test "${ac_osx_32bit}" = "yes"; then > ? ? ? ?case `arch` in > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > http://mail.python.org/mailman/listinfo/python-checkins > From python-checkins at python.org Tue Sep 8 09:10:08 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 08 Sep 2009 07:10:08 -0000 Subject: [Python-checkins] r74712 - in python/branches/release26-maint: configure configure.in Message-ID: Author: ronald.oussoren Date: Tue Sep 8 09:10:07 2009 New Revision: 74712 Log: Merged revisions 74701 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74701 | ronald.oussoren | 2009-09-07 08:12:00 +0200 (Mon, 07 Sep 2009) | 2 lines Fix typo in configure.in ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/configure python/branches/release26-maint/configure.in Modified: python/branches/release26-maint/configure ============================================================================== --- python/branches/release26-maint/configure (original) +++ python/branches/release26-maint/configure Tue Sep 8 09:10:07 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 72873 . +# From configure.in Revision: 74681 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.6. # @@ -1332,7 +1332,7 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-universal-archs=ARCH select architectures for universal build ("32-bit", - "64-bit" or "all") + "64-bit", "3-way", "intel" or "all") --with-framework-name=FRAMEWORK specify an alternate name of the framework built with --enable-framework @@ -1898,7 +1898,6 @@ -ARCH_RUN_32BIT= UNIVERSAL_ARCHS="32-bit" @@ -3842,7 +3841,7 @@ { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -rm -f conftest* +rm -f -r conftest* @@ -4661,11 +4660,20 @@ elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" + ARCH_RUN_32BIT="true" elif test "$UNIVERSAL_ARCHS" = "all" ; then UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" ARCH_RUN_32BIT="arch -i386 -ppc" + elif test "$UNIVERSAL_ARCHS" = "intel" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + ARCH_RUN_32BIT="arch -i386" + + elif test "$UNIVERSAL_ARCHS" = "3-way" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -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;} @@ -4686,12 +4694,31 @@ 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' + if test ${enable_universalsdk}; then + 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' + + elif test "${UNIVERSAL_ARCHS}" = "3-way"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "intel"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then + cur_target='10.5' + fi + else + if test `arch` = "i386"; then + # On Intel macs default to a deployment + # target of 10.4, that's the first OSX + # release with Intel support. + cur_target="10.4" + fi + fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} @@ -5353,7 +5380,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -5374,7 +5401,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -6472,7 +6499,7 @@ fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $was_it_defined" >&5 echo "${ECHO_T}$was_it_defined" >&6; } @@ -7002,7 +7029,7 @@ else ac_cv_type_uid_t=no fi -rm -f conftest* +rm -f -r conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 @@ -12914,13 +12941,15 @@ esac +ARCH_RUN_32BIT="" + case $ac_sys_system/$ac_sys_release in Darwin/[01567]\..*) LIBTOOL_CRUFT="-framework System -lcc_dynamic" if test "${enable_universalsdk}"; then : else - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`" fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; @@ -12932,7 +12961,94 @@ else LIBTOOL_CRUFT="" fi - LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`" + if test "$cross_compiling" = yes; then + ac_osx_32bit=yes +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(int argc, char*argv[]) + { + if (sizeof(long) == 4) { + return 0; + } else { + return 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 "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_osx_32bit=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 ) +ac_osx_32bit=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + if test "${ac_osx_32bit}" = "yes"; then + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="i386" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + else + case `arch` in + i386) + MACOSX_DEFAULT_ARCH="x86_64" + ;; + ppc) + MACOSX_DEFAULT_ARCH="ppc64" + ;; + *) + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + #ARCH_RUN_32BIT="true" + fi + + LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac @@ -14033,7 +14149,7 @@ else unistd_defines_pthreads=no fi -rm -f conftest* +rm -f -r conftest* { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 echo "${ECHO_T}$unistd_defines_pthreads" >&6; } @@ -15647,7 +15763,7 @@ $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f conftest* +rm -f -r conftest* ;; kame) @@ -15670,7 +15786,7 @@ ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-glibc) @@ -15691,7 +15807,7 @@ ipv6type=$i; ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-inet6) @@ -15729,7 +15845,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; v6d) @@ -15752,7 +15868,7 @@ ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; zeta) @@ -15774,7 +15890,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; esac @@ -23367,7 +23483,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi @@ -23637,7 +23753,7 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi Modified: python/branches/release26-maint/configure.in ============================================================================== --- python/branches/release26-maint/configure.in (original) +++ python/branches/release26-maint/configure.in Tue Sep 8 09:10:07 2009 @@ -97,7 +97,7 @@ UNIVERSAL_ARCHS="32-bit" AC_MSG_CHECKING(for --with-universal-archs) AC_ARG_WITH(universal-archs, - AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit" or "all")), + AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit", "3-way", "intel" or "all")), [ AC_MSG_RESULT($withval) UNIVERSAL_ARCHS="$withval" @@ -926,6 +926,14 @@ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" ARCH_RUN_32BIT="arch -i386 -ppc" + elif test "$UNIVERSAL_ARCHS" = "intel" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + ARCH_RUN_32BIT="arch -i386" + + elif test "$UNIVERSAL_ARCHS" = "3-way" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64" + ARCH_RUN_32BIT="arch -i386 -ppc" + else AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all]) @@ -951,6 +959,15 @@ # that's the first OS release where # 4-way builds make sense. cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "3-way"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "intel"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then + cur_target='10.5' fi else if test `arch` = "i386"; then @@ -1550,7 +1567,7 @@ else LIBTOOL_CRUFT="" fi - AC_TRY_RUN([[ + AC_TRY_RUN([ #include int main(int argc, char*argv[]) { @@ -1559,9 +1576,10 @@ } else { return 1; } - ]], ac_osx_32bit=yes, + } + ], ac_osx_32bit=yes, ac_osx_32bit=no, - ac_osx_32bit=no) + ac_osx_32bit=yes) if test "${ac_osx_32bit}" = "yes"; then case `arch` in From python-checkins at python.org Tue Sep 8 09:12:42 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 08 Sep 2009 07:12:42 -0000 Subject: [Python-checkins] r74713 - in python/branches/py3k: configure configure.in Message-ID: Author: ronald.oussoren Date: Tue Sep 8 09:12:42 2009 New Revision: 74713 Log: Merged revisions 74701 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74701 | ronald.oussoren | 2009-09-07 08:12:00 +0200 (Mon, 07 Sep 2009) | 2 lines Fix typo in configure.in ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/configure python/branches/py3k/configure.in Modified: python/branches/py3k/configure ============================================================================== --- python/branches/py3k/configure (original) +++ python/branches/py3k/configure Tue Sep 8 09:12:42 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74669 . +# From configure.in Revision: 74682 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.2. # @@ -1330,7 +1330,7 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-universal-archs=ARCH select architectures for universal build ("32-bit", - "64-bit" or "all") + "64-bit", "3-way", "intel" or "all") --with-framework-name=FRAMEWORK specify an alternate name of the framework built with --enable-framework @@ -4659,6 +4659,14 @@ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" ARCH_RUN_32BIT="arch -i386 -ppc" + elif test "$UNIVERSAL_ARCHS" = "intel" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + ARCH_RUN_32BIT="arch -i386" + + elif test "$UNIVERSAL_ARCHS" = "3-way" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -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;} @@ -4686,6 +4694,15 @@ # that's the first OS release where # 4-way builds make sense. cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "3-way"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "intel"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then + cur_target='10.5' fi else if test `arch` = "i386"; then @@ -14419,7 +14436,7 @@ LIBTOOL_CRUFT="" fi if test "$cross_compiling" = yes; then - ac_osx_32bit=no + ac_osx_32bit=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -14427,7 +14444,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -[ + #include int main(int argc, char*argv[]) { @@ -14436,7 +14453,8 @@ } else { return 1; } - ] + } + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" Modified: python/branches/py3k/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Tue Sep 8 09:12:42 2009 @@ -114,7 +114,7 @@ UNIVERSAL_ARCHS="32-bit" AC_MSG_CHECKING(for --with-universal-archs) AC_ARG_WITH(universal-archs, - AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit" or "all")), + AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit", "3-way", "intel" or "all")), [ AC_MSG_RESULT($withval) UNIVERSAL_ARCHS="$withval" @@ -925,6 +925,14 @@ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" ARCH_RUN_32BIT="arch -i386 -ppc" + elif test "$UNIVERSAL_ARCHS" = "intel" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + ARCH_RUN_32BIT="arch -i386" + + elif test "$UNIVERSAL_ARCHS" = "3-way" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64" + ARCH_RUN_32BIT="arch -i386 -ppc" + else AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all]) @@ -950,6 +958,15 @@ # that's the first OS release where # 4-way builds make sense. cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "3-way"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "intel"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then + cur_target='10.5' fi else if test `arch` = "i386"; then @@ -1486,7 +1503,7 @@ else LIBTOOL_CRUFT="" fi - AC_TRY_RUN([[ + AC_TRY_RUN([ #include int main(int argc, char*argv[]) { @@ -1495,9 +1512,10 @@ } else { return 1; } - ]], ac_osx_32bit=yes, + } + ], ac_osx_32bit=yes, ac_osx_32bit=no, - ac_osx_32bit=no) + ac_osx_32bit=yes) if test "${ac_osx_32bit}" = "yes"; then case `arch` in From python-checkins at python.org Tue Sep 8 09:13:54 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 08 Sep 2009 07:13:54 -0000 Subject: [Python-checkins] r74714 - in python/branches/release31-maint: configure configure.in Message-ID: Author: ronald.oussoren Date: Tue Sep 8 09:13:53 2009 New Revision: 74714 Log: Merged revisions 74713 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74713 | ronald.oussoren | 2009-09-08 09:12:42 +0200 (Tue, 08 Sep 2009) | 9 lines Merged revisions 74701 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74701 | ronald.oussoren | 2009-09-07 08:12:00 +0200 (Mon, 07 Sep 2009) | 2 lines Fix typo in configure.in ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/configure python/branches/release31-maint/configure.in Modified: python/branches/release31-maint/configure ============================================================================== --- python/branches/release31-maint/configure (original) +++ python/branches/release31-maint/configure Tue Sep 8 09:13:53 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 73307 . +# From configure.in Revision: 74683 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.1. # @@ -1330,7 +1330,7 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-universal-archs=ARCH select architectures for universal build ("32-bit", - "64-bit" or "all") + "64-bit", "3-way", "intel" or "all") --with-framework-name=FRAMEWORK specify an alternate name of the framework built with --enable-framework @@ -4654,6 +4654,14 @@ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" ARCH_RUN_32BIT="arch -i386 -ppc" + elif test "$UNIVERSAL_ARCHS" = "intel" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + ARCH_RUN_32BIT="arch -i386" + + elif test "$UNIVERSAL_ARCHS" = "3-way" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -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;} @@ -4681,6 +4689,15 @@ # that's the first OS release where # 4-way builds make sense. cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "3-way"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "intel"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then + cur_target='10.5' fi else if test `arch` = "i386"; then @@ -13280,7 +13297,7 @@ LIBTOOL_CRUFT="" fi if test "$cross_compiling" = yes; then - ac_osx_32bit=no + ac_osx_32bit=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -13288,7 +13305,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -[ + #include int main(int argc, char*argv[]) { @@ -13297,7 +13314,8 @@ } else { return 1; } - ] + } + _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" Modified: python/branches/release31-maint/configure.in ============================================================================== --- python/branches/release31-maint/configure.in (original) +++ python/branches/release31-maint/configure.in Tue Sep 8 09:13:53 2009 @@ -106,7 +106,7 @@ UNIVERSAL_ARCHS="32-bit" AC_MSG_CHECKING(for --with-universal-archs) AC_ARG_WITH(universal-archs, - AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit" or "all")), + AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit", "3-way", "intel" or "all")), [ AC_MSG_RESULT($withval) UNIVERSAL_ARCHS="$withval" @@ -916,6 +916,14 @@ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" ARCH_RUN_32BIT="arch -i386 -ppc" + elif test "$UNIVERSAL_ARCHS" = "intel" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" + ARCH_RUN_32BIT="arch -i386" + + elif test "$UNIVERSAL_ARCHS" = "3-way" ; then + UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64" + ARCH_RUN_32BIT="arch -i386 -ppc" + else AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all]) @@ -941,6 +949,15 @@ # that's the first OS release where # 4-way builds make sense. cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "3-way"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "intel"; then + cur_target='10.5' + + elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then + cur_target='10.5' fi else if test `arch` = "i386"; then @@ -1519,7 +1536,7 @@ else LIBTOOL_CRUFT="" fi - AC_TRY_RUN([[ + AC_TRY_RUN([ #include int main(int argc, char*argv[]) { @@ -1528,9 +1545,10 @@ } else { return 1; } - ]], ac_osx_32bit=yes, + } + ], ac_osx_32bit=yes, ac_osx_32bit=no, - ac_osx_32bit=no) + ac_osx_32bit=yes) if test "${ac_osx_32bit}" = "yes"; then case `arch` in From python-checkins at python.org Tue Sep 8 09:17:10 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 08 Sep 2009 07:17:10 -0000 Subject: [Python-checkins] r74715 - in python/trunk: configure configure.in Message-ID: Author: ronald.oussoren Date: Tue Sep 8 09:17:10 2009 New Revision: 74715 Log: This is an update to r74701. How hard can it be to get a configure test right. This patch has already been backported as part of the backport of r74701, which is how I found this problem. Modified: python/trunk/configure python/trunk/configure.in Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Tue Sep 8 09:17:10 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74672 . +# From configure.in Revision: 74701 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -14522,6 +14522,7 @@ } else { return 1; } + } _ACEOF rm -f conftest$ac_exeext Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Tue Sep 8 09:17:10 2009 @@ -1565,6 +1565,7 @@ } else { return 1; } + } ], ac_osx_32bit=yes, ac_osx_32bit=no, ac_osx_32bit=yes) From python-checkins at python.org Tue Sep 8 21:20:54 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 08 Sep 2009 19:20:54 -0000 Subject: [Python-checkins] r74717 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Tue Sep 8 21:20:53 2009 New Revision: 74717 Log: Unblocked revisions 74708 via svnmerge ........ r74708 | mark.dickinson | 2009-09-07 19:04:58 +0100 (Mon, 07 Sep 2009) | 2 lines #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Tue Sep 8 21:22:18 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 08 Sep 2009 19:22:18 -0000 Subject: [Python-checkins] r74718 - in python/branches/release26-maint: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Tue Sep 8 21:22:18 2009 New Revision: 74718 Log: Merged revisions 74708 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74708 | mark.dickinson | 2009-09-07 19:04:58 +0100 (Mon, 07 Sep 2009) | 2 lines #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/decimal.py python/branches/release26-maint/Lib/test/test_decimal.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/decimal.py ============================================================================== --- python/branches/release26-maint/Lib/decimal.py (original) +++ python/branches/release26-maint/Lib/decimal.py Tue Sep 8 21:22:18 2009 @@ -1512,10 +1512,9 @@ """Converts self to an int, truncating if necessary.""" if self._is_special: if self._isnan(): - context = getcontext() - return context._raise_error(InvalidContext) + raise ValueError("Cannot convert NaN to integer") elif self._isinfinity(): - raise OverflowError("Cannot convert infinity to int") + raise OverflowError("Cannot convert infinity to integer") s = (-1)**self._sign if self._exp >= 0: return s*int(self._int)*10**self._exp Modified: python/branches/release26-maint/Lib/test/test_decimal.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_decimal.py (original) +++ python/branches/release26-maint/Lib/test/test_decimal.py Tue Sep 8 21:22:18 2009 @@ -1372,6 +1372,16 @@ r = d.to_integral(ROUND_DOWN) self.assertEqual(Decimal(int(d)), r) + self.assertRaises(ValueError, int, Decimal('-nan')) + self.assertRaises(ValueError, int, Decimal('snan')) + self.assertRaises(OverflowError, int, Decimal('inf')) + self.assertRaises(OverflowError, int, Decimal('-inf')) + + self.assertRaises(ValueError, long, Decimal('-nan')) + self.assertRaises(ValueError, long, Decimal('snan')) + self.assertRaises(OverflowError, long, Decimal('inf')) + self.assertRaises(OverflowError, long, Decimal('-inf')) + def test_trunc(self): for x in range(-250, 250): s = '%0.2f' % (x / 100.0) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Tue Sep 8 21:22:18 2009 @@ -74,6 +74,10 @@ Library ------- +- Issue #6795: int(Decimal('nan')) now raises ValueError instead of + returning NaN or raising InvalidContext. Also, fix infinite recursion + in long(Decimal('nan')). + - Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier. From python-checkins at python.org Tue Sep 8 21:23:08 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 08 Sep 2009 19:23:08 -0000 Subject: [Python-checkins] r74719 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Tue Sep 8 21:23:07 2009 New Revision: 74719 Log: Unblocked revisions 74709 via svnmerge ................ r74709 | mark.dickinson | 2009-09-07 19:08:12 +0100 (Mon, 07 Sep 2009) | 9 lines Merged revisions 74708 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74708 | mark.dickinson | 2009-09-07 19:04:58 +0100 (Mon, 07 Sep 2009) | 2 lines #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Tue Sep 8 21:23:44 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 08 Sep 2009 19:23:44 -0000 Subject: [Python-checkins] r74720 - in python/branches/release31-maint: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Tue Sep 8 21:23:44 2009 New Revision: 74720 Log: Merged revisions 74709 via svnmerge from svn+ssh://pythondev at www.python.org/python/branches/py3k ................ r74709 | mark.dickinson | 2009-09-07 19:08:12 +0100 (Mon, 07 Sep 2009) | 9 lines Merged revisions 74708 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74708 | mark.dickinson | 2009-09-07 19:04:58 +0100 (Mon, 07 Sep 2009) | 2 lines #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/decimal.py python/branches/release31-maint/Lib/test/test_decimal.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/decimal.py ============================================================================== --- python/branches/release31-maint/Lib/decimal.py (original) +++ python/branches/release31-maint/Lib/decimal.py Tue Sep 8 21:23:44 2009 @@ -1553,10 +1553,9 @@ """Converts self to an int, truncating if necessary.""" if self._is_special: if self._isnan(): - context = getcontext() - return context._raise_error(InvalidContext) + raise ValueError("Cannot convert NaN to integer") elif self._isinfinity(): - raise OverflowError("Cannot convert infinity to int") + raise OverflowError("Cannot convert infinity to integer") s = (-1)**self._sign if self._exp >= 0: return s*int(self._int)*10**self._exp Modified: python/branches/release31-maint/Lib/test/test_decimal.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_decimal.py (original) +++ python/branches/release31-maint/Lib/test/test_decimal.py Tue Sep 8 21:23:44 2009 @@ -1543,6 +1543,11 @@ r = d.to_integral(ROUND_DOWN) self.assertEqual(Decimal(int(d)), r) + self.assertRaises(ValueError, int, Decimal('-nan')) + self.assertRaises(ValueError, int, Decimal('snan')) + self.assertRaises(OverflowError, int, Decimal('inf')) + self.assertRaises(OverflowError, int, Decimal('-inf')) + def test_trunc(self): for x in range(-250, 250): s = '%0.2f' % (x / 100.0) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Tue Sep 8 21:23:44 2009 @@ -52,6 +52,10 @@ Library ------- +- Issue #6795: int(Decimal('nan')) now raises ValueError instead of + returning NaN or raising InvalidContext. Also, fix infinite recursion + in long(Decimal('nan')). + - Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier. From python-checkins at python.org Tue Sep 8 21:24:36 2009 From: python-checkins at python.org (thomas.heller) Date: Tue, 08 Sep 2009 19:24:36 -0000 Subject: [Python-checkins] r74721 - python/trunk/Modules/_ctypes/callbacks.c Message-ID: Author: thomas.heller Date: Tue Sep 8 21:24:36 2009 New Revision: 74721 Log: Make ctypes compile again with older Python versions. Modified: python/trunk/Modules/_ctypes/callbacks.c Modified: python/trunk/Modules/_ctypes/callbacks.c ============================================================================== --- python/trunk/Modules/_ctypes/callbacks.c (original) +++ python/trunk/Modules/_ctypes/callbacks.c Tue Sep 8 21:24:36 2009 @@ -95,6 +95,55 @@ PyErr_Print(); } +#if (PY_VERSION_HEX < 0x02070000) +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 = PyString_FromString(""); + if (emptystring == NULL) + goto failed; + } + if (nulltuple == NULL) { + nulltuple = PyTuple_New(0); + if (nulltuple == NULL) + goto failed; + } + funcname_ob = PyString_FromString(funcname); + if (funcname_ob == NULL) + goto failed; + filename_ob = PyString_FromString(filename); + if (filename_ob == NULL) + goto failed; + + result = PyCode_New(0, /* argcount */ + 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; +} +#endif + /* after code that pyrex generates */ void _ctypes_add_traceback(char *funcname, char *filename, int lineno) From python-checkins at python.org Tue Sep 8 22:20:19 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 08 Sep 2009 20:20:19 -0000 Subject: [Python-checkins] r74723 - in python/trunk: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Tue Sep 8 22:20:19 2009 New Revision: 74723 Log: Issue #6857: Fix Decimal formatting to be consistent with existing float formatting: both are now right-aligned by default. Modified: python/trunk/Lib/decimal.py python/trunk/Lib/test/test_decimal.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/decimal.py ============================================================================== --- python/trunk/Lib/decimal.py (original) +++ python/trunk/Lib/decimal.py Tue Sep 8 22:20:19 2009 @@ -5497,7 +5497,10 @@ raise ValueError("Alignment conflicts with '0' in " "format specifier: " + format_spec) format_dict['fill'] = fill or ' ' - format_dict['align'] = align or '<' + # PEP 3101 originally specified that the default alignment should + # be left; it was later agreed that right-aligned makes more sense + # for numeric types. See http://bugs.python.org/issue6857. + format_dict['align'] = align or '>' # default sign handling: '-' for negative, '' for positive if format_dict['sign'] is None: Modified: python/trunk/Lib/test/test_decimal.py ============================================================================== --- python/trunk/Lib/test/test_decimal.py (original) +++ python/trunk/Lib/test/test_decimal.py Tue Sep 8 22:20:19 2009 @@ -712,6 +712,7 @@ ('', '1.00', '1.00'), # test alignment and padding + ('6', '123', ' 123'), ('<6', '123', '123 '), ('>6', '123', ' 123'), ('^6', '123', ' 123 '), @@ -741,7 +742,7 @@ (',', '-1234567', '-1,234,567'), (',', '-123456', '-123,456'), ('7,', '123456', '123,456'), - ('8,', '123456', '123,456 '), + ('8,', '123456', ' 123,456'), ('08,', '123456', '0,123,456'), # special case: extra 0 needed ('+08,', '123456', '+123,456'), # but not if there's a sign (' 08,', '123456', ' 123,456'), Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Tue Sep 8 22:20:19 2009 @@ -366,6 +366,9 @@ Library ------- +- Issue #6857: Default format() alignment should be '>' for Decimal + instances. + - Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning NaN or raising InvalidContext. Also, fix infinite recursion in long(Decimal('nan')). From python-checkins at python.org Tue Sep 8 22:20:51 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 08 Sep 2009 20:20:51 -0000 Subject: [Python-checkins] r74724 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Tue Sep 8 22:20:51 2009 New Revision: 74724 Log: Blocked revisions 74723 via svnmerge ........ r74723 | mark.dickinson | 2009-09-08 21:20:19 +0100 (Tue, 08 Sep 2009) | 3 lines Issue #6857: Fix Decimal formatting to be consistent with existing float formatting: both are now right-aligned by default. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Tue Sep 8 22:22:46 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 08 Sep 2009 20:22:46 -0000 Subject: [Python-checkins] r74725 - in python/branches/py3k: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS Message-ID: Author: mark.dickinson Date: Tue Sep 8 22:22:46 2009 New Revision: 74725 Log: Merged revisions 74723 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74723 | mark.dickinson | 2009-09-08 21:20:19 +0100 (Tue, 08 Sep 2009) | 3 lines Issue #6857: Fix Decimal formatting to be consistent with existing float formatting: both are now right-aligned by default. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/decimal.py python/branches/py3k/Lib/test/test_decimal.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/decimal.py ============================================================================== --- python/branches/py3k/Lib/decimal.py (original) +++ python/branches/py3k/Lib/decimal.py Tue Sep 8 22:22:46 2009 @@ -5577,7 +5577,10 @@ raise ValueError("Alignment conflicts with '0' in " "format specifier: " + format_spec) format_dict['fill'] = fill or ' ' - format_dict['align'] = align or '<' + # PEP 3101 originally specified that the default alignment should + # be left; it was later agreed that right-aligned makes more sense + # for numeric types. See http://bugs.python.org/issue6857. + format_dict['align'] = align or '>' # default sign handling: '-' for negative, '' for positive if format_dict['sign'] is None: 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 Tue Sep 8 22:22:46 2009 @@ -701,6 +701,7 @@ ('', '1.00', '1.00'), # test alignment and padding + ('6', '123', ' 123'), ('<6', '123', '123 '), ('>6', '123', ' 123'), ('^6', '123', ' 123 '), @@ -730,7 +731,7 @@ (',', '-1234567', '-1,234,567'), (',', '-123456', '-123,456'), ('7,', '123456', '123,456'), - ('8,', '123456', '123,456 '), + ('8,', '123456', ' 123,456'), ('08,', '123456', '0,123,456'), # special case: extra 0 needed ('+08,', '123456', '+123,456'), # but not if there's a sign (' 08,', '123456', ' 123,456'), Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Tue Sep 8 22:22:46 2009 @@ -70,6 +70,9 @@ Library ------- +- Issue #6857: Default format() alignment should be '>' for Decimal + instances. + - Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning NaN or raising InvalidContext. Also, fix infinite recursion in long(Decimal('nan')). From python-checkins at python.org Tue Sep 8 22:23:14 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 08 Sep 2009 20:23:14 -0000 Subject: [Python-checkins] r74726 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Tue Sep 8 22:23:14 2009 New Revision: 74726 Log: Blocked revisions 74725 via svnmerge ................ r74725 | mark.dickinson | 2009-09-08 21:22:46 +0100 (Tue, 08 Sep 2009) | 10 lines Merged revisions 74723 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74723 | mark.dickinson | 2009-09-08 21:20:19 +0100 (Tue, 08 Sep 2009) | 3 lines Issue #6857: Fix Decimal formatting to be consistent with existing float formatting: both are now right-aligned by default. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Wed Sep 9 01:04:22 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 08 Sep 2009 23:04:22 -0000 Subject: [Python-checkins] r74727 - in python/trunk: Misc/NEWS Modules/pwdmodule.c Message-ID: Author: benjamin.peterson Date: Wed Sep 9 01:04:22 2009 New Revision: 74727 Log: #6865 fix ref counting in initialization of pwd module Modified: python/trunk/Misc/NEWS python/trunk/Modules/pwdmodule.c Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Sep 9 01:04:22 2009 @@ -1303,6 +1303,9 @@ Extension Modules ----------------- +- Issue #6865: Fix reference counting issue in the initialization of the pwd + module. + - Issue #6848: Fix curses module build failure on OS X 10.6. - Fix a segfault in expat when given a specially crafted input lead to the Modified: python/trunk/Modules/pwdmodule.c ============================================================================== --- python/trunk/Modules/pwdmodule.c (original) +++ python/trunk/Modules/pwdmodule.c Wed Sep 9 01:04:22 2009 @@ -194,6 +194,7 @@ Py_INCREF((PyObject *) &StructPwdType); PyModule_AddObject(m, "struct_passwd", (PyObject *) &StructPwdType); /* And for b/w compatibility (this was defined by mistake): */ + Py_INCREF((PyObject *) &StructPwdType); PyModule_AddObject(m, "struct_pwent", (PyObject *) &StructPwdType); initialized = 1; } From nnorwitz at gmail.com Wed Sep 9 03:00:02 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 8 Sep 2009 21:00:02 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090909010002.GA7978@python.psfb.org> More important issues: ---------------------- test_ssl leaked [420, 0, 0] references, sum=420 Less important issues: ---------------------- test_cmd_line leaked [0, -25, 0] references, sum=-25 test_distutils leaked [25, -25, 0] references, sum=0 test_docxmlrpc leaked [0, -3, -2] references, sum=-5 test_file2k leaked [80, -80, 0] references, sum=0 test_popen2 leaked [29, -29, 0] references, sum=0 test_smtplib leaked [0, 0, -6] references, sum=-6 test_thread leaked [115, -115, 0] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 From python-checkins at python.org Wed Sep 9 10:14:21 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 09 Sep 2009 08:14:21 -0000 Subject: [Python-checkins] r74728 - in python/trunk: Lib/distutils/tests/test_unixccompiler.py Lib/distutils/unixccompiler.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Wed Sep 9 10:14:20 2009 New Revision: 74728 Log: Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler Modified: python/trunk/Lib/distutils/tests/test_unixccompiler.py python/trunk/Lib/distutils/unixccompiler.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/distutils/tests/test_unixccompiler.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_unixccompiler.py (original) +++ python/trunk/Lib/distutils/tests/test_unixccompiler.py Wed Sep 9 10:14:20 2009 @@ -36,7 +36,23 @@ # hp-ux sys.platform = 'hp-ux' - self.assertEqual(self.cc.rpath_foo(), '+s -L/foo') + old_gcv = sysconfig.get_config_var + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo']) + + def gcv(v): + return 'gcc' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + def gcv(v): + return 'g++' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + sysconfig.get_config_var = old_gcv # irix646 sys.platform = 'irix646' Modified: python/trunk/Lib/distutils/unixccompiler.py ============================================================================== --- python/trunk/Lib/distutils/unixccompiler.py (original) +++ python/trunk/Lib/distutils/unixccompiler.py Wed Sep 9 10:14:20 2009 @@ -285,7 +285,9 @@ # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - return "+s -L" + dir + if "gcc" in compiler or "g++" in compiler: + return ["-Wl,+s", "-L" + dir] + return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] elif compiler[:3] == "gcc" or compiler[:3] == "g++": Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Sep 9 10:14:20 2009 @@ -366,6 +366,10 @@ Library ------- +- Issue #6163: Fixed HP-UX runtime library dir options in + distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and + Michael Haubenwallner. + - Issue #6857: Default format() alignment should be '>' for Decimal instances. From python-checkins at python.org Wed Sep 9 10:34:06 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 09 Sep 2009 08:34:06 -0000 Subject: [Python-checkins] r74729 - in python/branches/release26-maint: Lib/distutils/unixccompiler.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Wed Sep 9 10:34:06 2009 New Revision: 74729 Log: Merged revisions 74728 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74728 | tarek.ziade | 2009-09-09 10:14:20 +0200 (Wed, 09 Sep 2009) | 1 line Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/distutils/unixccompiler.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/distutils/unixccompiler.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/unixccompiler.py (original) +++ python/branches/release26-maint/Lib/distutils/unixccompiler.py Wed Sep 9 10:34:06 2009 @@ -284,7 +284,9 @@ # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - return "+s -L" + dir + if "gcc" in compiler or "g++" in compiler: + return ["-Wl,+s", "-L" + dir] + return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] elif compiler[:3] == "gcc" or compiler[:3] == "g++": Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Wed Sep 9 10:34:06 2009 @@ -322,6 +322,10 @@ Library ------- +- Issue #6163: Fixed HP-UX runtime library dir options in + distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and + Michael Haubenwallner. + - Issue #4660: If a multiprocessing.JoinableQueue.put() was preempted, it was possible to get a spurious 'task_done() called too many times' error. From python-checkins at python.org Wed Sep 9 10:48:07 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 09 Sep 2009 08:48:07 -0000 Subject: [Python-checkins] r74730 - in python/branches/py3k: Lib/distutils/tests/test_unixccompiler.py Lib/distutils/unixccompiler.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Wed Sep 9 10:48:07 2009 New Revision: 74730 Log: Merged revisions 74728 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74728 | tarek.ziade | 2009-09-09 10:14:20 +0200 (Wed, 09 Sep 2009) | 1 line Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/tests/test_unixccompiler.py python/branches/py3k/Lib/distutils/unixccompiler.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/distutils/tests/test_unixccompiler.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_unixccompiler.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_unixccompiler.py Wed Sep 9 10:48:07 2009 @@ -36,7 +36,23 @@ # hp-ux sys.platform = 'hp-ux' - self.assertEqual(self.cc.rpath_foo(), '+s -L/foo') + old_gcv = sysconfig.get_config_var + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo']) + + def gcv(v): + return 'gcc' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + def gcv(v): + return 'g++' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + sysconfig.get_config_var = old_gcv # irix646 sys.platform = 'irix646' Modified: python/branches/py3k/Lib/distutils/unixccompiler.py ============================================================================== --- python/branches/py3k/Lib/distutils/unixccompiler.py (original) +++ python/branches/py3k/Lib/distutils/unixccompiler.py Wed Sep 9 10:48:07 2009 @@ -283,7 +283,9 @@ # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - return "+s -L" + dir + if "gcc" in compiler or "g++" in compiler: + return ["-Wl,+s", "-L" + dir] + return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] elif compiler[:3] == "gcc" or compiler[:3] == "g++": Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Sep 9 10:48:07 2009 @@ -1046,6 +1046,10 @@ Library ------- +- Issue #6163: Fixed HP-UX runtime library dir options in + distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and + Michael Haubenwallner. + - Issue #6693: New functions in site.py to get user/global site packages paths. - Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when From python-checkins at python.org Wed Sep 9 11:07:14 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 09 Sep 2009 09:07:14 -0000 Subject: [Python-checkins] r74731 - in python/branches/release31-maint: Lib/distutils/tests/test_unixccompiler.py Lib/distutils/unixccompiler.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Wed Sep 9 11:07:13 2009 New Revision: 74731 Log: Merged revisions 74730 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74730 | tarek.ziade | 2009-09-09 10:48:07 +0200 (Wed, 09 Sep 2009) | 9 lines Merged revisions 74728 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74728 | tarek.ziade | 2009-09-09 10:14:20 +0200 (Wed, 09 Sep 2009) | 1 line Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/tests/test_unixccompiler.py python/branches/release31-maint/Lib/distutils/unixccompiler.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/distutils/tests/test_unixccompiler.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_unixccompiler.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_unixccompiler.py Wed Sep 9 11:07:13 2009 @@ -36,7 +36,23 @@ # hp-ux sys.platform = 'hp-ux' - self.assertEqual(self.cc.rpath_foo(), '+s -L/foo') + old_gcv = sysconfig.get_config_var + def gcv(v): + return 'xxx' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo']) + + def gcv(v): + return 'gcc' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + def gcv(v): + return 'g++' + sysconfig.get_config_var = gcv + self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo']) + + sysconfig.get_config_var = old_gcv # irix646 sys.platform = 'irix646' Modified: python/branches/release31-maint/Lib/distutils/unixccompiler.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/unixccompiler.py (original) +++ python/branches/release31-maint/Lib/distutils/unixccompiler.py Wed Sep 9 11:07:13 2009 @@ -283,7 +283,9 @@ # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": - return "+s -L" + dir + if "gcc" in compiler or "g++" in compiler: + return ["-Wl,+s", "-L" + dir] + return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] else: Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Wed Sep 9 11:07:13 2009 @@ -983,6 +983,10 @@ Library ------- +- Issue #6163: Fixed HP-UX runtime library dir options in + distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and + Michael Haubenwallner. + - Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O. From nnorwitz at gmail.com Wed Sep 9 12:32:43 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Wed, 9 Sep 2009 06:32:43 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090909103243.GA2871@python.psfb.org> More important issues: ---------------------- test_distutils leaked [0, 0, -25] references, sum=-25 Less important issues: ---------------------- test_asynchat leaked [130, -130, 0] references, sum=0 test_cmd_line leaked [-25, 25, 0] references, sum=0 test_docxmlrpc leaked [0, 0, 8] references, sum=8 test_file2k leaked [-83, 0, 0] references, sum=-83 test_smtplib leaked [0, 0, 5] references, sum=5 test_threadedtempfile leaked [0, 0, 104] references, sum=104 test_threading leaked [48, 48, 48] references, sum=144 test_urllib2_localnet leaked [280, -280, 0] references, sum=0 From python-checkins at python.org Wed Sep 9 13:39:41 2009 From: python-checkins at python.org (tarek.ziade) Date: Wed, 09 Sep 2009 11:39:41 -0000 Subject: [Python-checkins] r74732 - in python/branches/release26-maint/Lib/distutils: command/build_ext.py tests/test_build_ext.py Message-ID: Author: tarek.ziade Date: Wed Sep 9 13:39:41 2009 New Revision: 74732 Log: removed unecessary lines for clarity and added a the same test than in trunk for the inplace Modified: python/branches/release26-maint/Lib/distutils/command/build_ext.py python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py 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 Wed Sep 9 13:39:41 2009 @@ -642,9 +642,6 @@ # the inplace option requires to find the package directory # 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)) 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 Wed Sep 9 13:39:41 2009 @@ -329,6 +329,19 @@ wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) self.assertEquals(wanted, path) + 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]}) + 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) + def test_suite(): if not sysconfig.python_build: if test_support.verbose: From python-checkins at python.org Wed Sep 9 13:40:54 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 09 Sep 2009 11:40:54 -0000 Subject: [Python-checkins] r74733 - in python/trunk: Lib/test/test_traceback.py Modules/pwdmodule.c Python/traceback.c Message-ID: Author: benjamin.peterson Date: Wed Sep 9 13:40:54 2009 New Revision: 74733 Log: tabbify Modified: python/trunk/Lib/test/test_traceback.py python/trunk/Modules/pwdmodule.c python/trunk/Python/traceback.c Modified: python/trunk/Lib/test/test_traceback.py ============================================================================== --- python/trunk/Lib/test/test_traceback.py (original) +++ python/trunk/Lib/test/test_traceback.py Wed Sep 9 13:40:54 2009 @@ -21,6 +21,50 @@ else: raise ValueError, "call did not raise exception" + def test_tb_next(self): + def f(): + raise Exception + def g(): + f() + try: + g() + except Exception: + tb = sys.exc_info()[2] + self.assertEqual(tb.tb_frame.f_code.co_name, "test_tb_next") + g_tb = tb.tb_next + self.assertEqual(g_tb.tb_frame.f_code.co_name, "g") + f_tb = g_tb.tb_next + self.assertEqual(f_tb.tb_frame.f_code.co_name, "f") + self.assertIsNone(f_tb.tb_next) + tb.tb_next = None + self.assertIsNone(tb.tb_next) + self.assertRaises(ValueError, setattr, f_tb, "tb_next", g_tb) + self.assertRaises(TypeError, setattr, tb, "tb_next", 4) + g_tb.tb_next = None + f_tb.tb_next = g_tb + self.assertIs(f_tb.tb_next, g_tb) + self.assertRaises(ValueError, setattr, f_tb, "tb_next", f_tb) + self.assertRaises(TypeError, delattr, tb, "tb_next") + + def test_tb_frame(self): + def f(): + x = 2 + raise Exception + try: + f() + except Exception: + tb = sys.exc_info()[2] + self.assertIs(sys._getframe(), tb.tb_frame) + f_tb = tb.tb_next + self.assertEqual(f_tb.tb_frame.f_code.co_name, "f") + self.assertEqual(f_tb.tb_frame.f_locals["x"], 2) + f_tb.tb_frame = None + self.assertIsNone(f_tb.tb_frame) + self.assertRaises(TypeError, setattr, t_tb, "tb_frame", 4) + self.assertRaises(TypeError, delattr, t_tb, "tb_frame") + t_tb.tb_frame = sys._getframe() + self.assertIs(t_tb.tb_frame, tb.tb_frame) + def syntax_error_with_caret(self): compile("def fact(x):\n\treturn x!\n", "?", "exec") Modified: python/trunk/Modules/pwdmodule.c ============================================================================== --- python/trunk/Modules/pwdmodule.c (original) +++ python/trunk/Modules/pwdmodule.c Wed Sep 9 13:40:54 2009 @@ -194,7 +194,7 @@ Py_INCREF((PyObject *) &StructPwdType); PyModule_AddObject(m, "struct_passwd", (PyObject *) &StructPwdType); /* And for b/w compatibility (this was defined by mistake): */ - Py_INCREF((PyObject *) &StructPwdType); + Py_INCREF((PyObject *) &StructPwdType); PyModule_AddObject(m, "struct_pwent", (PyObject *) &StructPwdType); initialized = 1; } Modified: python/trunk/Python/traceback.c ============================================================================== --- python/trunk/Python/traceback.c (original) +++ python/trunk/Python/traceback.c Wed Sep 9 13:40:54 2009 @@ -12,8 +12,6 @@ #define OFF(x) offsetof(PyTracebackObject, x) static PyMemberDef tb_memberlist[] = { - {"tb_next", T_OBJECT, OFF(tb_next), READONLY}, - {"tb_frame", T_OBJECT, OFF(tb_frame), READONLY}, {"tb_lasti", T_INT, OFF(tb_lasti), READONLY}, {"tb_lineno", T_INT, OFF(tb_lineno), READONLY}, {NULL} /* Sentinel */ @@ -45,6 +43,81 @@ Py_CLEAR(tb->tb_frame); } +static PyObject * +tb_get_next(PyTracebackObject *tb) { + if (tb->tb_next) { + Py_INCREF(tb->tb_next); + return (PyObject *)tb->tb_next; + } + Py_RETURN_NONE; +} + +static int +tb_set_next(PyTracebackObject *tb, PyObject *new, void *context) { + if (!new) { + PyErr_SetString(PyExc_TypeError, "can't delete tb_next"); + return -1; + } + else if (new == Py_None) { + new = NULL; + } + else if (PyTraceBack_Check(new)) { + /* Check for cycles in the traceback. */ + PyTracebackObject *current = (PyTracebackObject *)new; + do { + if (tb == current) { + PyErr_SetString(PyExc_ValueError, "cycle in traceback"); + return -1; + } + } while ((current = current->tb_next)); + Py_INCREF(new); + } + else { + PyErr_SetString(PyExc_TypeError, + "tb_next must be an traceback object"); + return -1; + } + Py_XDECREF(tb->tb_next); + tb->tb_next = (PyTracebackObject *)new; + return 0; +} + +static PyObject * +tb_get_frame(PyTracebackObject *tb) { + if (tb->tb_frame) { + Py_INCREF(tb->tb_frame); + return (PyObject *)tb->tb_frame; + } + Py_RETURN_NONE; +} + +static int +tb_set_frame(PyTracebackObject *tb, PyObject *new, void *context) { + if (!new) { + PyErr_SetString(PyExc_TypeError, + "can't delete tb_frame attribute"); + return -1; + } + else if (new == Py_None) { + new = NULL; + } + else if (PyFrame_Check(new)) { + Py_INCREF(new); + } + else { + PyErr_SetString(PyExc_TypeError, + "tb_frame must be a frame object"); + return -1; + } + tb->tb_frame = (PyFrameObject *)new; + return 0; +} + +static PyGetSetDef tb_getset[] = { + {"tb_next", (getter)tb_get_next, (setter)tb_set_next, NULL}, + {"tb_frame", (getter)tb_get_frame, (setter)tb_set_frame, NULL}, +}; + PyTypeObject PyTraceBack_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "traceback", @@ -75,7 +148,7 @@ 0, /* tp_iternext */ 0, /* tp_methods */ tb_memberlist, /* tp_members */ - 0, /* tp_getset */ + tb_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ }; @@ -245,11 +318,16 @@ } while (tb != NULL && err == 0) { if (depth <= limit) { - err = tb_displayline(f, - PyString_AsString( - tb->tb_frame->f_code->co_filename), - tb->tb_lineno, - PyString_AsString(tb->tb_frame->f_code->co_name)); + PyFrameObject *frame = tb->tb_frame; + char *filename, *name; + if (frame) { + filename = PyString_AS_STRING(frame->f_code->co_filename); + name = PyString_AS_STRING(frame->f_code->co_name); + } + else { + filename = name = "unkown (no frame on traceback)"; + } + err = tb_displayline(f, filename, tb->tb_lineno, name); } depth--; tb = tb->tb_next; From python-checkins at python.org Wed Sep 9 13:42:57 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 09 Sep 2009 11:42:57 -0000 Subject: [Python-checkins] r74734 - in python/trunk: Lib/test/test_traceback.py Python/traceback.c Message-ID: Author: benjamin.peterson Date: Wed Sep 9 13:42:57 2009 New Revision: 74734 Log: revert unintended changes Modified: python/trunk/Lib/test/test_traceback.py python/trunk/Python/traceback.c Modified: python/trunk/Lib/test/test_traceback.py ============================================================================== --- python/trunk/Lib/test/test_traceback.py (original) +++ python/trunk/Lib/test/test_traceback.py Wed Sep 9 13:42:57 2009 @@ -21,50 +21,6 @@ else: raise ValueError, "call did not raise exception" - def test_tb_next(self): - def f(): - raise Exception - def g(): - f() - try: - g() - except Exception: - tb = sys.exc_info()[2] - self.assertEqual(tb.tb_frame.f_code.co_name, "test_tb_next") - g_tb = tb.tb_next - self.assertEqual(g_tb.tb_frame.f_code.co_name, "g") - f_tb = g_tb.tb_next - self.assertEqual(f_tb.tb_frame.f_code.co_name, "f") - self.assertIsNone(f_tb.tb_next) - tb.tb_next = None - self.assertIsNone(tb.tb_next) - self.assertRaises(ValueError, setattr, f_tb, "tb_next", g_tb) - self.assertRaises(TypeError, setattr, tb, "tb_next", 4) - g_tb.tb_next = None - f_tb.tb_next = g_tb - self.assertIs(f_tb.tb_next, g_tb) - self.assertRaises(ValueError, setattr, f_tb, "tb_next", f_tb) - self.assertRaises(TypeError, delattr, tb, "tb_next") - - def test_tb_frame(self): - def f(): - x = 2 - raise Exception - try: - f() - except Exception: - tb = sys.exc_info()[2] - self.assertIs(sys._getframe(), tb.tb_frame) - f_tb = tb.tb_next - self.assertEqual(f_tb.tb_frame.f_code.co_name, "f") - self.assertEqual(f_tb.tb_frame.f_locals["x"], 2) - f_tb.tb_frame = None - self.assertIsNone(f_tb.tb_frame) - self.assertRaises(TypeError, setattr, t_tb, "tb_frame", 4) - self.assertRaises(TypeError, delattr, t_tb, "tb_frame") - t_tb.tb_frame = sys._getframe() - self.assertIs(t_tb.tb_frame, tb.tb_frame) - def syntax_error_with_caret(self): compile("def fact(x):\n\treturn x!\n", "?", "exec") Modified: python/trunk/Python/traceback.c ============================================================================== --- python/trunk/Python/traceback.c (original) +++ python/trunk/Python/traceback.c Wed Sep 9 13:42:57 2009 @@ -12,6 +12,8 @@ #define OFF(x) offsetof(PyTracebackObject, x) static PyMemberDef tb_memberlist[] = { + {"tb_next", T_OBJECT, OFF(tb_next), READONLY}, + {"tb_frame", T_OBJECT, OFF(tb_frame), READONLY}, {"tb_lasti", T_INT, OFF(tb_lasti), READONLY}, {"tb_lineno", T_INT, OFF(tb_lineno), READONLY}, {NULL} /* Sentinel */ @@ -43,81 +45,6 @@ Py_CLEAR(tb->tb_frame); } -static PyObject * -tb_get_next(PyTracebackObject *tb) { - if (tb->tb_next) { - Py_INCREF(tb->tb_next); - return (PyObject *)tb->tb_next; - } - Py_RETURN_NONE; -} - -static int -tb_set_next(PyTracebackObject *tb, PyObject *new, void *context) { - if (!new) { - PyErr_SetString(PyExc_TypeError, "can't delete tb_next"); - return -1; - } - else if (new == Py_None) { - new = NULL; - } - else if (PyTraceBack_Check(new)) { - /* Check for cycles in the traceback. */ - PyTracebackObject *current = (PyTracebackObject *)new; - do { - if (tb == current) { - PyErr_SetString(PyExc_ValueError, "cycle in traceback"); - return -1; - } - } while ((current = current->tb_next)); - Py_INCREF(new); - } - else { - PyErr_SetString(PyExc_TypeError, - "tb_next must be an traceback object"); - return -1; - } - Py_XDECREF(tb->tb_next); - tb->tb_next = (PyTracebackObject *)new; - return 0; -} - -static PyObject * -tb_get_frame(PyTracebackObject *tb) { - if (tb->tb_frame) { - Py_INCREF(tb->tb_frame); - return (PyObject *)tb->tb_frame; - } - Py_RETURN_NONE; -} - -static int -tb_set_frame(PyTracebackObject *tb, PyObject *new, void *context) { - if (!new) { - PyErr_SetString(PyExc_TypeError, - "can't delete tb_frame attribute"); - return -1; - } - else if (new == Py_None) { - new = NULL; - } - else if (PyFrame_Check(new)) { - Py_INCREF(new); - } - else { - PyErr_SetString(PyExc_TypeError, - "tb_frame must be a frame object"); - return -1; - } - tb->tb_frame = (PyFrameObject *)new; - return 0; -} - -static PyGetSetDef tb_getset[] = { - {"tb_next", (getter)tb_get_next, (setter)tb_set_next, NULL}, - {"tb_frame", (getter)tb_get_frame, (setter)tb_set_frame, NULL}, -}; - PyTypeObject PyTraceBack_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "traceback", @@ -148,7 +75,7 @@ 0, /* tp_iternext */ 0, /* tp_methods */ tb_memberlist, /* tp_members */ - tb_getset, /* tp_getset */ + 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ }; @@ -318,16 +245,11 @@ } while (tb != NULL && err == 0) { if (depth <= limit) { - PyFrameObject *frame = tb->tb_frame; - char *filename, *name; - if (frame) { - filename = PyString_AS_STRING(frame->f_code->co_filename); - name = PyString_AS_STRING(frame->f_code->co_name); - } - else { - filename = name = "unkown (no frame on traceback)"; - } - err = tb_displayline(f, filename, tb->tb_lineno, name); + err = tb_displayline(f, + PyString_AsString( + tb->tb_frame->f_code->co_filename), + tb->tb_lineno, + PyString_AsString(tb->tb_frame->f_code->co_name)); } depth--; tb = tb->tb_next; From python-checkins at python.org Wed Sep 9 13:46:13 2009 From: python-checkins at python.org (benjamin.peterson) Date: Wed, 09 Sep 2009 11:46:13 -0000 Subject: [Python-checkins] r74735 - in python/branches/release26-maint: Misc/NEWS Modules/pwdmodule.c Message-ID: Author: benjamin.peterson Date: Wed Sep 9 13:46:13 2009 New Revision: 74735 Log: Merged revisions 74727 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74727 | benjamin.peterson | 2009-09-08 18:04:22 -0500 (Tue, 08 Sep 2009) | 1 line #6865 fix ref counting in initialization of pwd module ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Modules/pwdmodule.c Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Wed Sep 9 13:46:13 2009 @@ -778,6 +778,9 @@ Library ------- +- Issue #6865: Fix reference counting issue in the initialization of the pwd + module. + - Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an exception. Modified: python/branches/release26-maint/Modules/pwdmodule.c ============================================================================== --- python/branches/release26-maint/Modules/pwdmodule.c (original) +++ python/branches/release26-maint/Modules/pwdmodule.c Wed Sep 9 13:46:13 2009 @@ -194,6 +194,7 @@ Py_INCREF((PyObject *) &StructPwdType); PyModule_AddObject(m, "struct_passwd", (PyObject *) &StructPwdType); /* And for b/w compatibility (this was defined by mistake): */ + Py_INCREF((PyObject *) &StructPwdType); PyModule_AddObject(m, "struct_pwent", (PyObject *) &StructPwdType); initialized = 1; } From python-checkins at python.org Wed Sep 9 18:17:45 2009 From: python-checkins at python.org (brett.cannon) Date: Wed, 09 Sep 2009 16:17:45 -0000 Subject: [Python-checkins] r74736 - peps/trunk/pep-3145.txt Message-ID: Author: brett.cannon Date: Wed Sep 9 18:17:44 2009 New Revision: 74736 Log: Remove backticks from a plaintext PEP. Modified: peps/trunk/pep-3145.txt Modified: peps/trunk/pep-3145.txt ============================================================================== --- peps/trunk/pep-3145.txt (original) +++ peps/trunk/pep-3145.txt Wed Sep 9 18:17:44 2009 @@ -12,10 +12,10 @@ Abstract: - In its present form, the ``subprocess.Popen`` implementation is prone to + In its present form, the subprocess.Popen implementation is prone to dead-locking and blocking of the parent Python script while waiting on data from the child process. This PEP proposes to make - ``subprocess.Popen`` more asynchronous to help alleviate these + subprocess.Popen more asynchronous to help alleviate these problems. Motivation: @@ -26,7 +26,7 @@ blocking to wait for the program to produce data [1] [2] [3]. The current behavior of the subprocess module is that when a user sends or receives data via the stdin, stderr and stdout file objects, dead locks are common - and documented [4] [5]. While ``communicate`` can be used to alleviate some of + and documented [4] [5]. While communicate can be used to alleviate some of the buffering issues, it will still cause the parent process to block while attempting to read data when none is available to be read from the child process. @@ -34,14 +34,13 @@ Rationale: There is a documented need for asynchronous, non-blocking functionality in - ``subprocess.Popen`` [6] [7] [2] [3]. Inclusion of the code would improve the + subprocess.Popen [6] [7] [2] [3]. Inclusion of the code would improve the utility of the Python standard library that can be used on Unix based and Windows builds of Python. Practically every I/O object in Python has a file-like wrapper of some sort. Sockets already act as such and for - strings there is ``StringIO``. Popen can be made to act like a file by simply - using the methods attached the the ``subprocess.Popen.stderr``, - ``stdout`` and - ``stdin`` file-like objects. But when using the read and write methods of + strings there is StringIO. Popen can be made to act like a file by simply + using the methods attached the the subprocess.Popen.stderr, stdout and + stdin file-like objects. But when using the read and write methods of those options, you do not have the benefit of asynchronous I/O. In the proposed solution the wrapper wraps the asynchronous methods to mimic a file object. @@ -53,43 +52,36 @@ the problems I have come across in the development process [10]. I have been working on implementing non-blocking asynchronous I/O in the - ``subprocess.Popen`` module as well as a wrapper class for - ``subprocess.Popen`` + subprocess.Popen module as well as a wrapper class for subprocess.Popen that makes it so that an executed process can take the place of a file by duplicating all of the methods and attributes that file objects have. - There are two base functions that have been added to the - ``subprocess.Popen`` - class: ``Popen.send`` and ``Popen._recv``, each with two separate implementations, + There are two base functions that have been added to the subprocess.Popen + class: Popen.send and Popen._recv, each with two separate implementations, one for Windows and one for Unix based systems. The Windows - implementation uses ``ctypes`` to access the functions needed to control pipes + implementation uses ctypes to access the functions needed to control pipes in the kernel 32 DLL in an asynchronous manner. On Unix based systems, the Python interface for file control serves the same purpose. The - different implementations of ``Popen.send`` and ``Popen._recv`` have identical + different implementations of Popen.send and Popen._recv have identical arguments to make code that uses these functions work across multiple platforms. - When calling the ``Popen._recv`` function, it requires the pipe name be - passed as an argument so there exists the ``Popen.recv`` function that passes - selects ``stdout`` as the pipe for ``Popen._recv`` by default. - ``Popen.recv_err`` - selects ``stderr`` as the pipe by default. ``Popen.recv`` and - ``Popen.recv_err`` - are much easier to read and understand than - ``Popen._recv('stdout' ...)`` and - ``Popen._recv('stderr' ...)`` respectively. - - Since the ``Popen._recv`` function does not wait on data to be produced - before returning a value, it may return empty bytes. - ``Popen.asyncread`` + When calling the Popen._recv function, it requires the pipe name be + passed as an argument so there exists the Popen.recv function that passes + selects stdout as the pipe for Popen._recv by default. Popen.recv_err + selects stderr as the pipe by default. Popen.recv and Popen.recv_err + are much easier to read and understand than Popen._recv('stdout' ...) and + Popen._recv('stderr' ...) respectively. + + Since the Popen._recv function does not wait on data to be produced + before returning a value, it may return empty bytes. Popen.asyncread handles this issue by returning all data read over a given time interval. - The ``ProcessIOWrapper`` class uses the ``asyncread`` and - ``asyncwrite`` functions to + The ProcessIOWrapper class uses the asyncread and asyncwrite functions to allow a process to act like a file so that there are no blocking issues - that can arise from using the ``stdout`` and ``stdin`` file objects produced from - a ``subprocess.Popen`` call. + that can arise from using the stdout and stdin file objects produced from + a subprocess.Popen call. References: From python-checkins at python.org Wed Sep 9 18:49:13 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 09 Sep 2009 16:49:13 -0000 Subject: [Python-checkins] r74737 - python/trunk/Doc/library/copy.rst Message-ID: Author: georg.brandl Date: Wed Sep 9 18:49:13 2009 New Revision: 74737 Log: Properly document copy and deepcopy as functions. Modified: python/trunk/Doc/library/copy.rst Modified: python/trunk/Doc/library/copy.rst ============================================================================== --- python/trunk/Doc/library/copy.rst (original) +++ python/trunk/Doc/library/copy.rst Wed Sep 9 18:49:13 2009 @@ -1,25 +1,28 @@ - :mod:`copy` --- Shallow and deep copy operations ================================================ .. module:: copy :synopsis: Shallow and deep copy operations. +This module provides generic (shallow and deep) copying operations. -.. index:: - single: copy() (in copy) - single: deepcopy() (in copy) -This module provides generic (shallow and deep) copying operations. +Interface summary: + +.. function:: copy(x) + + Return a shallow copy of *x*. + + +.. function:: deepcopy(x) + + Return a deep copy of *x*. -Interface summary:: - import copy +.. exception:: error - x = copy.copy(y) # make a shallow copy of y - x = copy.deepcopy(y) # make a deep copy of y + Raised for module specific errors. -For module specific errors, :exc:`copy.error` is raised. The difference between shallow and deep copying is only relevant for compound objects (objects that contain other objects, like lists or class instances): From python-checkins at python.org Wed Sep 9 18:51:05 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 09 Sep 2009 16:51:05 -0000 Subject: [Python-checkins] r74738 - in python/branches/py3k: Doc/library/copy.rst Message-ID: Author: georg.brandl Date: Wed Sep 9 18:51:05 2009 New Revision: 74738 Log: Merged revisions 74737 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74737 | georg.brandl | 2009-09-09 18:49:13 +0200 (Mi, 09 Sep 2009) | 1 line Properly document copy and deepcopy as functions. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/copy.rst Modified: python/branches/py3k/Doc/library/copy.rst ============================================================================== --- python/branches/py3k/Doc/library/copy.rst (original) +++ python/branches/py3k/Doc/library/copy.rst Wed Sep 9 18:51:05 2009 @@ -4,21 +4,25 @@ .. module:: copy :synopsis: Shallow and deep copy operations. +This module provides generic (shallow and deep) copying operations. -.. index:: - single: copy() (in copy) - single: deepcopy() (in copy) -This module provides generic (shallow and deep) copying operations. +Interface summary: + +.. function:: copy(x) + + Return a shallow copy of *x*. + + +.. function:: deepcopy(x) + + Return a deep copy of *x*. -Interface summary:: - import copy +.. exception:: error - x = copy.copy(y) # make a shallow copy of y - x = copy.deepcopy(y) # make a deep copy of y + Raised for module specific errors. -For module specific errors, :exc:`copy.error` is raised. The difference between shallow and deep copying is only relevant for compound objects (objects that contain other objects, like lists or class instances): From nnorwitz at gmail.com Thu Sep 10 23:42:10 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 10 Sep 2009 17:42:10 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090910214210.GA22367@python.psfb.org> More important issues: ---------------------- test_distutils leaked [0, 0, 25] references, sum=25 test_urllib2_localnet leaked [-291, 0, 0] references, sum=-291 Less important issues: ---------------------- test_file2k leaked [0, 84, -84] references, sum=0 test_ssl leaked [-339, 339, 0] references, sum=0 test_sys leaked [42, -21, -21] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, 0, -8] references, sum=-8 From python-checkins at python.org Fri Sep 11 09:55:25 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 11 Sep 2009 07:55:25 -0000 Subject: [Python-checkins] r74739 - python/trunk/Doc/distutils/builtdist.rst Message-ID: Author: georg.brandl Date: Fri Sep 11 09:55:20 2009 New Revision: 74739 Log: Move function back to its section. Modified: python/trunk/Doc/distutils/builtdist.rst Modified: python/trunk/Doc/distutils/builtdist.rst ============================================================================== --- python/trunk/Doc/distutils/builtdist.rst (original) +++ python/trunk/Doc/distutils/builtdist.rst Fri Sep 11 09:55:20 2009 @@ -429,13 +429,6 @@ also the configuration. For details refer to Microsoft's documentation of the :cfunc:`SHGetSpecialFolderPath` function. -Vista User Access Control (UAC) -=============================== - -Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control` -option. The default is 'none' (meaning no UAC handling is done), and other -valid values are 'auto' (meaning prompt for UAC elevation if Python was -installed for all users) and 'force' (meaning always prompt for elevation) .. function:: create_shortcut(target, description, filename[, arguments[, workdir[, iconpath[, iconindex]]]]) @@ -447,3 +440,12 @@ and *iconindex* is the index of the icon in the file *iconpath*. Again, for details consult the Microsoft documentation for the :class:`IShellLink` interface. + + +Vista User Access Control (UAC) +=============================== + +Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control` +option. The default is 'none' (meaning no UAC handling is done), and other +valid values are 'auto' (meaning prompt for UAC elevation if Python was +installed for all users) and 'force' (meaning always prompt for elevation). From nnorwitz at gmail.com Fri Sep 11 11:43:16 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 11 Sep 2009 05:43:16 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090911094316.GA25448@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 0, 339] references, sum=339 Less important issues: ---------------------- test_asynchat leaked [-125, 0, 0] references, sum=-125 test_cmd_line leaked [25, 0, 0] references, sum=25 test_file2k leaked [0, 0, 78] references, sum=78 test_pydoc leaked [21, -21, 0] references, sum=0 test_sys leaked [42, -21, -21] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, -8, 8] references, sum=0 From python-checkins at python.org Fri Sep 11 22:42:29 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 11 Sep 2009 20:42:29 -0000 Subject: [Python-checkins] r74740 - python/branches/py3k/Doc/howto/unicode.rst Message-ID: Author: benjamin.peterson Date: Fri Sep 11 22:42:29 2009 New Revision: 74740 Log: kill reference to default encoding #6889 Modified: python/branches/py3k/Doc/howto/unicode.rst Modified: python/branches/py3k/Doc/howto/unicode.rst ============================================================================== --- python/branches/py3k/Doc/howto/unicode.rst (original) +++ python/branches/py3k/Doc/howto/unicode.rst Fri Sep 11 22:42:29 2009 @@ -150,9 +150,8 @@ are more efficient and convenient. Encodings don't have to handle every possible Unicode character, and most -encodings don't. For example, Python's default encoding is the 'ascii' -encoding. The rules for converting a Unicode string into the ASCII encoding are -simple; for each code point: +encodings don't. The rules for converting a Unicode string into the ASCII +encoding, for example, are simple; for each code point: 1. If the code point is < 128, each byte is the same as the value of the code point. From python-checkins at python.org Fri Sep 11 23:17:13 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 11 Sep 2009 21:17:13 -0000 Subject: [Python-checkins] r74741 - in python/branches/py3k: Lib/pdb.py Misc/NEWS Message-ID: Author: benjamin.peterson Date: Fri Sep 11 23:17:13 2009 New Revision: 74741 Log: #6888 fix the alias command with no arguments Modified: python/branches/py3k/Lib/pdb.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/pdb.py ============================================================================== --- python/branches/py3k/Lib/pdb.py (original) +++ python/branches/py3k/Lib/pdb.py Fri Sep 11 23:17:13 2009 @@ -841,8 +841,7 @@ def do_alias(self, arg): args = arg.split() if len(args) == 0: - keys = self.aliases.keys() - keys.sort() + keys = sorted(self.aliases.keys()) for alias in keys: print("%s = %s" % (alias, self.aliases[alias]), file=self.stdout) return Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Sep 11 23:17:13 2009 @@ -70,6 +70,8 @@ Library ------- +- Issue #6888: pdb's alias command was broken when no arguments were given. + - Issue #6857: Default format() alignment should be '>' for Decimal instances. From python-checkins at python.org Fri Sep 11 23:21:12 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 11 Sep 2009 21:21:12 -0000 Subject: [Python-checkins] r74742 - in python/branches/release31-maint: Lib/pdb.py Misc/NEWS Message-ID: Author: benjamin.peterson Date: Fri Sep 11 23:21:12 2009 New Revision: 74742 Log: Merged revisions 74741 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74741 | benjamin.peterson | 2009-09-11 16:17:13 -0500 (Fri, 11 Sep 2009) | 1 line #6888 fix the alias command with no arguments ........ 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 Sep 11 23:21:12 2009 @@ -841,8 +841,7 @@ def do_alias(self, arg): args = arg.split() if len(args) == 0: - keys = self.aliases.keys() - keys.sort() + keys = sorted(self.aliases.keys()) for alias in keys: print("%s = %s" % (alias, self.aliases[alias]), file=self.stdout) return Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Sep 11 23:21:12 2009 @@ -52,6 +52,8 @@ Library ------- +- Issue #6888: pdb's alias command was broken when no arguments were given. + - Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning NaN or raising InvalidContext. Also, fix infinite recursion in long(Decimal('nan')). From python-checkins at python.org Fri Sep 11 23:24:37 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 11 Sep 2009 21:24:37 -0000 Subject: [Python-checkins] r74743 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Fri Sep 11 23:24:36 2009 New Revision: 74743 Log: Blocked revisions 74733-74734 via svnmerge ........ r74733 | benjamin.peterson | 2009-09-09 06:40:54 -0500 (Wed, 09 Sep 2009) | 1 line tabbify ........ r74734 | benjamin.peterson | 2009-09-09 06:42:57 -0500 (Wed, 09 Sep 2009) | 1 line revert unintended changes ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Fri Sep 11 23:30:06 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 11 Sep 2009 21:30:06 -0000 Subject: [Python-checkins] r74744 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Fri Sep 11 23:30:05 2009 New Revision: 74744 Log: Blocked revisions 74300,74490,74519,74631,74635-74637,74684,74721 via svnmerge ........ r74300 | raymond.hettinger | 2009-08-04 14:08:05 -0500 (Tue, 04 Aug 2009) | 1 line Issue 6637: defaultdict.copy() failed with an empty factory. ........ r74490 | benjamin.peterson | 2009-08-17 08:39:41 -0500 (Mon, 17 Aug 2009) | 1 line typos ........ r74519 | guilherme.polo | 2009-08-18 11:39:36 -0500 (Tue, 18 Aug 2009) | 1 line Added missing static option for OptionMenu. Issue #5961. ........ r74631 | georg.brandl | 2009-09-02 15:37:16 -0500 (Wed, 02 Sep 2009) | 1 line #6821: fix signature of PyBuffer_Release(). ........ r74635 | armin.rigo | 2009-09-03 14:40:07 -0500 (Thu, 03 Sep 2009) | 2 lines Found the next crasher by thinking about this logic in PyPy. ........ r74636 | armin.rigo | 2009-09-03 14:42:03 -0500 (Thu, 03 Sep 2009) | 3 lines Does not terminate: consume all memory without responding to Ctrl-C. I am not too sure why, but you can surely find out by gdb'ing a bit... ........ r74637 | armin.rigo | 2009-09-03 14:45:27 -0500 (Thu, 03 Sep 2009) | 4 lines Sorry, sorry! Ignore my previous two commits. I mixed up the version of python with which I tried running the crashers. They don't crash the current HEAD. ........ r74684 | ronald.oussoren | 2009-09-06 07:23:18 -0500 (Sun, 06 Sep 2009) | 2 lines Fix for issue 4937 ........ r74721 | thomas.heller | 2009-09-08 14:24:36 -0500 (Tue, 08 Sep 2009) | 1 line Make ctypes compile again with older Python versions. ........ Modified: python/branches/py3k/ (props changed) From nnorwitz at gmail.com Fri Sep 11 23:51:11 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 11 Sep 2009 17:51:11 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090911215111.GA13677@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 0, -420] references, sum=-420 Less important issues: ---------------------- test_asynchat leaked [0, 0, 117] references, sum=117 test_cmd_line leaked [25, 0, 0] references, sum=25 test_file2k leaked [0, 80, -80] references, sum=0 test_smtplib leaked [-85, 157, -65] references, sum=7 test_sys leaked [21, 0, 0] references, sum=21 test_telnetlib leaked [0, 0, 91] references, sum=91 test_thread leaked [0, 115, -115] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_xmlrpc leaked [-196, 0, 0] references, sum=-196 From python-checkins at python.org Sat Sep 12 00:24:04 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 11 Sep 2009 22:24:04 -0000 Subject: [Python-checkins] r74745 - in python/branches/py3k: Doc/conf.py Doc/distutils/builtdist.rst Doc/library/cgi.rst Doc/library/constants.rst Doc/library/ftplib.rst Doc/library/logging.rst Doc/library/multiprocessing.rst Doc/library/stdtypes.rst Doc/library/warnings.rst Doc/tutorial/introduction.rst Lib/http/cookies.py Lib/idlelib/macosxSupport.py Lib/idlelib/rpc.py Lib/multiprocessing/queues.py Lib/test/test_descr.py Lib/webbrowser.py Misc/ACKS Modules/signalmodule.c Objects/classobject.c Objects/funcobject.c configure configure.in pyconfig.h.in Message-ID: Author: benjamin.peterson Date: Sat Sep 12 00:24:02 2009 New Revision: 74745 Log: Merged revisions 74277,74321,74323,74326,74355,74465,74467,74488,74492,74513,74531,74549,74553,74625,74632,74643-74644,74647,74652,74666,74671,74727,74739 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74277 | sean.reifschneider | 2009-08-01 18:54:55 -0500 (Sat, 01 Aug 2009) | 3 lines - Issue #6624: yArg_ParseTuple with "s" format when parsing argument with NUL: Bogus TypeError detail string. ........ r74321 | guilherme.polo | 2009-08-05 11:51:41 -0500 (Wed, 05 Aug 2009) | 1 line Easier reference to find (at least while svn continues being used). ........ r74323 | guilherme.polo | 2009-08-05 18:48:26 -0500 (Wed, 05 Aug 2009) | 1 line Typo. ........ r74326 | jesse.noller | 2009-08-05 21:05:56 -0500 (Wed, 05 Aug 2009) | 1 line Fix issue 4660: spurious task_done errors in multiprocessing, remove doc note for from_address ........ r74355 | gregory.p.smith | 2009-08-12 12:02:37 -0500 (Wed, 12 Aug 2009) | 2 lines comment typo fix ........ r74465 | vinay.sajip | 2009-08-15 18:23:12 -0500 (Sat, 15 Aug 2009) | 1 line Added section on logging to one file from multiple processes. ........ r74467 | vinay.sajip | 2009-08-15 18:34:47 -0500 (Sat, 15 Aug 2009) | 1 line Refined section on logging to one file from multiple processes. ........ r74488 | vinay.sajip | 2009-08-17 08:14:37 -0500 (Mon, 17 Aug 2009) | 1 line Further refined section on logging to one file from multiple processes. ........ r74492 | r.david.murray | 2009-08-17 14:26:49 -0500 (Mon, 17 Aug 2009) | 2 lines Issue 6685: 'toupper' -> 'upper' in cgi doc example explanation. ........ r74513 | skip.montanaro | 2009-08-18 09:37:52 -0500 (Tue, 18 Aug 2009) | 1 line missing module ref (issue6723) ........ r74531 | vinay.sajip | 2009-08-20 17:04:32 -0500 (Thu, 20 Aug 2009) | 1 line Added section on exceptions raised during logging. ........ r74549 | benjamin.peterson | 2009-08-24 12:42:36 -0500 (Mon, 24 Aug 2009) | 1 line fix pdf building by teaching latex the right encoding package ........ r74553 | r.david.murray | 2009-08-26 20:04:59 -0500 (Wed, 26 Aug 2009) | 2 lines Remove leftover text from end of sentence. ........ r74625 | benjamin.peterson | 2009-09-01 17:27:57 -0500 (Tue, 01 Sep 2009) | 1 line remove the check that classmethod's argument is a callable ........ r74632 | georg.brandl | 2009-09-03 02:27:26 -0500 (Thu, 03 Sep 2009) | 1 line #6828: fix wrongly highlighted blocks. ........ r74643 | georg.brandl | 2009-09-04 01:59:20 -0500 (Fri, 04 Sep 2009) | 2 lines Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. ........ r74644 | georg.brandl | 2009-09-04 02:55:14 -0500 (Fri, 04 Sep 2009) | 1 line #5047: remove Monterey support from configure. ........ r74647 | georg.brandl | 2009-09-04 03:17:04 -0500 (Fri, 04 Sep 2009) | 2 lines Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. ........ r74652 | georg.brandl | 2009-09-04 06:25:37 -0500 (Fri, 04 Sep 2009) | 1 line #6756: add some info about the "acct" parameter. ........ r74666 | georg.brandl | 2009-09-05 04:04:09 -0500 (Sat, 05 Sep 2009) | 1 line #6841: remove duplicated word. ........ r74671 | georg.brandl | 2009-09-05 11:47:17 -0500 (Sat, 05 Sep 2009) | 1 line #6843: add link from filterwarnings to where the meaning of the arguments is covered. ........ r74727 | benjamin.peterson | 2009-09-08 18:04:22 -0500 (Tue, 08 Sep 2009) | 1 line #6865 fix ref counting in initialization of pwd module ........ r74739 | georg.brandl | 2009-09-11 02:55:20 -0500 (Fri, 11 Sep 2009) | 1 line Move function back to its section. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/conf.py python/branches/py3k/Doc/distutils/builtdist.rst python/branches/py3k/Doc/library/cgi.rst python/branches/py3k/Doc/library/constants.rst python/branches/py3k/Doc/library/ftplib.rst python/branches/py3k/Doc/library/logging.rst python/branches/py3k/Doc/library/multiprocessing.rst python/branches/py3k/Doc/library/stdtypes.rst python/branches/py3k/Doc/library/warnings.rst python/branches/py3k/Doc/tutorial/introduction.rst python/branches/py3k/Lib/http/cookies.py python/branches/py3k/Lib/idlelib/macosxSupport.py python/branches/py3k/Lib/idlelib/rpc.py python/branches/py3k/Lib/multiprocessing/queues.py python/branches/py3k/Lib/test/test_descr.py python/branches/py3k/Lib/webbrowser.py python/branches/py3k/Misc/ACKS python/branches/py3k/Modules/signalmodule.c python/branches/py3k/Objects/classobject.c python/branches/py3k/Objects/funcobject.c python/branches/py3k/configure python/branches/py3k/configure.in python/branches/py3k/pyconfig.h.in Modified: python/branches/py3k/Doc/conf.py ============================================================================== --- python/branches/py3k/Doc/conf.py (original) +++ python/branches/py3k/Doc/conf.py Sat Sep 12 00:24:02 2009 @@ -151,6 +151,9 @@ # Documents to append as an appendix to all manuals. latex_appendices = ['glossary', 'about', 'license', 'copyright'] +# Get LaTeX to handle Unicode correctly +latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}'} + # Options for the coverage checker # -------------------------------- Modified: python/branches/py3k/Doc/distutils/builtdist.rst ============================================================================== --- python/branches/py3k/Doc/distutils/builtdist.rst (original) +++ python/branches/py3k/Doc/distutils/builtdist.rst Sat Sep 12 00:24:02 2009 @@ -429,13 +429,6 @@ also the configuration. For details refer to Microsoft's documentation of the :cfunc:`SHGetSpecialFolderPath` function. -Vista User Access Control (UAC) -=============================== - -Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control` -option. The default is 'none' (meaning no UAC handling is done), and other -valid values are 'auto' (meaning prompt for UAC elevation if Python was -installed for all users) and 'force' (meaning always prompt for elevation) .. function:: create_shortcut(target, description, filename[, arguments[, workdir[, iconpath[, iconindex]]]]) @@ -447,3 +440,12 @@ and *iconindex* is the index of the icon in the file *iconpath*. Again, for details consult the Microsoft documentation for the :class:`IShellLink` interface. + + +Vista User Access Control (UAC) +=============================== + +Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control` +option. The default is 'none' (meaning no UAC handling is done), and other +valid values are 'auto' (meaning prompt for UAC elevation if Python was +installed for all users) and 'force' (meaning always prompt for elevation). Modified: python/branches/py3k/Doc/library/cgi.rst ============================================================================== --- python/branches/py3k/Doc/library/cgi.rst (original) +++ python/branches/py3k/Doc/library/cgi.rst Sat Sep 12 00:24:02 2009 @@ -208,7 +208,7 @@ provide valid input to your scripts. For example, if a curious user appends another ``user=foo`` pair to the query string, then the script would crash, because in this situation the ``getvalue("user")`` method call returns a list -instead of a string. Calling the :meth:`toupper` method on a list is not valid +instead of a string. Calling the :meth:`~str.upper` method on a list is not valid (since lists do not have a method of this name) and results in an :exc:`AttributeError` exception. Modified: python/branches/py3k/Doc/library/constants.rst ============================================================================== --- python/branches/py3k/Doc/library/constants.rst (original) +++ python/branches/py3k/Doc/library/constants.rst Sat Sep 12 00:24:02 2009 @@ -66,7 +66,7 @@ Objects that when printed, print a message like "Use quit() or Ctrl-D (i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the - specified exit code, and when . + specified exit code. .. data:: copyright license Modified: python/branches/py3k/Doc/library/ftplib.rst ============================================================================== --- python/branches/py3k/Doc/library/ftplib.rst (original) +++ python/branches/py3k/Doc/library/ftplib.rst Sat Sep 12 00:24:02 2009 @@ -140,7 +140,8 @@ ``'anonymous@'``. This function should be called only once for each instance, after a connection has been established; it should not be called at all if a host and user were given when the instance was created. Most FTP commands are - only allowed after the client has logged in. + only allowed after the client has logged in. The *acct* parameter supplies + "accounting information"; few systems implement this. .. method:: FTP.abort() Modified: python/branches/py3k/Doc/library/logging.rst ============================================================================== --- python/branches/py3k/Doc/library/logging.rst (original) +++ python/branches/py3k/Doc/library/logging.rst Sat Sep 12 00:24:02 2009 @@ -1362,6 +1362,7 @@ working lock functionality on all platforms (see http://bugs.python.org/issue3770). + .. _network-logging: Sending and receiving logging events across a network Modified: python/branches/py3k/Doc/library/multiprocessing.rst ============================================================================== --- python/branches/py3k/Doc/library/multiprocessing.rst (original) +++ python/branches/py3k/Doc/library/multiprocessing.rst Sat Sep 12 00:24:02 2009 @@ -1151,11 +1151,6 @@ Run the server in the current process. - .. method:: from_address(address, authkey) - - A class method which creates a manager object referring to a pre-existing - server process which is using the given address and authentication key. - .. method:: get_server() Returns a :class:`Server` object which represents the actual server under Modified: python/branches/py3k/Doc/library/stdtypes.rst ============================================================================== --- python/branches/py3k/Doc/library/stdtypes.rst (original) +++ python/branches/py3k/Doc/library/stdtypes.rst Sat Sep 12 00:24:02 2009 @@ -1938,7 +1938,7 @@ :meth:`update` accepts either another dictionary object or an iterable of key/value pairs (as a tuple or other iterable of length two). If keyword - arguments are specified, the dictionary is then is updated with those + arguments are specified, the dictionary is then updated with those key/value pairs: ``d.update(red=1, blue=2)``. .. method:: values() Modified: python/branches/py3k/Doc/library/warnings.rst ============================================================================== --- python/branches/py3k/Doc/library/warnings.rst (original) +++ python/branches/py3k/Doc/library/warnings.rst Sat Sep 12 00:24:02 2009 @@ -1,4 +1,3 @@ - :mod:`warnings` --- Warning control =================================== @@ -131,16 +130,16 @@ +---------------+----------------------------------------------+ * *message* is a string containing a regular expression that the warning message - must match (the match is compiled to always be case-insensitive) + must match (the match is compiled to always be case-insensitive). * *category* is a class (a subclass of :exc:`Warning`) of which the warning - category must be a subclass in order to match + category must be a subclass in order to match. * *module* is a string containing a regular expression that the module name must - match (the match is compiled to be case-sensitive) + match (the match is compiled to be case-sensitive). * *lineno* is an integer that the line number where the warning occurred must - match, or ``0`` to match all line numbers + match, or ``0`` to match all line numbers. Since the :exc:`Warning` class is derived from the built-in :exc:`Exception` class, to turn a warning into an error we simply raise ``category(message)``. @@ -285,18 +284,20 @@ .. function:: formatwarning(message, category, filename, lineno[, line]) - Format a warning the standard way. This returns a string which may contain - embedded newlines and ends in a newline. *line* is - a line of source code to be included in the warning message; if *line* is not supplied, - :func:`formatwarning` will try to read the line specified by *filename* and *lineno*. + Format a warning the standard way. This returns a string which may contain + embedded newlines and ends in a newline. *line* is a line of source code to + be included in the warning message; if *line* is not supplied, + :func:`formatwarning` will try to read the line specified by *filename* and + *lineno*. .. function:: filterwarnings(action[, message[, category[, module[, lineno[, append]]]]]) - Insert an entry into the list of warnings filters. The entry is inserted at the - front by default; if *append* is true, it is inserted at the end. This checks - the types of the arguments, compiles the message and module regular expressions, - and inserts them as a tuple in the list of warnings filters. Entries closer to + Insert an entry into the list of :ref:`warnings filter specifications + `. The entry is inserted at the front by default; if + *append* is true, it is inserted at the end. This checks the types of the + arguments, compiles the *message* and *module* regular expressions, and + inserts them as a tuple in the list of warnings filters. Entries closer to the front of the list override entries later in the list, if both match a particular warning. Omitted arguments default to a value that matches everything. @@ -304,10 +305,11 @@ .. function:: simplefilter(action[, category[, lineno[, append]]]) - Insert a simple entry into the list of warnings filters. The meaning of the - function parameters is as for :func:`filterwarnings`, but regular expressions - are not needed as the filter inserted always matches any message in any module - as long as the category and line number match. + Insert a simple entry into the list of :ref:`warnings filter specifications + `. The meaning of the function parameters is as for + :func:`filterwarnings`, but regular expressions are not needed as the filter + inserted always matches any message in any module as long as the category and + line number match. .. function:: resetwarnings() Modified: python/branches/py3k/Doc/tutorial/introduction.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/introduction.rst (original) +++ python/branches/py3k/Doc/tutorial/introduction.rst Sat Sep 12 00:24:02 2009 @@ -150,7 +150,6 @@ 4.0 >>> abs(a) # sqrt(a.real**2 + a.imag**2) 5.0 - >>> In interactive mode, the last printed expression is assigned to the variable ``_``. This means that when you are using Python as a desk calculator, it is @@ -164,7 +163,6 @@ 113.0625 >>> round(_, 2) 113.06 - >>> This variable should be treated as read-only by the user. Don't explicitly assign a value to it --- you would create an independent local variable with the @@ -212,12 +210,32 @@ Note that newlines still need to be embedded in the string using ``\n``; the newline following the trailing backslash is discarded. This example would print -the following:: +the following: + +.. code-block:: text This is a rather long string containing several lines of text just as you would do in C. Note that whitespace at the beginning of the line is significant. +Or, strings can be surrounded in a pair of matching triple-quotes: ``"""`` or +``'''``. End of lines do not need to be escaped when using triple-quotes, but +they will be included in the string. :: + + print """ + Usage: thingy [OPTIONS] + -h Display this usage message + -H hostname Hostname to connect to + """ + +produces the following output: + +.. code-block:: text + + Usage: thingy [OPTIONS] + -h Display this usage message + -H hostname Hostname to connect to + If we make the string literal a "raw" string, ``\n`` sequences are not converted to newlines, but the backslash at the end of the line, and the newline character in the source, are both included in the string as data. Thus, the example:: @@ -227,7 +245,9 @@ print(hello) -would print:: +would print: + +.. code-block:: text This is a rather long string containing\n\ several lines of text much as you would do in C. Modified: python/branches/py3k/Lib/http/cookies.py ============================================================================== --- python/branches/py3k/Lib/http/cookies.py (original) +++ python/branches/py3k/Lib/http/cookies.py Sat Sep 12 00:24:02 2009 @@ -514,7 +514,9 @@ if type(rawdata) == type(""): self.__ParseString(rawdata) else: - self.update(rawdata) + # self.update() wouldn't call our custom __setitem__ + for k, v in rawdata.items(): + self[k] = v return def __ParseString(self, str, patt=_CookiePattern): Modified: python/branches/py3k/Lib/idlelib/macosxSupport.py ============================================================================== --- python/branches/py3k/Lib/idlelib/macosxSupport.py (original) +++ python/branches/py3k/Lib/idlelib/macosxSupport.py Sat Sep 12 00:24:02 2009 @@ -9,7 +9,7 @@ """ Returns True if Python is running from within an app on OSX. If so, assume that Python was built with Aqua Tcl/Tk rather than - X11 Tck/Tk. + X11 Tcl/Tk. """ return (sys.platform == 'darwin' and '.app' in sys.executable) Modified: python/branches/py3k/Lib/idlelib/rpc.py ============================================================================== --- python/branches/py3k/Lib/idlelib/rpc.py (original) +++ python/branches/py3k/Lib/idlelib/rpc.py Sat Sep 12 00:24:02 2009 @@ -595,4 +595,4 @@ # XXX KBK 09Sep03 We need a proper unit test for this module. Previously -# existing test code was removed at Rev 1.27. +# existing test code was removed at Rev 1.27 (r34098). Modified: python/branches/py3k/Lib/multiprocessing/queues.py ============================================================================== --- python/branches/py3k/Lib/multiprocessing/queues.py (original) +++ python/branches/py3k/Lib/multiprocessing/queues.py Sat Sep 12 00:24:02 2009 @@ -282,9 +282,22 @@ Queue.__setstate__(self, state[:-2]) self._cond, self._unfinished_tasks = state[-2:] - def put(self, item, block=True, timeout=None): - Queue.put(self, item, block, timeout) - self._unfinished_tasks.release() + def put(self, obj, block=True, timeout=None): + assert not self._closed + if not self._sem.acquire(block, timeout): + raise Full + + self._notempty.acquire() + self._cond.acquire() + try: + if self._thread is None: + self._start_thread() + self._buffer.append(obj) + self._unfinished_tasks.release() + self._notempty.notify() + finally: + self._cond.release() + self._notempty.release() def task_done(self): self._cond.acquire() Modified: python/branches/py3k/Lib/test/test_descr.py ============================================================================== --- python/branches/py3k/Lib/test/test_descr.py (original) +++ python/branches/py3k/Lib/test/test_descr.py Sat Sep 12 00:24:02 2009 @@ -1268,13 +1268,9 @@ self.assertEqual(super(D,D).goo(), (D,)) self.assertEqual(super(D,d).goo(), (D,)) - # Verify that argument is checked for callability (SF bug 753451) - try: - classmethod(1).__get__(1) - except TypeError: - pass - else: - self.fail("classmethod should check for callability") + # Verify that a non-callable will raise + meth = classmethod(1).__get__(1) + self.assertRaises(TypeError, meth) # Verify that classmethod() doesn't allow keyword args try: Modified: python/branches/py3k/Lib/webbrowser.py ============================================================================== --- python/branches/py3k/Lib/webbrowser.py (original) +++ python/branches/py3k/Lib/webbrowser.py Sat Sep 12 00:24:02 2009 @@ -626,7 +626,9 @@ # and prepend to _tryorder for cmdline in _userchoices: if cmdline != '': - _synthesize(cmdline, -1) + cmd = _synthesize(cmdline, -1) + if cmd[1] is None: + register(cmdline, None, GenericBrowser(cmdline), -1) cmdline = None # to make del work if _userchoices was empty del cmdline del _userchoices Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Sat Sep 12 00:24:02 2009 @@ -489,6 +489,7 @@ Lambert Meertens Bill van Melle Lucas Prado Melo +Brian Merrell Luke Mewburn Mike Meyer Steven Miale Modified: python/branches/py3k/Modules/signalmodule.c ============================================================================== --- python/branches/py3k/Modules/signalmodule.c (original) +++ python/branches/py3k/Modules/signalmodule.c Sat Sep 12 00:24:02 2009 @@ -853,7 +853,7 @@ #endif /* - * The is_stripped variable is meant to speed up the calls to + * The is_tripped variable is meant to speed up the calls to * PyErr_CheckSignals (both directly or via pending calls) when no * signal has arrived. This variable is set to 1 when a signal arrives * and it is set to 0 here, when we know some signals arrived. This way Modified: python/branches/py3k/Objects/classobject.c ============================================================================== --- python/branches/py3k/Objects/classobject.c (original) +++ python/branches/py3k/Objects/classobject.c Sat Sep 12 00:24:02 2009 @@ -43,10 +43,6 @@ PyMethod_New(PyObject *func, PyObject *self) { register PyMethodObject *im; - if (!PyCallable_Check(func)) { - PyErr_BadInternalCall(); - return NULL; - } if (self == NULL) { PyErr_BadInternalCall(); return NULL; Modified: python/branches/py3k/Objects/funcobject.c ============================================================================== --- python/branches/py3k/Objects/funcobject.c (original) +++ python/branches/py3k/Objects/funcobject.c Sat Sep 12 00:24:02 2009 @@ -765,12 +765,6 @@ return -1; if (!_PyArg_NoKeywords("classmethod", kwds)) return -1; - if (!PyCallable_Check(callable)) { - PyErr_Format(PyExc_TypeError, "'%s' object is not callable", - callable->ob_type->tp_name); - return -1; - } - Py_INCREF(callable); cm->cm_callable = callable; return 0; Modified: python/branches/py3k/configure ============================================================================== --- python/branches/py3k/configure (original) +++ python/branches/py3k/configure Sat Sep 12 00:24:02 2009 @@ -1,12 +1,12 @@ #! /bin/sh -# From configure.in Revision: 74682 . +# From configure.in Revision: 74713 . # 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 @@ -1911,20 +2033,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 @@ -2046,12 +2168,12 @@ ## # 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` - if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + if test "$ac_sys_system" = "AIX" \ -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then ac_sys_release=`uname -v` else @@ -2210,8 +2332,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 @@ -2221,11 +2343,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 @@ -2237,8 +2359,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 @@ -2256,22 +2378,19 @@ case $ac_sys_system in AIX*) CC=cc_r without_gcc=;; - Monterey*) - RANLIB=: - without_gcc=;; *) without_gcc=no;; 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 @@ -2284,10 +2403,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. @@ -2300,7 +2419,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 @@ -2311,11 +2430,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 @@ -2324,10 +2443,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. @@ -2340,7 +2459,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 @@ -2351,11 +2470,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 @@ -2363,12 +2482,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 @@ -2381,10 +2496,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. @@ -2397,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_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 @@ -2408,11 +2523,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 @@ -2421,10 +2536,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. @@ -2442,7 +2557,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 @@ -2465,11 +2580,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 @@ -2480,10 +2595,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. @@ -2496,7 +2611,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 @@ -2507,11 +2622,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 @@ -2524,10 +2639,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. @@ -2540,7 +2655,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 @@ -2551,11 +2666,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 @@ -2567,12 +2682,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 @@ -2582,44 +2693,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 @@ -2638,27 +2755,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 @@ -2669,10 +2781,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' @@ -2683,7 +2796,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 @@ -2710,25 +2823,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 @@ -2737,49 +2852,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 @@ -2788,31 +2907,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. */ @@ -2835,40 +2956,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. */ @@ -2894,20 +3018,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 @@ -2917,15 +3042,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 @@ -2952,20 +3081,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="" @@ -2990,20 +3120,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 @@ -3029,20 +3160,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 @@ -3057,8 +3189,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 @@ -3074,10 +3206,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 @@ -3148,20 +3280,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 @@ -3177,15 +3310,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 @@ -3198,8 +3331,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 @@ -3224,8 +3357,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" @@ -3233,10 +3366,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 [\\/]* | ?:[\\/]*) @@ -3251,7 +3384,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 @@ -3264,20 +3397,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 [\\/]* | ?:[\\/]*) @@ -3292,7 +3425,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 @@ -3305,11 +3438,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 ;; @@ -3325,10 +3458,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. @@ -3341,7 +3474,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 @@ -3352,11 +3485,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 @@ -3371,12 +3504,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. @@ -3391,15 +3524,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" @@ -3431,20 +3564,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. @@ -3468,13 +3602,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 @@ -3482,7 +3617,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. @@ -3507,8 +3642,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 @@ -3536,20 +3671,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. @@ -3573,13 +3709,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 @@ -3587,7 +3724,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. @@ -3603,11 +3740,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 @@ -3617,42 +3756,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; } +{ $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 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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` @@ -3667,74 +3801,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` @@ -3749,63 +3869,510 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac + $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;} + { (exit 1); exit 1; }; } + 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; } + 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 +/* 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 + +# 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=`$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 - $ac_path_EGREP_found && break 3 - done -done -done -IFS=$as_save_IFS + if test "$MINIX" = yes; then +cat >>confdefs.h <<\_ACEOF +#define _POSIX_SOURCE 1 +_ACEOF -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 +cat >>confdefs.h <<\_ACEOF +#define _POSIX_1_SOURCE 2 +_ACEOF -else - ac_cv_path_EGREP=$EGREP -fi +cat >>confdefs.h <<\_ACEOF +#define _MINIX 1 +_ACEOF - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" + fi -{ echo "$as_me:$LINENO: checking for AIX" >&5 -echo $ECHO_N "checking for AIX... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF + { $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. */ -#ifdef _AIX - yes -#endif +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} _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 +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 -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -rm -f -r conftest* + 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 @@ -3818,8 +4385,8 @@ esac -{ echo "$as_me:$LINENO: checking for --with-suffix" >&5 -echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; } +{ $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 @@ -3831,26 +4398,26 @@ esac fi -{ echo "$as_me:$LINENO: result: $EXEEXT" >&5 -echo "${ECHO_T}$EXEEXT" >&6; } +{ $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 -{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 -echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; } +{ $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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } BUILDEXEEXT=.exe 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; } BUILDEXEEXT=$EXEEXT fi rmdir CaseSensitiveTestDir @@ -3867,10 +4434,6 @@ 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 @@ -3883,14 +4446,14 @@ -{ echo "$as_me:$LINENO: checking LIBRARY" >&5 -echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; } +{ $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 @@ -3925,8 +4488,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)' @@ -3938,16 +4501,14 @@ 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; } +{ $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 @@ -3955,8 +4516,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` @@ -3967,11 +4528,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; @@ -3987,11 +4548,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" @@ -4013,29 +4574,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 @@ -4043,8 +4607,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") @@ -4053,8 +4617,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 @@ -4138,16 +4702,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. @@ -4160,7 +4724,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 @@ -4171,11 +4735,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 @@ -4184,10 +4748,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. @@ -4200,7 +4764,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 @@ -4211,11 +4775,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 @@ -4223,12 +4787,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 @@ -4242,10 +4802,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. @@ -4258,7 +4818,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 @@ -4269,11 +4829,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 @@ -4292,10 +4852,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. @@ -4308,7 +4868,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 @@ -4320,11 +4880,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 @@ -4360,8 +4920,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 @@ -4387,11 +4947,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 @@ -4420,17 +4981,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 @@ -4443,8 +5016,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. @@ -4466,8 +5039,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 @@ -4479,15 +5052,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 @@ -4542,15 +5115,6 @@ 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 @@ -4565,12 +5129,12 @@ # 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 "${ac_cv_no_strict_aliasing_ok+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_no_strict_aliasing_ok=no @@ -4589,29 +5153,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_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 @@ -4619,8 +5186,8 @@ 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" @@ -4668,8 +5235,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 @@ -4762,10 +5329,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" @@ -4786,29 +5353,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 @@ -4816,8 +5386,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 @@ -4830,10 +5400,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" @@ -4854,29 +5424,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 @@ -4884,8 +5457,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 @@ -4894,8 +5467,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 @@ -4921,13 +5494,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 @@ -4937,14 +5511,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 @@ -4957,10 +5531,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 @@ -4991,19 +5565,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 @@ -5011,13 +5587,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 @@ -5025,8 +5602,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 @@ -5038,10 +5615,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" @@ -5074,29 +5651,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 @@ -5104,8 +5684,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 @@ -5115,10 +5695,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" @@ -5151,29 +5731,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_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 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 @@ -5181,8 +5764,8 @@ CC="$ac_save_cc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 -echo "${ECHO_T}$ac_cv_kthread" >&6; } +{ $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 @@ -5192,10 +5775,10 @@ # 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -pthread" @@ -5228,29 +5811,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=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=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 @@ -5258,8 +5844,8 @@ CC="$ac_save_cc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 -echo "${ECHO_T}$ac_cv_pthread" >&6; } +{ $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 @@ -5267,8 +5853,8 @@ ac_cv_cxx_thread=no if test ! -z "$CXX" then -{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5 -echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; } +{ $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" @@ -5298,17 +5884,17 @@ fi rm -fr conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 -echo "${ECHO_T}$ac_cv_cxx_thread" >&6; } +{ $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 -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5335,20 +5921,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_stdc=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 @@ -5373,7 +5960,7 @@ else ac_cv_header_stdc=no fi -rm -f -r conftest* +rm -f conftest* fi @@ -5394,7 +5981,7 @@ else ac_cv_header_stdc=no fi -rm -f -r conftest* +rm -f conftest* fi @@ -5440,37 +6027,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 : 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_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 -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $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 @@ -5479,75 +6069,6 @@ 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 -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - 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 - 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 - - @@ -5615,20 +6136,21 @@ 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` +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 - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $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 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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; } 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 $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5644,32 +6166,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 $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +{ $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 @@ -5683,51 +6206,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: $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: $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:* ) - { 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: $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/ ## @@ -5736,21 +6260,24 @@ ) | 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; } +{ $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 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; } +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 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -5764,11 +6291,11 @@ 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; } + 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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5794,20 +6321,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 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" @@ -5815,12 +6343,15 @@ 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 +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 `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -5829,10 +6360,10 @@ 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; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -5870,26 +6401,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_opendir=$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_opendir+set}" = set; then @@ -5904,8 +6439,8 @@ 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; } +{ $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" @@ -5913,10 +6448,10 @@ fi else - { echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -5954,26 +6489,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_opendir=$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_opendir+set}" = set; then @@ -5988,8 +6527,8 @@ 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; } +{ $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" @@ -5998,10 +6537,10 @@ 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6024,46 +6563,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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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_header_sys_types_h_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_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 -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; } +{ $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 - { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 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:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +$as_echo "$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; } +{ $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 @@ -6079,32 +6622,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 sys/mkdev.h presence" >&5 -echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; } +{ $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 @@ -6118,51 +6662,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: 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;} + { $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:* ) - { 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;} + { $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/ ## @@ -6171,18 +6716,18 @@ ) | 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $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 $ac_cv_header_sys_mkdev_h = yes; then +if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define MAJOR_IN_MKDEV 1 @@ -6194,17 +6739,17 @@ if test $ac_cv_header_sys_mkdev_h = no; then if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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: 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 sys/sysmacros.h usability" >&5 -echo $ECHO_N "checking sys/sysmacros.h 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 @@ -6220,32 +6765,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 sys/sysmacros.h presence" >&5 -echo $ECHO_N "checking sys/sysmacros.h 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 @@ -6259,51 +6805,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: 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;} + { $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: 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;} + { $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/ ## @@ -6312,18 +6859,18 @@ ) | 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $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 $ac_cv_header_sys_sysmacros_h = yes; then +if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define MAJOR_IN_SYSMACROS 1 @@ -6340,11 +6887,11 @@ 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; } +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. */ @@ -6366,20 +6913,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 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" @@ -6387,12 +6935,15 @@ 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 +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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6404,11 +6955,11 @@ 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; } +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. */ @@ -6433,20 +6984,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 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" @@ -6454,12 +7006,15 @@ 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 +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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6469,8 +7024,8 @@ # checks for typedefs was_it_defined=no -{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5 -echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; } +{ $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 @@ -6492,14 +7047,14 @@ fi -rm -f -r conftest* +rm -f conftest* -{ 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; } # 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 makedev" >&5 +$as_echo_n "checking for makedev... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6521,26 +7076,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_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 conftest.$ac_ext if test "$ac_cv_has_makedev" = "no"; then @@ -6569,26 +7128,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_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 conftest.$ac_ext if test "$ac_cv_has_makedev" = "yes"; then @@ -6599,8 +7162,8 @@ fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 -echo "${ECHO_T}$ac_cv_has_makedev" >&6; } +{ $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 @@ -6617,8 +7180,8 @@ # work-around, disable LFS on such configurations use_lfs=yes -{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5 -echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; } +{ $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 @@ -6644,28 +7207,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 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 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; } +{ $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 @@ -6693,11 +7257,150 @@ EOF # Type availability checks -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 +else + ac_cv_type_mode_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 (mode_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. */ +$ac_includes_default +int +main () +{ +if (sizeof ((mode_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 + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_mode_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 + +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 else + ac_cv_type_off_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 (off_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 @@ -6705,14 +7408,11 @@ 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; +if (sizeof ((off_t))) + return 0; ; return 0; } @@ -6723,59 +7423,66 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$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 + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_off_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_mode_t=no + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } -if test $ac_cv_type_mode_t = yes; then +{ $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 mode_t int +#define off_t long int _ACEOF 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 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. */ $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; +if (sizeof (pid_t)) + return 0; ; return 0; } @@ -6786,44 +7493,18 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$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 -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 @@ -6831,14 +7512,11 @@ 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; +if (sizeof ((pid_t))) + return 0; ; return 0; } @@ -6849,30 +7527,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_pid_t=yes + : +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 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; } -if test $ac_cv_type_pid_t = yes; then +{ $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 @@ -6882,10 +7569,10 @@ fi -{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6910,20 +7597,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_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 @@ -6931,34 +7619,66 @@ 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; } +{ $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 -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + 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. */ $ac_includes_default -typedef size_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) +if (sizeof (size_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. */ +$ac_includes_default +int +main () +{ +if (sizeof ((size_t))) + return 0; ; return 0; } @@ -6969,30 +7689,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_size_t=yes + : +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 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 + 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 +{ $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 @@ -7002,10 +7731,10 @@ 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7022,11 +7751,11 @@ else ac_cv_type_uid_t=no fi -rm -f -r conftest* +rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +{ $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 @@ -7041,10 +7770,10 @@ fi - { echo "$as_me:$LINENO: checking for uint32_t" >&5 -echo $ECHO_N "checking for uint32_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_c_uint32_t=no for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ @@ -7072,13 +7801,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 @@ -7089,7 +7819,7 @@ esac else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7099,8 +7829,8 @@ 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; } +{ $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) ;; #( *) @@ -7117,10 +7847,10 @@ esac - { echo "$as_me:$LINENO: checking for uint64_t" >&5 -echo $ECHO_N "checking for uint64_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_c_uint64_t=no for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ @@ -7148,13 +7878,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 @@ -7165,7 +7896,7 @@ esac else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7175,8 +7906,8 @@ 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; } +{ $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) ;; #( *) @@ -7193,10 +7924,10 @@ esac - { echo "$as_me:$LINENO: checking for int32_t" >&5 -echo $ECHO_N "checking for int32_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_c_int32_t=no for ac_type in 'int32_t' 'int' 'long int' \ @@ -7224,13 +7955,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 @@ -7246,7 +7978,7 @@ 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))]; + < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -7259,20 +7991,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 case $ac_type in @@ -7284,7 +8017,7 @@ 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 @@ -7294,8 +8027,8 @@ 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; } +{ $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) ;; #( *) @@ -7307,10 +8040,10 @@ esac - { echo "$as_me:$LINENO: checking for int64_t" >&5 -echo $ECHO_N "checking for int64_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_c_int64_t=no for ac_type in 'int64_t' 'int' 'long int' \ @@ -7338,13 +8071,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 @@ -7360,7 +8094,7 @@ 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))]; + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -7373,20 +8107,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 case $ac_type in @@ -7398,7 +8133,7 @@ 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 @@ -7408,8 +8143,8 @@ 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; } +{ $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) ;; #( *) @@ -7420,26 +8155,24 @@ ;; esac -{ echo "$as_me:$LINENO: checking for ssize_t" >&5 -echo $ECHO_N "checking for ssize_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - 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 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; +if (sizeof (ssize_t)) + return 0; ; return 0; } @@ -7450,45 +8183,18 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$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 -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 - -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. */ _ACEOF @@ -7496,14 +8202,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef int ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +if (sizeof ((ssize_t))) + return 0; ; return 0; } @@ -7514,38 +8217,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_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$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: 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 - ac_cv_type_int=no + fi 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; } +{ $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 +_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. -{ echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6; } +{ $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 - 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. @@ -7556,11 +8278,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 (int))) >= 0)]; test_array [0] = 0 ; @@ -7573,13 +8294,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 @@ -7593,11 +8315,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 (int))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7610,20 +8331,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` @@ -7637,7 +8359,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 @@ -7647,11 +8369,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 (int))) < 0)]; test_array [0] = 0 ; @@ -7664,13 +8385,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 @@ -7684,11 +8406,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 (int))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7701,20 +8422,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` @@ -7728,7 +8450,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= @@ -7748,11 +8470,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 (int))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7765,20 +8486,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` @@ -7789,11 +8511,13 @@ 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) + { { $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 -echo "$as_me: error: cannot compute sizeof (int) +$as_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_int=0 fi ;; @@ -7806,9 +8530,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 (int)); } +static unsigned long int ulongval () { return (long int) (sizeof (int)); } #include #include int @@ -7818,20 +8541,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (int))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (int)))) 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 (int)))) 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; ; @@ -7844,43 +8569,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_int=`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) + { { $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 -echo "$as_me: error: cannot compute sizeof (int) +$as_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_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 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_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } @@ -7889,68 +8619,14 @@ _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=$? - 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; } +{ $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 - 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. @@ -7961,11 +8637,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 (long))) >= 0)]; test_array [0] = 0 ; @@ -7978,13 +8653,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 @@ -7998,11 +8674,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 (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8015,20 +8690,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` @@ -8042,7 +8718,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 @@ -8052,11 +8728,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 (long))) < 0)]; test_array [0] = 0 ; @@ -8069,13 +8744,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 @@ -8089,11 +8765,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 (long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8106,20 +8781,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` @@ -8133,7 +8809,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= @@ -8153,11 +8829,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 (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8170,20 +8845,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` @@ -8194,11 +8870,13 @@ 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) + { { $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 (long) +$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_long=0 fi ;; @@ -8211,9 +8889,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 (long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long)); } #include #include int @@ -8223,20 +8900,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; ; @@ -8249,43 +8928,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_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_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) + { { $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 (long) +$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_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_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } @@ -8294,68 +8978,14 @@ _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. -{ echo "$as_me:$LINENO: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $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 - 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. @@ -8366,11 +8996,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 (void *))) >= 0)]; test_array [0] = 0 ; @@ -8383,13 +9012,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 @@ -8403,11 +9033,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 (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8420,20 +9049,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` @@ -8447,7 +9077,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 @@ -8457,11 +9087,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 (void *))) < 0)]; test_array [0] = 0 ; @@ -8474,13 +9103,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 @@ -8494,11 +9124,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 (void *))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8511,20 +9140,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` @@ -8538,7 +9168,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= @@ -8558,11 +9188,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 (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8575,20 +9204,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` @@ -8599,11 +9229,13 @@ 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 *) + { { $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 (void *) +$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_void_p=0 fi ;; @@ -8616,9 +9248,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 (void *)); } +static unsigned long int ulongval () { return (long int) (sizeof (void *)); } #include #include int @@ -8628,20 +9259,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; ; @@ -8654,43 +9287,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_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_void_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) + { { $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 (void *) +$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_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_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } @@ -8699,68 +9337,14 @@ _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. -{ echo "$as_me:$LINENO: checking size of short" >&5 -echo $ECHO_N "checking size of short... $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 - 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. @@ -8771,11 +9355,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 (short))) >= 0)]; test_array [0] = 0 ; @@ -8788,13 +9371,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 @@ -8808,11 +9392,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 (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8825,20 +9408,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` @@ -8852,7 +9436,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 @@ -8862,11 +9446,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 (short))) < 0)]; test_array [0] = 0 ; @@ -8879,13 +9462,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 @@ -8899,11 +9483,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 (short))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8916,20 +9499,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` @@ -8943,7 +9527,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= @@ -8963,11 +9547,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 (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8980,20 +9563,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` @@ -9004,11 +9588,13 @@ 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) + { { $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 (short) +$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_short=0 fi ;; @@ -9021,9 +9607,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 (short)); } +static unsigned long int ulongval () { return (long int) (sizeof (short)); } #include #include int @@ -9033,20 +9618,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; ; @@ -9059,43 +9646,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_short=`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) + { { $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 (short) +$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_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 -{ 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_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } @@ -9104,68 +9696,14 @@ _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. -{ echo "$as_me:$LINENO: checking size of float" >&5 -echo $ECHO_N "checking size of float... $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 - 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. @@ -9176,11 +9714,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 (float))) >= 0)]; test_array [0] = 0 ; @@ -9193,13 +9730,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 @@ -9213,11 +9751,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 (float))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9230,20 +9767,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` @@ -9257,7 +9795,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 @@ -9267,11 +9805,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 (float))) < 0)]; test_array [0] = 0 ; @@ -9284,13 +9821,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 @@ -9304,11 +9842,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 (float))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9321,20 +9858,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` @@ -9348,7 +9886,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= @@ -9368,11 +9906,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 (float))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9385,20 +9922,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` @@ -9409,11 +9947,13 @@ 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) + { { $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 (float) +$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_float=0 fi ;; @@ -9426,9 +9966,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 (float)); } +static unsigned long int ulongval () { return (long int) (sizeof (float)); } #include #include int @@ -9438,20 +9977,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; ; @@ -9464,43 +10005,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_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_float" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) + { { $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 (float) +$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_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_float" >&5 -echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +$as_echo "$ac_cv_sizeof_float" >&6; } @@ -9509,68 +10055,14 @@ _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. -{ echo "$as_me:$LINENO: checking size of double" >&5 -echo $ECHO_N "checking size of double... $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 - 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. @@ -9581,11 +10073,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 (double))) >= 0)]; test_array [0] = 0 ; @@ -9598,13 +10089,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 @@ -9618,11 +10110,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 (double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9635,20 +10126,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` @@ -9662,7 +10154,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 @@ -9672,11 +10164,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 (double))) < 0)]; test_array [0] = 0 ; @@ -9689,13 +10180,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 @@ -9709,11 +10201,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 (double))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9726,20 +10217,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` @@ -9753,7 +10245,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= @@ -9773,11 +10265,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 (double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9790,20 +10281,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` @@ -9814,11 +10306,13 @@ 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) + { { $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 (double) +$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_double=0 fi ;; @@ -9831,9 +10325,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 (double)); } +static unsigned long int ulongval () { return (long int) (sizeof (double)); } #include #include int @@ -9843,20 +10336,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; ; @@ -9869,43 +10364,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_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_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) + { { $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 (double) +$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_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_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&6; } @@ -9914,68 +10414,14 @@ _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. -{ echo "$as_me:$LINENO: checking size of fpos_t" >&5 -echo $ECHO_N "checking size of fpos_t... $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 - 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. @@ -9986,11 +10432,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 (fpos_t))) >= 0)]; test_array [0] = 0 ; @@ -10003,13 +10448,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 @@ -10023,11 +10469,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 (fpos_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10040,20 +10485,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` @@ -10067,7 +10513,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 @@ -10077,11 +10523,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 (fpos_t))) < 0)]; test_array [0] = 0 ; @@ -10094,13 +10539,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 @@ -10114,11 +10560,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 (fpos_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10131,20 +10576,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` @@ -10158,7 +10604,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= @@ -10178,11 +10624,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 (fpos_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10195,20 +10640,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` @@ -10219,11 +10665,13 @@ 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) + { { $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 (fpos_t) +$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_fpos_t=0 fi ;; @@ -10236,9 +10684,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 (fpos_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); } #include #include int @@ -10248,20 +10695,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; ; @@ -10274,43 +10723,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_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_fpos_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_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 (fpos_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 (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else 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_fpos_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 +$as_echo "$ac_cv_sizeof_fpos_t" >&6; } @@ -10319,68 +10773,14 @@ _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 - *\"* | *\`* | *\\*) 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_size_t=yes -else - 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 -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. -{ echo "$as_me:$LINENO: checking size of size_t" >&5 -echo $ECHO_N "checking size of size_t... $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 - 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. @@ -10391,11 +10791,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 (size_t))) >= 0)]; test_array [0] = 0 ; @@ -10408,13 +10807,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 @@ -10428,11 +10828,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 (size_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10445,20 +10844,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` @@ -10472,7 +10872,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 @@ -10482,11 +10882,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 (size_t))) < 0)]; test_array [0] = 0 ; @@ -10499,13 +10898,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 @@ -10519,11 +10919,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 (size_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10536,20 +10935,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` @@ -10563,7 +10963,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= @@ -10583,11 +10983,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 (size_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10600,20 +10999,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` @@ -10624,11 +11024,13 @@ 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) + { { $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 (size_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_size_t=0 fi ;; @@ -10641,9 +11043,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 (size_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (size_t)); } #include #include int @@ -10653,20 +11054,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; ; @@ -10679,43 +11082,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_size_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) + { { $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 (size_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_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 -{ 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_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } @@ -10724,68 +11132,14 @@ _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 () -{ -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_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; } - # 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; } +{ $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 - 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. @@ -10796,11 +11150,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 (pid_t))) >= 0)]; test_array [0] = 0 ; @@ -10813,13 +11166,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 @@ -10833,11 +11187,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 (pid_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10850,20 +11203,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` @@ -10877,7 +11231,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 @@ -10887,11 +11241,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 (pid_t))) < 0)]; test_array [0] = 0 ; @@ -10904,13 +11257,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 @@ -10924,11 +11278,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 (pid_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10941,20 +11294,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` @@ -10968,7 +11322,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= @@ -10988,11 +11342,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 (pid_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11005,20 +11358,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` @@ -11029,11 +11383,13 @@ 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) + { { $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 (pid_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_pid_t=0 fi ;; @@ -11046,9 +11402,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 (pid_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); } #include #include int @@ -11058,20 +11413,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; ; @@ -11084,126 +11441,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_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_pid_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_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 (pid_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (pid_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_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_pid_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_pid_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_PID_T $ac_cv_sizeof_pid_t _ACEOF - - - -{ 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 -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -long long x; x = (long long)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_LONG_LONG 1 -_ACEOF - - have_long_long=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_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 + + + +{ $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 long long 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; } @@ -11214,38 +11516,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_long_long=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_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; } +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 long long" >&5 -echo $ECHO_N "checking size of long long... $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 - 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. @@ -11256,11 +11565,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 long))) >= 0)]; test_array [0] = 0 ; @@ -11273,13 +11581,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 @@ -11293,11 +11602,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 long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11310,20 +11618,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` @@ -11337,7 +11646,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 @@ -11347,11 +11656,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 long))) < 0)]; test_array [0] = 0 ; @@ -11364,13 +11672,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 @@ -11384,11 +11693,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 long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11401,20 +11709,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` @@ -11428,7 +11737,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= @@ -11448,11 +11757,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 long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11465,20 +11773,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` @@ -11489,11 +11798,13 @@ 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) + { { $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 (long long) +$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_long_long=0 fi ;; @@ -11506,9 +11817,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 long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long long)); } #include #include int @@ -11518,20 +11828,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; ; @@ -11544,43 +11856,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_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_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) + { { $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 (long long) +$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_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_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } @@ -11591,8 +11908,8 @@ fi -{ echo "$as_me:$LINENO: checking for long double support" >&5 -echo $ECHO_N "checking for long double support... $ECHO_C" >&6; } +{ $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. */ @@ -11615,13 +11932,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 @@ -11635,78 +11953,24 @@ 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_double" >&5 -echo "${ECHO_T}$have_long_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5 +$as_echo "$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; } - # 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; } +{ $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 - 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. @@ -11717,11 +11981,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 (long double))) >= 0)]; test_array [0] = 0 ; @@ -11734,13 +11997,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 @@ -11754,11 +12018,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 (long double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11771,20 +12034,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` @@ -11798,7 +12062,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 @@ -11808,11 +12072,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 (long double))) < 0)]; test_array [0] = 0 ; @@ -11825,13 +12088,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 @@ -11845,11 +12109,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 (long double))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11862,20 +12125,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` @@ -11889,7 +12153,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= @@ -11909,11 +12173,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 (long double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11926,20 +12189,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` @@ -11950,11 +12214,13 @@ 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) + { { $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 double) +$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_double=0 fi ;; @@ -11967,9 +12233,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 (long double)); } +static unsigned long int ulongval () { return (long int) (sizeof (long double)); } #include #include int @@ -11979,20 +12244,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; ; @@ -12005,43 +12272,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_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_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double) + { { $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 double) +$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_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_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 +$as_echo "$ac_cv_sizeof_long_double" >&6; } @@ -12053,8 +12325,8 @@ fi -{ echo "$as_me:$LINENO: checking for _Bool support" >&5 -echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; } +{ $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. */ @@ -12077,13 +12349,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 @@ -12097,78 +12370,24 @@ 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_c99_bool" >&5 -echo "${ECHO_T}$have_c99_bool" >&6; } +{ $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: 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. -{ echo "$as_me:$LINENO: checking size of _Bool" >&5 -echo $ECHO_N "checking size of _Bool... $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 - 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. @@ -12179,11 +12398,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 (_Bool))) >= 0)]; test_array [0] = 0 ; @@ -12196,13 +12414,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 @@ -12216,11 +12435,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 (_Bool))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12233,20 +12451,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` @@ -12260,7 +12479,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 @@ -12270,11 +12489,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 (_Bool))) < 0)]; test_array [0] = 0 ; @@ -12287,13 +12505,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 @@ -12307,11 +12526,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 (_Bool))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12324,20 +12542,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` @@ -12351,7 +12570,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= @@ -12371,11 +12590,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 (_Bool))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12388,20 +12606,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` @@ -12412,11 +12631,13 @@ 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) + { { $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 (_Bool) +$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__Bool=0 fi ;; @@ -12429,9 +12650,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 (_Bool)); } +static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); } #include #include int @@ -12441,20 +12661,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; ; @@ -12467,43 +12689,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__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__Bool" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) + { { $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 (_Bool) +$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__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__Bool" >&5 -echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 +$as_echo "$ac_cv_sizeof__Bool" >&6; } @@ -12514,12 +12741,13 @@ fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_uintptr_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12529,14 +12757,11 @@ #include #endif -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +if (sizeof (uintptr_t)) + return 0; ; return 0; } @@ -12547,55 +12772,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_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_; +#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; } @@ -12606,38 +12809,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_uintptr_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_uintptr_t=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_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&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 uintptr_t" >&5 -echo $ECHO_N "checking size of uintptr_t... $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 - 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. @@ -12648,11 +12865,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)]; test_array [0] = 0 ; @@ -12665,13 +12881,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 @@ -12685,11 +12902,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12702,20 +12918,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` @@ -12729,7 +12946,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 @@ -12739,11 +12956,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)]; test_array [0] = 0 ; @@ -12756,13 +12972,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 @@ -12776,11 +12993,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12793,20 +13009,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` @@ -12820,7 +13037,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= @@ -12840,11 +13057,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12857,20 +13073,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` @@ -12881,11 +13098,13 @@ 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) + { { $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 (uintptr_t) +$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_uintptr_t=0 fi ;; @@ -12898,9 +13117,8 @@ 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_)); } +static long int longval () { return (long int) (sizeof (uintptr_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); } #include #include int @@ -12910,20 +13128,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; ; @@ -12936,43 +13156,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_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_uintptr_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_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 (uintptr_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 (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else 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_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 +$as_echo "$ac_cv_sizeof_uintptr_t" >&6; } @@ -12984,73 +13209,14 @@ 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 -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_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_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; } - # 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; } +{ $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 - 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. @@ -13066,11 +13232,10 @@ #endif - typedef off_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 (off_t))) >= 0)]; test_array [0] = 0 ; @@ -13083,13 +13248,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 @@ -13108,11 +13274,10 @@ #endif - typedef off_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 (off_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13125,20 +13290,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` @@ -13152,7 +13318,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 @@ -13167,11 +13333,10 @@ #endif - typedef off_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 (off_t))) < 0)]; test_array [0] = 0 ; @@ -13184,13 +13349,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 @@ -13209,11 +13375,10 @@ #endif - typedef off_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 (off_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13226,20 +13391,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` @@ -13253,7 +13419,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= @@ -13278,11 +13444,10 @@ #endif - typedef off_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 (off_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13295,20 +13460,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` @@ -13319,11 +13485,13 @@ 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) + { { $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 -echo "$as_me: error: cannot compute sizeof (off_t) +$as_echo "$as_me: error: cannot compute sizeof (off_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_off_t=0 fi ;; @@ -13341,9 +13509,8 @@ #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_)); } +static long int longval () { return (long int) (sizeof (off_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (off_t)); } #include #include int @@ -13353,20 +13520,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (off_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (off_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 (off_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; ; @@ -13379,139 +13548,82 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_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_off_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_off_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_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 (off_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off_t) +$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 -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 + { (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_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; } +{ $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 - 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. @@ -13530,11 +13642,10 @@ #endif - typedef time_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 (time_t))) >= 0)]; test_array [0] = 0 ; @@ -13547,13 +13658,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 @@ -13575,11 +13687,10 @@ #endif - typedef time_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 (time_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13592,20 +13703,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` @@ -13619,7 +13731,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 @@ -13637,11 +13749,10 @@ #endif - typedef time_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 (time_t))) < 0)]; test_array [0] = 0 ; @@ -13654,13 +13765,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 @@ -13682,11 +13794,10 @@ #endif - typedef time_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 (time_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13699,20 +13810,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` @@ -13726,7 +13838,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= @@ -13754,11 +13866,10 @@ #endif - typedef time_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 (time_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13771,20 +13882,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` @@ -13795,11 +13907,13 @@ 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) + { { $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 (time_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_time_t=0 fi ;; @@ -13820,9 +13934,8 @@ #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_)); } +static long int longval () { return (long int) (sizeof (time_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (time_t)); } #include #include int @@ -13832,20 +13945,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; ; @@ -13858,43 +13973,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_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_time_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_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 (time_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (time_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_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_time_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } @@ -13914,8 +14034,8 @@ then CC="$CC -pthread" fi -{ echo "$as_me:$LINENO: checking for pthread_t" >&5 -echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; } +{ $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. */ @@ -13938,96 +14058,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 have_pthread_t=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_pthread_t" >&5 -echo "${ECHO_T}$have_pthread_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5 +$as_echo "$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 + # 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; } +{ $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 - 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. @@ -14043,11 +14105,10 @@ #endif - typedef pthread_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 (pthread_t))) >= 0)]; test_array [0] = 0 ; @@ -14060,13 +14121,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 @@ -14085,11 +14147,10 @@ #endif - typedef pthread_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 (pthread_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -14102,20 +14163,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` @@ -14129,7 +14191,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 @@ -14144,11 +14206,10 @@ #endif - typedef pthread_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 (pthread_t))) < 0)]; test_array [0] = 0 ; @@ -14161,13 +14222,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 @@ -14186,11 +14248,10 @@ #endif - typedef pthread_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 (pthread_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -14203,20 +14264,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` @@ -14230,7 +14292,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= @@ -14255,11 +14317,10 @@ #endif - typedef pthread_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 (pthread_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -14272,20 +14333,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` @@ -14296,11 +14358,13 @@ 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) + { { $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 -echo "$as_me: error: cannot compute sizeof (pthread_t) +$as_echo "$as_me: error: cannot compute sizeof (pthread_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_pthread_t=0 fi ;; @@ -14318,9 +14382,8 @@ #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_)); } +static long int longval () { return (long int) (sizeof (pthread_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (pthread_t)); } #include #include int @@ -14330,20 +14393,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (pthread_t))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (pthread_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 (pthread_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; ; @@ -14356,43 +14421,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_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 ) if test "$ac_cv_type_pthread_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_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 (pthread_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (pthread_t) +$as_echo "$as_me: error: cannot compute sizeof (pthread_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (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 -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 +$as_echo "$ac_cv_sizeof_pthread_t" >&6; } @@ -14462,29 +14532,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_osx_32bit=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_osx_32bit=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 @@ -14499,8 +14572,8 @@ MACOSX_DEFAULT_ARCH="ppc" ;; *) - { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 -echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -14513,8 +14586,8 @@ MACOSX_DEFAULT_ARCH="ppc64" ;; *) - { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 -echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -14527,8 +14600,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" @@ -14539,21 +14612,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/*) @@ -14561,12 +14634,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 @@ -14578,8 +14651,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 @@ -14604,8 +14677,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 @@ -14616,8 +14689,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 @@ -14713,19 +14786,18 @@ else LDSHARED='$(CC) -G' fi;; SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';; - Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; atheos*) LDSHARED="gcc -shared";; *) 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 @@ -14752,7 +14824,6 @@ then CCSHARED="-fPIC" else CCSHARED="-Kpic -belf" fi;; - Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; *) CCSHARED="";; @@ -14760,12 +14831,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 @@ -14812,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 @@ -14830,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). @@ -14842,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" @@ -14889,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 @@ -14925,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" @@ -14960,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 @@ -14998,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 @@ -15039,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 @@ -15073,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" @@ -15086,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" @@ -15121,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 @@ -15159,8 +15246,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 @@ -15182,43 +15269,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" @@ -15250,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" @@ -15315,56 +15410,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 @@ -15372,41 +15471,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 @@ -15417,8 +15516,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="" @@ -15432,22 +15531,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 @@ -15460,8 +15559,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 @@ -15480,8 +15579,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" @@ -15547,8 +15646,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 @@ -15568,27 +15667,27 @@ else unistd_defines_pthreads=no fi -rm -f -r conftest* +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 @@ -15604,32 +15703,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 @@ -15643,51 +15743,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/ ## @@ -15696,18 +15797,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 @@ -15726,17 +15827,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 @@ -15752,32 +15853,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 @@ -15791,51 +15893,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/ ## @@ -15844,18 +15947,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 @@ -15872,13 +15975,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 @@ -15891,16 +15994,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 @@ -15925,21 +16028,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 @@ -15947,15 +16053,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. */ @@ -16008,32 +16114,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 @@ -16043,17 +16153,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 @@ -16069,32 +16179,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 @@ -16108,51 +16219,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/ ## @@ -16161,18 +16273,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 @@ -16185,10 +16297,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" @@ -16220,33 +16332,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 @@ -16256,10 +16372,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" @@ -16291,33 +16407,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 @@ -16327,10 +16447,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" @@ -16362,33 +16482,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 @@ -16398,10 +16522,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" @@ -16433,33 +16557,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 @@ -16486,6 +16614,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 @@ -16497,10 +16626,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" @@ -16532,33 +16661,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 @@ -16570,10 +16703,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" @@ -16605,33 +16738,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 @@ -16684,10 +16821,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 @@ -16717,29 +16854,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 @@ -16747,8 +16887,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 @@ -16759,11 +16899,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. */ @@ -16816,35 +16956,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*) @@ -16864,18 +17011,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 @@ -16886,8 +17033,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 @@ -16915,41 +17062,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 @@ -16973,26 +17123,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 @@ -17014,8 +17165,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 @@ -17036,7 +17187,7 @@ $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f -r conftest* +rm -f conftest* ;; kame) @@ -17059,7 +17210,7 @@ ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f -r conftest* +rm -f conftest* ;; linux-glibc) @@ -17080,7 +17231,7 @@ ipv6type=$i; ipv6trylibc=yes fi -rm -f -r conftest* +rm -f conftest* ;; linux-inet6) @@ -17118,7 +17269,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f -r conftest* +rm -f conftest* ;; v6d) @@ -17141,7 +17292,7 @@ ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f -r conftest* +rm -f conftest* ;; zeta) @@ -17163,7 +17314,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f -r conftest* +rm -f conftest* ;; esac @@ -17171,8 +17322,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 @@ -17191,8 +17342,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 @@ -17214,13 +17365,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 @@ -17230,22 +17382,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 @@ -17264,12 +17416,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 @@ -17281,20 +17433,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 @@ -17313,12 +17465,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 @@ -17330,14 +17482,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 @@ -17350,11 +17502,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. */ @@ -17407,35 +17559,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 @@ -17445,8 +17604,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 @@ -17470,8 +17629,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 @@ -17484,16 +17643,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 @@ -17600,11 +17759,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. */ @@ -17657,35 +17816,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 @@ -17694,8 +17860,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 @@ -17717,13 +17883,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 @@ -17733,20 +17900,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 @@ -17768,13 +17935,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 @@ -17784,20 +17952,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 @@ -17819,13 +17987,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 @@ -17835,20 +18004,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 @@ -17870,13 +18039,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 @@ -17886,20 +18056,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 @@ -17921,13 +18091,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 @@ -17937,20 +18108,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 @@ -17972,13 +18143,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 @@ -17988,20 +18160,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 @@ -18023,13 +18195,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 @@ -18039,20 +18212,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 @@ -18077,13 +18250,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 @@ -18093,14 +18267,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 @@ -18111,8 +18285,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 @@ -18137,13 +18311,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 @@ -18153,21 +18328,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 @@ -18192,13 +18367,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 @@ -18208,21 +18384,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 @@ -18247,13 +18423,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 @@ -18263,14 +18440,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 @@ -18280,10 +18457,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. @@ -18296,7 +18473,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 @@ -18307,11 +18484,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 @@ -18320,10 +18497,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" @@ -18355,40 +18532,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" @@ -18420,33 +18601,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 @@ -18461,10 +18646,10 @@ # 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_have_chflags=no @@ -18492,29 +18677,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_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 ) 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 @@ -18522,8 +18710,8 @@ fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5 -echo "${ECHO_T}$ac_cv_have_chflags" >&6; } +{ $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 @@ -18533,10 +18721,10 @@ fi -{ echo "$as_me:$LINENO: checking for lchflags" >&5 -echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_have_lchflags=no @@ -18564,29 +18752,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_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 ) 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 @@ -18594,8 +18785,8 @@ fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5 -echo "${ECHO_T}$ac_cv_have_lchflags" >&6; } +{ $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 @@ -18614,10 +18805,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" @@ -18649,33 +18840,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 @@ -18691,8 +18886,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 @@ -18717,39 +18912,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 @@ -18777,39 +18976,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 @@ -18837,13 +19040,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 @@ -18853,22 +19057,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 @@ -18896,13 +19100,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 @@ -18912,14 +19117,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 @@ -18930,11 +19135,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. */ @@ -18987,42 +19192,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" @@ -19054,42 +19266,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" @@ -19121,33 +19337,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 @@ -19164,11 +19384,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. */ @@ -19221,42 +19441,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" @@ -19288,42 +19515,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" @@ -19355,33 +19586,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 @@ -19400,11 +19635,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. */ @@ -19457,35 +19692,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 @@ -19501,11 +19743,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. */ @@ -19558,35 +19800,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 @@ -19598,11 +19847,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. */ @@ -19655,35 +19904,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 @@ -19700,11 +19956,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. */ @@ -19757,35 +20013,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. */ @@ -19808,13 +20071,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 @@ -19826,7 +20090,7 @@ else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -19840,11 +20104,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. */ @@ -19897,35 +20161,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. */ @@ -19948,13 +20219,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 @@ -19966,7 +20238,7 @@ else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -19980,11 +20252,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. */ @@ -20037,35 +20309,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. */ @@ -20088,20 +20367,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 @@ -20118,8 +20398,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 @@ -20151,44 +20431,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 @@ -20215,36 +20499,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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 -{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5 -echo "${ECHO_T}$have_getaddrinfo" >&6; } +{ $as_echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5 +$as_echo "$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; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_buggy_getaddrinfo=yes @@ -20349,29 +20637,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_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 ) 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 @@ -20398,11 +20689,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. */ @@ -20455,35 +20746,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 @@ -20491,10 +20789,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. */ @@ -20521,20 +20819,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 @@ -20542,8 +20841,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 @@ -20552,10 +20851,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. */ @@ -20571,7 +20870,7 @@ { struct tm tm; int *p = &tm.tm_sec; - return !p; + return !p; ; return 0; } @@ -20582,20 +20881,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 @@ -20603,8 +20903,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 @@ -20613,10 +20913,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. */ @@ -20644,20 +20944,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 @@ -20686,20 +20987,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 @@ -20710,9 +21012,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 @@ -20728,10 +21030,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. */ @@ -20758,20 +21060,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 @@ -20779,9 +21082,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 @@ -20797,10 +21100,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. */ @@ -20827,31 +21130,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 @@ -20861,10 +21168,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. */ @@ -20889,20 +21196,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 @@ -20928,20 +21236,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 @@ -20952,9 +21261,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 @@ -20963,10 +21272,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. */ @@ -20991,20 +21300,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 @@ -21030,20 +21340,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 @@ -21054,9 +21365,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 @@ -21065,10 +21376,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. */ @@ -21093,20 +21404,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 @@ -21132,20 +21444,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 @@ -21156,9 +21469,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 @@ -21167,10 +21480,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. */ @@ -21195,20 +21508,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 @@ -21234,20 +21548,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 @@ -21258,9 +21573,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 @@ -21269,10 +21584,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. */ @@ -21297,20 +21612,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 @@ -21336,20 +21652,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 @@ -21360,9 +21677,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 @@ -21371,10 +21688,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. */ @@ -21399,20 +21716,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 @@ -21438,20 +21756,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 @@ -21462,9 +21781,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 @@ -21486,10 +21805,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. */ @@ -21512,20 +21831,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 @@ -21534,8 +21854,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 @@ -21545,8 +21865,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 @@ -21572,13 +21892,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 @@ -21592,20 +21913,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. */ @@ -21629,20 +21950,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 @@ -21651,8 +21973,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 @@ -21661,10 +21983,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. */ @@ -21689,20 +22011,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 @@ -21711,8 +22034,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 @@ -21724,10 +22047,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. */ @@ -21752,20 +22075,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 @@ -21773,8 +22097,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 @@ -21782,10 +22106,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. */ @@ -21857,20 +22181,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 @@ -21878,20 +22203,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 @@ -21913,37 +22238,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 @@ -21965,37 +22291,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 @@ -22017,13 +22344,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 @@ -22037,19 +22365,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 @@ -22081,13 +22409,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 @@ -22101,19 +22430,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 @@ -22138,13 +22467,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 @@ -22154,22 +22484,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 @@ -22193,37 +22523,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 @@ -22251,20 +22582,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 @@ -22278,17 +22610,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. */ @@ -22341,39 +22673,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 @@ -22407,13 +22743,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 @@ -22428,18 +22765,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 @@ -22471,13 +22808,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 @@ -22492,18 +22830,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 @@ -22533,13 +22871,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 @@ -22554,16 +22893,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 @@ -22583,11 +22922,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. */ @@ -22640,35 +22979,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 @@ -22687,10 +23033,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. */ @@ -22743,39 +23089,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" @@ -22807,33 +23157,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 @@ -22847,8 +23201,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 @@ -22860,14 +23214,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 @@ -22877,53 +23231,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 @@ -22931,10 +23285,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 @@ -22963,37 +23317,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 @@ -23003,10 +23360,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 @@ -23035,37 +23392,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 @@ -23079,10 +23439,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 @@ -23111,37 +23471,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 @@ -23161,8 +23524,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 @@ -23188,28 +23551,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 @@ -23225,8 +23589,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" @@ -23266,36 +23630,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 @@ -23314,10 +23681,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 @@ -23348,37 +23715,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 @@ -23399,11 +23769,11 @@ for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma 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. */ @@ -23456,35 +23826,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 @@ -23497,11 +23874,11 @@ for ac_func in hypot lgamma log1p round tgamma 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. */ @@ -23554,44 +23931,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. */ @@ -23618,20 +24002,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 @@ -23639,9 +24024,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 @@ -23655,10 +24040,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. */ @@ -23685,20 +24070,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 @@ -23706,9 +24092,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 @@ -23722,10 +24108,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. */ @@ -23752,20 +24138,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 @@ -23773,9 +24160,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 @@ -23795,10 +24182,10 @@ 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_broken_sem_getvalue=yes @@ -23837,29 +24224,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_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 ) 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 @@ -23867,8 +24257,8 @@ fi -{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5 -echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; } +{ $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 @@ -23879,8 +24269,8 @@ 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 @@ -23891,12 +24281,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 @@ -23904,24 +24294,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 @@ -23937,32 +24327,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 @@ -23976,51 +24367,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/ ## @@ -24029,18 +24421,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 @@ -24059,69 +24451,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. @@ -24133,11 +24470,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 ; @@ -24150,13 +24486,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 @@ -24171,11 +24508,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 ; @@ -24188,20 +24524,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` @@ -24215,7 +24552,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 @@ -24226,11 +24563,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 ; @@ -24243,13 +24579,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 @@ -24264,11 +24601,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 ; @@ -24281,20 +24617,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` @@ -24308,7 +24645,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= @@ -24329,11 +24666,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 ; @@ -24346,20 +24682,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` @@ -24370,11 +24707,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 ;; @@ -24388,9 +24727,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 @@ -24400,20 +24738,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; ; @@ -24426,43 +24766,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; } @@ -24473,8 +24818,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. */ @@ -24501,13 +24846,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 @@ -24521,24 +24867,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 @@ -24565,41 +24911,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 @@ -24649,49 +24998,195 @@ #define PY_UNICODE_TYPE wchar_t _ACEOF -elif test "$ac_cv_sizeof_short" = "$unicode_size" -then - PY_UNICODE_TYPE="unsigned short" - cat >>confdefs.h <<\_ACEOF -#define PY_UNICODE_TYPE unsigned short +elif test "$ac_cv_sizeof_short" = "$unicode_size" +then + PY_UNICODE_TYPE="unsigned short" + cat >>confdefs.h <<\_ACEOF +#define PY_UNICODE_TYPE unsigned short +_ACEOF + +elif test "$ac_cv_sizeof_long" = "$unicode_size" +then + 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; } + +# 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 -elif test "$ac_cv_sizeof_long" = "$unicode_size" -then - PY_UNICODE_TYPE="unsigned long" - cat >>confdefs.h <<\_ACEOF -#define PY_UNICODE_TYPE unsigned long -_ACEOF + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - PY_UNICODE_TYPE="no type found" + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 -echo "${ECHO_T}$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; } -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; @@ -24703,33 +25198,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; @@ -24741,20 +25236,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 @@ -24762,29 +25258,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; } @@ -24795,30 +25306,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 @@ -24837,14 +25349,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; @@ -24856,63 +25368,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 @@ -24937,37 +25456,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 @@ -24978,10 +25500,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 @@ -25010,32 +25532,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 @@ -25053,8 +25579,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" @@ -25090,26 +25616,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 @@ -25119,11 +25649,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 @@ -25132,10 +25662,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" @@ -25167,33 +25697,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 @@ -25216,20 +25750,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 @@ -25255,15 +25790,15 @@ _ACEOF fi -rm -f -r conftest* +rm -f conftest* 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" @@ -25295,33 +25830,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 @@ -25331,10 +25870,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" @@ -25366,33 +25905,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 @@ -25402,10 +25945,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" @@ -25437,33 +25980,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 @@ -25486,20 +26033,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 @@ -25525,17 +26073,17 @@ _ACEOF fi -rm -f -r conftest* +rm -f conftest* fi # 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 @@ -25563,37 +26111,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 @@ -25603,10 +26154,10 @@ fi -{ echo "$as_me:$LINENO: checking for broken poll()" >&5 -echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_broken_poll=no @@ -25643,37 +26194,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 fi -{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5 -echo "${ECHO_T}$ac_cv_broken_poll" >&6; } +{ $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 @@ -25686,10 +26240,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. */ @@ -25717,20 +26271,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 @@ -25759,20 +26314,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 @@ -25783,9 +26339,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 @@ -25801,10 +26357,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. */ @@ -25831,20 +26387,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 @@ -25852,9 +26409,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 @@ -25870,10 +26427,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. */ @@ -25900,31 +26457,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 @@ -25936,10 +26497,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 @@ -26022,37 +26583,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 @@ -26063,10 +26627,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. */ @@ -26092,20 +26656,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 @@ -26114,8 +26679,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 @@ -26126,10 +26691,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. */ @@ -26155,20 +26720,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 @@ -26177,8 +26743,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 @@ -26189,10 +26755,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. */ @@ -26218,20 +26784,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 @@ -26240,8 +26807,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 @@ -26252,10 +26819,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. */ @@ -26281,20 +26848,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 @@ -26303,8 +26871,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 @@ -26316,8 +26884,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 @@ -26339,13 +26907,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 @@ -26355,21 +26924,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 @@ -26391,13 +26960,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 @@ -26407,21 +26977,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 @@ -26443,13 +27013,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 @@ -26459,57 +27030,57 @@ #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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_have_size_t_format=no @@ -26563,29 +27134,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_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 ) 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 @@ -26593,8 +27167,8 @@ fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5 -echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; } +{ $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 @@ -26604,12 +27178,13 @@ fi -{ echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +{ $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 @@ -26624,14 +27199,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; } @@ -26642,30 +27256,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 @@ -26676,10 +27299,10 @@ fi -{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 -echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_broken_mbstowcs=no @@ -26706,37 +27329,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 fi -{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5 -echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; } +{ $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 @@ -26747,8 +27373,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 @@ -26760,14 +27386,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 @@ -26781,15 +27407,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" @@ -26821,11 +27447,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 @@ -26858,12 +27485,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 @@ -26879,7 +27506,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" @@ -26891,12 +27518,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. @@ -26909,7 +27538,7 @@ SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -26919,7 +27548,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 @@ -26941,17 +27570,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. @@ -26967,8 +27624,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. @@ -26991,7 +27646,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 @@ -27004,17 +27659,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 && @@ -27036,7 +27684,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 @@ -27087,7 +27735,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 @@ -27115,7 +27763,6 @@ *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -27128,19 +27775,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 @@ -27165,10 +27815,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 @@ -27191,7 +27841,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 @@ -27204,29 +27854,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 @@ -27237,24 +27897,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 @@ -27276,30 +27936,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; }; } ;; @@ -27318,30 +27984,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 @@ -27356,8 +28024,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 @@ -27397,224 +28065,145 @@ (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=' +' +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 @@ -27630,19 +28219,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;; @@ -27671,26 +28374,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 @@ -27700,7 +28415,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 @@ -27726,7 +28441,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" @@ -27735,7 +28450,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 @@ -27756,17 +28471,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/ ;; @@ -27806,12 +28521,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 } @@ -27820,13 +28536,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 @@ -27840,15 +28557,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 @@ -27858,119 +28576,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" ;; @@ -27984,6 +28641,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. @@ -28005,6 +28667,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/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Sat Sep 12 00:24:02 2009 @@ -233,7 +233,7 @@ if test -z "$MACHDEP" then ac_sys_system=`uname -s` - if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + if test "$ac_sys_system" = "AIX" \ -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then ac_sys_release=`uname -v` else @@ -415,9 +415,6 @@ case $ac_sys_system in AIX*) CC=cc_r without_gcc=;; - Monterey*) - RANLIB=: - without_gcc=;; *) without_gcc=no;; esac]) AC_MSG_RESULT($without_gcc) @@ -539,10 +536,6 @@ 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 AC_DEFINE(__EXTENSIONS__, 1, [Defined on Solaris to see additional function prototypes.]) @@ -603,8 +596,6 @@ 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. @@ -854,15 +845,6 @@ 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 AC_SUBST(BASECFLAGS) @@ -1718,7 +1700,6 @@ else LDSHARED='$(CC) -G' fi;; SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';; - Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; atheos*) LDSHARED="gcc -shared";; *) LDSHARED="ld";; @@ -1755,7 +1736,6 @@ then CCSHARED="-fPIC" else CCSHARED="-Kpic -belf" fi;; - Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; *) CCSHARED="";; Modified: python/branches/py3k/pyconfig.h.in ============================================================================== --- python/branches/py3k/pyconfig.h.in (original) +++ python/branches/py3k/pyconfig.h.in Sat Sep 12 00:24:02 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 @@ -1010,6 +1013,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 @@ -1047,20 +1072,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 @@ -1079,15 +1105,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 @@ -1095,12 +1131,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 Sat Sep 12 00:36:20 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 11 Sep 2009 22:36:20 -0000 Subject: [Python-checkins] r74746 - in python/branches/py3k: Lib/test/test_ast.py Misc/ACKS Python/ast.c Message-ID: Author: benjamin.peterson Date: Sat Sep 12 00:36:20 2009 New Revision: 74746 Log: Merged revisions 74464 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74464 | benjamin.peterson | 2009-08-15 17:59:21 -0500 (Sat, 15 Aug 2009) | 4 lines better col_offsets for "for" statements with tuple unpacking #6704 Patch from Frank Wierzbicki. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_ast.py python/branches/py3k/Misc/ACKS python/branches/py3k/Python/ast.c 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 Sat Sep 12 00:36:20 2009 @@ -60,6 +60,10 @@ "break", # Continue "continue", + # for statements with naked tuples (see http://bugs.python.org/issue6704) + "for a,b in c: pass", + "[(a,b) for a,b in c]", + "((a,b) for a,b in c)", ] # These are compiled through "single" @@ -321,6 +325,9 @@ ('Module', [('Pass', (1, 0))]), ('Module', [('Break', (1, 0))]), ('Module', [('Continue', (1, 0))]), +('Module', [('For', (1, 0), ('Tuple', (1, 4), [('Name', (1, 4), 'a', ('Store',)), ('Name', (1, 6), 'b', ('Store',))], ('Store',)), ('Name', (1, 11), 'c', ('Load',)), [('Pass', (1, 14))], [])]), +('Module', [('Expr', (1, 0), ('ListComp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]), +('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]), ] single_results = [ ('Interactive', [('Expr', (1, 0), ('BinOp', (1, 0), ('Num', (1, 0), 1), ('Add',), ('Num', (1, 2), 2)))]), Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Sat Sep 12 00:36:20 2009 @@ -805,6 +805,7 @@ Dik Winter Blake Winton Jean-Claude Wippler +Frank Wierzbicki Lars Wirzenius Chris Withers Stefan Witzel Modified: python/branches/py3k/Python/ast.c ============================================================================== --- python/branches/py3k/Python/ast.c (original) +++ python/branches/py3k/Python/ast.c Sat Sep 12 00:36:20 2009 @@ -1192,7 +1192,7 @@ for (i = 0; i < n_fors; i++) { comprehension_ty comp; asdl_seq *t; - expr_ty expression; + expr_ty expression, first; node *for_ch; REQ(n, comp_for); @@ -1207,14 +1207,13 @@ /* Check the # of children rather than the length of t, since (x for x, in ...) has 1 element in t, but still requires a Tuple. */ + first = (expr_ty)asdl_seq_GET(t, 0); if (NCH(for_ch) == 1) - comp = comprehension((expr_ty)asdl_seq_GET(t, 0), expression, - NULL, c->c_arena); + comp = comprehension(first, expression, NULL, c->c_arena); else - comp = comprehension(Tuple(t, Store, LINENO(n), n->n_col_offset, - c->c_arena), - expression, NULL, c->c_arena); - + comp = comprehension(Tuple(t, Store, first->lineno, first->col_offset, + c->c_arena), + expression, NULL, c->c_arena); if (!comp) return NULL; @@ -1294,7 +1293,6 @@ key = ast_for_expr(c, CHILD(n, 0)); if (!key) return NULL; - value = ast_for_expr(c, CHILD(n, 2)); if (!value) return NULL; @@ -2802,7 +2800,7 @@ { asdl_seq *_target, *seq = NULL, *suite_seq; expr_ty expression; - expr_ty target; + expr_ty target, first; const node *node_target; /* for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite] */ REQ(n, for_stmt); @@ -2819,10 +2817,11 @@ return NULL; /* Check the # of children rather than the length of _target, since for x, in ... has 1 element in _target, but still requires a Tuple. */ + first = (expr_ty)asdl_seq_GET(_target, 0); if (NCH(node_target) == 1) - target = (expr_ty)asdl_seq_GET(_target, 0); + target = first; else - target = Tuple(_target, Store, LINENO(n), n->n_col_offset, c->c_arena); + target = Tuple(_target, Store, first->lineno, first->col_offset, c->c_arena); expression = ast_for_testlist(c, CHILD(n, 3)); if (!expression) From python-checkins at python.org Sat Sep 12 00:36:29 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 11 Sep 2009 22:36:29 -0000 Subject: [Python-checkins] r74747 - in python/branches/release31-maint: Doc/conf.py Doc/distutils/builtdist.rst Doc/library/cgi.rst Doc/library/constants.rst Doc/library/ftplib.rst Doc/library/logging.rst Doc/library/multiprocessing.rst Doc/library/stdtypes.rst Doc/library/warnings.rst Doc/tutorial/introduction.rst Lib/http/cookies.py Lib/idlelib/macosxSupport.py Lib/idlelib/rpc.py Lib/multiprocessing/queues.py Lib/test/test_descr.py Lib/webbrowser.py Misc/ACKS Modules/signalmodule.c Objects/classobject.c Objects/funcobject.c configure configure.in pyconfig.h.in Message-ID: Author: benjamin.peterson Date: Sat Sep 12 00:36:27 2009 New Revision: 74747 Log: Merged revisions 74745 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74745 | benjamin.peterson | 2009-09-11 17:24:02 -0500 (Fri, 11 Sep 2009) | 98 lines Merged revisions 74277,74321,74323,74326,74355,74465,74467,74488,74492,74513,74531,74549,74553,74625,74632,74643-74644,74647,74652,74666,74671,74727,74739 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74277 | sean.reifschneider | 2009-08-01 18:54:55 -0500 (Sat, 01 Aug 2009) | 3 lines - Issue #6624: yArg_ParseTuple with "s" format when parsing argument with NUL: Bogus TypeError detail string. ........ r74321 | guilherme.polo | 2009-08-05 11:51:41 -0500 (Wed, 05 Aug 2009) | 1 line Easier reference to find (at least while svn continues being used). ........ r74323 | guilherme.polo | 2009-08-05 18:48:26 -0500 (Wed, 05 Aug 2009) | 1 line Typo. ........ r74326 | jesse.noller | 2009-08-05 21:05:56 -0500 (Wed, 05 Aug 2009) | 1 line Fix issue 4660: spurious task_done errors in multiprocessing, remove doc note for from_address ........ r74355 | gregory.p.smith | 2009-08-12 12:02:37 -0500 (Wed, 12 Aug 2009) | 2 lines comment typo fix ........ r74465 | vinay.sajip | 2009-08-15 18:23:12 -0500 (Sat, 15 Aug 2009) | 1 line Added section on logging to one file from multiple processes. ........ r74467 | vinay.sajip | 2009-08-15 18:34:47 -0500 (Sat, 15 Aug 2009) | 1 line Refined section on logging to one file from multiple processes. ........ r74488 | vinay.sajip | 2009-08-17 08:14:37 -0500 (Mon, 17 Aug 2009) | 1 line Further refined section on logging to one file from multiple processes. ........ r74492 | r.david.murray | 2009-08-17 14:26:49 -0500 (Mon, 17 Aug 2009) | 2 lines Issue 6685: 'toupper' -> 'upper' in cgi doc example explanation. ........ r74513 | skip.montanaro | 2009-08-18 09:37:52 -0500 (Tue, 18 Aug 2009) | 1 line missing module ref (issue6723) ........ r74531 | vinay.sajip | 2009-08-20 17:04:32 -0500 (Thu, 20 Aug 2009) | 1 line Added section on exceptions raised during logging. ........ r74549 | benjamin.peterson | 2009-08-24 12:42:36 -0500 (Mon, 24 Aug 2009) | 1 line fix pdf building by teaching latex the right encoding package ........ r74553 | r.david.murray | 2009-08-26 20:04:59 -0500 (Wed, 26 Aug 2009) | 2 lines Remove leftover text from end of sentence. ........ r74625 | benjamin.peterson | 2009-09-01 17:27:57 -0500 (Tue, 01 Sep 2009) | 1 line remove the check that classmethod's argument is a callable ........ r74632 | georg.brandl | 2009-09-03 02:27:26 -0500 (Thu, 03 Sep 2009) | 1 line #6828: fix wrongly highlighted blocks. ........ r74643 | georg.brandl | 2009-09-04 01:59:20 -0500 (Fri, 04 Sep 2009) | 2 lines Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. ........ r74644 | georg.brandl | 2009-09-04 02:55:14 -0500 (Fri, 04 Sep 2009) | 1 line #5047: remove Monterey support from configure. ........ r74647 | georg.brandl | 2009-09-04 03:17:04 -0500 (Fri, 04 Sep 2009) | 2 lines Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. ........ r74652 | georg.brandl | 2009-09-04 06:25:37 -0500 (Fri, 04 Sep 2009) | 1 line #6756: add some info about the "acct" parameter. ........ r74666 | georg.brandl | 2009-09-05 04:04:09 -0500 (Sat, 05 Sep 2009) | 1 line #6841: remove duplicated word. ........ r74671 | georg.brandl | 2009-09-05 11:47:17 -0500 (Sat, 05 Sep 2009) | 1 line #6843: add link from filterwarnings to where the meaning of the arguments is covered. ........ r74727 | benjamin.peterson | 2009-09-08 18:04:22 -0500 (Tue, 08 Sep 2009) | 1 line #6865 fix ref counting in initialization of pwd module ........ r74739 | georg.brandl | 2009-09-11 02:55:20 -0500 (Fri, 11 Sep 2009) | 1 line Move function back to its section. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/conf.py python/branches/release31-maint/Doc/distutils/builtdist.rst python/branches/release31-maint/Doc/library/cgi.rst python/branches/release31-maint/Doc/library/constants.rst python/branches/release31-maint/Doc/library/ftplib.rst python/branches/release31-maint/Doc/library/logging.rst python/branches/release31-maint/Doc/library/multiprocessing.rst python/branches/release31-maint/Doc/library/stdtypes.rst python/branches/release31-maint/Doc/library/warnings.rst python/branches/release31-maint/Doc/tutorial/introduction.rst python/branches/release31-maint/Lib/http/cookies.py python/branches/release31-maint/Lib/idlelib/macosxSupport.py python/branches/release31-maint/Lib/idlelib/rpc.py python/branches/release31-maint/Lib/multiprocessing/queues.py python/branches/release31-maint/Lib/test/test_descr.py python/branches/release31-maint/Lib/webbrowser.py python/branches/release31-maint/Misc/ACKS python/branches/release31-maint/Modules/signalmodule.c python/branches/release31-maint/Objects/classobject.c python/branches/release31-maint/Objects/funcobject.c python/branches/release31-maint/configure python/branches/release31-maint/configure.in python/branches/release31-maint/pyconfig.h.in Modified: python/branches/release31-maint/Doc/conf.py ============================================================================== --- python/branches/release31-maint/Doc/conf.py (original) +++ python/branches/release31-maint/Doc/conf.py Sat Sep 12 00:36:27 2009 @@ -151,6 +151,9 @@ # Documents to append as an appendix to all manuals. latex_appendices = ['glossary', 'about', 'license', 'copyright'] +# Get LaTeX to handle Unicode correctly +latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}'} + # Options for the coverage checker # -------------------------------- Modified: python/branches/release31-maint/Doc/distutils/builtdist.rst ============================================================================== --- python/branches/release31-maint/Doc/distutils/builtdist.rst (original) +++ python/branches/release31-maint/Doc/distutils/builtdist.rst Sat Sep 12 00:36:27 2009 @@ -429,13 +429,6 @@ also the configuration. For details refer to Microsoft's documentation of the :cfunc:`SHGetSpecialFolderPath` function. -Vista User Access Control (UAC) -=============================== - -Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control` -option. The default is 'none' (meaning no UAC handling is done), and other -valid values are 'auto' (meaning prompt for UAC elevation if Python was -installed for all users) and 'force' (meaning always prompt for elevation) .. function:: create_shortcut(target, description, filename[, arguments[, workdir[, iconpath[, iconindex]]]]) @@ -447,3 +440,12 @@ and *iconindex* is the index of the icon in the file *iconpath*. Again, for details consult the Microsoft documentation for the :class:`IShellLink` interface. + + +Vista User Access Control (UAC) +=============================== + +Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control` +option. The default is 'none' (meaning no UAC handling is done), and other +valid values are 'auto' (meaning prompt for UAC elevation if Python was +installed for all users) and 'force' (meaning always prompt for elevation). Modified: python/branches/release31-maint/Doc/library/cgi.rst ============================================================================== --- python/branches/release31-maint/Doc/library/cgi.rst (original) +++ python/branches/release31-maint/Doc/library/cgi.rst Sat Sep 12 00:36:27 2009 @@ -208,7 +208,7 @@ provide valid input to your scripts. For example, if a curious user appends another ``user=foo`` pair to the query string, then the script would crash, because in this situation the ``getvalue("user")`` method call returns a list -instead of a string. Calling the :meth:`toupper` method on a list is not valid +instead of a string. Calling the :meth:`~str.upper` method on a list is not valid (since lists do not have a method of this name) and results in an :exc:`AttributeError` exception. Modified: python/branches/release31-maint/Doc/library/constants.rst ============================================================================== --- python/branches/release31-maint/Doc/library/constants.rst (original) +++ python/branches/release31-maint/Doc/library/constants.rst Sat Sep 12 00:36:27 2009 @@ -66,7 +66,7 @@ Objects that when printed, print a message like "Use quit() or Ctrl-D (i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the - specified exit code, and when . + specified exit code. .. data:: copyright license Modified: python/branches/release31-maint/Doc/library/ftplib.rst ============================================================================== --- python/branches/release31-maint/Doc/library/ftplib.rst (original) +++ python/branches/release31-maint/Doc/library/ftplib.rst Sat Sep 12 00:36:27 2009 @@ -140,7 +140,8 @@ ``'anonymous@'``. This function should be called only once for each instance, after a connection has been established; it should not be called at all if a host and user were given when the instance was created. Most FTP commands are - only allowed after the client has logged in. + only allowed after the client has logged in. The *acct* parameter supplies + "accounting information"; few systems implement this. .. method:: FTP.abort() Modified: python/branches/release31-maint/Doc/library/logging.rst ============================================================================== --- python/branches/release31-maint/Doc/library/logging.rst (original) +++ python/branches/release31-maint/Doc/library/logging.rst Sat Sep 12 00:36:27 2009 @@ -1316,6 +1316,7 @@ 2008-01-18 14:49:54,033 d.e.f WARNING IP: 127.0.0.1 User: jim A message at WARNING level with 2 parameters + .. _network-logging: Sending and receiving logging events across a network 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 Sat Sep 12 00:36:27 2009 @@ -1151,11 +1151,6 @@ Run the server in the current process. - .. method:: from_address(address, authkey) - - A class method which creates a manager object referring to a pre-existing - server process which is using the given address and authentication key. - .. method:: get_server() Returns a :class:`Server` object which represents the actual server under Modified: python/branches/release31-maint/Doc/library/stdtypes.rst ============================================================================== --- python/branches/release31-maint/Doc/library/stdtypes.rst (original) +++ python/branches/release31-maint/Doc/library/stdtypes.rst Sat Sep 12 00:36:27 2009 @@ -1938,7 +1938,7 @@ :meth:`update` accepts either another dictionary object or an iterable of key/value pairs (as a tuple or other iterable of length two). If keyword - arguments are specified, the dictionary is then is updated with those + arguments are specified, the dictionary is then updated with those key/value pairs: ``d.update(red=1, blue=2)``. .. method:: values() Modified: python/branches/release31-maint/Doc/library/warnings.rst ============================================================================== --- python/branches/release31-maint/Doc/library/warnings.rst (original) +++ python/branches/release31-maint/Doc/library/warnings.rst Sat Sep 12 00:36:27 2009 @@ -1,4 +1,3 @@ - :mod:`warnings` --- Warning control =================================== @@ -131,16 +130,16 @@ +---------------+----------------------------------------------+ * *message* is a string containing a regular expression that the warning message - must match (the match is compiled to always be case-insensitive) + must match (the match is compiled to always be case-insensitive). * *category* is a class (a subclass of :exc:`Warning`) of which the warning - category must be a subclass in order to match + category must be a subclass in order to match. * *module* is a string containing a regular expression that the module name must - match (the match is compiled to be case-sensitive) + match (the match is compiled to be case-sensitive). * *lineno* is an integer that the line number where the warning occurred must - match, or ``0`` to match all line numbers + match, or ``0`` to match all line numbers. Since the :exc:`Warning` class is derived from the built-in :exc:`Exception` class, to turn a warning into an error we simply raise ``category(message)``. @@ -285,18 +284,20 @@ .. function:: formatwarning(message, category, filename, lineno[, line]) - Format a warning the standard way. This returns a string which may contain - embedded newlines and ends in a newline. *line* is - a line of source code to be included in the warning message; if *line* is not supplied, - :func:`formatwarning` will try to read the line specified by *filename* and *lineno*. + Format a warning the standard way. This returns a string which may contain + embedded newlines and ends in a newline. *line* is a line of source code to + be included in the warning message; if *line* is not supplied, + :func:`formatwarning` will try to read the line specified by *filename* and + *lineno*. .. function:: filterwarnings(action[, message[, category[, module[, lineno[, append]]]]]) - Insert an entry into the list of warnings filters. The entry is inserted at the - front by default; if *append* is true, it is inserted at the end. This checks - the types of the arguments, compiles the message and module regular expressions, - and inserts them as a tuple in the list of warnings filters. Entries closer to + Insert an entry into the list of :ref:`warnings filter specifications + `. The entry is inserted at the front by default; if + *append* is true, it is inserted at the end. This checks the types of the + arguments, compiles the *message* and *module* regular expressions, and + inserts them as a tuple in the list of warnings filters. Entries closer to the front of the list override entries later in the list, if both match a particular warning. Omitted arguments default to a value that matches everything. @@ -304,10 +305,11 @@ .. function:: simplefilter(action[, category[, lineno[, append]]]) - Insert a simple entry into the list of warnings filters. The meaning of the - function parameters is as for :func:`filterwarnings`, but regular expressions - are not needed as the filter inserted always matches any message in any module - as long as the category and line number match. + Insert a simple entry into the list of :ref:`warnings filter specifications + `. The meaning of the function parameters is as for + :func:`filterwarnings`, but regular expressions are not needed as the filter + inserted always matches any message in any module as long as the category and + line number match. .. function:: resetwarnings() Modified: python/branches/release31-maint/Doc/tutorial/introduction.rst ============================================================================== --- python/branches/release31-maint/Doc/tutorial/introduction.rst (original) +++ python/branches/release31-maint/Doc/tutorial/introduction.rst Sat Sep 12 00:36:27 2009 @@ -150,7 +150,6 @@ 4.0 >>> abs(a) # sqrt(a.real**2 + a.imag**2) 5.0 - >>> In interactive mode, the last printed expression is assigned to the variable ``_``. This means that when you are using Python as a desk calculator, it is @@ -164,7 +163,6 @@ 113.0625 >>> round(_, 2) 113.06 - >>> This variable should be treated as read-only by the user. Don't explicitly assign a value to it --- you would create an independent local variable with the @@ -212,12 +210,32 @@ Note that newlines still need to be embedded in the string using ``\n``; the newline following the trailing backslash is discarded. This example would print -the following:: +the following: + +.. code-block:: text This is a rather long string containing several lines of text just as you would do in C. Note that whitespace at the beginning of the line is significant. +Or, strings can be surrounded in a pair of matching triple-quotes: ``"""`` or +``'''``. End of lines do not need to be escaped when using triple-quotes, but +they will be included in the string. :: + + print """ + Usage: thingy [OPTIONS] + -h Display this usage message + -H hostname Hostname to connect to + """ + +produces the following output: + +.. code-block:: text + + Usage: thingy [OPTIONS] + -h Display this usage message + -H hostname Hostname to connect to + If we make the string literal a "raw" string, ``\n`` sequences are not converted to newlines, but the backslash at the end of the line, and the newline character in the source, are both included in the string as data. Thus, the example:: @@ -227,7 +245,9 @@ print(hello) -would print:: +would print: + +.. code-block:: text This is a rather long string containing\n\ several lines of text much as you would do in C. Modified: python/branches/release31-maint/Lib/http/cookies.py ============================================================================== --- python/branches/release31-maint/Lib/http/cookies.py (original) +++ python/branches/release31-maint/Lib/http/cookies.py Sat Sep 12 00:36:27 2009 @@ -535,7 +535,9 @@ if type(rawdata) == type(""): self.__ParseString(rawdata) else: - self.update(rawdata) + # self.update() wouldn't call our custom __setitem__ + for k, v in rawdata.items(): + self[k] = v return # end load() Modified: python/branches/release31-maint/Lib/idlelib/macosxSupport.py ============================================================================== --- python/branches/release31-maint/Lib/idlelib/macosxSupport.py (original) +++ python/branches/release31-maint/Lib/idlelib/macosxSupport.py Sat Sep 12 00:36:27 2009 @@ -9,7 +9,7 @@ """ Returns True if Python is running from within an app on OSX. If so, assume that Python was built with Aqua Tcl/Tk rather than - X11 Tck/Tk. + X11 Tcl/Tk. """ return (sys.platform == 'darwin' and '.app' in sys.executable) Modified: python/branches/release31-maint/Lib/idlelib/rpc.py ============================================================================== --- python/branches/release31-maint/Lib/idlelib/rpc.py (original) +++ python/branches/release31-maint/Lib/idlelib/rpc.py Sat Sep 12 00:36:27 2009 @@ -595,4 +595,4 @@ # XXX KBK 09Sep03 We need a proper unit test for this module. Previously -# existing test code was removed at Rev 1.27. +# existing test code was removed at Rev 1.27 (r34098). Modified: python/branches/release31-maint/Lib/multiprocessing/queues.py ============================================================================== --- python/branches/release31-maint/Lib/multiprocessing/queues.py (original) +++ python/branches/release31-maint/Lib/multiprocessing/queues.py Sat Sep 12 00:36:27 2009 @@ -282,9 +282,22 @@ Queue.__setstate__(self, state[:-2]) self._cond, self._unfinished_tasks = state[-2:] - def put(self, item, block=True, timeout=None): - Queue.put(self, item, block, timeout) - self._unfinished_tasks.release() + def put(self, obj, block=True, timeout=None): + assert not self._closed + if not self._sem.acquire(block, timeout): + raise Full + + self._notempty.acquire() + self._cond.acquire() + try: + if self._thread is None: + self._start_thread() + self._buffer.append(obj) + self._unfinished_tasks.release() + self._notempty.notify() + finally: + self._cond.release() + self._notempty.release() def task_done(self): self._cond.acquire() Modified: python/branches/release31-maint/Lib/test/test_descr.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_descr.py (original) +++ python/branches/release31-maint/Lib/test/test_descr.py Sat Sep 12 00:36:27 2009 @@ -1268,13 +1268,9 @@ self.assertEqual(super(D,D).goo(), (D,)) self.assertEqual(super(D,d).goo(), (D,)) - # Verify that argument is checked for callability (SF bug 753451) - try: - classmethod(1).__get__(1) - except TypeError: - pass - else: - self.fail("classmethod should check for callability") + # Verify that a non-callable will raise + meth = classmethod(1).__get__(1) + self.assertRaises(TypeError, meth) # Verify that classmethod() doesn't allow keyword args try: Modified: python/branches/release31-maint/Lib/webbrowser.py ============================================================================== --- python/branches/release31-maint/Lib/webbrowser.py (original) +++ python/branches/release31-maint/Lib/webbrowser.py Sat Sep 12 00:36:27 2009 @@ -626,7 +626,9 @@ # and prepend to _tryorder for cmdline in _userchoices: if cmdline != '': - _synthesize(cmdline, -1) + cmd = _synthesize(cmdline, -1) + if cmd[1] is None: + register(cmdline, None, GenericBrowser(cmdline), -1) cmdline = None # to make del work if _userchoices was empty del cmdline del _userchoices Modified: python/branches/release31-maint/Misc/ACKS ============================================================================== --- python/branches/release31-maint/Misc/ACKS (original) +++ python/branches/release31-maint/Misc/ACKS Sat Sep 12 00:36:27 2009 @@ -488,6 +488,7 @@ Lambert Meertens Bill van Melle Lucas Prado Melo +Brian Merrell Luke Mewburn Mike Meyer Steven Miale Modified: python/branches/release31-maint/Modules/signalmodule.c ============================================================================== --- python/branches/release31-maint/Modules/signalmodule.c (original) +++ python/branches/release31-maint/Modules/signalmodule.c Sat Sep 12 00:36:27 2009 @@ -853,7 +853,7 @@ #endif /* - * The is_stripped variable is meant to speed up the calls to + * The is_tripped variable is meant to speed up the calls to * PyErr_CheckSignals (both directly or via pending calls) when no * signal has arrived. This variable is set to 1 when a signal arrives * and it is set to 0 here, when we know some signals arrived. This way Modified: python/branches/release31-maint/Objects/classobject.c ============================================================================== --- python/branches/release31-maint/Objects/classobject.c (original) +++ python/branches/release31-maint/Objects/classobject.c Sat Sep 12 00:36:27 2009 @@ -43,10 +43,6 @@ PyMethod_New(PyObject *func, PyObject *self) { register PyMethodObject *im; - if (!PyCallable_Check(func)) { - PyErr_BadInternalCall(); - return NULL; - } if (self == NULL) { PyErr_BadInternalCall(); return NULL; Modified: python/branches/release31-maint/Objects/funcobject.c ============================================================================== --- python/branches/release31-maint/Objects/funcobject.c (original) +++ python/branches/release31-maint/Objects/funcobject.c Sat Sep 12 00:36:27 2009 @@ -765,12 +765,6 @@ return -1; if (!_PyArg_NoKeywords("classmethod", kwds)) return -1; - if (!PyCallable_Check(callable)) { - PyErr_Format(PyExc_TypeError, "'%s' object is not callable", - callable->ob_type->tp_name); - return -1; - } - Py_INCREF(callable); cm->cm_callable = callable; return 0; Modified: python/branches/release31-maint/configure ============================================================================== --- python/branches/release31-maint/configure (original) +++ python/branches/release31-maint/configure Sat Sep 12 00:36:27 2009 @@ -1,12 +1,12 @@ #! /bin/sh -# From configure.in Revision: 74683 . +# From configure.in Revision: 74714 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for python 3.1. +# Generated by GNU Autoconf 2.63 for python 3.1. # # 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.1 -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.1, 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 @@ -1911,20 +2033,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 @@ -2046,12 +2168,12 @@ ## # 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` - if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + if test "$ac_sys_system" = "AIX" \ -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then ac_sys_release=`uname -v` else @@ -2210,8 +2332,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 @@ -2221,11 +2343,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 @@ -2237,8 +2359,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 @@ -2256,22 +2378,19 @@ case $ac_sys_system in AIX*) CC=cc_r without_gcc=;; - Monterey*) - RANLIB=: - without_gcc=;; *) without_gcc=no;; 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 @@ -2284,10 +2403,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. @@ -2300,7 +2419,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 @@ -2311,11 +2430,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 @@ -2324,10 +2443,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. @@ -2340,7 +2459,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 @@ -2351,11 +2470,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 @@ -2363,12 +2482,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 @@ -2381,10 +2496,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. @@ -2397,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_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 @@ -2408,11 +2523,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 @@ -2421,10 +2536,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. @@ -2442,7 +2557,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 @@ -2465,11 +2580,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 @@ -2480,10 +2595,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. @@ -2496,7 +2611,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 @@ -2507,11 +2622,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 @@ -2524,10 +2639,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. @@ -2540,7 +2655,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 @@ -2551,11 +2666,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 @@ -2567,12 +2682,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 @@ -2582,44 +2693,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 @@ -2638,27 +2755,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 @@ -2669,10 +2781,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' @@ -2683,7 +2796,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 @@ -2710,25 +2823,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 @@ -2737,49 +2852,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 @@ -2788,31 +2907,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. */ @@ -2835,40 +2956,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. */ @@ -2894,20 +3018,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 @@ -2917,15 +3042,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 @@ -2952,20 +3081,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="" @@ -2990,20 +3120,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 @@ -3029,20 +3160,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 @@ -3057,8 +3189,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 @@ -3074,10 +3206,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 @@ -3148,20 +3280,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 @@ -3177,15 +3310,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 @@ -3198,8 +3331,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 @@ -3224,8 +3357,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" @@ -3233,10 +3366,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 [\\/]* | ?:[\\/]*) @@ -3251,7 +3384,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 @@ -3264,20 +3397,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 [\\/]* | ?:[\\/]*) @@ -3292,7 +3425,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 @@ -3305,11 +3438,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 ;; @@ -3325,10 +3458,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. @@ -3341,7 +3474,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 @@ -3352,11 +3485,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 @@ -3371,12 +3504,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. @@ -3391,15 +3524,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" @@ -3431,20 +3564,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. @@ -3468,13 +3602,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 @@ -3482,7 +3617,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. @@ -3507,8 +3642,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 @@ -3536,20 +3671,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. @@ -3573,13 +3709,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 @@ -3587,7 +3724,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. @@ -3603,11 +3740,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 @@ -3617,42 +3756,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; } +{ $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 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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` @@ -3667,74 +3801,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` @@ -3749,63 +3869,510 @@ 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 +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;} + { (exit 1); exit 1; }; } + 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; } + 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 +/* 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 + +# 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=`$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 -IFS=$as_save_IFS + + 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 -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; }; } + 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 - ac_cv_path_EGREP=$EGREP -fi - + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi + ac_cv_safe_to_define___extensions__=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - +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 -{ echo "$as_me:$LINENO: checking for AIX" >&5 -echo $ECHO_N "checking for AIX... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef _AIX - yes -#endif + cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 _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 + + cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi -rm -f -r conftest* + cat >>confdefs.h <<\_ACEOF +#define _TANDEM_SOURCE 1 +_ACEOF @@ -3818,8 +4385,8 @@ esac -{ echo "$as_me:$LINENO: checking for --with-suffix" >&5 -echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; } +{ $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 @@ -3831,26 +4398,26 @@ esac fi -{ echo "$as_me:$LINENO: result: $EXEEXT" >&5 -echo "${ECHO_T}$EXEEXT" >&6; } +{ $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 -{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 -echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; } +{ $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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } BUILDEXEEXT=.exe 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; } BUILDEXEEXT=$EXEEXT fi rmdir CaseSensitiveTestDir @@ -3867,10 +4434,6 @@ 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 @@ -3883,14 +4446,14 @@ -{ echo "$as_me:$LINENO: checking LIBRARY" >&5 -echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; } +{ $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 @@ -3925,8 +4488,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)' @@ -3938,16 +4501,14 @@ 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; } +{ $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 @@ -3955,8 +4516,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` @@ -3967,11 +4528,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; @@ -3987,11 +4548,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" @@ -4013,29 +4574,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 @@ -4043,8 +4607,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") @@ -4053,8 +4617,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 @@ -4138,16 +4702,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. @@ -4160,7 +4724,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 @@ -4171,11 +4735,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 @@ -4184,10 +4748,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. @@ -4200,7 +4764,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 @@ -4211,11 +4775,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 @@ -4223,12 +4787,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 @@ -4242,10 +4802,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. @@ -4258,7 +4818,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 @@ -4269,11 +4829,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 @@ -4292,10 +4852,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. @@ -4308,7 +4868,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 @@ -4320,11 +4880,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 @@ -4360,8 +4920,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 @@ -4387,11 +4947,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 @@ -4420,17 +4981,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 @@ -4443,8 +5016,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. @@ -4466,8 +5039,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 @@ -4479,15 +5052,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 @@ -4542,15 +5115,6 @@ 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 @@ -4565,8 +5129,8 @@ # Python violates C99 rules, by casting between incompatible # pointer types. GCC may generate bad code as a result of that, # so use -fno-strict-aliasing if supported. - { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5 -echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; } + { $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 @@ -4586,36 +5150,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_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 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" @@ -4663,8 +5230,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 @@ -4757,10 +5324,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" @@ -4781,29 +5348,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 @@ -4811,8 +5381,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 @@ -4825,10 +5395,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" @@ -4849,29 +5419,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 @@ -4879,8 +5452,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 @@ -4889,8 +5462,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 @@ -4916,13 +5489,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 @@ -4932,14 +5506,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 @@ -4952,10 +5526,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 @@ -4986,19 +5560,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 @@ -5006,13 +5582,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 @@ -5020,8 +5597,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 @@ -5033,10 +5610,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" @@ -5069,29 +5646,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 @@ -5099,8 +5679,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 @@ -5110,10 +5690,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" @@ -5146,29 +5726,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_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 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 @@ -5176,8 +5759,8 @@ CC="$ac_save_cc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 -echo "${ECHO_T}$ac_cv_kthread" >&6; } +{ $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 @@ -5187,10 +5770,10 @@ # 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cc="$CC" CC="$CC -pthread" @@ -5223,29 +5806,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=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=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 @@ -5253,8 +5839,8 @@ CC="$ac_save_cc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 -echo "${ECHO_T}$ac_cv_pthread" >&6; } +{ $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 @@ -5262,8 +5848,8 @@ ac_cv_cxx_thread=no if test ! -z "$CXX" then -{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5 -echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; } +{ $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" @@ -5293,17 +5879,17 @@ fi rm -fr conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 -echo "${ECHO_T}$ac_cv_cxx_thread" >&6; } +{ $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 -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5330,20 +5916,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_stdc=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 @@ -5368,7 +5955,7 @@ else ac_cv_header_stdc=no fi -rm -f -r conftest* +rm -f conftest* fi @@ -5389,7 +5976,7 @@ else ac_cv_header_stdc=no fi -rm -f -r conftest* +rm -f conftest* fi @@ -5435,37 +6022,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 : 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_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 -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $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 @@ -5474,75 +6064,6 @@ 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 -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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - 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 - 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 - - @@ -5610,20 +6131,21 @@ 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` +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 - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $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 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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; } 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 $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5639,32 +6161,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 $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +{ $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 @@ -5678,51 +6201,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: $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: $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:* ) - { 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: $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/ ## @@ -5731,21 +6255,24 @@ ) | 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; } +{ $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 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; } +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 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -5759,11 +6286,11 @@ 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; } + 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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5789,20 +6316,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 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" @@ -5810,12 +6338,15 @@ 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 +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 `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -5824,10 +6355,10 @@ 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; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -5865,26 +6396,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_opendir=$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_opendir+set}" = set; then @@ -5899,8 +6434,8 @@ 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; } +{ $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" @@ -5908,10 +6443,10 @@ fi else - { echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -5949,26 +6484,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_opendir=$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_opendir+set}" = set; then @@ -5983,8 +6522,8 @@ 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; } +{ $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" @@ -5993,10 +6532,10 @@ 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6019,46 +6558,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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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_header_sys_types_h_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_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 -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; } +{ $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 - { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 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:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +$as_echo "$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; } +{ $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 @@ -6074,32 +6617,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 sys/mkdev.h presence" >&5 -echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; } +{ $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 @@ -6113,51 +6657,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: 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;} + { $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:* ) - { 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;} + { $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/ ## @@ -6166,18 +6711,18 @@ ) | 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $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 $ac_cv_header_sys_mkdev_h = yes; then +if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define MAJOR_IN_MKDEV 1 @@ -6189,17 +6734,17 @@ if test $ac_cv_header_sys_mkdev_h = no; then if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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: 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 sys/sysmacros.h usability" >&5 -echo $ECHO_N "checking sys/sysmacros.h 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 @@ -6215,32 +6760,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 sys/sysmacros.h presence" >&5 -echo $ECHO_N "checking sys/sysmacros.h 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 @@ -6254,51 +6800,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: 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;} + { $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: 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;} + { $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/ ## @@ -6307,18 +6854,18 @@ ) | 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&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; } +{ $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 $ac_cv_header_sys_sysmacros_h = yes; then +if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define MAJOR_IN_SYSMACROS 1 @@ -6335,11 +6882,11 @@ 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; } +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. */ @@ -6361,20 +6908,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 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" @@ -6382,12 +6930,15 @@ 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 +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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6399,11 +6950,11 @@ 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; } +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. */ @@ -6428,20 +6979,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 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" @@ -6449,12 +7001,15 @@ 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 +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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6464,8 +7019,8 @@ # checks for typedefs was_it_defined=no -{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5 -echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; } +{ $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 @@ -6487,14 +7042,14 @@ fi -rm -f -r conftest* +rm -f conftest* -{ 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; } # 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 makedev" >&5 +$as_echo_n "checking for makedev... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6516,26 +7071,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_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 conftest.$ac_ext if test "$ac_cv_has_makedev" = "no"; then @@ -6564,26 +7123,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_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 conftest.$ac_ext if test "$ac_cv_has_makedev" = "yes"; then @@ -6594,8 +7157,8 @@ fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 -echo "${ECHO_T}$ac_cv_has_makedev" >&6; } +{ $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 @@ -6612,8 +7175,8 @@ # work-around, disable LFS on such configurations use_lfs=yes -{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5 -echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; } +{ $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 @@ -6639,28 +7202,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 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 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; } +{ $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 @@ -6688,26 +7252,58 @@ EOF # Type availability checks -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_mode_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 -typedef mode_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) +if (sizeof (mode_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. */ +$ac_includes_default +int +main () +{ +if (sizeof ((mode_t))) + return 0; ; return 0; } @@ -6718,30 +7314,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_mode_t=yes + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_mode_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_mode_t=no + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } -if test $ac_cv_type_mode_t = yes; then +{ $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 @@ -6751,26 +7356,58 @@ fi -{ echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_off_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 -typedef off_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) +if (sizeof (off_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. */ +$ac_includes_default +int +main () +{ +if (sizeof ((off_t))) + return 0; ; return 0; } @@ -6781,30 +7418,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_off_t=yes + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_off_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_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 +{ $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 @@ -6814,26 +7460,58 @@ fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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. */ $ac_includes_default -typedef pid_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) +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. */ +$ac_includes_default +int +main () +{ +if (sizeof ((pid_t))) + return 0; ; return 0; } @@ -6844,30 +7522,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_pid_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_pid_t=no + ac_cv_type_pid_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_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } -if test $ac_cv_type_pid_t = yes; then + +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 @@ -6877,10 +7564,10 @@ fi -{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6905,20 +7592,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_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 @@ -6926,19 +7614,54 @@ 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; } +{ $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 -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $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. */ +$ac_includes_default +int +main () +{ +if (sizeof (size_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 @@ -6946,14 +7669,11 @@ 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; +if (sizeof ((size_t))) + return 0; ; return 0; } @@ -6964,30 +7684,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_size_t=yes + : +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 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 + 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 +{ $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 @@ -6997,10 +7726,10 @@ 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7017,11 +7746,11 @@ else ac_cv_type_uid_t=no fi -rm -f -r conftest* +rm -f conftest* fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +{ $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 @@ -7036,10 +7765,10 @@ fi - { echo "$as_me:$LINENO: checking for uint32_t" >&5 -echo $ECHO_N "checking for uint32_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_c_uint32_t=no for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \ @@ -7067,13 +7796,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 @@ -7084,7 +7814,7 @@ esac else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7094,8 +7824,8 @@ 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; } +{ $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) ;; #( *) @@ -7112,10 +7842,10 @@ esac - { echo "$as_me:$LINENO: checking for uint64_t" >&5 -echo $ECHO_N "checking for uint64_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_c_uint64_t=no for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ @@ -7143,13 +7873,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 @@ -7160,7 +7891,7 @@ esac else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7170,8 +7901,8 @@ 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; } +{ $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) ;; #( *) @@ -7188,10 +7919,10 @@ esac - { echo "$as_me:$LINENO: checking for int32_t" >&5 -echo $ECHO_N "checking for int32_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_c_int32_t=no for ac_type in 'int32_t' 'int' 'long int' \ @@ -7219,13 +7950,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 @@ -7241,7 +7973,7 @@ 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))]; + < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -7254,20 +7986,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 case $ac_type in @@ -7279,7 +8012,7 @@ 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 @@ -7289,8 +8022,8 @@ 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; } +{ $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) ;; #( *) @@ -7302,10 +8035,10 @@ esac - { echo "$as_me:$LINENO: checking for int64_t" >&5 -echo $ECHO_N "checking for int64_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_c_int64_t=no for ac_type in 'int64_t' 'int' 'long int' \ @@ -7333,13 +8066,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 @@ -7355,7 +8089,7 @@ 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))]; + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -7368,20 +8102,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 case $ac_type in @@ -7393,7 +8128,7 @@ 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 @@ -7403,8 +8138,8 @@ 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; } +{ $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) ;; #( *) @@ -7415,26 +8150,24 @@ ;; esac -{ echo "$as_me:$LINENO: checking for ssize_t" >&5 -echo $ECHO_N "checking for ssize_t... $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - 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 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; +if (sizeof (ssize_t)) + return 0; ; return 0; } @@ -7445,45 +8178,18 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$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 -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 - -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. */ _ACEOF @@ -7491,14 +8197,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef int ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +if (sizeof ((ssize_t))) + return 0; ; return 0; } @@ -7509,38 +8212,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_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$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: 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 - ac_cv_type_int=no + fi 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; } +{ $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 +_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. -{ echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6; } +{ $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 - 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. @@ -7551,11 +8273,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 (int))) >= 0)]; test_array [0] = 0 ; @@ -7568,13 +8289,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 @@ -7588,11 +8310,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 (int))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7605,20 +8326,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` @@ -7632,7 +8354,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 @@ -7642,11 +8364,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 (int))) < 0)]; test_array [0] = 0 ; @@ -7659,13 +8380,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 @@ -7679,11 +8401,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 (int))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7696,20 +8417,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` @@ -7723,7 +8445,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= @@ -7743,11 +8465,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 (int))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7760,20 +8481,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` @@ -7784,11 +8506,13 @@ 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) + { { $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 -echo "$as_me: error: cannot compute sizeof (int) +$as_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_int=0 fi ;; @@ -7801,9 +8525,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 (int)); } +static unsigned long int ulongval () { return (long int) (sizeof (int)); } #include #include int @@ -7813,20 +8536,22 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (int))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (int)))) 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 (int)))) 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; ; @@ -7839,43 +8564,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_int=`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) + { { $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 -echo "$as_me: error: cannot compute sizeof (int) +$as_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_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 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_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } @@ -7884,68 +8614,14 @@ _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=$? - 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; } +{ $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 - 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. @@ -7956,11 +8632,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 (long))) >= 0)]; test_array [0] = 0 ; @@ -7973,13 +8648,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 @@ -7993,11 +8669,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 (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8010,20 +8685,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` @@ -8037,7 +8713,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 @@ -8047,11 +8723,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 (long))) < 0)]; test_array [0] = 0 ; @@ -8064,13 +8739,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 @@ -8084,11 +8760,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 (long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8101,20 +8776,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` @@ -8128,7 +8804,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= @@ -8148,11 +8824,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 (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8165,20 +8840,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` @@ -8189,11 +8865,13 @@ 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) + { { $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 (long) +$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_long=0 fi ;; @@ -8206,9 +8884,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 (long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long)); } #include #include int @@ -8218,20 +8895,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; ; @@ -8244,43 +8923,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_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_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) + { { $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 (long) +$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_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_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } @@ -8289,68 +8973,14 @@ _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. -{ echo "$as_me:$LINENO: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $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 - 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. @@ -8361,11 +8991,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 (void *))) >= 0)]; test_array [0] = 0 ; @@ -8378,13 +9007,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 @@ -8398,11 +9028,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 (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8415,20 +9044,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` @@ -8442,7 +9072,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 @@ -8452,11 +9082,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 (void *))) < 0)]; test_array [0] = 0 ; @@ -8469,13 +9098,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 @@ -8489,11 +9119,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 (void *))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8506,20 +9135,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` @@ -8533,7 +9163,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= @@ -8553,11 +9183,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 (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8570,20 +9199,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` @@ -8594,11 +9224,13 @@ 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 *) + { { $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 (void *) +$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_void_p=0 fi ;; @@ -8611,9 +9243,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 (void *)); } +static unsigned long int ulongval () { return (long int) (sizeof (void *)); } #include #include int @@ -8623,20 +9254,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; ; @@ -8649,43 +9282,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_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_void_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) + { { $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 (void *) +$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_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_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } @@ -8694,68 +9332,14 @@ _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. -{ echo "$as_me:$LINENO: checking size of short" >&5 -echo $ECHO_N "checking size of short... $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 - 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. @@ -8766,11 +9350,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 (short))) >= 0)]; test_array [0] = 0 ; @@ -8783,13 +9366,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 @@ -8803,11 +9387,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 (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8820,20 +9403,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` @@ -8847,7 +9431,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 @@ -8857,11 +9441,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 (short))) < 0)]; test_array [0] = 0 ; @@ -8874,13 +9457,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 @@ -8894,11 +9478,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 (short))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8911,20 +9494,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` @@ -8938,7 +9522,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= @@ -8958,11 +9542,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 (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8975,20 +9558,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` @@ -8999,11 +9583,13 @@ 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) + { { $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 (short) +$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_short=0 fi ;; @@ -9016,9 +9602,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 (short)); } +static unsigned long int ulongval () { return (long int) (sizeof (short)); } #include #include int @@ -9028,20 +9613,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; ; @@ -9054,43 +9641,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_short=`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) + { { $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 (short) +$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_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 -{ 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_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } @@ -9099,68 +9691,14 @@ _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. -{ echo "$as_me:$LINENO: checking size of float" >&5 -echo $ECHO_N "checking size of float... $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 - 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. @@ -9171,11 +9709,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 (float))) >= 0)]; test_array [0] = 0 ; @@ -9188,13 +9725,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 @@ -9208,11 +9746,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 (float))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9225,20 +9762,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` @@ -9252,7 +9790,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 @@ -9262,11 +9800,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 (float))) < 0)]; test_array [0] = 0 ; @@ -9279,13 +9816,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 @@ -9299,11 +9837,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 (float))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9316,20 +9853,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` @@ -9343,7 +9881,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= @@ -9363,11 +9901,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 (float))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9380,20 +9917,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` @@ -9404,11 +9942,13 @@ 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) + { { $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 (float) +$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_float=0 fi ;; @@ -9421,9 +9961,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 (float)); } +static unsigned long int ulongval () { return (long int) (sizeof (float)); } #include #include int @@ -9433,20 +9972,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; ; @@ -9459,113 +10000,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` 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) + { { $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 (float) +$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_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_float" >&5 -echo "${ECHO_T}$ac_cv_sizeof_float" >&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_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 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF -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; } +{ $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 - 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. @@ -9576,11 +10068,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 (double))) >= 0)]; test_array [0] = 0 ; @@ -9593,13 +10084,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 @@ -9613,11 +10105,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 (double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9630,20 +10121,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` @@ -9657,7 +10149,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 @@ -9667,11 +10159,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 (double))) < 0)]; test_array [0] = 0 ; @@ -9684,13 +10175,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 @@ -9704,11 +10196,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 (double))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9721,20 +10212,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` @@ -9748,7 +10240,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= @@ -9768,11 +10260,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 (double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9785,20 +10276,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` @@ -9809,11 +10301,13 @@ 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) + { { $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 (double) +$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_double=0 fi ;; @@ -9826,9 +10320,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 (double)); } +static unsigned long int ulongval () { return (long int) (sizeof (double)); } #include #include int @@ -9838,20 +10331,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; ; @@ -9864,43 +10359,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_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_double" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) + { { $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 (double) +$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_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_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&6; } @@ -9909,68 +10409,14 @@ _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. -{ echo "$as_me:$LINENO: checking size of fpos_t" >&5 -echo $ECHO_N "checking size of fpos_t... $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 - 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. @@ -9981,11 +10427,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 (fpos_t))) >= 0)]; test_array [0] = 0 ; @@ -9998,13 +10443,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 @@ -10018,11 +10464,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 (fpos_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10035,20 +10480,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` @@ -10062,7 +10508,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 @@ -10072,11 +10518,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 (fpos_t))) < 0)]; test_array [0] = 0 ; @@ -10089,13 +10534,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 @@ -10109,11 +10555,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 (fpos_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10126,20 +10571,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` @@ -10153,7 +10599,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= @@ -10173,11 +10619,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 (fpos_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10190,20 +10635,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` @@ -10214,11 +10660,13 @@ 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) + { { $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 (fpos_t) +$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_fpos_t=0 fi ;; @@ -10231,9 +10679,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 (fpos_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); } #include #include int @@ -10243,20 +10690,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; ; @@ -10269,43 +10718,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_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_fpos_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_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 (fpos_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 (fpos_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else 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_fpos_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 +$as_echo "$ac_cv_sizeof_fpos_t" >&6; } @@ -10314,68 +10768,14 @@ _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 - *\"* | *\`* | *\\*) 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_size_t=yes -else - 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 -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. -{ echo "$as_me:$LINENO: checking size of size_t" >&5 -echo $ECHO_N "checking size of size_t... $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 - 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. @@ -10386,11 +10786,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 (size_t))) >= 0)]; test_array [0] = 0 ; @@ -10403,13 +10802,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 @@ -10423,11 +10823,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 (size_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10440,20 +10839,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` @@ -10467,7 +10867,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 @@ -10477,11 +10877,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 (size_t))) < 0)]; test_array [0] = 0 ; @@ -10494,13 +10893,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 @@ -10514,11 +10914,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 (size_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10531,20 +10930,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` @@ -10558,7 +10958,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= @@ -10578,11 +10978,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 (size_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10595,20 +10994,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` @@ -10619,11 +11019,13 @@ 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) + { { $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 (size_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_size_t=0 fi ;; @@ -10636,9 +11038,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 (size_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (size_t)); } #include #include int @@ -10648,20 +11049,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; ; @@ -10674,43 +11077,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_size_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) + { { $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 (size_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_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 -{ 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_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } @@ -10719,68 +11127,14 @@ _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 () -{ -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_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; } - # 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; } +{ $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 - 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. @@ -10791,11 +11145,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 (pid_t))) >= 0)]; test_array [0] = 0 ; @@ -10808,13 +11161,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 @@ -10828,11 +11182,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 (pid_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10845,20 +11198,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` @@ -10872,7 +11226,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 @@ -10882,11 +11236,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 (pid_t))) < 0)]; test_array [0] = 0 ; @@ -10899,13 +11252,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 @@ -10919,11 +11273,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 (pid_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10936,20 +11289,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` @@ -10963,7 +11317,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= @@ -10983,11 +11337,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 (pid_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11000,20 +11353,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` @@ -11024,11 +11378,13 @@ 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) + { { $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 (pid_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_pid_t=0 fi ;; @@ -11041,9 +11397,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 (pid_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); } #include #include int @@ -11053,20 +11408,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; ; @@ -11079,43 +11436,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_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_pid_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_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 (pid_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (pid_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_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_pid_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 +$as_echo "$ac_cv_sizeof_pid_t" >&6; } @@ -11125,8 +11487,8 @@ -{ echo "$as_me:$LINENO: checking for long long support" >&5 -echo $ECHO_N "checking for long long support... $ECHO_C" >&6; } +{ $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. */ @@ -11149,13 +11511,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 @@ -11169,78 +11532,24 @@ 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 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; } +{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5 +$as_echo "$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. -{ echo "$as_me:$LINENO: checking size of long long" >&5 -echo $ECHO_N "checking size of long long... $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 - 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. @@ -11251,11 +11560,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 long))) >= 0)]; test_array [0] = 0 ; @@ -11268,13 +11576,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 @@ -11288,11 +11597,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 long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11305,20 +11613,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` @@ -11332,7 +11641,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 @@ -11342,11 +11651,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 long))) < 0)]; test_array [0] = 0 ; @@ -11359,13 +11667,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 @@ -11379,11 +11688,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 long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11396,20 +11704,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` @@ -11423,7 +11732,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= @@ -11443,11 +11752,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 long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11460,20 +11768,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` @@ -11484,11 +11793,13 @@ 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) + { { $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 (long long) +$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_long_long=0 fi ;; @@ -11501,9 +11812,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 long)); } +static unsigned long int ulongval () { return (long int) (sizeof (long long)); } #include #include int @@ -11513,20 +11823,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; ; @@ -11539,43 +11851,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_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_long_long" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) + { { $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 (long long) +$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_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_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } @@ -11586,8 +11903,8 @@ fi -{ echo "$as_me:$LINENO: checking for long double support" >&5 -echo $ECHO_N "checking for long double support... $ECHO_C" >&6; } +{ $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. */ @@ -11610,13 +11927,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 @@ -11630,78 +11948,24 @@ 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_double" >&5 -echo "${ECHO_T}$have_long_double" >&6; } +{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5 +$as_echo "$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; } - # 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; } +{ $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 - 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. @@ -11712,11 +11976,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 (long double))) >= 0)]; test_array [0] = 0 ; @@ -11729,13 +11992,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 @@ -11749,11 +12013,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 (long double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11766,20 +12029,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` @@ -11793,7 +12057,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 @@ -11803,11 +12067,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 (long double))) < 0)]; test_array [0] = 0 ; @@ -11820,13 +12083,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 @@ -11840,11 +12104,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 (long double))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11857,20 +12120,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` @@ -11884,7 +12148,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= @@ -11904,11 +12168,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 (long double))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11921,20 +12184,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` @@ -11945,11 +12209,13 @@ 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) + { { $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 double) +$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_double=0 fi ;; @@ -11962,9 +12228,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 (long double)); } +static unsigned long int ulongval () { return (long int) (sizeof (long double)); } #include #include int @@ -11974,20 +12239,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; ; @@ -12000,128 +12267,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_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` 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) + { { $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 double) +$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_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_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#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 - +{ $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 HAVE_C99_BOOL 1 -_ACEOF - have_c99_bool=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +_ACEOF 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 + +{ $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 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; +_Bool x; x = (_Bool)0; ; return 0; } @@ -12132,38 +12344,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__Bool=yes + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_C99_BOOL 1 +_ACEOF + + 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 - 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; } +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 # 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; } +{ $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 - 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. @@ -12174,11 +12393,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 (_Bool))) >= 0)]; test_array [0] = 0 ; @@ -12191,13 +12409,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 @@ -12211,11 +12430,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 (_Bool))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12228,20 +12446,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` @@ -12255,7 +12474,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 @@ -12265,11 +12484,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 (_Bool))) < 0)]; test_array [0] = 0 ; @@ -12282,13 +12500,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 @@ -12302,11 +12521,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 (_Bool))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12319,20 +12537,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` @@ -12346,7 +12565,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= @@ -12366,11 +12585,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 (_Bool))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12383,20 +12601,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` @@ -12407,11 +12626,13 @@ 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) + { { $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 (_Bool) +$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__Bool=0 fi ;; @@ -12424,9 +12645,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 (_Bool)); } +static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); } #include #include int @@ -12436,20 +12656,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; ; @@ -12462,43 +12684,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__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__Bool" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) + { { $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 (_Bool) +$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__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__Bool" >&5 -echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 +$as_echo "$ac_cv_sizeof__Bool" >&6; } @@ -12509,12 +12736,13 @@ fi -{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_uintptr_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12524,14 +12752,11 @@ #include #endif -typedef uintptr_t ac__type_new_; int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +if (sizeof (uintptr_t)) + return 0; ; return 0; } @@ -12542,55 +12767,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_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_; +#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; } @@ -12601,38 +12804,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_uintptr_t=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_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; } +{ $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 uintptr_t" >&5 -echo $ECHO_N "checking size of uintptr_t... $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 - 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. @@ -12643,11 +12860,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)]; test_array [0] = 0 ; @@ -12660,13 +12876,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 @@ -12680,11 +12897,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12697,20 +12913,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` @@ -12724,7 +12941,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 @@ -12734,11 +12951,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)]; test_array [0] = 0 ; @@ -12751,13 +12967,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 @@ -12771,11 +12988,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12788,20 +13004,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` @@ -12815,7 +13032,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= @@ -12835,11 +13052,10 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12852,20 +13068,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` @@ -12876,11 +13093,13 @@ 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) + { { $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 (uintptr_t) +$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_uintptr_t=0 fi ;; @@ -12893,9 +13112,8 @@ 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_)); } +static long int longval () { return (long int) (sizeof (uintptr_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); } #include #include int @@ -12905,20 +13123,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; ; @@ -12931,43 +13151,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_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_uintptr_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_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 (uintptr_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 (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else 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_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 +$as_echo "$ac_cv_sizeof_uintptr_t" >&6; } @@ -12981,10 +13206,10 @@ # 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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_sizeof_off_t=4 @@ -13011,29 +13236,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_sizeof_off_t=`cat conftestval` 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_off_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 @@ -13041,16 +13269,16 @@ fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; } +{ $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 -{ 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; } +{ $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 @@ -13059,18 +13287,18 @@ #define HAVE_LARGEFILE_SUPPORT 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:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "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; } +{ $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_sizeof_time_t=4 @@ -13097,29 +13325,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_sizeof_time_t=`cat conftestval` 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_time_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 @@ -13127,8 +13358,8 @@ fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_time_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_TIME_T $ac_cv_sizeof_time_t @@ -13145,8 +13376,8 @@ elif test "$ac_cv_pthread" = "yes" then CC="$CC -pthread" fi -{ echo "$as_me:$LINENO: checking for pthread_t" >&5 -echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; } +{ $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. */ @@ -13169,34 +13400,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_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_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 + $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_pthread_t" >&5 -echo "${ECHO_T}$have_pthread_t" >&6; } +{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5 +$as_echo "$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; } + { $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 - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_sizeof_pthread_t=4 @@ -13223,29 +13455,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_sizeof_pthread_t=`cat conftestval` 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 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 @@ -13253,8 +13488,8 @@ fi - { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 +$as_echo "$ac_cv_sizeof_pthread_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t @@ -13323,29 +13558,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_osx_32bit=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_osx_32bit=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 @@ -13360,8 +13598,8 @@ MACOSX_DEFAULT_ARCH="ppc" ;; *) - { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 -echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -13374,8 +13612,8 @@ MACOSX_DEFAULT_ARCH="ppc64" ;; *) - { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 -echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -13388,8 +13626,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" @@ -13400,21 +13638,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/*) @@ -13422,12 +13660,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 @@ -13439,8 +13677,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 @@ -13465,8 +13703,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 @@ -13477,8 +13715,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 @@ -13574,19 +13812,18 @@ else LDSHARED='$(CC) -G' fi;; SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';; - Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; atheos*) LDSHARED="gcc -shared";; *) 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 @@ -13613,7 +13850,6 @@ then CCSHARED="-fPIC" else CCSHARED="-Kpic -belf" fi;; - Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; *) CCSHARED="";; @@ -13621,12 +13857,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 @@ -13673,13 +13909,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 @@ -13691,8 +13927,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). @@ -13703,22 +13939,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" @@ -13750,33 +13986,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 @@ -13786,10 +14026,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" @@ -13821,33 +14061,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 @@ -13859,10 +14103,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 @@ -13900,26 +14144,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 @@ -13934,8 +14182,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" @@ -13947,10 +14195,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" @@ -13982,33 +14230,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 @@ -14020,8 +14272,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 @@ -14043,43 +14295,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" @@ -14111,40 +14367,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" @@ -14176,56 +14436,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 @@ -14233,41 +14497,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 @@ -14278,8 +14542,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="" @@ -14293,22 +14557,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 @@ -14321,8 +14585,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 @@ -14341,8 +14605,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" @@ -14408,8 +14672,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 @@ -14429,27 +14693,27 @@ else unistd_defines_pthreads=no fi -rm -f -r conftest* +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 @@ -14465,32 +14729,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 @@ -14504,51 +14769,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/ ## @@ -14557,18 +14823,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 @@ -14587,17 +14853,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 @@ -14613,32 +14879,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 @@ -14652,51 +14919,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/ ## @@ -14705,18 +14973,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 @@ -14733,13 +15001,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 @@ -14752,16 +15020,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 @@ -14786,21 +15054,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 @@ -14808,15 +15079,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. */ @@ -14869,32 +15140,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 @@ -14904,17 +15179,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 @@ -14930,32 +15205,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 @@ -14969,51 +15245,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/ ## @@ -15022,18 +15299,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 @@ -15046,10 +15323,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" @@ -15081,33 +15358,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 @@ -15117,10 +15398,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" @@ -15152,33 +15433,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 @@ -15188,10 +15473,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" @@ -15223,33 +15508,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 @@ -15259,10 +15548,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" @@ -15294,33 +15583,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 @@ -15347,6 +15640,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 @@ -15358,10 +15652,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" @@ -15393,33 +15687,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 @@ -15431,10 +15729,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" @@ -15466,33 +15764,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 @@ -15545,10 +15847,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 @@ -15578,29 +15880,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 @@ -15608,8 +15913,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 @@ -15620,11 +15925,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. */ @@ -15677,35 +15982,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*) @@ -15725,18 +16037,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 @@ -15747,8 +16059,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 @@ -15776,41 +16088,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 @@ -15834,26 +16149,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 @@ -15875,8 +16191,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 @@ -15897,7 +16213,7 @@ $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f -r conftest* +rm -f conftest* ;; kame) @@ -15920,7 +16236,7 @@ ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f -r conftest* +rm -f conftest* ;; linux-glibc) @@ -15941,7 +16257,7 @@ ipv6type=$i; ipv6trylibc=yes fi -rm -f -r conftest* +rm -f conftest* ;; linux-inet6) @@ -15979,7 +16295,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f -r conftest* +rm -f conftest* ;; v6d) @@ -16002,7 +16318,7 @@ ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f -r conftest* +rm -f conftest* ;; zeta) @@ -16024,7 +16340,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f -r conftest* +rm -f conftest* ;; esac @@ -16032,8 +16348,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 @@ -16052,8 +16368,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 @@ -16075,13 +16391,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 @@ -16091,22 +16408,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 @@ -16125,12 +16442,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 @@ -16142,20 +16459,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 @@ -16174,12 +16491,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 @@ -16191,14 +16508,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 @@ -16211,11 +16528,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. */ @@ -16268,35 +16585,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 @@ -16306,8 +16630,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 @@ -16331,8 +16655,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 @@ -16345,16 +16669,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 @@ -16461,11 +16785,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. */ @@ -16518,35 +16842,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 @@ -16555,8 +16886,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 @@ -16578,13 +16909,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 @@ -16594,20 +16926,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 @@ -16629,13 +16961,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 @@ -16645,20 +16978,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 @@ -16680,13 +17013,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 @@ -16696,20 +17030,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 @@ -16731,13 +17065,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 @@ -16747,20 +17082,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 @@ -16782,13 +17117,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 @@ -16798,20 +17134,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 @@ -16833,13 +17169,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 @@ -16849,20 +17186,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 @@ -16884,13 +17221,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 @@ -16900,20 +17238,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 @@ -16938,13 +17276,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 @@ -16954,14 +17293,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 @@ -16972,8 +17311,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 @@ -16998,13 +17337,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 @@ -17014,21 +17354,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 @@ -17053,13 +17393,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 @@ -17069,21 +17410,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 @@ -17108,13 +17449,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 @@ -17124,14 +17466,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 @@ -17141,10 +17483,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. @@ -17157,7 +17499,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 @@ -17168,11 +17510,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 @@ -17181,10 +17523,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" @@ -17216,40 +17558,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" @@ -17281,33 +17627,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 @@ -17322,14 +17672,16 @@ # 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; } +{ $as_echo "$as_me:$LINENO: checking for chflags" >&5 +$as_echo_n "checking for chflags... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $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 test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17354,50 +17706,55 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_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; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } 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; } 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; } +{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5 +$as_echo_n "checking for lchflags... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $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 test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17422,37 +17779,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 cat >>confdefs.h <<\_ACEOF #define HAVE_LCHFLAGS 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: 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; } 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 @@ -17467,10 +17827,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" @@ -17502,33 +17862,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 @@ -17544,8 +17908,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 @@ -17570,39 +17934,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 @@ -17630,39 +17998,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 @@ -17690,13 +18062,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 @@ -17706,22 +18079,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 @@ -17749,13 +18122,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 @@ -17765,14 +18139,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 @@ -17783,11 +18157,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. */ @@ -17840,42 +18214,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" @@ -17907,42 +18288,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" @@ -17974,33 +18359,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 @@ -18017,11 +18406,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. */ @@ -18074,42 +18463,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" @@ -18141,42 +18537,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" @@ -18208,33 +18608,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 @@ -18253,11 +18657,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. */ @@ -18310,35 +18714,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 @@ -18354,11 +18765,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. */ @@ -18411,35 +18822,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 @@ -18451,11 +18869,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. */ @@ -18508,35 +18926,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 @@ -18553,11 +18978,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. */ @@ -18610,35 +19035,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. */ @@ -18661,13 +19093,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 @@ -18679,7 +19112,7 @@ else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -18693,11 +19126,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. */ @@ -18750,35 +19183,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. */ @@ -18801,13 +19241,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 @@ -18819,7 +19260,7 @@ else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -18833,11 +19274,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. */ @@ -18890,35 +19331,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. */ @@ -18941,20 +19389,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 @@ -18971,8 +19420,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 @@ -19004,44 +19453,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 @@ -19070,26 +19523,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_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; } -{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 -echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +{ $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 +$as_echo_n "checking getaddrinfo bug... " >&6; } if test "$cross_compiling" = yes; then - { echo "$as_me:$LINENO: result: buggy" >&5 -echo "${ECHO_T}buggy" >&6; } + { $as_echo "$as_me:$LINENO: result: buggy" >&5 +$as_echo "buggy" >&6; } buggygetaddrinfo=yes else cat >conftest.$ac_ext <<_ACEOF @@ -19192,48 +19648,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_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; } + { $as_echo "$as_me:$LINENO: result: good" >&5 +$as_echo "good" >&6; } buggygetaddrinfo=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; } +{ $as_echo "$as_me:$LINENO: result: buggy" >&5 +$as_echo "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 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; } buggygetaddrinfo=yes fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext @@ -19253,11 +19713,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. */ @@ -19310,35 +19770,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 @@ -19346,10 +19813,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. */ @@ -19376,20 +19843,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 @@ -19397,8 +19865,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 @@ -19407,10 +19875,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. */ @@ -19426,7 +19894,7 @@ { struct tm tm; int *p = &tm.tm_sec; - return !p; + return !p; ; return 0; } @@ -19437,20 +19905,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 @@ -19458,8 +19927,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 @@ -19468,10 +19937,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. */ @@ -19499,20 +19968,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 @@ -19541,20 +20011,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 @@ -19565,9 +20036,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 @@ -19583,10 +20054,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. */ @@ -19613,20 +20084,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 @@ -19634,9 +20106,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 @@ -19652,10 +20124,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. */ @@ -19682,31 +20154,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 @@ -19716,10 +20192,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. */ @@ -19744,20 +20220,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 @@ -19783,20 +20260,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 @@ -19807,9 +20285,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 @@ -19818,10 +20296,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. */ @@ -19846,20 +20324,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 @@ -19885,20 +20364,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 @@ -19909,9 +20389,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 @@ -19920,10 +20400,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. */ @@ -19948,20 +20428,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 @@ -19987,20 +20468,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 @@ -20011,9 +20493,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 @@ -20022,10 +20504,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. */ @@ -20050,20 +20532,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 @@ -20089,20 +20572,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 @@ -20113,9 +20597,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 @@ -20124,10 +20608,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. */ @@ -20152,20 +20636,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 @@ -20191,20 +20676,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 @@ -20215,9 +20701,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 @@ -20226,10 +20712,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. */ @@ -20254,20 +20740,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 @@ -20293,20 +20780,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 @@ -20317,9 +20805,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 @@ -20341,10 +20829,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. */ @@ -20367,20 +20855,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 @@ -20389,8 +20878,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 @@ -20400,8 +20889,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 @@ -20427,13 +20916,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 @@ -20447,20 +20937,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. */ @@ -20484,20 +20974,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 @@ -20506,8 +20997,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 @@ -20516,10 +21007,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. */ @@ -20544,20 +21035,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 @@ -20566,8 +21058,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 @@ -20579,10 +21071,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. */ @@ -20607,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_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 @@ -20628,8 +21121,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 @@ -20637,10 +21130,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. */ @@ -20712,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_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 @@ -20733,20 +21227,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 @@ -20768,37 +21262,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 @@ -20820,37 +21315,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 @@ -20872,13 +21368,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 @@ -20892,19 +21389,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 @@ -20936,13 +21433,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 @@ -20956,19 +21454,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 @@ -20993,13 +21491,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 @@ -21009,22 +21508,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 @@ -21048,37 +21547,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 @@ -21106,20 +21606,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 @@ -21133,17 +21634,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. */ @@ -21196,39 +21697,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 @@ -21262,13 +21767,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 @@ -21283,18 +21789,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 @@ -21326,13 +21832,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 @@ -21347,18 +21854,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 @@ -21388,13 +21895,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 @@ -21409,16 +21917,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 @@ -21438,11 +21946,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. */ @@ -21495,35 +22003,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 @@ -21542,10 +22057,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. */ @@ -21598,39 +22113,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" @@ -21662,33 +22181,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 @@ -21702,8 +22225,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 @@ -21715,14 +22238,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 @@ -21732,53 +22255,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 @@ -21786,10 +22309,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 @@ -21818,37 +22341,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 @@ -21858,10 +22384,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 @@ -21890,37 +22416,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 @@ -21934,10 +22463,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 @@ -21966,37 +22495,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 @@ -22016,8 +22548,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 @@ -22043,28 +22575,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 @@ -22080,8 +22613,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" @@ -22121,36 +22654,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 @@ -22169,10 +22705,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 @@ -22203,37 +22739,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 @@ -22254,11 +22793,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. */ @@ -22311,44 +22850,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. */ @@ -22375,20 +22921,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 @@ -22396,9 +22943,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 @@ -22412,10 +22959,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. */ @@ -22442,20 +22989,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 @@ -22463,9 +23011,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 @@ -22479,10 +23027,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. */ @@ -22509,20 +23057,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 @@ -22530,9 +23079,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 @@ -22552,14 +23101,16 @@ 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; } +{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 +$as_echo_n "checking for broken sem_getvalue... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $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 test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22596,30 +23147,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 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } 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; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_SEM_GETVALUE 1 @@ -22627,14 +23180,15 @@ 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 # 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 @@ -22645,12 +23199,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 @@ -22658,24 +23212,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 @@ -22691,32 +23245,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 @@ -22730,51 +23285,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/ ## @@ -22783,18 +23339,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 @@ -22813,69 +23369,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. @@ -22887,11 +23388,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 ; @@ -22904,13 +23404,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 @@ -22925,11 +23426,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 ; @@ -22942,20 +23442,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` @@ -22969,7 +23470,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 @@ -22980,11 +23481,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 ; @@ -22997,13 +23497,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 @@ -23018,11 +23519,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 ; @@ -23035,20 +23535,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` @@ -23062,7 +23563,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= @@ -23083,11 +23584,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 ; @@ -23100,20 +23600,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` @@ -23124,11 +23625,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 ;; @@ -23142,9 +23645,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 @@ -23154,20 +23656,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; ; @@ -23180,43 +23684,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; } @@ -23227,8 +23736,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. */ @@ -23255,13 +23764,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 @@ -23275,24 +23785,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 @@ -23319,41 +23829,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 @@ -23403,49 +23916,195 @@ #define PY_UNICODE_TYPE wchar_t _ACEOF -elif test "$ac_cv_sizeof_short" = "$unicode_size" -then - PY_UNICODE_TYPE="unsigned short" - cat >>confdefs.h <<\_ACEOF -#define PY_UNICODE_TYPE unsigned short +elif test "$ac_cv_sizeof_short" = "$unicode_size" +then + PY_UNICODE_TYPE="unsigned short" + cat >>confdefs.h <<\_ACEOF +#define PY_UNICODE_TYPE unsigned short +_ACEOF + +elif test "$ac_cv_sizeof_long" = "$unicode_size" +then + 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; } + +# 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 -elif test "$ac_cv_sizeof_long" = "$unicode_size" -then - PY_UNICODE_TYPE="unsigned long" - cat >>confdefs.h <<\_ACEOF -#define PY_UNICODE_TYPE unsigned long -_ACEOF + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - PY_UNICODE_TYPE="no type found" + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 -echo "${ECHO_T}$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; } -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; @@ -23457,33 +24116,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; @@ -23495,20 +24154,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 @@ -23516,29 +24176,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; } @@ -23549,30 +24224,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 @@ -23591,14 +24267,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; @@ -23610,63 +24286,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 @@ -23691,37 +24374,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 @@ -23732,10 +24418,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 @@ -23764,32 +24450,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 @@ -23807,8 +24497,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" @@ -23844,26 +24534,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 @@ -23873,11 +24567,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 @@ -23886,10 +24580,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" @@ -23921,33 +24615,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 @@ -23970,20 +24668,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 @@ -24009,15 +24708,15 @@ _ACEOF fi -rm -f -r conftest* +rm -f conftest* 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" @@ -24049,33 +24748,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 @@ -24085,10 +24788,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" @@ -24120,33 +24823,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 @@ -24156,10 +24863,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" @@ -24191,33 +24898,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 @@ -24240,20 +24951,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 @@ -24279,17 +24991,17 @@ _ACEOF fi -rm -f -r conftest* +rm -f conftest* fi # 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 @@ -24317,37 +25029,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 @@ -24357,8 +25072,8 @@ fi -{ echo "$as_me:$LINENO: checking for broken poll()" >&5 -echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5 +$as_echo_n "checking for broken poll()... " >&6; } if test "$cross_compiling" = yes; then ac_cv_broken_poll=no else @@ -24400,35 +25115,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_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; } +{ $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 @@ -24441,10 +25159,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. */ @@ -24472,20 +25190,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 @@ -24514,20 +25233,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 @@ -24538,9 +25258,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 @@ -24556,10 +25276,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. */ @@ -24586,20 +25306,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 @@ -24607,9 +25328,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 @@ -24625,10 +25346,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. */ @@ -24655,31 +25376,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 @@ -24691,10 +25416,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 @@ -24777,37 +25502,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 @@ -24818,10 +25546,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. */ @@ -24847,20 +25575,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 @@ -24869,8 +25598,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 @@ -24881,10 +25610,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. */ @@ -24910,20 +25639,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 @@ -24932,8 +25662,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 @@ -24944,10 +25674,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. */ @@ -24973,20 +25703,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 @@ -24995,8 +25726,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 @@ -25007,10 +25738,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. */ @@ -25036,20 +25767,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 @@ -25058,8 +25790,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 @@ -25071,8 +25803,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 @@ -25094,13 +25826,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 @@ -25110,21 +25843,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 @@ -25146,13 +25879,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 @@ -25162,21 +25896,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 @@ -25198,13 +25932,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 @@ -25214,61 +25949,63 @@ #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; } +{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 +$as_echo_n "checking for %zd printf() format support... " >&6; } if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + { { $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 test program while cross compiling See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling +$as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25317,47 +26054,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>&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; } cat >>confdefs.h <<\_ACEOF #define PY_FORMAT_SIZE_T "z" _ACEOF 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; } 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; } +{ $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 @@ -25372,14 +26113,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; } @@ -25390,30 +26170,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 @@ -25424,8 +26213,8 @@ fi -{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 -echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 +$as_echo_n "checking for broken mbstowcs... " >&6; } if test "$cross_compiling" = yes; then ac_cv_broken_mbstowcs=no else @@ -25451,35 +26240,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_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; } +{ $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 @@ -25490,8 +26282,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 @@ -25503,14 +26295,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 @@ -25524,15 +26316,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" @@ -25564,11 +26356,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 @@ -25601,12 +26394,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 @@ -25622,7 +26415,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" @@ -25634,12 +26427,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. @@ -25652,7 +26447,7 @@ SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -25662,7 +26457,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 @@ -25684,17 +26479,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. @@ -25710,8 +26533,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. @@ -25734,7 +26555,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 @@ -25747,17 +26568,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 && @@ -25779,7 +26593,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 @@ -25830,7 +26644,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 @@ -25858,7 +26672,6 @@ *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -25871,19 +26684,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 @@ -25908,10 +26724,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 @@ -25934,7 +26750,7 @@ # values after options handling. ac_log=" This file was extended by python $as_me 3.1, 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 @@ -25947,29 +26763,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 @@ -25980,24 +26806,24 @@ Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ python config.status 3.1 -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 @@ -26019,30 +26845,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; }; } ;; @@ -26061,30 +26893,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 @@ -26099,8 +26933,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 @@ -26140,224 +26974,145 @@ (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=' +' +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 @@ -26373,19 +27128,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;; @@ -26414,26 +27283,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 @@ -26443,7 +27324,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 @@ -26469,7 +27350,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" @@ -26478,7 +27359,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 @@ -26499,17 +27380,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/ ;; @@ -26549,12 +27430,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 } @@ -26563,13 +27445,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 @@ -26583,15 +27466,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 @@ -26601,119 +27485,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" ;; @@ -26727,6 +27550,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. @@ -26748,6 +27576,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/release31-maint/configure.in ============================================================================== --- python/branches/release31-maint/configure.in (original) +++ python/branches/release31-maint/configure.in Sat Sep 12 00:36:27 2009 @@ -225,7 +225,7 @@ if test -z "$MACHDEP" then ac_sys_system=`uname -s` - if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \ + if test "$ac_sys_system" = "AIX" \ -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then ac_sys_release=`uname -v` else @@ -407,9 +407,6 @@ case $ac_sys_system in AIX*) CC=cc_r without_gcc=;; - Monterey*) - RANLIB=: - without_gcc=;; *) without_gcc=no;; esac]) AC_MSG_RESULT($without_gcc) @@ -531,10 +528,6 @@ 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 AC_DEFINE(__EXTENSIONS__, 1, [Defined on Solaris to see additional function prototypes.]) @@ -595,8 +588,6 @@ 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. @@ -846,15 +837,6 @@ 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 AC_SUBST(BASECFLAGS) @@ -1751,7 +1733,6 @@ else LDSHARED='$(CC) -G' fi;; SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';; - Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; atheos*) LDSHARED="gcc -shared";; *) LDSHARED="ld";; @@ -1788,7 +1769,6 @@ then CCSHARED="-fPIC" else CCSHARED="-Kpic -belf" fi;; - Monterey*) CCSHARED="-G";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; *) CCSHARED="";; Modified: python/branches/release31-maint/pyconfig.h.in ============================================================================== --- python/branches/release31-maint/pyconfig.h.in (original) +++ python/branches/release31-maint/pyconfig.h.in Sat Sep 12 00:36:27 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 @@ -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 Sat Sep 12 03:52:05 2009 From: python-checkins at python.org (ezio.melotti) Date: Sat, 12 Sep 2009 01:52:05 -0000 Subject: [Python-checkins] r74748 - python/branches/py3k/Doc/library/collections.rst Message-ID: Author: ezio.melotti Date: Sat Sep 12 03:52:05 2009 New Revision: 74748 Log: d.items() -> list(d.items()) in the examples Modified: python/branches/py3k/Doc/library/collections.rst Modified: python/branches/py3k/Doc/library/collections.rst ============================================================================== --- python/branches/py3k/Doc/library/collections.rst (original) +++ python/branches/py3k/Doc/library/collections.rst Sat Sep 12 03:52:05 2009 @@ -538,7 +538,7 @@ >>> for k, v in s: ... d[k].append(v) ... - >>> d.items() + >>> list(d.items()) [('blue', [2, 4]), ('red', [1]), ('yellow', [1, 3])] When each key is encountered for the first time, it is not already in the @@ -553,7 +553,7 @@ >>> for k, v in s: ... d.setdefault(k, []).append(v) ... - >>> d.items() + >>> list(d.items()) [('blue', [2, 4]), ('red', [1]), ('yellow', [1, 3])] Setting the :attr:`default_factory` to :class:`int` makes the @@ -565,7 +565,7 @@ >>> for k in s: ... d[k] += 1 ... - >>> d.items() + >>> list(d.items()) [('i', 4), ('p', 2), ('s', 4), ('m', 1)] When a letter is first encountered, it is missing from the mapping, so the @@ -592,7 +592,7 @@ >>> for k, v in s: ... d[k].add(v) ... - >>> d.items() + >>> list(d.items()) [('blue', set([2, 4])), ('red', set([1, 3]))] From python-checkins at python.org Sat Sep 12 05:09:03 2009 From: python-checkins at python.org (r.david.murray) Date: Sat, 12 Sep 2009 03:09:03 -0000 Subject: [Python-checkins] r74749 - python/branches/py3k/Doc/howto/unicode.rst Message-ID: Author: r.david.murray Date: Sat Sep 12 05:09:02 2009 New Revision: 74749 Log: Fix typo. Modified: python/branches/py3k/Doc/howto/unicode.rst Modified: python/branches/py3k/Doc/howto/unicode.rst ============================================================================== --- python/branches/py3k/Doc/howto/unicode.rst (original) +++ python/branches/py3k/Doc/howto/unicode.rst Sat Sep 12 05:09:02 2009 @@ -543,7 +543,7 @@ The first list contains UTF-8-encoded filenames, and the second list contains the Unicode versions. -Note that in most occasions, the Uniode APIs should be used. The bytes APIs +Note that in most occasions, the Unicode APIs should be used. The bytes APIs should only be used on systems where undecodable file names can be present, i.e. Unix systems. From nnorwitz at gmail.com Sat Sep 12 11:42:34 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sat, 12 Sep 2009 05:42:34 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090912094234.GA6326@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 0, 339] references, sum=339 Less important issues: ---------------------- test_asynchat leaked [0, 130, -130] references, sum=0 test_smtplib leaked [4, 88, 72] references, sum=164 test_socketserver leaked [0, 80, -80] references, sum=0 test_sys leaked [0, 42, -21] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 From python-checkins at python.org Sat Sep 12 12:28:21 2009 From: python-checkins at python.org (lars.gustaebel) Date: Sat, 12 Sep 2009 10:28:21 -0000 Subject: [Python-checkins] r74750 - in python/trunk: Doc/library/tarfile.rst Lib/tarfile.py Lib/test/test_tarfile.py Misc/NEWS Message-ID: Author: lars.gustaebel Date: Sat Sep 12 12:28:15 2009 New Revision: 74750 Log: Issue #6856: Add a filter keyword argument to TarFile.add(). The filter argument must be a function that takes a TarInfo object argument, changes it and returns it again. If the function returns None the TarInfo object will be excluded from the archive. The exclude argument is deprecated from now on, because it does something similar but is not as flexible. Modified: python/trunk/Doc/library/tarfile.rst python/trunk/Lib/tarfile.py python/trunk/Lib/test/test_tarfile.py python/trunk/Misc/NEWS Modified: python/trunk/Doc/library/tarfile.rst ============================================================================== --- python/trunk/Doc/library/tarfile.rst (original) +++ python/trunk/Doc/library/tarfile.rst Sat Sep 12 12:28:15 2009 @@ -389,7 +389,7 @@ and :meth:`close`, and also supports iteration over its lines. -.. method:: TarFile.add(name, arcname=None, recursive=True, exclude=None) +.. method:: TarFile.add(name, arcname=None, recursive=True, exclude=None, filter=None) Add the file *name* to the archive. *name* may be any type of file (directory, fifo, symbolic link, etc.). If given, *arcname* specifies an alternative name @@ -397,11 +397,22 @@ can be avoided by setting *recursive* to :const:`False`. If *exclude* is given it must be a function that takes one filename argument and returns a boolean value. Depending on this value the respective file is either excluded - (:const:`True`) or added (:const:`False`). + (:const:`True`) or added (:const:`False`). If *filter* is specified it must + be a function that takes a :class:`TarInfo` object argument and returns the + changed TarInfo object. If it instead returns :const:`None` the TarInfo + object will be excluded from the archive. See :ref:`tar-examples` for an + example. .. versionchanged:: 2.6 Added the *exclude* parameter. + .. versionchanged:: 2.7 + Added the *filter* parameter. + + .. deprecated:: 2.7 + The *exclude* parameter is deprecated, please use the *filter* parameter + instead. + .. method:: TarFile.addfile(tarinfo, fileobj=None) @@ -653,6 +664,18 @@ print "something else." tar.close() +How to create an archive and reset the user information using the *filter* +parameter in :meth:`TarFile.add`:: + + import tarfile + def reset(tarinfo): + tarinfo.uid = tarinfo.gid = 0 + tarinfo.uname = tarinfo.gname = "root" + return tarinfo + tar = tarfile.open("sample.tar.gz", "w:gz") + tar.add("foo", filter=reset) + tar.close() + .. _tar-formats: Modified: python/trunk/Lib/tarfile.py ============================================================================== --- python/trunk/Lib/tarfile.py (original) +++ python/trunk/Lib/tarfile.py Sat Sep 12 12:28:15 2009 @@ -1918,13 +1918,16 @@ print "link to", tarinfo.linkname, print - def add(self, name, arcname=None, recursive=True, exclude=None): + def add(self, name, arcname=None, recursive=True, exclude=None, filter=None): """Add the file `name' to the archive. `name' may be any type of file (directory, fifo, symbolic link, etc.). If given, `arcname' specifies an alternative name for the file in the archive. Directories are added recursively by default. This can be avoided by setting `recursive' to False. `exclude' is a function that should - return True for each filename to be excluded. + return True for each filename to be excluded. `filter' is a function + that expects a TarInfo object argument and returns the changed + TarInfo object, if it returns None the TarInfo object will be + excluded from the archive. """ self._check("aw") @@ -1932,9 +1935,13 @@ arcname = name # Exclude pathnames. - if exclude is not None and exclude(name): - self._dbg(2, "tarfile: Excluded %r" % name) - return + if exclude is not None: + import warnings + warnings.warn("use the filter argument instead", + DeprecationWarning, 2) + if exclude(name): + self._dbg(2, "tarfile: Excluded %r" % name) + return # Skip if somebody tries to archive the archive... if self.name is not None and os.path.abspath(name) == self.name: @@ -1950,6 +1957,13 @@ self._dbg(1, "tarfile: Unsupported type %r" % name) return + # Change or exclude the TarInfo object. + if filter is not None: + tarinfo = filter(tarinfo) + if tarinfo is None: + self._dbg(2, "tarfile: Excluded %r" % name) + return + # Append the tar header and data to the archive. if tarinfo.isreg(): f = bltn_open(name, "rb") @@ -1960,7 +1974,8 @@ self.addfile(tarinfo) if recursive: for f in os.listdir(name): - self.add(os.path.join(name, f), os.path.join(arcname, f), recursive, exclude) + self.add(os.path.join(name, f), os.path.join(arcname, f), + recursive, exclude, filter) else: self.addfile(tarinfo) Modified: python/trunk/Lib/test/test_tarfile.py ============================================================================== --- python/trunk/Lib/test/test_tarfile.py (original) +++ python/trunk/Lib/test/test_tarfile.py Sat Sep 12 12:28:15 2009 @@ -660,6 +660,34 @@ finally: shutil.rmtree(tempdir) + def test_filter(self): + tempdir = os.path.join(TEMPDIR, "filter") + os.mkdir(tempdir) + try: + for name in ("foo", "bar", "baz"): + name = os.path.join(tempdir, name) + open(name, "wb").close() + + def filter(tarinfo): + if os.path.basename(tarinfo.name) == "bar": + return + tarinfo.uid = 123 + tarinfo.uname = "foo" + return tarinfo + + tar = tarfile.open(tmpname, self.mode, encoding="iso8859-1") + tar.add(tempdir, arcname="empty_dir", filter=filter) + tar.close() + + tar = tarfile.open(tmpname, "r") + for tarinfo in tar: + self.assertEqual(tarinfo.uid, 123) + self.assertEqual(tarinfo.uname, "foo") + self.assertEqual(len(tar.getmembers()), 3) + tar.close() + finally: + shutil.rmtree(tempdir) + # Guarantee that stored pathnames are not modified. Don't # remove ./ or ../ or double slashes. Still make absolute # pathnames relative. Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Sep 12 12:28:15 2009 @@ -366,6 +366,8 @@ Library ------- +- Issue #6856: Add a filter keyword argument to TarFile.add(). + - Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and Michael Haubenwallner. From python-checkins at python.org Sat Sep 12 12:44:01 2009 From: python-checkins at python.org (lars.gustaebel) Date: Sat, 12 Sep 2009 10:44:01 -0000 Subject: [Python-checkins] r74751 - in python/branches/py3k: Doc/library/tarfile.rst Lib/tarfile.py Lib/test/test_tarfile.py Misc/NEWS Message-ID: Author: lars.gustaebel Date: Sat Sep 12 12:44:00 2009 New Revision: 74751 Log: Merged revisions 74750 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74750 | lars.gustaebel | 2009-09-12 12:28:15 +0200 (Sat, 12 Sep 2009) | 9 lines Issue #6856: Add a filter keyword argument to TarFile.add(). The filter argument must be a function that takes a TarInfo object argument, changes it and returns it again. If the function returns None the TarInfo object will be excluded from the archive. The exclude argument is deprecated from now on, because it does something similar but is not as flexible. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/tarfile.rst python/branches/py3k/Lib/tarfile.py python/branches/py3k/Lib/test/test_tarfile.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Doc/library/tarfile.rst ============================================================================== --- python/branches/py3k/Doc/library/tarfile.rst (original) +++ python/branches/py3k/Doc/library/tarfile.rst Sat Sep 12 12:44:00 2009 @@ -357,7 +357,7 @@ and :meth:`close`, and also supports iteration over its lines. -.. method:: TarFile.add(name, arcname=None, recursive=True, exclude=None) +.. method:: TarFile.add(name, arcname=None, recursive=True, exclude=None, filter=None) Add the file *name* to the archive. *name* may be any type of file (directory, fifo, symbolic link, etc.). If given, *arcname* specifies an alternative name @@ -365,7 +365,18 @@ can be avoided by setting *recursive* to :const:`False`. If *exclude* is given, it must be a function that takes one filename argument and returns a boolean value. Depending on this value the respective file is either excluded - (:const:`True`) or added (:const:`False`). + (:const:`True`) or added (:const:`False`). If *filter* is specified it must + be a function that takes a :class:`TarInfo` object argument and returns the + changed TarInfo object. If it instead returns :const:`None` the TarInfo + object will be excluded from the archive. See :ref:`tar-examples` for an + example. + + .. versionchanged:: 3.2 + Added the *filter* parameter. + + .. deprecated:: 3.2 + The *exclude* parameter is deprecated, please use the *filter* parameter + instead. .. method:: TarFile.addfile(tarinfo, fileobj=None) @@ -598,6 +609,18 @@ print("something else.") tar.close() +How to create an archive and reset the user information using the *filter* +parameter in :meth:`TarFile.add`:: + + import tarfile + def reset(tarinfo): + tarinfo.uid = tarinfo.gid = 0 + tarinfo.uname = tarinfo.gname = "root" + return tarinfo + tar = tarfile.open("sample.tar.gz", "w:gz") + tar.add("foo", filter=reset) + tar.close() + .. _tar-formats: Modified: python/branches/py3k/Lib/tarfile.py ============================================================================== --- python/branches/py3k/Lib/tarfile.py (original) +++ python/branches/py3k/Lib/tarfile.py Sat Sep 12 12:44:00 2009 @@ -1898,13 +1898,16 @@ print("link to", tarinfo.linkname, end=' ') print() - def add(self, name, arcname=None, recursive=True, exclude=None): + def add(self, name, arcname=None, recursive=True, exclude=None, filter=None): """Add the file `name' to the archive. `name' may be any type of file (directory, fifo, symbolic link, etc.). If given, `arcname' specifies an alternative name for the file in the archive. Directories are added recursively by default. This can be avoided by setting `recursive' to False. `exclude' is a function that should - return True for each filename to be excluded. + return True for each filename to be excluded. `filter' is a function + that expects a TarInfo object argument and returns the changed + TarInfo object, if it returns None the TarInfo object will be + excluded from the archive. """ self._check("aw") @@ -1912,9 +1915,13 @@ arcname = name # Exclude pathnames. - if exclude is not None and exclude(name): - self._dbg(2, "tarfile: Excluded %r" % name) - return + if exclude is not None: + import warnings + warnings.warn("use the filter argument instead", + DeprecationWarning, 2) + if exclude(name): + self._dbg(2, "tarfile: Excluded %r" % name) + return # Skip if somebody tries to archive the archive... if self.name is not None and os.path.abspath(name) == self.name: @@ -1930,6 +1937,13 @@ self._dbg(1, "tarfile: Unsupported type %r" % name) return + # Change or exclude the TarInfo object. + if filter is not None: + tarinfo = filter(tarinfo) + if tarinfo is None: + self._dbg(2, "tarfile: Excluded %r" % name) + return + # Append the tar header and data to the archive. if tarinfo.isreg(): f = bltn_open(name, "rb") @@ -1940,7 +1954,8 @@ self.addfile(tarinfo) if recursive: for f in os.listdir(name): - self.add(os.path.join(name, f), os.path.join(arcname, f), recursive, exclude) + self.add(os.path.join(name, f), os.path.join(arcname, f), + recursive, exclude, filter) else: self.addfile(tarinfo) 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 Sat Sep 12 12:44:00 2009 @@ -659,6 +659,34 @@ finally: shutil.rmtree(tempdir) + def test_filter(self): + tempdir = os.path.join(TEMPDIR, "filter") + os.mkdir(tempdir) + try: + for name in ("foo", "bar", "baz"): + name = os.path.join(tempdir, name) + open(name, "wb").close() + + def filter(tarinfo): + if os.path.basename(tarinfo.name) == "bar": + return + tarinfo.uid = 123 + tarinfo.uname = "foo" + return tarinfo + + tar = tarfile.open(tmpname, self.mode, encoding="iso8859-1") + tar.add(tempdir, arcname="empty_dir", filter=filter) + tar.close() + + tar = tarfile.open(tmpname, "r") + for tarinfo in tar: + self.assertEqual(tarinfo.uid, 123) + self.assertEqual(tarinfo.uname, "foo") + self.assertEqual(len(tar.getmembers()), 3) + tar.close() + finally: + shutil.rmtree(tempdir) + # Guarantee that stored pathnames are not modified. Don't # remove ./ or ../ or double slashes. Still make absolute # pathnames relative. Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sat Sep 12 12:44:00 2009 @@ -70,6 +70,8 @@ Library ------- +- Issue #6856: Add a filter keyword argument to TarFile.add(). + - Issue #6888: pdb's alias command was broken when no arguments were given. - Issue #6857: Default format() alignment should be '>' for Decimal From python-checkins at python.org Sat Sep 12 12:47:57 2009 From: python-checkins at python.org (lars.gustaebel) Date: Sat, 12 Sep 2009 10:47:57 -0000 Subject: [Python-checkins] r74752 - python/branches/release26-maint Message-ID: Author: lars.gustaebel Date: Sat Sep 12 12:47:57 2009 New Revision: 74752 Log: Blocked revisions 74750 via svnmerge ........ r74750 | lars.gustaebel | 2009-09-12 12:28:15 +0200 (Sat, 12 Sep 2009) | 9 lines Issue #6856: Add a filter keyword argument to TarFile.add(). The filter argument must be a function that takes a TarInfo object argument, changes it and returns it again. If the function returns None the TarInfo object will be excluded from the archive. The exclude argument is deprecated from now on, because it does something similar but is not as flexible. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Sat Sep 12 12:49:05 2009 From: python-checkins at python.org (lars.gustaebel) Date: Sat, 12 Sep 2009 10:49:05 -0000 Subject: [Python-checkins] r74753 - python/branches/release31-maint Message-ID: Author: lars.gustaebel Date: Sat Sep 12 12:49:05 2009 New Revision: 74753 Log: Blocked revisions 74751 via svnmerge ................ r74751 | lars.gustaebel | 2009-09-12 12:44:00 +0200 (Sat, 12 Sep 2009) | 16 lines Merged revisions 74750 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74750 | lars.gustaebel | 2009-09-12 12:28:15 +0200 (Sat, 12 Sep 2009) | 9 lines Issue #6856: Add a filter keyword argument to TarFile.add(). The filter argument must be a function that takes a TarInfo object argument, changes it and returns it again. If the function returns None the TarInfo object will be excluded from the archive. The exclude argument is deprecated from now on, because it does something similar but is not as flexible. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Sat Sep 12 16:43:44 2009 From: python-checkins at python.org (ezio.melotti) Date: Sat, 12 Sep 2009 14:43:44 -0000 Subject: [Python-checkins] r74754 - in python/trunk/Lib: distutils/tests/test_archive_util.py distutils/tests/test_bdist_dumb.py distutils/tests/test_sdist.py sqlite3/test/types.py test/test_gzip.py test/test_zipfile.py test/test_zipimport.py Message-ID: Author: ezio.melotti Date: Sat Sep 12 16:43:43 2009 New Revision: 74754 Log: #6026 - fix tests that failed without zlib Modified: python/trunk/Lib/distutils/tests/test_archive_util.py python/trunk/Lib/distutils/tests/test_bdist_dumb.py python/trunk/Lib/distutils/tests/test_sdist.py python/trunk/Lib/sqlite3/test/types.py python/trunk/Lib/test/test_gzip.py python/trunk/Lib/test/test_zipfile.py python/trunk/Lib/test/test_zipimport.py 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 Sat Sep 12 16:43:43 2009 @@ -19,10 +19,18 @@ except ImportError: ZIP_SUPPORT = find_executable('zip') +# some tests will fail if zlib is not available +try: + import zlib +except ImportError: + zlib = None + + class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): + @unittest.skipUnless(zlib, "Requires zlib") def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() @@ -83,6 +91,7 @@ base_name = os.path.join(tmpdir2, 'archive') return tmpdir, tmpdir2, base_name + @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(find_executable('tar') and find_executable('gzip'), 'Need the tar command to run') def test_tarfile_vs_tar(self): @@ -168,6 +177,7 @@ self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) + @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile(self): # creating something to tar 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 Sat Sep 12 16:43:43 2009 @@ -4,6 +4,13 @@ import sys import os +# zlib is not used here, but if it's not available +# test_simple_built will fail +try: + import zlib +except ImportError: + zlib = None + from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support @@ -31,6 +38,7 @@ sys.argv = self.old_sys_argv[:] super(BuildDumbTestCase, self).tearDown() + @unittest.skipUnless(zlib, "requires zlib") def test_simple_built(self): # let's create a simple package Modified: python/trunk/Lib/distutils/tests/test_sdist.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_sdist.py (original) +++ python/trunk/Lib/distutils/tests/test_sdist.py Sat Sep 12 16:43:43 2009 @@ -3,6 +3,14 @@ import unittest import shutil import zipfile + +# zlib is not used here, but if it's not available +# the tests that use zipfile may fail +try: + import zlib +except ImportError: + zlib = None + from os.path import join import sys import tempfile @@ -79,6 +87,7 @@ cmd.warn = _warn return dist, cmd + @unittest.skipUnless(zlib, "requires zlib") def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned @@ -120,6 +129,7 @@ # making sure everything has been pruned correctly self.assertEquals(len(content), 4) + @unittest.skipUnless(zlib, "requires zlib") def test_make_distribution(self): # check if tar and gzip are installed @@ -156,6 +166,7 @@ self.assertEquals(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) + @unittest.skipUnless(zlib, "requires zlib") def test_add_defaults(self): # http://bugs.python.org/issue2279 @@ -217,6 +228,7 @@ manifest = open(join(self.tmp_dir, 'MANIFEST')).read() self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + @unittest.skipUnless(zlib, "requires zlib") def test_metadata_check_option(self): # testing the `medata-check` option dist, cmd = self.get_cmd(metadata={}) Modified: python/trunk/Lib/sqlite3/test/types.py ============================================================================== --- python/trunk/Lib/sqlite3/test/types.py (original) +++ python/trunk/Lib/sqlite3/test/types.py Sat Sep 12 16:43:43 2009 @@ -21,9 +21,14 @@ # misrepresented as being the original software. # 3. This notice may not be removed or altered from any source distribution. -import zlib, datetime +import datetime import unittest import sqlite3 as sqlite +try: + import zlib +except ImportError: + zlib = None + class SqliteTypeTests(unittest.TestCase): def setUp(self): @@ -300,6 +305,7 @@ val = self.cur.fetchone()[0] self.assertEqual(type(val), float) + at unittest.skipUnless(zlib, "requires zlib") class BinaryConverterTests(unittest.TestCase): def convert(s): return zlib.decompress(s) Modified: python/trunk/Lib/test/test_gzip.py ============================================================================== --- python/trunk/Lib/test/test_gzip.py (original) +++ python/trunk/Lib/test/test_gzip.py Sat Sep 12 16:43:43 2009 @@ -5,9 +5,8 @@ import unittest from test import test_support import os -import gzip import struct - +gzip = test_support.import_module('gzip') data1 = """ int length=DEFAULTALLOC, err = Z_OK; PyObject *RetVal; Modified: python/trunk/Lib/test/test_zipfile.py ============================================================================== --- python/trunk/Lib/test/test_zipfile.py (original) +++ python/trunk/Lib/test/test_zipfile.py Sat Sep 12 16:43:43 2009 @@ -311,6 +311,7 @@ self.assertEqual(zipfp.read(TESTFN), file(TESTFN).read()) zipfp.close() + @skipUnless(zlib, "requires zlib") def test_per_file_compression(self): # Check that files within a Zip archive can have different compression options zipfp = zipfile.ZipFile(TESTFN2, "w") @@ -882,6 +883,7 @@ self.zip2.setpassword("perl") self.assertRaises(RuntimeError, self.zip2.read, "zero") + @skipUnless(zlib, "requires zlib") def test_good_password(self): self.zip.setpassword("python") self.assertEquals(self.zip.read("test.txt"), self.plain) @@ -982,6 +984,7 @@ self.zip_random_open_test(f, zipfile.ZIP_STORED) + at skipUnless(zlib, "requires zlib") class TestsWithMultipleOpens(unittest.TestCase): def setUp(self): # Create the ZIP archive Modified: python/trunk/Lib/test/test_zipimport.py ============================================================================== --- python/trunk/Lib/test/test_zipimport.py (original) +++ python/trunk/Lib/test/test_zipimport.py Sat Sep 12 16:43:43 2009 @@ -6,11 +6,17 @@ import time import unittest -import zlib # implied prerequisite -from zipfile import ZipFile, ZipInfo, ZIP_STORED, ZIP_DEFLATED from test import test_support from test.test_importhooks import ImportHooksBaseTestCase, test_src, test_co +# some tests can be ran even without zlib +try: + import zlib +except ImportError: + zlib = None + +from zipfile import ZipFile, ZipInfo, ZIP_STORED, ZIP_DEFLATED + import zipimport import linecache import doctest @@ -53,6 +59,7 @@ TESTPACK2 = "ziptestpackage2" TEMP_ZIP = os.path.abspath("junk95142" + os.extsep + "zip") + class UncompressedZipImportTestCase(ImportHooksBaseTestCase): compression = ZIP_STORED @@ -357,7 +364,6 @@ def testDoctestSuite(self): self.runDoctest(self.doDoctestSuite) - def doTraceback(self, module): try: module.do_raise() @@ -381,6 +387,7 @@ self.doTest(None, files, TESTMOD, call=self.doTraceback) + at unittest.skipUnless(zlib, "requires zlib") class CompressedZipImportTestCase(UncompressedZipImportTestCase): compression = ZIP_DEFLATED From g.brandl at gmx.net Sat Sep 12 17:20:41 2009 From: g.brandl at gmx.net (Georg Brandl) Date: Sat, 12 Sep 2009 15:20:41 +0000 Subject: [Python-checkins] Python Regression Test Failures refleak (1) In-Reply-To: <20090912094234.GA6326@python.psfb.org> References: <20090912094234.GA6326@python.psfb.org> Message-ID: Neal Norwitz schrieb: > More important issues: > ---------------------- > test_ssl leaked [0, 0, 339] references, sum=339 > > Less important issues: > ---------------------- > test_asynchat leaked [0, 130, -130] references, sum=0 > test_smtplib leaked [4, 88, 72] references, sum=164 > test_socketserver leaked [0, 80, -80] references, sum=0 > test_sys leaked [0, 42, -21] references, sum=21 > test_threading leaked [48, 48, 48] references, sum=144 Hmm, this test_threading leak looks suspiciously constant... 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 benjamin at python.org Sat Sep 12 17:35:09 2009 From: benjamin at python.org (Benjamin Peterson) Date: Sat, 12 Sep 2009 10:35:09 -0500 Subject: [Python-checkins] Python Regression Test Failures refleak (1) In-Reply-To: References: <20090912094234.GA6326@python.psfb.org> Message-ID: <1afaf6160909120835x73fda0f4kf4c0d0fc15d2d566@mail.gmail.com> 2009/9/12 Georg Brandl : > Neal Norwitz schrieb: >> More important issues: >> ---------------------- >> test_ssl leaked [0, 0, 339] references, sum=339 >> >> Less important issues: >> ---------------------- >> test_asynchat leaked [0, 130, -130] references, sum=0 >> test_smtplib leaked [4, 88, 72] references, sum=164 >> test_socketserver leaked [0, 80, -80] references, sum=0 >> test_sys leaked [0, 42, -21] references, sum=21 >> test_threading leaked [48, 48, 48] references, sum=144 > > Hmm, this test_threading leak looks suspiciously constant... Something to do with adding weakref support to thread.locK? -- Regards, Benjamin From python-checkins at python.org Sat Sep 12 20:41:21 2009 From: python-checkins at python.org (ezio.melotti) Date: Sat, 12 Sep 2009 18:41:21 -0000 Subject: [Python-checkins] r74755 - in python/branches/py3k: Lib/distutils/tests/test_archive_util.py Lib/distutils/tests/test_bdist_dumb.py Lib/distutils/tests/test_sdist.py Lib/sqlite3/test/types.py Lib/test/test_gzip.py Lib/test/test_zipfile.py Lib/test/test_zipimport.py Message-ID: Author: ezio.melotti Date: Sat Sep 12 20:41:20 2009 New Revision: 74755 Log: Merged revisions 74754 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74754 | ezio.melotti | 2009-09-12 17:43:43 +0300 (Sat, 12 Sep 2009) | 1 line #6026 - fix tests that failed without zlib ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/tests/test_archive_util.py python/branches/py3k/Lib/distutils/tests/test_bdist_dumb.py python/branches/py3k/Lib/distutils/tests/test_sdist.py python/branches/py3k/Lib/sqlite3/test/types.py python/branches/py3k/Lib/test/test_gzip.py python/branches/py3k/Lib/test/test_zipfile.py python/branches/py3k/Lib/test/test_zipimport.py 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 Sat Sep 12 20:41:20 2009 @@ -19,10 +19,18 @@ except ImportError: ZIP_SUPPORT = find_executable('zip') +# some tests will fail if zlib is not available +try: + import zlib +except ImportError: + zlib = None + + class ArchiveUtilTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): + @unittest.skipUnless(zlib, "Requires zlib") def test_make_tarball(self): # creating something to tar tmpdir = self.mkdtemp() @@ -83,6 +91,7 @@ base_name = os.path.join(tmpdir2, 'archive') return tmpdir, tmpdir2, base_name + @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(find_executable('tar') and find_executable('gzip'), 'Need the tar command to run') def test_tarfile_vs_tar(self): @@ -168,6 +177,7 @@ self.assertTrue(not os.path.exists(tarball)) self.assertEquals(len(w.warnings), 1) + @unittest.skipUnless(zlib, "Requires zlib") @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run') def test_make_zipfile(self): # creating something to tar 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 Sat Sep 12 20:41:20 2009 @@ -4,6 +4,13 @@ import sys import os +# zlib is not used here, but if it's not available +# test_simple_built will fail +try: + import zlib +except ImportError: + zlib = None + from distutils.core import Distribution from distutils.command.bdist_dumb import bdist_dumb from distutils.tests import support @@ -31,6 +38,7 @@ sys.argv = self.old_sys_argv[:] super(BuildDumbTestCase, self).tearDown() + @unittest.skipUnless(zlib, "requires zlib") def test_simple_built(self): # let's create a simple package Modified: python/branches/py3k/Lib/distutils/tests/test_sdist.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_sdist.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_sdist.py Sat Sep 12 20:41:20 2009 @@ -3,6 +3,14 @@ import unittest import shutil import zipfile + +# zlib is not used here, but if it's not available +# the tests that use zipfile may fail +try: + import zlib +except ImportError: + zlib = None + from os.path import join import sys import tempfile @@ -79,6 +87,7 @@ cmd.warn = _warn return dist, cmd + @unittest.skipUnless(zlib, "requires zlib") def test_prune_file_list(self): # this test creates a package with some vcs dirs in it # and launch sdist to make sure they get pruned @@ -120,6 +129,7 @@ # making sure everything has been pruned correctly self.assertEquals(len(content), 4) + @unittest.skipUnless(zlib, "requires zlib") def test_make_distribution(self): # check if tar and gzip are installed @@ -156,6 +166,7 @@ self.assertEquals(result, ['fake-1.0.tar', 'fake-1.0.tar.gz']) + @unittest.skipUnless(zlib, "requires zlib") def test_add_defaults(self): # http://bugs.python.org/issue2279 @@ -217,6 +228,7 @@ manifest = open(join(self.tmp_dir, 'MANIFEST')).read() self.assertEquals(manifest, MANIFEST % {'sep': os.sep}) + @unittest.skipUnless(zlib, "requires zlib") def test_metadata_check_option(self): # testing the `medata-check` option dist, cmd = self.get_cmd(metadata={}) 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 Sep 12 20:41:20 2009 @@ -21,9 +21,14 @@ # misrepresented as being the original software. # 3. This notice may not be removed or altered from any source distribution. -import zlib, datetime +import datetime import unittest import sqlite3 as sqlite +try: + import zlib +except ImportError: + zlib = None + class SqliteTypeTests(unittest.TestCase): def setUp(self): @@ -312,6 +317,7 @@ val = self.cur.fetchone()[0] self.assertEqual(type(val), float) + at unittest.skipUnless(zlib, "requires zlib") class BinaryConverterTests(unittest.TestCase): def convert(s): return zlib.decompress(s) 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 Sat Sep 12 20:41:20 2009 @@ -5,9 +5,8 @@ import unittest from test import support import os -import gzip import struct - +gzip = support.import_module('gzip') data1 = b""" int length=DEFAULTALLOC, err = Z_OK; PyObject *RetVal; 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 Sep 12 20:41:20 2009 @@ -307,6 +307,7 @@ self.assertEqual(zipfp.read(TESTFN), open(TESTFN, "rb").read()) zipfp.close() + @skipUnless(zlib, "requires zlib") def test_per_file_compression(self): # Check that files within a Zip archive can have different compression options zipfp = zipfile.ZipFile(TESTFN2, "w") @@ -881,6 +882,7 @@ self.zip2.setpassword(b"perl") self.assertRaises(RuntimeError, self.zip2.read, "zero") + @skipUnless(zlib, "requires zlib") def test_good_password(self): self.zip.setpassword(b"python") self.assertEquals(self.zip.read("test.txt"), self.plain) @@ -982,6 +984,7 @@ self.zip_random_open_test(f, zipfile.ZIP_STORED) + at skipUnless(zlib, "requires zlib") class TestsWithMultipleOpens(unittest.TestCase): def setUp(self): # Create the ZIP archive 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 Sat Sep 12 20:41:20 2009 @@ -6,11 +6,17 @@ import time import unittest -import zlib # implied prerequisite -from zipfile import ZipFile, ZipInfo, ZIP_STORED, ZIP_DEFLATED from test import support from test.test_importhooks import ImportHooksBaseTestCase, test_src, test_co +# some tests can be ran even without zlib +try: + import zlib +except ImportError: + zlib = None + +from zipfile import ZipFile, ZipInfo, ZIP_STORED, ZIP_DEFLATED + import zipimport import linecache import doctest @@ -53,6 +59,7 @@ TESTPACK2 = "ziptestpackage2" TEMP_ZIP = os.path.abspath("junk95142.zip") + class UncompressedZipImportTestCase(ImportHooksBaseTestCase): compression = ZIP_STORED @@ -354,7 +361,6 @@ def testDoctestSuite(self): self.runDoctest(self.doDoctestSuite) - def doTraceback(self, module): try: module.do_raise() @@ -378,6 +384,7 @@ self.doTest(None, files, TESTMOD, call=self.doTraceback) + at unittest.skipUnless(zlib, "requires zlib") class CompressedZipImportTestCase(UncompressedZipImportTestCase): compression = ZIP_DEFLATED From python-checkins at python.org Sat Sep 12 21:50:06 2009 From: python-checkins at python.org (ezio.melotti) Date: Sat, 12 Sep 2009 19:50:06 -0000 Subject: [Python-checkins] r74756 - in python/branches/release31-maint: Doc/library/collections.rst Message-ID: Author: ezio.melotti Date: Sat Sep 12 21:50:05 2009 New Revision: 74756 Log: Merged revisions 74748 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74748 | ezio.melotti | 2009-09-12 04:52:05 +0300 (Sat, 12 Sep 2009) | 1 line d.items() -> list(d.items()) in the examples ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/collections.rst Modified: python/branches/release31-maint/Doc/library/collections.rst ============================================================================== --- python/branches/release31-maint/Doc/library/collections.rst (original) +++ python/branches/release31-maint/Doc/library/collections.rst Sat Sep 12 21:50:05 2009 @@ -538,7 +538,7 @@ >>> for k, v in s: ... d[k].append(v) ... - >>> d.items() + >>> list(d.items()) [('blue', [2, 4]), ('red', [1]), ('yellow', [1, 3])] When each key is encountered for the first time, it is not already in the @@ -553,7 +553,7 @@ >>> for k, v in s: ... d.setdefault(k, []).append(v) ... - >>> d.items() + >>> list(d.items()) [('blue', [2, 4]), ('red', [1]), ('yellow', [1, 3])] Setting the :attr:`default_factory` to :class:`int` makes the @@ -565,7 +565,7 @@ >>> for k in s: ... d[k] += 1 ... - >>> d.items() + >>> list(d.items()) [('i', 4), ('p', 2), ('s', 4), ('m', 1)] When a letter is first encountered, it is missing from the mapping, so the @@ -592,7 +592,7 @@ >>> for k, v in s: ... d[k].add(v) ... - >>> d.items() + >>> list(d.items()) [('blue', set([2, 4])), ('red', set([1, 3]))] From nnorwitz at gmail.com Sat Sep 12 23:50:21 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sat, 12 Sep 2009 17:50:21 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090912215021.GA27283@python.psfb.org> More important issues: ---------------------- test_ssl leaked [339, 0, 0] references, sum=339 Less important issues: ---------------------- test_cmd_line leaked [0, 0, 25] references, sum=25 test_file2k leaked [0, 83, -83] references, sum=0 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 Sun Sep 13 03:59:31 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 13 Sep 2009 01:59:31 -0000 Subject: [Python-checkins] r74757 - python/trunk/Misc/python.man Message-ID: Author: benjamin.peterson Date: Sun Sep 13 03:59:31 2009 New Revision: 74757 Log: update urls Modified: python/trunk/Misc/python.man Modified: python/trunk/Misc/python.man ============================================================================== --- python/trunk/Misc/python.man (original) +++ python/trunk/Misc/python.man Sun Sep 13 03:59:31 2009 @@ -387,13 +387,11 @@ .br Documentation: http://docs.python.org/ .br -Community website: http://starship.python.net/ -.br Developer resources: http://www.python.org/dev/ .br -FTP: ftp://ftp.python.org/pub/python/ +Downloads: http://python.org/download/ .br -Module repository: http://www.vex.net/parnassus/ +Module repository: http://pypi.python.org/ .br Newsgroups: comp.lang.python, comp.lang.python.announce .SH LICENSING From python-checkins at python.org Sun Sep 13 04:21:55 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 13 Sep 2009 02:21:55 -0000 Subject: [Python-checkins] r74758 - in python/branches/release26-maint: Misc/python.man Message-ID: Author: benjamin.peterson Date: Sun Sep 13 04:21:55 2009 New Revision: 74758 Log: Merged revisions 74757 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74757 | benjamin.peterson | 2009-09-12 20:59:31 -0500 (Sat, 12 Sep 2009) | 1 line update urls ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Misc/python.man Modified: python/branches/release26-maint/Misc/python.man ============================================================================== --- python/branches/release26-maint/Misc/python.man (original) +++ python/branches/release26-maint/Misc/python.man Sun Sep 13 04:21:55 2009 @@ -387,13 +387,11 @@ .br Documentation: http://docs.python.org/ .br -Community website: http://starship.python.net/ -.br Developer resources: http://www.python.org/dev/ .br -FTP: ftp://ftp.python.org/pub/python/ +Downloads: http://python.org/download/ .br -Module repository: http://www.vex.net/parnassus/ +Module repository: http://pypi.python.org/ .br Newsgroups: comp.lang.python, comp.lang.python.announce .SH LICENSING From python-checkins at python.org Sun Sep 13 04:22:01 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 13 Sep 2009 02:22:01 -0000 Subject: [Python-checkins] r74759 - in python/branches/py3k: Misc/python.man Message-ID: Author: benjamin.peterson Date: Sun Sep 13 04:22:00 2009 New Revision: 74759 Log: Merged revisions 74757 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74757 | benjamin.peterson | 2009-09-12 20:59:31 -0500 (Sat, 12 Sep 2009) | 1 line update urls ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Misc/python.man Modified: python/branches/py3k/Misc/python.man ============================================================================== --- python/branches/py3k/Misc/python.man (original) +++ python/branches/py3k/Misc/python.man Sun Sep 13 04:22:00 2009 @@ -370,13 +370,11 @@ .br Documentation: http://docs.python.org/ .br -Community website: http://starship.python.net/ -.br Developer resources: http://www.python.org/dev/ .br -FTP: ftp://ftp.python.org/pub/python/ +Downloads: http://python.org/download/ .br -Module repository: http://www.vex.net/parnassus/ +Module repository: http://pypi.python.org/ .br Newsgroups: comp.lang.python, comp.lang.python.announce .SH LICENSING From python-checkins at python.org Sun Sep 13 04:23:12 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 13 Sep 2009 02:23:12 -0000 Subject: [Python-checkins] r74760 - python/branches/py3k/Misc/python.man Message-ID: Author: benjamin.peterson Date: Sun Sep 13 04:23:12 2009 New Revision: 74760 Log: py3k documentation has its own url Modified: python/branches/py3k/Misc/python.man Modified: python/branches/py3k/Misc/python.man ============================================================================== --- python/branches/py3k/Misc/python.man (original) +++ python/branches/py3k/Misc/python.man Sun Sep 13 04:23:12 2009 @@ -368,7 +368,7 @@ .SH INTERNET RESOURCES Main website: http://www.python.org/ .br -Documentation: http://docs.python.org/ +Documentation: http://docs.python.org/py3k/ .br Developer resources: http://www.python.org/dev/ .br From python-checkins at python.org Sun Sep 13 04:29:37 2009 From: python-checkins at python.org (benjamin.peterson) Date: Sun, 13 Sep 2009 02:29:37 -0000 Subject: [Python-checkins] r74761 - in python/branches/release31-maint: Misc/python.man Message-ID: Author: benjamin.peterson Date: Sun Sep 13 04:29:37 2009 New Revision: 74761 Log: Merged revisions 74759-74760 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74759 | benjamin.peterson | 2009-09-12 21:22:00 -0500 (Sat, 12 Sep 2009) | 9 lines Merged revisions 74757 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74757 | benjamin.peterson | 2009-09-12 20:59:31 -0500 (Sat, 12 Sep 2009) | 1 line update urls ........ ................ r74760 | benjamin.peterson | 2009-09-12 21:23:12 -0500 (Sat, 12 Sep 2009) | 1 line py3k documentation has its own url ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Misc/python.man Modified: python/branches/release31-maint/Misc/python.man ============================================================================== --- python/branches/release31-maint/Misc/python.man (original) +++ python/branches/release31-maint/Misc/python.man Sun Sep 13 04:29:37 2009 @@ -368,15 +368,13 @@ .SH INTERNET RESOURCES Main website: http://www.python.org/ .br -Documentation: http://docs.python.org/ -.br -Community website: http://starship.python.net/ +Documentation: http://docs.python.org/py3k/ .br Developer resources: http://www.python.org/dev/ .br -FTP: ftp://ftp.python.org/pub/python/ +Downloads: http://python.org/download/ .br -Module repository: http://www.vex.net/parnassus/ +Module repository: http://pypi.python.org/ .br Newsgroups: comp.lang.python, comp.lang.python.announce .SH LICENSING From python-checkins at python.org Sun Sep 13 06:48:45 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 13 Sep 2009 04:48:45 -0000 Subject: [Python-checkins] r74762 - in python/branches/py3k/Doc: c-api/mapping.rst library/collections.rst library/doctest.rst library/modulefinder.rst library/shelve.rst Message-ID: Author: ezio.melotti Date: Sun Sep 13 06:48:45 2009 New Revision: 74762 Log: more list()s on dictviews Modified: python/branches/py3k/Doc/c-api/mapping.rst python/branches/py3k/Doc/library/collections.rst python/branches/py3k/Doc/library/doctest.rst python/branches/py3k/Doc/library/modulefinder.rst python/branches/py3k/Doc/library/shelve.rst Modified: python/branches/py3k/Doc/c-api/mapping.rst ============================================================================== --- python/branches/py3k/Doc/c-api/mapping.rst (original) +++ python/branches/py3k/Doc/c-api/mapping.rst Sun Sep 13 06:48:45 2009 @@ -51,20 +51,20 @@ .. cfunction:: PyObject* PyMapping_Keys(PyObject *o) On success, return a list of the keys in object *o*. On failure, return *NULL*. - This is equivalent to the Python expression ``o.keys()``. + This is equivalent to the Python expression ``list(o.keys())``. .. cfunction:: PyObject* PyMapping_Values(PyObject *o) On success, return a list of the values in object *o*. On failure, return - *NULL*. This is equivalent to the Python expression ``o.values()``. + *NULL*. This is equivalent to the Python expression ``list(o.values())``. .. cfunction:: PyObject* PyMapping_Items(PyObject *o) On success, return a list of the items in object *o*, where each item is a tuple containing a key-value pair. On failure, return *NULL*. This is equivalent to - the Python expression ``o.items()``. + the Python expression ``list(o.items())``. .. cfunction:: PyObject* PyMapping_GetItemString(PyObject *o, char *key) Modified: python/branches/py3k/Doc/library/collections.rst ============================================================================== --- python/branches/py3k/Doc/library/collections.rst (original) +++ python/branches/py3k/Doc/library/collections.rst Sun Sep 13 06:48:45 2009 @@ -669,7 +669,7 @@ 'Return a new Point object replacing specified fields with new values' result = _self._make(map(kwds.pop, ('x', 'y'), _self)) if kwds: - raise ValueError('Got unexpected field names: %r' % kwds.keys()) + raise ValueError('Got unexpected field names: %r' % list(kwds.keys())) return result def __getnewargs__(self): Modified: python/branches/py3k/Doc/library/doctest.rst ============================================================================== --- python/branches/py3k/Doc/library/doctest.rst (original) +++ python/branches/py3k/Doc/library/doctest.rst Sun Sep 13 06:48:45 2009 @@ -701,8 +701,7 @@ instead. Another is to do :: - >>> d = foo().items() - >>> d.sort() + >>> d = sorted(foo().items()) >>> d [('Harry', 'broomstick'), ('Hermione', 'hippogryph')] Modified: python/branches/py3k/Doc/library/modulefinder.rst ============================================================================== --- python/branches/py3k/Doc/library/modulefinder.rst (original) +++ python/branches/py3k/Doc/library/modulefinder.rst Sun Sep 13 06:48:45 2009 @@ -84,7 +84,7 @@ print('Loaded modules:') for name, mod in finder.modules.items(): print('%s: ' % name, end='') - print(','.join(mod.globalnames.keys()[:3])) + print(','.join(list(mod.globalnames.keys())[:3])) print('-'*50) print('Modules not imported:') Modified: python/branches/py3k/Doc/library/shelve.rst ============================================================================== --- python/branches/py3k/Doc/library/shelve.rst (original) +++ python/branches/py3k/Doc/library/shelve.rst Sun Sep 13 06:48:45 2009 @@ -141,8 +141,8 @@ # such key) del d[key] # delete data stored at key (raises KeyError # if no such key) - flag = key in d # true if the key exists - klist = d.keys() # a list of all existing keys (slow!) + flag = key in d # true if the key exists + klist = list(d.keys()) # a list of all existing keys (slow!) # as d was opened WITHOUT writeback=True, beware: d['xx'] = range(4) # this works as expected, but... From python-checkins at python.org Sun Sep 13 07:49:25 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 13 Sep 2009 05:49:25 -0000 Subject: [Python-checkins] r74763 - python/branches/py3k/Doc/library/sqlite3.rst Message-ID: Author: ezio.melotti Date: Sun Sep 13 07:49:25 2009 New Revision: 74763 Log: small fixes in the examples and in the markup Modified: python/branches/py3k/Doc/library/sqlite3.rst Modified: python/branches/py3k/Doc/library/sqlite3.rst ============================================================================== --- python/branches/py3k/Doc/library/sqlite3.rst (original) +++ python/branches/py3k/Doc/library/sqlite3.rst Sun Sep 13 07:49:25 2009 @@ -79,12 +79,12 @@ >>> c = conn.cursor() >>> c.execute('select * from stocks order by price') >>> for row in c: - ... print(row) + ... print(row) ... - (u'2006-01-05', u'BUY', u'RHAT', 100, 35.14) - (u'2006-03-28', u'BUY', u'IBM', 1000, 45.0) - (u'2006-04-06', u'SELL', u'IBM', 500, 53.0) - (u'2006-04-05', u'BUY', u'MSOFT', 1000, 72.0) + ('2006-01-05', 'BUY', 'RHAT', 100, 35.14) + ('2006-03-28', 'BUY', 'IBM', 1000, 45.0) + ('2006-04-06', 'SELL', 'IBM', 500, 53.0) + ('2006-04-05', 'BUY', 'MSOFT', 1000, 72.0) >>> @@ -589,18 +589,19 @@ >>> r = c.fetchone() >>> type(r) - - >>> r - (u'2006-01-05', u'BUY', u'RHAT', 100.0, 35.14) + + >>> tuple(r) + ('2006-01-05', 'BUY', 'RHAT', 100.0, 35.14) >>> len(r) 5 >>> r[2] - u'RHAT' + 'RHAT' >>> r.keys() ['date', 'trans', 'symbol', 'qty', 'price'] >>> r['qty'] 100.0 - >>> for member in r: print member + >>> for member in r: + ... print(member) ... 2006-01-05 BUY @@ -647,7 +648,7 @@ +=============+=============================================+ | ``NULL`` | :const:`None` | +-------------+---------------------------------------------+ -| ``INTEGER`` | :class`int` | +| ``INTEGER`` | :class:`int` | +-------------+---------------------------------------------+ | ``REAL`` | :class:`float` | +-------------+---------------------------------------------+ From python-checkins at python.org Sun Sep 13 09:54:02 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 13 Sep 2009 07:54:02 -0000 Subject: [Python-checkins] r74764 - in python/branches/py3k/Doc/library: exceptions.rst json.rst multiprocessing.rst plistlib.rst ssl.rst subprocess.rst tkinter.ttk.rst turtle.rst unicodedata.rst winreg.rst Message-ID: Author: ezio.melotti Date: Sun Sep 13 09:54:02 2009 New Revision: 74764 Log: fixed more examples that were using u"", print without () and unicode/str instead of str/bytes Modified: python/branches/py3k/Doc/library/exceptions.rst python/branches/py3k/Doc/library/json.rst python/branches/py3k/Doc/library/multiprocessing.rst python/branches/py3k/Doc/library/plistlib.rst python/branches/py3k/Doc/library/ssl.rst python/branches/py3k/Doc/library/subprocess.rst python/branches/py3k/Doc/library/tkinter.ttk.rst python/branches/py3k/Doc/library/turtle.rst python/branches/py3k/Doc/library/unicodedata.rst python/branches/py3k/Doc/library/winreg.rst Modified: python/branches/py3k/Doc/library/exceptions.rst ============================================================================== --- python/branches/py3k/Doc/library/exceptions.rst (original) +++ python/branches/py3k/Doc/library/exceptions.rst Sun Sep 13 09:54:02 2009 @@ -52,7 +52,7 @@ The base class for all built-in exceptions. It is not meant to be directly inherited by user-defined classes (for that use :exc:`Exception`). If - :func:`str` or :func:`unicode` is called on an instance of this class, the + :func:`bytes` or :func:`str` is called on an instance of this class, the representation of the argument(s) to the instance are returned or the empty string when there were no arguments. All arguments are stored in :attr:`args` as a tuple. Modified: python/branches/py3k/Doc/library/json.rst ============================================================================== --- python/branches/py3k/Doc/library/json.rst (original) +++ python/branches/py3k/Doc/library/json.rst Sun Sep 13 09:54:02 2009 @@ -118,7 +118,7 @@ file-like object). If *skipkeys* is ``True`` (default: ``False``), then dict keys that are not - of a basic type (:class:`str`, :class:`unicode`, :class:`int`, + of a basic type (:class:`bytes`, :class:`str`, :class:`int`, :class:`float`, :class:`bool`, ``None``) will be skipped instead of raising a :exc:`TypeError`. @@ -201,13 +201,13 @@ .. function:: loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw) - Deserialize *s* (a :class:`str` or :class:`unicode` instance containing a JSON + Deserialize *s* (a :class:`bytes` or :class:`str` instance containing a JSON document) to a Python object. - If *s* is a :class:`str` instance and is encoded with an ASCII based encoding + If *s* is a :class:`bytes` instance and is encoded with an ASCII based encoding other than UTF-8 (e.g. latin-1), then an appropriate *encoding* name must be specified. Encodings that are not ASCII based (such as UCS-2) are not - allowed and should be decoded to :class:`unicode` first. + allowed and should be decoded to :class:`str` first. The other arguments have the same meaning as in :func:`dump`. Modified: python/branches/py3k/Doc/library/multiprocessing.rst ============================================================================== --- python/branches/py3k/Doc/library/multiprocessing.rst (original) +++ python/branches/py3k/Doc/library/multiprocessing.rst Sun Sep 13 09:54:02 2009 @@ -77,14 +77,14 @@ import os def info(title): - print title - print 'module name:', __name__ - print 'parent process:', os.getppid() - print 'process id:', os.getpid() + print(title) + print('module name:', __name__) + print('parent process:', os.getppid()) + print('process id:', os.getpid()) def f(name): info('function f') - print 'hello', name + print('hello', name) if __name__ == '__main__': info('main line') @@ -279,10 +279,10 @@ return x*x if __name__ == '__main__': - pool = Pool(processes=4) # start 4 worker processes + pool = Pool(processes=4) # start 4 worker processes result = pool.apply_async(f, [10]) # evaluate "f(10)" asynchronously - print result.get(timeout=1) # prints "100" unless your computer is *very* slow - print pool.map(f, range(10)) # prints "[0, 1, 4,..., 81]" + print(result.get(timeout=1)) # prints "100" unless your computer is *very* slow + print(pool.map(f, range(10))) # prints "[0, 1, 4,..., 81]" Reference Modified: python/branches/py3k/Doc/library/plistlib.rst ============================================================================== --- python/branches/py3k/Doc/library/plistlib.rst (original) +++ python/branches/py3k/Doc/library/plistlib.rst Sun Sep 13 09:54:02 2009 @@ -20,7 +20,7 @@ Values can be strings, integers, floats, booleans, tuples, lists, dictionaries (but only with string keys), :class:`Data` or :class:`datetime.datetime` -objects. String values (including dictionary keys) may be unicode strings -- +objects. String values (including dictionary keys) has to be unicode strings -- they will be written out as UTF-8. The ```` plist type is supported through the :class:`Data` class. This is @@ -83,22 +83,20 @@ Generating a plist:: pl = dict( - aString="Doodah", - aList=["A", "B", 12, 32.1, [1, 2, 3]], + aString = "Doodah", + aList = ["A", "B", 12, 32.1, [1, 2, 3]], aFloat = 0.1, anInt = 728, - aDict=dict( - anotherString="", - aUnicodeValue=u'M\xe4ssig, Ma\xdf', - aTrueValue=True, - aFalseValue=False, + aDict = dict( + anotherString = "", + aThirdString = "M\xe4ssig, Ma\xdf", + aTrueValue = True, + aFalseValue = False, ), someData = Data(""), someMoreData = Data("" * 10), aDate = datetime.datetime.fromtimestamp(time.mktime(time.gmtime())), ) - # unicode keys are possible, but a little awkward to use: - pl[u'\xc5benraa'] = "That was a unicode key." writePlist(pl, fileName) Parsing a plist:: Modified: python/branches/py3k/Doc/library/ssl.rst ============================================================================== --- python/branches/py3k/Doc/library/ssl.rst (original) +++ python/branches/py3k/Doc/library/ssl.rst Sun Sep 13 09:54:02 2009 @@ -311,12 +311,12 @@ name-value pairs:: {'notAfter': 'Feb 16 16:54:50 2013 GMT', - 'subject': ((('countryName', u'US'),), - (('stateOrProvinceName', u'Delaware'),), - (('localityName', u'Wilmington'),), - (('organizationName', u'Python Software Foundation'),), - (('organizationalUnitName', u'SSL'),), - (('commonName', u'somemachine.python.org'),))} + 'subject': ((('countryName', 'US'),), + (('stateOrProvinceName', 'Delaware'),), + (('localityName', 'Wilmington'),), + (('organizationName', 'Python Software Foundation'),), + (('organizationalUnitName', 'SSL'),), + (('commonName', 'somemachine.python.org'),))} If the ``binary_form`` parameter is :const:`True`, and a certificate was provided, this method returns the DER-encoded form @@ -522,20 +522,20 @@ looked like this:: {'notAfter': 'May 8 23:59:59 2009 GMT', - 'subject': ((('serialNumber', u'2497886'),), - (('1.3.6.1.4.1.311.60.2.1.3', u'US'),), - (('1.3.6.1.4.1.311.60.2.1.2', u'Delaware'),), - (('countryName', u'US'),), - (('postalCode', u'94043'),), - (('stateOrProvinceName', u'California'),), - (('localityName', u'Mountain View'),), - (('streetAddress', u'487 East Middlefield Road'),), - (('organizationName', u'VeriSign, Inc.'),), + 'subject': ((('serialNumber', '2497886'),), + (('1.3.6.1.4.1.311.60.2.1.3', 'US'),), + (('1.3.6.1.4.1.311.60.2.1.2', 'Delaware'),), + (('countryName', 'US'),), + (('postalCode', '94043'),), + (('stateOrProvinceName', 'California'),), + (('localityName', 'Mountain View'),), + (('streetAddress', '487 East Middlefield Road'),), + (('organizationName', 'VeriSign, Inc.'),), (('organizationalUnitName', - u'Production Security Services'),), + 'Production Security Services'),), (('organizationalUnitName', - u'Terms of use at www.verisign.com/rpa (c)06'),), - (('commonName', u'www.verisign.com'),))} + 'Terms of use at www.verisign.com/rpa (c)06'),), + (('commonName', 'www.verisign.com'),))} which is a fairly poorly-formed ``subject`` field. Modified: python/branches/py3k/Doc/library/subprocess.rst ============================================================================== --- python/branches/py3k/Doc/library/subprocess.rst (original) +++ python/branches/py3k/Doc/library/subprocess.rst Sun Sep 13 09:54:02 2009 @@ -510,13 +510,13 @@ ... rc = pipe.close() if rc != None and rc % 256: - print "There were some errors" + print("There were some errors") ==> process = Popen(cmd, 'w', stdin=PIPE) ... process.stdin.close() if process.wait() != 0: - print "There were some errors" + print("There were some errors") Replacing functions from the :mod:`popen2` module Modified: python/branches/py3k/Doc/library/tkinter.ttk.rst ============================================================================== --- python/branches/py3k/Doc/library/tkinter.ttk.rst (original) +++ python/branches/py3k/Doc/library/tkinter.ttk.rst Sun Sep 13 09:54:02 2009 @@ -1228,7 +1228,7 @@ from tkinter import ttk - print ttk.Style().lookup("TButton", "font") + print(ttk.Style().lookup("TButton", "font")) .. method:: layout(style[, layoutspec=None]) Modified: python/branches/py3k/Doc/library/turtle.rst ============================================================================== --- python/branches/py3k/Doc/library/turtle.rst (original) +++ python/branches/py3k/Doc/library/turtle.rst Sun Sep 13 09:54:02 2009 @@ -645,7 +645,7 @@ >>> turtle.forward(100) >>> turtle.pos() (64.28,76.60) - >>> print turtle.xcor() + >>> print(turtle.xcor()) 64.2787609687 @@ -658,9 +658,9 @@ >>> turtle.home() >>> turtle.left(60) >>> turtle.forward(100) - >>> print turtle.pos() + >>> print(turtle.pos()) (50.00,86.60) - >>> print turtle.ycor() + >>> print(turtle.ycor()) 86.6025403784 Modified: python/branches/py3k/Doc/library/unicodedata.rst ============================================================================== --- python/branches/py3k/Doc/library/unicodedata.rst (original) +++ python/branches/py3k/Doc/library/unicodedata.rst Sun Sep 13 09:54:02 2009 @@ -146,7 +146,7 @@ >>> import unicodedata >>> unicodedata.lookup('LEFT CURLY BRACKET') - u'{' + '{' >>> unicodedata.name('/') 'SOLIDUS' >>> unicodedata.decimal('9') Modified: python/branches/py3k/Doc/library/winreg.rst ============================================================================== --- python/branches/py3k/Doc/library/winreg.rst (original) +++ python/branches/py3k/Doc/library/winreg.rst Sun Sep 13 09:54:02 2009 @@ -130,12 +130,12 @@ +-------+--------------------------------------------+ -.. function:: ExpandEnvironmentStrings(unicode) +.. function:: ExpandEnvironmentStrings(str) - Expands environment strings %NAME% in unicode string like const:`REG_EXPAND_SZ`:: + Expands environment strings %NAME% in unicode string like :const:`REG_EXPAND_SZ`:: - >>> ExpandEnvironmentStrings(u"%windir%") - u"C:\\Windows" + >>> ExpandEnvironmentStrings('%windir%') + 'C:\\Windows' .. function:: FlushKey(key) From python-checkins at python.org Sun Sep 13 10:01:06 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 13 Sep 2009 08:01:06 -0000 Subject: [Python-checkins] r74765 - python/branches/py3k/Doc/library/plistlib.rst Message-ID: Author: ezio.melotti Date: Sun Sep 13 10:01:06 2009 New Revision: 74765 Log: typo: string values *have* to be Modified: python/branches/py3k/Doc/library/plistlib.rst Modified: python/branches/py3k/Doc/library/plistlib.rst ============================================================================== --- python/branches/py3k/Doc/library/plistlib.rst (original) +++ python/branches/py3k/Doc/library/plistlib.rst Sun Sep 13 10:01:06 2009 @@ -20,7 +20,7 @@ Values can be strings, integers, floats, booleans, tuples, lists, dictionaries (but only with string keys), :class:`Data` or :class:`datetime.datetime` -objects. String values (including dictionary keys) has to be unicode strings -- +objects. String values (including dictionary keys) have to be unicode strings -- they will be written out as UTF-8. The ```` plist type is supported through the :class:`Data` class. This is From python-checkins at python.org Sun Sep 13 10:08:32 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 13 Sep 2009 08:08:32 -0000 Subject: [Python-checkins] r74766 - in python/branches/release31-maint: Doc/c-api/mapping.rst Doc/library/collections.rst Doc/library/doctest.rst Doc/library/modulefinder.rst Doc/library/shelve.rst Message-ID: Author: ezio.melotti Date: Sun Sep 13 10:08:32 2009 New Revision: 74766 Log: Merged revisions 74762 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74762 | ezio.melotti | 2009-09-13 07:48:45 +0300 (Sun, 13 Sep 2009) | 1 line more list()s on dictviews ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/c-api/mapping.rst python/branches/release31-maint/Doc/library/collections.rst python/branches/release31-maint/Doc/library/doctest.rst python/branches/release31-maint/Doc/library/modulefinder.rst python/branches/release31-maint/Doc/library/shelve.rst Modified: python/branches/release31-maint/Doc/c-api/mapping.rst ============================================================================== --- python/branches/release31-maint/Doc/c-api/mapping.rst (original) +++ python/branches/release31-maint/Doc/c-api/mapping.rst Sun Sep 13 10:08:32 2009 @@ -51,20 +51,20 @@ .. cfunction:: PyObject* PyMapping_Keys(PyObject *o) On success, return a list of the keys in object *o*. On failure, return *NULL*. - This is equivalent to the Python expression ``o.keys()``. + This is equivalent to the Python expression ``list(o.keys())``. .. cfunction:: PyObject* PyMapping_Values(PyObject *o) On success, return a list of the values in object *o*. On failure, return - *NULL*. This is equivalent to the Python expression ``o.values()``. + *NULL*. This is equivalent to the Python expression ``list(o.values())``. .. cfunction:: PyObject* PyMapping_Items(PyObject *o) On success, return a list of the items in object *o*, where each item is a tuple containing a key-value pair. On failure, return *NULL*. This is equivalent to - the Python expression ``o.items()``. + the Python expression ``list(o.items())``. .. cfunction:: PyObject* PyMapping_GetItemString(PyObject *o, char *key) Modified: python/branches/release31-maint/Doc/library/collections.rst ============================================================================== --- python/branches/release31-maint/Doc/library/collections.rst (original) +++ python/branches/release31-maint/Doc/library/collections.rst Sun Sep 13 10:08:32 2009 @@ -669,7 +669,7 @@ 'Return a new Point object replacing specified fields with new values' result = _self._make(map(kwds.pop, ('x', 'y'), _self)) if kwds: - raise ValueError('Got unexpected field names: %r' % kwds.keys()) + raise ValueError('Got unexpected field names: %r' % list(kwds.keys())) return result def __getnewargs__(self): Modified: python/branches/release31-maint/Doc/library/doctest.rst ============================================================================== --- python/branches/release31-maint/Doc/library/doctest.rst (original) +++ python/branches/release31-maint/Doc/library/doctest.rst Sun Sep 13 10:08:32 2009 @@ -701,8 +701,7 @@ instead. Another is to do :: - >>> d = foo().items() - >>> d.sort() + >>> d = sorted(foo().items()) >>> d [('Harry', 'broomstick'), ('Hermione', 'hippogryph')] Modified: python/branches/release31-maint/Doc/library/modulefinder.rst ============================================================================== --- python/branches/release31-maint/Doc/library/modulefinder.rst (original) +++ python/branches/release31-maint/Doc/library/modulefinder.rst Sun Sep 13 10:08:32 2009 @@ -84,7 +84,7 @@ print('Loaded modules:') for name, mod in finder.modules.items(): print('%s: ' % name, end='') - print(','.join(mod.globalnames.keys()[:3])) + print(','.join(list(mod.globalnames.keys())[:3])) print('-'*50) print('Modules not imported:') Modified: python/branches/release31-maint/Doc/library/shelve.rst ============================================================================== --- python/branches/release31-maint/Doc/library/shelve.rst (original) +++ python/branches/release31-maint/Doc/library/shelve.rst Sun Sep 13 10:08:32 2009 @@ -141,8 +141,8 @@ # such key) del d[key] # delete data stored at key (raises KeyError # if no such key) - flag = key in d # true if the key exists - klist = d.keys() # a list of all existing keys (slow!) + flag = key in d # true if the key exists + klist = list(d.keys()) # a list of all existing keys (slow!) # as d was opened WITHOUT writeback=True, beware: d['xx'] = range(4) # this works as expected, but... From python-checkins at python.org Sun Sep 13 10:09:56 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 13 Sep 2009 08:09:56 -0000 Subject: [Python-checkins] r74767 - in python/branches/release31-maint: Doc/library/sqlite3.rst Message-ID: Author: ezio.melotti Date: Sun Sep 13 10:09:56 2009 New Revision: 74767 Log: Merged revisions 74763 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74763 | ezio.melotti | 2009-09-13 08:49:25 +0300 (Sun, 13 Sep 2009) | 1 line small fixes in the examples and in the markup ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/sqlite3.rst Modified: python/branches/release31-maint/Doc/library/sqlite3.rst ============================================================================== --- python/branches/release31-maint/Doc/library/sqlite3.rst (original) +++ python/branches/release31-maint/Doc/library/sqlite3.rst Sun Sep 13 10:09:56 2009 @@ -79,12 +79,12 @@ >>> c = conn.cursor() >>> c.execute('select * from stocks order by price') >>> for row in c: - ... print(row) + ... print(row) ... - (u'2006-01-05', u'BUY', u'RHAT', 100, 35.14) - (u'2006-03-28', u'BUY', u'IBM', 1000, 45.0) - (u'2006-04-06', u'SELL', u'IBM', 500, 53.0) - (u'2006-04-05', u'BUY', u'MSOFT', 1000, 72.0) + ('2006-01-05', 'BUY', 'RHAT', 100, 35.14) + ('2006-03-28', 'BUY', 'IBM', 1000, 45.0) + ('2006-04-06', 'SELL', 'IBM', 500, 53.0) + ('2006-04-05', 'BUY', 'MSOFT', 1000, 72.0) >>> @@ -589,18 +589,19 @@ >>> r = c.fetchone() >>> type(r) - - >>> r - (u'2006-01-05', u'BUY', u'RHAT', 100.0, 35.14) + + >>> tuple(r) + ('2006-01-05', 'BUY', 'RHAT', 100.0, 35.14) >>> len(r) 5 >>> r[2] - u'RHAT' + 'RHAT' >>> r.keys() ['date', 'trans', 'symbol', 'qty', 'price'] >>> r['qty'] 100.0 - >>> for member in r: print member + >>> for member in r: + ... print(member) ... 2006-01-05 BUY @@ -647,7 +648,7 @@ +=============+=============================================+ | ``NULL`` | :const:`None` | +-------------+---------------------------------------------+ -| ``INTEGER`` | :class`int` | +| ``INTEGER`` | :class:`int` | +-------------+---------------------------------------------+ | ``REAL`` | :class:`float` | +-------------+---------------------------------------------+ From python-checkins at python.org Sun Sep 13 10:13:21 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 13 Sep 2009 08:13:21 -0000 Subject: [Python-checkins] r74768 - in python/branches/release31-maint: Doc/library/exceptions.rst Doc/library/json.rst Doc/library/multiprocessing.rst Doc/library/plistlib.rst Doc/library/ssl.rst Doc/library/subprocess.rst Doc/library/tkinter.ttk.rst Doc/library/turtle.rst Doc/library/unicodedata.rst Doc/library/winreg.rst Message-ID: Author: ezio.melotti Date: Sun Sep 13 10:13:21 2009 New Revision: 74768 Log: Merged revisions 74764 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74764 | ezio.melotti | 2009-09-13 10:54:02 +0300 (Sun, 13 Sep 2009) | 1 line fixed more examples that were using u"", print without () and unicode/str instead of str/bytes ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/exceptions.rst python/branches/release31-maint/Doc/library/json.rst python/branches/release31-maint/Doc/library/multiprocessing.rst python/branches/release31-maint/Doc/library/plistlib.rst python/branches/release31-maint/Doc/library/ssl.rst python/branches/release31-maint/Doc/library/subprocess.rst python/branches/release31-maint/Doc/library/tkinter.ttk.rst python/branches/release31-maint/Doc/library/turtle.rst python/branches/release31-maint/Doc/library/unicodedata.rst python/branches/release31-maint/Doc/library/winreg.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 Sun Sep 13 10:13:21 2009 @@ -52,7 +52,7 @@ The base class for all built-in exceptions. It is not meant to be directly inherited by user-defined classes (for that use :exc:`Exception`). If - :func:`str` or :func:`unicode` is called on an instance of this class, the + :func:`bytes` or :func:`str` is called on an instance of this class, the representation of the argument(s) to the instance are returned or the empty string when there were no arguments. All arguments are stored in :attr:`args` as a tuple. Modified: python/branches/release31-maint/Doc/library/json.rst ============================================================================== --- python/branches/release31-maint/Doc/library/json.rst (original) +++ python/branches/release31-maint/Doc/library/json.rst Sun Sep 13 10:13:21 2009 @@ -118,7 +118,7 @@ file-like object). If *skipkeys* is ``True`` (default: ``False``), then dict keys that are not - of a basic type (:class:`str`, :class:`unicode`, :class:`int`, + of a basic type (:class:`bytes`, :class:`str`, :class:`int`, :class:`float`, :class:`bool`, ``None``) will be skipped instead of raising a :exc:`TypeError`. @@ -201,13 +201,13 @@ .. function:: loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw) - Deserialize *s* (a :class:`str` or :class:`unicode` instance containing a JSON + Deserialize *s* (a :class:`bytes` or :class:`str` instance containing a JSON document) to a Python object. - If *s* is a :class:`str` instance and is encoded with an ASCII based encoding + If *s* is a :class:`bytes` instance and is encoded with an ASCII based encoding other than UTF-8 (e.g. latin-1), then an appropriate *encoding* name must be specified. Encodings that are not ASCII based (such as UCS-2) are not - allowed and should be decoded to :class:`unicode` first. + allowed and should be decoded to :class:`str` first. The other arguments have the same meaning as in :func:`dump`. 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 Sun Sep 13 10:13:21 2009 @@ -77,14 +77,14 @@ import os def info(title): - print title - print 'module name:', __name__ - print 'parent process:', os.getppid() - print 'process id:', os.getpid() + print(title) + print('module name:', __name__) + print('parent process:', os.getppid()) + print('process id:', os.getpid()) def f(name): info('function f') - print 'hello', name + print('hello', name) if __name__ == '__main__': info('main line') @@ -279,10 +279,10 @@ return x*x if __name__ == '__main__': - pool = Pool(processes=4) # start 4 worker processes + pool = Pool(processes=4) # start 4 worker processes result = pool.apply_async(f, [10]) # evaluate "f(10)" asynchronously - print result.get(timeout=1) # prints "100" unless your computer is *very* slow - print pool.map(f, range(10)) # prints "[0, 1, 4,..., 81]" + print(result.get(timeout=1)) # prints "100" unless your computer is *very* slow + print(pool.map(f, range(10))) # prints "[0, 1, 4,..., 81]" Reference Modified: python/branches/release31-maint/Doc/library/plistlib.rst ============================================================================== --- python/branches/release31-maint/Doc/library/plistlib.rst (original) +++ python/branches/release31-maint/Doc/library/plistlib.rst Sun Sep 13 10:13:21 2009 @@ -20,7 +20,7 @@ Values can be strings, integers, floats, booleans, tuples, lists, dictionaries (but only with string keys), :class:`Data` or :class:`datetime.datetime` -objects. String values (including dictionary keys) may be unicode strings -- +objects. String values (including dictionary keys) have to be unicode strings -- they will be written out as UTF-8. The ```` plist type is supported through the :class:`Data` class. This is @@ -83,22 +83,20 @@ Generating a plist:: pl = dict( - aString="Doodah", - aList=["A", "B", 12, 32.1, [1, 2, 3]], + aString = "Doodah", + aList = ["A", "B", 12, 32.1, [1, 2, 3]], aFloat = 0.1, anInt = 728, - aDict=dict( - anotherString="", - aUnicodeValue=u'M\xe4ssig, Ma\xdf', - aTrueValue=True, - aFalseValue=False, + aDict = dict( + anotherString = "", + aThirdString = "M\xe4ssig, Ma\xdf", + aTrueValue = True, + aFalseValue = False, ), someData = Data(""), someMoreData = Data("" * 10), aDate = datetime.datetime.fromtimestamp(time.mktime(time.gmtime())), ) - # unicode keys are possible, but a little awkward to use: - pl[u'\xc5benraa'] = "That was a unicode key." writePlist(pl, fileName) Parsing a plist:: Modified: python/branches/release31-maint/Doc/library/ssl.rst ============================================================================== --- python/branches/release31-maint/Doc/library/ssl.rst (original) +++ python/branches/release31-maint/Doc/library/ssl.rst Sun Sep 13 10:13:21 2009 @@ -311,12 +311,12 @@ name-value pairs:: {'notAfter': 'Feb 16 16:54:50 2013 GMT', - 'subject': ((('countryName', u'US'),), - (('stateOrProvinceName', u'Delaware'),), - (('localityName', u'Wilmington'),), - (('organizationName', u'Python Software Foundation'),), - (('organizationalUnitName', u'SSL'),), - (('commonName', u'somemachine.python.org'),))} + 'subject': ((('countryName', 'US'),), + (('stateOrProvinceName', 'Delaware'),), + (('localityName', 'Wilmington'),), + (('organizationName', 'Python Software Foundation'),), + (('organizationalUnitName', 'SSL'),), + (('commonName', 'somemachine.python.org'),))} If the ``binary_form`` parameter is :const:`True`, and a certificate was provided, this method returns the DER-encoded form @@ -522,20 +522,20 @@ looked like this:: {'notAfter': 'May 8 23:59:59 2009 GMT', - 'subject': ((('serialNumber', u'2497886'),), - (('1.3.6.1.4.1.311.60.2.1.3', u'US'),), - (('1.3.6.1.4.1.311.60.2.1.2', u'Delaware'),), - (('countryName', u'US'),), - (('postalCode', u'94043'),), - (('stateOrProvinceName', u'California'),), - (('localityName', u'Mountain View'),), - (('streetAddress', u'487 East Middlefield Road'),), - (('organizationName', u'VeriSign, Inc.'),), + 'subject': ((('serialNumber', '2497886'),), + (('1.3.6.1.4.1.311.60.2.1.3', 'US'),), + (('1.3.6.1.4.1.311.60.2.1.2', 'Delaware'),), + (('countryName', 'US'),), + (('postalCode', '94043'),), + (('stateOrProvinceName', 'California'),), + (('localityName', 'Mountain View'),), + (('streetAddress', '487 East Middlefield Road'),), + (('organizationName', 'VeriSign, Inc.'),), (('organizationalUnitName', - u'Production Security Services'),), + 'Production Security Services'),), (('organizationalUnitName', - u'Terms of use at www.verisign.com/rpa (c)06'),), - (('commonName', u'www.verisign.com'),))} + 'Terms of use at www.verisign.com/rpa (c)06'),), + (('commonName', 'www.verisign.com'),))} which is a fairly poorly-formed ``subject`` field. Modified: python/branches/release31-maint/Doc/library/subprocess.rst ============================================================================== --- python/branches/release31-maint/Doc/library/subprocess.rst (original) +++ python/branches/release31-maint/Doc/library/subprocess.rst Sun Sep 13 10:13:21 2009 @@ -510,13 +510,13 @@ ... rc = pipe.close() if rc != None and rc % 256: - print "There were some errors" + print("There were some errors") ==> process = Popen(cmd, 'w', stdin=PIPE) ... process.stdin.close() if process.wait() != 0: - print "There were some errors" + print("There were some errors") Replacing functions from the :mod:`popen2` module Modified: python/branches/release31-maint/Doc/library/tkinter.ttk.rst ============================================================================== --- python/branches/release31-maint/Doc/library/tkinter.ttk.rst (original) +++ python/branches/release31-maint/Doc/library/tkinter.ttk.rst Sun Sep 13 10:13:21 2009 @@ -1228,7 +1228,7 @@ from tkinter import ttk - print ttk.Style().lookup("TButton", "font") + print(ttk.Style().lookup("TButton", "font")) .. method:: layout(style[, layoutspec=None]) Modified: python/branches/release31-maint/Doc/library/turtle.rst ============================================================================== --- python/branches/release31-maint/Doc/library/turtle.rst (original) +++ python/branches/release31-maint/Doc/library/turtle.rst Sun Sep 13 10:13:21 2009 @@ -645,7 +645,7 @@ >>> turtle.forward(100) >>> turtle.pos() (64.28,76.60) - >>> print turtle.xcor() + >>> print(turtle.xcor()) 64.2787609687 @@ -658,9 +658,9 @@ >>> turtle.home() >>> turtle.left(60) >>> turtle.forward(100) - >>> print turtle.pos() + >>> print(turtle.pos()) (50.00,86.60) - >>> print turtle.ycor() + >>> print(turtle.ycor()) 86.6025403784 Modified: python/branches/release31-maint/Doc/library/unicodedata.rst ============================================================================== --- python/branches/release31-maint/Doc/library/unicodedata.rst (original) +++ python/branches/release31-maint/Doc/library/unicodedata.rst Sun Sep 13 10:13:21 2009 @@ -146,7 +146,7 @@ >>> import unicodedata >>> unicodedata.lookup('LEFT CURLY BRACKET') - u'{' + '{' >>> unicodedata.name('/') 'SOLIDUS' >>> unicodedata.decimal('9') Modified: python/branches/release31-maint/Doc/library/winreg.rst ============================================================================== --- python/branches/release31-maint/Doc/library/winreg.rst (original) +++ python/branches/release31-maint/Doc/library/winreg.rst Sun Sep 13 10:13:21 2009 @@ -130,12 +130,12 @@ +-------+--------------------------------------------+ -.. function:: ExpandEnvironmentStrings(unicode) +.. function:: ExpandEnvironmentStrings(str) - Expands environment strings %NAME% in unicode string like const:`REG_EXPAND_SZ`:: + Expands environment strings %NAME% in unicode string like :const:`REG_EXPAND_SZ`:: - >>> ExpandEnvironmentStrings(u"%windir%") - u"C:\\Windows" + >>> ExpandEnvironmentStrings('%windir%') + 'C:\\Windows' .. function:: FlushKey(key) From python-checkins at python.org Sun Sep 13 13:56:18 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 13 Sep 2009 11:56:18 -0000 Subject: [Python-checkins] r74769 - python/trunk/Objects/longobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 13 13:56:13 2009 New Revision: 74769 Log: Fix potential signed-overflow bug in _PyLong_Format; also fix a couple of whitespace issues. Modified: python/trunk/Objects/longobject.c Modified: python/trunk/Objects/longobject.c ============================================================================== --- python/trunk/Objects/longobject.c (original) +++ python/trunk/Objects/longobject.c Sun Sep 13 13:56:13 2009 @@ -1371,7 +1371,7 @@ { register PyLongObject *a = (PyLongObject *)aa; PyStringObject *str; - Py_ssize_t i, j, sz; + Py_ssize_t i, sz; Py_ssize_t size_a; char *p; int bits; @@ -1392,20 +1392,21 @@ i >>= 1; } i = 5 + (addL ? 1 : 0); - j = size_a*PyLong_SHIFT + bits-1; - sz = i + j / bits; - if (j / PyLong_SHIFT < size_a || sz < i) { + /* ensure we don't get signed overflow in sz calculation */ + if (size_a > (PY_SSIZE_T_MAX - i) / PyLong_SHIFT) { PyErr_SetString(PyExc_OverflowError, "long is too large to format"); return NULL; } + sz = i + 1 + (size_a * PyLong_SHIFT - 1) / bits; + assert(sz >= 0); str = (PyStringObject *) PyString_FromStringAndSize((char *)0, sz); if (str == NULL) return NULL; p = PyString_AS_STRING(str) + sz; *p = '\0'; - if (addL) - *--p = 'L'; + if (addL) + *--p = 'L'; if (a->ob_size < 0) sign = '-'; @@ -1433,7 +1434,7 @@ accumbits -= basebits; accum >>= basebits; } while (i < size_a-1 ? accumbits >= basebits : - accum > 0); + accum > 0); } } else { @@ -1448,7 +1449,8 @@ int power = 1; for (;;) { twodigits newpow = powbase * (twodigits)base; - if (newpow >> PyLong_SHIFT) /* doesn't fit in a digit */ + if (newpow >> PyLong_SHIFT) + /* doesn't fit in a digit */ break; powbase = (digit)newpow; ++power; @@ -1498,7 +1500,7 @@ *--p = '0'; } else if (base == 8) { - if (newstyle) { + if (newstyle) { *--p = 'o'; *--p = '0'; } From python-checkins at python.org Sun Sep 13 13:59:42 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 13 Sep 2009 11:59:42 -0000 Subject: [Python-checkins] r74770 - in python/branches/release26-maint: Objects/longobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 13 13:59:41 2009 New Revision: 74770 Log: Merged revisions 74769 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74769 | mark.dickinson | 2009-09-13 12:56:13 +0100 (Sun, 13 Sep 2009) | 3 lines Fix potential signed-overflow bug in _PyLong_Format; also fix a couple of whitespace issues. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Objects/longobject.c Modified: python/branches/release26-maint/Objects/longobject.c ============================================================================== --- python/branches/release26-maint/Objects/longobject.c (original) +++ python/branches/release26-maint/Objects/longobject.c Sun Sep 13 13:59:41 2009 @@ -1201,7 +1201,7 @@ { register PyLongObject *a = (PyLongObject *)aa; PyStringObject *str; - Py_ssize_t i, j, sz; + Py_ssize_t i, sz; Py_ssize_t size_a; char *p; int bits; @@ -1222,20 +1222,21 @@ i >>= 1; } i = 5 + (addL ? 1 : 0); - j = size_a*PyLong_SHIFT + bits-1; - sz = i + j / bits; - if (j / PyLong_SHIFT < size_a || sz < i) { + /* ensure we don't get signed overflow in sz calculation */ + if (size_a > (PY_SSIZE_T_MAX - i) / PyLong_SHIFT) { PyErr_SetString(PyExc_OverflowError, "long is too large to format"); return NULL; } + sz = i + 1 + (size_a * PyLong_SHIFT - 1) / bits; + assert(sz >= 0); str = (PyStringObject *) PyString_FromStringAndSize((char *)0, sz); if (str == NULL) return NULL; p = PyString_AS_STRING(str) + sz; *p = '\0'; - if (addL) - *--p = 'L'; + if (addL) + *--p = 'L'; if (a->ob_size < 0) sign = '-'; @@ -1263,7 +1264,7 @@ accumbits -= basebits; accum >>= basebits; } while (i < size_a-1 ? accumbits >= basebits : - accum > 0); + accum > 0); } } else { @@ -1278,7 +1279,8 @@ int power = 1; for (;;) { unsigned long newpow = powbase * (unsigned long)base; - if (newpow >> PyLong_SHIFT) /* doesn't fit in a digit */ + if (newpow >> PyLong_SHIFT) + /* doesn't fit in a digit */ break; powbase = (digit)newpow; ++power; @@ -1328,7 +1330,7 @@ *--p = '0'; } else if (base == 8) { - if (newstyle) { + if (newstyle) { *--p = 'o'; *--p = '0'; } From python-checkins at python.org Sun Sep 13 14:06:09 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 13 Sep 2009 12:06:09 -0000 Subject: [Python-checkins] r74771 - in python/branches/py3k: Objects/longobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 13 14:06:08 2009 New Revision: 74771 Log: Merged revisions 74769 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74769 | mark.dickinson | 2009-09-13 12:56:13 +0100 (Sun, 13 Sep 2009) | 3 lines Fix potential signed-overflow bug in _PyLong_Format; also fix a couple of whitespace issues. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Objects/longobject.c Modified: python/branches/py3k/Objects/longobject.c ============================================================================== --- python/branches/py3k/Objects/longobject.c (original) +++ python/branches/py3k/Objects/longobject.c Sun Sep 13 14:06:08 2009 @@ -1659,7 +1659,7 @@ { register PyLongObject *a = (PyLongObject *)aa; PyObject *str; - Py_ssize_t i, j, sz; + Py_ssize_t i, sz; Py_ssize_t size_a; Py_UNICODE *p; int bits; @@ -1680,13 +1680,14 @@ i >>= 1; } i = 5; - j = size_a*PyLong_SHIFT + bits-1; - sz = i + j / bits; - if (j / PyLong_SHIFT < size_a || sz < i) { + /* ensure we don't get signed overflow in sz calculation */ + if (size_a > (PY_SSIZE_T_MAX - i) / PyLong_SHIFT) { PyErr_SetString(PyExc_OverflowError, "int is too large to format"); return NULL; } + sz = i + 1 + (size_a * PyLong_SHIFT - 1) / bits; + assert(sz >= 0); str = PyUnicode_FromUnicode(NULL, sz); if (str == NULL) return NULL; @@ -1719,7 +1720,7 @@ accumbits -= basebits; accum >>= basebits; } while (i < size_a-1 ? accumbits >= basebits : - accum > 0); + accum > 0); } } else { @@ -1734,7 +1735,8 @@ int power = 1; for (;;) { twodigits newpow = powbase * (twodigits)base; - if (newpow >> PyLong_SHIFT) /* doesn't fit in a digit */ + if (newpow >> PyLong_SHIFT) + /* doesn't fit in a digit */ break; powbase = (digit)newpow; ++power; @@ -1805,7 +1807,8 @@ do { } while ((*q++ = *p++) != '\0'); q--; - if (PyUnicode_Resize(&str, (Py_ssize_t) (q - PyUnicode_AS_UNICODE(str)))) { + if (PyUnicode_Resize(&str,(Py_ssize_t) (q - + PyUnicode_AS_UNICODE(str)))) { Py_DECREF(str); return NULL; } From python-checkins at python.org Sun Sep 13 14:08:22 2009 From: python-checkins at python.org (mark.dickinson) Date: Sun, 13 Sep 2009 12:08:22 -0000 Subject: [Python-checkins] r74772 - in python/branches/release31-maint: Objects/longobject.c Message-ID: Author: mark.dickinson Date: Sun Sep 13 14:08:21 2009 New Revision: 74772 Log: Merged revisions 74771 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74771 | mark.dickinson | 2009-09-13 13:06:08 +0100 (Sun, 13 Sep 2009) | 10 lines Merged revisions 74769 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74769 | mark.dickinson | 2009-09-13 12:56:13 +0100 (Sun, 13 Sep 2009) | 3 lines Fix potential signed-overflow bug in _PyLong_Format; also fix a couple of whitespace issues. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Objects/longobject.c Modified: python/branches/release31-maint/Objects/longobject.c ============================================================================== --- python/branches/release31-maint/Objects/longobject.c (original) +++ python/branches/release31-maint/Objects/longobject.c Sun Sep 13 14:08:21 2009 @@ -1659,7 +1659,7 @@ { register PyLongObject *a = (PyLongObject *)aa; PyObject *str; - Py_ssize_t i, j, sz; + Py_ssize_t i, sz; Py_ssize_t size_a; Py_UNICODE *p; int bits; @@ -1680,13 +1680,14 @@ i >>= 1; } i = 5; - j = size_a*PyLong_SHIFT + bits-1; - sz = i + j / bits; - if (j / PyLong_SHIFT < size_a || sz < i) { + /* ensure we don't get signed overflow in sz calculation */ + if (size_a > (PY_SSIZE_T_MAX - i) / PyLong_SHIFT) { PyErr_SetString(PyExc_OverflowError, "int is too large to format"); return NULL; } + sz = i + 1 + (size_a * PyLong_SHIFT - 1) / bits; + assert(sz >= 0); str = PyUnicode_FromUnicode(NULL, sz); if (str == NULL) return NULL; @@ -1719,7 +1720,7 @@ accumbits -= basebits; accum >>= basebits; } while (i < size_a-1 ? accumbits >= basebits : - accum > 0); + accum > 0); } } else { @@ -1734,7 +1735,8 @@ int power = 1; for (;;) { twodigits newpow = powbase * (twodigits)base; - if (newpow >> PyLong_SHIFT) /* doesn't fit in a digit */ + if (newpow >> PyLong_SHIFT) + /* doesn't fit in a digit */ break; powbase = (digit)newpow; ++power; @@ -1805,7 +1807,8 @@ do { } while ((*q++ = *p++) != '\0'); q--; - if (PyUnicode_Resize(&str, (Py_ssize_t) (q - PyUnicode_AS_UNICODE(str)))) { + if (PyUnicode_Resize(&str,(Py_ssize_t) (q - + PyUnicode_AS_UNICODE(str)))) { Py_DECREF(str); return NULL; } From python-checkins at python.org Sun Sep 13 17:09:24 2009 From: python-checkins at python.org (matthias.klose) Date: Sun, 13 Sep 2009 15:09:24 -0000 Subject: [Python-checkins] r74773 - in python/trunk: Lib/profile.py Misc/NEWS Message-ID: Author: matthias.klose Date: Sun Sep 13 17:09:24 2009 New Revision: 74773 Log: Issue #6635: Fix profiler printing usage message. Modified: python/trunk/Lib/profile.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/profile.py ============================================================================== --- python/trunk/Lib/profile.py (original) +++ python/trunk/Lib/profile.py Sun Sep 13 17:09:24 2009 @@ -605,9 +605,9 @@ sys.exit(2) (options, args) = parser.parse_args() - sys.argv[:] = args - if (len(sys.argv) > 0): + if (len(args) > 0): + sys.argv[:] = args sys.path.insert(0, os.path.dirname(sys.argv[0])) run('execfile(%r)' % (sys.argv[0],), options.outfile, options.sort) else: Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sun Sep 13 17:09:24 2009 @@ -366,6 +366,8 @@ Library ------- +- Issue #6635: Fix profiler printing usage message. + - Issue #6856: Add a filter keyword argument to TarFile.add(). - Issue #6163: Fixed HP-UX runtime library dir options in From python-checkins at python.org Sun Sep 13 17:12:48 2009 From: python-checkins at python.org (matthias.klose) Date: Sun, 13 Sep 2009 15:12:48 -0000 Subject: [Python-checkins] r74774 - in python/branches/release26-maint: Lib/profile.py Misc/NEWS Message-ID: Author: matthias.klose Date: Sun Sep 13 17:12:47 2009 New Revision: 74774 Log: Merged revisions 74773 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74773 | matthias.klose | 2009-09-13 17:09:24 +0200 (So, 13 Sep 2009) | 2 lines Issue #6635: Fix profiler printing usage message. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/profile.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/profile.py ============================================================================== --- python/branches/release26-maint/Lib/profile.py (original) +++ python/branches/release26-maint/Lib/profile.py Sun Sep 13 17:12:47 2009 @@ -605,9 +605,9 @@ sys.exit(2) (options, args) = parser.parse_args() - sys.argv[:] = args - if (len(sys.argv) > 0): + if (len(args) > 0): + sys.argv[:] = args sys.path.insert(0, os.path.dirname(sys.argv[0])) run('execfile(%r)' % (sys.argv[0],), options.outfile, options.sort) else: Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sun Sep 13 17:12:47 2009 @@ -74,6 +74,8 @@ Library ------- +- Issue #6635: Fix profiler printing usage message. + - Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning NaN or raising InvalidContext. Also, fix infinite recursion in long(Decimal('nan')). From python-checkins at python.org Sun Sep 13 17:18:53 2009 From: python-checkins at python.org (matthias.klose) Date: Sun, 13 Sep 2009 15:18:53 -0000 Subject: [Python-checkins] r74775 - in python/branches/py3k: Lib/profile.py Misc/NEWS Message-ID: Author: matthias.klose Date: Sun Sep 13 17:18:53 2009 New Revision: 74775 Log: Merged revisions 74773 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74773 | matthias.klose | 2009-09-13 17:09:24 +0200 (So, 13 Sep 2009) | 2 lines Issue #6635: Fix profiler printing usage message. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/profile.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/profile.py ============================================================================== --- python/branches/py3k/Lib/profile.py (original) +++ python/branches/py3k/Lib/profile.py Sun Sep 13 17:18:53 2009 @@ -598,9 +598,9 @@ sys.exit(2) (options, args) = parser.parse_args() - sys.argv[:] = args - if (len(sys.argv) > 0): + if (len(args) > 0): + sys.argv[:] = args sys.path.insert(0, os.path.dirname(sys.argv[0])) fp = open(sys.argv[0]) try: Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Sep 13 17:18:53 2009 @@ -70,6 +70,8 @@ Library ------- +- Issue #6635: Fix profiler printing usage message. + - Issue #6856: Add a filter keyword argument to TarFile.add(). - Issue #6888: pdb's alias command was broken when no arguments were given. From python-checkins at python.org Sun Sep 13 17:29:48 2009 From: python-checkins at python.org (matthias.klose) Date: Sun, 13 Sep 2009 15:29:48 -0000 Subject: [Python-checkins] r74776 - python/branches/release31-maint/Misc/NEWS Message-ID: Author: matthias.klose Date: Sun Sep 13 17:29:48 2009 New Revision: 74776 Log: Add NEWS entry for 3.1.2 and move all entries after 3.1.1 to the new entry. Modified: 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 Sep 13 17:29:48 2009 @@ -4,10 +4,10 @@ (editors: check NEWS.help for information about editing NEWS using ReST.) -What's New in Python 3.1.1? +What's New in Python 3.1.2? =========================== -*Release date: 2009-08-13* +*Release date: 20xx-xx-xx* Core and Builtins ----------------- @@ -17,6 +17,64 @@ - Issue #6750: A text file opened with io.open() could duplicate its output when writing from multiple threads at the same time. + +Library +------- + +- Issue #6888: pdb's alias command was broken when no arguments were given. + +- Issue #6795: int(Decimal('nan')) now raises ValueError instead of + returning NaN or raising InvalidContext. Also, fix infinite recursion + in long(Decimal('nan')). + +- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats + with no type specifier. + +- Issue #6239: ctypes.c_char_p return value must return bytes. + +- Issue #6838: Use a list to accumulate the value instead of + repeatedly concatenating strings in http.client's + HTTPResponse._read_chunked providing a significant speed increase + when downloading large files servend with a Transfer-Encoding of 'chunked'. + +- Have importlib raise ImportError if None is found in sys.modules for a + module. + +- Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN + payloads are now ordered by integer value rather than lexicographically. + +- Issue #6163: Fixed HP-UX runtime library dir options in + distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and + Michael Haubenwallner. + +Extension Modules +----------------- + +- Issue #6848: Fix curses module build failure on OS X 10.6. + +Build +----- + +- Issue #6802: Fix build issues on MacOSX 10.6 + +- Issue #6801 : symmetric_difference_update also accepts |. + Thanks to Carl Chenet. + +Documentation +------------- + +- Issue #6556: Fixed the Distutils configuration files location explanation + for Windows. + + +What's New in Python 3.1.1? +=========================== + +*Release date: 2009-08-13* + +Core and Builtins +----------------- + - Issue #6707: dir() on an uninitialized module caused a crash. - Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. @@ -52,28 +110,6 @@ Library ------- -- Issue #6888: pdb's alias command was broken when no arguments were given. - -- Issue #6795: int(Decimal('nan')) now raises ValueError instead of - returning NaN or raising InvalidContext. Also, fix infinite recursion - in long(Decimal('nan')). - -- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats - with no type specifier. - -- Issue #6239: ctypes.c_char_p return value must return bytes. - -- Issue #6838: Use a list to accumulate the value instead of - repeatedly concatenating strings in http.client's - HTTPResponse._read_chunked providing a significant speed increase - when downloading large files servend with a Transfer-Encoding of 'chunked'. - -- Have importlib raise ImportError if None is found in sys.modules for a - module. - -- Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN - payloads are now ordered by integer value rather than lexicographically. - - Issue #6106: telnetlib.Telnet.process_rawq doesn't handle default WILL/WONT DO/DONT correctly. @@ -134,8 +170,6 @@ Extension Modules ----------------- -- Issue #6848: Fix curses module build failure on OS X 10.6. - - Fix a segfault in expat. - Issue #4509: array.array objects are no longer modified after an operation @@ -145,20 +179,12 @@ Build ----- -- Issue #6802: Fix build issues on MacOSX 10.6 - - Issue 4601: 'make install' did not set the appropriate permissions on directories. - Issue 5390: Add uninstall icon independent of whether file extensions are installed. -Documentation -------------- - -- Issue #6556: Fixed the Distutils configuration files location explanation - for Windows. - Test ---- @@ -985,10 +1011,6 @@ Library ------- -- Issue #6163: Fixed HP-UX runtime library dir options in - distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and - Michael Haubenwallner. - - Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O. @@ -1488,9 +1510,6 @@ - Issue #4204: Fixed module build errors on FreeBSD 4. -- Issue #6801 : symmetric_difference_update also accepts |. - Thanks to Carl Chenet. - C-API ----- From python-checkins at python.org Sun Sep 13 17:31:15 2009 From: python-checkins at python.org (matthias.klose) Date: Sun, 13 Sep 2009 15:31:15 -0000 Subject: [Python-checkins] r74777 - in python/branches/release31-maint: Lib/profile.py Misc/NEWS Message-ID: Author: matthias.klose Date: Sun Sep 13 17:31:14 2009 New Revision: 74777 Log: Merged revisions 74775 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74775 | matthias.klose | 2009-09-13 17:18:53 +0200 (So, 13 Sep 2009) | 9 lines Merged revisions 74773 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74773 | matthias.klose | 2009-09-13 17:09:24 +0200 (So, 13 Sep 2009) | 2 lines Issue #6635: Fix profiler printing usage message. ........ ................ Modified: python/branches/release31-maint/Lib/profile.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/profile.py ============================================================================== --- python/branches/release31-maint/Lib/profile.py (original) +++ python/branches/release31-maint/Lib/profile.py Sun Sep 13 17:31:14 2009 @@ -605,9 +605,9 @@ sys.exit(2) (options, args) = parser.parse_args() - sys.argv[:] = args - if (len(sys.argv) > 0): + if (len(args) > 0): + sys.argv[:] = args sys.path.insert(0, os.path.dirname(sys.argv[0])) fp = open(sys.argv[0]) try: Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Sun Sep 13 17:31:14 2009 @@ -21,6 +21,8 @@ Library ------- +- Issue #6635: Fix profiler printing usage message. + - Issue #6888: pdb's alias command was broken when no arguments were given. - Issue #6795: int(Decimal('nan')) now raises ValueError instead of From python-checkins at python.org Sun Sep 13 17:51:52 2009 From: python-checkins at python.org (matthias.klose) Date: Sun, 13 Sep 2009 15:51:52 -0000 Subject: [Python-checkins] r74778 - python/branches/release26-maint/Misc/NEWS Message-ID: Author: matthias.klose Date: Sun Sep 13 17:51:51 2009 New Revision: 74778 Log: - Re-add 2.6.2 entry, move all entries made after 2.6.2 to the 2.6.3 entry. Modified: python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sun Sep 13 17:51:51 2009 @@ -186,6 +186,62 @@ - Issue #1202: zipfile module would cause a DeprecationWarning when storing files with a CRC32 > 2**31-1. +- Issue #6163: Fixed HP-UX runtime library dir options in + distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and + Michael Haubenwallner. + +- Issue #4660: If a multiprocessing.JoinableQueue.put() was preempted, it was + possible to get a spurious 'task_done() called too many times' error. + +- Issue #6595: The Decimal constructor now allows arbitrary Unicode + decimal digits in input, as recommended by the standard. Previously + it was restricted to accepting [0-9]. + +- 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. + +- 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. + +- Issue #6263: Fixed syntax error in distutils.cygwincompiler. + +- Issue #5201: distutils.sysconfig.parse_makefile() now understands `$$` + in Makefiles. This prevents compile errors when using syntax like: + `LDFLAGS='-rpath=\$$LIB:/some/other/path'`. Patch by Floris Bruynooghe. + +- Issue #6062: In distutils, fixed the package option of build_ext. Feedback + and tests on pywin32 by Tim Golden. + +- Issue #1309567: Fix linecache behavior of stripping subdirectories when + looking for files given by a relative filename. + +- Issue #6046: Fixed the library extension when distutils build_ext is used + inplace. Initial patch by Roumen Petrov. + +- Issue #6022: a test file was created in the current working directory by + test_get_outputs in Distutils. + +- Issue #5977: distutils build_ext.get_outputs was not taking into account the + inplace option. Initial patch by kxroberto. + +- Issue #5984: distutils.command.build_ext.check_extensions_list checks were broken + for old-style extensions. + +- Issue #5854: Updated __all__ to include some missing names and remove some + names which should not be exported. + +- Issue #5810: Fixed Distutils test_build_scripts so it uses + sysconfig.get_config_vars. + +- Issue #6865: Fix reference counting issue in the initialization of the pwd + module. + Extension Modules ----------------- @@ -208,6 +264,9 @@ - Issue #5726: Make Modules/ld_so_aix return the actual exit code of the linker, rather than always exit successfully. Patch by Floris Bruynooghe. +- Issue 5809: Specifying both --enable-framework and --enable-shared is + an error. Configure now explicity tells you about this. + Documentation ------------- @@ -225,6 +284,12 @@ incorrectly on __exit__. +What's New in Python 2.6.2 +========================== + +*Release date: 14-Apr-2009* + + What's New in Python 2.6.2 rc 1 =============================== @@ -324,59 +389,6 @@ Library ------- -- Issue #6163: Fixed HP-UX runtime library dir options in - distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and - Michael Haubenwallner. - -- Issue #4660: If a multiprocessing.JoinableQueue.put() was preempted, it was - possible to get a spurious 'task_done() called too many times' error. - -- Issue #6595: The Decimal constructor now allows arbitrary Unicode - decimal digits in input, as recommended by the standard. Previously - it was restricted to accepting [0-9]. - -- 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. - -- 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. - -- Issue #6263: Fixed syntax error in distutils.cygwincompiler. - -- Issue #5201: distutils.sysconfig.parse_makefile() now understands `$$` - in Makefiles. This prevents compile errors when using syntax like: - `LDFLAGS='-rpath=\$$LIB:/some/other/path'`. Patch by Floris Bruynooghe. - -- Issue #6062: In distutils, fixed the package option of build_ext. Feedback - and tests on pywin32 by Tim Golden. - -- Issue #1309567: Fix linecache behavior of stripping subdirectories when - looking for files given by a relative filename. - -- Issue #6046: Fixed the library extension when distutils build_ext is used - inplace. Initial patch by Roumen Petrov. - -- Issue #6022: a test file was created in the current working directory by - test_get_outputs in Distutils. - -- Issue #5977: distutils build_ext.get_outputs was not taking into account the - inplace option. Initial patch by kxroberto. - -- Issue #5984: distutils.command.build_ext.check_extensions_list checks were broken - for old-style extensions. - -- Issue #5854: Updated __all__ to include some missing names and remove some - names which should not be exported. - -- Issue #5810: Fixed Distutils test_build_scripts so it uses - sysconfig.get_config_vars. - - Issue #5741: don't disallow "%%" (which is an escape for "%") when setting a value in SafeConfigParser. @@ -697,9 +709,6 @@ Build ----- -- Issue 5809: Specifying both --enable-framework and --enable-shared is - an error. Configure now explicity tells you about this. - - Link the shared python library with $(MODLIBS). - Issue #5134: Silence compiler warnings when compiling sqlite with VC++. @@ -780,9 +789,6 @@ Library ------- -- Issue #6865: Fix reference counting issue in the initialization of the pwd - module. - - Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an exception. From python-checkins at python.org Sun Sep 13 18:13:37 2009 From: python-checkins at python.org (michael.foord) Date: Sun, 13 Sep 2009 16:13:37 -0000 Subject: [Python-checkins] r74779 - python/trunk/Doc/tutorial/inputoutput.rst Message-ID: Author: michael.foord Date: Sun Sep 13 18:13:36 2009 New Revision: 74779 Log: Change to tutorial wording for reading text / binary files on Windows. Issue #6301. 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 Sun Sep 13 18:13:36 2009 @@ -248,8 +248,8 @@ omitted. On Windows, ``'b'`` appended to the mode opens the file in binary mode, so there -are also modes like ``'rb'``, ``'wb'``, and ``'r+b'``. Windows makes a -distinction between text and binary files; the end-of-line characters in text +are also modes like ``'rb'``, ``'wb'``, and ``'r+b'``. Python on Windows makes +a distinction between text and binary files; the end-of-line characters in text files are automatically altered slightly when data is read or written. This behind-the-scenes modification to file data is fine for ASCII text files, but it'll corrupt binary data like that in :file:`JPEG` or :file:`EXE` files. Be From python-checkins at python.org Sun Sep 13 18:40:03 2009 From: python-checkins at python.org (michael.foord) Date: Sun, 13 Sep 2009 16:40:03 -0000 Subject: [Python-checkins] r74780 - in python/trunk: Doc/library/unittest.rst Doc/whatsnew/2.7.rst Lib/test/test_unittest.py Lib/unittest/case.py Message-ID: Author: michael.foord Date: Sun Sep 13 18:40:02 2009 New Revision: 74780 Log: Objects that compare equal automatically pass or fail assertAlmostEqual and assertNotAlmostEqual tests on unittest.TestCase. Issue 6567. Modified: python/trunk/Doc/library/unittest.rst python/trunk/Doc/whatsnew/2.7.rst python/trunk/Lib/test/test_unittest.py python/trunk/Lib/unittest/case.py Modified: python/trunk/Doc/library/unittest.rst ============================================================================== --- python/trunk/Doc/library/unittest.rst (original) +++ python/trunk/Doc/library/unittest.rst Sun Sep 13 18:40:02 2009 @@ -733,6 +733,9 @@ compare equal, the test will fail with the explanation given by *msg*, or :const:`None`. + .. versionchanged:: 2.7 + Objects that compare equal are automatically almost equal. + .. deprecated:: 2.7 :meth:`failUnlessAlmostEqual`. @@ -749,6 +752,9 @@ compare equal, the test will fail with the explanation given by *msg*, or :const:`None`. + .. versionchanged:: 2.7 + Objects that compare equal automatically fail. + .. deprecated:: 2.7 :meth:`failIfAlmostEqual`. Modified: python/trunk/Doc/whatsnew/2.7.rst ============================================================================== --- python/trunk/Doc/whatsnew/2.7.rst (original) +++ python/trunk/Doc/whatsnew/2.7.rst Sun Sep 13 18:40:02 2009 @@ -505,6 +505,10 @@ differences. :meth:`assertDictContainsSubset` checks whether all of the key/value pairs in *first* are found in *second*. + * :meth:`assertAlmostEqual` and :meth:`assertNotAlmostEqual` short-circuit + (automatically pass or fail without checking decimal places) if the objects + are equal. + * A new hook, :meth:`addTypeEqualityFunc` takes a type object and a function. The :meth:`assertEqual` method will use the function when both of the objects being compared are of the specified type. Modified: python/trunk/Lib/test/test_unittest.py ============================================================================== --- python/trunk/Lib/test/test_unittest.py (original) +++ python/trunk/Lib/test/test_unittest.py Sun Sep 13 18:40:02 2009 @@ -2989,6 +2989,11 @@ self.assertRaises(self.failureException, self.assertNotAlmostEqual, 0, .1+.1j, places=0) + self.assertAlmostEqual(float('inf'), float('inf')) + self.assertRaises(self.failureException, self.assertNotAlmostEqual, + float('inf'), float('inf')) + + def test_assertRaises(self): def _raise(e): raise e Modified: python/trunk/Lib/unittest/case.py ============================================================================== --- python/trunk/Lib/unittest/case.py (original) +++ python/trunk/Lib/unittest/case.py Sun Sep 13 18:40:02 2009 @@ -457,7 +457,13 @@ Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit). + + If the two objects compare equal then they will automatically + compare almost equal. """ + if first == second: + # shortcut for ite + return if round(abs(second-first), places) != 0: standardMsg = '%r != %r within %r places' % (first, second, places) msg = self._formatMessage(msg, standardMsg) @@ -470,8 +476,10 @@ Note that decimal places (from zero) are usually not the same as significant digits (measured from the most signficant digit). + + Objects that are equal automatically fail. """ - if round(abs(second-first), places) == 0: + if (first == second) or round(abs(second-first), places) == 0: standardMsg = '%r == %r within %r places' % (first, second, places) msg = self._formatMessage(msg, standardMsg) raise self.failureException(msg) From python-checkins at python.org Sun Sep 13 18:46:19 2009 From: python-checkins at python.org (michael.foord) Date: Sun, 13 Sep 2009 16:46:19 -0000 Subject: [Python-checkins] r74781 - in python/trunk/Doc/library: inspect.rst sys.rst Message-ID: Author: michael.foord Date: Sun Sep 13 18:46:19 2009 New Revision: 74781 Log: Note that sys._getframe is not guaranteed to exist in all implementations of Python, and a corresponding note in inspect.currentframe. Issue 6712. Modified: python/trunk/Doc/library/inspect.rst python/trunk/Doc/library/sys.rst Modified: python/trunk/Doc/library/inspect.rst ============================================================================== --- python/trunk/Doc/library/inspect.rst (original) +++ python/trunk/Doc/library/inspect.rst Sun Sep 13 18:46:19 2009 @@ -567,6 +567,11 @@ Return the frame object for the caller's stack frame. + This function relies on Python stack frame support in the interpreter, which + isn't guaranteed to exist in all implementations of Python. If running in + an implmentation without Python stack frame support this function returns + ``None``. + .. function:: stack([context]) Modified: python/trunk/Doc/library/sys.rst ============================================================================== --- python/trunk/Doc/library/sys.rst (original) +++ python/trunk/Doc/library/sys.rst Sun Sep 13 18:46:19 2009 @@ -417,7 +417,8 @@ that is deeper than the call stack, :exc:`ValueError` is raised. The default for *depth* is zero, returning the frame at the top of the call stack. - This function should be used for internal and specialized purposes only. + This function should be used for internal and specialized purposes only. It + is not guaranteed to exist in all implementations of Python. .. function:: getprofile() From python-checkins at python.org Sun Sep 13 19:07:46 2009 From: python-checkins at python.org (michael.foord) Date: Sun, 13 Sep 2009 17:07:46 -0000 Subject: [Python-checkins] r74782 - python/trunk/Doc/tutorial/modules.rst Message-ID: Author: michael.foord Date: Sun Sep 13 19:07:46 2009 New Revision: 74782 Log: Tutorial tweaks. Issue 6849. Modified: python/trunk/Doc/tutorial/modules.rst Modified: python/trunk/Doc/tutorial/modules.rst ============================================================================== --- python/trunk/Doc/tutorial/modules.rst (original) +++ python/trunk/Doc/tutorial/modules.rst Sun Sep 13 19:07:46 2009 @@ -103,6 +103,10 @@ This imports all names except those beginning with an underscore (``_``). +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 +use it to save typing in interactive sessions. + .. note:: For efficiency reasons, each module is only imported once per interpreter @@ -443,14 +447,9 @@ Now what happens when the user writes ``from sound.effects import *``? Ideally, one would hope that this somehow goes out to the filesystem, finds which -submodules are present in the package, and imports them all. Unfortunately, -this operation does not work very 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 -: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. +submodules are present in the package, and imports them all. This could take a +long time and importing sub-modules might have unwanted side-effects that should +only happen when the sub-module is explicitly imported. The only solution is for the package author to provide an explicit index of the package. The :keyword:`import` statement uses the following convention: if a package's @@ -485,10 +484,9 @@ 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 -use it to save typing in interactive sessions, and certain modules are designed -to export only names that follow certain patterns. +Although certain modules are designed to export only names that follow certain +patterns when you use ``import *``, it is still considered bad practise in +production code. Remember, there is nothing wrong with using ``from Package import specific_submodule``! In fact, this is the recommended notation unless the From python-checkins at python.org Sun Sep 13 19:28:35 2009 From: python-checkins at python.org (michael.foord) Date: Sun, 13 Sep 2009 17:28:35 -0000 Subject: [Python-checkins] r74783 - in python/trunk: Doc/whatsnew/2.7.rst Lib/test/test_unittest.py Lib/unittest/loader.py Message-ID: Author: michael.foord Date: Sun Sep 13 19:28:35 2009 New Revision: 74783 Log: unittest.TestLoader.loadTestsFromName honors the loader suiteClass attribute. Issue 6866. Modified: python/trunk/Doc/whatsnew/2.7.rst python/trunk/Lib/test/test_unittest.py python/trunk/Lib/unittest/loader.py Modified: python/trunk/Doc/whatsnew/2.7.rst ============================================================================== --- python/trunk/Doc/whatsnew/2.7.rst (original) +++ python/trunk/Doc/whatsnew/2.7.rst Sun Sep 13 19:28:35 2009 @@ -509,6 +509,9 @@ (automatically pass or fail without checking decimal places) if the objects are equal. + * :meth:`loadTestsFromName` properly honors the ``suiteClass`` attribute of + the :class:`TestLoader`. (Fixed by Mark Roddy; :issue:`6866`.) + * A new hook, :meth:`addTypeEqualityFunc` takes a type object and a function. The :meth:`assertEqual` method will use the function when both of the objects being compared are of the specified type. Modified: python/trunk/Lib/test/test_unittest.py ============================================================================== --- python/trunk/Lib/test/test_unittest.py (original) +++ python/trunk/Lib/test/test_unittest.py Sun Sep 13 19:28:35 2009 @@ -555,6 +555,47 @@ self.assertEqual(list(suite), [testcase_1]) # "The specifier name is a ``dotted name'' that may resolve ... to + # ... a callable object which returns a TestCase ... instance" + #***************************************************************** + #Override the suiteClass attribute to ensure that the suiteClass + #attribute is used + def test_loadTestsFromName__callable__TestCase_instance_ProperSuiteClass(self): + class SubTestSuite(unittest.TestSuite): + pass + m = types.ModuleType('m') + testcase_1 = unittest.FunctionTestCase(lambda: None) + def return_TestCase(): + return testcase_1 + m.return_TestCase = return_TestCase + + loader = unittest.TestLoader() + loader.suiteClass = SubTestSuite + suite = loader.loadTestsFromName('return_TestCase', m) + self.assertTrue(isinstance(suite, loader.suiteClass)) + self.assertEqual(list(suite), [testcase_1]) + + # "The specifier name is a ``dotted name'' that may resolve ... to + # ... a test method within a test case class" + #***************************************************************** + #Override the suiteClass attribute to ensure that the suiteClass + #attribute is used + def test_loadTestsFromName__relative_testmethod_ProperSuiteClass(self): + class SubTestSuite(unittest.TestSuite): + pass + m = types.ModuleType('m') + class MyTestCase(unittest.TestCase): + def test(self): + pass + m.testcase_1 = MyTestCase + + loader = unittest.TestLoader() + loader.suiteClass=SubTestSuite + suite = loader.loadTestsFromName('testcase_1.test', m) + self.assertTrue(isinstance(suite, loader.suiteClass)) + + self.assertEqual(list(suite), [MyTestCase('test')]) + + # "The specifier name is a ``dotted name'' that may resolve ... to # ... a callable object which returns a TestCase or TestSuite instance" # # What happens if the callable returns something else? Modified: python/trunk/Lib/unittest/loader.py ============================================================================== --- python/trunk/Lib/unittest/loader.py (original) +++ python/trunk/Lib/unittest/loader.py Sun Sep 13 19:28:35 2009 @@ -85,7 +85,7 @@ elif (isinstance(obj, types.UnboundMethodType) and isinstance(parent, type) and issubclass(parent, case.TestCase)): - return suite.TestSuite([parent(obj.__name__)]) + return self.suiteClass([parent(obj.__name__)]) elif isinstance(obj, suite.TestSuite): return obj elif hasattr(obj, '__call__'): @@ -93,7 +93,7 @@ if isinstance(test, suite.TestSuite): return test elif isinstance(test, case.TestCase): - return suite.TestSuite([test]) + return self.suiteClass([test]) else: raise TypeError("calling %s returned %s, not a test" % (obj, test)) From python-checkins at python.org Sun Sep 13 20:15:07 2009 From: python-checkins at python.org (georg.brandl) Date: Sun, 13 Sep 2009 18:15:07 -0000 Subject: [Python-checkins] r74784 - python/trunk/Doc/library/inspect.rst Message-ID: Author: georg.brandl Date: Sun Sep 13 20:15:07 2009 New Revision: 74784 Log: Typo fix. Modified: python/trunk/Doc/library/inspect.rst Modified: python/trunk/Doc/library/inspect.rst ============================================================================== --- python/trunk/Doc/library/inspect.rst (original) +++ python/trunk/Doc/library/inspect.rst Sun Sep 13 20:15:07 2009 @@ -569,7 +569,7 @@ This function relies on Python stack frame support in the interpreter, which isn't guaranteed to exist in all implementations of Python. If running in - an implmentation without Python stack frame support this function returns + an implementation without Python stack frame support this function returns ``None``. From python-checkins at python.org Sun Sep 13 21:07:03 2009 From: python-checkins at python.org (michael.foord) Date: Sun, 13 Sep 2009 19:07:03 -0000 Subject: [Python-checkins] r74785 - in python/trunk: Doc/library/unittest.rst Lib/test/test_unittest.py Lib/unittest/loader.py Lib/unittest/suite.py Message-ID: Author: michael.foord Date: Sun Sep 13 21:07:03 2009 New Revision: 74785 Log: Test discovery in unittest will only attempt to import modules that are importable; i.e. their names are valid Python identifiers. If an import fails during discovery this will be recorded as an error and test discovery will continue. Issue 6568. Modified: python/trunk/Doc/library/unittest.rst python/trunk/Lib/test/test_unittest.py python/trunk/Lib/unittest/loader.py python/trunk/Lib/unittest/suite.py Modified: python/trunk/Doc/library/unittest.rst ============================================================================== --- python/trunk/Doc/library/unittest.rst (original) +++ python/trunk/Doc/library/unittest.rst Sun Sep 13 21:07:03 2009 @@ -1257,12 +1257,17 @@ Find and return all test modules from the specified start directory, recursing into subdirectories to find them. Only test files that match - *pattern* will be loaded. (Using shell style pattern matching.) + *pattern* will be loaded. (Using shell style pattern matching.) Only + module names that are importable (i.e. are valid Python identifiers) will + be loaded. 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 importing a module fails, for example due to a syntax error, then this + will be recorded as a single error and discovery will continue. + If a test package name (directory with :file:`__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*, Modified: python/trunk/Lib/test/test_unittest.py ============================================================================== --- python/trunk/Lib/test/test_unittest.py (original) +++ python/trunk/Lib/test/test_unittest.py Sun Sep 13 21:07:03 2009 @@ -3469,31 +3469,19 @@ class TestDiscovery(TestCase): # Heavily mocked tests so I can avoid hitting the filesystem - def test_get_module_from_path(self): + def test_get_name_from_path(self): loader = unittest.TestLoader() - old_import = __import__ - def restore_import(): - __builtin__.__import__ = old_import - __builtin__.__import__ = lambda *_: None - self.addCleanup(restore_import) - - expected_module = object() - def del_module(): - del sys.modules['bar.baz'] - sys.modules['bar.baz'] = expected_module - self.addCleanup(del_module) - loader._top_level_dir = '/foo' - module = loader._get_module_from_path('/foo/bar/baz.py') - self.assertEqual(module, expected_module) + name = loader._get_name_from_path('/foo/bar/baz.py') + self.assertEqual(name, 'bar.baz') if not __debug__: # asserts are off return with self.assertRaises(AssertionError): - loader._get_module_from_path('/bar/baz.py') + loader._get_name_from_path('/bar/baz.py') def test_find_tests(self): loader = unittest.TestLoader() @@ -3509,7 +3497,7 @@ os.path.isdir = original_isdir path_lists = [['test1.py', 'test2.py', 'not_a_test.py', 'test_dir', - 'test.foo', 'another_dir'], + 'test.foo', 'test-not-a-module.py', 'another_dir'], ['test3.py', 'test4.py', ]] os.listdir = lambda path: path_lists.pop(0) self.addCleanup(restore_listdir) @@ -3525,16 +3513,16 @@ os.path.isfile = isfile self.addCleanup(restore_isfile) - loader._get_module_from_path = lambda path: path + ' module' + loader._get_module_from_name = lambda path: path + ' module' loader.loadTestsFromModule = lambda module: module + ' tests' loader._top_level_dir = '/foo' suite = list(loader._find_tests('/foo', 'test*.py')) - expected = [os.path.join('/foo', name) + ' module tests' for name in - ('test1.py', 'test2.py')] - expected.extend([os.path.join('/foo', 'test_dir', name) + ' module tests' for name in - ('test3.py', 'test4.py')]) + expected = [name + ' module tests' for name in + ('test1', 'test2')] + expected.extend([('test_dir.%s' % name) + ' module tests' for name in + ('test3', 'test4')]) self.assertEqual(suite, expected) def test_find_tests_with_package(self): @@ -3577,7 +3565,7 @@ def __eq__(self, other): return self.path == other.path - loader._get_module_from_path = lambda path: Module(path) + loader._get_module_from_name = lambda name: Module(name) def loadTestsFromModule(module, use_load_tests): if use_load_tests: raise self.failureException('use_load_tests should be False for packages') @@ -3592,15 +3580,12 @@ # We should have loaded tests from the test_directory package by calling load_tests # and directly from the test_directory2 package self.assertEqual(suite, - ['load_tests', - os.path.join('/foo', 'test_directory2') + ' module tests']) - self.assertEqual(Module.paths, [os.path.join('/foo', 'test_directory'), - os.path.join('/foo', 'test_directory2')]) + ['load_tests', 'test_directory2' + ' module tests']) + self.assertEqual(Module.paths, ['test_directory', 'test_directory2']) # load_tests should have been called once with loader, tests and pattern self.assertEqual(Module.load_tests_args, - [(loader, os.path.join('/foo', 'test_directory') + ' module tests', - 'test*')]) + [(loader, 'test_directory' + ' module tests', 'test*')]) def test_discover(self): loader = unittest.TestLoader() @@ -3640,6 +3625,25 @@ self.assertEqual(loader._top_level_dir, top_level_dir) self.assertEqual(_find_tests_args, [(start_dir, 'pattern')]) + def test_discover_with_modules_that_fail_to_import(self): + loader = unittest.TestLoader() + + listdir = os.listdir + os.listdir = lambda _: ['test_this_does_not_exist.py'] + isfile = os.path.isfile + os.path.isfile = lambda _: True + def restore(): + os.path.isfile = isfile + os.listdir = listdir + self.addCleanup(restore) + + suite = loader.discover('.') + self.assertEqual(suite.countTestCases(), 1) + test = list(list(suite)[0])[0] # extract test from suite + + with self.assertRaises(ImportError): + test.test_this_does_not_exist() + def test_command_line_handling_parseArgs(self): # Haha - take that uninstantiable class program = object.__new__(TestProgram) Modified: python/trunk/Lib/unittest/loader.py ============================================================================== --- python/trunk/Lib/unittest/loader.py (original) +++ python/trunk/Lib/unittest/loader.py Sun Sep 13 21:07:03 2009 @@ -1,7 +1,9 @@ """Loading unittests.""" import os +import re import sys +import traceback import types from fnmatch import fnmatch @@ -19,6 +21,26 @@ return K +# what about .pyc or .pyo (etc) +# we would need to avoid loading the same tests multiple times +# from '.py', '.pyc' *and* '.pyo' +VALID_MODULE_NAME = re.compile(r'[_a-z]\w*\.py$', re.IGNORECASE) + + +def _make_failed_import_test(name, suiteClass): + message = 'Failed to import test module: %s' % name + if hasattr(traceback, 'format_exc'): + # Python 2.3 compatibility + # format_exc returns two frames of discover.py as well + message += '\n%s' % traceback.format_exc() + + def testImportFailure(self): + raise ImportError(message) + attrs = {name: testImportFailure} + ModuleImportFailure = type('ModuleImportFailure', (case.TestCase,), attrs) + return suiteClass((ModuleImportFailure(name),)) + + class TestLoader(object): """ This class is responsible for loading tests according to various criteria @@ -161,17 +183,17 @@ 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.""" + def _get_name_from_path(self, path): 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" + _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, '.') + return name - name = relpath.replace(os.path.sep, '.') + def _get_module_from_name(self, name): __import__(name) return sys.modules[name] @@ -181,14 +203,20 @@ 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 os.path.isfile(full_path): + if not VALID_MODULE_NAME.match(path): + # valid Python identifiers only + continue + if fnmatch(path, pattern): # if the test file matches, load it - module = self._get_module_from_path(full_path) - yield self.loadTestsFromModule(module) + name = self._get_name_from_path(full_path) + try: + module = self._get_module_from_name(name) + except: + yield _make_failed_import_test(name, self.suiteClass) + else: + yield self.loadTestsFromModule(module) elif os.path.isdir(full_path): if not os.path.isfile(os.path.join(full_path, '__init__.py')): continue @@ -197,7 +225,8 @@ 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) + name = self._get_name_from_path(full_path) + package = self._get_module_from_name(name) load_tests = getattr(package, 'load_tests', None) tests = self.loadTestsFromModule(package, use_load_tests=False) Modified: python/trunk/Lib/unittest/suite.py ============================================================================== --- python/trunk/Lib/unittest/suite.py (original) +++ python/trunk/Lib/unittest/suite.py Sun Sep 13 21:07:03 2009 @@ -1,6 +1,7 @@ """TestSuite""" from . import case +from . import util class TestSuite(object): @@ -17,7 +18,7 @@ self.addTests(tests) def __repr__(self): - return "<%s tests=%s>" % (_strclass(self.__class__), list(self)) + return "<%s tests=%s>" % (util.strclass(self.__class__), list(self)) def __eq__(self, other): if not isinstance(other, self.__class__): From python-checkins at python.org Sun Sep 13 21:08:18 2009 From: python-checkins at python.org (michael.foord) Date: Sun, 13 Sep 2009 19:08:18 -0000 Subject: [Python-checkins] r74786 - python/trunk/Doc/library/unittest.rst Message-ID: Author: michael.foord Date: Sun Sep 13 21:08:18 2009 New Revision: 74786 Log: Remove an extraneous space in unittest documentation. Modified: python/trunk/Doc/library/unittest.rst Modified: python/trunk/Doc/library/unittest.rst ============================================================================== --- python/trunk/Doc/library/unittest.rst (original) +++ python/trunk/Doc/library/unittest.rst Sun Sep 13 21:08:18 2009 @@ -1273,7 +1273,7 @@ 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, + 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 From nnorwitz at gmail.com Mon Sep 14 02:31:33 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sun, 13 Sep 2009 20:31:33 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090914003133.GA7627@python.psfb.org> More important issues: ---------------------- test_softspace leaked [-70, 0, 0] references, sum=-70 test_urllib2_localnet leaked [0, 0, 280] references, sum=280 Less important issues: ---------------------- test_file2k leaked [0, 80, -80] references, sum=0 test_socketserver leaked [0, 0, 70] references, sum=70 test_sys leaked [-21, 0, 0] references, sum=-21 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 Sep 14 02:48:32 2009 From: python-checkins at python.org (ezio.melotti) Date: Mon, 14 Sep 2009 00:48:32 -0000 Subject: [Python-checkins] r74787 - python/trunk/Doc/using/mac.rst Message-ID: Author: ezio.melotti Date: Mon Sep 14 02:48:31 2009 New Revision: 74787 Log: #6904 - fix broken link Modified: python/trunk/Doc/using/mac.rst Modified: python/trunk/Doc/using/mac.rst ============================================================================== --- python/trunk/Doc/using/mac.rst (original) +++ python/trunk/Doc/using/mac.rst Mon Sep 14 02:48:31 2009 @@ -161,7 +161,7 @@ *PyQt* is another popular cross-platform GUI toolkit that runs natively on Mac OS X. More information can be found at -http://www.riverbankcomputing.co.uk/pyqt/. +http://www.riverbankcomputing.co.uk/software/pyqt/intro. Distributing Python Applications on the Mac From python-checkins at python.org Mon Sep 14 02:51:48 2009 From: python-checkins at python.org (ezio.melotti) Date: Mon, 14 Sep 2009 00:51:48 -0000 Subject: [Python-checkins] r74788 - in python/branches/py3k: Doc/using/mac.rst Message-ID: Author: ezio.melotti Date: Mon Sep 14 02:51:48 2009 New Revision: 74788 Log: Merged revisions 74787 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74787 | ezio.melotti | 2009-09-14 03:48:31 +0300 (Mon, 14 Sep 2009) | 1 line #6904 - fix broken link ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/using/mac.rst Modified: python/branches/py3k/Doc/using/mac.rst ============================================================================== --- python/branches/py3k/Doc/using/mac.rst (original) +++ python/branches/py3k/Doc/using/mac.rst Mon Sep 14 02:51:48 2009 @@ -153,7 +153,7 @@ *PyQt* is another popular cross-platform GUI toolkit that runs natively on Mac OS X. More information can be found at -http://www.riverbankcomputing.co.uk/pyqt/. +http://www.riverbankcomputing.co.uk/software/pyqt/intro. Distributing Python Applications on the Mac From python-checkins at python.org Mon Sep 14 03:09:45 2009 From: python-checkins at python.org (ezio.melotti) Date: Mon, 14 Sep 2009 01:09:45 -0000 Subject: [Python-checkins] r74789 - in python/branches/release31-maint: Doc/using/mac.rst Message-ID: Author: ezio.melotti Date: Mon Sep 14 03:09:44 2009 New Revision: 74789 Log: Merged revisions 74788 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74788 | ezio.melotti | 2009-09-14 03:51:48 +0300 (Mon, 14 Sep 2009) | 9 lines Merged revisions 74787 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74787 | ezio.melotti | 2009-09-14 03:48:31 +0300 (Mon, 14 Sep 2009) | 1 line #6904 - fix broken link ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/using/mac.rst Modified: python/branches/release31-maint/Doc/using/mac.rst ============================================================================== --- python/branches/release31-maint/Doc/using/mac.rst (original) +++ python/branches/release31-maint/Doc/using/mac.rst Mon Sep 14 03:09:44 2009 @@ -153,7 +153,7 @@ *PyQt* is another popular cross-platform GUI toolkit that runs natively on Mac OS X. More information can be found at -http://www.riverbankcomputing.co.uk/pyqt/. +http://www.riverbankcomputing.co.uk/software/pyqt/intro. Distributing Python Applications on the Mac From python-checkins at python.org Mon Sep 14 03:20:43 2009 From: python-checkins at python.org (ezio.melotti) Date: Mon, 14 Sep 2009 01:20:43 -0000 Subject: [Python-checkins] r74790 - in python/branches/release26-maint: Doc/using/mac.rst Message-ID: Author: ezio.melotti Date: Mon Sep 14 03:20:43 2009 New Revision: 74790 Log: Merged revisions 74787 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74787 | ezio.melotti | 2009-09-14 03:48:31 +0300 (Mon, 14 Sep 2009) | 1 line #6904 - fix broken link ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/using/mac.rst Modified: python/branches/release26-maint/Doc/using/mac.rst ============================================================================== --- python/branches/release26-maint/Doc/using/mac.rst (original) +++ python/branches/release26-maint/Doc/using/mac.rst Mon Sep 14 03:20:43 2009 @@ -161,7 +161,7 @@ *PyQt* is another popular cross-platform GUI toolkit that runs natively on Mac OS X. More information can be found at -http://www.riverbankcomputing.co.uk/pyqt/. +http://www.riverbankcomputing.co.uk/software/pyqt/intro. Distributing Python Applications on the Mac From nnorwitz at gmail.com Mon Sep 14 10:14:39 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Mon, 14 Sep 2009 01:14:39 -0700 Subject: [Python-checkins] Python Regression Test Failures refleak (2) In-Reply-To: <94bdd2610909041535n6d9391a3jcb5916b40b6948bf@mail.gmail.com> References: <20090904214213.GA4083@python.psfb.org> <94bdd2610909041535n6d9391a3jcb5916b40b6948bf@mail.gmail.com> Message-ID: On Fri, Sep 4, 2009 at 3:35 PM, Tarek Ziad? wrote: > On Fri, Sep 4, 2009 at 11:42 PM, Neal Norwitz wrote: >> More important issues: >> ---------------------- >> test_ssl leaked [0, 0, -339] references, sum=-339 >> test_urllib2_localnet leaked [-280, 0, 0] references, sum=-280 > > Hi, > > I can see test_distutils in this list from time to time. > > But I can't reproduce the problem on my computer to try to solve it. > > I thaught it was because of the tests order, but build.sh doesn't seem > to do a randomize test execution order. Correct. > If anyone hase any useful hint or explanation/doc pointer to track those leaks.. Typically the problem is something like threads that are non-deterministic. If threads are not shutdown cleanly, the number of references can vary during each test run. Notice that most of the tests with inconsistent ref counts are networking tests which generally use threads. n From nnorwitz at gmail.com Mon Sep 14 11:42:38 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Mon, 14 Sep 2009 05:42:38 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090914094238.GA10302@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, -420, 0] references, sum=-420 Less important issues: ---------------------- test_cmd_line leaked [0, -25, 0] references, sum=-25 test_smtplib leaked [91, 158, -249] references, sum=0 test_socketserver leaked [0, 0, 84] references, sum=84 test_sys leaked [42, -21, -21] references, sum=0 test_threadedtempfile leaked [0, 104, -104] references, sum=0 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 Mon Sep 14 16:08:59 2009 From: python-checkins at python.org (georg.brandl) Date: Mon, 14 Sep 2009 14:08:59 -0000 Subject: [Python-checkins] r74791 - python/trunk/Doc/library/__future__.rst Message-ID: Author: georg.brandl Date: Mon Sep 14 16:08:54 2009 New Revision: 74791 Log: #6574: list the future features in a table. Modified: python/trunk/Doc/library/__future__.rst Modified: python/trunk/Doc/library/__future__.rst ============================================================================== --- python/trunk/Doc/library/__future__.rst (original) +++ python/trunk/Doc/library/__future__.rst Mon Sep 14 16:08:54 2009 @@ -10,9 +10,9 @@ * To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing. -* To ensure that future_statements run under releases prior to 2.1 at least - yield runtime exceptions (the import of :mod:`__future__` will fail, because - there was no module of that name prior to 2.1). +* To ensure that :ref:`future statements ` run under releases prior to + 2.1 at least yield runtime exceptions (the import of :mod:`__future__` will + fail, because there was no module of that name prior to 2.1). * To document when incompatible changes were introduced, and when they will be --- or were --- made mandatory. This is a form of executable documentation, and @@ -56,7 +56,34 @@ dynamically compiled code. This flag is stored in the :attr:`compiler_flag` attribute on :class:`_Feature` instances. -No feature description will ever be deleted from :mod:`__future__`. +No feature description will ever be deleted from :mod:`__future__`. Since its +introduction in Python 2.1 the following features have found their way into the +language using this mechanism: + ++------------------+-------------+--------------+---------------------------------------------+ +| feature | optional in | mandatory in | effect | ++==================+=============+==============+=============================================+ +| nested_scopes | 2.1.0b1 | 2.2 | :pep:`227`: | +| | | | *Statically Nested Scopes* | ++------------------+-------------+--------------+---------------------------------------------+ +| generators | 2.2.0a1 | 2.3 | :pep:`255`: | +| | | | *Simple Generators* | ++------------------+-------------+--------------+---------------------------------------------+ +| division | 2.2.0a2 | 3.0 | :pep:`238`: | +| | | | *Changing the Division Operator* | ++------------------+-------------+--------------+---------------------------------------------+ +| absolute_import | 2.5.0a1 | 2.7 | :pep:`328`: | +| | | | *Imports: Multi-Line and Absolute/Relative* | ++------------------+-------------+--------------+---------------------------------------------+ +| with_statement | 2.5.0a1 | 2.6 | :pep:`343`: | +| | | | *The "with" Statement* | ++------------------+-------------+--------------+---------------------------------------------+ +| print_function | 2.6.0a2 | 3.0 | :pep:`3105`: | +| | | | *Make print a function* | ++------------------+-------------+--------------+---------------------------------------------+ +| unicode_literals | 2.6.0a2 | 3.0 | :pep:`3112`: | +| | | | *Bytes literals in Python 3000* | ++------------------+-------------+--------------+---------------------------------------------+ .. seealso:: From python-checkins at python.org Mon Sep 14 16:49:30 2009 From: python-checkins at python.org (georg.brandl) Date: Mon, 14 Sep 2009 14:49:30 -0000 Subject: [Python-checkins] r74792 - in python/branches/py3k: Doc/library/__future__.rst Message-ID: Author: georg.brandl Date: Mon Sep 14 16:49:30 2009 New Revision: 74792 Log: Recorded merge of revisions 74791 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74791 | georg.brandl | 2009-09-14 16:08:54 +0200 (Mo, 14 Sep 2009) | 1 line #6574: list the future features in a table. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/__future__.rst Modified: python/branches/py3k/Doc/library/__future__.rst ============================================================================== --- python/branches/py3k/Doc/library/__future__.rst (original) +++ python/branches/py3k/Doc/library/__future__.rst Mon Sep 14 16:49:30 2009 @@ -10,9 +10,9 @@ * To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing. -* To ensure that future_statements run under releases prior to 2.1 at least - yield runtime exceptions (the import of :mod:`__future__` will fail, because - there was no module of that name prior to 2.1). +* To ensure that :ref:`future statements ` run under releases prior to + 2.1 at least yield runtime exceptions (the import of :mod:`__future__` will + fail, because there was no module of that name prior to 2.1). * To document when incompatible changes were introduced, and when they will be --- or were --- made mandatory. This is a form of executable documentation, and @@ -56,7 +56,37 @@ dynamically compiled code. This flag is stored in the :attr:`compiler_flag` attribute on :class:`_Feature` instances. -No feature description will ever be deleted from :mod:`__future__`. +No feature description will ever be deleted from :mod:`__future__`. Since its +introduction in Python 2.1 the following features have found their way into the +language using this mechanism: + ++------------------+-------------+--------------+---------------------------------------------+ +| feature | optional in | mandatory in | effect | ++==================+=============+==============+=============================================+ +| nested_scopes | 2.1.0b1 | 2.2 | :pep:`227`: | +| | | | *Statically Nested Scopes* | ++------------------+-------------+--------------+---------------------------------------------+ +| generators | 2.2.0a1 | 2.3 | :pep:`255`: | +| | | | *Simple Generators* | ++------------------+-------------+--------------+---------------------------------------------+ +| division | 2.2.0a2 | 3.0 | :pep:`238`: | +| | | | *Changing the Division Operator* | ++------------------+-------------+--------------+---------------------------------------------+ +| absolute_import | 2.5.0a1 | 2.7 | :pep:`328`: | +| | | | *Imports: Multi-Line and Absolute/Relative* | ++------------------+-------------+--------------+---------------------------------------------+ +| with_statement | 2.5.0a1 | 2.6 | :pep:`343`: | +| | | | *The "with" Statement* | ++------------------+-------------+--------------+---------------------------------------------+ +| print_function | 2.6.0a2 | 3.0 | :pep:`3105`: | +| | | | *Make print a function* | ++------------------+-------------+--------------+---------------------------------------------+ +| unicode_literals | 2.6.0a2 | 3.0 | :pep:`3112`: | +| | | | *Bytes literals in Python 3000* | ++------------------+-------------+--------------+---------------------------------------------+ +| barry_as_FLUFL | 3.1.0a1 | 3.9 | :pep:`401`: | +| | | | *BDFL Retirement* | ++------------------+-------------+--------------+---------------------------------------------+ .. seealso:: From python-checkins at python.org Mon Sep 14 16:50:48 2009 From: python-checkins at python.org (georg.brandl) Date: Mon, 14 Sep 2009 14:50:48 -0000 Subject: [Python-checkins] r74793 - python/trunk/Doc/library/hashlib.rst Message-ID: Author: georg.brandl Date: Mon Sep 14 16:50:47 2009 New Revision: 74793 Log: #6908: fix association of hashlib hash attributes. Modified: python/trunk/Doc/library/hashlib.rst Modified: python/trunk/Doc/library/hashlib.rst ============================================================================== --- python/trunk/Doc/library/hashlib.rst (original) +++ python/trunk/Doc/library/hashlib.rst Mon Sep 14 16:50:47 2009 @@ -78,11 +78,11 @@ returned by the constructors: -.. data:: digest_size +.. data:: hash.digest_size The size of the resulting hash in bytes. -.. data:: block_size +.. data:: hash.block_size The internal block size of the hash algorithm in bytes. From ncoghlan at gmail.com Mon Sep 14 22:55:11 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Tue, 15 Sep 2009 06:55:11 +1000 Subject: [Python-checkins] r74792 - in python/branches/py3k: Doc/library/__future__.rst In-Reply-To: <4aae5801.0467f10a.038e.068cSMTPIN_ADDED@mx.google.com> References: <4aae5801.0467f10a.038e.068cSMTPIN_ADDED@mx.google.com> Message-ID: <4AAEADAF.70902@gmail.com> georg.brandl wrote: > ++------------------+-------------+--------------+---------------------------------------------+ > +| barry_as_FLUFL | 3.1.0a1 | 3.9 | :pep:`401`: | > +| | | | *BDFL Retirement* | > ++------------------+-------------+--------------+---------------------------------------------+ Do we want to document that one? It feels like documenting the antigravity module... Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From python-checkins at python.org Tue Sep 15 05:34:16 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 15 Sep 2009 03:34:16 -0000 Subject: [Python-checkins] r74794 - python/branches/py3k/Doc/c-api/init.rst Message-ID: Author: benjamin.peterson Date: Tue Sep 15 05:34:15 2009 New Revision: 74794 Log: Py_(Set|Get)PythonHome use wchar_t #6913 Modified: python/branches/py3k/Doc/c-api/init.rst Modified: python/branches/py3k/Doc/c-api/init.rst ============================================================================== --- python/branches/py3k/Doc/c-api/init.rst (original) +++ python/branches/py3k/Doc/c-api/init.rst Tue Sep 15 05:34:15 2009 @@ -366,14 +366,14 @@ check w/ Guido. -.. cfunction:: void Py_SetPythonHome(char *home) +.. cfunction:: void Py_SetPythonHome(wchar_t *home) Set the default "home" directory, that is, the location of the standard Python libraries. The libraries are searched in :file:`{home}/lib/python{version}` and :file:`{home}/lib/python{version}`. -.. cfunction:: char* Py_GetPythonHome() +.. cfunction:: w_char* Py_GetPythonHome() Return the default "home", that is, the value set by a previous call to :cfunc:`Py_SetPythonHome`, or the value of the :envvar:`PYTHONHOME` From python-checkins at python.org Tue Sep 15 05:36:26 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 15 Sep 2009 03:36:26 -0000 Subject: [Python-checkins] r74795 - python/trunk/Doc/c-api/init.rst Message-ID: Author: benjamin.peterson Date: Tue Sep 15 05:36:26 2009 New Revision: 74795 Log: Py_SetPythonHome uses static storage #6913 Modified: python/trunk/Doc/c-api/init.rst Modified: python/trunk/Doc/c-api/init.rst ============================================================================== --- python/trunk/Doc/c-api/init.rst (original) +++ python/trunk/Doc/c-api/init.rst Tue Sep 15 05:36:26 2009 @@ -374,6 +374,10 @@ Set the default "home" directory, that is, the location of the standard Python libraries. The libraries are searched in :file:`{home}/lib/python{version}` and :file:`{home}/lib/python{version}`. + The argument should point to a zero-terminated character string in static + storage whose contents will not change for the duration of the program's + execution. No code in the Python interpreter will change the contents of + this storage. .. cfunction:: char* Py_GetPythonHome() From python-checkins at python.org Tue Sep 15 05:38:09 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 15 Sep 2009 03:38:09 -0000 Subject: [Python-checkins] r74796 - in python/branches/release31-maint: Doc/c-api/init.rst Message-ID: Author: benjamin.peterson Date: Tue Sep 15 05:38:09 2009 New Revision: 74796 Log: Merged revisions 74794 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74794 | benjamin.peterson | 2009-09-14 22:34:15 -0500 (Mon, 14 Sep 2009) | 1 line Py_(Set|Get)PythonHome use wchar_t #6913 ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/c-api/init.rst Modified: python/branches/release31-maint/Doc/c-api/init.rst ============================================================================== --- python/branches/release31-maint/Doc/c-api/init.rst (original) +++ python/branches/release31-maint/Doc/c-api/init.rst Tue Sep 15 05:38:09 2009 @@ -366,14 +366,14 @@ check w/ Guido. -.. cfunction:: void Py_SetPythonHome(char *home) +.. cfunction:: void Py_SetPythonHome(wchar_t *home) Set the default "home" directory, that is, the location of the standard Python libraries. The libraries are searched in :file:`{home}/lib/python{version}` and :file:`{home}/lib/python{version}`. -.. cfunction:: char* Py_GetPythonHome() +.. cfunction:: w_char* Py_GetPythonHome() Return the default "home", that is, the value set by a previous call to :cfunc:`Py_SetPythonHome`, or the value of the :envvar:`PYTHONHOME` From python-checkins at python.org Tue Sep 15 05:39:15 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 15 Sep 2009 03:39:15 -0000 Subject: [Python-checkins] r74797 - in python/branches/release26-maint: Doc/c-api/init.rst Message-ID: Author: benjamin.peterson Date: Tue Sep 15 05:39:14 2009 New Revision: 74797 Log: Merged revisions 74795 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74795 | benjamin.peterson | 2009-09-14 22:36:26 -0500 (Mon, 14 Sep 2009) | 1 line Py_SetPythonHome uses static storage #6913 ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/c-api/init.rst Modified: python/branches/release26-maint/Doc/c-api/init.rst ============================================================================== --- python/branches/release26-maint/Doc/c-api/init.rst (original) +++ python/branches/release26-maint/Doc/c-api/init.rst Tue Sep 15 05:39:14 2009 @@ -374,6 +374,10 @@ Set the default "home" directory, that is, the location of the standard Python libraries. The libraries are searched in :file:`{home}/lib/python{version}` and :file:`{home}/lib/python{version}`. + The argument should point to a zero-terminated character string in static + storage whose contents will not change for the duration of the program's + execution. No code in the Python interpreter will change the contents of + this storage. .. cfunction:: char* Py_GetPythonHome() From nnorwitz at gmail.com Tue Sep 15 11:41:56 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 15 Sep 2009 05:41:56 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090915094156.GA9474@python.psfb.org> More important issues: ---------------------- test_ssl leaked [339, 0, 0] references, sum=339 Less important issues: ---------------------- test_sys leaked [42, -21, -21] references, sum=0 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 Tue Sep 15 20:33:38 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 15 Sep 2009 18:33:38 -0000 Subject: [Python-checkins] r74798 - python/trunk/setup.py Message-ID: Author: ronald.oussoren Date: Tue Sep 15 20:33:33 2009 New Revision: 74798 Log: MacOSX: detect the architectures supported by Tk.framework and build _tkinter only for those architectures. This replaces the hardcoded solution that is no longer valid now that 64-bit capable versions of Tk are available on OSX. Modified: python/trunk/setup.py Modified: python/trunk/setup.py ============================================================================== --- python/trunk/setup.py (original) +++ python/trunk/setup.py Tue Sep 15 20:33:33 2009 @@ -1499,19 +1499,17 @@ # architectures. cflags = sysconfig.get_config_vars('CFLAGS')[0] archs = re.findall('-arch\s+(\w+)', cflags) - if 'x86_64' in archs or 'ppc64' in archs: - try: - archs.remove('x86_64') - except ValueError: - pass - try: - archs.remove('ppc64') - except ValueError: - pass - - for a in archs: - frameworks.append('-arch') - frameworks.append(a) + fp = os.popen("file %s/Tk.framework/Tk | grep 'for architecture'"%(F,)) + detected_archs = [] + for ln in fp: + a = ln.split()[-1] + if a in archs: + detected_archs.append(ln.split()[-1]) + fp.close() + + for a in detected_archs: + frameworks.append('-arch') + frameworks.append(a) ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'], define_macros=[('WITH_APPINIT', 1)], From python-checkins at python.org Tue Sep 15 20:41:43 2009 From: python-checkins at python.org (ezio.melotti) Date: Tue, 15 Sep 2009 18:41:43 -0000 Subject: [Python-checkins] r74799 - python/trunk/Doc/library/mailbox.rst Message-ID: Author: ezio.melotti Date: Tue Sep 15 20:41:43 2009 New Revision: 74799 Log: #6917 - typo in method name Modified: python/trunk/Doc/library/mailbox.rst Modified: python/trunk/Doc/library/mailbox.rst ============================================================================== --- python/trunk/Doc/library/mailbox.rst (original) +++ python/trunk/Doc/library/mailbox.rst Tue Sep 15 20:41:43 2009 @@ -336,7 +336,7 @@ Return a list of the names of all folders. - .. method:: .et_folder(folder) + .. method:: get_folder(folder) Return a :class:`Maildir` instance representing the folder whose name is *folder*. A :exc:`NoSuchMailboxError` exception is raised if the folder From python-checkins at python.org Tue Sep 15 20:46:35 2009 From: python-checkins at python.org (ezio.melotti) Date: Tue, 15 Sep 2009 18:46:35 -0000 Subject: [Python-checkins] r74800 - in python/branches/release26-maint: Doc/library/mailbox.rst Message-ID: Author: ezio.melotti Date: Tue Sep 15 20:46:35 2009 New Revision: 74800 Log: Merged revisions 74799 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74799 | ezio.melotti | 2009-09-15 21:41:43 +0300 (Tue, 15 Sep 2009) | 1 line #6917 - typo in method name ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/mailbox.rst Modified: python/branches/release26-maint/Doc/library/mailbox.rst ============================================================================== --- python/branches/release26-maint/Doc/library/mailbox.rst (original) +++ python/branches/release26-maint/Doc/library/mailbox.rst Tue Sep 15 20:46:35 2009 @@ -336,7 +336,7 @@ Return a list of the names of all folders. - .. method:: .et_folder(folder) + .. method:: get_folder(folder) Return a :class:`Maildir` instance representing the folder whose name is *folder*. A :exc:`NoSuchMailboxError` exception is raised if the folder From python-checkins at python.org Tue Sep 15 20:47:36 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 15 Sep 2009 18:47:36 -0000 Subject: [Python-checkins] r74801 - in python/branches/release26-maint: setup.py Message-ID: Author: ronald.oussoren Date: Tue Sep 15 20:47:35 2009 New Revision: 74801 Log: Merged revisions 74798 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74798 | ronald.oussoren | 2009-09-15 20:33:33 +0200 (Tue, 15 Sep 2009) | 8 lines MacOSX: detect the architectures supported by Tk.framework and build _tkinter only for those architectures. This replaces the hardcoded solution that is no longer valid now that 64-bit capable versions of Tk are available on OSX. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/setup.py Modified: python/branches/release26-maint/setup.py ============================================================================== --- python/branches/release26-maint/setup.py (original) +++ python/branches/release26-maint/setup.py Tue Sep 15 20:47:35 2009 @@ -1501,19 +1501,17 @@ # architectures. cflags = sysconfig.get_config_vars('CFLAGS')[0] archs = re.findall('-arch\s+(\w+)', cflags) - if 'x86_64' in archs or 'ppc64' in archs: - try: - archs.remove('x86_64') - except ValueError: - pass - try: - archs.remove('ppc64') - except ValueError: - pass - - for a in archs: - frameworks.append('-arch') - frameworks.append(a) + fp = os.popen("file %s/Tk.framework/Tk | grep 'for architecture'"%(F,)) + detected_archs = [] + for ln in fp: + a = ln.split()[-1] + if a in archs: + detected_archs.append(ln.split()[-1]) + fp.close() + + for a in detected_archs: + frameworks.append('-arch') + frameworks.append(a) ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'], define_macros=[('WITH_APPINIT', 1)], From python-checkins at python.org Tue Sep 15 20:51:37 2009 From: python-checkins at python.org (ezio.melotti) Date: Tue, 15 Sep 2009 18:51:37 -0000 Subject: [Python-checkins] r74802 - in python/branches/py3k: Doc/library/mailbox.rst Message-ID: Author: ezio.melotti Date: Tue Sep 15 20:51:37 2009 New Revision: 74802 Log: Merged revisions 74799 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74799 | ezio.melotti | 2009-09-15 21:41:43 +0300 (Tue, 15 Sep 2009) | 1 line #6917 - typo in method name ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/mailbox.rst Modified: python/branches/py3k/Doc/library/mailbox.rst ============================================================================== --- python/branches/py3k/Doc/library/mailbox.rst (original) +++ python/branches/py3k/Doc/library/mailbox.rst Tue Sep 15 20:51:37 2009 @@ -329,7 +329,7 @@ Return a list of the names of all folders. - .. method:: .et_folder(folder) + .. method:: get_folder(folder) Return a :class:`Maildir` instance representing the folder whose name is *folder*. A :exc:`NoSuchMailboxError` exception is raised if the folder From python-checkins at python.org Tue Sep 15 20:57:03 2009 From: python-checkins at python.org (ezio.melotti) Date: Tue, 15 Sep 2009 18:57:03 -0000 Subject: [Python-checkins] r74803 - in python/branches/release31-maint: Doc/library/mailbox.rst Message-ID: Author: ezio.melotti Date: Tue Sep 15 20:57:03 2009 New Revision: 74803 Log: Merged revisions 74802 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74802 | ezio.melotti | 2009-09-15 21:51:37 +0300 (Tue, 15 Sep 2009) | 9 lines Merged revisions 74799 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74799 | ezio.melotti | 2009-09-15 21:41:43 +0300 (Tue, 15 Sep 2009) | 1 line #6917 - typo in method name ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/mailbox.rst Modified: python/branches/release31-maint/Doc/library/mailbox.rst ============================================================================== --- python/branches/release31-maint/Doc/library/mailbox.rst (original) +++ python/branches/release31-maint/Doc/library/mailbox.rst Tue Sep 15 20:57:03 2009 @@ -329,7 +329,7 @@ Return a list of the names of all folders. - .. method:: .et_folder(folder) + .. method:: get_folder(folder) Return a :class:`Maildir` instance representing the folder whose name is *folder*. A :exc:`NoSuchMailboxError` exception is raised if the folder From python-checkins at python.org Tue Sep 15 21:07:58 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 15 Sep 2009 19:07:58 -0000 Subject: [Python-checkins] r74804 - python/branches/py3k/setup.py Message-ID: Author: ronald.oussoren Date: Tue Sep 15 21:07:58 2009 New Revision: 74804 Log: Merged revisions 74798 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74798 | ronald.oussoren | 2009-09-15 20:33:33 +0200 (Tue, 15 Sep 2009) | 8 lines MacOSX: detect the architectures supported by Tk.framework and build _tkinter only for those architectures. This replaces the hardcoded solution that is no longer valid now that 64-bit capable versions of Tk are available on OSX. ........ Modified: python/branches/py3k/setup.py Modified: python/branches/py3k/setup.py ============================================================================== --- python/branches/py3k/setup.py (original) +++ python/branches/py3k/setup.py Tue Sep 15 21:07:58 2009 @@ -1274,19 +1274,26 @@ # architectures. cflags = sysconfig.get_config_vars('CFLAGS')[0] archs = re.findall('-arch\s+(\w+)', cflags) - if 'x86_64' in archs or 'ppc64' in archs: - try: - archs.remove('x86_64') - except ValueError: - pass - try: - archs.remove('ppc64') - except ValueError: - pass - - for a in archs: - frameworks.append('-arch') - frameworks.append(a) + + tmpfile = os.path.join(self.build_temp, 'tk.arch') + if not os.path.exists(self.build_temp): + os.makedirs(self.build_temp) + + # Note: cannot use os.popen or subprocess here, that + # requires extensions that are not available here. + os.system("file %s/Tk.framework/Tk | grep 'for architecture' > %s"%(F, tmpfile)) + fp = open(tmpfile) + detected_archs = [] + for ln in fp: + a = ln.split()[-1] + if a in archs: + detected_archs.append(ln.split()[-1]) + fp.close() + os.unlink(tmpfile) + + for a in detected_archs: + frameworks.append('-arch') + frameworks.append(a) ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'], define_macros=[('WITH_APPINIT', 1)], From python-checkins at python.org Tue Sep 15 21:11:53 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 15 Sep 2009 19:11:53 -0000 Subject: [Python-checkins] r74805 - in python/branches/release31-maint: setup.py Message-ID: Author: ronald.oussoren Date: Tue Sep 15 21:11:53 2009 New Revision: 74805 Log: Merged revisions 74804 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74804 | ronald.oussoren | 2009-09-15 21:07:58 +0200 (Tue, 15 Sep 2009) | 15 lines Merged revisions 74798 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74798 | ronald.oussoren | 2009-09-15 20:33:33 +0200 (Tue, 15 Sep 2009) | 8 lines MacOSX: detect the architectures supported by Tk.framework and build _tkinter only for those architectures. This replaces the hardcoded solution that is no longer valid now that 64-bit capable versions of Tk are available on OSX. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/setup.py Modified: python/branches/release31-maint/setup.py ============================================================================== --- python/branches/release31-maint/setup.py (original) +++ python/branches/release31-maint/setup.py Tue Sep 15 21:11:53 2009 @@ -1272,19 +1272,26 @@ # architectures. cflags = sysconfig.get_config_vars('CFLAGS')[0] archs = re.findall('-arch\s+(\w+)', cflags) - if 'x86_64' in archs or 'ppc64' in archs: - try: - archs.remove('x86_64') - except ValueError: - pass - try: - archs.remove('ppc64') - except ValueError: - pass - - for a in archs: - frameworks.append('-arch') - frameworks.append(a) + + tmpfile = os.path.join(self.build_temp, 'tk.arch') + if not os.path.exists(self.build_temp): + os.makedirs(self.build_temp) + + # Note: cannot use os.popen or subprocess here, that + # requires extensions that are not available here. + os.system("file %s/Tk.framework/Tk | grep 'for architecture' > %s"%(F, tmpfile)) + fp = open(tmpfile) + detected_archs = [] + for ln in fp: + a = ln.split()[-1] + if a in archs: + detected_archs.append(ln.split()[-1]) + fp.close() + os.unlink(tmpfile) + + for a in detected_archs: + frameworks.append('-arch') + frameworks.append(a) ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'], define_macros=[('WITH_APPINIT', 1)], From python-checkins at python.org Tue Sep 15 21:13:15 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 15 Sep 2009 19:13:15 -0000 Subject: [Python-checkins] r74806 - in python/trunk: Doc/distutils/apiref.rst Lib/distutils/util.py Message-ID: Author: ronald.oussoren Date: Tue Sep 15 21:13:15 2009 New Revision: 74806 Log: Finish support for --with-universal-archs=intel and --with-universal-archs=3-way (issue6245) Modified: python/trunk/Doc/distutils/apiref.rst python/trunk/Lib/distutils/util.py Modified: python/trunk/Doc/distutils/apiref.rst ============================================================================== --- python/trunk/Doc/distutils/apiref.rst (original) +++ python/trunk/Doc/distutils/apiref.rst Tue Sep 15 21:13:15 2009 @@ -1095,7 +1095,10 @@ the univeral binary status instead of the architecture of the current processor. For 32-bit universal binaries the architecture is ``fat``, for 64-bit universal binaries the architecture is ``fat64``, and - for 4-way universal binaries the architecture is ``universal``. + for 4-way universal binaries the architecture is ``universal``. Starting + from Python 2.7 and Python 3.2 the architecture ``fat3`` is used for + a 3-way universal build (ppc, i386, x86_64) and ``intel`` is used for + a univeral build with the i386 and x86_64 architectures Examples of returned values on Mac OS X: @@ -1105,6 +1108,8 @@ * ``macosx-10.5-universal`` + * ``macosx-10.6-intel`` + .. % XXX isn't this also provided by some other non-distutils module? Modified: python/trunk/Lib/distutils/util.py ============================================================================== --- python/trunk/Lib/distutils/util.py (original) +++ python/trunk/Lib/distutils/util.py Tue Sep 15 21:13:15 2009 @@ -144,11 +144,26 @@ machine = 'fat' cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in cflags: - if '-arch i386' in cflags: - machine = 'universal' - else: - machine = 'fat64' + archs = re.findall('-arch\s+(\S+)', cflags) + archs.sort() + archs = tuple(archs) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From python-checkins at python.org Tue Sep 15 21:14:37 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 15 Sep 2009 19:14:37 -0000 Subject: [Python-checkins] r74807 - in python/branches/release26-maint: Doc/distutils/apiref.rst Lib/distutils/util.py Message-ID: Author: ronald.oussoren Date: Tue Sep 15 21:14:37 2009 New Revision: 74807 Log: Merged revisions 74806 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74806 | ronald.oussoren | 2009-09-15 21:13:15 +0200 (Tue, 15 Sep 2009) | 3 lines Finish support for --with-universal-archs=intel and --with-universal-archs=3-way (issue6245) ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/distutils/apiref.rst python/branches/release26-maint/Lib/distutils/util.py Modified: python/branches/release26-maint/Doc/distutils/apiref.rst ============================================================================== --- python/branches/release26-maint/Doc/distutils/apiref.rst (original) +++ python/branches/release26-maint/Doc/distutils/apiref.rst Tue Sep 15 21:14:37 2009 @@ -1112,7 +1112,10 @@ the univeral binary status instead of the architecture of the current processor. For 32-bit universal binaries the architecture is ``fat``, for 64-bit universal binaries the architecture is ``fat64``, and - for 4-way universal binaries the architecture is ``universal``. + for 4-way universal binaries the architecture is ``universal``. Starting + from Python 2.7 and Python 3.2 the architecture ``fat3`` is used for + a 3-way universal build (ppc, i386, x86_64) and ``intel`` is used for + a univeral build with the i386 and x86_64 architectures Examples of returned values on Mac OS X: @@ -1122,6 +1125,8 @@ * ``macosx-10.5-universal`` + * ``macosx-10.6-intel`` + .. % XXX isn't this also provided by some other non-distutils module? Modified: python/branches/release26-maint/Lib/distutils/util.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/util.py (original) +++ python/branches/release26-maint/Lib/distutils/util.py Tue Sep 15 21:14:37 2009 @@ -142,11 +142,26 @@ machine = 'fat' cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in cflags: - if '-arch i386' in cflags: - machine = 'universal' - else: - machine = 'fat64' + archs = re.findall('-arch\s+(\S+)', cflags) + archs.sort() + archs = tuple(archs) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From python-checkins at python.org Tue Sep 15 21:16:02 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 15 Sep 2009 19:16:02 -0000 Subject: [Python-checkins] r74808 - in python/branches/py3k: Doc/distutils/apiref.rst Lib/distutils/util.py Message-ID: Author: ronald.oussoren Date: Tue Sep 15 21:16:02 2009 New Revision: 74808 Log: Merged revisions 74806 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74806 | ronald.oussoren | 2009-09-15 21:13:15 +0200 (Tue, 15 Sep 2009) | 3 lines Finish support for --with-universal-archs=intel and --with-universal-archs=3-way (issue6245) ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/distutils/apiref.rst python/branches/py3k/Lib/distutils/util.py Modified: python/branches/py3k/Doc/distutils/apiref.rst ============================================================================== --- python/branches/py3k/Doc/distutils/apiref.rst (original) +++ python/branches/py3k/Doc/distutils/apiref.rst Tue Sep 15 21:16:02 2009 @@ -1095,7 +1095,10 @@ the univeral binary status instead of the architecture of the current processor. For 32-bit universal binaries the architecture is ``fat``, for 64-bit universal binaries the architecture is ``fat64``, and - for 4-way universal binaries the architecture is ``universal``. + for 4-way universal binaries the architecture is ``universal``. Starting + from Python 2.7 and Python 3.2 the architecture ``fat3`` is used for + a 3-way universal build (ppc, i386, x86_64) and ``intel`` is used for + a univeral build with the i386 and x86_64 architectures Examples of returned values on Mac OS X: @@ -1105,6 +1108,8 @@ * ``macosx-10.5-universal`` + * ``macosx-10.6-intel`` + .. % XXX isn't this also provided by some other non-distutils module? Modified: python/branches/py3k/Lib/distutils/util.py ============================================================================== --- python/branches/py3k/Lib/distutils/util.py (original) +++ python/branches/py3k/Lib/distutils/util.py Tue Sep 15 21:16:02 2009 @@ -144,11 +144,26 @@ machine = 'fat' cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in cflags: - if '-arch i386' in cflags: - machine = 'universal' - else: - machine = 'fat64' + archs = re.findall('-arch\s+(\S+)', cflags) + archs.sort() + archs = tuple(archs) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From python-checkins at python.org Tue Sep 15 21:16:40 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 15 Sep 2009 19:16:40 -0000 Subject: [Python-checkins] r74809 - in python/branches/release31-maint: Doc/distutils/apiref.rst Lib/distutils/util.py Message-ID: Author: ronald.oussoren Date: Tue Sep 15 21:16:40 2009 New Revision: 74809 Log: Merged revisions 74808 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74808 | ronald.oussoren | 2009-09-15 21:16:02 +0200 (Tue, 15 Sep 2009) | 10 lines Merged revisions 74806 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74806 | ronald.oussoren | 2009-09-15 21:13:15 +0200 (Tue, 15 Sep 2009) | 3 lines Finish support for --with-universal-archs=intel and --with-universal-archs=3-way (issue6245) ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/distutils/apiref.rst python/branches/release31-maint/Lib/distutils/util.py Modified: python/branches/release31-maint/Doc/distutils/apiref.rst ============================================================================== --- python/branches/release31-maint/Doc/distutils/apiref.rst (original) +++ python/branches/release31-maint/Doc/distutils/apiref.rst Tue Sep 15 21:16:40 2009 @@ -1095,7 +1095,10 @@ the univeral binary status instead of the architecture of the current processor. For 32-bit universal binaries the architecture is ``fat``, for 64-bit universal binaries the architecture is ``fat64``, and - for 4-way universal binaries the architecture is ``universal``. + for 4-way universal binaries the architecture is ``universal``. Starting + from Python 2.7 and Python 3.2 the architecture ``fat3`` is used for + a 3-way universal build (ppc, i386, x86_64) and ``intel`` is used for + a univeral build with the i386 and x86_64 architectures Examples of returned values on Mac OS X: @@ -1105,6 +1108,8 @@ * ``macosx-10.5-universal`` + * ``macosx-10.6-intel`` + .. % XXX isn't this also provided by some other non-distutils module? Modified: python/branches/release31-maint/Lib/distutils/util.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/util.py (original) +++ python/branches/release31-maint/Lib/distutils/util.py Tue Sep 15 21:16:40 2009 @@ -141,11 +141,26 @@ machine = 'fat' cflags = get_config_vars().get('CFLAGS') - if '-arch x86_64' in cflags: - if '-arch i386' in cflags: - machine = 'universal' - else: - machine = 'fat64' + archs = re.findall('-arch\s+(\S+)', cflags) + archs.sort() + archs = tuple(archs) + + if len(archs) == 1: + machine = archs[0] + elif archs == ('i386', 'ppc'): + machine = 'fat' + elif archs == ('i386', 'x86_64'): + machine = 'intel' + elif archs == ('i386', 'ppc', 'x86_64'): + machine = 'fat3' + elif archs == ('ppc64', 'x86_64'): + machine = 'fat64' + elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): + machine = 'universal' + else: + raise ValueError( + "Don't know machine value for archs=%r"%(archs,)) + elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. From brett at python.org Tue Sep 15 21:50:23 2009 From: brett at python.org (Brett Cannon) Date: Tue, 15 Sep 2009 12:50:23 -0700 Subject: [Python-checkins] r74792 - in python/branches/py3k: Doc/library/__future__.rst In-Reply-To: <4AAEADAF.70902@gmail.com> References: <4aae5801.0467f10a.038e.068cSMTPIN_ADDED@mx.google.com> <4AAEADAF.70902@gmail.com> Message-ID: On Mon, Sep 14, 2009 at 13:55, Nick Coghlan wrote: > georg.brandl wrote: >> ++------------------+-------------+--------------+---------------------------------------------+ >> +| barry_as_FLUFL ? | ? ?3.1.0a1 ?| 3.9 ? ? ? ? ?| :pep:`401`: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | >> +| ? ? ? ? ? ? ? ? ?| ? ? ? ? ? ? | ? ? ? ? ? ? ?| *BDFL Retirement* ? ? ? ? ? ? ? ? ? ? ? ? ? | >> ++------------------+-------------+--------------+---------------------------------------------+ > > Do we want to document that one? It feels like documenting the > antigravity module... Yeah, don't document that. It's purely an inside joke. -Brett From python-checkins at python.org Tue Sep 15 21:55:15 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 15 Sep 2009 19:55:15 -0000 Subject: [Python-checkins] r74810 - python/branches/py3k/Doc/library/__future__.rst Message-ID: Author: georg.brandl Date: Tue Sep 15 21:55:15 2009 New Revision: 74810 Log: Do not document the most important (at least for Guido) future import. Modified: python/branches/py3k/Doc/library/__future__.rst Modified: python/branches/py3k/Doc/library/__future__.rst ============================================================================== --- python/branches/py3k/Doc/library/__future__.rst (original) +++ python/branches/py3k/Doc/library/__future__.rst Tue Sep 15 21:55:15 2009 @@ -84,9 +84,7 @@ | unicode_literals | 2.6.0a2 | 3.0 | :pep:`3112`: | | | | | *Bytes literals in Python 3000* | +------------------+-------------+--------------+---------------------------------------------+ -| barry_as_FLUFL | 3.1.0a1 | 3.9 | :pep:`401`: | -| | | | *BDFL Retirement* | -+------------------+-------------+--------------+---------------------------------------------+ + .. seealso:: From nnorwitz at gmail.com Tue Sep 15 22:23:08 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 15 Sep 2009 16:23:08 -0400 Subject: [Python-checkins] Python Regression Test Failures basics (1) Message-ID: <20090915202308.GA31882@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 fetching http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml ... fetching http://people.freebsd.org/~perky/i18n/EUC-CN.TXT ... fetching http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP936.TXT ... test_codecmaps_hk fetching http://people.freebsd.org/~perky/i18n/BIG5HKSCS-2004.TXT ... test_codecmaps_jp fetching http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT ... fetching http://people.freebsd.org/~perky/i18n/EUC-JISX0213.TXT ... fetching http://people.freebsd.org/~perky/i18n/EUC-JP.TXT ... fetching http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT ... fetching http://people.freebsd.org/~perky/i18n/SHIFT_JISX0213.TXT ... test_codecmaps_kr fetching http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP949.TXT ... fetching http://people.freebsd.org/~perky/i18n/EUC-KR.TXT ... fetching http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT ... test_codecmaps_tw fetching http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT ... fetching http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT ... 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 [19542 refs] test test_distutils failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.7/distutils/tests/test_util.py", line 145, in test_get_platform self.assertEquals(get_platform(), 'macosx-10.4-universal') AssertionError: 'macosx-10.4-intel' != 'macosx-10.4-universal' 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 [15421 refs] [15421 refs] [15421 refs] [25430 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 fetching http://www.unicode.org/Public/5.1.0/ucd/NormalizationTest.txt ... 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 [17009 refs] [17009 refs] test_plistlib test_poll test_popen [15426 refs] [15426 refs] [15426 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 [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20919 refs] [20919 refs] test_pyexpat test_queue test_quopri [17947 refs] [17947 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 [15421 refs] [15421 refs] [15424 refs] [15421 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 [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [15421 refs] [15421 refs] [15650 refs] [15444 refs] test_tarfile /tmp/python-test/local/lib/python2.7/test/test_tarfile.py:654: DeprecationWarning: use the filter argument instead tar.add(tempdir, arcname="empty_dir", exclude=exclude) /tmp/python-test/local/lib/python2.7/tarfile.py:1978: DeprecationWarning: use the filter argument instead recursive, exclude, filter) test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [15424 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading [18734 refs] [21132 refs] [20108 refs] [20108 refs] [20108 refs] [20108 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 [779425 refs] From python-checkins at python.org Tue Sep 15 22:26:59 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 15 Sep 2009 20:26:59 -0000 Subject: [Python-checkins] r74811 - python/trunk/Misc/developers.txt Message-ID: Author: georg.brandl Date: Tue Sep 15 22:26:59 2009 New Revision: 74811 Log: Add Armin Ronacher. Modified: python/trunk/Misc/developers.txt Modified: python/trunk/Misc/developers.txt ============================================================================== --- python/trunk/Misc/developers.txt (original) +++ python/trunk/Misc/developers.txt Tue Sep 15 22:26:59 2009 @@ -109,6 +109,10 @@ - Jeffrey Yasskin was given SVN access on 9 August 2007 by NCN, for his work on PEPs and other general patches. +- Armin Ronacher was given SVN access on 23 July 2007 by GFB, + for work on the documentation toolset. He now maintains the + ast module. + - Senthil Kumaran was given SVN access on 16 June 2007 by MvL, for his Summer-of-Code project, mentored by Skip Montanaro. From ziade.tarek at gmail.com Tue Sep 15 22:33:39 2009 From: ziade.tarek at gmail.com (=?ISO-8859-1?Q?Tarek_Ziad=E9?=) Date: Tue, 15 Sep 2009 22:33:39 +0200 Subject: [Python-checkins] Python Regression Test Failures basics (1) In-Reply-To: <20090915202308.GA31882@python.psfb.org> References: <20090915202308.GA31882@python.psfb.org> Message-ID: <94bdd2610909151333m604b7117m2be5be0a46e1b23a@mail.gmail.com> On Tue, Sep 15, 2009 at 10:23 PM, Neal Norwitz wrote: > test_distutils > [19542 refs] > test test_distutils failed -- Traceback (most recent call last): > ?File "/tmp/python-test/local/lib/python2.7/distutils/tests/test_util.py", line 145, in test_get_platform > ? ?self.assertEquals(get_platform(), 'macosx-10.4-universal') > AssertionError: 'macosx-10.4-intel' != 'macosx-10.4-universal' Ronald, I havn't followed your latest changes on Mac OS front, but we need to check if distutils.util.get_platform still behaves as expected, then fix this test. Would you mind having a look at the Mac OS X part in get_platform(), or tell me what should be done ? Regards Tarek -- Tarek Ziad? | http://ziade.org |????????????! From nnorwitz at gmail.com Tue Sep 15 22:40:08 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 15 Sep 2009 16:40:08 -0400 Subject: [Python-checkins] Python Regression Test Failures opt (1) Message-ID: <20090915204008.GA16419@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 [19545 refs] [19545 refs] [19545 refs] [19542 refs] test test_distutils failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.7/distutils/tests/test_util.py", line 145, in test_get_platform self.assertEquals(get_platform(), 'macosx-10.4-universal') AssertionError: 'macosx-10.4-intel' != 'macosx-10.4-universal' 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 [15421 refs] [15421 refs] [15421 refs] [25430 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 [17009 refs] [17009 refs] test_plistlib test_poll test_popen [15426 refs] [15426 refs] [15426 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 [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20919 refs] [20919 refs] test_pyexpat test_queue test_quopri [17947 refs] [17947 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 [15421 refs] [15421 refs] [15424 refs] [15421 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 [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [15421 refs] [15421 refs] [15650 refs] [15444 refs] test_tarfile /tmp/python-test/local/lib/python2.7/test/test_tarfile.py:654: DeprecationWarning: use the filter argument instead tar.add(tempdir, arcname="empty_dir", exclude=exclude) /tmp/python-test/local/lib/python2.7/tarfile.py:1978: DeprecationWarning: use the filter argument instead recursive, exclude, filter) test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [15424 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading [18734 refs] [21132 refs] [20108 refs] [20108 refs] [20108 refs] [20108 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 [778636 refs] From python-checkins at python.org Tue Sep 15 23:24:08 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 15 Sep 2009 21:24:08 -0000 Subject: [Python-checkins] r74812 - python/trunk/Lib/distutils/tests/test_util.py Message-ID: Author: ronald.oussoren Date: Tue Sep 15 23:24:07 2009 New Revision: 74812 Log: Update distutils.util tests after my changes to --with-universal-archs Modified: python/trunk/Lib/distutils/tests/test_util.py 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 Tue Sep 15 23:24:07 2009 @@ -142,15 +142,35 @@ '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-intel') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-fat3') + + get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-universal') - get_config_vars()['CFLAGS'] = ('-arch x86_64 -isysroot ' + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-fat64') + for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): + get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3'%(arch,)) + + self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From nnorwitz at gmail.com Wed Sep 16 00:34:36 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 15 Sep 2009 18:34:36 -0400 Subject: [Python-checkins] Python Regression Test Failures all (1) Message-ID: <20090915223436.GA21480@python.psfb.org> 344 tests OK. 1 test failed: test_distutils 27 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl test_epoll test_gl test_imgfile test_ioctl test_kqueue test_macos test_macostools test_multiprocessing test_pep277 test_py3kwarn test_scriptpackages test_startfile test_sunaudiodev test_tcl test_tk test_ttk_guionly test_ttk_textonly test_unicode_file 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 Sleepycat Software: Berkeley DB 4.1.25: (December 19, 2002) Test path prefix: /tmp/z-test_bsddb3-14469 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_datetime test_dbm test_decimal test_decorators test_defaultdict test_deque test_descr test_descrtut test_difflib test_dircache test_dis test_distutils [19542 refs] test test_distutils failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.7/distutils/tests/test_util.py", line 145, in test_get_platform self.assertEquals(get_platform(), 'macosx-10.4-universal') AssertionError: 'macosx-10.4-intel' != 'macosx-10.4-universal' 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 [15421 refs] [15421 refs] [15421 refs] [25430 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_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_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 [17009 refs] [17009 refs] test_plistlib test_poll test_popen [15426 refs] [15426 refs] [15426 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 [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20919 refs] [20919 refs] test_pyexpat test_queue test_quopri [17947 refs] [17947 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 [15421 refs] [15421 refs] [15424 refs] [15421 refs] test_slice test_smtplib test_smtpnet test_socket test_socketserver 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 [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [15421 refs] [15421 refs] [15650 refs] [15444 refs] test_tarfile /tmp/python-test/local/lib/python2.7/test/test_tarfile.py:654: DeprecationWarning: use the filter argument instead tar.add(tempdir, arcname="empty_dir", exclude=exclude) /tmp/python-test/local/lib/python2.7/tarfile.py:1978: DeprecationWarning: use the filter argument instead recursive, exclude, filter) test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [15424 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading [18734 refs] [21132 refs] [20108 refs] [20108 refs] [20108 refs] [20108 refs] test_threading_local test_threadsignals test_time test_timeout 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 /tmp/python-test/local/lib/python2.7/test/test_urllib2net.py:181: DeprecationWarning: With-statements now directly support multiple context managers with test_support.transient_internet(): test_urllibnet test_urlparse test_userdict test_userlist test_userstring test_uu test_uuid WARNING: uuid.getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._ifconfig_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._unixdll_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. test_wait3 test_wait4 test_warnings test_wave test_weakref test_whichdb test_winreg test_winreg skipped -- No module named _winreg test_winsound test_winsound skipped -- No module named winsound test_with test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c test_xmllib /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 sh: line 1: python2.4: command not found sh: line 1: python2.6: command not found 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 344 tests OK. 1 test failed: test_distutils 27 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl test_epoll test_gl test_imgfile test_ioctl test_kqueue test_macos test_macostools test_multiprocessing test_pep277 test_py3kwarn test_scriptpackages test_startfile test_sunaudiodev test_tcl test_tk test_ttk_guionly test_ttk_textonly test_unicode_file 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 [794521 refs] From python-checkins at python.org Wed Sep 16 02:49:05 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 16 Sep 2009 00:49:05 -0000 Subject: [Python-checkins] r74813 - in python/branches/py3k: Doc/library/plistlib.rst Lib/plistlib.py Message-ID: Author: ezio.melotti Date: Wed Sep 16 02:49:03 2009 New Revision: 74813 Log: updated the doc to match the module docstring, fixed a couple of errors in the doc markup and in the module Modified: python/branches/py3k/Doc/library/plistlib.rst python/branches/py3k/Lib/plistlib.py Modified: python/branches/py3k/Doc/library/plistlib.rst ============================================================================== --- python/branches/py3k/Doc/library/plistlib.rst (original) +++ python/branches/py3k/Doc/library/plistlib.rst Wed Sep 16 02:49:03 2009 @@ -18,18 +18,24 @@ basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary. +To write out and to parse a plist file, use the :func:`writePlist` and +:func:`readPlist` functions. + +To work with plist data in bytes objects, use :func:`writePlistToBytes` +and :func:`readPlistFromBytes`. + Values can be strings, integers, floats, booleans, tuples, lists, dictionaries (but only with string keys), :class:`Data` or :class:`datetime.datetime` objects. String values (including dictionary keys) have to be unicode strings -- they will be written out as UTF-8. The ```` plist type is supported through the :class:`Data` class. This is -a thin wrapper around a Python string. Use :class:`Data` if your strings +a thin wrapper around a Python bytes object. Use :class:`Data` if your strings contain control characters. .. seealso:: - `PList manual page ` + `PList manual page `_ Apple's documentation of the file format. @@ -55,26 +61,26 @@ a container that contains objects of unsupported types. -.. function:: readPlistFromString(data) +.. function:: readPlistFromBytes(data) - Read a plist from a string. Return the root object. + Read a plist data from a bytes object. Return the root object. -.. function:: writePlistToString(rootObject) +.. function:: writePlistToBytes(rootObject) - Return *rootObject* as a plist-formatted string. + Return *rootObject* as a plist-formatted bytes object. The following class is available: .. class:: Data(data) - Return a "data" wrapper object around the string *data*. This is used in - functions converting from/to plists to represent the ```` type + Return a "data" wrapper object around the bytes object *data*. This is used + in functions converting from/to plists to represent the ```` type available in plists. It has one attribute, :attr:`data`, that can be used to retrieve the Python - string stored in it. + bytes object stored in it. Examples @@ -93,8 +99,8 @@ aTrueValue = True, aFalseValue = False, ), - someData = Data(""), - someMoreData = Data("" * 10), + someData = Data(b""), + someMoreData = Data(b"" * 10), aDate = datetime.datetime.fromtimestamp(time.mktime(time.gmtime())), ) writePlist(pl, fileName) Modified: python/branches/py3k/Lib/plistlib.py ============================================================================== --- python/branches/py3k/Lib/plistlib.py (original) +++ python/branches/py3k/Lib/plistlib.py Wed Sep 16 02:49:03 2009 @@ -1,6 +1,6 @@ r"""plistlib.py -- a tool to generate and parse MacOSX .plist files. -The PropertList (.plist) file format is a simple XML pickle supporting +The property list (.plist) file format is a simple XML pickle supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary. @@ -16,32 +16,31 @@ and writePlistToBytes(). Values can be strings, integers, floats, booleans, tuples, lists, -dictionaries, Data or datetime.datetime objects. String values (including -dictionary keys) may be unicode strings -- they will be written out as -UTF-8. +dictionaries (but only with string keys), Data or datetime.datetime objects. +String values (including dictionary keys) have to be unicode strings -- they +will be written out as UTF-8. The plist type is supported through the Data class. This is a -thin wrapper around a Python bytes object. +thin wrapper around a Python bytes object. Use 'Data' if your strings +contain control characters. Generate Plist example: pl = dict( - aString="Doodah", - aList=["A", "B", 12, 32.1, [1, 2, 3]], + aString = "Doodah", + aList = ["A", "B", 12, 32.1, [1, 2, 3]], aFloat = 0.1, anInt = 728, - aDict=dict( - anotherString="", - aUnicodeValue=u'M\xe4ssig, Ma\xdf', - aTrueValue=True, - aFalseValue=False, + aDict = dict( + anotherString = "", + aUnicodeValue = "M\xe4ssig, Ma\xdf", + aTrueValue = True, + aFalseValue = False, ), someData = Data(b""), someMoreData = Data(b"" * 10), aDate = datetime.datetime.fromtimestamp(time.mktime(time.gmtime())), ) - # unicode keys are possible, but a little awkward to use: - pl[u'\xc5benraa'] = "That was a unicode key." writePlist(pl, fileName) Parse Plist example: @@ -220,7 +219,7 @@ elif isinstance(value, (tuple, list)): self.writeArray(value) else: - raise TypeError("unsuported type: %s" % type(value)) + raise TypeError("unsupported type: %s" % type(value)) def writeData(self, data): self.beginElement("data") From python-checkins at python.org Wed Sep 16 02:57:27 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 16 Sep 2009 00:57:27 -0000 Subject: [Python-checkins] r74814 - in python/branches/release31-maint: Doc/library/plistlib.rst Lib/plistlib.py Message-ID: Author: ezio.melotti Date: Wed Sep 16 02:57:27 2009 New Revision: 74814 Log: Merged revisions 74813 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74813 | ezio.melotti | 2009-09-16 03:49:03 +0300 (Wed, 16 Sep 2009) | 1 line updated the doc to match the module docstring, fixed a couple of errors in the doc markup and in the module ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/plistlib.rst python/branches/release31-maint/Lib/plistlib.py Modified: python/branches/release31-maint/Doc/library/plistlib.rst ============================================================================== --- python/branches/release31-maint/Doc/library/plistlib.rst (original) +++ python/branches/release31-maint/Doc/library/plistlib.rst Wed Sep 16 02:57:27 2009 @@ -18,18 +18,24 @@ basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary. +To write out and to parse a plist file, use the :func:`writePlist` and +:func:`readPlist` functions. + +To work with plist data in bytes objects, use :func:`writePlistToBytes` +and :func:`readPlistFromBytes`. + Values can be strings, integers, floats, booleans, tuples, lists, dictionaries (but only with string keys), :class:`Data` or :class:`datetime.datetime` objects. String values (including dictionary keys) have to be unicode strings -- they will be written out as UTF-8. The ```` plist type is supported through the :class:`Data` class. This is -a thin wrapper around a Python string. Use :class:`Data` if your strings +a thin wrapper around a Python bytes object. Use :class:`Data` if your strings contain control characters. .. seealso:: - `PList manual page ` + `PList manual page `_ Apple's documentation of the file format. @@ -55,26 +61,26 @@ a container that contains objects of unsupported types. -.. function:: readPlistFromString(data) +.. function:: readPlistFromBytes(data) - Read a plist from a string. Return the root object. + Read a plist data from a bytes object. Return the root object. -.. function:: writePlistToString(rootObject) +.. function:: writePlistToBytes(rootObject) - Return *rootObject* as a plist-formatted string. + Return *rootObject* as a plist-formatted bytes object. The following class is available: .. class:: Data(data) - Return a "data" wrapper object around the string *data*. This is used in - functions converting from/to plists to represent the ```` type + Return a "data" wrapper object around the bytes object *data*. This is used + in functions converting from/to plists to represent the ```` type available in plists. It has one attribute, :attr:`data`, that can be used to retrieve the Python - string stored in it. + bytes object stored in it. Examples @@ -93,8 +99,8 @@ aTrueValue = True, aFalseValue = False, ), - someData = Data(""), - someMoreData = Data("" * 10), + someData = Data(b""), + someMoreData = Data(b"" * 10), aDate = datetime.datetime.fromtimestamp(time.mktime(time.gmtime())), ) writePlist(pl, fileName) Modified: python/branches/release31-maint/Lib/plistlib.py ============================================================================== --- python/branches/release31-maint/Lib/plistlib.py (original) +++ python/branches/release31-maint/Lib/plistlib.py Wed Sep 16 02:57:27 2009 @@ -1,6 +1,6 @@ r"""plistlib.py -- a tool to generate and parse MacOSX .plist files. -The PropertList (.plist) file format is a simple XML pickle supporting +The property list (.plist) file format is a simple XML pickle supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary. @@ -16,32 +16,31 @@ and writePlistToBytes(). Values can be strings, integers, floats, booleans, tuples, lists, -dictionaries, Data or datetime.datetime objects. String values (including -dictionary keys) may be unicode strings -- they will be written out as -UTF-8. +dictionaries (but only with string keys), Data or datetime.datetime objects. +String values (including dictionary keys) have to be unicode strings -- they +will be written out as UTF-8. The plist type is supported through the Data class. This is a -thin wrapper around a Python bytes object. +thin wrapper around a Python bytes object. Use 'Data' if your strings +contain control characters. Generate Plist example: pl = dict( - aString="Doodah", - aList=["A", "B", 12, 32.1, [1, 2, 3]], + aString = "Doodah", + aList = ["A", "B", 12, 32.1, [1, 2, 3]], aFloat = 0.1, anInt = 728, - aDict=dict( - anotherString="", - aUnicodeValue=u'M\xe4ssig, Ma\xdf', - aTrueValue=True, - aFalseValue=False, + aDict = dict( + anotherString = "", + aUnicodeValue = "M\xe4ssig, Ma\xdf", + aTrueValue = True, + aFalseValue = False, ), someData = Data(b""), someMoreData = Data(b"" * 10), aDate = datetime.datetime.fromtimestamp(time.mktime(time.gmtime())), ) - # unicode keys are possible, but a little awkward to use: - pl[u'\xc5benraa'] = "That was a unicode key." writePlist(pl, fileName) Parse Plist example: @@ -220,7 +219,7 @@ elif isinstance(value, (tuple, list)): self.writeArray(value) else: - raise TypeError("unsuported type: %s" % type(value)) + raise TypeError("unsupported type: %s" % type(value)) def writeData(self, data): self.beginElement("data") From python-checkins at python.org Wed Sep 16 03:18:28 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 16 Sep 2009 01:18:28 -0000 Subject: [Python-checkins] r74815 - python/branches/py3k/Doc/reference/simple_stmts.rst Message-ID: Author: ezio.melotti Date: Wed Sep 16 03:18:27 2009 New Revision: 74815 Log: #6910 - for->or typo Modified: python/branches/py3k/Doc/reference/simple_stmts.rst 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 Wed Sep 16 03:18:27 2009 @@ -798,7 +798,7 @@ The :keyword:`from` form with ``*`` may only occur in a module scope. The wild card form of import --- ``import *`` --- is only allowed at the module level. -Attempting to use it in class for function definitions will raise a +Attempting to use it in class or function definitions will raise a :exc:`SyntaxError`. .. index:: From python-checkins at python.org Wed Sep 16 03:33:31 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 16 Sep 2009 01:33:31 -0000 Subject: [Python-checkins] r74816 - in python/branches/release31-maint: Doc/reference/simple_stmts.rst Message-ID: Author: ezio.melotti Date: Wed Sep 16 03:33:31 2009 New Revision: 74816 Log: Merged revisions 74815 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74815 | ezio.melotti | 2009-09-16 04:18:27 +0300 (Wed, 16 Sep 2009) | 1 line #6910 - for->or typo ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/reference/simple_stmts.rst Modified: python/branches/release31-maint/Doc/reference/simple_stmts.rst ============================================================================== --- python/branches/release31-maint/Doc/reference/simple_stmts.rst (original) +++ python/branches/release31-maint/Doc/reference/simple_stmts.rst Wed Sep 16 03:33:31 2009 @@ -796,7 +796,7 @@ The :keyword:`from` form with ``*`` may only occur in a module scope. The wild card form of import --- ``import *`` --- is only allowed at the module level. -Attempting to use it in class for function definitions will raise a +Attempting to use it in class or function definitions will raise a :exc:`SyntaxError`. .. index:: From python-checkins at python.org Wed Sep 16 11:05:11 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 09:05:11 -0000 Subject: [Python-checkins] r74817 - in python/trunk/Doc/tools/sphinxext: pyspecific.py static/basic.css Message-ID: Author: georg.brandl Date: Wed Sep 16 11:05:11 2009 New Revision: 74817 Log: Make deprecation notices as visible as warnings are right now. Modified: python/trunk/Doc/tools/sphinxext/pyspecific.py python/trunk/Doc/tools/sphinxext/static/basic.css Modified: python/trunk/Doc/tools/sphinxext/pyspecific.py ============================================================================== --- python/trunk/Doc/tools/sphinxext/pyspecific.py (original) +++ python/trunk/Doc/tools/sphinxext/pyspecific.py Wed Sep 16 11:05:11 2009 @@ -20,6 +20,20 @@ Body.enum.converters['lowerroman'] = \ Body.enum.converters['upperroman'] = lambda x: None +# monkey-patch HTML translator to give versionmodified paragraphs a class +def new_visit_versionmodified(self, node): + self.body.append(self.starttag(node, 'p', CLASS=node['type'])) + text = versionlabels[node['type']] % node['version'] + if len(node): + text += ': ' + else: + text += '.' + self.body.append('%s' % text) + +from sphinx.writers.html import HTMLTranslator +from sphinx.locale import versionlabels +HTMLTranslator.visit_versionmodified = new_visit_versionmodified + def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): issue = utils.unescape(text) Modified: python/trunk/Doc/tools/sphinxext/static/basic.css ============================================================================== --- python/trunk/Doc/tools/sphinxext/static/basic.css (original) +++ python/trunk/Doc/tools/sphinxext/static/basic.css Wed Sep 16 11:05:11 2009 @@ -5,15 +5,6 @@ /* -- main layout ----------------------------------------------------------- */ -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - div.clearer { clear: both; } @@ -338,6 +329,12 @@ font-style: italic; } +p.deprecated { + background-color: #ffe4e4; + border: 1px solid #f66; + padding: 7px +} + .system-message { background-color: #fda; padding: 5px; @@ -394,7 +391,7 @@ vertical-align: middle; } -div.math p { +div.body div.math p { text-align: center; } From python-checkins at python.org Wed Sep 16 11:23:04 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 09:23:04 -0000 Subject: [Python-checkins] r74818 - python/trunk/Doc/tutorial/errors.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 11:23:04 2009 New Revision: 74818 Log: #6880: add reference to classes section in exceptions section, which comes earlier. 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 Wed Sep 16 11:23:04 2009 @@ -245,9 +245,10 @@ User-defined Exceptions ======================= -Programs may name their own exceptions by creating a new exception class. -Exceptions should typically be derived from the :exc:`Exception` class, either -directly or indirectly. For example:: +Programs may name their own exceptions by creating a new exception class (see +:ref:`tut-classes` for more about Python classes). Exceptions should typically +be derived from the :exc:`Exception` class, either directly or indirectly. For +example:: >>> class MyError(Exception): ... def __init__(self, value): From python-checkins at python.org Wed Sep 16 11:24:57 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 09:24:57 -0000 Subject: [Python-checkins] r74819 - python/trunk/Doc/library/readline.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 11:24:57 2009 New Revision: 74819 Log: #6876: fix base class constructor invocation in example. Modified: python/trunk/Doc/library/readline.rst Modified: python/trunk/Doc/library/readline.rst ============================================================================== --- python/trunk/Doc/library/readline.rst (original) +++ python/trunk/Doc/library/readline.rst Wed Sep 16 11:24:57 2009 @@ -1,4 +1,3 @@ - :mod:`readline` --- GNU readline interface ========================================== @@ -221,7 +220,7 @@ class HistoryConsole(code.InteractiveConsole): def __init__(self, locals=None, filename="", histfile=os.path.expanduser("~/.console-history")): - code.InteractiveConsole.__init__(self) + code.InteractiveConsole.__init__(self, locals, filename) self.init_history(histfile) def init_history(self, histfile): From python-checkins at python.org Wed Sep 16 11:30:48 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 09:30:48 -0000 Subject: [Python-checkins] r74820 - python/trunk/Doc/howto/unicode.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 11:30:48 2009 New Revision: 74820 Log: #6891: comment out dead link to Unicode article. Modified: python/trunk/Doc/howto/unicode.rst Modified: python/trunk/Doc/howto/unicode.rst ============================================================================== --- python/trunk/Doc/howto/unicode.rst (original) +++ python/trunk/Doc/howto/unicode.rst Wed Sep 16 11:30:48 2009 @@ -210,11 +210,12 @@ to reading the Unicode character tables, available at . -Two other good introductory articles were written by Joel Spolsky - and Jason Orendorff -. If this introduction didn't make -things clear to you, you should try reading one of these alternate articles -before continuing. +Another good introductory article was written by Joel Spolsky +. +If this introduction didn't make things clear to you, you should try reading this +alternate article before continuing. + +.. Jason Orendorff XXX http://www.jorendorff.com/articles/unicode/ is broken Wikipedia entries are often helpful; see the entries for "character encoding" and UTF-8 From python-checkins at python.org Wed Sep 16 11:42:19 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 09:42:19 -0000 Subject: [Python-checkins] r74821 - python/branches/py3k/Doc/library/pdb.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 11:42:19 2009 New Revision: 74821 Log: #6885: run python 3 as python3. Modified: python/branches/py3k/Doc/library/pdb.rst Modified: python/branches/py3k/Doc/library/pdb.rst ============================================================================== --- python/branches/py3k/Doc/library/pdb.rst (original) +++ python/branches/py3k/Doc/library/pdb.rst Wed Sep 16 11:42:19 2009 @@ -41,7 +41,7 @@ :file:`pdb.py` can also be invoked as a script to debug other scripts. For example:: - python -m pdb myscript.py + python3 -m pdb myscript.py When invoked as a script, pdb will automatically enter post-mortem debugging if the program being debugged exits abnormally. After post-mortem debugging (or From nnorwitz at gmail.com Wed Sep 16 11:42:11 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Wed, 16 Sep 2009 05:42:11 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090916094211.GA19805@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 339, 0] references, sum=339 Less important issues: ---------------------- test_file2k leaked [69, -69, 0] references, sum=0 test_smtplib leaked [-248, 0, 278] references, sum=30 test_sys leaked [42, -21, -21] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_urllib2_localnet leaked [280, -280, 0] references, sum=0 From python-checkins at python.org Wed Sep 16 12:12:06 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 10:12:06 -0000 Subject: [Python-checkins] r74822 - python/trunk/Doc/reference/simple_stmts.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 12:12:06 2009 New Revision: 74822 Log: #5621: refactor description of how class/instance attributes interact on a.x=a.x+1 or augassign. 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 Sep 16 12:12:06 2009 @@ -151,11 +151,30 @@ * If the target is an attribute reference: The primary expression in the reference is evaluated. It should yield an object with assignable attributes; - if this is not the case, :exc:`TypeError` is raised. That object is then asked - to assign the assigned object to the given attribute; if it cannot perform the - assignment, it raises an exception (usually but not necessarily + if this is not the case, :exc:`TypeError` is raised. That object is then + asked to assign the assigned object to the given attribute; if it cannot + perform the assignment, it raises an exception (usually but not necessarily :exc:`AttributeError`). + .. _attr-target-note: + + Note: If the object is a class instance and the attribute reference occurs on + both sides of the assignment operator, the RHS expression, ``a.x`` can access + either an instance attribute or (if no instance attribute exists) a class + attribute. The LHS target ``a.x`` is always set as an instance attribute, + creating it if necessary. Thus, the two occurrences of ``a.x`` do not + necessarily refer to the same attribute: if the RHS expression refers to a + class attribute, the LHS creates a new instance attribute as the target of the + assignment:: + + class Cls: + x = 3 # class variable + inst = Cls() + inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x as 3 + + This description does not necessarily apply to descriptor attributes, such as + properties created with :func:`property`. + .. index:: pair: subscription; assignment object: mutable @@ -253,16 +272,8 @@ *in-place* behavior, the binary operation performed by augmented assignment is the same as the normal binary operations. -For targets which are attribute references, the initial value is retrieved with -a :meth:`getattr` and the result is assigned with a :meth:`setattr`. Notice -that the two methods do not necessarily refer to the same variable. When -:meth:`getattr` refers to a class variable, :meth:`setattr` still writes to an -instance variable. For example:: - - class A: - x = 3 # class variable - a = A() - a.x += 1 # writes a.x as 4 leaving A.x as 3 +For targets which are attribute references, the same :ref:`caveat about class +and instance attributes ` applies as for regular assignments. .. _assert: From python-checkins at python.org Wed Sep 16 15:06:22 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 13:06:22 -0000 Subject: [Python-checkins] r74823 - python/trunk/Doc/library/optparse.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 15:06:22 2009 New Revision: 74823 Log: Remove strange trailing commas. Modified: python/trunk/Doc/library/optparse.rst Modified: python/trunk/Doc/library/optparse.rst ============================================================================== --- python/trunk/Doc/library/optparse.rst (original) +++ python/trunk/Doc/library/optparse.rst Wed Sep 16 15:06:22 2009 @@ -471,7 +471,7 @@ action="store_false", dest="verbose", help="be vewwy quiet (I'm hunting wabbits)") parser.add_option("-f", "--filename", - metavar="FILE", help="write output to FILE"), + metavar="FILE", help="write output to FILE") parser.add_option("-m", "--mode", default="intermediate", help="interaction mode: novice, intermediate, " @@ -1020,11 +1020,11 @@ from optparse import OptionParser, SUPPRESS_HELP parser = OptionParser() - parser.add_option("-h", "--help", action="help"), + parser.add_option("-h", "--help", action="help") parser.add_option("-v", action="store_true", dest="verbose", help="Be moderately verbose") parser.add_option("--file", dest="filename", - help="Input file to read data from"), + help="Input file to read data from") parser.add_option("--secret", help=SUPPRESS_HELP) If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, it From python-checkins at python.org Wed Sep 16 15:11:06 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 13:11:06 -0000 Subject: [Python-checkins] r74824 - python/trunk/Doc/library/optparse.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 15:11:06 2009 New Revision: 74824 Log: #6892: fix optparse example involving help option. Modified: python/trunk/Doc/library/optparse.rst Modified: python/trunk/Doc/library/optparse.rst ============================================================================== --- python/trunk/Doc/library/optparse.rst (original) +++ python/trunk/Doc/library/optparse.rst Wed Sep 16 15:11:06 2009 @@ -1019,7 +1019,10 @@ from optparse import OptionParser, SUPPRESS_HELP - parser = OptionParser() + # usually, a help option is added automatically, but that can + # be suppressed using the add_help_option argument + parser = OptionParser(add_help_option=False) + parser.add_option("-h", "--help", action="help") parser.add_option("-v", action="store_true", dest="verbose", help="Be moderately verbose") From python-checkins at python.org Wed Sep 16 15:14:05 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 16 Sep 2009 13:14:05 -0000 Subject: [Python-checkins] r74825 - python/trunk/Doc/tutorial/errors.rst Message-ID: Author: ezio.melotti Date: Wed Sep 16 15:14:05 2009 New Revision: 74825 Log: #6879 - fix misstatement about exceptions 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 Wed Sep 16 15:14:05 2009 @@ -218,11 +218,9 @@ File "", line 1, in ? NameError: HiThere -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. +The sole argument to :keyword:`raise` indicates the exception to be raised. +This must be either an exception instance or an exception class (a class that +derives from :class:`Exception`). 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 Wed Sep 16 15:22:57 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 16 Sep 2009 13:22:57 -0000 Subject: [Python-checkins] r74826 - python/branches/py3k Message-ID: Author: ezio.melotti Date: Wed Sep 16 15:22:57 2009 New Revision: 74826 Log: Blocked revisions 74825 via svnmerge ........ r74825 | ezio.melotti | 2009-09-16 16:14:05 +0300 (Wed, 16 Sep 2009) | 1 line #6879 - fix misstatement about exceptions ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Wed Sep 16 15:31:18 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 16 Sep 2009 13:31:18 -0000 Subject: [Python-checkins] r74827 - in python/branches/release26-maint: Doc/tutorial/errors.rst Message-ID: Author: ezio.melotti Date: Wed Sep 16 15:31:18 2009 New Revision: 74827 Log: Merged revisions 74825 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74825 | ezio.melotti | 2009-09-16 16:14:05 +0300 (Wed, 16 Sep 2009) | 1 line #6879 - fix misstatement about exceptions ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/tutorial/errors.rst Modified: python/branches/release26-maint/Doc/tutorial/errors.rst ============================================================================== --- python/branches/release26-maint/Doc/tutorial/errors.rst (original) +++ python/branches/release26-maint/Doc/tutorial/errors.rst Wed Sep 16 15:31:18 2009 @@ -221,10 +221,9 @@ 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 sole argument to :keyword:`raise` indicates the exception to be raised. +This must be either an exception instance or an exception class (a class that +derives from :class:`Exception`). 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 Wed Sep 16 16:23:20 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 14:23:20 -0000 Subject: [Python-checkins] r74828 - python/branches/py3k/Lib/threading.py Message-ID: Author: georg.brandl Date: Wed Sep 16 16:23:20 2009 New Revision: 74828 Log: Use true booleans. Modified: python/branches/py3k/Lib/threading.py Modified: python/branches/py3k/Lib/threading.py ============================================================================== --- python/branches/py3k/Lib/threading.py (original) +++ python/branches/py3k/Lib/threading.py Wed Sep 16 16:23:20 2009 @@ -97,7 +97,7 @@ owner and owner.name, self._count) - def acquire(self, blocking=1): + def acquire(self, blocking=True): me = current_thread() if self._owner is me: self._count = self._count + 1 @@ -289,7 +289,7 @@ self._cond = Condition(Lock()) self._value = value - def acquire(self, blocking=1): + def acquire(self, blocking=True): rc = False self._cond.acquire() while self._value == 0: From python-checkins at python.org Wed Sep 16 16:24:29 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 14:24:29 -0000 Subject: [Python-checkins] r74829 - python/branches/py3k/Lib/traceback.py Message-ID: Author: georg.brandl Date: Wed Sep 16 16:24:29 2009 New Revision: 74829 Log: Small PEP8 correction. Modified: python/branches/py3k/Lib/traceback.py Modified: python/branches/py3k/Lib/traceback.py ============================================================================== --- python/branches/py3k/Lib/traceback.py (original) +++ python/branches/py3k/Lib/traceback.py Wed Sep 16 16:24:29 2009 @@ -70,11 +70,11 @@ tb = tb.tb_next n = n+1 -def format_tb(tb, limit = None): +def format_tb(tb, limit=None): """A shorthand for 'format_list(extract_stack(f, limit)).""" return format_list(extract_tb(tb, limit)) -def extract_tb(tb, limit = None): +def extract_tb(tb, limit=None): """Return list of up to limit pre-processed entries from traceback. This is useful for alternate formatting of stack traces. If @@ -304,7 +304,7 @@ f = sys.exc_info()[2].tb_frame.f_back return format_list(extract_stack(f, limit)) -def extract_stack(f=None, limit = None): +def extract_stack(f=None, limit=None): """Extract the raw traceback from the current stack frame. The return value has the same format as for extract_tb(). The From python-checkins at python.org Wed Sep 16 16:36:22 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 14:36:22 -0000 Subject: [Python-checkins] r74830 - python/branches/py3k/Lib/urllib/parse.py Message-ID: Author: georg.brandl Date: Wed Sep 16 16:36:22 2009 New Revision: 74830 Log: Use true booleans. Modified: python/branches/py3k/Lib/urllib/parse.py Modified: python/branches/py3k/Lib/urllib/parse.py ============================================================================== --- python/branches/py3k/Lib/urllib/parse.py (original) +++ python/branches/py3k/Lib/urllib/parse.py Wed Sep 16 16:36:22 2009 @@ -329,7 +329,7 @@ res[-1] = b''.join(pct_sequence).decode(encoding, errors) return ''.join(res) -def parse_qs(qs, keep_blank_values=0, strict_parsing=0): +def parse_qs(qs, keep_blank_values=False, strict_parsing=False): """Parse a query given as a string argument. Arguments: @@ -355,7 +355,7 @@ dict[name] = [value] return dict -def parse_qsl(qs, keep_blank_values=0, strict_parsing=0): +def parse_qsl(qs, keep_blank_values=False, strict_parsing=False): """Parse a query given as a string argument. Arguments: @@ -509,7 +509,7 @@ _safe_quoters[cachekey] = quoter return ''.join([quoter[char] for char in bs]) -def urlencode(query, doseq=0): +def urlencode(query, doseq=False): """Encode a sequence of two-element tuples or dictionary into a URL query string. If any values in the query arg are sequences and doseq is true, each From python-checkins at python.org Wed Sep 16 17:54:05 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 15:54:05 -0000 Subject: [Python-checkins] r74831 - in python/branches/py3k/Lib: uu.py warnings.py wsgiref/util.py xml/dom/domreg.py xml/dom/minidom.py xml/sax/saxutils.py xmlrpc/client.py xmlrpc/server.py zipfile.py Message-ID: Author: georg.brandl Date: Wed Sep 16 17:54:04 2009 New Revision: 74831 Log: Use true booleans and PEP8 for argdefaults. Modified: python/branches/py3k/Lib/uu.py python/branches/py3k/Lib/warnings.py python/branches/py3k/Lib/wsgiref/util.py python/branches/py3k/Lib/xml/dom/domreg.py python/branches/py3k/Lib/xml/dom/minidom.py python/branches/py3k/Lib/xml/sax/saxutils.py python/branches/py3k/Lib/xmlrpc/client.py python/branches/py3k/Lib/xmlrpc/server.py python/branches/py3k/Lib/zipfile.py Modified: python/branches/py3k/Lib/uu.py ============================================================================== --- python/branches/py3k/Lib/uu.py (original) +++ python/branches/py3k/Lib/uu.py Wed Sep 16 17:54:04 2009 @@ -80,7 +80,7 @@ out_file.write(b' \nend\n') -def decode(in_file, out_file=None, mode=None, quiet=0): +def decode(in_file, out_file=None, mode=None, quiet=False): """Decode uuencoded file""" # # Open the input file, if needed. Modified: python/branches/py3k/Lib/warnings.py ============================================================================== --- python/branches/py3k/Lib/warnings.py (original) +++ python/branches/py3k/Lib/warnings.py Wed Sep 16 17:54:04 2009 @@ -29,7 +29,7 @@ return s def filterwarnings(action, message="", category=Warning, module="", lineno=0, - append=0): + append=False): """Insert an entry into the list of warnings filters (at the front). Use assertions to check that all arguments have the right type.""" @@ -49,7 +49,7 @@ else: filters.insert(0, item) -def simplefilter(action, category=Warning, lineno=0, append=0): +def simplefilter(action, category=Warning, lineno=0, append=False): """Insert a simple entry into the list of warnings filters (at the front). A simple filter matches all modules and messages. Modified: python/branches/py3k/Lib/wsgiref/util.py ============================================================================== --- python/branches/py3k/Lib/wsgiref/util.py (original) +++ python/branches/py3k/Lib/wsgiref/util.py Wed Sep 16 17:54:04 2009 @@ -67,7 +67,7 @@ url += quote(environ.get('SCRIPT_NAME') or '/') return url -def request_uri(environ, include_query=1): +def request_uri(environ, include_query=True): """Return the full request URI, optionally including the query string""" url = application_uri(environ) from urllib.parse import quote Modified: python/branches/py3k/Lib/xml/dom/domreg.py ============================================================================== --- python/branches/py3k/Lib/xml/dom/domreg.py (original) +++ python/branches/py3k/Lib/xml/dom/domreg.py Wed Sep 16 17:54:04 2009 @@ -36,7 +36,7 @@ return 0 return 1 -def getDOMImplementation(name = None, features = ()): +def getDOMImplementation(name=None, features=()): """getDOMImplementation(name = None, features = ()) -> DOM implementation. Return a suitable DOM implementation. The name is either Modified: python/branches/py3k/Lib/xml/dom/minidom.py ============================================================================== --- python/branches/py3k/Lib/xml/dom/minidom.py (original) +++ python/branches/py3k/Lib/xml/dom/minidom.py Wed Sep 16 17:54:04 2009 @@ -43,7 +43,7 @@ def __bool__(self): return True - def toxml(self, encoding = None): + def toxml(self, encoding=None): return self.toprettyxml("", "", encoding) def toprettyxml(self, indent="\t", newl="\n", encoding=None): Modified: python/branches/py3k/Lib/xml/sax/saxutils.py ============================================================================== --- python/branches/py3k/Lib/xml/sax/saxutils.py (original) +++ python/branches/py3k/Lib/xml/sax/saxutils.py Wed Sep 16 17:54:04 2009 @@ -268,7 +268,7 @@ # --- Utility functions -def prepare_input_source(source, base = ""): +def prepare_input_source(source, base=""): """This function takes an InputSource and an optional base URL and returns a fully resolved InputSource object ready for reading.""" Modified: python/branches/py3k/Lib/xmlrpc/client.py ============================================================================== --- python/branches/py3k/Lib/xmlrpc/client.py (original) +++ python/branches/py3k/Lib/xmlrpc/client.py Wed Sep 16 17:54:04 2009 @@ -474,7 +474,7 @@ # by the way, if you don't understand what's going on in here, # that's perfectly ok. - def __init__(self, encoding=None, allow_none=0): + def __init__(self, encoding=None, allow_none=False): self.memo = {} self.data = None self.encoding = encoding @@ -647,7 +647,7 @@ # and again, if you don't understand what's going on in here, # that's perfectly ok. - def __init__(self, use_datetime=0): + def __init__(self, use_datetime=False): self._type = None self._stack = [] self._marks = [] @@ -880,7 +880,7 @@ # # return A (parser, unmarshaller) tuple. -def getparser(use_datetime=0): +def getparser(use_datetime=False): """getparser() -> parser, unmarshaller Create an instance of the fastest available parser, and attach it @@ -917,7 +917,7 @@ # @return A string containing marshalled data. def dumps(params, methodname=None, methodresponse=None, encoding=None, - allow_none=0): + allow_none=False): """data [,options] -> marshalled data Convert an argument tuple or a Fault instance to an XML-RPC @@ -993,7 +993,7 @@ # (None if not present). # @see Fault -def loads(data, use_datetime=0): +def loads(data, use_datetime=False): """data -> unmarshalled data, method name Convert an XML-RPC packet to unmarshalled data plus a method @@ -1114,7 +1114,7 @@ # that they can decode such a request encode_threshold = None #None = don't encode - def __init__(self, use_datetime=0): + def __init__(self, use_datetime=False): self._use_datetime = use_datetime self._connection = (None, None) self._extra_headers = [] @@ -1129,7 +1129,7 @@ # @param verbose Debugging flag. # @return Parsed response. - def request(self, host, handler, request_body, verbose=0): + def request(self, host, handler, request_body, verbose=False): #retry request once if cached connection has gone cold for i in (0, 1): try: @@ -1141,7 +1141,7 @@ if i: raise - def single_request(self, host, handler, request_body, verbose=0): + def single_request(self, host, handler, request_body, verbose=False): # issue XML-RPC request try: http_conn = self.send_request(host, handler, request_body, verbose) @@ -1379,8 +1379,8 @@ the given encoding. """ - def __init__(self, uri, transport=None, encoding=None, verbose=0, - allow_none=0, use_datetime=0): + def __init__(self, uri, transport=None, encoding=None, verbose=False, + allow_none=False, use_datetime=False): # establish a "logical" server connection # get the url Modified: python/branches/py3k/Lib/xmlrpc/server.py ============================================================================== --- python/branches/py3k/Lib/xmlrpc/server.py (original) +++ python/branches/py3k/Lib/xmlrpc/server.py Wed Sep 16 17:54:04 2009 @@ -201,7 +201,7 @@ self.instance = instance self.allow_dotted_names = allow_dotted_names - def register_function(self, function, name = None): + def register_function(self, function, name=None): """Registers a function to respond to XML-RPC requests. The optional name argument can be used to set a Unicode name @@ -627,7 +627,7 @@ sys.stdout.buffer.write(response) sys.stdout.buffer.flush() - def handle_request(self, request_text = None): + def handle_request(self, request_text=None): """Handle a single XML-RPC request passed through a CGI post method. If no XML data is given then it is read from stdin. The resulting @@ -882,7 +882,7 @@ """ def __init__(self, addr, requestHandler=DocXMLRPCRequestHandler, - logRequests=1, allow_none=False, encoding=None, + logRequests=True, allow_none=False, encoding=None, bind_and_activate=True): SimpleXMLRPCServer.__init__(self, addr, requestHandler, logRequests, allow_none, encoding, bind_and_activate) Modified: python/branches/py3k/Lib/zipfile.py ============================================================================== --- python/branches/py3k/Lib/zipfile.py (original) +++ python/branches/py3k/Lib/zipfile.py Wed Sep 16 17:54:04 2009 @@ -1258,7 +1258,7 @@ class PyZipFile(ZipFile): """Class to create ZIP archives with Python library files and packages.""" - def writepy(self, pathname, basename = ""): + def writepy(self, pathname, basename=""): """Add all files from "pathname" to the ZIP archive. If pathname is a package directory, search the directory and From python-checkins at python.org Wed Sep 16 17:57:46 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 15:57:46 -0000 Subject: [Python-checkins] r74832 - python/trunk/Doc/library/ssl.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 17:57:46 2009 New Revision: 74832 Log: Rewrap long lines. Modified: python/trunk/Doc/library/ssl.rst Modified: python/trunk/Doc/library/ssl.rst ============================================================================== --- python/trunk/Doc/library/ssl.rst (original) +++ python/trunk/Doc/library/ssl.rst Wed Sep 16 17:57:46 2009 @@ -1,6 +1,5 @@ - :mod:`ssl` --- SSL wrapper for socket objects -==================================================================== +============================================= .. module:: ssl :synopsis: SSL wrapper for socket objects @@ -16,32 +15,29 @@ .. index:: TLS, SSL, Transport Layer Security, Secure Sockets Layer -This module provides access to Transport Layer Security (often known -as "Secure Sockets Layer") encryption and peer authentication -facilities for network sockets, both client-side and server-side. -This module uses the OpenSSL library. It is available on all modern -Unix systems, Windows, Mac OS X, and probably additional -platforms, as long as OpenSSL is installed on that platform. +This module provides access to Transport Layer Security (often known as "Secure +Sockets Layer") encryption and peer authentication facilities for network +sockets, both client-side and server-side. This module uses the OpenSSL +library. It is available on all modern Unix systems, Windows, Mac OS X, and +probably additional platforms, as long as OpenSSL is installed on that platform. .. note:: - Some behavior may be platform dependent, since calls are made to the operating - system socket APIs. The installed version of OpenSSL may also cause - variations in behavior. - -This section documents the objects and functions in the ``ssl`` module; -for more general information about TLS, SSL, and certificates, the -reader is referred to the documents in the "See Also" section at -the bottom. - -This module provides a class, :class:`ssl.SSLSocket`, which is -derived from the :class:`socket.socket` type, and provides -a socket-like wrapper that also encrypts and decrypts the data -going over the socket with SSL. It supports additional -:meth:`read` and :meth:`write` methods, along with a method, :meth:`getpeercert`, -to retrieve the certificate of the other side of the connection, and -a method, :meth:`cipher`, to retrieve the cipher being used for the -secure connection. + Some behavior may be platform dependent, since calls are made to the + operating system socket APIs. The installed version of OpenSSL may also + cause variations in behavior. + +This section documents the objects and functions in the ``ssl`` module; for more +general information about TLS, SSL, and certificates, the reader is referred to +the documents in the "See Also" section at the bottom. + +This module provides a class, :class:`ssl.SSLSocket`, which is derived from the +:class:`socket.socket` type, and provides a socket-like wrapper that also +encrypts and decrypts the data going over the socket with SSL. It supports +additional :meth:`read` and :meth:`write` methods, along with a method, +:meth:`getpeercert`, to retrieve the certificate of the other side of the +connection, and a method, :meth:`cipher`, to retrieve the cipher being used for +the secure connection. Functions, Constants, and Exceptions ------------------------------------ @@ -49,31 +45,33 @@ .. exception:: SSLError Raised to signal an error from the underlying SSL implementation. This - signifies some problem in the higher-level - encryption and authentication layer that's superimposed on the underlying - network connection. This error is a subtype of :exc:`socket.error`, which - in turn is a subtype of :exc:`IOError`. + signifies some problem in the higher-level encryption and authentication + layer that's superimposed on the underlying network connection. This error + is a subtype of :exc:`socket.error`, which in turn is a subtype of + :exc:`IOError`. .. function:: wrap_socket (sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version={see docs}, ca_certs=None, do_handshake_on_connect=True, suppress_ragged_eofs=True) - Takes an instance ``sock`` of :class:`socket.socket`, and returns an instance of :class:`ssl.SSLSocket`, a subtype - of :class:`socket.socket`, which wraps the underlying socket in an SSL context. - For client-side sockets, the context construction is lazy; if the underlying socket isn't - connected yet, the context construction will be performed after :meth:`connect` is called - on the socket. For server-side sockets, if the socket has no remote peer, it is assumed - to be a listening socket, and the server-side SSL wrapping is automatically performed - on client connections accepted via the :meth:`accept` method. :func:`wrap_socket` may - raise :exc:`SSLError`. - - The ``keyfile`` and ``certfile`` parameters specify optional files which contain a certificate - to be used to identify the local side of the connection. See the discussion of :ref:`ssl-certificates` - for more information on how the certificate is stored in the ``certfile``. - - Often the private key is stored - in the same file as the certificate; in this case, only the ``certfile`` parameter need be - passed. If the private key is stored in a separate file, both parameters must be used. - If the private key is stored in the ``certfile``, it should come before the first certificate - in the certificate chain:: + Takes an instance ``sock`` of :class:`socket.socket`, and returns an instance + of :class:`ssl.SSLSocket`, a subtype of :class:`socket.socket`, which wraps + the underlying socket in an SSL context. For client-side sockets, the + context construction is lazy; if the underlying socket isn't connected yet, + the context construction will be performed after :meth:`connect` is called on + the socket. For server-side sockets, if the socket has no remote peer, it is + assumed to be a listening socket, and the server-side SSL wrapping is + automatically performed on client connections accepted via the :meth:`accept` + method. :func:`wrap_socket` may raise :exc:`SSLError`. + + The ``keyfile`` and ``certfile`` parameters specify optional files which + contain a certificate to be used to identify the local side of the + connection. See the discussion of :ref:`ssl-certificates` for more + information on how the certificate is stored in the ``certfile``. + + Often the private key is stored in the same file as the certificate; in this + case, only the ``certfile`` parameter need be passed. If the private key is + stored in a separate file, both parameters must be used. If the private key + is stored in the ``certfile``, it should come before the first certificate in + the certificate chain:: -----BEGIN RSA PRIVATE KEY----- ... (private key in base64 encoding) ... @@ -82,31 +80,33 @@ ... (certificate in base64 PEM encoding) ... -----END CERTIFICATE----- - The parameter ``server_side`` is a boolean which identifies whether server-side or client-side - behavior is desired from this socket. + The parameter ``server_side`` is a boolean which identifies whether + server-side or client-side behavior is desired from this socket. - The parameter ``cert_reqs`` specifies whether a certificate is - required from the other side of the connection, and whether it will - be validated if provided. It must be one of the three values - :const:`CERT_NONE` (certificates ignored), :const:`CERT_OPTIONAL` (not required, - but validated if provided), or :const:`CERT_REQUIRED` (required and - validated). If the value of this parameter is not :const:`CERT_NONE`, then - the ``ca_certs`` parameter must point to a file of CA certificates. - - The ``ca_certs`` file contains a set of concatenated "certification authority" certificates, - which are used to validate certificates passed from the other end of the connection. - See the discussion of :ref:`ssl-certificates` for more information about how to arrange - the certificates in this file. - - The parameter ``ssl_version`` specifies which version of the SSL protocol to use. - Typically, the server chooses a particular protocol version, and the client - must adapt to the server's choice. Most of the versions are not interoperable - with the other versions. If not specified, for client-side operation, the - default SSL version is SSLv3; for server-side operation, SSLv23. These - version selections provide the most compatibility with other versions. + The parameter ``cert_reqs`` specifies whether a certificate is required from + the other side of the connection, and whether it will be validated if + provided. It must be one of the three values :const:`CERT_NONE` + (certificates ignored), :const:`CERT_OPTIONAL` (not required, but validated + if provided), or :const:`CERT_REQUIRED` (required and validated). If the + value of this parameter is not :const:`CERT_NONE`, then the ``ca_certs`` + parameter must point to a file of CA certificates. + + The ``ca_certs`` file contains a set of concatenated "certification + authority" certificates, which are used to validate certificates passed from + the other end of the connection. See the discussion of + :ref:`ssl-certificates` for more information about how to arrange the + certificates in this file. + + The parameter ``ssl_version`` specifies which version of the SSL protocol to + use. Typically, the server chooses a particular protocol version, and the + client must adapt to the server's choice. Most of the versions are not + interoperable with the other versions. If not specified, for client-side + operation, the default SSL version is SSLv3; for server-side operation, + SSLv23. These version selections provide the most compatibility with other + versions. - Here's a table showing which versions in a client (down the side) - can connect to which versions in a server (along the top): + Here's a table showing which versions in a client (down the side) can connect + to which versions in a server (along the top): .. table:: @@ -119,51 +119,52 @@ *TLSv1* no no yes yes ======================== ========= ========= ========== ========= - In some older versions of OpenSSL (for instance, 0.9.7l on OS X 10.4), - an SSLv2 client could not connect to an SSLv23 server. + In some older versions of OpenSSL (for instance, 0.9.7l on OS X 10.4), an + SSLv2 client could not connect to an SSLv23 server. The parameter ``do_handshake_on_connect`` specifies whether to do the SSL handshake automatically after doing a :meth:`socket.connect`, or whether the - application program will call it explicitly, by invoking the :meth:`SSLSocket.do_handshake` - method. Calling :meth:`SSLSocket.do_handshake` explicitly gives the program control over - the blocking behavior of the socket I/O involved in the handshake. - - The parameter ``suppress_ragged_eofs`` specifies how the :meth:`SSLSocket.read` - method should signal unexpected EOF from the other end of the connection. If specified - as :const:`True` (the default), it returns a normal EOF in response to unexpected - EOF errors raised from the underlying socket; if :const:`False`, it will raise - the exceptions back to the caller. + application program will call it explicitly, by invoking the + :meth:`SSLSocket.do_handshake` method. Calling + :meth:`SSLSocket.do_handshake` explicitly gives the program control over the + blocking behavior of the socket I/O involved in the handshake. + + The parameter ``suppress_ragged_eofs`` specifies how the + :meth:`SSLSocket.read` method should signal unexpected EOF from the other end + of the connection. If specified as :const:`True` (the default), it returns a + normal EOF in response to unexpected EOF errors raised from the underlying + socket; if :const:`False`, it will raise the exceptions back to the caller. .. function:: RAND_status() - Returns True if the SSL pseudo-random number generator has been - seeded with 'enough' randomness, and False otherwise. You can use - :func:`ssl.RAND_egd` and :func:`ssl.RAND_add` to increase the randomness - of the pseudo-random number generator. + Returns True if the SSL pseudo-random number generator has been seeded with + 'enough' randomness, and False otherwise. You can use :func:`ssl.RAND_egd` + and :func:`ssl.RAND_add` to increase the randomness of the pseudo-random + number generator. .. function:: RAND_egd(path) If you are running an entropy-gathering daemon (EGD) somewhere, and ``path`` - is the pathname of a socket connection open to it, this will read - 256 bytes of randomness from the socket, and add it to the SSL pseudo-random number generator - to increase the security of generated secret keys. This is typically only - necessary on systems without better sources of randomness. + is the pathname of a socket connection open to it, this will read 256 bytes + of randomness from the socket, and add it to the SSL pseudo-random number + generator to increase the security of generated secret keys. This is + typically only necessary on systems without better sources of randomness. - See http://egd.sourceforge.net/ or http://prngd.sourceforge.net/ for - sources of entropy-gathering daemons. + See http://egd.sourceforge.net/ or http://prngd.sourceforge.net/ for sources + of entropy-gathering daemons. .. function:: RAND_add(bytes, entropy) - Mixes the given ``bytes`` into the SSL pseudo-random number generator. - The parameter ``entropy`` (a float) is a lower bound on the entropy - contained in string (so you can always use :const:`0.0`). - See :rfc:`1750` for more information on sources of entropy. + Mixes the given ``bytes`` into the SSL pseudo-random number generator. The + parameter ``entropy`` (a float) is a lower bound on the entropy contained in + string (so you can always use :const:`0.0`). See :rfc:`1750` for more + information on sources of entropy. .. function:: cert_time_to_seconds(timestring) - Returns a floating-point value containing a normal seconds-after-the-epoch time - value, given the time-string representing the "notBefore" or "notAfter" date - from a certificate. + Returns a floating-point value containing a normal seconds-after-the-epoch + time value, given the time-string representing the "notBefore" or "notAfter" + date from a certificate. Here's an example:: @@ -177,14 +178,13 @@ .. function:: get_server_certificate (addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None) - Given the address ``addr`` of an SSL-protected server, as a - (*hostname*, *port-number*) pair, fetches the server's certificate, - and returns it as a PEM-encoded string. If ``ssl_version`` is - specified, uses that version of the SSL protocol to attempt to - connect to the server. If ``ca_certs`` is specified, it should be - a file containing a list of root certificates, the same format as - used for the same parameter in :func:`wrap_socket`. The call will - attempt to validate the server certificate against that set of root + Given the address ``addr`` of an SSL-protected server, as a (*hostname*, + *port-number*) pair, fetches the server's certificate, and returns it as a + PEM-encoded string. If ``ssl_version`` is specified, uses that version of + the SSL protocol to attempt to connect to the server. If ``ca_certs`` is + specified, it should be a file containing a list of root certificates, the + same format as used for the same parameter in :func:`wrap_socket`. The call + will attempt to validate the server certificate against that set of root certificates, and will fail if the validation attempt fails. .. function:: DER_cert_to_PEM_cert (DER_cert_bytes) @@ -194,31 +194,29 @@ .. function:: PEM_cert_to_DER_cert (PEM_cert_string) - Given a certificate as an ASCII PEM string, returns a DER-encoded - sequence of bytes for that same certificate. + Given a certificate as an ASCII PEM string, returns a DER-encoded sequence of + bytes for that same certificate. .. data:: CERT_NONE - Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` - when no certificates will be required or validated from the other - side of the socket connection. + Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` when no + certificates will be required or validated from the other side of the socket + connection. .. data:: CERT_OPTIONAL - Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` - when no certificates will be required from the other side of the - socket connection, but if they are provided, will be validated. - Note that use of this setting requires a valid certificate - validation file also be passed as a value of the ``ca_certs`` - parameter. + Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` when no + certificates will be required from the other side of the socket connection, + but if they are provided, will be validated. Note that use of this setting + requires a valid certificate validation file also be passed as a value of the + ``ca_certs`` parameter. .. data:: CERT_REQUIRED - Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` - when certificates will be required from the other side of the - socket connection. Note that use of this setting requires a valid certificate - validation file also be passed as a value of the ``ca_certs`` - parameter. + Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` when + certificates will be required from the other side of the socket connection. + Note that use of this setting requires a valid certificate validation file + also be passed as a value of the ``ca_certs`` parameter. .. data:: PROTOCOL_SSLv2 @@ -226,22 +224,21 @@ .. data:: PROTOCOL_SSLv23 - Selects SSL version 2 or 3 as the channel encryption protocol. - This is a setting to use with servers for maximum compatibility - with the other end of an SSL connection, but it may cause the - specific ciphers chosen for the encryption to be of fairly low - quality. + Selects SSL version 2 or 3 as the channel encryption protocol. This is a + setting to use with servers for maximum compatibility with the other end of + an SSL connection, but it may cause the specific ciphers chosen for the + encryption to be of fairly low quality. .. data:: PROTOCOL_SSLv3 - Selects SSL version 3 as the channel encryption protocol. - For clients, this is the maximally compatible SSL variant. + Selects SSL version 3 as the channel encryption protocol. For clients, this + is the maximally compatible SSL variant. .. data:: PROTOCOL_TLSv1 - Selects TLS version 1 as the channel encryption protocol. This is - the most modern version, and probably the best choice for maximum - protection, if both sides can speak it. + Selects TLS version 1 as the channel encryption protocol. This is the most + modern version, and probably the best choice for maximum protection, if both + sides can speak it. SSLSocket Objects @@ -253,30 +250,28 @@ .. method:: SSLSocket.write(data) - Writes the ``data`` to the other side of the connection, using the - SSL channel to encrypt. Returns the number of bytes written. + Writes the ``data`` to the other side of the connection, using the SSL + channel to encrypt. Returns the number of bytes written. .. method:: SSLSocket.getpeercert(binary_form=False) - If there is no certificate for the peer on the other end of the - connection, returns ``None``. + If there is no certificate for the peer on the other end of the connection, + returns ``None``. - If the parameter ``binary_form`` is :const:`False`, and a - certificate was received from the peer, this method returns a - :class:`dict` instance. If the certificate was not validated, the - dict is empty. If the certificate was validated, it returns a dict - with the keys ``subject`` (the principal for which the certificate - was issued), and ``notAfter`` (the time after which the certificate - should not be trusted). The certificate was already validated, so - the ``notBefore`` and ``issuer`` fields are not returned. If a - certificate contains an instance of the *Subject Alternative Name* - extension (see :rfc:`3280`), there will also be a - ``subjectAltName`` key in the dictionary. + If the parameter ``binary_form`` is :const:`False`, and a certificate was + received from the peer, this method returns a :class:`dict` instance. If the + certificate was not validated, the dict is empty. If the certificate was + validated, it returns a dict with the keys ``subject`` (the principal for + which the certificate was issued), and ``notAfter`` (the time after which the + certificate should not be trusted). The certificate was already validated, + so the ``notBefore`` and ``issuer`` fields are not returned. If a + certificate contains an instance of the *Subject Alternative Name* extension + (see :rfc:`3280`), there will also be a ``subjectAltName`` key in the + dictionary. The "subject" field is a tuple containing the sequence of relative - distinguished names (RDNs) given in the certificate's data - structure for the principal, and each RDN is a sequence of - name-value pairs:: + distinguished names (RDNs) given in the certificate's data structure for the + principal, and each RDN is a sequence of name-value pairs:: {'notAfter': 'Feb 16 16:54:50 2013 GMT', 'subject': ((('countryName', u'US'),), @@ -286,29 +281,27 @@ (('organizationalUnitName', u'SSL'),), (('commonName', u'somemachine.python.org'),))} - If the ``binary_form`` parameter is :const:`True`, and a - certificate was provided, this method returns the DER-encoded form - of the entire certificate as a sequence of bytes, or :const:`None` if the - peer did not provide a certificate. This return - value is independent of validation; if validation was required - (:const:`CERT_OPTIONAL` or :const:`CERT_REQUIRED`), it will have + If the ``binary_form`` parameter is :const:`True`, and a certificate was + provided, this method returns the DER-encoded form of the entire certificate + as a sequence of bytes, or :const:`None` if the peer did not provide a + certificate. This return value is independent of validation; if validation + was required (:const:`CERT_OPTIONAL` or :const:`CERT_REQUIRED`), it will have been validated, but if :const:`CERT_NONE` was used to establish the connection, the certificate, if present, will not have been validated. .. method:: SSLSocket.cipher() - Returns a three-value tuple containing the name of the cipher being - used, the version of the SSL protocol that defines its use, and the - number of secret bits being used. If no connection has been - established, returns ``None``. + Returns a three-value tuple containing the name of the cipher being used, the + version of the SSL protocol that defines its use, and the number of secret + bits being used. If no connection has been established, returns ``None``. .. method:: SSLSocket.do_handshake() - Perform a TLS/SSL handshake. If this is used with a non-blocking socket, - it may raise :exc:`SSLError` with an ``arg[0]`` of :const:`SSL_ERROR_WANT_READ` - or :const:`SSL_ERROR_WANT_WRITE`, in which case it must be called again until it - completes successfully. For example, to simulate the behavior of a blocking socket, - one might write:: + Perform a TLS/SSL handshake. If this is used with a non-blocking socket, it + may raise :exc:`SSLError` with an ``arg[0]`` of :const:`SSL_ERROR_WANT_READ` + or :const:`SSL_ERROR_WANT_WRITE`, in which case it must be called again until + it completes successfully. For example, to simulate the behavior of a + blocking socket, one might write:: while True: try: @@ -324,13 +317,12 @@ .. method:: SSLSocket.unwrap() - Performs the SSL shutdown handshake, which removes the TLS layer - from the underlying socket, and returns the underlying socket - object. This can be used to go from encrypted operation over a - connection to unencrypted. The socket instance returned should always be - used for further communication with the other side of the - connection, rather than the original socket instance (which may - not function properly after the unwrap). + Performs the SSL shutdown handshake, which removes the TLS layer from the + underlying socket, and returns the underlying socket object. This can be + used to go from encrypted operation over a connection to unencrypted. The + socket instance returned should always be used for further communication with + the other side of the connection, rather than the original socket instance + (which may not function properly after the unwrap). .. index:: single: certificates @@ -341,57 +333,54 @@ Certificates ------------ -Certificates in general are part of a public-key / private-key system. In this system, each *principal*, -(which may be a machine, or a person, or an organization) is assigned a unique two-part encryption key. -One part of the key is public, and is called the *public key*; the other part is kept secret, and is called -the *private key*. The two parts are related, in that if you encrypt a message with one of the parts, you can -decrypt it with the other part, and **only** with the other part. - -A certificate contains information about two principals. It contains -the name of a *subject*, and the subject's public key. It also -contains a statement by a second principal, the *issuer*, that the -subject is who he claims to be, and that this is indeed the subject's -public key. The issuer's statement is signed with the issuer's -private key, which only the issuer knows. However, anyone can verify -the issuer's statement by finding the issuer's public key, decrypting -the statement with it, and comparing it to the other information in -the certificate. The certificate also contains information about the -time period over which it is valid. This is expressed as two fields, -called "notBefore" and "notAfter". - -In the Python use of certificates, a client or server -can use a certificate to prove who they are. The other -side of a network connection can also be required to produce a certificate, -and that certificate can be validated to the satisfaction -of the client or server that requires such validation. -The connection attempt can be set to raise an exception if -the validation fails. Validation is done -automatically, by the underlying OpenSSL framework; the -application need not concern itself with its mechanics. -But the application does usually need to provide -sets of certificates to allow this process to take place. - -Python uses files to contain certificates. They should be formatted -as "PEM" (see :rfc:`1422`), which is a base-64 encoded form wrapped -with a header line and a footer line:: +Certificates in general are part of a public-key / private-key system. In this +system, each *principal*, (which may be a machine, or a person, or an +organization) is assigned a unique two-part encryption key. One part of the key +is public, and is called the *public key*; the other part is kept secret, and is +called the *private key*. The two parts are related, in that if you encrypt a +message with one of the parts, you can decrypt it with the other part, and +**only** with the other part. + +A certificate contains information about two principals. It contains the name +of a *subject*, and the subject's public key. It also contains a statement by a +second principal, the *issuer*, that the subject is who he claims to be, and +that this is indeed the subject's public key. The issuer's statement is signed +with the issuer's private key, which only the issuer knows. However, anyone can +verify the issuer's statement by finding the issuer's public key, decrypting the +statement with it, and comparing it to the other information in the certificate. +The certificate also contains information about the time period over which it is +valid. This is expressed as two fields, called "notBefore" and "notAfter". + +In the Python use of certificates, a client or server can use a certificate to +prove who they are. The other side of a network connection can also be required +to produce a certificate, and that certificate can be validated to the +satisfaction of the client or server that requires such validation. The +connection attempt can be set to raise an exception if the validation fails. +Validation is done automatically, by the underlying OpenSSL framework; the +application need not concern itself with its mechanics. But the application +does usually need to provide sets of certificates to allow this process to take +place. + +Python uses files to contain certificates. They should be formatted as "PEM" +(see :rfc:`1422`), which is a base-64 encoded form wrapped with a header line +and a footer line:: -----BEGIN CERTIFICATE----- ... (certificate in base64 PEM encoding) ... -----END CERTIFICATE----- -The Python files which contain certificates can contain a sequence -of certificates, sometimes called a *certificate chain*. This chain -should start with the specific certificate for the principal who "is" -the client or server, and then the certificate for the issuer of that -certificate, and then the certificate for the issuer of *that* certificate, -and so on up the chain till you get to a certificate which is *self-signed*, -that is, a certificate which has the same subject and issuer, -sometimes called a *root certificate*. The certificates should just -be concatenated together in the certificate file. For example, suppose -we had a three certificate chain, from our server certificate to the -certificate of the certification authority that signed our server certificate, -to the root certificate of the agency which issued the certification authority's -certificate:: +The Python files which contain certificates can contain a sequence of +certificates, sometimes called a *certificate chain*. This chain should start +with the specific certificate for the principal who "is" the client or server, +and then the certificate for the issuer of that certificate, and then the +certificate for the issuer of *that* certificate, and so on up the chain till +you get to a certificate which is *self-signed*, that is, a certificate which +has the same subject and issuer, sometimes called a *root certificate*. The +certificates should just be concatenated together in the certificate file. For +example, suppose we had a three certificate chain, from our server certificate +to the certificate of the certification authority that signed our server +certificate, to the root certificate of the agency which issued the +certification authority's certificate:: -----BEGIN CERTIFICATE----- ... (certificate for your server)... @@ -405,33 +394,30 @@ If you are going to require validation of the other side of the connection's certificate, you need to provide a "CA certs" file, filled with the certificate -chains for each issuer you are willing to trust. Again, this file just -contains these chains concatenated together. For validation, Python will -use the first chain it finds in the file which matches. +chains for each issuer you are willing to trust. Again, this file just contains +these chains concatenated together. For validation, Python will use the first +chain it finds in the file which matches. Some "standard" root certificates are available from various certification -authorities: -`CACert.org `_, -`Thawte `_, -`Verisign `_, -`Positive SSL `_ (used by python.org), -`Equifax and GeoTrust `_. - -In general, if you are using -SSL3 or TLS1, you don't need to put the full chain in your "CA certs" file; -you only need the root certificates, and the remote peer is supposed to -furnish the other certificates necessary to chain from its certificate to -a root certificate. -See :rfc:`4158` for more discussion of the way in which -certification chains can be built. - -If you are going to create a server that provides SSL-encrypted -connection services, you will need to acquire a certificate for that -service. There are many ways of acquiring appropriate certificates, -such as buying one from a certification authority. Another common -practice is to generate a self-signed certificate. The simplest -way to do this is with the OpenSSL package, using something like -the following:: +authorities: `CACert.org `_, `Thawte +`_, `Verisign +`_, `Positive SSL +`_ +(used by python.org), `Equifax and GeoTrust +`_. + +In general, if you are using SSL3 or TLS1, you don't need to put the full chain +in your "CA certs" file; you only need the root certificates, and the remote +peer is supposed to furnish the other certificates necessary to chain from its +certificate to a root certificate. See :rfc:`4158` for more discussion of the +way in which certification chains can be built. + +If you are going to create a server that provides SSL-encrypted connection +services, you will need to acquire a certificate for that service. There are +many ways of acquiring appropriate certificates, such as buying one from a +certification authority. Another common practice is to generate a self-signed +certificate. The simplest way to do this is with the OpenSSL package, using +something like the following:: % openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem Generating a 1024 bit RSA private key @@ -455,9 +441,9 @@ Email Address []:ops at myserver.mygroup.myorganization.com % -The disadvantage of a self-signed certificate is that it is its -own root certificate, and no one else will have it in their cache -of known (and trusted) root certificates. +The disadvantage of a self-signed certificate is that it is its own root +certificate, and no one else will have it in their cache of known (and trusted) +root certificates. Examples @@ -466,7 +452,8 @@ Testing for SSL support ^^^^^^^^^^^^^^^^^^^^^^^ -To test for the presence of SSL support in a Python installation, user code should use the following idiom:: +To test for the presence of SSL support in a Python installation, user code +should use the following idiom:: try: import ssl @@ -478,8 +465,8 @@ Client-side operation ^^^^^^^^^^^^^^^^^^^^^ -This example connects to an SSL server, prints the server's address and certificate, -sends some bytes, and reads part of the response:: +This example connects to an SSL server, prints the server's address and +certificate, sends some bytes, and reads part of the response:: import socket, ssl, pprint @@ -507,8 +494,8 @@ # note that closing the SSLSocket will also close the underlying socket ssl_sock.close() -As of September 6, 2007, the certificate printed by this program -looked like this:: +As of September 6, 2007, the certificate printed by this program looked like +this:: {'notAfter': 'May 8 23:59:59 2009 GMT', 'subject': ((('serialNumber', u'2497886'),), @@ -531,9 +518,9 @@ Server-side operation ^^^^^^^^^^^^^^^^^^^^^ -For server operation, typically you'd need to have a server certificate, and private key, each in a file. -You'd open a socket, bind it to a port, call :meth:`listen` on it, then start waiting for clients -to connect:: +For server operation, typically you'd need to have a server certificate, and +private key, each in a file. You'd open a socket, bind it to a port, call +:meth:`listen` on it, then start waiting for clients to connect:: import socket, ssl @@ -541,8 +528,9 @@ bindsocket.bind(('myaddr.mydomain.com', 10023)) bindsocket.listen(5) -When one did, you'd call :meth:`accept` on the socket to get the new socket from the other -end, and use :func:`wrap_socket` to create a server-side SSL context for it:: +When one did, you'd call :meth:`accept` on the socket to get the new socket from +the other end, and use :func:`wrap_socket` to create a server-side SSL context +for it:: while True: newsocket, fromaddr = bindsocket.accept() @@ -553,7 +541,8 @@ ssl_version=ssl.PROTOCOL_TLSv1) deal_with_client(connstream) -Then you'd read data from the ``connstream`` and do something with it till you are finished with the client (or the client is finished with you):: +Then you'd read data from the ``connstream`` and do something with it till you +are finished with the client (or the client is finished with you):: def deal_with_client(connstream): From python-checkins at python.org Wed Sep 16 17:58:15 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 15:58:15 -0000 Subject: [Python-checkins] r74833 - in python/branches/py3k/Doc/library: someos.rst spwd.rst ssl.rst stat.rst string.rst stringprep.rst strings.rst struct.rst subprocess.rst sunau.rst symbol.rst sys.rst syslog.rst tabnanny.rst tarfile.rst telnetlib.rst tempfile.rst termios.rst test.rst textwrap.rst threading.rst time.rst timeit.rst tkinter.tix.rst tkinter.ttk.rst token.rst trace.rst traceback.rst tty.rst undoc.rst unicodedata.rst unittest.rst unix.rst urllib.error.rst urllib.parse.rst urllib.request.rst uu.rst uuid.rst warnings.rst wave.rst weakref.rst webbrowser.rst winreg.rst winsound.rst wsgiref.rst xdrlib.rst xml.dom.minidom.rst xml.dom.pulldom.rst xml.dom.rst xml.etree.elementtree.rst xml.sax.handler.rst xml.sax.reader.rst xml.sax.rst xml.sax.utils.rst xmlrpc.client.rst xmlrpc.server.rst zipfile.rst zipimport.rst zlib.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 17:58:14 2009 New Revision: 74833 Log: Last round of adapting style of documenting argument default values. Modified: python/branches/py3k/Doc/library/someos.rst python/branches/py3k/Doc/library/spwd.rst python/branches/py3k/Doc/library/ssl.rst python/branches/py3k/Doc/library/stat.rst python/branches/py3k/Doc/library/string.rst python/branches/py3k/Doc/library/stringprep.rst python/branches/py3k/Doc/library/strings.rst python/branches/py3k/Doc/library/struct.rst python/branches/py3k/Doc/library/subprocess.rst python/branches/py3k/Doc/library/sunau.rst python/branches/py3k/Doc/library/symbol.rst python/branches/py3k/Doc/library/sys.rst python/branches/py3k/Doc/library/syslog.rst python/branches/py3k/Doc/library/tabnanny.rst python/branches/py3k/Doc/library/tarfile.rst python/branches/py3k/Doc/library/telnetlib.rst python/branches/py3k/Doc/library/tempfile.rst python/branches/py3k/Doc/library/termios.rst python/branches/py3k/Doc/library/test.rst python/branches/py3k/Doc/library/textwrap.rst python/branches/py3k/Doc/library/threading.rst python/branches/py3k/Doc/library/time.rst python/branches/py3k/Doc/library/timeit.rst python/branches/py3k/Doc/library/tkinter.tix.rst python/branches/py3k/Doc/library/tkinter.ttk.rst python/branches/py3k/Doc/library/token.rst python/branches/py3k/Doc/library/trace.rst python/branches/py3k/Doc/library/traceback.rst python/branches/py3k/Doc/library/tty.rst python/branches/py3k/Doc/library/undoc.rst python/branches/py3k/Doc/library/unicodedata.rst python/branches/py3k/Doc/library/unittest.rst python/branches/py3k/Doc/library/unix.rst python/branches/py3k/Doc/library/urllib.error.rst python/branches/py3k/Doc/library/urllib.parse.rst python/branches/py3k/Doc/library/urllib.request.rst python/branches/py3k/Doc/library/uu.rst python/branches/py3k/Doc/library/uuid.rst python/branches/py3k/Doc/library/warnings.rst python/branches/py3k/Doc/library/wave.rst python/branches/py3k/Doc/library/weakref.rst python/branches/py3k/Doc/library/webbrowser.rst python/branches/py3k/Doc/library/winreg.rst python/branches/py3k/Doc/library/winsound.rst python/branches/py3k/Doc/library/wsgiref.rst python/branches/py3k/Doc/library/xdrlib.rst python/branches/py3k/Doc/library/xml.dom.minidom.rst python/branches/py3k/Doc/library/xml.dom.pulldom.rst python/branches/py3k/Doc/library/xml.dom.rst python/branches/py3k/Doc/library/xml.etree.elementtree.rst python/branches/py3k/Doc/library/xml.sax.handler.rst python/branches/py3k/Doc/library/xml.sax.reader.rst python/branches/py3k/Doc/library/xml.sax.rst python/branches/py3k/Doc/library/xml.sax.utils.rst python/branches/py3k/Doc/library/xmlrpc.client.rst python/branches/py3k/Doc/library/xmlrpc.server.rst python/branches/py3k/Doc/library/zipfile.rst python/branches/py3k/Doc/library/zipimport.rst python/branches/py3k/Doc/library/zlib.rst Modified: python/branches/py3k/Doc/library/someos.rst ============================================================================== --- python/branches/py3k/Doc/library/someos.rst (original) +++ python/branches/py3k/Doc/library/someos.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - .. _someos: ********************************** @@ -8,7 +7,7 @@ The modules described in this chapter provide interfaces to operating system features that are available on selected operating systems only. The interfaces are generally modeled after the Unix or C interfaces but they are available on -some other systems as well (e.g. Windows or NT). Here's an overview: +some other systems as well (e.g. Windows). Here's an overview: .. toctree:: Modified: python/branches/py3k/Doc/library/spwd.rst ============================================================================== --- python/branches/py3k/Doc/library/spwd.rst (original) +++ python/branches/py3k/Doc/library/spwd.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`spwd` --- The shadow password database ============================================ @@ -48,7 +47,7 @@ The sp_nam and sp_pwd items are strings, all others are integers. :exc:`KeyError` is raised if the entry asked for cannot be found. -It defines the following items: +The following functions are defined: .. function:: getspnam(name) Modified: python/branches/py3k/Doc/library/ssl.rst ============================================================================== --- python/branches/py3k/Doc/library/ssl.rst (original) +++ python/branches/py3k/Doc/library/ssl.rst Wed Sep 16 17:58:14 2009 @@ -1,6 +1,5 @@ - :mod:`ssl` --- SSL wrapper for socket objects -==================================================================== +============================================= .. module:: ssl :synopsis: SSL wrapper for socket objects @@ -13,32 +12,29 @@ .. index:: TLS, SSL, Transport Layer Security, Secure Sockets Layer -This module provides access to Transport Layer Security (often known -as "Secure Sockets Layer") encryption and peer authentication -facilities for network sockets, both client-side and server-side. -This module uses the OpenSSL library. It is available on all modern -Unix systems, Windows, Mac OS X, and probably additional -platforms, as long as OpenSSL is installed on that platform. +This module provides access to Transport Layer Security (often known as "Secure +Sockets Layer") encryption and peer authentication facilities for network +sockets, both client-side and server-side. This module uses the OpenSSL +library. It is available on all modern Unix systems, Windows, Mac OS X, and +probably additional platforms, as long as OpenSSL is installed on that platform. .. note:: - Some behavior may be platform dependent, since calls are made to the operating - system socket APIs. The installed version of OpenSSL may also cause - variations in behavior. - -This section documents the objects and functions in the ``ssl`` module; -for more general information about TLS, SSL, and certificates, the -reader is referred to the documents in the "See Also" section at -the bottom. - -This module provides a class, :class:`ssl.SSLSocket`, which is -derived from the :class:`socket.socket` type, and provides -a socket-like wrapper that also encrypts and decrypts the data -going over the socket with SSL. It supports additional -:meth:`read` and :meth:`write` methods, along with a method, :meth:`getpeercert`, -to retrieve the certificate of the other side of the connection, and -a method, :meth:`cipher`, to retrieve the cipher being used for the -secure connection. + Some behavior may be platform dependent, since calls are made to the + operating system socket APIs. The installed version of OpenSSL may also + cause variations in behavior. + +This section documents the objects and functions in the ``ssl`` module; for more +general information about TLS, SSL, and certificates, the reader is referred to +the documents in the "See Also" section at the bottom. + +This module provides a class, :class:`ssl.SSLSocket`, which is derived from the +:class:`socket.socket` type, and provides a socket-like wrapper that also +encrypts and decrypts the data going over the socket with SSL. It supports +additional :meth:`read` and :meth:`write` methods, along with a method, +:meth:`getpeercert`, to retrieve the certificate of the other side of the +connection, and a method, :meth:`cipher`, to retrieve the cipher being used for +the secure connection. Functions, Constants, and Exceptions ------------------------------------ @@ -46,31 +42,33 @@ .. exception:: SSLError Raised to signal an error from the underlying SSL implementation. This - signifies some problem in the higher-level - encryption and authentication layer that's superimposed on the underlying - network connection. This error is a subtype of :exc:`socket.error`, which - in turn is a subtype of :exc:`IOError`. - -.. function:: wrap_socket (sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version={see docs}, ca_certs=None, do_handshake_on_connect=True, suppress_ragged_eofs=True) - - Takes an instance ``sock`` of :class:`socket.socket`, and returns an instance of :class:`ssl.SSLSocket`, a subtype - of :class:`socket.socket`, which wraps the underlying socket in an SSL context. - For client-side sockets, the context construction is lazy; if the underlying socket isn't - connected yet, the context construction will be performed after :meth:`connect` is called - on the socket. For server-side sockets, if the socket has no remote peer, it is assumed - to be a listening socket, and the server-side SSL wrapping is automatically performed - on client connections accepted via the :meth:`accept` method. :func:`wrap_socket` may - raise :exc:`SSLError`. - - The ``keyfile`` and ``certfile`` parameters specify optional files which contain a certificate - to be used to identify the local side of the connection. See the discussion of :ref:`ssl-certificates` - for more information on how the certificate is stored in the ``certfile``. - - Often the private key is stored - in the same file as the certificate; in this case, only the ``certfile`` parameter need be - passed. If the private key is stored in a separate file, both parameters must be used. - If the private key is stored in the ``certfile``, it should come before the first certificate - in the certificate chain:: + signifies some problem in the higher-level encryption and authentication + layer that's superimposed on the underlying network connection. This error + is a subtype of :exc:`socket.error`, which in turn is a subtype of + :exc:`IOError`. + +.. function:: wrap_socket(sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version={see docs}, ca_certs=None, do_handshake_on_connect=True, suppress_ragged_eofs=True) + + Takes an instance ``sock`` of :class:`socket.socket`, and returns an instance + of :class:`ssl.SSLSocket`, a subtype of :class:`socket.socket`, which wraps + the underlying socket in an SSL context. For client-side sockets, the + context construction is lazy; if the underlying socket isn't connected yet, + the context construction will be performed after :meth:`connect` is called on + the socket. For server-side sockets, if the socket has no remote peer, it is + assumed to be a listening socket, and the server-side SSL wrapping is + automatically performed on client connections accepted via the :meth:`accept` + method. :func:`wrap_socket` may raise :exc:`SSLError`. + + The ``keyfile`` and ``certfile`` parameters specify optional files which + contain a certificate to be used to identify the local side of the + connection. See the discussion of :ref:`ssl-certificates` for more + information on how the certificate is stored in the ``certfile``. + + Often the private key is stored in the same file as the certificate; in this + case, only the ``certfile`` parameter need be passed. If the private key is + stored in a separate file, both parameters must be used. If the private key + is stored in the ``certfile``, it should come before the first certificate in + the certificate chain:: -----BEGIN RSA PRIVATE KEY----- ... (private key in base64 encoding) ... @@ -79,31 +77,33 @@ ... (certificate in base64 PEM encoding) ... -----END CERTIFICATE----- - The parameter ``server_side`` is a boolean which identifies whether server-side or client-side - behavior is desired from this socket. + The parameter ``server_side`` is a boolean which identifies whether + server-side or client-side behavior is desired from this socket. - The parameter ``cert_reqs`` specifies whether a certificate is - required from the other side of the connection, and whether it will - be validated if provided. It must be one of the three values - :const:`CERT_NONE` (certificates ignored), :const:`CERT_OPTIONAL` (not required, - but validated if provided), or :const:`CERT_REQUIRED` (required and - validated). If the value of this parameter is not :const:`CERT_NONE`, then - the ``ca_certs`` parameter must point to a file of CA certificates. - - The ``ca_certs`` file contains a set of concatenated "certification authority" certificates, - which are used to validate certificates passed from the other end of the connection. - See the discussion of :ref:`ssl-certificates` for more information about how to arrange - the certificates in this file. - - The parameter ``ssl_version`` specifies which version of the SSL protocol to use. - Typically, the server chooses a particular protocol version, and the client - must adapt to the server's choice. Most of the versions are not interoperable - with the other versions. If not specified, for client-side operation, the - default SSL version is SSLv3; for server-side operation, SSLv23. These - version selections provide the most compatibility with other versions. + The parameter ``cert_reqs`` specifies whether a certificate is required from + the other side of the connection, and whether it will be validated if + provided. It must be one of the three values :const:`CERT_NONE` + (certificates ignored), :const:`CERT_OPTIONAL` (not required, but validated + if provided), or :const:`CERT_REQUIRED` (required and validated). If the + value of this parameter is not :const:`CERT_NONE`, then the ``ca_certs`` + parameter must point to a file of CA certificates. + + The ``ca_certs`` file contains a set of concatenated "certification + authority" certificates, which are used to validate certificates passed from + the other end of the connection. See the discussion of + :ref:`ssl-certificates` for more information about how to arrange the + certificates in this file. + + The parameter ``ssl_version`` specifies which version of the SSL protocol to + use. Typically, the server chooses a particular protocol version, and the + client must adapt to the server's choice. Most of the versions are not + interoperable with the other versions. If not specified, for client-side + operation, the default SSL version is SSLv3; for server-side operation, + SSLv23. These version selections provide the most compatibility with other + versions. - Here's a table showing which versions in a client (down the side) - can connect to which versions in a server (along the top): + Here's a table showing which versions in a client (down the side) can connect + to which versions in a server (along the top): .. table:: @@ -116,51 +116,52 @@ *TLSv1* no no yes yes ======================== ========= ========= ========== ========= - In some older versions of OpenSSL (for instance, 0.9.7l on OS X 10.4), - an SSLv2 client could not connect to an SSLv23 server. + In some older versions of OpenSSL (for instance, 0.9.7l on OS X 10.4), an + SSLv2 client could not connect to an SSLv23 server. The parameter ``do_handshake_on_connect`` specifies whether to do the SSL handshake automatically after doing a :meth:`socket.connect`, or whether the - application program will call it explicitly, by invoking the :meth:`SSLSocket.do_handshake` - method. Calling :meth:`SSLSocket.do_handshake` explicitly gives the program control over - the blocking behavior of the socket I/O involved in the handshake. - - The parameter ``suppress_ragged_eofs`` specifies how the :meth:`SSLSocket.read` - method should signal unexpected EOF from the other end of the connection. If specified - as :const:`True` (the default), it returns a normal EOF in response to unexpected - EOF errors raised from the underlying socket; if :const:`False`, it will raise - the exceptions back to the caller. + application program will call it explicitly, by invoking the + :meth:`SSLSocket.do_handshake` method. Calling + :meth:`SSLSocket.do_handshake` explicitly gives the program control over the + blocking behavior of the socket I/O involved in the handshake. + + The parameter ``suppress_ragged_eofs`` specifies how the + :meth:`SSLSocket.read` method should signal unexpected EOF from the other end + of the connection. If specified as :const:`True` (the default), it returns a + normal EOF in response to unexpected EOF errors raised from the underlying + socket; if :const:`False`, it will raise the exceptions back to the caller. .. function:: RAND_status() - Returns True if the SSL pseudo-random number generator has been - seeded with 'enough' randomness, and False otherwise. You can use - :func:`ssl.RAND_egd` and :func:`ssl.RAND_add` to increase the randomness - of the pseudo-random number generator. + Returns True if the SSL pseudo-random number generator has been seeded with + 'enough' randomness, and False otherwise. You can use :func:`ssl.RAND_egd` + and :func:`ssl.RAND_add` to increase the randomness of the pseudo-random + number generator. .. function:: RAND_egd(path) If you are running an entropy-gathering daemon (EGD) somewhere, and ``path`` - is the pathname of a socket connection open to it, this will read - 256 bytes of randomness from the socket, and add it to the SSL pseudo-random number generator - to increase the security of generated secret keys. This is typically only - necessary on systems without better sources of randomness. + is the pathname of a socket connection open to it, this will read 256 bytes + of randomness from the socket, and add it to the SSL pseudo-random number + generator to increase the security of generated secret keys. This is + typically only necessary on systems without better sources of randomness. - See http://egd.sourceforge.net/ or http://prngd.sourceforge.net/ for - sources of entropy-gathering daemons. + See http://egd.sourceforge.net/ or http://prngd.sourceforge.net/ for sources + of entropy-gathering daemons. .. function:: RAND_add(bytes, entropy) - Mixes the given ``bytes`` into the SSL pseudo-random number generator. - The parameter ``entropy`` (a float) is a lower bound on the entropy - contained in string (so you can always use :const:`0.0`). - See :rfc:`1750` for more information on sources of entropy. + Mixes the given ``bytes`` into the SSL pseudo-random number generator. The + parameter ``entropy`` (a float) is a lower bound on the entropy contained in + string (so you can always use :const:`0.0`). See :rfc:`1750` for more + information on sources of entropy. .. function:: cert_time_to_seconds(timestring) - Returns a floating-point value containing a normal seconds-after-the-epoch time - value, given the time-string representing the "notBefore" or "notAfter" date - from a certificate. + Returns a floating-point value containing a normal seconds-after-the-epoch + time value, given the time-string representing the "notBefore" or "notAfter" + date from a certificate. Here's an example:: @@ -172,50 +173,47 @@ 'Wed May 9 00:00:00 2007' >>> -.. function:: get_server_certificate (addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None) +.. function:: get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None) - Given the address ``addr`` of an SSL-protected server, as a - (*hostname*, *port-number*) pair, fetches the server's certificate, - and returns it as a PEM-encoded string. If ``ssl_version`` is - specified, uses that version of the SSL protocol to attempt to - connect to the server. If ``ca_certs`` is specified, it should be - a file containing a list of root certificates, the same format as - used for the same parameter in :func:`wrap_socket`. The call will - attempt to validate the server certificate against that set of root + Given the address ``addr`` of an SSL-protected server, as a (*hostname*, + *port-number*) pair, fetches the server's certificate, and returns it as a + PEM-encoded string. If ``ssl_version`` is specified, uses that version of + the SSL protocol to attempt to connect to the server. If ``ca_certs`` is + specified, it should be a file containing a list of root certificates, the + same format as used for the same parameter in :func:`wrap_socket`. The call + will attempt to validate the server certificate against that set of root certificates, and will fail if the validation attempt fails. -.. function:: DER_cert_to_PEM_cert (DER_cert_bytes) +.. function:: DER_cert_to_PEM_cert(DER_cert_bytes) Given a certificate as a DER-encoded blob of bytes, returns a PEM-encoded string version of the same certificate. -.. function:: PEM_cert_to_DER_cert (PEM_cert_string) +.. function:: PEM_cert_to_DER_cert(PEM_cert_string) - Given a certificate as an ASCII PEM string, returns a DER-encoded - sequence of bytes for that same certificate. + Given a certificate as an ASCII PEM string, returns a DER-encoded sequence of + bytes for that same certificate. .. data:: CERT_NONE - Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` - when no certificates will be required or validated from the other - side of the socket connection. + Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` when no + certificates will be required or validated from the other side of the socket + connection. .. data:: CERT_OPTIONAL - Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` - when no certificates will be required from the other side of the - socket connection, but if they are provided, will be validated. - Note that use of this setting requires a valid certificate - validation file also be passed as a value of the ``ca_certs`` - parameter. + Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` when no + certificates will be required from the other side of the socket connection, + but if they are provided, will be validated. Note that use of this setting + requires a valid certificate validation file also be passed as a value of the + ``ca_certs`` parameter. .. data:: CERT_REQUIRED - Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` - when certificates will be required from the other side of the - socket connection. Note that use of this setting requires a valid certificate - validation file also be passed as a value of the ``ca_certs`` - parameter. + Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` when + certificates will be required from the other side of the socket connection. + Note that use of this setting requires a valid certificate validation file + also be passed as a value of the ``ca_certs`` parameter. .. data:: PROTOCOL_SSLv2 @@ -223,22 +221,21 @@ .. data:: PROTOCOL_SSLv23 - Selects SSL version 2 or 3 as the channel encryption protocol. - This is a setting to use with servers for maximum compatibility - with the other end of an SSL connection, but it may cause the - specific ciphers chosen for the encryption to be of fairly low - quality. + Selects SSL version 2 or 3 as the channel encryption protocol. This is a + setting to use with servers for maximum compatibility with the other end of + an SSL connection, but it may cause the specific ciphers chosen for the + encryption to be of fairly low quality. .. data:: PROTOCOL_SSLv3 - Selects SSL version 3 as the channel encryption protocol. - For clients, this is the maximally compatible SSL variant. + Selects SSL version 3 as the channel encryption protocol. For clients, this + is the maximally compatible SSL variant. .. data:: PROTOCOL_TLSv1 - Selects TLS version 1 as the channel encryption protocol. This is - the most modern version, and probably the best choice for maximum - protection, if both sides can speak it. + Selects TLS version 1 as the channel encryption protocol. This is the most + modern version, and probably the best choice for maximum protection, if both + sides can speak it. SSLSocket Objects @@ -247,25 +244,23 @@ .. method:: SSLSocket.read(nbytes=1024, buffer=None) Reads up to ``nbytes`` bytes from the SSL-encrypted channel and returns them. - If the ``buffer`` is specified, it will attempt to read into the buffer - the minimum of the size of the buffer and ``nbytes``, if that is specified. - If no buffer is specified, an immutable buffer is allocated and returned - with the data read from the socket. + If the ``buffer`` is specified, it will attempt to read into the buffer the + minimum of the size of the buffer and ``nbytes``, if that is specified. If + no buffer is specified, an immutable buffer is allocated and returned with + the data read from the socket. .. method:: SSLSocket.write(data) - Writes the ``data`` to the other side of the connection, using the - SSL channel to encrypt. Returns the number of bytes written. + Writes the ``data`` to the other side of the connection, using the SSL + channel to encrypt. Returns the number of bytes written. .. method:: SSLSocket.do_handshake() - Performs the SSL setup handshake. If the socket is non-blocking, - this method may raise :exc:`SSLError` with the value of the exception - instance's ``args[0]`` - being either :const:`SSL_ERROR_WANT_READ` or - :const:`SSL_ERROR_WANT_WRITE`, and should be called again until - it stops raising those exceptions. Here's an example of how to do - that:: + Performs the SSL setup handshake. If the socket is non-blocking, this method + may raise :exc:`SSLError` with the value of the exception instance's + ``args[0]`` being either :const:`SSL_ERROR_WANT_READ` or + :const:`SSL_ERROR_WANT_WRITE`, and should be called again until it stops + raising those exceptions. Here's an example of how to do that:: while True: try: @@ -281,34 +276,31 @@ .. method:: SSLSocket.unwrap() - Performs the SSL shutdown handshake, which removes the TLS layer - from the underlying socket, and returns the underlying socket - object. This can be used to go from encrypted operation over a - connection to unencrypted. The returned socket should always be - used for further communication with the other side of the - connection, rather than the original socket + Performs the SSL shutdown handshake, which removes the TLS layer from the + underlying socket, and returns the underlying socket object. This can be + used to go from encrypted operation over a connection to unencrypted. The + returned socket should always be used for further communication with the + other side of the connection, rather than the original socket .. method:: SSLSocket.getpeercert(binary_form=False) - If there is no certificate for the peer on the other end of the - connection, returns ``None``. + If there is no certificate for the peer on the other end of the connection, + returns ``None``. - If the parameter ``binary_form`` is :const:`False`, and a - certificate was received from the peer, this method returns a - :class:`dict` instance. If the certificate was not validated, the - dict is empty. If the certificate was validated, it returns a dict - with the keys ``subject`` (the principal for which the certificate - was issued), and ``notAfter`` (the time after which the certificate - should not be trusted). The certificate was already validated, so - the ``notBefore`` and ``issuer`` fields are not returned. If a - certificate contains an instance of the *Subject Alternative Name* - extension (see :rfc:`3280`), there will also be a - ``subjectAltName`` key in the dictionary. + If the parameter ``binary_form`` is :const:`False`, and a certificate was + received from the peer, this method returns a :class:`dict` instance. If the + certificate was not validated, the dict is empty. If the certificate was + validated, it returns a dict with the keys ``subject`` (the principal for + which the certificate was issued), and ``notAfter`` (the time after which the + certificate should not be trusted). The certificate was already validated, + so the ``notBefore`` and ``issuer`` fields are not returned. If a + certificate contains an instance of the *Subject Alternative Name* extension + (see :rfc:`3280`), there will also be a ``subjectAltName`` key in the + dictionary. The "subject" field is a tuple containing the sequence of relative - distinguished names (RDNs) given in the certificate's data - structure for the principal, and each RDN is a sequence of - name-value pairs:: + distinguished names (RDNs) given in the certificate's data structure for the + principal, and each RDN is a sequence of name-value pairs:: {'notAfter': 'Feb 16 16:54:50 2013 GMT', 'subject': ((('countryName', 'US'),), @@ -318,31 +310,28 @@ (('organizationalUnitName', 'SSL'),), (('commonName', 'somemachine.python.org'),))} - If the ``binary_form`` parameter is :const:`True`, and a - certificate was provided, this method returns the DER-encoded form - of the entire certificate as a sequence of bytes, or :const:`None` if the - peer did not provide a certificate. This return - value is independent of validation; if validation was required - (:const:`CERT_OPTIONAL` or :const:`CERT_REQUIRED`), it will have + If the ``binary_form`` parameter is :const:`True`, and a certificate was + provided, this method returns the DER-encoded form of the entire certificate + as a sequence of bytes, or :const:`None` if the peer did not provide a + certificate. This return value is independent of validation; if validation + was required (:const:`CERT_OPTIONAL` or :const:`CERT_REQUIRED`), it will have been validated, but if :const:`CERT_NONE` was used to establish the connection, the certificate, if present, will not have been validated. .. method:: SSLSocket.cipher() - Returns a three-value tuple containing the name of the cipher being - used, the version of the SSL protocol that defines its use, and the - number of secret bits being used. If no connection has been - established, returns ``None``. + Returns a three-value tuple containing the name of the cipher being used, the + version of the SSL protocol that defines its use, and the number of secret + bits being used. If no connection has been established, returns ``None``. .. method:: SSLSocket.unwrap() - Performs the SSL shutdown handshake, which removes the TLS layer - from the underlying socket, and returns the underlying socket - object. This can be used to go from encrypted operation over a - connection to unencrypted. The returned socket should always be - used for further communication with the other side of the - connection, rather than the original socket + Performs the SSL shutdown handshake, which removes the TLS layer from the + underlying socket, and returns the underlying socket object. This can be + used to go from encrypted operation over a connection to unencrypted. The + returned socket should always be used for further communication with the + other side of the connection, rather than the original socket. .. index:: single: certificates @@ -353,57 +342,54 @@ Certificates ------------ -Certificates in general are part of a public-key / private-key system. In this system, each *principal*, -(which may be a machine, or a person, or an organization) is assigned a unique two-part encryption key. -One part of the key is public, and is called the *public key*; the other part is kept secret, and is called -the *private key*. The two parts are related, in that if you encrypt a message with one of the parts, you can -decrypt it with the other part, and **only** with the other part. - -A certificate contains information about two principals. It contains -the name of a *subject*, and the subject's public key. It also -contains a statement by a second principal, the *issuer*, that the -subject is who he claims to be, and that this is indeed the subject's -public key. The issuer's statement is signed with the issuer's -private key, which only the issuer knows. However, anyone can verify -the issuer's statement by finding the issuer's public key, decrypting -the statement with it, and comparing it to the other information in -the certificate. The certificate also contains information about the -time period over which it is valid. This is expressed as two fields, -called "notBefore" and "notAfter". - -In the Python use of certificates, a client or server -can use a certificate to prove who they are. The other -side of a network connection can also be required to produce a certificate, -and that certificate can be validated to the satisfaction -of the client or server that requires such validation. -The connection attempt can be set to raise an exception if -the validation fails. Validation is done -automatically, by the underlying OpenSSL framework; the -application need not concern itself with its mechanics. -But the application does usually need to provide -sets of certificates to allow this process to take place. - -Python uses files to contain certificates. They should be formatted -as "PEM" (see :rfc:`1422`), which is a base-64 encoded form wrapped -with a header line and a footer line:: +Certificates in general are part of a public-key / private-key system. In this +system, each *principal*, (which may be a machine, or a person, or an +organization) is assigned a unique two-part encryption key. One part of the key +is public, and is called the *public key*; the other part is kept secret, and is +called the *private key*. The two parts are related, in that if you encrypt a +message with one of the parts, you can decrypt it with the other part, and +**only** with the other part. + +A certificate contains information about two principals. It contains the name +of a *subject*, and the subject's public key. It also contains a statement by a +second principal, the *issuer*, that the subject is who he claims to be, and +that this is indeed the subject's public key. The issuer's statement is signed +with the issuer's private key, which only the issuer knows. However, anyone can +verify the issuer's statement by finding the issuer's public key, decrypting the +statement with it, and comparing it to the other information in the certificate. +The certificate also contains information about the time period over which it is +valid. This is expressed as two fields, called "notBefore" and "notAfter". + +In the Python use of certificates, a client or server can use a certificate to +prove who they are. The other side of a network connection can also be required +to produce a certificate, and that certificate can be validated to the +satisfaction of the client or server that requires such validation. The +connection attempt can be set to raise an exception if the validation fails. +Validation is done automatically, by the underlying OpenSSL framework; the +application need not concern itself with its mechanics. But the application +does usually need to provide sets of certificates to allow this process to take +place. + +Python uses files to contain certificates. They should be formatted as "PEM" +(see :rfc:`1422`), which is a base-64 encoded form wrapped with a header line +and a footer line:: -----BEGIN CERTIFICATE----- ... (certificate in base64 PEM encoding) ... -----END CERTIFICATE----- -The Python files which contain certificates can contain a sequence -of certificates, sometimes called a *certificate chain*. This chain -should start with the specific certificate for the principal who "is" -the client or server, and then the certificate for the issuer of that -certificate, and then the certificate for the issuer of *that* certificate, -and so on up the chain till you get to a certificate which is *self-signed*, -that is, a certificate which has the same subject and issuer, -sometimes called a *root certificate*. The certificates should just -be concatenated together in the certificate file. For example, suppose -we had a three certificate chain, from our server certificate to the -certificate of the certification authority that signed our server certificate, -to the root certificate of the agency which issued the certification authority's -certificate:: +The Python files which contain certificates can contain a sequence of +certificates, sometimes called a *certificate chain*. This chain should start +with the specific certificate for the principal who "is" the client or server, +and then the certificate for the issuer of that certificate, and then the +certificate for the issuer of *that* certificate, and so on up the chain till +you get to a certificate which is *self-signed*, that is, a certificate which +has the same subject and issuer, sometimes called a *root certificate*. The +certificates should just be concatenated together in the certificate file. For +example, suppose we had a three certificate chain, from our server certificate +to the certificate of the certification authority that signed our server +certificate, to the root certificate of the agency which issued the +certification authority's certificate:: -----BEGIN CERTIFICATE----- ... (certificate for your server)... @@ -417,32 +403,29 @@ If you are going to require validation of the other side of the connection's certificate, you need to provide a "CA certs" file, filled with the certificate -chains for each issuer you are willing to trust. Again, this file just -contains these chains concatenated together. For validation, Python will -use the first chain it finds in the file which matches. -Some "standard" root certificates are available from various certification -authorities: -`CACert.org `_, -`Thawte `_, -`Verisign `_, -`Positive SSL `_ (used by python.org), -`Equifax and GeoTrust `_. - -In general, if you are using -SSL3 or TLS1, you don't need to put the full chain in your "CA certs" file; -you only need the root certificates, and the remote peer is supposed to -furnish the other certificates necessary to chain from its certificate to -a root certificate. -See :rfc:`4158` for more discussion of the way in which -certification chains can be built. - -If you are going to create a server that provides SSL-encrypted -connection services, you will need to acquire a certificate for that -service. There are many ways of acquiring appropriate certificates, -such as buying one from a certification authority. Another common -practice is to generate a self-signed certificate. The simplest -way to do this is with the OpenSSL package, using something like -the following:: +chains for each issuer you are willing to trust. Again, this file just contains +these chains concatenated together. For validation, Python will use the first +chain it finds in the file which matches. Some "standard" root certificates are +available from various certification authorities: `CACert.org +`_, `Thawte +`_, `Verisign +`_, `Positive SSL +`_ +(used by python.org), `Equifax and GeoTrust +`_. + +In general, if you are using SSL3 or TLS1, you don't need to put the full chain +in your "CA certs" file; you only need the root certificates, and the remote +peer is supposed to furnish the other certificates necessary to chain from its +certificate to a root certificate. See :rfc:`4158` for more discussion of the +way in which certification chains can be built. + +If you are going to create a server that provides SSL-encrypted connection +services, you will need to acquire a certificate for that service. There are +many ways of acquiring appropriate certificates, such as buying one from a +certification authority. Another common practice is to generate a self-signed +certificate. The simplest way to do this is with the OpenSSL package, using +something like the following:: % openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem Generating a 1024 bit RSA private key @@ -466,9 +449,9 @@ Email Address []:ops at myserver.mygroup.myorganization.com % -The disadvantage of a self-signed certificate is that it is its -own root certificate, and no one else will have it in their cache -of known (and trusted) root certificates. +The disadvantage of a self-signed certificate is that it is its own root +certificate, and no one else will have it in their cache of known (and trusted) +root certificates. Examples @@ -477,7 +460,8 @@ Testing for SSL support ^^^^^^^^^^^^^^^^^^^^^^^ -To test for the presence of SSL support in a Python installation, user code should use the following idiom:: +To test for the presence of SSL support in a Python installation, user code +should use the following idiom:: try: import ssl @@ -489,8 +473,8 @@ Client-side operation ^^^^^^^^^^^^^^^^^^^^^ -This example connects to an SSL server, prints the server's address and certificate, -sends some bytes, and reads part of the response:: +This example connects to an SSL server, prints the server's address and +certificate, sends some bytes, and reads part of the response:: import socket, ssl, pprint @@ -518,8 +502,8 @@ # note that closing the SSLSocket will also close the underlying socket ssl_sock.close() -As of September 6, 2007, the certificate printed by this program -looked like this:: +As of September 6, 2007, the certificate printed by this program looked like +this:: {'notAfter': 'May 8 23:59:59 2009 GMT', 'subject': ((('serialNumber', '2497886'),), @@ -542,9 +526,9 @@ Server-side operation ^^^^^^^^^^^^^^^^^^^^^ -For server operation, typically you'd need to have a server certificate, and private key, each in a file. -You'd open a socket, bind it to a port, call :meth:`listen` on it, then start waiting for clients -to connect:: +For server operation, typically you'd need to have a server certificate, and +private key, each in a file. You'd open a socket, bind it to a port, call +:meth:`listen` on it, then start waiting for clients to connect:: import socket, ssl @@ -552,8 +536,9 @@ bindsocket.bind(('myaddr.mydomain.com', 10023)) bindsocket.listen(5) -When one did, you'd call :meth:`accept` on the socket to get the new socket from the other -end, and use :func:`wrap_socket` to create a server-side SSL context for it:: +When one did, you'd call :meth:`accept` on the socket to get the new socket from +the other end, and use :func:`wrap_socket` to create a server-side SSL context +for it:: while True: newsocket, fromaddr = bindsocket.accept() @@ -564,7 +549,8 @@ ssl_version=ssl.PROTOCOL_TLSv1) deal_with_client(connstream) -Then you'd read data from the ``connstream`` and do something with it till you are finished with the client (or the client is finished with you):: +Then you'd read data from the ``connstream`` and do something with it till you +are finished with the client (or the client is finished with you):: def deal_with_client(connstream): Modified: python/branches/py3k/Doc/library/stat.rst ============================================================================== --- python/branches/py3k/Doc/library/stat.rst (original) +++ python/branches/py3k/Doc/library/stat.rst Wed Sep 16 17:58:14 2009 @@ -1,9 +1,9 @@ - :mod:`stat` --- Interpreting :func:`stat` results ================================================= .. module:: stat - :synopsis: Utilities for interpreting the results of os.stat(), os.lstat() and os.fstat(). + :synopsis: Utilities for interpreting the results of os.stat(), + os.lstat() and os.fstat(). .. sectionauthor:: Skip Montanaro Modified: python/branches/py3k/Doc/library/string.rst ============================================================================== --- python/branches/py3k/Doc/library/string.rst (original) +++ python/branches/py3k/Doc/library/string.rst Wed Sep 16 17:58:14 2009 @@ -479,19 +479,19 @@ The constructor takes a single argument which is the template string. - .. method:: substitute(mapping[, **kws]) + .. method:: substitute(mapping, **kwds) Performs the template substitution, returning a new string. *mapping* is any dictionary-like object with keys that match the placeholders in the template. Alternatively, you can provide keyword arguments, where the - keywords are the placeholders. When both *mapping* and *kws* are given - and there are duplicates, the placeholders from *kws* take precedence. + keywords are the placeholders. When both *mapping* and *kwds* are given + and there are duplicates, the placeholders from *kwds* take precedence. - .. method:: safe_substitute(mapping[, **kws]) + .. method:: safe_substitute(mapping, **kwds) Like :meth:`substitute`, except that if placeholders are missing from - *mapping* and *kws*, instead of raising a :exc:`KeyError` exception, the + *mapping* and *kwds*, instead of raising a :exc:`KeyError` exception, the original placeholder will appear in the resulting string intact. Also, unlike with :meth:`substitute`, any other appearances of the ``$`` will simply return ``$`` instead of raising :exc:`ValueError`. Modified: python/branches/py3k/Doc/library/stringprep.rst ============================================================================== --- python/branches/py3k/Doc/library/stringprep.rst (original) +++ python/branches/py3k/Doc/library/stringprep.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`stringprep` --- Internet String Preparation ================================================= Modified: python/branches/py3k/Doc/library/strings.rst ============================================================================== --- python/branches/py3k/Doc/library/strings.rst (original) +++ python/branches/py3k/Doc/library/strings.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - .. _stringservices: *************** Modified: python/branches/py3k/Doc/library/struct.rst ============================================================================== --- python/branches/py3k/Doc/library/struct.rst (original) +++ python/branches/py3k/Doc/library/struct.rst Wed Sep 16 17:58:14 2009 @@ -1,6 +1,5 @@ - :mod:`struct` --- Interpret bytes as packed binary data -========================================================= +======================================================= .. module:: struct :synopsis: Interpret bytes as packed binary data. @@ -46,7 +45,7 @@ (``len(bytes)`` must equal ``calcsize(fmt)``). -.. function:: unpack_from(fmt, buffer[,offset=0]) +.. function:: unpack_from(fmt, buffer, offset=0) Unpack the *buffer* according to the given format. The result is a tuple even if it contains exactly one item. The *buffer* must contain at least the amount @@ -286,7 +285,7 @@ (``len(bytes)`` must equal :attr:`self.size`). - .. method:: unpack_from(buffer[, offset=0]) + .. method:: unpack_from(buffer, offset=0) Identical to the :func:`unpack_from` function, using the compiled format. (``len(buffer[offset:])`` must be at least :attr:`self.size`). Modified: python/branches/py3k/Doc/library/subprocess.rst ============================================================================== --- python/branches/py3k/Doc/library/subprocess.rst (original) +++ python/branches/py3k/Doc/library/subprocess.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`subprocess` --- Subprocess management =========================================== @@ -121,9 +120,10 @@ .. note:: - This feature is only available if Python is built with universal newline support - (the default). Also, the newlines attribute of the file objects :attr:`stdout`, - :attr:`stdin` and :attr:`stderr` are not updated by the :meth:`communicate` method. + This feature is only available if Python is built with universal newline + support (the default). Also, the newlines attribute of the file objects + :attr:`stdout`, :attr:`stdin` and :attr:`stderr` are not updated by the + :meth:`communicate` method. The *startupinfo* and *creationflags*, if given, will be passed to the underlying CreateProcess() function. They can specify things such as appearance Modified: python/branches/py3k/Doc/library/sunau.rst ============================================================================== --- python/branches/py3k/Doc/library/sunau.rst (original) +++ python/branches/py3k/Doc/library/sunau.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`sunau` --- Read and write Sun AU files ============================================ Modified: python/branches/py3k/Doc/library/symbol.rst ============================================================================== --- python/branches/py3k/Doc/library/symbol.rst (original) +++ python/branches/py3k/Doc/library/symbol.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`symbol` --- Constants used with Python parse trees ======================================================== Modified: python/branches/py3k/Doc/library/sys.rst ============================================================================== --- python/branches/py3k/Doc/library/sys.rst (original) +++ python/branches/py3k/Doc/library/sys.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`sys` --- System-specific parameters and functions ======================================================= Modified: python/branches/py3k/Doc/library/syslog.rst ============================================================================== --- python/branches/py3k/Doc/library/syslog.rst (original) +++ python/branches/py3k/Doc/library/syslog.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`syslog` --- Unix syslog library routines ============================================== Modified: python/branches/py3k/Doc/library/tabnanny.rst ============================================================================== --- python/branches/py3k/Doc/library/tabnanny.rst (original) +++ python/branches/py3k/Doc/library/tabnanny.rst Wed Sep 16 17:58:14 2009 @@ -2,8 +2,8 @@ ====================================================== .. module:: tabnanny - :synopsis: Tool for detecting white space related problems in Python source files in a - directory tree. + :synopsis: Tool for detecting white space related problems in Python + source files in a directory tree. .. moduleauthor:: Tim Peters .. sectionauthor:: Peter Funk Modified: python/branches/py3k/Doc/library/tarfile.rst ============================================================================== --- python/branches/py3k/Doc/library/tarfile.rst (original) +++ python/branches/py3k/Doc/library/tarfile.rst Wed Sep 16 17:58:14 2009 @@ -1,5 +1,3 @@ -.. _tarfile-mod: - :mod:`tarfile` --- Read and write tar archive files =================================================== Modified: python/branches/py3k/Doc/library/telnetlib.rst ============================================================================== --- python/branches/py3k/Doc/library/telnetlib.rst (original) +++ python/branches/py3k/Doc/library/telnetlib.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`telnetlib` --- Telnet client ================================== @@ -23,7 +22,7 @@ Character), EL (Erase Line), GA (Go Ahead), SB (Subnegotiation Begin). -.. class:: Telnet([host[, port[, timeout]]]) +.. class:: Telnet(host=None, port=0[, timeout]) :class:`Telnet` represents a connection to a Telnet server. The instance is initially not connected by default; the :meth:`open` method must be used to @@ -60,7 +59,7 @@ :class:`Telnet` instances have the following methods: -.. method:: Telnet.read_until(expected[, timeout]) +.. method:: Telnet.read_until(expected, timeout=None) Read until a given byte string, *expected*, is encountered or until *timeout* seconds have passed. @@ -123,7 +122,7 @@ This method never blocks. -.. method:: Telnet.open(host[, port[, timeout]]) +.. method:: Telnet.open(host, port=0[, timeout]) Connect to a host. The optional second argument is the port number, which defaults to the standard Telnet port (23). The optional *timeout* parameter @@ -133,7 +132,7 @@ Do not try to reopen an already connected instance. -.. method:: Telnet.msg(msg[, *args]) +.. method:: Telnet.msg(msg, *args) Print a debug message when the debug level is ``>`` 0. If extra arguments are present, they are substituted in the message using the standard string @@ -178,7 +177,7 @@ Multithreaded version of :meth:`interact`. -.. method:: Telnet.expect(list[, timeout]) +.. method:: Telnet.expect(list, timeout=None) Read until one from a list of a regular expressions matches. Modified: python/branches/py3k/Doc/library/tempfile.rst ============================================================================== --- python/branches/py3k/Doc/library/tempfile.rst (original) +++ python/branches/py3k/Doc/library/tempfile.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`tempfile` --- Generate temporary files and directories ============================================================ @@ -29,7 +28,7 @@ The module defines the following user-callable functions: -.. function:: TemporaryFile([mode='w+b'[, bufsize=-1[, suffix=''[, prefix='tmp'[, dir=None]]]]]) +.. function:: TemporaryFile(mode='w+b', bufsize=-1, suffix='', prefix='tmp', dir=None) Return a file-like object that can be used as a temporary storage area. The file is created using :func:`mkstemp`. It will be destroyed as soon @@ -53,7 +52,7 @@ :keyword:`with` statement, just like a normal file. -.. function:: NamedTemporaryFile([mode='w+b'[, bufsize=-1[, suffix=''[, prefix='tmp'[, dir=None[, delete=True]]]]]]) +.. function:: NamedTemporaryFile(mode='w+b', bufsize=-1, suffix='', prefix='tmp', dir=None, delete=True) This function operates exactly as :func:`TemporaryFile` does, except that the file is guaranteed to have a visible name in the file system (on @@ -68,7 +67,7 @@ be used in a :keyword:`with` statement, just like a normal file. -.. function:: SpooledTemporaryFile([max_size=0, [mode='w+b'[, bufsize=-1[, suffix=''[, prefix='tmp'[, dir=None]]]]]]) +.. function:: SpooledTemporaryFile(max_size=0, mode='w+b', bufsize=-1, suffix='', prefix='tmp', dir=None) This function operates exactly as :func:`TemporaryFile` does, except that data is spooled in memory until the file size exceeds *max_size*, or @@ -85,7 +84,7 @@ used in a :keyword:`with` statement, just like a normal file. -.. function:: mkstemp([suffix=''[, prefix='tmp'[, dir=None[, text=False]]]]) +.. function:: mkstemp(suffix='', prefix='tmp', dir=None, text=False) Creates a temporary file in the most secure manner possible. There are no race conditions in the file's creation, assuming that the platform @@ -123,7 +122,7 @@ of that file, in that order. -.. function:: mkdtemp([suffix=''[, prefix='tmp'[, dir=None]]]) +.. function:: mkdtemp(suffix='', prefix='tmp', dir=None) Creates a temporary directory in the most secure manner possible. There are no race conditions in the directory's creation. The directory is @@ -138,7 +137,7 @@ :func:`mkdtemp` returns the absolute pathname of the new directory. -.. function:: mktemp([suffix=''[, prefix='tmp'[, dir=None]]]) +.. function:: mktemp(suffix='', prefix='tmp', dir=None) .. deprecated:: 2.3 Use :func:`mkstemp` instead. Modified: python/branches/py3k/Doc/library/termios.rst ============================================================================== --- python/branches/py3k/Doc/library/termios.rst (original) +++ python/branches/py3k/Doc/library/termios.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`termios` --- POSIX style tty control ========================================== @@ -80,11 +79,11 @@ Convenience functions for common terminal control operations. +.. _termios-example: + Example ------- -.. _termios-example: - Here's a function that prompts for a password with echoing turned off. Note the technique using a separate :func:`tcgetattr` call and a :keyword:`try` ... :keyword:`finally` statement to ensure that the old tty attributes are restored Modified: python/branches/py3k/Doc/library/test.rst ============================================================================== --- python/branches/py3k/Doc/library/test.rst (original) +++ python/branches/py3k/Doc/library/test.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`test` --- Regression tests package for Python =================================================== @@ -180,7 +179,7 @@ :mod:`test.support` --- Utility functions for tests -======================================================== +=================================================== .. module:: test.support :synopsis: Support for Python regression tests. @@ -247,7 +246,7 @@ tests. -.. function:: requires(resource[, msg]) +.. function:: requires(resource, msg=None) Raises :exc:`ResourceDenied` if *resource* is not available. *msg* is the argument to :exc:`ResourceDenied` if it is raised. Always returns true if called @@ -372,7 +371,7 @@ The :mod:`test.support` module defines the following classes: -.. class:: TransientResource(exc[, **kwargs]) +.. class:: TransientResource(exc, **kwargs) Instances are a context manager that raises :exc:`ResourceDenied` if the specified exception type is raised. Any keyword arguments are treated as Modified: python/branches/py3k/Doc/library/textwrap.rst ============================================================================== --- python/branches/py3k/Doc/library/textwrap.rst (original) +++ python/branches/py3k/Doc/library/textwrap.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`textwrap` --- Text wrapping and filling ============================================= @@ -15,16 +14,17 @@ otherwise, you should use an instance of :class:`TextWrapper` for efficiency. -.. function:: wrap(text[, width[, ...]]) +.. function:: wrap(text, width=70, **kwargs) - Wraps the single paragraph in *text* (a string) so every line is at most *width* - characters long. Returns a list of output lines, without final newlines. + Wraps the single paragraph in *text* (a string) so every line is at most + *width* characters long. Returns a list of output lines, without final + newlines. Optional keyword arguments correspond to the instance attributes of :class:`TextWrapper`, documented below. *width* defaults to ``70``. -.. function:: fill(text[, width[, ...]]) +.. function:: fill(text, width=70, **kwargs) Wraps the single paragraph in *text*, and returns a single string containing the wrapped paragraph. :func:`fill` is shorthand for :: @@ -70,11 +70,11 @@ print(repr(dedent(s))) # prints 'hello\n world\n' -.. class:: TextWrapper(...) +.. class:: TextWrapper(**kwargs) The :class:`TextWrapper` constructor accepts a number of optional keyword - arguments. Each argument corresponds to one instance attribute, so for example - :: + arguments. Each keyword argument corresponds to an instance attribute, so + for example :: wrapper = TextWrapper(initial_indent="* ") Modified: python/branches/py3k/Doc/library/threading.rst ============================================================================== --- python/branches/py3k/Doc/library/threading.rst (original) +++ python/branches/py3k/Doc/library/threading.rst Wed Sep 16 17:58:14 2009 @@ -89,7 +89,7 @@ thread must release it once for each time it has acquired it. -.. function:: Semaphore([value]) +.. function:: Semaphore(value=1) :noindex: A factory function that returns a new semaphore object. A semaphore manages a @@ -99,7 +99,7 @@ given, *value* defaults to 1. -.. function:: BoundedSemaphore([value]) +.. function:: BoundedSemaphore(value=1) A factory function that returns a new bounded semaphore object. A bounded semaphore checks to make sure its current value doesn't exceed its initial @@ -253,7 +253,7 @@ the *target* argument, if any, with sequential and keyword arguments taken from the *args* and *kwargs* arguments, respectively. - .. method:: join([timeout]) + .. method:: join(timeout=None) Wait until the thread terminates. This blocks the calling thread until the thread whose :meth:`join` method is called terminates -- either normally @@ -349,7 +349,7 @@ All methods are executed atomically. -.. method:: Lock.acquire([blocking=1]) +.. method:: Lock.acquire(blocking=True) Acquire a lock, blocking or non-blocking. @@ -396,7 +396,7 @@ :meth:`acquire` to proceed. -.. method:: RLock.acquire([blocking=1]) +.. method:: RLock.acquire(blocking=True) Acquire a lock, blocking or non-blocking. @@ -487,7 +487,7 @@ needs to wake up one consumer thread. -.. class:: Condition([lock]) +.. class:: Condition(lock=None) 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, @@ -503,7 +503,7 @@ Release the underlying lock. This method calls the corresponding method on the underlying lock; there is no return value. - .. method:: wait([timeout]) + .. method:: wait(timeout=None) 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 @@ -566,13 +566,13 @@ waiting until some other thread calls :meth:`release`. -.. class:: Semaphore([value]) +.. class:: Semaphore(value=1) The optional argument gives the initial *value* for the internal counter; it defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raised. - .. method:: acquire([blocking]) + .. method:: acquire(blocking=True) Acquire a semaphore. @@ -659,7 +659,7 @@ :meth:`wait` will block until :meth:`.set` is called to set the internal flag to true again. - .. method:: wait([timeout]) + .. method:: wait(timeout=None) Block until the internal flag is true. If the internal flag is true on entry, return immediately. Otherwise, block until another thread calls Modified: python/branches/py3k/Doc/library/time.rst ============================================================================== --- python/branches/py3k/Doc/library/time.rst (original) +++ python/branches/py3k/Doc/library/time.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`time` --- Time access and conversions =========================================== Modified: python/branches/py3k/Doc/library/timeit.rst ============================================================================== --- python/branches/py3k/Doc/library/timeit.rst (original) +++ python/branches/py3k/Doc/library/timeit.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`timeit` --- Measure execution time of small code snippets =============================================================== @@ -18,7 +17,7 @@ The module defines the following public class: -.. class:: Timer([stmt='pass' [, setup='pass' [, timer=]]]) +.. class:: Timer(stmt='pass', setup='pass', timer=) Class for timing execution speed of small code snippets. @@ -38,7 +37,7 @@ little larger in this case because of the extra function calls. -.. method:: Timer.print_exc([file=None]) +.. method:: Timer.print_exc(file=None) Helper to print a traceback from the timed code. @@ -55,7 +54,7 @@ traceback is sent; it defaults to ``sys.stderr``. -.. method:: Timer.repeat([repeat=3 [, number=1000000]]) +.. method:: Timer.repeat(repeat=3, number=1000000) Call :meth:`timeit` a few times. @@ -76,7 +75,7 @@ and apply common sense rather than statistics. -.. method:: Timer.timeit([number=1000000]) +.. method:: Timer.timeit(number=1000000) Time *number* executions of the main statement. This executes the setup statement once, and then returns the time it takes to execute the main statement @@ -98,14 +97,14 @@ The module also defines two convenience functions: -.. function:: repeat(stmt[, setup[, timer[, repeat=3 [, number=1000000]]]]) +.. function:: repeat(stmt='pass', setup='pass', timer=, repeat=3, number=1000000) Create a :class:`Timer` instance with the given statement, setup code and timer function and run its :meth:`repeat` method with the given repeat count and *number* executions. -.. function:: timeit(stmt[, setup[, timer[, number=1000000]]]) +.. function:: timeit(stmt='pass', setup='pass', timer=, number=1000000) Create a :class:`Timer` instance with the given statement, setup code and timer function and run its :meth:`timeit` method with *number* executions. Modified: python/branches/py3k/Doc/library/tkinter.tix.rst ============================================================================== --- python/branches/py3k/Doc/library/tkinter.tix.rst (original) +++ python/branches/py3k/Doc/library/tkinter.tix.rst Wed Sep 16 17:58:14 2009 @@ -45,7 +45,7 @@ --------- -.. class:: Tix(screenName[, baseName[, className]]) +.. class:: Tk(screenName=None, baseName=None, className='Tix') Toplevel widget of Tix which represents mostly the main window of an application. It has an associated Tcl interpreter. Modified: python/branches/py3k/Doc/library/tkinter.ttk.rst ============================================================================== --- python/branches/py3k/Doc/library/tkinter.ttk.rst (original) +++ python/branches/py3k/Doc/library/tkinter.ttk.rst Wed Sep 16 17:58:14 2009 @@ -262,7 +262,7 @@ *x* and *y* are pixel coordinates relative to the widget. - .. method:: instate(statespec[, callback=None[, *args[, **kw]]]) + .. method:: instate(statespec, callback=None, *args, **kw) Test the widget's state. If a callback is not specified, returns True if the widget state matches *statespec* and False otherwise. If callback @@ -270,7 +270,7 @@ *statespec*. - .. method:: state([statespec=None]) + .. method:: state(statespec=None) Modify or inquire widget state. If *statespec* is specified, sets the widget state according to it and return a new *statespec* indicating @@ -349,7 +349,7 @@ .. class:: Combobox - .. method:: current([newindex=None]) + .. method:: current(newindex=None) If *newindex* is specified, sets the combobox value to the element position *newindex*. Otherwise, returns the index of the current value or @@ -510,7 +510,7 @@ See `Tab Options`_ for the list of available options. - .. method:: select([tab_id]) + .. method:: select(tab_id=None) Selects the specified *tab_id*. @@ -519,7 +519,7 @@ omitted, returns the widget name of the currently selected pane. - .. method:: tab(tab_id[, option=None[, **kw]]) + .. method:: tab(tab_id, option=None, **kw) Query or modify the options of the specific *tab_id*. @@ -600,14 +600,14 @@ .. class:: Progressbar - .. method:: start([interval]) + .. method:: start(interval=None) Begin autoincrement mode: schedules a recurring timer event that calls :meth:`Progressbar.step` every *interval* milliseconds. If omitted, *interval* defaults to 50 milliseconds. - .. method:: step([amount]) + .. method:: step(amount=None) Increments the progress bar's value by *amount*. @@ -842,7 +842,7 @@ .. class:: Treeview - .. method:: bbox(item[, column=None]) + .. method:: bbox(item, column=None) Returns the bounding box (relative to the treeview widget's window) of the specified *item* in the form (x, y, width, height). @@ -852,7 +852,7 @@ scrolled offscreen), returns an empty string. - .. method:: get_children([item]) + .. method:: get_children(item=None) Returns the list of children belonging to *item*. @@ -869,7 +869,7 @@ *item*'s children. - .. method:: column(column[, option=None[, **kw]]) + .. method:: column(column, option=None, **kw) Query or modify the options for the specified *column*. @@ -918,13 +918,13 @@ Returns True if the specified *item* is present in the tree. - .. method:: focus([item=None]) + .. method:: focus(item=None) If *item* is specified, sets the focus item to *item*. Otherwise, returns the current focus item, or '' if there is none. - .. method:: heading(column[, option=None[, **kw]]) + .. method:: heading(column, option=None, **kw) Query or modify the heading options for the specified *column*. @@ -997,7 +997,7 @@ Returns the integer index of *item* within its parent's list of children. - .. method:: insert(parent, index[, iid=None[, **kw]]) + .. method:: insert(parent, index, iid=None, **kw) Creates a new item and returns the item identifier of the newly created item. @@ -1014,7 +1014,7 @@ See `Item Options`_ for the list of available points. - .. method:: item(item[, option[, **kw]]) + .. method:: item(item, option=None, **kw) Query or modify the options for the specified *item*. @@ -1066,7 +1066,7 @@ the tree. - .. method:: selection([selop=None[, items=None]]) + .. method:: selection(selop=None, items=None) If *selop* is not specified, returns selected items. Otherwise, it will act according to the following selection methods. @@ -1092,7 +1092,7 @@ Toggle the selection state of each item in *items*. - .. method:: set(item[, column=None[, value=None]]) + .. method:: set(item, column=None, value=None) With one argument, returns a dictionary of column/value pairs for the specified *item*. With two arguments, returns the current value of the @@ -1100,14 +1100,14 @@ *column* in given *item* to the specified *value*. - .. method:: tag_bind(tagname[, sequence=None[, callback=None]]) + .. method:: tag_bind(tagname, sequence=None, callback=None) Bind a callback for the given event *sequence* to the tag *tagname*. When an event is delivered to an item, the callbacks for each of the item's tags option are called. - .. method:: tag_configure(tagname[, option=None[, **kw]]) + .. method:: tag_configure(tagname, option=None, **kw) Query or modify the options for the specified *tagname*. @@ -1117,7 +1117,7 @@ corresponding values for the given *tagname*. - .. method:: tag_has(tagname[, item]) + .. method:: tag_has(tagname, item=None) If *item* is specified, returns 1 or 0 depending on whether the specified *item* has the given *tagname*. Otherwise, returns a list of all items @@ -1216,7 +1216,7 @@ blue foreground when the widget were in active or pressed states. - .. method:: lookup(style, option[, state=None[, default=None]]) + .. method:: lookup(style, option, state=None, default=None) Returns the value specified for *option* in *style*. @@ -1231,7 +1231,7 @@ print(ttk.Style().lookup("TButton", "font")) - .. method:: layout(style[, layoutspec=None]) + .. method:: layout(style, layoutspec=None) Define the widget layout for given *style*. If *layoutspec* is omitted, return the layout specification for given style. @@ -1314,7 +1314,7 @@ Returns the list of *elementname*'s options. - .. method:: theme_create(themename[, parent=None[, settings=None]]) + .. method:: theme_create(themename, parent=None, settings=None) Create a new theme. @@ -1366,7 +1366,7 @@ Returns a list of all known themes. - .. method:: theme_use([themename]) + .. method:: theme_use(themename=None) If *themename* is not given, returns the theme in use. Otherwise, sets the current theme to *themename*, refreshes all widgets and emits a Modified: python/branches/py3k/Doc/library/token.rst ============================================================================== --- python/branches/py3k/Doc/library/token.rst (original) +++ python/branches/py3k/Doc/library/token.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`token` --- Constants used with Python parse trees ======================================================= Modified: python/branches/py3k/Doc/library/trace.rst ============================================================================== --- python/branches/py3k/Doc/library/trace.rst (original) +++ python/branches/py3k/Doc/library/trace.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`trace` --- Trace or track Python statement execution ========================================================== @@ -80,7 +79,7 @@ --------------------- -.. class:: Trace([count=1[, trace=1[, countfuncs=0[, countcallers=0[, ignoremods=()[, ignoredirs=()[, infile=None[, outfile=None[, timing=False]]]]]]]]]) +.. class:: Trace(count=1, trace=1, countfuncs=0, countcallers=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None, timing=False) Create an object to trace execution of a single statement or expression. All parameters are optional. *count* enables counting of line numbers. *trace* @@ -98,7 +97,7 @@ Run *cmd* under control of the Trace object with the current tracing parameters. -.. method:: Trace.runctx(cmd[, globals=None[, locals=None]]) +.. method:: Trace.runctx(cmd, globals=None, locals=None) Run *cmd* under control of the Trace object with the current tracing parameters in the defined global and local environments. If not defined, *globals* and Modified: python/branches/py3k/Doc/library/traceback.rst ============================================================================== --- python/branches/py3k/Doc/library/traceback.rst (original) +++ python/branches/py3k/Doc/library/traceback.rst Wed Sep 16 17:58:14 2009 @@ -20,7 +20,7 @@ The module defines the following functions: -.. function:: print_tb(traceback[, limit[, file]]) +.. function:: print_tb(traceback, limit=None, file=None) Print up to *limit* stack trace entries from *traceback*. If *limit* is omitted or ``None``, all entries are printed. If *file* is omitted or ``None``, the @@ -28,7 +28,7 @@ object to receive the output. -.. function:: print_exception(type, value, traceback[, limit[, file[, chain]]]) +.. function:: print_exception(type, value, traceback, limit=None, file=None, chain=True) Print exception information and up to *limit* stack trace entries from *traceback* to *file*. This differs from :func:`print_tb` in the following @@ -47,19 +47,19 @@ exception. -.. function:: print_exc([limit[, file[, chain]]]) +.. function:: print_exc(limit=None, file=None, chain=True) This is a shorthand for ``print_exception(*sys.exc_info())``. -.. function:: print_last([limit[, file[, chain]]]) +.. function:: print_last(limit=None, file=None, chain=True) This is a shorthand for ``print_exception(sys.last_type, sys.last_value, sys.last_traceback, limit, file)``. In general it will work only after an exception has reached an interactive prompt (see :data:`sys.last_type`). -.. function:: print_stack([f[, limit[, file]]]) +.. function:: print_stack(f=None, limit=None, file=None) This function prints a stack trace from its invocation point. The optional *f* argument can be used to specify an alternate stack frame to start. The optional @@ -67,7 +67,7 @@ :func:`print_exception`. -.. function:: extract_tb(traceback[, limit]) +.. function:: extract_tb(traceback, limit=None) Return a list of up to *limit* "pre-processed" stack trace entries extracted from the traceback object *traceback*. It is useful for alternate formatting of @@ -78,7 +78,7 @@ stripped; if the source is not available it is ``None``. -.. function:: extract_stack([f[, limit]]) +.. function:: extract_stack(f=None, limit=None) Extract the raw traceback from the current stack frame. The return value has the same format as for :func:`extract_tb`. The optional *f* and *limit* @@ -105,7 +105,7 @@ occurred is the always last string in the list. -.. function:: format_exception(type, value, tb[, limit[, chain]]) +.. function:: format_exception(type, value, tb, limit=None, chain=True) Format a stack trace and the exception information. The arguments have the same meaning as the corresponding arguments to :func:`print_exception`. The @@ -114,18 +114,18 @@ same text is printed as does :func:`print_exception`. -.. function:: format_exc([limit[, chain]]) +.. function:: format_exc(limit=None, chain=True) This is like ``print_exc(limit)`` but returns a string instead of printing to a file. -.. function:: format_tb(tb[, limit]) +.. function:: format_tb(tb, limit=None) A shorthand for ``format_list(extract_tb(tb, limit))``. -.. function:: format_stack([f[, limit]]) +.. function:: format_stack(f=None, limit=None) A shorthand for ``format_list(extract_stack(f, limit))``. Modified: python/branches/py3k/Doc/library/tty.rst ============================================================================== --- python/branches/py3k/Doc/library/tty.rst (original) +++ python/branches/py3k/Doc/library/tty.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`tty` --- Terminal control functions ========================================= @@ -17,14 +16,14 @@ The :mod:`tty` module defines the following functions: -.. function:: setraw(fd[, when]) +.. function:: setraw(fd, when=termios.TCSAFLUSH) Change the mode of the file descriptor *fd* to raw. If *when* is omitted, it defaults to :const:`termios.TCSAFLUSH`, and is passed to :func:`termios.tcsetattr`. -.. function:: setcbreak(fd[, when]) +.. function:: setcbreak(fd, when=termios.TCSAFLUSH) Change the mode of file descriptor *fd* to cbreak. If *when* is omitted, it defaults to :const:`termios.TCSAFLUSH`, and is passed to Modified: python/branches/py3k/Doc/library/undoc.rst ============================================================================== --- python/branches/py3k/Doc/library/undoc.rst (original) +++ python/branches/py3k/Doc/library/undoc.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - .. _undoc: ******************** Modified: python/branches/py3k/Doc/library/unicodedata.rst ============================================================================== --- python/branches/py3k/Doc/library/unicodedata.rst (original) +++ python/branches/py3k/Doc/library/unicodedata.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`unicodedata` --- Unicode Database ======================================= Modified: python/branches/py3k/Doc/library/unittest.rst ============================================================================== --- python/branches/py3k/Doc/library/unittest.rst (original) +++ python/branches/py3k/Doc/library/unittest.rst Wed Sep 16 17:58:14 2009 @@ -591,7 +591,7 @@ Test cases ~~~~~~~~~~ -.. class:: TestCase([methodName]) +.. class:: TestCase(methodName='runTest') Instances of the :class:`TestCase` class represent the smallest testable units in the :mod:`unittest` universe. This class is intended to be used as a base @@ -642,7 +642,7 @@ the outcome of the test method. The default implementation does nothing. - .. method:: run([result]) + .. method:: run(result=None) Run the test, collecting the result into the test result object passed as *result*. If *result* is omitted or :const:`None`, a temporary result @@ -669,9 +669,9 @@ failures. - .. method:: assertTrue(expr[, msg]) - assert_(expr[, msg]) - failUnless(expr[, msg]) + .. method:: assertTrue(expr, msg=None) + assert_(expr, msg=None) + failUnless(expr, msg=None) Signal a test failure if *expr* is false; the explanation for the failure will be *msg* if given, otherwise it will be :const:`None`. @@ -680,8 +680,8 @@ :meth:`failUnless`. - .. method:: assertEqual(first, second[, msg]) - failUnlessEqual(first, second[, msg]) + .. method:: assertEqual(first, second, msg=None) + failUnlessEqual(first, second, msg=None) Test that *first* and *second* are equal. If the values do not compare equal, the test will fail with the explanation given by *msg*, or @@ -702,8 +702,8 @@ :meth:`failUnlessEqual`. - .. method:: assertNotEqual(first, second[, msg]) - failIfEqual(first, second[, msg]) + .. method:: assertNotEqual(first, second, msg=None) + failIfEqual(first, second, msg=None) Test that *first* and *second* are not equal. If the values do compare equal, the test will fail with the explanation given by *msg*, or @@ -716,8 +716,8 @@ :meth:`failIfEqual`. - .. method:: assertAlmostEqual(first, second[, places[, msg]]) - failUnlessAlmostEqual(first, second[, places[, msg]]) + .. method:: assertAlmostEqual(first, second, *, places=7, msg=None) + failUnlessAlmostEqual(first, second, *, places=7, msg=None) Test that *first* and *second* are approximately equal by computing the difference, rounding to the given number of decimal *places* (default 7), @@ -732,8 +732,8 @@ :meth:`failUnlessAlmostEqual`. - .. method:: assertNotAlmostEqual(first, second[, places[, msg]]) - failIfAlmostEqual(first, second[, places[, msg]]) + .. method:: assertNotAlmostEqual(first, second, *, places=7, msg=None) + failIfAlmostEqual(first, second, *, places=7, msg=None) Test that *first* and *second* are not approximately equal by computing the difference, rounding to the given number of decimal *places* (default @@ -774,7 +774,7 @@ .. versionadded:: 3.1 - .. method:: assertRegexpMatches(text, regexp[, msg=None]): + .. method:: assertRegexpMatches(text, regexp, msg=None): Verifies that a *regexp* search matches *text*. Fails with an error message including the pattern and the *text*. *regexp* may be @@ -867,8 +867,10 @@ .. versionadded:: 3.1 - .. method:: assertRaises(exception[, callable, ...]) - failUnlessRaises(exception[, callable, ...]) + .. method:: assertRaises(exception, callable, *args, **kwds) + failUnlessRaises(exception, callable, *args, **kwds) + assertRaises(exception) + failUnlessRaises(exception) Test that an exception is raised when *callable* is called with any positional or keyword arguments that are also passed to @@ -877,8 +879,8 @@ To catch any of a group of exceptions, a tuple containing the exception classes may be passed as *exception*. - If *callable* is omitted or None, returns a context manager so that the - code under test can be written inline rather than as a function:: + If only the *exception* argument is given, returns a context manager so + that the code under test can be written inline rather than as a function:: with self.failUnlessRaises(some_error_class): do_something() @@ -908,14 +910,14 @@ .. versionadded:: 3.1 - .. method:: assertIsNone(expr[, msg]) + .. method:: assertIsNone(expr, msg=None) This signals a test failure if *expr* is not None. .. versionadded:: 3.1 - .. method:: assertIsNotNone(expr[, msg]) + .. method:: assertIsNotNone(expr, msg=None) The inverse of the :meth:`assertIsNone` method. This signals a test failure if *expr* is None. @@ -923,7 +925,7 @@ .. versionadded:: 3.1 - .. method:: assertIs(expr1, expr2[, msg]) + .. method:: assertIs(expr1, expr2, msg=None) This signals a test failure if *expr1* and *expr2* don't evaluate to the same object. @@ -931,7 +933,7 @@ .. versionadded:: 3.1 - .. method:: assertIsNot(expr1, expr2[, msg]) + .. method:: assertIsNot(expr1, expr2, msg=None) The inverse of the :meth:`assertIs` method. This signals a test failure if *expr1* and *expr2* evaluate to the same @@ -940,8 +942,8 @@ .. versionadded:: 3.1 - .. method:: assertFalse(expr[, msg]) - failIf(expr[, msg]) + .. method:: assertFalse(expr, msg=None) + failIf(expr, msg=None) The inverse of the :meth:`assertTrue` method is the :meth:`assertFalse` method. This signals a test failure if *expr* is true, with *msg* or :const:`None` @@ -951,7 +953,7 @@ :meth:`failIf`. - .. method:: fail([msg]) + .. method:: fail(msg=None) Signals a test failure unconditionally, with *msg* or :const:`None` for the error message. @@ -1042,7 +1044,7 @@ .. versionadded:: 3.1 - .. method:: addCleanup(function[, *args[, **kwargs]]) + .. method:: addCleanup(function, *args, **kwargs) Add a function to be called after :meth:`tearDown` to cleanup resources used during the test. Functions will be called in reverse order to the @@ -1072,7 +1074,7 @@ .. versionadded:: 2.7 -.. class:: FunctionTestCase(testFunc[, setUp[, tearDown[, description]]]) +.. class:: FunctionTestCase(testFunc, setUp=None, tearDown=None, description=None) This class implements the portion of the :class:`TestCase` interface which allows the test runner to drive the test, but does not provide the methods @@ -1086,7 +1088,7 @@ Grouping tests ~~~~~~~~~~~~~~ -.. class:: TestSuite([tests]) +.. class:: TestSuite(tests=()) This class represents an aggregation of individual tests cases and test suites. The class presents the interface needed by the test runner to allow it to be run @@ -1200,7 +1202,7 @@ Support for ``load_tests`` added. - .. method:: loadTestsFromName(name[, module]) + .. method:: loadTestsFromName(name, module=None) Return a suite of all tests cases given a string specifier. @@ -1225,7 +1227,7 @@ The method optionally resolves *name* relative to the given *module*. - .. method:: loadTestsFromNames(names[, module]) + .. method:: loadTestsFromNames(names, module=None) Similar to :meth:`loadTestsFromName`, but takes a sequence of names rather than a single name. The return value is a test suite which supports all @@ -1467,7 +1469,7 @@ instead of repeatedly creating new instances. -.. class:: TextTestRunner([stream[, descriptions[, verbosity]]]) +.. class:: TextTestRunner(stream=sys.stderr, descriptions=True, verbosity=1) A basic test runner implementation which prints results on standard error. It has a few configurable parameters, but is essentially very simple. Graphical @@ -1480,7 +1482,7 @@ subclasses to provide a custom ``TestResult``. -.. function:: main([module[, defaultTest[, argv[, testRunner[, testLoader[, exit, [verbosity]]]]]]]) +.. function:: main(module='__main__', defaultTest=None, argv=None, testRunner=None, testLoader=unittest.loader.defaultTestLoader, exit=True, verbosity=1) A command-line program that runs a set of tests; this is primarily for making test modules conveniently executable. The simplest use for this function is to Modified: python/branches/py3k/Doc/library/unix.rst ============================================================================== --- python/branches/py3k/Doc/library/unix.rst (original) +++ python/branches/py3k/Doc/library/unix.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - .. _unix: ********************** Modified: python/branches/py3k/Doc/library/urllib.error.rst ============================================================================== --- python/branches/py3k/Doc/library/urllib.error.rst (original) +++ python/branches/py3k/Doc/library/urllib.error.rst Wed Sep 16 17:58:14 2009 @@ -39,7 +39,7 @@ to a value found in the dictionary of codes as found in :attr:`http.server.BaseHTTPRequestHandler.responses`. -.. exception:: ContentTooShortError(msg[, content]) +.. exception:: ContentTooShortError(msg, content) This exception is raised when the :func:`urlretrieve` function detects that the amount of the downloaded data is less than the expected amount (given by 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 Sep 16 17:58:14 2009 @@ -26,7 +26,7 @@ The :mod:`urllib.parse` module defines the following functions: -.. function:: urlparse(urlstring[, default_scheme[, allow_fragments]]) +.. function:: urlparse(urlstring, default_scheme='', allow_fragments=True) Parse a URL into six components, returning a 6-tuple. This corresponds to the general structure of a URL: ``scheme://netloc/path;parameters?query#fragment``. @@ -89,7 +89,7 @@ object. -.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing]]) +.. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False) Parse a query string given as a string argument (data of type :mimetype:`application/x-www-form-urlencoded`). Data are returned as a @@ -110,7 +110,7 @@ dictionaries into query strings. -.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing]]) +.. function:: parse_qsl(qs, keep_blank_values=False, strict_parsing=False) Parse a query string given as a string argument (data of type :mimetype:`application/x-www-form-urlencoded`). Data are returned as a list of @@ -139,7 +139,7 @@ states that these are equivalent). -.. function:: urlsplit(urlstring[, default_scheme[, allow_fragments]]) +.. function:: urlsplit(urlstring, default_scheme='', allow_fragments=True) This is similar to :func:`urlparse`, but does not split the params from the URL. This should generally be used instead of :func:`urlparse` if the more recent URL @@ -187,7 +187,7 @@ with an empty query; the RFC states that these are equivalent). -.. function:: urljoin(base, url[, allow_fragments]) +.. function:: urljoin(base, url, allow_fragments=True) Construct a full ("absolute") URL by combining a "base URL" (*base*) with another URL (*url*). Informally, this uses components of the base URL, in @@ -223,7 +223,8 @@ string. If there is no fragment identifier in *url*, return *url* unmodified and an empty string. -.. function:: quote(string[, safe[, encoding[, errors]]]) + +.. function:: quote(string, safe='/', encoding=None, errors=None) Replace special characters in *string* using the ``%xx`` escape. Letters, digits, and the characters ``'_.-'`` are never quoted. By default, this @@ -247,7 +248,7 @@ Example: ``quote('/El Ni?o/')`` yields ``'/El%20Ni%C3%B1o/'``. -.. function:: quote_plus(string[, safe[, encoding[, errors]]]) +.. function:: quote_plus(string, safe='', encoding=None, errors=None) Like :func:`quote`, but also replace spaces by plus signs, as required for quoting HTML form values when building up a query string to go into a URL. @@ -256,7 +257,8 @@ Example: ``quote_plus('/El Ni?o/')`` yields ``'%2FEl+Ni%C3%B1o%2F'``. -.. function:: quote_from_bytes(bytes[, safe]) + +.. function:: quote_from_bytes(bytes, safe='/') Like :func:`quote`, but accepts a :class:`bytes` object rather than a :class:`str`, and does not perform string-to-bytes encoding. @@ -264,7 +266,8 @@ Example: ``quote_from_bytes(b'a&\xef')`` yields ``'a%26%EF'``. -.. function:: unquote(string[, encoding[, errors]]) + +.. function:: unquote(string, encoding='utf-8', errors='replace') Replace ``%xx`` escapes by their single-character equivalent. The optional *encoding* and *errors* parameters specify how to decode @@ -280,7 +283,7 @@ Example: ``unquote('/El%20Ni%C3%B1o/')`` yields ``'/El Ni?o/'``. -.. function:: unquote_plus(string[, encoding[, errors]]) +.. function:: unquote_plus(string, encoding='utf-8', errors='replace') Like :func:`unquote`, but also replace plus signs by spaces, as required for unquoting HTML form values. @@ -289,6 +292,7 @@ Example: ``unquote_plus('/El+Ni%C3%B1o/')`` yields ``'/El Ni?o/'``. + .. function:: unquote_to_bytes(string) Replace ``%xx`` escapes by their single-octet equivalent, and return a @@ -303,7 +307,7 @@ ``b'a&\xef'``. -.. function:: urlencode(query[, doseq]) +.. function:: urlencode(query, doseq=False) Convert a mapping object or a sequence of two-element tuples to a "url-encoded" string, suitable to pass to :func:`urlopen` above as the optional *data* Modified: python/branches/py3k/Doc/library/urllib.request.rst ============================================================================== --- python/branches/py3k/Doc/library/urllib.request.rst (original) +++ python/branches/py3k/Doc/library/urllib.request.rst Wed Sep 16 17:58:14 2009 @@ -14,7 +14,7 @@ The :mod:`urllib.request` module defines the following functions: -.. function:: urlopen(url[, data][, timeout]) +.. function:: urlopen(url, data=None[, timeout]) Open the URL *url*, which can be either a string or a :class:`Request` object. @@ -75,13 +75,14 @@ :class:`HTTPRedirectHandler`, :class:`FTPHandler`, :class:`FileHandler`, :class:`HTTPErrorProcessor`. - If the Python installation has SSL support (i.e., if the :mod:`ssl` module can be imported), - :class:`HTTPSHandler` will also be added. + If the Python installation has SSL support (i.e., if the :mod:`ssl` module + can be imported), :class:`HTTPSHandler` will also be added. A :class:`BaseHandler` subclass may also change its :attr:`handler_order` member variable to modify its position in the handlers list. -.. function:: urlretrieve(url[, filename[, reporthook[, data]]]) + +.. function:: urlretrieve(url, filename=None, reporthook=None, data=None) Copy a network object denoted by a URL to a local file, if necessary. If the URL points to a local file, or a valid cached copy of the object exists, the object @@ -160,9 +161,10 @@ path. This does not accept a complete URL. This function uses :func:`unquote` to decode *path*. + The following classes are provided: -.. class:: Request(url[, data][, headers][, origin_req_host][, unverifiable]) +.. class:: Request(url, data=None, headers={}, origin_req_host=None, unverifiable=False) This class is an abstraction of a URL request. @@ -205,7 +207,8 @@ document, and the user had no option to approve the automatic fetching of the image, this should be true. -.. class:: URLopener([proxies[, **x509]]) + +.. class:: URLopener(proxies=None, **x509) Base class for opening and reading URLs. Unless you need to support opening objects using schemes other than :file:`http:`, :file:`ftp:`, or :file:`file:`, @@ -230,7 +233,7 @@ :class:`URLopener` objects will raise an :exc:`IOError` exception if the server returns an error code. - .. method:: open(fullurl[, data]) + .. method:: open(fullurl, data=None) Open *fullurl* using the appropriate protocol. This method sets up cache and proxy information, then calls the appropriate open method with its input @@ -239,12 +242,12 @@ :func:`urlopen`. - .. method:: open_unknown(fullurl[, data]) + .. method:: open_unknown(fullurl, data=None) Overridable interface to open unknown URL types. - .. method:: retrieve(url[, filename[, reporthook[, data]]]) + .. method:: retrieve(url, filename=None, reporthook=None, data=None) Retrieves the contents of *url* and places it in *filename*. The return value is a tuple consisting of a local filename and either a @@ -337,12 +340,12 @@ A class to handle redirections. -.. class:: HTTPCookieProcessor([cookiejar]) +.. class:: HTTPCookieProcessor(cookiejar=None) A class to handle HTTP Cookies. -.. class:: ProxyHandler([proxies]) +.. class:: ProxyHandler(proxies=None) Cause requests to go through a proxy. If *proxies* is given, it must be a dictionary mapping protocol names to URLs of proxies. The default is to read the @@ -362,7 +365,7 @@ fits. -.. class:: AbstractBasicAuthHandler([password_mgr]) +.. class:: AbstractBasicAuthHandler(password_mgr=None) This is a mixin class that helps with HTTP authentication, both to the remote host and to a proxy. *password_mgr*, if given, should be something that is @@ -371,7 +374,7 @@ supported. -.. class:: HTTPBasicAuthHandler([password_mgr]) +.. class:: HTTPBasicAuthHandler(password_mgr=None) Handle authentication with the remote host. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section @@ -379,7 +382,7 @@ supported. -.. class:: ProxyBasicAuthHandler([password_mgr]) +.. class:: ProxyBasicAuthHandler(password_mgr=None) Handle authentication with the proxy. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section @@ -387,7 +390,7 @@ supported. -.. class:: AbstractDigestAuthHandler([password_mgr]) +.. class:: AbstractDigestAuthHandler(password_mgr=None) This is a mixin class that helps with HTTP authentication, both to the remote host and to a proxy. *password_mgr*, if given, should be something that is @@ -396,7 +399,7 @@ supported. -.. class:: HTTPDigestAuthHandler([password_mgr]) +.. class:: HTTPDigestAuthHandler(password_mgr=None) Handle authentication with the remote host. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section @@ -404,7 +407,7 @@ supported. -.. class:: ProxyDigestAuthHandler([password_mgr]) +.. class:: ProxyDigestAuthHandler(password_mgr=None) Handle authentication with the proxy. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section @@ -597,7 +600,7 @@ post-process *protocol* responses. -.. method:: OpenerDirector.open(url[, data][, timeout]) +.. method:: OpenerDirector.open(url, data=None[, timeout]) Open the given *url* (which can be a request object or a string), optionally passing the given *data*. Arguments, return values and exceptions raised are @@ -609,7 +612,7 @@ HTTP, HTTPS, FTP and FTPS connections). -.. method:: OpenerDirector.error(proto[, arg[, ...]]) +.. method:: OpenerDirector.error(proto, *args) Handle an error of the given protocol. This will call the registered error handlers for the given protocol with the given arguments (which are protocol Modified: python/branches/py3k/Doc/library/uu.rst ============================================================================== --- python/branches/py3k/Doc/library/uu.rst (original) +++ python/branches/py3k/Doc/library/uu.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`uu` --- Encode and decode uuencode files ============================================== @@ -25,7 +24,7 @@ The :mod:`uu` module defines the following functions: -.. function:: encode(in_file, out_file[, name[, mode]]) +.. function:: encode(in_file, out_file, name=None, mode=None) Uuencode file *in_file* into file *out_file*. The uuencoded file will have the header specifying *name* and *mode* as the defaults for the results of @@ -33,7 +32,7 @@ and ``0o666`` respectively. -.. function:: decode(in_file[, out_file[, mode[, quiet]]]) +.. function:: decode(in_file, out_file=None, mode=None, quiet=False) This call decodes uuencoded file *in_file* placing the result on file *out_file*. If *out_file* is a pathname, *mode* is used to set the permission Modified: python/branches/py3k/Doc/library/uuid.rst ============================================================================== --- python/branches/py3k/Doc/library/uuid.rst (original) +++ python/branches/py3k/Doc/library/uuid.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`uuid` --- UUID objects according to RFC 4122 ================================================== @@ -18,7 +17,7 @@ random UUID. -.. class:: UUID([hex[, bytes[, bytes_le[, fields[, int[, version]]]]]]) +.. class:: UUID(hex=None, bytes=None, bytes_le=None, fields=None, int=None, version=None) Create a UUID from either a string of 32 hexadecimal digits, a string of 16 bytes as the *bytes* argument, a string of 16 bytes in little-endian order as @@ -43,8 +42,8 @@ variant and version number set according to RFC 4122, overriding bits in the given *hex*, *bytes*, *bytes_le*, *fields*, or *int*. -:class:`UUID` instances have these read-only attributes: +:class:`UUID` instances have these read-only attributes: .. attribute:: UUID.bytes @@ -126,7 +125,7 @@ .. index:: single: getnode -.. function:: uuid1([node[, clock_seq]]) +.. function:: uuid1(node=None, clock_seq=None) Generate a UUID from a host ID, sequence number, and the current time. If *node* is not given, :func:`getnode` is used to obtain the hardware address. If Modified: python/branches/py3k/Doc/library/warnings.rst ============================================================================== --- python/branches/py3k/Doc/library/warnings.rst (original) +++ python/branches/py3k/Doc/library/warnings.rst Wed Sep 16 17:58:14 2009 @@ -234,7 +234,7 @@ ------------------- -.. function:: warn(message[, category[, stacklevel]]) +.. function:: warn(message, category=None, stacklevel=1) Issue a warning, or maybe ignore it or raise an exception. The *category* argument, if given, must be a warning category class (see above); it defaults to @@ -253,7 +253,7 @@ of the warning message). -.. function:: warn_explicit(message, category, filename, lineno[, module[, registry[, module_globals]]]) +.. function:: warn_explicit(message, category, filename, lineno, module=None, registry=None, module_globals=None) This is a low-level interface to the functionality of :func:`warn`, passing in explicitly the message, category, filename and line number, and optionally the @@ -270,7 +270,7 @@ sources). -.. function:: showwarning(message, category, filename, lineno[, file[, line]]) +.. function:: showwarning(message, category, filename, lineno, file=None, line=None) Write a warning to a file. The default implementation calls ``formatwarning(message, category, filename, lineno, line)`` and writes the @@ -282,7 +282,7 @@ try to read the line specified by *filename* and *lineno*. -.. function:: formatwarning(message, category, filename, lineno[, line]) +.. function:: formatwarning(message, category, filename, lineno, line=None) Format a warning the standard way. This returns a string which may contain embedded newlines and ends in a newline. *line* is a line of source code to @@ -291,7 +291,7 @@ *lineno*. -.. function:: filterwarnings(action[, message[, category[, module[, lineno[, append]]]]]) +.. function:: filterwarnings(action, message='', category=Warning, module='', lineno=0, append=False) Insert an entry into the list of :ref:`warnings filter specifications `. The entry is inserted at the front by default; if @@ -303,7 +303,7 @@ everything. -.. function:: simplefilter(action[, category[, lineno[, append]]]) +.. function:: simplefilter(action, category=Warning, lineno=0, append=False) Insert a simple entry into the list of :ref:`warnings filter specifications `. The meaning of the function parameters is as for @@ -322,7 +322,7 @@ Available Context Managers -------------------------- -.. class:: catch_warnings([\*, record=False, module=None]) +.. class:: catch_warnings(\*, record=False, module=None) A context manager that copies and, upon exit, restores the warnings filter and the :func:`showwarning` function. Modified: python/branches/py3k/Doc/library/wave.rst ============================================================================== --- python/branches/py3k/Doc/library/wave.rst (original) +++ python/branches/py3k/Doc/library/wave.rst Wed Sep 16 17:58:14 2009 @@ -12,7 +12,7 @@ The :mod:`wave` module defines the following function and exception: -.. function:: open(file[, mode]) +.. function:: open(file, mode=None) If *file* is a string, open the file by that name, other treat it as a seekable file-like object. *mode* can be any of Modified: python/branches/py3k/Doc/library/weakref.rst ============================================================================== --- python/branches/py3k/Doc/library/weakref.rst (original) +++ python/branches/py3k/Doc/library/weakref.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`weakref` --- Weak references ================================== @@ -92,10 +91,10 @@ but cannot be propagated; they are handled in exactly the same way as exceptions raised from an object's :meth:`__del__` method. - Weak references are :term:`hashable` if the *object* is hashable. They will maintain - their hash value even after the *object* was deleted. If :func:`hash` is called - the first time only after the *object* was deleted, the call will raise - :exc:`TypeError`. + Weak references are :term:`hashable` if the *object* is hashable. They will + maintain their hash value even after the *object* was deleted. If + :func:`hash` is called the first time only after the *object* was deleted, + the call will raise :exc:`TypeError`. Weak references support tests for equality, but not ordering. If the referents are still alive, two references have the same equality relationship as their Modified: python/branches/py3k/Doc/library/webbrowser.rst ============================================================================== --- python/branches/py3k/Doc/library/webbrowser.rst (original) +++ python/branches/py3k/Doc/library/webbrowser.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`webbrowser` --- Convenient Web-browser controller ======================================================= @@ -46,7 +45,7 @@ The following functions are defined: -.. function:: open(url[, new=0[, autoraise=True]]) +.. 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 @@ -72,14 +71,14 @@ equivalent to :func:`open_new`. -.. function:: get([name]) +.. function:: get(using=None) - Return a controller object for the browser type *name*. If *name* is empty, - return a controller for a default browser appropriate to the caller's - environment. + Return a controller object for the browser type *using*. If *using* is + ``None``, return a controller for a default browser appropriate to the + caller's environment. -.. function:: register(name, constructor[, instance]) +.. function:: register(name, constructor, instance=None) Register the browser type *name*. Once a browser type is registered, the :func:`get` function can return a controller for that browser type. If @@ -175,7 +174,7 @@ module-level convenience functions: -.. method:: controller.open(url[, new[, autoraise=True]]) +.. method:: controller.open(url, new=0, 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/winreg.rst ============================================================================== --- python/branches/py3k/Doc/library/winreg.rst (original) +++ python/branches/py3k/Doc/library/winreg.rst Wed Sep 16 17:58:14 2009 @@ -183,7 +183,7 @@ :const:`HKEY_LOCAL_MACHINE` tree. This may or may not be true. -.. function:: OpenKey(key, sub_key[, res=0][, sam=KEY_READ]) +.. function:: OpenKey(key, sub_key, res=0, sam=KEY_READ) Opens the specified key, returning a :dfn:`handle object` @@ -195,7 +195,7 @@ *res* is a reserved integer, and must be zero. The default is zero. *sam* is an integer that specifies an access mask that describes the desired - security access for the key. Default is :const:`KEY_READ` + security access for the key. Default is :const:`KEY_READ`. The result is a new handle to the specified key. Modified: python/branches/py3k/Doc/library/winsound.rst ============================================================================== --- python/branches/py3k/Doc/library/winsound.rst (original) +++ python/branches/py3k/Doc/library/winsound.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`winsound` --- Sound-playing interface for Windows ======================================================= @@ -31,7 +30,7 @@ indicates an error, :exc:`RuntimeError` is raised. -.. function:: MessageBeep([type=MB_OK]) +.. function:: MessageBeep(type=MB_OK) Call the underlying :cfunc:`MessageBeep` function from the Platform API. This plays a sound as specified in the registry. The *type* argument specifies which Modified: python/branches/py3k/Doc/library/wsgiref.rst ============================================================================== --- python/branches/py3k/Doc/library/wsgiref.rst (original) +++ python/branches/py3k/Doc/library/wsgiref.rst Wed Sep 16 17:58:14 2009 @@ -57,7 +57,7 @@ found, and "http" otherwise. -.. function:: request_uri(environ [, include_query=1]) +.. function:: request_uri(environ, include_query=True) Return the full request URI, optionally including the query string, using the algorithm found in the "URL Reconstruction" section of :pep:`333`. If @@ -146,7 +146,7 @@ :rfc:`2616`. -.. class:: FileWrapper(filelike [, blksize=8192]) +.. class:: FileWrapper(filelike, blksize=8192) A wrapper to convert a file-like object to an :term:`iterator`. The resulting objects support both :meth:`__getitem__` and :meth:`__iter__` iteration styles, for @@ -269,7 +269,7 @@ :mod:`wsgiref.util`.) -.. function:: make_server(host, port, app [, server_class=WSGIServer [, handler_class=WSGIRequestHandler]]) +.. function:: make_server(host, port, app, server_class=WSGIServer, handler_class=WSGIRequestHandler) Create a new WSGI server listening on *host* and *port*, accepting connections for *app*. The return value is an instance of the supplied *server_class*, and @@ -458,7 +458,7 @@ environment. -.. class:: BaseCGIHandler(stdin, stdout, stderr, environ [, multithread=True [, multiprocess=False]]) +.. class:: BaseCGIHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`CGIHandler`, but instead of using the :mod:`sys` and :mod:`os` modules, the CGI environment and I/O streams are specified explicitly. @@ -473,7 +473,7 @@ instead of :class:`SimpleHandler`. -.. class:: SimpleHandler(stdin, stdout, stderr, environ [,multithread=True [, multiprocess=False]]) +.. class:: SimpleHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`BaseCGIHandler`, but designed for use with HTTP origin servers. If you are writing an HTTP server implementation, you will probably Modified: python/branches/py3k/Doc/library/xdrlib.rst ============================================================================== --- python/branches/py3k/Doc/library/xdrlib.rst (original) +++ python/branches/py3k/Doc/library/xdrlib.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`xdrlib` --- Encode and decode XDR data ============================================ Modified: python/branches/py3k/Doc/library/xml.dom.minidom.rst ============================================================================== --- python/branches/py3k/Doc/library/xml.dom.minidom.rst (original) +++ python/branches/py3k/Doc/library/xml.dom.minidom.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`xml.dom.minidom` --- Lightweight DOM implementation ========================================================= @@ -28,7 +27,7 @@ The :func:`parse` function can take either a filename or an open file object. -.. function:: parse(filename_or_file[, parser[, bufsize]]) +.. function:: parse(filename_or_file, parser=None, bufsize=None) Return a :class:`Document` from the given input. *filename_or_file* may be either a file name, or a file-like object. *parser*, if given, must be a SAX2 @@ -40,7 +39,7 @@ instead: -.. function:: parseString(string[, parser]) +.. function:: parseString(string, parser=None) Return a :class:`Document` that represents the *string*. This method creates a :class:`StringIO` object for the string and passes that on to :func:`parse`. @@ -126,7 +125,7 @@ to discard children of that node. -.. method:: Node.writexml(writer[, indent=""[, addindent=""[, newl=""[, encoding=""]]]]) +.. method:: Node.writexml(writer, indent="", addindent="", newl="", encoding="") Write XML to the writer object. The writer should have a :meth:`write` method which matches that of the file object interface. The *indent* parameter is the @@ -138,7 +137,7 @@ used to specify the encoding field of the XML header. -.. method:: Node.toxml([encoding]) +.. method:: Node.toxml(encoding=None) Return the XML that the DOM represents as a string. @@ -153,7 +152,7 @@ encoding argument should be specified as "utf-8". -.. method:: Node.toprettyxml([indent=""[, newl=""[, encoding=""]]]) +.. method:: Node.toprettyxml(indent="", newl="", encoding="") Return a pretty-printed version of the document. *indent* specifies the indentation string and defaults to a tabulator; *newl* specifies the string Modified: python/branches/py3k/Doc/library/xml.dom.pulldom.rst ============================================================================== --- python/branches/py3k/Doc/library/xml.dom.pulldom.rst (original) +++ python/branches/py3k/Doc/library/xml.dom.pulldom.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`xml.dom.pulldom` --- Support for building partial DOM trees ================================================================= @@ -11,7 +10,7 @@ Object Model representation of a document from SAX events. -.. class:: PullDOM([documentFactory]) +.. class:: PullDOM(documentFactory=None) :class:`xml.sax.handler.ContentHandler` implementation that ... @@ -21,17 +20,17 @@ ... -.. class:: SAX2DOM([documentFactory]) +.. class:: SAX2DOM(documentFactory=None) :class:`xml.sax.handler.ContentHandler` implementation that ... -.. function:: parse(stream_or_string[, parser[, bufsize]]) +.. function:: parse(stream_or_string, parser=None, bufsize=None) ... -.. function:: parseString(string[, parser]) +.. function:: parseString(string, parser=None) ... Modified: python/branches/py3k/Doc/library/xml.dom.rst ============================================================================== --- python/branches/py3k/Doc/library/xml.dom.rst (original) +++ python/branches/py3k/Doc/library/xml.dom.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`xml.dom` --- The Document Object Model API ================================================ @@ -96,7 +95,7 @@ implementation supports some customization). -.. function:: getDOMImplementation([name[, features]]) +.. function:: getDOMImplementation(name=None, features=()) Return a suitable DOM implementation. The *name* is either well-known, the module name of a DOM implementation, or ``None``. If it is not ``None``, imports 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 Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`xml.etree.ElementTree` --- The ElementTree XML API ======================================================== @@ -41,7 +40,7 @@ --------- -.. function:: Comment([text]) +.. function:: Comment(text=None) Comment element factory. This factory function creates a special element that will be serialized as an XML comment. The comment string can be either @@ -61,7 +60,7 @@ *elem* is an element tree or an individual element. -.. function:: Element(tag[, attrib][, **extra]) +.. function:: Element(tag, attrib={}, **extra) Element factory. This function returns an object implementing the standard Element interface. The exact class or type of that object is implementation @@ -87,7 +86,7 @@ element instance. Returns a true value if this is an element object. -.. function:: iterparse(source[, events]) +.. function:: iterparse(source, events=None) Parses an XML section into an element tree incrementally, and reports what's going on to the user. *source* is a filename or file object containing XML data. @@ -105,7 +104,7 @@ If you need a fully populated element, look for "end" events instead. -.. function:: parse(source[, parser]) +.. function:: parse(source, parser=None) Parses an XML section into an element tree. *source* is a filename or file object containing XML data. *parser* is an optional parser instance. If not @@ -113,7 +112,7 @@ instance. -.. function:: ProcessingInstruction(target[, text]) +.. function:: ProcessingInstruction(target, text=None) PI element factory. This factory function creates a special element that will be serialized as an XML processing instruction. *target* is a string containing @@ -121,7 +120,7 @@ an element instance, representing a processing instruction. -.. function:: SubElement(parent, tag[, attrib[, **extra]]) +.. function:: SubElement(parent, tag, attrib={}, **extra) Subelement factory. This function creates an element instance, and appends it to an existing element. @@ -133,7 +132,7 @@ as keyword arguments. Returns an element instance. -.. function:: tostring(element[, encoding]) +.. function:: tostring(element, encoding=None) Generates a string representation of an XML element, including all subelements. *element* is an Element instance. *encoding* is the output encoding (default is @@ -202,7 +201,7 @@ attributes, and sets the text and tail attributes to None. -.. method:: Element.get(key[, default=None]) +.. method:: Element.get(key, default=None) Gets the element attribute named *key*. @@ -246,7 +245,7 @@ Returns an iterable yielding all matching elements in document order. -.. method:: Element.findtext(condition[, default=None]) +.. method:: Element.findtext(condition, default=None) Finds text for the first subelement matching *condition*. *condition* may be a tag name or path. Returns the text content of the first matching element, or @@ -259,7 +258,7 @@ Returns all subelements. The elements are returned in document order. -.. method:: Element.getiterator([tag=None]) +.. 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, in document (depth first) @@ -305,7 +304,7 @@ ------------------- -.. class:: ElementTree([element,] [file]) +.. class:: ElementTree(element=None, file=None) ElementTree wrapper class. This class represents an entire element hierarchy, and adds some extra support for serialization to and from standard XML. @@ -336,7 +335,7 @@ order. - .. method:: findtext(path[, default]) + .. method:: findtext(path, default=None) Finds the element text for the first toplevel element with given tag. Same as getroot().findtext(path). *path* is the toplevel element to look @@ -346,7 +345,7 @@ found, but has no text content, this method returns an empty string. - .. method:: getiterator([tag]) + .. method:: getiterator(tag=None) Creates and returns a tree iterator for the root element. The iterator loops over all elements in this tree, in section order. *tag* is the tag @@ -358,7 +357,7 @@ Returns the root element for this tree. - .. method:: parse(source[, parser]) + .. method:: parse(source, parser=None) Loads an external XML section into this element tree. *source* is a file name or file object. *parser* is an optional parser instance. If not @@ -366,7 +365,7 @@ root element. - .. method:: write(file[, encoding]) + .. method:: write(file, encoding=None) Writes the element tree to a file, as XML. *file* is a file name, or a file object opened for writing. *encoding* [1]_ is the output encoding @@ -406,7 +405,7 @@ ------------- -.. class:: QName(text_or_uri[, tag]) +.. class:: QName(text_or_uri, tag=None) QName wrapper. This can be used to wrap a QName attribute value, in order to get proper namespace handling on output. *text_or_uri* is a string containing @@ -422,7 +421,7 @@ ------------------- -.. class:: TreeBuilder([element_factory]) +.. class:: TreeBuilder(element_factory=None) Generic element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this @@ -461,7 +460,7 @@ ---------------------- -.. class:: XMLTreeBuilder([html,] [target]) +.. class:: XMLTreeBuilder(html=0, target=None) Element structure builder for XML source data, based on the expat parser. *html* are predefined HTML entities. This flag is not supported by the current Modified: python/branches/py3k/Doc/library/xml.sax.handler.rst ============================================================================== --- python/branches/py3k/Doc/library/xml.sax.handler.rst (original) +++ python/branches/py3k/Doc/library/xml.sax.handler.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`xml.sax.handler` --- Base classes for SAX handlers ======================================================== Modified: python/branches/py3k/Doc/library/xml.sax.reader.rst ============================================================================== --- python/branches/py3k/Doc/library/xml.sax.reader.rst (original) +++ python/branches/py3k/Doc/library/xml.sax.reader.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`xml.sax.xmlreader` --- Interface for XML parsers ====================================================== @@ -48,7 +47,7 @@ methods may return ``None``. -.. class:: InputSource([systemId]) +.. class:: InputSource(system_id=None) Encapsulation of the information needed by the :class:`XMLReader` to read entities. Modified: python/branches/py3k/Doc/library/xml.sax.rst ============================================================================== --- python/branches/py3k/Doc/library/xml.sax.rst (original) +++ python/branches/py3k/Doc/library/xml.sax.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`xml.sax` --- Support for SAX2 parsers =========================================== @@ -17,7 +16,7 @@ The convenience functions are: -.. function:: make_parser([parser_list]) +.. function:: make_parser(parser_list=[]) Create and return a SAX :class:`XMLReader` object. The first parser found will be used. If *parser_list* is provided, it must be a sequence of strings which @@ -25,7 +24,7 @@ in *parser_list* will be used before modules in the default list of parsers. -.. function:: parse(filename_or_stream, handler[, error_handler]) +.. function:: parse(filename_or_stream, handler, error_handler=handler.ErrorHandler()) Create a SAX parser and use it to parse a document. The document, passed in as *filename_or_stream*, can be a filename or a file object. The *handler* @@ -35,7 +34,7 @@ return value; all work must be done by the *handler* passed in. -.. function:: parseString(string, handler[, error_handler]) +.. function:: parseString(string, handler, error_handler=handler.ErrorHandler()) Similar to :func:`parse`, but parses from a buffer *string* received as a parameter. @@ -66,7 +65,7 @@ classes. -.. exception:: SAXException(msg[, exception]) +.. exception:: SAXException(msg, exception=None) Encapsulate an XML error or warning. This class can contain basic error or warning information from either the XML parser or the application: it can be @@ -90,14 +89,14 @@ interface as well as the :class:`SAXException` interface. -.. exception:: SAXNotRecognizedException(msg[, exception]) +.. exception:: SAXNotRecognizedException(msg, exception=None) Subclass of :exc:`SAXException` raised when a SAX :class:`XMLReader` is confronted with an unrecognized feature or property. SAX applications and extensions may use this class for similar purposes. -.. exception:: SAXNotSupportedException(msg[, exception]) +.. exception:: SAXNotSupportedException(msg, exception=None) Subclass of :exc:`SAXException` raised when a SAX :class:`XMLReader` is asked to enable a feature that is not supported, or to set a property to a value that the Modified: python/branches/py3k/Doc/library/xml.sax.utils.rst ============================================================================== --- python/branches/py3k/Doc/library/xml.sax.utils.rst (original) +++ python/branches/py3k/Doc/library/xml.sax.utils.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`xml.sax.saxutils` --- SAX Utilities ========================================= @@ -13,7 +12,7 @@ or as base classes. -.. function:: escape(data[, entities]) +.. function:: escape(data, entities={}) Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data. @@ -23,7 +22,7 @@ ``'>'`` are always escaped, even if *entities* is provided. -.. function:: unescape(data[, entities]) +.. function:: unescape(data, entities={}) Unescape ``'&'``, ``'<'``, and ``'>'`` in a string of data. @@ -33,7 +32,7 @@ are always unescaped, even if *entities* is provided. -.. function:: quoteattr(data[, entities]) +.. function:: quoteattr(data, entities={}) Similar to :func:`escape`, but also prepares *data* to be used as an attribute value. The return value is a quoted version of *data* with any @@ -51,7 +50,7 @@ using the reference concrete syntax. -.. class:: XMLGenerator([out[, encoding]]) +.. class:: XMLGenerator(out=None, encoding='iso-8859-1') This class implements the :class:`ContentHandler` interface by writing SAX events back into an XML document. In other words, using an :class:`XMLGenerator` @@ -69,7 +68,7 @@ requests as they pass through. -.. function:: prepare_input_source(source[, base]) +.. function:: prepare_input_source(source, base='') This function takes an input source and an optional base URL and returns a fully resolved :class:`InputSource` object ready for reading. The input source can be 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 Wed Sep 16 17:58:14 2009 @@ -17,7 +17,7 @@ between conformable Python objects and XML on the wire. -.. class:: ServerProxy(uri[, transport[, encoding[, verbose[, allow_none[, use_datetime]]]]]) +.. class:: ServerProxy(uri, transport=None, encoding=None, verbose=False, allow_none=False, use_datetime=False) A :class:`ServerProxy` instance is an object that manages communication with a remote XML-RPC server. The required first argument is a URI (Uniform Resource @@ -458,7 +458,7 @@ Convenience Functions --------------------- -.. function:: dumps(params[, methodname[, methodresponse[, encoding[, allow_none]]]]) +.. function:: dumps(params, methodname=None, methodresponse=None, encoding=None, allow_none=False) Convert *params* into an XML-RPC request. or into a response if *methodresponse* is true. *params* can be either a tuple of arguments or an instance of the @@ -469,7 +469,7 @@ it via an extension, provide a true value for *allow_none*. -.. function:: loads(data[, use_datetime]) +.. function:: loads(data, use_datetime=False) Convert an XML-RPC request or response into Python objects, a ``(params, methodname)``. *params* is a tuple of argument; *methodname* is a string, or Modified: python/branches/py3k/Doc/library/xmlrpc.server.rst ============================================================================== --- python/branches/py3k/Doc/library/xmlrpc.server.rst (original) +++ python/branches/py3k/Doc/library/xmlrpc.server.rst Wed Sep 16 17:58:14 2009 @@ -13,7 +13,7 @@ :class:`CGIXMLRPCRequestHandler`. -.. class:: SimpleXMLRPCServer(addr[, requestHandler[, logRequests[, allow_none[, encoding[, bind_and_activate]]]]]) +.. class:: SimpleXMLRPCServer(addr, requestHandler=SimpleXMLRPCRequestHandler, logRequests=True, allow_none=False, encoding=None, bind_and_activate=True) Create a new server instance. This class provides methods for registration of functions that can be called by the XML-RPC protocol. The *requestHandler* @@ -29,7 +29,7 @@ the *allow_reuse_address* class variable before the address is bound. -.. class:: CGIXMLRPCRequestHandler([allow_none[, encoding]]) +.. class:: CGIXMLRPCRequestHandler(allow_none=False, encoding=None) Create a new instance to handle XML-RPC requests in a CGI environment. The *allow_none* and *encoding* parameters are passed on to :mod:`xmlrpc.client` @@ -53,7 +53,7 @@ alone XML-RPC servers. -.. method:: SimpleXMLRPCServer.register_function(function[, name]) +.. method:: SimpleXMLRPCServer.register_function(function, name=None) Register a function that can respond to XML-RPC requests. If *name* is given, it will be the method name associated with *function*, otherwise @@ -62,7 +62,7 @@ the period character. -.. method:: SimpleXMLRPCServer.register_instance(instance[, allow_dotted_names]) +.. method:: SimpleXMLRPCServer.register_instance(instance, allow_dotted_names=False) Register an object which is used to expose method names which have not been registered using :meth:`register_function`. If *instance* contains a @@ -167,7 +167,7 @@ requests sent to Python CGI scripts. -.. method:: CGIXMLRPCRequestHandler.register_function(function[, name]) +.. method:: CGIXMLRPCRequestHandler.register_function(function, name=None) Register a function that can respond to XML-RPC requests. If *name* is given, it will be the method name associated with function, otherwise @@ -201,7 +201,7 @@ Register the XML-RPC multicall function ``system.multicall``. -.. method:: CGIXMLRPCRequestHandler.handle_request([request_text = None]) +.. method:: CGIXMLRPCRequestHandler.handle_request(request_text=None) Handle a XML-RPC request. If *request_text* is given, it should be the POST data provided by the HTTP server, otherwise the contents of stdin will be used. @@ -229,7 +229,7 @@ :class:`DocCGIXMLRPCRequestHandler`. -.. class:: DocXMLRPCServer(addr[, requestHandler[, logRequests[, allow_none[, encoding[, bind_and_activate]]]]]) +.. class:: DocXMLRPCServer(addr, requestHandler=DocXMLRPCRequestHandler, logRequests=True, allow_none=False, encoding=None, bind_and_activate=True) Create a new server instance. All parameters have the same meaning as for :class:`SimpleXMLRPCServer`; *requestHandler* defaults to Modified: python/branches/py3k/Doc/library/zipfile.rst ============================================================================== --- python/branches/py3k/Doc/library/zipfile.rst (original) +++ python/branches/py3k/Doc/library/zipfile.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`zipfile` --- Work with ZIP archives ========================================= @@ -49,7 +48,7 @@ Class for creating ZIP archives containing Python libraries. -.. class:: ZipInfo([filename[, date_time]]) +.. class:: ZipInfo(filename='NoName', date_time=(1980,1,1,0,0,0)) Class used to represent information about a member of an archive. Instances of this class are returned by the :meth:`getinfo` and :meth:`infolist` @@ -98,7 +97,7 @@ --------------- -.. class:: ZipFile(file[, mode[, compression[, allowZip64]]]) +.. class:: ZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=False) Open a ZIP file, where *file* can be either a path to a file (a string) or a file-like object. The *mode* parameter should be ``'r'`` to read an existing @@ -149,7 +148,7 @@ Return a list of archive members by name. -.. method:: ZipFile.open(name[, mode[, pwd]]) +.. method:: ZipFile.open(name, mode='r', pwd=None) Extract a member from the archive as a file-like object (ZipExtFile). *name* is the name of the file in the archive, or a :class:`ZipInfo` object. The *mode* @@ -182,7 +181,7 @@ ZIP file that contains members with duplicate names. -.. method:: ZipFile.extract(member[, path[, pwd]]) +.. method:: ZipFile.extract(member, path=None, pwd=None) Extract a member from the archive to the current working directory; *member* must be its full name or a :class:`ZipInfo` object). Its file information is @@ -191,7 +190,7 @@ *pwd* is the password used for encrypted files. -.. method:: ZipFile.extractall([path[, members[, pwd]]]) +.. method:: ZipFile.extractall(path=None, members=None, pwd=None) Extract all members from the archive to the current working directory. *path* specifies a different directory to extract to. *members* is optional and must @@ -209,7 +208,7 @@ Set *pwd* as default password to extract encrypted files. -.. method:: ZipFile.read(name[, pwd]) +.. method:: ZipFile.read(name, pwd=None) Return the bytes of the file *name* in the archive. *name* is the name of the file in the archive, or a :class:`ZipInfo` object. The archive must be open for @@ -225,7 +224,7 @@ :meth:`testzip` on a closed ZipFile will raise a :exc:`RuntimeError`. -.. method:: ZipFile.write(filename[, arcname[, compress_type]]) +.. method:: ZipFile.write(filename, arcname=None, compress_type=None) Write the file named *filename* to the archive, giving it the archive name *arcname* (by default, this will be the same as *filename*, but without a drive @@ -297,7 +296,7 @@ :class:`ZipFile` objects. -.. method:: PyZipFile.writepy(pathname[, basename]) +.. method:: PyZipFile.writepy(pathname, basename='') Search for files :file:`\*.py` and add the corresponding file to the archive. The corresponding file is a :file:`\*.pyo` file if available, else a Modified: python/branches/py3k/Doc/library/zipimport.rst ============================================================================== --- python/branches/py3k/Doc/library/zipimport.rst (original) +++ python/branches/py3k/Doc/library/zipimport.rst Wed Sep 16 17:58:14 2009 @@ -1,4 +1,3 @@ - :mod:`zipimport` --- Import modules from Zip archives ===================================================== Modified: python/branches/py3k/Doc/library/zlib.rst ============================================================================== --- python/branches/py3k/Doc/library/zlib.rst (original) +++ python/branches/py3k/Doc/library/zlib.rst Wed Sep 16 17:58:14 2009 @@ -1,10 +1,9 @@ - :mod:`zlib` --- Compression compatible with :program:`gzip` =========================================================== .. module:: zlib - :synopsis: Low-level interface to compression and decompression routines compatible with - gzip. + :synopsis: Low-level interface to compression and decompression routines + compatible with gzip. For applications that require data compression, the functions in this module From python-checkins at python.org Wed Sep 16 17:58:51 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 15:58:51 -0000 Subject: [Python-checkins] r74834 - python/branches/py3k Message-ID: Author: georg.brandl Date: Wed Sep 16 17:58:51 2009 New Revision: 74834 Log: Blocked revisions 74832 via svnmerge ........ r74832 | georg.brandl | 2009-09-16 17:57:46 +0200 (Mi, 16 Sep 2009) | 1 line Rewrap long lines. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Wed Sep 16 18:00:31 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 16:00:31 -0000 Subject: [Python-checkins] r74835 - in python/branches/py3k: Doc/howto/unicode.rst Doc/library/optparse.rst Doc/library/readline.rst Doc/reference/simple_stmts.rst Doc/tools/sphinxext/pyspecific.py Doc/tools/sphinxext/static/basic.css Doc/tutorial/errors.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 18:00:31 2009 New Revision: 74835 Log: Merged revisions 74817-74820,74822-74824 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74817 | georg.brandl | 2009-09-16 11:05:11 +0200 (Mi, 16 Sep 2009) | 1 line Make deprecation notices as visible as warnings are right now. ........ r74818 | georg.brandl | 2009-09-16 11:23:04 +0200 (Mi, 16 Sep 2009) | 1 line #6880: add reference to classes section in exceptions section, which comes earlier. ........ r74819 | georg.brandl | 2009-09-16 11:24:57 +0200 (Mi, 16 Sep 2009) | 1 line #6876: fix base class constructor invocation in example. ........ r74820 | georg.brandl | 2009-09-16 11:30:48 +0200 (Mi, 16 Sep 2009) | 1 line #6891: comment out dead link to Unicode article. ........ r74822 | georg.brandl | 2009-09-16 12:12:06 +0200 (Mi, 16 Sep 2009) | 1 line #5621: refactor description of how class/instance attributes interact on a.x=a.x+1 or augassign. ........ r74823 | georg.brandl | 2009-09-16 15:06:22 +0200 (Mi, 16 Sep 2009) | 1 line Remove strange trailing commas. ........ r74824 | georg.brandl | 2009-09-16 15:11:06 +0200 (Mi, 16 Sep 2009) | 1 line #6892: fix optparse example involving help option. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/howto/unicode.rst python/branches/py3k/Doc/library/optparse.rst python/branches/py3k/Doc/library/readline.rst python/branches/py3k/Doc/reference/simple_stmts.rst python/branches/py3k/Doc/tools/sphinxext/pyspecific.py python/branches/py3k/Doc/tools/sphinxext/static/basic.css python/branches/py3k/Doc/tutorial/errors.rst Modified: python/branches/py3k/Doc/howto/unicode.rst ============================================================================== --- python/branches/py3k/Doc/howto/unicode.rst (original) +++ python/branches/py3k/Doc/howto/unicode.rst Wed Sep 16 18:00:31 2009 @@ -211,11 +211,12 @@ to reading the Unicode character tables, available at . -Two other good introductory articles were written by Joel Spolsky - and Jason Orendorff -. If this introduction didn't make -things clear to you, you should try reading one of these alternate articles -before continuing. +Another good introductory article was written by Joel Spolsky +. +If this introduction didn't make things clear to you, you should try reading this +alternate article before continuing. + +.. Jason Orendorff XXX http://www.jorendorff.com/articles/unicode/ is broken Wikipedia entries are often helpful; see the entries for "character encoding" and UTF-8 Modified: python/branches/py3k/Doc/library/optparse.rst ============================================================================== --- python/branches/py3k/Doc/library/optparse.rst (original) +++ python/branches/py3k/Doc/library/optparse.rst Wed Sep 16 18:00:31 2009 @@ -467,7 +467,7 @@ action="store_false", dest="verbose", help="be vewwy quiet (I'm hunting wabbits)") parser.add_option("-f", "--filename", - metavar="FILE", help="write output to FILE"), + metavar="FILE", help="write output to FILE") parser.add_option("-m", "--mode", default="intermediate", help="interaction mode: novice, intermediate, " @@ -1014,12 +1014,15 @@ from optparse import OptionParser, SUPPRESS_HELP - parser = OptionParser() - parser.add_option("-h", "--help", action="help"), + # usually, a help option is added automatically, but that can + # be suppressed using the add_help_option argument + parser = OptionParser(add_help_option=False) + + parser.add_option("-h", "--help", action="help") parser.add_option("-v", action="store_true", dest="verbose", help="Be moderately verbose") parser.add_option("--file", dest="filename", - help="Input file to read data from"), + help="Input file to read data from") parser.add_option("--secret", help=SUPPRESS_HELP) If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, it Modified: python/branches/py3k/Doc/library/readline.rst ============================================================================== --- python/branches/py3k/Doc/library/readline.rst (original) +++ python/branches/py3k/Doc/library/readline.rst Wed Sep 16 18:00:31 2009 @@ -205,7 +205,7 @@ class HistoryConsole(code.InteractiveConsole): def __init__(self, locals=None, filename="", histfile=os.path.expanduser("~/.console-history")): - code.InteractiveConsole.__init__(self) + code.InteractiveConsole.__init__(self, locals, filename) self.init_history(histfile) def init_history(self, histfile): 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 Wed Sep 16 18:00:31 2009 @@ -170,6 +170,25 @@ perform the assignment, it raises an exception (usually but not necessarily :exc:`AttributeError`). + .. _attr-target-note: + + Note: If the object is a class instance and the attribute reference occurs on + both sides of the assignment operator, the RHS expression, ``a.x`` can access + either an instance attribute or (if no instance attribute exists) a class + attribute. The LHS target ``a.x`` is always set as an instance attribute, + creating it if necessary. Thus, the two occurrences of ``a.x`` do not + necessarily refer to the same attribute: if the RHS expression refers to a + class attribute, the LHS creates a new instance attribute as the target of the + assignment:: + + class Cls: + x = 3 # class variable + inst = Cls() + inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x as 3 + + This description does not necessarily apply to descriptor attributes, such as + properties created with :func:`property`. + .. index:: pair: subscription; assignment object: mutable @@ -276,16 +295,8 @@ *in-place* behavior, the binary operation performed by augmented assignment is the same as the normal binary operations. -For targets which are attribute references, the initial value is retrieved with -a :meth:`getattr` and the result is assigned with a :meth:`setattr`. Notice -that the two methods do not necessarily refer to the same variable. When -:meth:`getattr` refers to a class variable, :meth:`setattr` still writes to an -instance variable. For example:: - - class A: - x = 3 # class variable - a = A() - a.x += 1 # writes a.x as 4 leaving A.x as 3 +For targets which are attribute references, the same :ref:`caveat about class +and instance attributes ` applies as for regular assignments. .. _assert: Modified: python/branches/py3k/Doc/tools/sphinxext/pyspecific.py ============================================================================== --- python/branches/py3k/Doc/tools/sphinxext/pyspecific.py (original) +++ python/branches/py3k/Doc/tools/sphinxext/pyspecific.py Wed Sep 16 18:00:31 2009 @@ -20,6 +20,20 @@ Body.enum.converters['lowerroman'] = \ Body.enum.converters['upperroman'] = lambda x: None +# monkey-patch HTML translator to give versionmodified paragraphs a class +def new_visit_versionmodified(self, node): + self.body.append(self.starttag(node, 'p', CLASS=node['type'])) + text = versionlabels[node['type']] % node['version'] + if len(node): + text += ': ' + else: + text += '.' + self.body.append('%s' % text) + +from sphinx.writers.html import HTMLTranslator +from sphinx.locale import versionlabels +HTMLTranslator.visit_versionmodified = new_visit_versionmodified + def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): issue = utils.unescape(text) Modified: python/branches/py3k/Doc/tools/sphinxext/static/basic.css ============================================================================== --- python/branches/py3k/Doc/tools/sphinxext/static/basic.css (original) +++ python/branches/py3k/Doc/tools/sphinxext/static/basic.css Wed Sep 16 18:00:31 2009 @@ -5,15 +5,6 @@ /* -- main layout ----------------------------------------------------------- */ -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - div.clearer { clear: both; } @@ -338,6 +329,12 @@ font-style: italic; } +p.deprecated { + background-color: #ffe4e4; + border: 1px solid #f66; + padding: 7px +} + .system-message { background-color: #fda; padding: 5px; @@ -394,7 +391,7 @@ vertical-align: middle; } -div.math p { +div.body div.math p { text-align: center; } Modified: python/branches/py3k/Doc/tutorial/errors.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/errors.rst (original) +++ python/branches/py3k/Doc/tutorial/errors.rst Wed Sep 16 18:00:31 2009 @@ -242,9 +242,10 @@ User-defined Exceptions ======================= -Programs may name their own exceptions by creating a new exception class. -Exceptions should typically be derived from the :exc:`Exception` class, either -directly or indirectly. For example:: +Programs may name their own exceptions by creating a new exception class (see +:ref:`tut-classes` for more about Python classes). Exceptions should typically +be derived from the :exc:`Exception` class, either directly or indirectly. For +example:: >>> class MyError(Exception): ... def __init__(self, value): From python-checkins at python.org Wed Sep 16 18:06:00 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 16:06:00 -0000 Subject: [Python-checkins] r74836 - in python/branches/release31-maint: Doc/howto/unicode.rst Doc/library/optparse.rst Doc/library/pdb.rst Doc/library/readline.rst Doc/library/someos.rst Doc/library/spwd.rst Doc/library/ssl.rst Doc/library/stat.rst Doc/library/string.rst Doc/library/stringprep.rst Doc/library/strings.rst Doc/library/struct.rst Doc/library/subprocess.rst Doc/library/sunau.rst Doc/library/symbol.rst Doc/library/sys.rst Doc/library/syslog.rst Doc/library/tabnanny.rst Doc/library/tarfile.rst Doc/library/telnetlib.rst Doc/library/tempfile.rst Doc/library/termios.rst Doc/library/test.rst Doc/library/textwrap.rst Doc/library/threading.rst Doc/library/time.rst Doc/library/timeit.rst Doc/library/tkinter.tix.rst Doc/library/tkinter.ttk.rst Doc/library/token.rst Doc/library/trace.rst Doc/library/traceback.rst Doc/library/tty.rst Doc/library/undoc.rst Doc/library/unicodedata.rst Doc/library/unittest.rst Doc/library/unix.rst Doc/library/urllib.error.rst Doc/library/urllib.parse.rst Doc/library/urllib.request.rst Doc/library/uu.rst Doc/library/uuid.rst Doc/library/warnings.rst Doc/library/wave.rst Doc/library/weakref.rst Doc/library/webbrowser.rst Doc/library/winreg.rst Doc/library/winsound.rst Doc/library/wsgiref.rst Doc/library/xdrlib.rst Doc/library/xml.dom.minidom.rst Doc/library/xml.dom.pulldom.rst Doc/library/xml.dom.rst Doc/library/xml.etree.elementtree.rst Doc/library/xml.sax.handler.rst Doc/library/xml.sax.reader.rst Doc/library/xml.sax.rst Doc/library/xml.sax.utils.rst Doc/library/xmlrpc.client.rst Doc/library/xmlrpc.server.rst Doc/library/zipfile.rst Doc/library/zipimport.rst Doc/library/zlib.rst Doc/reference/simple_stmts.rst Doc/tools/sphinxext/pyspecific.py Doc/tools/sphinxext/static/basic.css Doc/tutorial/errors.rst Lib/threading.py Lib/traceback.py Lib/urllib/parse.py Lib/uu.py Lib/warnings.py Lib/wsgiref/util.py Lib/xml/dom/domreg.py Lib/xml/dom/minidom.py Lib/xml/sax/saxutils.py Lib/xmlrpc/client.py Lib/xmlrpc/server.py Lib/zipfile.py Message-ID: Author: georg.brandl Date: Wed Sep 16 18:05:59 2009 New Revision: 74836 Log: Merged revisions 74821,74828-74831,74833,74835 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ................ r74821 | georg.brandl | 2009-09-16 11:42:19 +0200 (Mi, 16 Sep 2009) | 1 line #6885: run python 3 as python3. ................ r74828 | georg.brandl | 2009-09-16 16:23:20 +0200 (Mi, 16 Sep 2009) | 1 line Use true booleans. ................ r74829 | georg.brandl | 2009-09-16 16:24:29 +0200 (Mi, 16 Sep 2009) | 1 line Small PEP8 correction. ................ r74830 | georg.brandl | 2009-09-16 16:36:22 +0200 (Mi, 16 Sep 2009) | 1 line Use true booleans. ................ r74831 | georg.brandl | 2009-09-16 17:54:04 +0200 (Mi, 16 Sep 2009) | 1 line Use true booleans and PEP8 for argdefaults. ................ r74833 | georg.brandl | 2009-09-16 17:58:14 +0200 (Mi, 16 Sep 2009) | 1 line Last round of adapting style of documenting argument default values. ................ r74835 | georg.brandl | 2009-09-16 18:00:31 +0200 (Mi, 16 Sep 2009) | 33 lines Merged revisions 74817-74820,74822-74824 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74817 | georg.brandl | 2009-09-16 11:05:11 +0200 (Mi, 16 Sep 2009) | 1 line Make deprecation notices as visible as warnings are right now. ........ r74818 | georg.brandl | 2009-09-16 11:23:04 +0200 (Mi, 16 Sep 2009) | 1 line #6880: add reference to classes section in exceptions section, which comes earlier. ........ r74819 | georg.brandl | 2009-09-16 11:24:57 +0200 (Mi, 16 Sep 2009) | 1 line #6876: fix base class constructor invocation in example. ........ r74820 | georg.brandl | 2009-09-16 11:30:48 +0200 (Mi, 16 Sep 2009) | 1 line #6891: comment out dead link to Unicode article. ........ r74822 | georg.brandl | 2009-09-16 12:12:06 +0200 (Mi, 16 Sep 2009) | 1 line #5621: refactor description of how class/instance attributes interact on a.x=a.x+1 or augassign. ........ r74823 | georg.brandl | 2009-09-16 15:06:22 +0200 (Mi, 16 Sep 2009) | 1 line Remove strange trailing commas. ........ r74824 | georg.brandl | 2009-09-16 15:11:06 +0200 (Mi, 16 Sep 2009) | 1 line #6892: fix optparse example involving help option. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/howto/unicode.rst python/branches/release31-maint/Doc/library/optparse.rst python/branches/release31-maint/Doc/library/pdb.rst python/branches/release31-maint/Doc/library/readline.rst python/branches/release31-maint/Doc/library/someos.rst python/branches/release31-maint/Doc/library/spwd.rst python/branches/release31-maint/Doc/library/ssl.rst python/branches/release31-maint/Doc/library/stat.rst python/branches/release31-maint/Doc/library/string.rst python/branches/release31-maint/Doc/library/stringprep.rst python/branches/release31-maint/Doc/library/strings.rst python/branches/release31-maint/Doc/library/struct.rst python/branches/release31-maint/Doc/library/subprocess.rst python/branches/release31-maint/Doc/library/sunau.rst python/branches/release31-maint/Doc/library/symbol.rst python/branches/release31-maint/Doc/library/sys.rst python/branches/release31-maint/Doc/library/syslog.rst python/branches/release31-maint/Doc/library/tabnanny.rst python/branches/release31-maint/Doc/library/tarfile.rst python/branches/release31-maint/Doc/library/telnetlib.rst python/branches/release31-maint/Doc/library/tempfile.rst python/branches/release31-maint/Doc/library/termios.rst python/branches/release31-maint/Doc/library/test.rst python/branches/release31-maint/Doc/library/textwrap.rst python/branches/release31-maint/Doc/library/threading.rst python/branches/release31-maint/Doc/library/time.rst python/branches/release31-maint/Doc/library/timeit.rst python/branches/release31-maint/Doc/library/tkinter.tix.rst python/branches/release31-maint/Doc/library/tkinter.ttk.rst python/branches/release31-maint/Doc/library/token.rst python/branches/release31-maint/Doc/library/trace.rst python/branches/release31-maint/Doc/library/traceback.rst python/branches/release31-maint/Doc/library/tty.rst python/branches/release31-maint/Doc/library/undoc.rst python/branches/release31-maint/Doc/library/unicodedata.rst python/branches/release31-maint/Doc/library/unittest.rst python/branches/release31-maint/Doc/library/unix.rst python/branches/release31-maint/Doc/library/urllib.error.rst python/branches/release31-maint/Doc/library/urllib.parse.rst python/branches/release31-maint/Doc/library/urllib.request.rst python/branches/release31-maint/Doc/library/uu.rst python/branches/release31-maint/Doc/library/uuid.rst python/branches/release31-maint/Doc/library/warnings.rst python/branches/release31-maint/Doc/library/wave.rst python/branches/release31-maint/Doc/library/weakref.rst python/branches/release31-maint/Doc/library/webbrowser.rst python/branches/release31-maint/Doc/library/winreg.rst python/branches/release31-maint/Doc/library/winsound.rst python/branches/release31-maint/Doc/library/wsgiref.rst python/branches/release31-maint/Doc/library/xdrlib.rst python/branches/release31-maint/Doc/library/xml.dom.minidom.rst python/branches/release31-maint/Doc/library/xml.dom.pulldom.rst python/branches/release31-maint/Doc/library/xml.dom.rst python/branches/release31-maint/Doc/library/xml.etree.elementtree.rst python/branches/release31-maint/Doc/library/xml.sax.handler.rst python/branches/release31-maint/Doc/library/xml.sax.reader.rst python/branches/release31-maint/Doc/library/xml.sax.rst python/branches/release31-maint/Doc/library/xml.sax.utils.rst python/branches/release31-maint/Doc/library/xmlrpc.client.rst python/branches/release31-maint/Doc/library/xmlrpc.server.rst python/branches/release31-maint/Doc/library/zipfile.rst python/branches/release31-maint/Doc/library/zipimport.rst python/branches/release31-maint/Doc/library/zlib.rst python/branches/release31-maint/Doc/reference/simple_stmts.rst python/branches/release31-maint/Doc/tools/sphinxext/pyspecific.py python/branches/release31-maint/Doc/tools/sphinxext/static/basic.css python/branches/release31-maint/Doc/tutorial/errors.rst python/branches/release31-maint/Lib/threading.py python/branches/release31-maint/Lib/traceback.py python/branches/release31-maint/Lib/urllib/parse.py python/branches/release31-maint/Lib/uu.py python/branches/release31-maint/Lib/warnings.py python/branches/release31-maint/Lib/wsgiref/util.py python/branches/release31-maint/Lib/xml/dom/domreg.py python/branches/release31-maint/Lib/xml/dom/minidom.py python/branches/release31-maint/Lib/xml/sax/saxutils.py python/branches/release31-maint/Lib/xmlrpc/client.py python/branches/release31-maint/Lib/xmlrpc/server.py python/branches/release31-maint/Lib/zipfile.py Modified: python/branches/release31-maint/Doc/howto/unicode.rst ============================================================================== --- python/branches/release31-maint/Doc/howto/unicode.rst (original) +++ python/branches/release31-maint/Doc/howto/unicode.rst Wed Sep 16 18:05:59 2009 @@ -212,11 +212,12 @@ to reading the Unicode character tables, available at . -Two other good introductory articles were written by Joel Spolsky - and Jason Orendorff -. If this introduction didn't make -things clear to you, you should try reading one of these alternate articles -before continuing. +Another good introductory article was written by Joel Spolsky +. +If this introduction didn't make things clear to you, you should try reading this +alternate article before continuing. + +.. Jason Orendorff XXX http://www.jorendorff.com/articles/unicode/ is broken Wikipedia entries are often helpful; see the entries for "character encoding" and UTF-8 Modified: python/branches/release31-maint/Doc/library/optparse.rst ============================================================================== --- python/branches/release31-maint/Doc/library/optparse.rst (original) +++ python/branches/release31-maint/Doc/library/optparse.rst Wed Sep 16 18:05:59 2009 @@ -467,7 +467,7 @@ action="store_false", dest="verbose", help="be vewwy quiet (I'm hunting wabbits)") parser.add_option("-f", "--filename", - metavar="FILE", help="write output to FILE"), + metavar="FILE", help="write output to FILE") parser.add_option("-m", "--mode", default="intermediate", help="interaction mode: novice, intermediate, " @@ -1014,12 +1014,15 @@ from optparse import OptionParser, SUPPRESS_HELP - parser = OptionParser() - parser.add_option("-h", "--help", action="help"), + # usually, a help option is added automatically, but that can + # be suppressed using the add_help_option argument + parser = OptionParser(add_help_option=False) + + parser.add_option("-h", "--help", action="help") parser.add_option("-v", action="store_true", dest="verbose", help="Be moderately verbose") parser.add_option("--file", dest="filename", - help="Input file to read data from"), + help="Input file to read data from") parser.add_option("--secret", help=SUPPRESS_HELP) If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, it Modified: python/branches/release31-maint/Doc/library/pdb.rst ============================================================================== --- python/branches/release31-maint/Doc/library/pdb.rst (original) +++ python/branches/release31-maint/Doc/library/pdb.rst Wed Sep 16 18:05:59 2009 @@ -41,7 +41,7 @@ :file:`pdb.py` can also be invoked as a script to debug other scripts. For example:: - python -m pdb myscript.py + python3 -m pdb myscript.py When invoked as a script, pdb will automatically enter post-mortem debugging if the program being debugged exits abnormally. After post-mortem debugging (or Modified: python/branches/release31-maint/Doc/library/readline.rst ============================================================================== --- python/branches/release31-maint/Doc/library/readline.rst (original) +++ python/branches/release31-maint/Doc/library/readline.rst Wed Sep 16 18:05:59 2009 @@ -206,7 +206,7 @@ class HistoryConsole(code.InteractiveConsole): def __init__(self, locals=None, filename="", histfile=os.path.expanduser("~/.console-history")): - code.InteractiveConsole.__init__(self) + code.InteractiveConsole.__init__(self, locals, filename) self.init_history(histfile) def init_history(self, histfile): Modified: python/branches/release31-maint/Doc/library/someos.rst ============================================================================== --- python/branches/release31-maint/Doc/library/someos.rst (original) +++ python/branches/release31-maint/Doc/library/someos.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - .. _someos: ********************************** @@ -8,7 +7,7 @@ The modules described in this chapter provide interfaces to operating system features that are available on selected operating systems only. The interfaces are generally modeled after the Unix or C interfaces but they are available on -some other systems as well (e.g. Windows or NT). Here's an overview: +some other systems as well (e.g. Windows). Here's an overview: .. toctree:: Modified: python/branches/release31-maint/Doc/library/spwd.rst ============================================================================== --- python/branches/release31-maint/Doc/library/spwd.rst (original) +++ python/branches/release31-maint/Doc/library/spwd.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`spwd` --- The shadow password database ============================================ @@ -48,7 +47,7 @@ The sp_nam and sp_pwd items are strings, all others are integers. :exc:`KeyError` is raised if the entry asked for cannot be found. -It defines the following items: +The following functions are defined: .. function:: getspnam(name) Modified: python/branches/release31-maint/Doc/library/ssl.rst ============================================================================== --- python/branches/release31-maint/Doc/library/ssl.rst (original) +++ python/branches/release31-maint/Doc/library/ssl.rst Wed Sep 16 18:05:59 2009 @@ -1,6 +1,5 @@ - :mod:`ssl` --- SSL wrapper for socket objects -==================================================================== +============================================= .. module:: ssl :synopsis: SSL wrapper for socket objects @@ -13,32 +12,29 @@ .. index:: TLS, SSL, Transport Layer Security, Secure Sockets Layer -This module provides access to Transport Layer Security (often known -as "Secure Sockets Layer") encryption and peer authentication -facilities for network sockets, both client-side and server-side. -This module uses the OpenSSL library. It is available on all modern -Unix systems, Windows, Mac OS X, and probably additional -platforms, as long as OpenSSL is installed on that platform. +This module provides access to Transport Layer Security (often known as "Secure +Sockets Layer") encryption and peer authentication facilities for network +sockets, both client-side and server-side. This module uses the OpenSSL +library. It is available on all modern Unix systems, Windows, Mac OS X, and +probably additional platforms, as long as OpenSSL is installed on that platform. .. note:: - Some behavior may be platform dependent, since calls are made to the operating - system socket APIs. The installed version of OpenSSL may also cause - variations in behavior. - -This section documents the objects and functions in the ``ssl`` module; -for more general information about TLS, SSL, and certificates, the -reader is referred to the documents in the "See Also" section at -the bottom. - -This module provides a class, :class:`ssl.SSLSocket`, which is -derived from the :class:`socket.socket` type, and provides -a socket-like wrapper that also encrypts and decrypts the data -going over the socket with SSL. It supports additional -:meth:`read` and :meth:`write` methods, along with a method, :meth:`getpeercert`, -to retrieve the certificate of the other side of the connection, and -a method, :meth:`cipher`, to retrieve the cipher being used for the -secure connection. + Some behavior may be platform dependent, since calls are made to the + operating system socket APIs. The installed version of OpenSSL may also + cause variations in behavior. + +This section documents the objects and functions in the ``ssl`` module; for more +general information about TLS, SSL, and certificates, the reader is referred to +the documents in the "See Also" section at the bottom. + +This module provides a class, :class:`ssl.SSLSocket`, which is derived from the +:class:`socket.socket` type, and provides a socket-like wrapper that also +encrypts and decrypts the data going over the socket with SSL. It supports +additional :meth:`read` and :meth:`write` methods, along with a method, +:meth:`getpeercert`, to retrieve the certificate of the other side of the +connection, and a method, :meth:`cipher`, to retrieve the cipher being used for +the secure connection. Functions, Constants, and Exceptions ------------------------------------ @@ -46,31 +42,33 @@ .. exception:: SSLError Raised to signal an error from the underlying SSL implementation. This - signifies some problem in the higher-level - encryption and authentication layer that's superimposed on the underlying - network connection. This error is a subtype of :exc:`socket.error`, which - in turn is a subtype of :exc:`IOError`. - -.. function:: wrap_socket (sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version={see docs}, ca_certs=None, do_handshake_on_connect=True, suppress_ragged_eofs=True) - - Takes an instance ``sock`` of :class:`socket.socket`, and returns an instance of :class:`ssl.SSLSocket`, a subtype - of :class:`socket.socket`, which wraps the underlying socket in an SSL context. - For client-side sockets, the context construction is lazy; if the underlying socket isn't - connected yet, the context construction will be performed after :meth:`connect` is called - on the socket. For server-side sockets, if the socket has no remote peer, it is assumed - to be a listening socket, and the server-side SSL wrapping is automatically performed - on client connections accepted via the :meth:`accept` method. :func:`wrap_socket` may - raise :exc:`SSLError`. - - The ``keyfile`` and ``certfile`` parameters specify optional files which contain a certificate - to be used to identify the local side of the connection. See the discussion of :ref:`ssl-certificates` - for more information on how the certificate is stored in the ``certfile``. - - Often the private key is stored - in the same file as the certificate; in this case, only the ``certfile`` parameter need be - passed. If the private key is stored in a separate file, both parameters must be used. - If the private key is stored in the ``certfile``, it should come before the first certificate - in the certificate chain:: + signifies some problem in the higher-level encryption and authentication + layer that's superimposed on the underlying network connection. This error + is a subtype of :exc:`socket.error`, which in turn is a subtype of + :exc:`IOError`. + +.. function:: wrap_socket(sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version={see docs}, ca_certs=None, do_handshake_on_connect=True, suppress_ragged_eofs=True) + + Takes an instance ``sock`` of :class:`socket.socket`, and returns an instance + of :class:`ssl.SSLSocket`, a subtype of :class:`socket.socket`, which wraps + the underlying socket in an SSL context. For client-side sockets, the + context construction is lazy; if the underlying socket isn't connected yet, + the context construction will be performed after :meth:`connect` is called on + the socket. For server-side sockets, if the socket has no remote peer, it is + assumed to be a listening socket, and the server-side SSL wrapping is + automatically performed on client connections accepted via the :meth:`accept` + method. :func:`wrap_socket` may raise :exc:`SSLError`. + + The ``keyfile`` and ``certfile`` parameters specify optional files which + contain a certificate to be used to identify the local side of the + connection. See the discussion of :ref:`ssl-certificates` for more + information on how the certificate is stored in the ``certfile``. + + Often the private key is stored in the same file as the certificate; in this + case, only the ``certfile`` parameter need be passed. If the private key is + stored in a separate file, both parameters must be used. If the private key + is stored in the ``certfile``, it should come before the first certificate in + the certificate chain:: -----BEGIN RSA PRIVATE KEY----- ... (private key in base64 encoding) ... @@ -79,31 +77,33 @@ ... (certificate in base64 PEM encoding) ... -----END CERTIFICATE----- - The parameter ``server_side`` is a boolean which identifies whether server-side or client-side - behavior is desired from this socket. + The parameter ``server_side`` is a boolean which identifies whether + server-side or client-side behavior is desired from this socket. - The parameter ``cert_reqs`` specifies whether a certificate is - required from the other side of the connection, and whether it will - be validated if provided. It must be one of the three values - :const:`CERT_NONE` (certificates ignored), :const:`CERT_OPTIONAL` (not required, - but validated if provided), or :const:`CERT_REQUIRED` (required and - validated). If the value of this parameter is not :const:`CERT_NONE`, then - the ``ca_certs`` parameter must point to a file of CA certificates. - - The ``ca_certs`` file contains a set of concatenated "certification authority" certificates, - which are used to validate certificates passed from the other end of the connection. - See the discussion of :ref:`ssl-certificates` for more information about how to arrange - the certificates in this file. - - The parameter ``ssl_version`` specifies which version of the SSL protocol to use. - Typically, the server chooses a particular protocol version, and the client - must adapt to the server's choice. Most of the versions are not interoperable - with the other versions. If not specified, for client-side operation, the - default SSL version is SSLv3; for server-side operation, SSLv23. These - version selections provide the most compatibility with other versions. + The parameter ``cert_reqs`` specifies whether a certificate is required from + the other side of the connection, and whether it will be validated if + provided. It must be one of the three values :const:`CERT_NONE` + (certificates ignored), :const:`CERT_OPTIONAL` (not required, but validated + if provided), or :const:`CERT_REQUIRED` (required and validated). If the + value of this parameter is not :const:`CERT_NONE`, then the ``ca_certs`` + parameter must point to a file of CA certificates. + + The ``ca_certs`` file contains a set of concatenated "certification + authority" certificates, which are used to validate certificates passed from + the other end of the connection. See the discussion of + :ref:`ssl-certificates` for more information about how to arrange the + certificates in this file. + + The parameter ``ssl_version`` specifies which version of the SSL protocol to + use. Typically, the server chooses a particular protocol version, and the + client must adapt to the server's choice. Most of the versions are not + interoperable with the other versions. If not specified, for client-side + operation, the default SSL version is SSLv3; for server-side operation, + SSLv23. These version selections provide the most compatibility with other + versions. - Here's a table showing which versions in a client (down the side) - can connect to which versions in a server (along the top): + Here's a table showing which versions in a client (down the side) can connect + to which versions in a server (along the top): .. table:: @@ -116,51 +116,52 @@ *TLSv1* no no yes yes ======================== ========= ========= ========== ========= - In some older versions of OpenSSL (for instance, 0.9.7l on OS X 10.4), - an SSLv2 client could not connect to an SSLv23 server. + In some older versions of OpenSSL (for instance, 0.9.7l on OS X 10.4), an + SSLv2 client could not connect to an SSLv23 server. The parameter ``do_handshake_on_connect`` specifies whether to do the SSL handshake automatically after doing a :meth:`socket.connect`, or whether the - application program will call it explicitly, by invoking the :meth:`SSLSocket.do_handshake` - method. Calling :meth:`SSLSocket.do_handshake` explicitly gives the program control over - the blocking behavior of the socket I/O involved in the handshake. - - The parameter ``suppress_ragged_eofs`` specifies how the :meth:`SSLSocket.read` - method should signal unexpected EOF from the other end of the connection. If specified - as :const:`True` (the default), it returns a normal EOF in response to unexpected - EOF errors raised from the underlying socket; if :const:`False`, it will raise - the exceptions back to the caller. + application program will call it explicitly, by invoking the + :meth:`SSLSocket.do_handshake` method. Calling + :meth:`SSLSocket.do_handshake` explicitly gives the program control over the + blocking behavior of the socket I/O involved in the handshake. + + The parameter ``suppress_ragged_eofs`` specifies how the + :meth:`SSLSocket.read` method should signal unexpected EOF from the other end + of the connection. If specified as :const:`True` (the default), it returns a + normal EOF in response to unexpected EOF errors raised from the underlying + socket; if :const:`False`, it will raise the exceptions back to the caller. .. function:: RAND_status() - Returns True if the SSL pseudo-random number generator has been - seeded with 'enough' randomness, and False otherwise. You can use - :func:`ssl.RAND_egd` and :func:`ssl.RAND_add` to increase the randomness - of the pseudo-random number generator. + Returns True if the SSL pseudo-random number generator has been seeded with + 'enough' randomness, and False otherwise. You can use :func:`ssl.RAND_egd` + and :func:`ssl.RAND_add` to increase the randomness of the pseudo-random + number generator. .. function:: RAND_egd(path) If you are running an entropy-gathering daemon (EGD) somewhere, and ``path`` - is the pathname of a socket connection open to it, this will read - 256 bytes of randomness from the socket, and add it to the SSL pseudo-random number generator - to increase the security of generated secret keys. This is typically only - necessary on systems without better sources of randomness. + is the pathname of a socket connection open to it, this will read 256 bytes + of randomness from the socket, and add it to the SSL pseudo-random number + generator to increase the security of generated secret keys. This is + typically only necessary on systems without better sources of randomness. - See http://egd.sourceforge.net/ or http://prngd.sourceforge.net/ for - sources of entropy-gathering daemons. + See http://egd.sourceforge.net/ or http://prngd.sourceforge.net/ for sources + of entropy-gathering daemons. .. function:: RAND_add(bytes, entropy) - Mixes the given ``bytes`` into the SSL pseudo-random number generator. - The parameter ``entropy`` (a float) is a lower bound on the entropy - contained in string (so you can always use :const:`0.0`). - See :rfc:`1750` for more information on sources of entropy. + Mixes the given ``bytes`` into the SSL pseudo-random number generator. The + parameter ``entropy`` (a float) is a lower bound on the entropy contained in + string (so you can always use :const:`0.0`). See :rfc:`1750` for more + information on sources of entropy. .. function:: cert_time_to_seconds(timestring) - Returns a floating-point value containing a normal seconds-after-the-epoch time - value, given the time-string representing the "notBefore" or "notAfter" date - from a certificate. + Returns a floating-point value containing a normal seconds-after-the-epoch + time value, given the time-string representing the "notBefore" or "notAfter" + date from a certificate. Here's an example:: @@ -172,50 +173,47 @@ 'Wed May 9 00:00:00 2007' >>> -.. function:: get_server_certificate (addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None) +.. function:: get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None) - Given the address ``addr`` of an SSL-protected server, as a - (*hostname*, *port-number*) pair, fetches the server's certificate, - and returns it as a PEM-encoded string. If ``ssl_version`` is - specified, uses that version of the SSL protocol to attempt to - connect to the server. If ``ca_certs`` is specified, it should be - a file containing a list of root certificates, the same format as - used for the same parameter in :func:`wrap_socket`. The call will - attempt to validate the server certificate against that set of root + Given the address ``addr`` of an SSL-protected server, as a (*hostname*, + *port-number*) pair, fetches the server's certificate, and returns it as a + PEM-encoded string. If ``ssl_version`` is specified, uses that version of + the SSL protocol to attempt to connect to the server. If ``ca_certs`` is + specified, it should be a file containing a list of root certificates, the + same format as used for the same parameter in :func:`wrap_socket`. The call + will attempt to validate the server certificate against that set of root certificates, and will fail if the validation attempt fails. -.. function:: DER_cert_to_PEM_cert (DER_cert_bytes) +.. function:: DER_cert_to_PEM_cert(DER_cert_bytes) Given a certificate as a DER-encoded blob of bytes, returns a PEM-encoded string version of the same certificate. -.. function:: PEM_cert_to_DER_cert (PEM_cert_string) +.. function:: PEM_cert_to_DER_cert(PEM_cert_string) - Given a certificate as an ASCII PEM string, returns a DER-encoded - sequence of bytes for that same certificate. + Given a certificate as an ASCII PEM string, returns a DER-encoded sequence of + bytes for that same certificate. .. data:: CERT_NONE - Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` - when no certificates will be required or validated from the other - side of the socket connection. + Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` when no + certificates will be required or validated from the other side of the socket + connection. .. data:: CERT_OPTIONAL - Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` - when no certificates will be required from the other side of the - socket connection, but if they are provided, will be validated. - Note that use of this setting requires a valid certificate - validation file also be passed as a value of the ``ca_certs`` - parameter. + Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` when no + certificates will be required from the other side of the socket connection, + but if they are provided, will be validated. Note that use of this setting + requires a valid certificate validation file also be passed as a value of the + ``ca_certs`` parameter. .. data:: CERT_REQUIRED - Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` - when certificates will be required from the other side of the - socket connection. Note that use of this setting requires a valid certificate - validation file also be passed as a value of the ``ca_certs`` - parameter. + Value to pass to the ``cert_reqs`` parameter to :func:`sslobject` when + certificates will be required from the other side of the socket connection. + Note that use of this setting requires a valid certificate validation file + also be passed as a value of the ``ca_certs`` parameter. .. data:: PROTOCOL_SSLv2 @@ -223,22 +221,21 @@ .. data:: PROTOCOL_SSLv23 - Selects SSL version 2 or 3 as the channel encryption protocol. - This is a setting to use with servers for maximum compatibility - with the other end of an SSL connection, but it may cause the - specific ciphers chosen for the encryption to be of fairly low - quality. + Selects SSL version 2 or 3 as the channel encryption protocol. This is a + setting to use with servers for maximum compatibility with the other end of + an SSL connection, but it may cause the specific ciphers chosen for the + encryption to be of fairly low quality. .. data:: PROTOCOL_SSLv3 - Selects SSL version 3 as the channel encryption protocol. - For clients, this is the maximally compatible SSL variant. + Selects SSL version 3 as the channel encryption protocol. For clients, this + is the maximally compatible SSL variant. .. data:: PROTOCOL_TLSv1 - Selects TLS version 1 as the channel encryption protocol. This is - the most modern version, and probably the best choice for maximum - protection, if both sides can speak it. + Selects TLS version 1 as the channel encryption protocol. This is the most + modern version, and probably the best choice for maximum protection, if both + sides can speak it. SSLSocket Objects @@ -247,25 +244,23 @@ .. method:: SSLSocket.read(nbytes=1024, buffer=None) Reads up to ``nbytes`` bytes from the SSL-encrypted channel and returns them. - If the ``buffer`` is specified, it will attempt to read into the buffer - the minimum of the size of the buffer and ``nbytes``, if that is specified. - If no buffer is specified, an immutable buffer is allocated and returned - with the data read from the socket. + If the ``buffer`` is specified, it will attempt to read into the buffer the + minimum of the size of the buffer and ``nbytes``, if that is specified. If + no buffer is specified, an immutable buffer is allocated and returned with + the data read from the socket. .. method:: SSLSocket.write(data) - Writes the ``data`` to the other side of the connection, using the - SSL channel to encrypt. Returns the number of bytes written. + Writes the ``data`` to the other side of the connection, using the SSL + channel to encrypt. Returns the number of bytes written. .. method:: SSLSocket.do_handshake() - Performs the SSL setup handshake. If the socket is non-blocking, - this method may raise :exc:`SSLError` with the value of the exception - instance's ``args[0]`` - being either :const:`SSL_ERROR_WANT_READ` or - :const:`SSL_ERROR_WANT_WRITE`, and should be called again until - it stops raising those exceptions. Here's an example of how to do - that:: + Performs the SSL setup handshake. If the socket is non-blocking, this method + may raise :exc:`SSLError` with the value of the exception instance's + ``args[0]`` being either :const:`SSL_ERROR_WANT_READ` or + :const:`SSL_ERROR_WANT_WRITE`, and should be called again until it stops + raising those exceptions. Here's an example of how to do that:: while True: try: @@ -281,34 +276,31 @@ .. method:: SSLSocket.unwrap() - Performs the SSL shutdown handshake, which removes the TLS layer - from the underlying socket, and returns the underlying socket - object. This can be used to go from encrypted operation over a - connection to unencrypted. The returned socket should always be - used for further communication with the other side of the - connection, rather than the original socket + Performs the SSL shutdown handshake, which removes the TLS layer from the + underlying socket, and returns the underlying socket object. This can be + used to go from encrypted operation over a connection to unencrypted. The + returned socket should always be used for further communication with the + other side of the connection, rather than the original socket .. method:: SSLSocket.getpeercert(binary_form=False) - If there is no certificate for the peer on the other end of the - connection, returns ``None``. + If there is no certificate for the peer on the other end of the connection, + returns ``None``. - If the parameter ``binary_form`` is :const:`False`, and a - certificate was received from the peer, this method returns a - :class:`dict` instance. If the certificate was not validated, the - dict is empty. If the certificate was validated, it returns a dict - with the keys ``subject`` (the principal for which the certificate - was issued), and ``notAfter`` (the time after which the certificate - should not be trusted). The certificate was already validated, so - the ``notBefore`` and ``issuer`` fields are not returned. If a - certificate contains an instance of the *Subject Alternative Name* - extension (see :rfc:`3280`), there will also be a - ``subjectAltName`` key in the dictionary. + If the parameter ``binary_form`` is :const:`False`, and a certificate was + received from the peer, this method returns a :class:`dict` instance. If the + certificate was not validated, the dict is empty. If the certificate was + validated, it returns a dict with the keys ``subject`` (the principal for + which the certificate was issued), and ``notAfter`` (the time after which the + certificate should not be trusted). The certificate was already validated, + so the ``notBefore`` and ``issuer`` fields are not returned. If a + certificate contains an instance of the *Subject Alternative Name* extension + (see :rfc:`3280`), there will also be a ``subjectAltName`` key in the + dictionary. The "subject" field is a tuple containing the sequence of relative - distinguished names (RDNs) given in the certificate's data - structure for the principal, and each RDN is a sequence of - name-value pairs:: + distinguished names (RDNs) given in the certificate's data structure for the + principal, and each RDN is a sequence of name-value pairs:: {'notAfter': 'Feb 16 16:54:50 2013 GMT', 'subject': ((('countryName', 'US'),), @@ -318,31 +310,28 @@ (('organizationalUnitName', 'SSL'),), (('commonName', 'somemachine.python.org'),))} - If the ``binary_form`` parameter is :const:`True`, and a - certificate was provided, this method returns the DER-encoded form - of the entire certificate as a sequence of bytes, or :const:`None` if the - peer did not provide a certificate. This return - value is independent of validation; if validation was required - (:const:`CERT_OPTIONAL` or :const:`CERT_REQUIRED`), it will have + If the ``binary_form`` parameter is :const:`True`, and a certificate was + provided, this method returns the DER-encoded form of the entire certificate + as a sequence of bytes, or :const:`None` if the peer did not provide a + certificate. This return value is independent of validation; if validation + was required (:const:`CERT_OPTIONAL` or :const:`CERT_REQUIRED`), it will have been validated, but if :const:`CERT_NONE` was used to establish the connection, the certificate, if present, will not have been validated. .. method:: SSLSocket.cipher() - Returns a three-value tuple containing the name of the cipher being - used, the version of the SSL protocol that defines its use, and the - number of secret bits being used. If no connection has been - established, returns ``None``. + Returns a three-value tuple containing the name of the cipher being used, the + version of the SSL protocol that defines its use, and the number of secret + bits being used. If no connection has been established, returns ``None``. .. method:: SSLSocket.unwrap() - Performs the SSL shutdown handshake, which removes the TLS layer - from the underlying socket, and returns the underlying socket - object. This can be used to go from encrypted operation over a - connection to unencrypted. The returned socket should always be - used for further communication with the other side of the - connection, rather than the original socket + Performs the SSL shutdown handshake, which removes the TLS layer from the + underlying socket, and returns the underlying socket object. This can be + used to go from encrypted operation over a connection to unencrypted. The + returned socket should always be used for further communication with the + other side of the connection, rather than the original socket. .. index:: single: certificates @@ -353,57 +342,54 @@ Certificates ------------ -Certificates in general are part of a public-key / private-key system. In this system, each *principal*, -(which may be a machine, or a person, or an organization) is assigned a unique two-part encryption key. -One part of the key is public, and is called the *public key*; the other part is kept secret, and is called -the *private key*. The two parts are related, in that if you encrypt a message with one of the parts, you can -decrypt it with the other part, and **only** with the other part. - -A certificate contains information about two principals. It contains -the name of a *subject*, and the subject's public key. It also -contains a statement by a second principal, the *issuer*, that the -subject is who he claims to be, and that this is indeed the subject's -public key. The issuer's statement is signed with the issuer's -private key, which only the issuer knows. However, anyone can verify -the issuer's statement by finding the issuer's public key, decrypting -the statement with it, and comparing it to the other information in -the certificate. The certificate also contains information about the -time period over which it is valid. This is expressed as two fields, -called "notBefore" and "notAfter". - -In the Python use of certificates, a client or server -can use a certificate to prove who they are. The other -side of a network connection can also be required to produce a certificate, -and that certificate can be validated to the satisfaction -of the client or server that requires such validation. -The connection attempt can be set to raise an exception if -the validation fails. Validation is done -automatically, by the underlying OpenSSL framework; the -application need not concern itself with its mechanics. -But the application does usually need to provide -sets of certificates to allow this process to take place. - -Python uses files to contain certificates. They should be formatted -as "PEM" (see :rfc:`1422`), which is a base-64 encoded form wrapped -with a header line and a footer line:: +Certificates in general are part of a public-key / private-key system. In this +system, each *principal*, (which may be a machine, or a person, or an +organization) is assigned a unique two-part encryption key. One part of the key +is public, and is called the *public key*; the other part is kept secret, and is +called the *private key*. The two parts are related, in that if you encrypt a +message with one of the parts, you can decrypt it with the other part, and +**only** with the other part. + +A certificate contains information about two principals. It contains the name +of a *subject*, and the subject's public key. It also contains a statement by a +second principal, the *issuer*, that the subject is who he claims to be, and +that this is indeed the subject's public key. The issuer's statement is signed +with the issuer's private key, which only the issuer knows. However, anyone can +verify the issuer's statement by finding the issuer's public key, decrypting the +statement with it, and comparing it to the other information in the certificate. +The certificate also contains information about the time period over which it is +valid. This is expressed as two fields, called "notBefore" and "notAfter". + +In the Python use of certificates, a client or server can use a certificate to +prove who they are. The other side of a network connection can also be required +to produce a certificate, and that certificate can be validated to the +satisfaction of the client or server that requires such validation. The +connection attempt can be set to raise an exception if the validation fails. +Validation is done automatically, by the underlying OpenSSL framework; the +application need not concern itself with its mechanics. But the application +does usually need to provide sets of certificates to allow this process to take +place. + +Python uses files to contain certificates. They should be formatted as "PEM" +(see :rfc:`1422`), which is a base-64 encoded form wrapped with a header line +and a footer line:: -----BEGIN CERTIFICATE----- ... (certificate in base64 PEM encoding) ... -----END CERTIFICATE----- -The Python files which contain certificates can contain a sequence -of certificates, sometimes called a *certificate chain*. This chain -should start with the specific certificate for the principal who "is" -the client or server, and then the certificate for the issuer of that -certificate, and then the certificate for the issuer of *that* certificate, -and so on up the chain till you get to a certificate which is *self-signed*, -that is, a certificate which has the same subject and issuer, -sometimes called a *root certificate*. The certificates should just -be concatenated together in the certificate file. For example, suppose -we had a three certificate chain, from our server certificate to the -certificate of the certification authority that signed our server certificate, -to the root certificate of the agency which issued the certification authority's -certificate:: +The Python files which contain certificates can contain a sequence of +certificates, sometimes called a *certificate chain*. This chain should start +with the specific certificate for the principal who "is" the client or server, +and then the certificate for the issuer of that certificate, and then the +certificate for the issuer of *that* certificate, and so on up the chain till +you get to a certificate which is *self-signed*, that is, a certificate which +has the same subject and issuer, sometimes called a *root certificate*. The +certificates should just be concatenated together in the certificate file. For +example, suppose we had a three certificate chain, from our server certificate +to the certificate of the certification authority that signed our server +certificate, to the root certificate of the agency which issued the +certification authority's certificate:: -----BEGIN CERTIFICATE----- ... (certificate for your server)... @@ -417,32 +403,29 @@ If you are going to require validation of the other side of the connection's certificate, you need to provide a "CA certs" file, filled with the certificate -chains for each issuer you are willing to trust. Again, this file just -contains these chains concatenated together. For validation, Python will -use the first chain it finds in the file which matches. -Some "standard" root certificates are available from various certification -authorities: -`CACert.org `_, -`Thawte `_, -`Verisign `_, -`Positive SSL `_ (used by python.org), -`Equifax and GeoTrust `_. - -In general, if you are using -SSL3 or TLS1, you don't need to put the full chain in your "CA certs" file; -you only need the root certificates, and the remote peer is supposed to -furnish the other certificates necessary to chain from its certificate to -a root certificate. -See :rfc:`4158` for more discussion of the way in which -certification chains can be built. - -If you are going to create a server that provides SSL-encrypted -connection services, you will need to acquire a certificate for that -service. There are many ways of acquiring appropriate certificates, -such as buying one from a certification authority. Another common -practice is to generate a self-signed certificate. The simplest -way to do this is with the OpenSSL package, using something like -the following:: +chains for each issuer you are willing to trust. Again, this file just contains +these chains concatenated together. For validation, Python will use the first +chain it finds in the file which matches. Some "standard" root certificates are +available from various certification authorities: `CACert.org +`_, `Thawte +`_, `Verisign +`_, `Positive SSL +`_ +(used by python.org), `Equifax and GeoTrust +`_. + +In general, if you are using SSL3 or TLS1, you don't need to put the full chain +in your "CA certs" file; you only need the root certificates, and the remote +peer is supposed to furnish the other certificates necessary to chain from its +certificate to a root certificate. See :rfc:`4158` for more discussion of the +way in which certification chains can be built. + +If you are going to create a server that provides SSL-encrypted connection +services, you will need to acquire a certificate for that service. There are +many ways of acquiring appropriate certificates, such as buying one from a +certification authority. Another common practice is to generate a self-signed +certificate. The simplest way to do this is with the OpenSSL package, using +something like the following:: % openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem Generating a 1024 bit RSA private key @@ -466,9 +449,9 @@ Email Address []:ops at myserver.mygroup.myorganization.com % -The disadvantage of a self-signed certificate is that it is its -own root certificate, and no one else will have it in their cache -of known (and trusted) root certificates. +The disadvantage of a self-signed certificate is that it is its own root +certificate, and no one else will have it in their cache of known (and trusted) +root certificates. Examples @@ -477,7 +460,8 @@ Testing for SSL support ^^^^^^^^^^^^^^^^^^^^^^^ -To test for the presence of SSL support in a Python installation, user code should use the following idiom:: +To test for the presence of SSL support in a Python installation, user code +should use the following idiom:: try: import ssl @@ -489,8 +473,8 @@ Client-side operation ^^^^^^^^^^^^^^^^^^^^^ -This example connects to an SSL server, prints the server's address and certificate, -sends some bytes, and reads part of the response:: +This example connects to an SSL server, prints the server's address and +certificate, sends some bytes, and reads part of the response:: import socket, ssl, pprint @@ -518,8 +502,8 @@ # note that closing the SSLSocket will also close the underlying socket ssl_sock.close() -As of September 6, 2007, the certificate printed by this program -looked like this:: +As of September 6, 2007, the certificate printed by this program looked like +this:: {'notAfter': 'May 8 23:59:59 2009 GMT', 'subject': ((('serialNumber', '2497886'),), @@ -542,9 +526,9 @@ Server-side operation ^^^^^^^^^^^^^^^^^^^^^ -For server operation, typically you'd need to have a server certificate, and private key, each in a file. -You'd open a socket, bind it to a port, call :meth:`listen` on it, then start waiting for clients -to connect:: +For server operation, typically you'd need to have a server certificate, and +private key, each in a file. You'd open a socket, bind it to a port, call +:meth:`listen` on it, then start waiting for clients to connect:: import socket, ssl @@ -552,8 +536,9 @@ bindsocket.bind(('myaddr.mydomain.com', 10023)) bindsocket.listen(5) -When one did, you'd call :meth:`accept` on the socket to get the new socket from the other -end, and use :func:`wrap_socket` to create a server-side SSL context for it:: +When one did, you'd call :meth:`accept` on the socket to get the new socket from +the other end, and use :func:`wrap_socket` to create a server-side SSL context +for it:: while True: newsocket, fromaddr = bindsocket.accept() @@ -564,7 +549,8 @@ ssl_version=ssl.PROTOCOL_TLSv1) deal_with_client(connstream) -Then you'd read data from the ``connstream`` and do something with it till you are finished with the client (or the client is finished with you):: +Then you'd read data from the ``connstream`` and do something with it till you +are finished with the client (or the client is finished with you):: def deal_with_client(connstream): 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 Wed Sep 16 18:05:59 2009 @@ -1,9 +1,9 @@ - :mod:`stat` --- Interpreting :func:`stat` results ================================================= .. module:: stat - :synopsis: Utilities for interpreting the results of os.stat(), os.lstat() and os.fstat(). + :synopsis: Utilities for interpreting the results of os.stat(), + os.lstat() and os.fstat(). .. sectionauthor:: Skip Montanaro 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 Wed Sep 16 18:05:59 2009 @@ -479,19 +479,19 @@ The constructor takes a single argument which is the template string. - .. method:: substitute(mapping[, **kws]) + .. method:: substitute(mapping, **kwds) Performs the template substitution, returning a new string. *mapping* is any dictionary-like object with keys that match the placeholders in the template. Alternatively, you can provide keyword arguments, where the - keywords are the placeholders. When both *mapping* and *kws* are given - and there are duplicates, the placeholders from *kws* take precedence. + keywords are the placeholders. When both *mapping* and *kwds* are given + and there are duplicates, the placeholders from *kwds* take precedence. - .. method:: safe_substitute(mapping[, **kws]) + .. method:: safe_substitute(mapping, **kwds) Like :meth:`substitute`, except that if placeholders are missing from - *mapping* and *kws*, instead of raising a :exc:`KeyError` exception, the + *mapping* and *kwds*, instead of raising a :exc:`KeyError` exception, the original placeholder will appear in the resulting string intact. Also, unlike with :meth:`substitute`, any other appearances of the ``$`` will simply return ``$`` instead of raising :exc:`ValueError`. Modified: python/branches/release31-maint/Doc/library/stringprep.rst ============================================================================== --- python/branches/release31-maint/Doc/library/stringprep.rst (original) +++ python/branches/release31-maint/Doc/library/stringprep.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`stringprep` --- Internet String Preparation ================================================= Modified: python/branches/release31-maint/Doc/library/strings.rst ============================================================================== --- python/branches/release31-maint/Doc/library/strings.rst (original) +++ python/branches/release31-maint/Doc/library/strings.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - .. _stringservices: *************** Modified: python/branches/release31-maint/Doc/library/struct.rst ============================================================================== --- python/branches/release31-maint/Doc/library/struct.rst (original) +++ python/branches/release31-maint/Doc/library/struct.rst Wed Sep 16 18:05:59 2009 @@ -1,6 +1,5 @@ - :mod:`struct` --- Interpret bytes as packed binary data -========================================================= +======================================================= .. module:: struct :synopsis: Interpret bytes as packed binary data. @@ -46,7 +45,7 @@ (``len(bytes)`` must equal ``calcsize(fmt)``). -.. function:: unpack_from(fmt, buffer[,offset=0]) +.. function:: unpack_from(fmt, buffer, offset=0) Unpack the *buffer* according to the given format. The result is a tuple even if it contains exactly one item. The *buffer* must contain at least the amount @@ -286,7 +285,7 @@ (``len(bytes)`` must equal :attr:`self.size`). - .. method:: unpack_from(buffer[, offset=0]) + .. method:: unpack_from(buffer, offset=0) Identical to the :func:`unpack_from` function, using the compiled format. (``len(buffer[offset:])`` must be at least :attr:`self.size`). Modified: python/branches/release31-maint/Doc/library/subprocess.rst ============================================================================== --- python/branches/release31-maint/Doc/library/subprocess.rst (original) +++ python/branches/release31-maint/Doc/library/subprocess.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`subprocess` --- Subprocess management =========================================== @@ -121,9 +120,10 @@ .. note:: - This feature is only available if Python is built with universal newline support - (the default). Also, the newlines attribute of the file objects :attr:`stdout`, - :attr:`stdin` and :attr:`stderr` are not updated by the :meth:`communicate` method. + This feature is only available if Python is built with universal newline + support (the default). Also, the newlines attribute of the file objects + :attr:`stdout`, :attr:`stdin` and :attr:`stderr` are not updated by the + :meth:`communicate` method. The *startupinfo* and *creationflags*, if given, will be passed to the underlying CreateProcess() function. They can specify things such as appearance Modified: python/branches/release31-maint/Doc/library/sunau.rst ============================================================================== --- python/branches/release31-maint/Doc/library/sunau.rst (original) +++ python/branches/release31-maint/Doc/library/sunau.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`sunau` --- Read and write Sun AU files ============================================ Modified: python/branches/release31-maint/Doc/library/symbol.rst ============================================================================== --- python/branches/release31-maint/Doc/library/symbol.rst (original) +++ python/branches/release31-maint/Doc/library/symbol.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`symbol` --- Constants used with Python parse trees ======================================================== Modified: python/branches/release31-maint/Doc/library/sys.rst ============================================================================== --- python/branches/release31-maint/Doc/library/sys.rst (original) +++ python/branches/release31-maint/Doc/library/sys.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`sys` --- System-specific parameters and functions ======================================================= Modified: python/branches/release31-maint/Doc/library/syslog.rst ============================================================================== --- python/branches/release31-maint/Doc/library/syslog.rst (original) +++ python/branches/release31-maint/Doc/library/syslog.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`syslog` --- Unix syslog library routines ============================================== Modified: python/branches/release31-maint/Doc/library/tabnanny.rst ============================================================================== --- python/branches/release31-maint/Doc/library/tabnanny.rst (original) +++ python/branches/release31-maint/Doc/library/tabnanny.rst Wed Sep 16 18:05:59 2009 @@ -2,8 +2,8 @@ ====================================================== .. module:: tabnanny - :synopsis: Tool for detecting white space related problems in Python source files in a - directory tree. + :synopsis: Tool for detecting white space related problems in Python + source files in a directory tree. .. moduleauthor:: Tim Peters .. sectionauthor:: Peter Funk Modified: python/branches/release31-maint/Doc/library/tarfile.rst ============================================================================== --- python/branches/release31-maint/Doc/library/tarfile.rst (original) +++ python/branches/release31-maint/Doc/library/tarfile.rst Wed Sep 16 18:05:59 2009 @@ -1,5 +1,3 @@ -.. _tarfile-mod: - :mod:`tarfile` --- Read and write tar archive files =================================================== Modified: python/branches/release31-maint/Doc/library/telnetlib.rst ============================================================================== --- python/branches/release31-maint/Doc/library/telnetlib.rst (original) +++ python/branches/release31-maint/Doc/library/telnetlib.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`telnetlib` --- Telnet client ================================== @@ -23,7 +22,7 @@ Character), EL (Erase Line), GA (Go Ahead), SB (Subnegotiation Begin). -.. class:: Telnet([host[, port[, timeout]]]) +.. class:: Telnet(host=None, port=0[, timeout]) :class:`Telnet` represents a connection to a Telnet server. The instance is initially not connected by default; the :meth:`open` method must be used to @@ -60,7 +59,7 @@ :class:`Telnet` instances have the following methods: -.. method:: Telnet.read_until(expected[, timeout]) +.. method:: Telnet.read_until(expected, timeout=None) Read until a given byte string, *expected*, is encountered or until *timeout* seconds have passed. @@ -123,7 +122,7 @@ This method never blocks. -.. method:: Telnet.open(host[, port[, timeout]]) +.. method:: Telnet.open(host, port=0[, timeout]) Connect to a host. The optional second argument is the port number, which defaults to the standard Telnet port (23). The optional *timeout* parameter @@ -133,7 +132,7 @@ Do not try to reopen an already connected instance. -.. method:: Telnet.msg(msg[, *args]) +.. method:: Telnet.msg(msg, *args) Print a debug message when the debug level is ``>`` 0. If extra arguments are present, they are substituted in the message using the standard string @@ -178,7 +177,7 @@ Multithreaded version of :meth:`interact`. -.. method:: Telnet.expect(list[, timeout]) +.. method:: Telnet.expect(list, timeout=None) Read until one from a list of a regular expressions matches. Modified: python/branches/release31-maint/Doc/library/tempfile.rst ============================================================================== --- python/branches/release31-maint/Doc/library/tempfile.rst (original) +++ python/branches/release31-maint/Doc/library/tempfile.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`tempfile` --- Generate temporary files and directories ============================================================ @@ -29,7 +28,7 @@ The module defines the following user-callable functions: -.. function:: TemporaryFile([mode='w+b'[, bufsize=-1[, suffix=''[, prefix='tmp'[, dir=None]]]]]) +.. function:: TemporaryFile(mode='w+b', bufsize=-1, suffix='', prefix='tmp', dir=None) Return a file-like object that can be used as a temporary storage area. The file is created using :func:`mkstemp`. It will be destroyed as soon @@ -53,7 +52,7 @@ :keyword:`with` statement, just like a normal file. -.. function:: NamedTemporaryFile([mode='w+b'[, bufsize=-1[, suffix=''[, prefix='tmp'[, dir=None[, delete=True]]]]]]) +.. function:: NamedTemporaryFile(mode='w+b', bufsize=-1, suffix='', prefix='tmp', dir=None, delete=True) This function operates exactly as :func:`TemporaryFile` does, except that the file is guaranteed to have a visible name in the file system (on @@ -68,7 +67,7 @@ be used in a :keyword:`with` statement, just like a normal file. -.. function:: SpooledTemporaryFile([max_size=0, [mode='w+b'[, bufsize=-1[, suffix=''[, prefix='tmp'[, dir=None]]]]]]) +.. function:: SpooledTemporaryFile(max_size=0, mode='w+b', bufsize=-1, suffix='', prefix='tmp', dir=None) This function operates exactly as :func:`TemporaryFile` does, except that data is spooled in memory until the file size exceeds *max_size*, or @@ -85,7 +84,7 @@ used in a :keyword:`with` statement, just like a normal file. -.. function:: mkstemp([suffix=''[, prefix='tmp'[, dir=None[, text=False]]]]) +.. function:: mkstemp(suffix='', prefix='tmp', dir=None, text=False) Creates a temporary file in the most secure manner possible. There are no race conditions in the file's creation, assuming that the platform @@ -123,7 +122,7 @@ of that file, in that order. -.. function:: mkdtemp([suffix=''[, prefix='tmp'[, dir=None]]]) +.. function:: mkdtemp(suffix='', prefix='tmp', dir=None) Creates a temporary directory in the most secure manner possible. There are no race conditions in the directory's creation. The directory is @@ -138,7 +137,7 @@ :func:`mkdtemp` returns the absolute pathname of the new directory. -.. function:: mktemp([suffix=''[, prefix='tmp'[, dir=None]]]) +.. function:: mktemp(suffix='', prefix='tmp', dir=None) .. deprecated:: 2.3 Use :func:`mkstemp` instead. Modified: python/branches/release31-maint/Doc/library/termios.rst ============================================================================== --- python/branches/release31-maint/Doc/library/termios.rst (original) +++ python/branches/release31-maint/Doc/library/termios.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`termios` --- POSIX style tty control ========================================== @@ -80,11 +79,11 @@ Convenience functions for common terminal control operations. +.. _termios-example: + Example ------- -.. _termios-example: - Here's a function that prompts for a password with echoing turned off. Note the technique using a separate :func:`tcgetattr` call and a :keyword:`try` ... :keyword:`finally` statement to ensure that the old tty attributes are restored Modified: python/branches/release31-maint/Doc/library/test.rst ============================================================================== --- python/branches/release31-maint/Doc/library/test.rst (original) +++ python/branches/release31-maint/Doc/library/test.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`test` --- Regression tests package for Python =================================================== @@ -180,7 +179,7 @@ :mod:`test.support` --- Utility functions for tests -======================================================== +=================================================== .. module:: test.support :synopsis: Support for Python regression tests. @@ -247,7 +246,7 @@ tests. -.. function:: requires(resource[, msg]) +.. function:: requires(resource, msg=None) Raises :exc:`ResourceDenied` if *resource* is not available. *msg* is the argument to :exc:`ResourceDenied` if it is raised. Always returns true if called @@ -372,7 +371,7 @@ The :mod:`test.support` module defines the following classes: -.. class:: TransientResource(exc[, **kwargs]) +.. class:: TransientResource(exc, **kwargs) Instances are a context manager that raises :exc:`ResourceDenied` if the specified exception type is raised. Any keyword arguments are treated as Modified: python/branches/release31-maint/Doc/library/textwrap.rst ============================================================================== --- python/branches/release31-maint/Doc/library/textwrap.rst (original) +++ python/branches/release31-maint/Doc/library/textwrap.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`textwrap` --- Text wrapping and filling ============================================= @@ -15,16 +14,17 @@ otherwise, you should use an instance of :class:`TextWrapper` for efficiency. -.. function:: wrap(text[, width[, ...]]) +.. function:: wrap(text, width=70, **kwargs) - Wraps the single paragraph in *text* (a string) so every line is at most *width* - characters long. Returns a list of output lines, without final newlines. + Wraps the single paragraph in *text* (a string) so every line is at most + *width* characters long. Returns a list of output lines, without final + newlines. Optional keyword arguments correspond to the instance attributes of :class:`TextWrapper`, documented below. *width* defaults to ``70``. -.. function:: fill(text[, width[, ...]]) +.. function:: fill(text, width=70, **kwargs) Wraps the single paragraph in *text*, and returns a single string containing the wrapped paragraph. :func:`fill` is shorthand for :: @@ -70,11 +70,11 @@ print(repr(dedent(s))) # prints 'hello\n world\n' -.. class:: TextWrapper(...) +.. class:: TextWrapper(**kwargs) The :class:`TextWrapper` constructor accepts a number of optional keyword - arguments. Each argument corresponds to one instance attribute, so for example - :: + arguments. Each keyword argument corresponds to an instance attribute, so + for example :: wrapper = TextWrapper(initial_indent="* ") Modified: python/branches/release31-maint/Doc/library/threading.rst ============================================================================== --- python/branches/release31-maint/Doc/library/threading.rst (original) +++ python/branches/release31-maint/Doc/library/threading.rst Wed Sep 16 18:05:59 2009 @@ -89,7 +89,7 @@ thread must release it once for each time it has acquired it. -.. function:: Semaphore([value]) +.. function:: Semaphore(value=1) :noindex: A factory function that returns a new semaphore object. A semaphore manages a @@ -99,7 +99,7 @@ given, *value* defaults to 1. -.. function:: BoundedSemaphore([value]) +.. function:: BoundedSemaphore(value=1) A factory function that returns a new bounded semaphore object. A bounded semaphore checks to make sure its current value doesn't exceed its initial @@ -253,7 +253,7 @@ the *target* argument, if any, with sequential and keyword arguments taken from the *args* and *kwargs* arguments, respectively. - .. method:: join([timeout]) + .. method:: join(timeout=None) Wait until the thread terminates. This blocks the calling thread until the thread whose :meth:`join` method is called terminates -- either normally @@ -349,7 +349,7 @@ All methods are executed atomically. -.. method:: Lock.acquire([blocking=1]) +.. method:: Lock.acquire(blocking=True) Acquire a lock, blocking or non-blocking. @@ -396,7 +396,7 @@ :meth:`acquire` to proceed. -.. method:: RLock.acquire([blocking=1]) +.. method:: RLock.acquire(blocking=True) Acquire a lock, blocking or non-blocking. @@ -487,7 +487,7 @@ needs to wake up one consumer thread. -.. class:: Condition([lock]) +.. class:: Condition(lock=None) 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, @@ -503,7 +503,7 @@ Release the underlying lock. This method calls the corresponding method on the underlying lock; there is no return value. - .. method:: wait([timeout]) + .. method:: wait(timeout=None) 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 @@ -566,13 +566,13 @@ waiting until some other thread calls :meth:`release`. -.. class:: Semaphore([value]) +.. class:: Semaphore(value=1) The optional argument gives the initial *value* for the internal counter; it defaults to ``1``. If the *value* given is less than 0, :exc:`ValueError` is raised. - .. method:: acquire([blocking]) + .. method:: acquire(blocking=True) Acquire a semaphore. @@ -659,7 +659,7 @@ :meth:`wait` will block until :meth:`.set` is called to set the internal flag to true again. - .. method:: wait([timeout]) + .. method:: wait(timeout=None) Block until the internal flag is true. If the internal flag is true on entry, return immediately. Otherwise, block until another thread calls Modified: python/branches/release31-maint/Doc/library/time.rst ============================================================================== --- python/branches/release31-maint/Doc/library/time.rst (original) +++ python/branches/release31-maint/Doc/library/time.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`time` --- Time access and conversions =========================================== Modified: python/branches/release31-maint/Doc/library/timeit.rst ============================================================================== --- python/branches/release31-maint/Doc/library/timeit.rst (original) +++ python/branches/release31-maint/Doc/library/timeit.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`timeit` --- Measure execution time of small code snippets =============================================================== @@ -18,7 +17,7 @@ The module defines the following public class: -.. class:: Timer([stmt='pass' [, setup='pass' [, timer=]]]) +.. class:: Timer(stmt='pass', setup='pass', timer=) Class for timing execution speed of small code snippets. @@ -38,7 +37,7 @@ little larger in this case because of the extra function calls. -.. method:: Timer.print_exc([file=None]) +.. method:: Timer.print_exc(file=None) Helper to print a traceback from the timed code. @@ -55,7 +54,7 @@ traceback is sent; it defaults to ``sys.stderr``. -.. method:: Timer.repeat([repeat=3 [, number=1000000]]) +.. method:: Timer.repeat(repeat=3, number=1000000) Call :meth:`timeit` a few times. @@ -76,7 +75,7 @@ and apply common sense rather than statistics. -.. method:: Timer.timeit([number=1000000]) +.. method:: Timer.timeit(number=1000000) Time *number* executions of the main statement. This executes the setup statement once, and then returns the time it takes to execute the main statement @@ -98,14 +97,14 @@ The module also defines two convenience functions: -.. function:: repeat(stmt[, setup[, timer[, repeat=3 [, number=1000000]]]]) +.. function:: repeat(stmt='pass', setup='pass', timer=, repeat=3, number=1000000) Create a :class:`Timer` instance with the given statement, setup code and timer function and run its :meth:`repeat` method with the given repeat count and *number* executions. -.. function:: timeit(stmt[, setup[, timer[, number=1000000]]]) +.. function:: timeit(stmt='pass', setup='pass', timer=, number=1000000) Create a :class:`Timer` instance with the given statement, setup code and timer function and run its :meth:`timeit` method with *number* executions. Modified: python/branches/release31-maint/Doc/library/tkinter.tix.rst ============================================================================== --- python/branches/release31-maint/Doc/library/tkinter.tix.rst (original) +++ python/branches/release31-maint/Doc/library/tkinter.tix.rst Wed Sep 16 18:05:59 2009 @@ -45,7 +45,7 @@ --------- -.. class:: Tix(screenName[, baseName[, className]]) +.. class:: Tk(screenName=None, baseName=None, className='Tix') Toplevel widget of Tix which represents mostly the main window of an application. It has an associated Tcl interpreter. Modified: python/branches/release31-maint/Doc/library/tkinter.ttk.rst ============================================================================== --- python/branches/release31-maint/Doc/library/tkinter.ttk.rst (original) +++ python/branches/release31-maint/Doc/library/tkinter.ttk.rst Wed Sep 16 18:05:59 2009 @@ -262,7 +262,7 @@ *x* and *y* are pixel coordinates relative to the widget. - .. method:: instate(statespec[, callback=None[, *args[, **kw]]]) + .. method:: instate(statespec, callback=None, *args, **kw) Test the widget's state. If a callback is not specified, returns True if the widget state matches *statespec* and False otherwise. If callback @@ -270,7 +270,7 @@ *statespec*. - .. method:: state([statespec=None]) + .. method:: state(statespec=None) Modify or inquire widget state. If *statespec* is specified, sets the widget state according to it and return a new *statespec* indicating @@ -349,7 +349,7 @@ .. class:: Combobox - .. method:: current([newindex=None]) + .. method:: current(newindex=None) If *newindex* is specified, sets the combobox value to the element position *newindex*. Otherwise, returns the index of the current value or @@ -510,7 +510,7 @@ See `Tab Options`_ for the list of available options. - .. method:: select([tab_id]) + .. method:: select(tab_id=None) Selects the specified *tab_id*. @@ -519,7 +519,7 @@ omitted, returns the widget name of the currently selected pane. - .. method:: tab(tab_id[, option=None[, **kw]]) + .. method:: tab(tab_id, option=None, **kw) Query or modify the options of the specific *tab_id*. @@ -600,14 +600,14 @@ .. class:: Progressbar - .. method:: start([interval]) + .. method:: start(interval=None) Begin autoincrement mode: schedules a recurring timer event that calls :meth:`Progressbar.step` every *interval* milliseconds. If omitted, *interval* defaults to 50 milliseconds. - .. method:: step([amount]) + .. method:: step(amount=None) Increments the progress bar's value by *amount*. @@ -842,7 +842,7 @@ .. class:: Treeview - .. method:: bbox(item[, column=None]) + .. method:: bbox(item, column=None) Returns the bounding box (relative to the treeview widget's window) of the specified *item* in the form (x, y, width, height). @@ -852,7 +852,7 @@ scrolled offscreen), returns an empty string. - .. method:: get_children([item]) + .. method:: get_children(item=None) Returns the list of children belonging to *item*. @@ -869,7 +869,7 @@ *item*'s children. - .. method:: column(column[, option=None[, **kw]]) + .. method:: column(column, option=None, **kw) Query or modify the options for the specified *column*. @@ -918,13 +918,13 @@ Returns True if the specified *item* is present in the tree. - .. method:: focus([item=None]) + .. method:: focus(item=None) If *item* is specified, sets the focus item to *item*. Otherwise, returns the current focus item, or '' if there is none. - .. method:: heading(column[, option=None[, **kw]]) + .. method:: heading(column, option=None, **kw) Query or modify the heading options for the specified *column*. @@ -997,7 +997,7 @@ Returns the integer index of *item* within its parent's list of children. - .. method:: insert(parent, index[, iid=None[, **kw]]) + .. method:: insert(parent, index, iid=None, **kw) Creates a new item and returns the item identifier of the newly created item. @@ -1014,7 +1014,7 @@ See `Item Options`_ for the list of available points. - .. method:: item(item[, option[, **kw]]) + .. method:: item(item, option=None, **kw) Query or modify the options for the specified *item*. @@ -1066,7 +1066,7 @@ the tree. - .. method:: selection([selop=None[, items=None]]) + .. method:: selection(selop=None, items=None) If *selop* is not specified, returns selected items. Otherwise, it will act according to the following selection methods. @@ -1092,7 +1092,7 @@ Toggle the selection state of each item in *items*. - .. method:: set(item[, column=None[, value=None]]) + .. method:: set(item, column=None, value=None) With one argument, returns a dictionary of column/value pairs for the specified *item*. With two arguments, returns the current value of the @@ -1100,14 +1100,14 @@ *column* in given *item* to the specified *value*. - .. method:: tag_bind(tagname[, sequence=None[, callback=None]]) + .. method:: tag_bind(tagname, sequence=None, callback=None) Bind a callback for the given event *sequence* to the tag *tagname*. When an event is delivered to an item, the callbacks for each of the item's tags option are called. - .. method:: tag_configure(tagname[, option=None[, **kw]]) + .. method:: tag_configure(tagname, option=None, **kw) Query or modify the options for the specified *tagname*. @@ -1117,7 +1117,7 @@ corresponding values for the given *tagname*. - .. method:: tag_has(tagname[, item]) + .. method:: tag_has(tagname, item=None) If *item* is specified, returns 1 or 0 depending on whether the specified *item* has the given *tagname*. Otherwise, returns a list of all items @@ -1216,7 +1216,7 @@ blue foreground when the widget were in active or pressed states. - .. method:: lookup(style, option[, state=None[, default=None]]) + .. method:: lookup(style, option, state=None, default=None) Returns the value specified for *option* in *style*. @@ -1231,7 +1231,7 @@ print(ttk.Style().lookup("TButton", "font")) - .. method:: layout(style[, layoutspec=None]) + .. method:: layout(style, layoutspec=None) Define the widget layout for given *style*. If *layoutspec* is omitted, return the layout specification for given style. @@ -1314,7 +1314,7 @@ Returns the list of *elementname*'s options. - .. method:: theme_create(themename[, parent=None[, settings=None]]) + .. method:: theme_create(themename, parent=None, settings=None) Create a new theme. @@ -1366,7 +1366,7 @@ Returns a list of all known themes. - .. method:: theme_use([themename]) + .. method:: theme_use(themename=None) If *themename* is not given, returns the theme in use. Otherwise, sets the current theme to *themename*, refreshes all widgets and emits a Modified: python/branches/release31-maint/Doc/library/token.rst ============================================================================== --- python/branches/release31-maint/Doc/library/token.rst (original) +++ python/branches/release31-maint/Doc/library/token.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`token` --- Constants used with Python parse trees ======================================================= Modified: python/branches/release31-maint/Doc/library/trace.rst ============================================================================== --- python/branches/release31-maint/Doc/library/trace.rst (original) +++ python/branches/release31-maint/Doc/library/trace.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`trace` --- Trace or track Python statement execution ========================================================== @@ -80,7 +79,7 @@ --------------------- -.. class:: Trace([count=1[, trace=1[, countfuncs=0[, countcallers=0[, ignoremods=()[, ignoredirs=()[, infile=None[, outfile=None[, timing=False]]]]]]]]]) +.. class:: Trace(count=1, trace=1, countfuncs=0, countcallers=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None, timing=False) Create an object to trace execution of a single statement or expression. All parameters are optional. *count* enables counting of line numbers. *trace* @@ -98,7 +97,7 @@ Run *cmd* under control of the Trace object with the current tracing parameters. -.. method:: Trace.runctx(cmd[, globals=None[, locals=None]]) +.. method:: Trace.runctx(cmd, globals=None, locals=None) Run *cmd* under control of the Trace object with the current tracing parameters in the defined global and local environments. If not defined, *globals* and Modified: python/branches/release31-maint/Doc/library/traceback.rst ============================================================================== --- python/branches/release31-maint/Doc/library/traceback.rst (original) +++ python/branches/release31-maint/Doc/library/traceback.rst Wed Sep 16 18:05:59 2009 @@ -20,7 +20,7 @@ The module defines the following functions: -.. function:: print_tb(traceback[, limit[, file]]) +.. function:: print_tb(traceback, limit=None, file=None) Print up to *limit* stack trace entries from *traceback*. If *limit* is omitted or ``None``, all entries are printed. If *file* is omitted or ``None``, the @@ -28,7 +28,7 @@ object to receive the output. -.. function:: print_exception(type, value, traceback[, limit[, file[, chain]]]) +.. function:: print_exception(type, value, traceback, limit=None, file=None, chain=True) Print exception information and up to *limit* stack trace entries from *traceback* to *file*. This differs from :func:`print_tb` in the following @@ -47,19 +47,19 @@ exception. -.. function:: print_exc([limit[, file[, chain]]]) +.. function:: print_exc(limit=None, file=None, chain=True) This is a shorthand for ``print_exception(*sys.exc_info())``. -.. function:: print_last([limit[, file[, chain]]]) +.. function:: print_last(limit=None, file=None, chain=True) This is a shorthand for ``print_exception(sys.last_type, sys.last_value, sys.last_traceback, limit, file)``. In general it will work only after an exception has reached an interactive prompt (see :data:`sys.last_type`). -.. function:: print_stack([f[, limit[, file]]]) +.. function:: print_stack(f=None, limit=None, file=None) This function prints a stack trace from its invocation point. The optional *f* argument can be used to specify an alternate stack frame to start. The optional @@ -67,7 +67,7 @@ :func:`print_exception`. -.. function:: extract_tb(traceback[, limit]) +.. function:: extract_tb(traceback, limit=None) Return a list of up to *limit* "pre-processed" stack trace entries extracted from the traceback object *traceback*. It is useful for alternate formatting of @@ -78,7 +78,7 @@ stripped; if the source is not available it is ``None``. -.. function:: extract_stack([f[, limit]]) +.. function:: extract_stack(f=None, limit=None) Extract the raw traceback from the current stack frame. The return value has the same format as for :func:`extract_tb`. The optional *f* and *limit* @@ -105,7 +105,7 @@ occurred is the always last string in the list. -.. function:: format_exception(type, value, tb[, limit[, chain]]) +.. function:: format_exception(type, value, tb, limit=None, chain=True) Format a stack trace and the exception information. The arguments have the same meaning as the corresponding arguments to :func:`print_exception`. The @@ -114,18 +114,18 @@ same text is printed as does :func:`print_exception`. -.. function:: format_exc([limit[, chain]]) +.. function:: format_exc(limit=None, chain=True) This is like ``print_exc(limit)`` but returns a string instead of printing to a file. -.. function:: format_tb(tb[, limit]) +.. function:: format_tb(tb, limit=None) A shorthand for ``format_list(extract_tb(tb, limit))``. -.. function:: format_stack([f[, limit]]) +.. function:: format_stack(f=None, limit=None) A shorthand for ``format_list(extract_stack(f, limit))``. Modified: python/branches/release31-maint/Doc/library/tty.rst ============================================================================== --- python/branches/release31-maint/Doc/library/tty.rst (original) +++ python/branches/release31-maint/Doc/library/tty.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`tty` --- Terminal control functions ========================================= @@ -17,14 +16,14 @@ The :mod:`tty` module defines the following functions: -.. function:: setraw(fd[, when]) +.. function:: setraw(fd, when=termios.TCSAFLUSH) Change the mode of the file descriptor *fd* to raw. If *when* is omitted, it defaults to :const:`termios.TCSAFLUSH`, and is passed to :func:`termios.tcsetattr`. -.. function:: setcbreak(fd[, when]) +.. function:: setcbreak(fd, when=termios.TCSAFLUSH) Change the mode of file descriptor *fd* to cbreak. If *when* is omitted, it defaults to :const:`termios.TCSAFLUSH`, and is passed to Modified: python/branches/release31-maint/Doc/library/undoc.rst ============================================================================== --- python/branches/release31-maint/Doc/library/undoc.rst (original) +++ python/branches/release31-maint/Doc/library/undoc.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - .. _undoc: ******************** Modified: python/branches/release31-maint/Doc/library/unicodedata.rst ============================================================================== --- python/branches/release31-maint/Doc/library/unicodedata.rst (original) +++ python/branches/release31-maint/Doc/library/unicodedata.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`unicodedata` --- Unicode Database ======================================= Modified: python/branches/release31-maint/Doc/library/unittest.rst ============================================================================== --- python/branches/release31-maint/Doc/library/unittest.rst (original) +++ python/branches/release31-maint/Doc/library/unittest.rst Wed Sep 16 18:05:59 2009 @@ -525,7 +525,7 @@ Test cases ~~~~~~~~~~ -.. class:: TestCase([methodName]) +.. class:: TestCase(methodName='runTest') Instances of the :class:`TestCase` class represent the smallest testable units in the :mod:`unittest` universe. This class is intended to be used as a base @@ -576,7 +576,7 @@ the outcome of the test method. The default implementation does nothing. - .. method:: run([result]) + .. method:: run(result=None) Run the test, collecting the result into the test result object passed as *result*. If *result* is omitted or :const:`None`, a temporary result @@ -603,9 +603,9 @@ failures. - .. method:: assertTrue(expr[, msg]) - assert_(expr[, msg]) - failUnless(expr[, msg]) + .. method:: assertTrue(expr, msg=None) + assert_(expr, msg=None) + failUnless(expr, msg=None) Signal a test failure if *expr* is false; the explanation for the failure will be *msg* if given, otherwise it will be :const:`None`. @@ -614,8 +614,8 @@ :meth:`failUnless`. - .. method:: assertEqual(first, second[, msg]) - failUnlessEqual(first, second[, msg]) + .. method:: assertEqual(first, second, msg=None) + failUnlessEqual(first, second, msg=None) Test that *first* and *second* are equal. If the values do not compare equal, the test will fail with the explanation given by *msg*, or @@ -636,8 +636,8 @@ :meth:`failUnlessEqual`. - .. method:: assertNotEqual(first, second[, msg]) - failIfEqual(first, second[, msg]) + .. method:: assertNotEqual(first, second, msg=None) + failIfEqual(first, second, msg=None) Test that *first* and *second* are not equal. If the values do compare equal, the test will fail with the explanation given by *msg*, or @@ -650,8 +650,8 @@ :meth:`failIfEqual`. - .. method:: assertAlmostEqual(first, second[, places[, msg]]) - failUnlessAlmostEqual(first, second[, places[, msg]]) + .. method:: assertAlmostEqual(first, second, *, places=7, msg=None) + failUnlessAlmostEqual(first, second, *, places=7, msg=None) Test that *first* and *second* are approximately equal by computing the difference, rounding to the given number of decimal *places* (default 7), @@ -666,8 +666,8 @@ :meth:`failUnlessAlmostEqual`. - .. method:: assertNotAlmostEqual(first, second[, places[, msg]]) - failIfAlmostEqual(first, second[, places[, msg]]) + .. method:: assertNotAlmostEqual(first, second, *, places=7, msg=None) + failIfAlmostEqual(first, second, *, places=7, msg=None) Test that *first* and *second* are not approximately equal by computing the difference, rounding to the given number of decimal *places* (default @@ -708,7 +708,7 @@ .. versionadded:: 3.1 - .. method:: assertRegexpMatches(text, regexp[, msg=None]): + .. method:: assertRegexpMatches(text, regexp, msg=None): Verifies that a *regexp* search matches *text*. Fails with an error message including the pattern and the *text*. *regexp* may be @@ -801,8 +801,10 @@ .. versionadded:: 3.1 - .. method:: assertRaises(exception[, callable, ...]) - failUnlessRaises(exception[, callable, ...]) + .. method:: assertRaises(exception, callable, *args, **kwds) + failUnlessRaises(exception, callable, *args, **kwds) + assertRaises(exception) + failUnlessRaises(exception) Test that an exception is raised when *callable* is called with any positional or keyword arguments that are also passed to @@ -811,8 +813,8 @@ To catch any of a group of exceptions, a tuple containing the exception classes may be passed as *exception*. - If *callable* is omitted or None, returns a context manager so that the - code under test can be written inline rather than as a function:: + If only the *exception* argument is given, returns a context manager so + that the code under test can be written inline rather than as a function:: with self.failUnlessRaises(some_error_class): do_something() @@ -842,14 +844,14 @@ .. versionadded:: 3.1 - .. method:: assertIsNone(expr[, msg]) + .. method:: assertIsNone(expr, msg=None) This signals a test failure if *expr* is not None. .. versionadded:: 3.1 - .. method:: assertIsNotNone(expr[, msg]) + .. method:: assertIsNotNone(expr, msg=None) The inverse of the :meth:`assertIsNone` method. This signals a test failure if *expr* is None. @@ -857,7 +859,7 @@ .. versionadded:: 3.1 - .. method:: assertIs(expr1, expr2[, msg]) + .. method:: assertIs(expr1, expr2, msg=None) This signals a test failure if *expr1* and *expr2* don't evaluate to the same object. @@ -865,7 +867,7 @@ .. versionadded:: 3.1 - .. method:: assertIsNot(expr1, expr2[, msg]) + .. method:: assertIsNot(expr1, expr2, msg=None) The inverse of the :meth:`assertIs` method. This signals a test failure if *expr1* and *expr2* evaluate to the same @@ -874,8 +876,8 @@ .. versionadded:: 3.1 - .. method:: assertFalse(expr[, msg]) - failIf(expr[, msg]) + .. method:: assertFalse(expr, msg=None) + failIf(expr, msg=None) The inverse of the :meth:`assertTrue` method is the :meth:`assertFalse` method. This signals a test failure if *expr* is true, with *msg* or :const:`None` @@ -885,7 +887,7 @@ :meth:`failIf`. - .. method:: fail([msg]) + .. method:: fail(msg=None) Signals a test failure unconditionally, with *msg* or :const:`None` for the error message. @@ -976,7 +978,7 @@ .. versionadded:: 3.1 - .. method:: addCleanup(function[, *args[, **kwargs]]) + .. method:: addCleanup(function, *args, **kwargs) Add a function to be called after :meth:`tearDown` to cleanup resources used during the test. Functions will be called in reverse order to the @@ -1006,7 +1008,7 @@ .. versionadded:: 2.7 -.. class:: FunctionTestCase(testFunc[, setUp[, tearDown[, description]]]) +.. class:: FunctionTestCase(testFunc, setUp=None, tearDown=None, description=None) This class implements the portion of the :class:`TestCase` interface which allows the test runner to drive the test, but does not provide the methods which @@ -1020,7 +1022,7 @@ Grouping tests ~~~~~~~~~~~~~~ -.. class:: TestSuite([tests]) +.. class:: TestSuite(tests=()) This class represents an aggregation of individual tests cases and test suites. The class presents the interface needed by the test runner to allow it to be run @@ -1127,7 +1129,7 @@ be useful when the fixtures are different and defined in subclasses. - .. method:: loadTestsFromName(name[, module]) + .. method:: loadTestsFromName(name, module=None) Return a suite of all tests cases given a string specifier. @@ -1152,7 +1154,7 @@ The method optionally resolves *name* relative to the given *module*. - .. method:: loadTestsFromNames(names[, module]) + .. method:: loadTestsFromNames(names, module=None) Similar to :meth:`loadTestsFromName`, but takes a sequence of names rather than a single name. The return value is a test suite which supports all @@ -1369,7 +1371,7 @@ instead of repeatedly creating new instances. -.. class:: TextTestRunner([stream[, descriptions[, verbosity]]]) +.. class:: TextTestRunner(stream=sys.stderr, descriptions=True, verbosity=1) A basic test runner implementation which prints results on standard error. It has a few configurable parameters, but is essentially very simple. Graphical @@ -1382,7 +1384,7 @@ subclasses to provide a custom ``TestResult``. -.. function:: main([module[, defaultTest[, argv[, testRunner[, testLoader[, exit]]]]]]) +.. function:: main(module='__main__', defaultTest=None, argv=None, testRunner=TextTestRunner, testLoader=unittest.defaultTestLoader, exit=True) A command-line program that runs a set of tests; this is primarily for making test modules conveniently executable. The simplest use for this function is to Modified: python/branches/release31-maint/Doc/library/unix.rst ============================================================================== --- python/branches/release31-maint/Doc/library/unix.rst (original) +++ python/branches/release31-maint/Doc/library/unix.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - .. _unix: ********************** Modified: python/branches/release31-maint/Doc/library/urllib.error.rst ============================================================================== --- python/branches/release31-maint/Doc/library/urllib.error.rst (original) +++ python/branches/release31-maint/Doc/library/urllib.error.rst Wed Sep 16 18:05:59 2009 @@ -39,7 +39,7 @@ to a value found in the dictionary of codes as found in :attr:`http.server.BaseHTTPRequestHandler.responses`. -.. exception:: ContentTooShortError(msg[, content]) +.. exception:: ContentTooShortError(msg, content) This exception is raised when the :func:`urlretrieve` function detects that the amount of the downloaded data is less than the expected amount (given by Modified: python/branches/release31-maint/Doc/library/urllib.parse.rst ============================================================================== --- python/branches/release31-maint/Doc/library/urllib.parse.rst (original) +++ python/branches/release31-maint/Doc/library/urllib.parse.rst Wed Sep 16 18:05:59 2009 @@ -26,7 +26,7 @@ The :mod:`urllib.parse` module defines the following functions: -.. function:: urlparse(urlstring[, default_scheme[, allow_fragments]]) +.. function:: urlparse(urlstring, default_scheme='', allow_fragments=True) Parse a URL into six components, returning a 6-tuple. This corresponds to the general structure of a URL: ``scheme://netloc/path;parameters?query#fragment``. @@ -89,7 +89,7 @@ object. -.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing]]) +.. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False) Parse a query string given as a string argument (data of type :mimetype:`application/x-www-form-urlencoded`). Data are returned as a @@ -110,7 +110,7 @@ dictionaries into query strings. -.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing]]) +.. function:: parse_qsl(qs, keep_blank_values=False, strict_parsing=False) Parse a query string given as a string argument (data of type :mimetype:`application/x-www-form-urlencoded`). Data are returned as a list of @@ -139,7 +139,7 @@ states that these are equivalent). -.. function:: urlsplit(urlstring[, default_scheme[, allow_fragments]]) +.. function:: urlsplit(urlstring, default_scheme='', allow_fragments=True) This is similar to :func:`urlparse`, but does not split the params from the URL. This should generally be used instead of :func:`urlparse` if the more recent URL @@ -187,7 +187,7 @@ with an empty query; the RFC states that these are equivalent). -.. function:: urljoin(base, url[, allow_fragments]) +.. function:: urljoin(base, url, allow_fragments=True) Construct a full ("absolute") URL by combining a "base URL" (*base*) with another URL (*url*). Informally, this uses components of the base URL, in @@ -223,7 +223,8 @@ string. If there is no fragment identifier in *url*, return *url* unmodified and an empty string. -.. function:: quote(string[, safe[, encoding[, errors]]]) + +.. function:: quote(string, safe='/', encoding=None, errors=None) Replace special characters in *string* using the ``%xx`` escape. Letters, digits, and the characters ``'_.-'`` are never quoted. The optional *safe* @@ -246,7 +247,7 @@ Example: ``quote('/El Ni?o/')`` yields ``'/El%20Ni%C3%B1o/'``. -.. function:: quote_plus(string[, safe[, encoding[, errors]]]) +.. function:: quote_plus(string, safe='', encoding=None, errors=None) Like :func:`quote`, but also replace spaces by plus signs, as required for quoting HTML form values when building up a query string to go into a URL. @@ -255,7 +256,8 @@ Example: ``quote_plus('/El Ni?o/')`` yields ``'%2FEl+Ni%C3%B1o%2F'``. -.. function:: quote_from_bytes(bytes[, safe]) + +.. function:: quote_from_bytes(bytes, safe='/') Like :func:`quote`, but accepts a :class:`bytes` object rather than a :class:`str`, and does not perform string-to-bytes encoding. @@ -263,7 +265,8 @@ Example: ``quote_from_bytes(b'a&\xef')`` yields ``'a%26%EF'``. -.. function:: unquote(string[, encoding[, errors]]) + +.. function:: unquote(string, encoding='utf-8', errors='replace') Replace ``%xx`` escapes by their single-character equivalent. The optional *encoding* and *errors* parameters specify how to decode @@ -279,7 +282,7 @@ Example: ``unquote('/El%20Ni%C3%B1o/')`` yields ``'/El Ni?o/'``. -.. function:: unquote_plus(string[, encoding[, errors]]) +.. function:: unquote_plus(string, encoding='utf-8', errors='replace') Like :func:`unquote`, but also replace plus signs by spaces, as required for unquoting HTML form values. @@ -288,6 +291,7 @@ Example: ``unquote_plus('/El+Ni%C3%B1o/')`` yields ``'/El Ni?o/'``. + .. function:: unquote_to_bytes(string) Replace ``%xx`` escapes by their single-octet equivalent, and return a @@ -302,7 +306,7 @@ ``b'a&\xef'``. -.. function:: urlencode(query[, doseq]) +.. function:: urlencode(query, doseq=False) Convert a mapping object or a sequence of two-element tuples to a "url-encoded" string, suitable to pass to :func:`urlopen` above as the optional *data* Modified: python/branches/release31-maint/Doc/library/urllib.request.rst ============================================================================== --- python/branches/release31-maint/Doc/library/urllib.request.rst (original) +++ python/branches/release31-maint/Doc/library/urllib.request.rst Wed Sep 16 18:05:59 2009 @@ -14,7 +14,7 @@ The :mod:`urllib.request` module defines the following functions: -.. function:: urlopen(url[, data][, timeout]) +.. function:: urlopen(url, data=None[, timeout]) Open the URL *url*, which can be either a string or a :class:`Request` object. @@ -75,13 +75,14 @@ :class:`HTTPRedirectHandler`, :class:`FTPHandler`, :class:`FileHandler`, :class:`HTTPErrorProcessor`. - If the Python installation has SSL support (i.e., if the :mod:`ssl` module can be imported), - :class:`HTTPSHandler` will also be added. + If the Python installation has SSL support (i.e., if the :mod:`ssl` module + can be imported), :class:`HTTPSHandler` will also be added. A :class:`BaseHandler` subclass may also change its :attr:`handler_order` member variable to modify its position in the handlers list. -.. function:: urlretrieve(url[, filename[, reporthook[, data]]]) + +.. function:: urlretrieve(url, filename=None, reporthook=None, data=None) Copy a network object denoted by a URL to a local file, if necessary. If the URL points to a local file, or a valid cached copy of the object exists, the object @@ -160,9 +161,10 @@ path. This does not accept a complete URL. This function uses :func:`unquote` to decode *path*. + The following classes are provided: -.. class:: Request(url[, data][, headers][, origin_req_host][, unverifiable]) +.. class:: Request(url, data=None, headers={}, origin_req_host=None, unverifiable=False) This class is an abstraction of a URL request. @@ -205,7 +207,8 @@ document, and the user had no option to approve the automatic fetching of the image, this should be true. -.. class:: URLopener([proxies[, **x509]]) + +.. class:: URLopener(proxies=None, **x509) Base class for opening and reading URLs. Unless you need to support opening objects using schemes other than :file:`http:`, :file:`ftp:`, or :file:`file:`, @@ -230,7 +233,7 @@ :class:`URLopener` objects will raise an :exc:`IOError` exception if the server returns an error code. - .. method:: open(fullurl[, data]) + .. method:: open(fullurl, data=None) Open *fullurl* using the appropriate protocol. This method sets up cache and proxy information, then calls the appropriate open method with its input @@ -239,12 +242,12 @@ :func:`urlopen`. - .. method:: open_unknown(fullurl[, data]) + .. method:: open_unknown(fullurl, data=None) Overridable interface to open unknown URL types. - .. method:: retrieve(url[, filename[, reporthook[, data]]]) + .. method:: retrieve(url, filename=None, reporthook=None, data=None) Retrieves the contents of *url* and places it in *filename*. The return value is a tuple consisting of a local filename and either a @@ -337,12 +340,12 @@ A class to handle redirections. -.. class:: HTTPCookieProcessor([cookiejar]) +.. class:: HTTPCookieProcessor(cookiejar=None) A class to handle HTTP Cookies. -.. class:: ProxyHandler([proxies]) +.. class:: ProxyHandler(proxies=None) Cause requests to go through a proxy. If *proxies* is given, it must be a dictionary mapping protocol names to URLs of proxies. The default is to read the @@ -362,7 +365,7 @@ fits. -.. class:: AbstractBasicAuthHandler([password_mgr]) +.. class:: AbstractBasicAuthHandler(password_mgr=None) This is a mixin class that helps with HTTP authentication, both to the remote host and to a proxy. *password_mgr*, if given, should be something that is @@ -371,7 +374,7 @@ supported. -.. class:: HTTPBasicAuthHandler([password_mgr]) +.. class:: HTTPBasicAuthHandler(password_mgr=None) Handle authentication with the remote host. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section @@ -379,7 +382,7 @@ supported. -.. class:: ProxyBasicAuthHandler([password_mgr]) +.. class:: ProxyBasicAuthHandler(password_mgr=None) Handle authentication with the proxy. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section @@ -387,7 +390,7 @@ supported. -.. class:: AbstractDigestAuthHandler([password_mgr]) +.. class:: AbstractDigestAuthHandler(password_mgr=None) This is a mixin class that helps with HTTP authentication, both to the remote host and to a proxy. *password_mgr*, if given, should be something that is @@ -396,7 +399,7 @@ supported. -.. class:: HTTPDigestAuthHandler([password_mgr]) +.. class:: HTTPDigestAuthHandler(password_mgr=None) Handle authentication with the remote host. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section @@ -404,7 +407,7 @@ supported. -.. class:: ProxyDigestAuthHandler([password_mgr]) +.. class:: ProxyDigestAuthHandler(password_mgr=None) Handle authentication with the proxy. *password_mgr*, if given, should be something that is compatible with :class:`HTTPPasswordMgr`; refer to section @@ -597,7 +600,7 @@ post-process *protocol* responses. -.. method:: OpenerDirector.open(url[, data][, timeout]) +.. method:: OpenerDirector.open(url, data=None[, timeout]) Open the given *url* (which can be a request object or a string), optionally passing the given *data*. Arguments, return values and exceptions raised are @@ -609,7 +612,7 @@ HTTP, HTTPS, FTP and FTPS connections). -.. method:: OpenerDirector.error(proto[, arg[, ...]]) +.. method:: OpenerDirector.error(proto, *args) Handle an error of the given protocol. This will call the registered error handlers for the given protocol with the given arguments (which are protocol Modified: python/branches/release31-maint/Doc/library/uu.rst ============================================================================== --- python/branches/release31-maint/Doc/library/uu.rst (original) +++ python/branches/release31-maint/Doc/library/uu.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`uu` --- Encode and decode uuencode files ============================================== @@ -25,7 +24,7 @@ The :mod:`uu` module defines the following functions: -.. function:: encode(in_file, out_file[, name[, mode]]) +.. function:: encode(in_file, out_file, name=None, mode=None) Uuencode file *in_file* into file *out_file*. The uuencoded file will have the header specifying *name* and *mode* as the defaults for the results of @@ -33,7 +32,7 @@ and ``0o666`` respectively. -.. function:: decode(in_file[, out_file[, mode[, quiet]]]) +.. function:: decode(in_file, out_file=None, mode=None, quiet=False) This call decodes uuencoded file *in_file* placing the result on file *out_file*. If *out_file* is a pathname, *mode* is used to set the permission Modified: python/branches/release31-maint/Doc/library/uuid.rst ============================================================================== --- python/branches/release31-maint/Doc/library/uuid.rst (original) +++ python/branches/release31-maint/Doc/library/uuid.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`uuid` --- UUID objects according to RFC 4122 ================================================== @@ -18,7 +17,7 @@ random UUID. -.. class:: UUID([hex[, bytes[, bytes_le[, fields[, int[, version]]]]]]) +.. class:: UUID(hex=None, bytes=None, bytes_le=None, fields=None, int=None, version=None) Create a UUID from either a string of 32 hexadecimal digits, a string of 16 bytes as the *bytes* argument, a string of 16 bytes in little-endian order as @@ -43,8 +42,8 @@ variant and version number set according to RFC 4122, overriding bits in the given *hex*, *bytes*, *bytes_le*, *fields*, or *int*. -:class:`UUID` instances have these read-only attributes: +:class:`UUID` instances have these read-only attributes: .. attribute:: UUID.bytes @@ -126,7 +125,7 @@ .. index:: single: getnode -.. function:: uuid1([node[, clock_seq]]) +.. function:: uuid1(node=None, clock_seq=None) Generate a UUID from a host ID, sequence number, and the current time. If *node* is not given, :func:`getnode` is used to obtain the hardware address. If Modified: python/branches/release31-maint/Doc/library/warnings.rst ============================================================================== --- python/branches/release31-maint/Doc/library/warnings.rst (original) +++ python/branches/release31-maint/Doc/library/warnings.rst Wed Sep 16 18:05:59 2009 @@ -234,7 +234,7 @@ ------------------- -.. function:: warn(message[, category[, stacklevel]]) +.. function:: warn(message, category=None, stacklevel=1) Issue a warning, or maybe ignore it or raise an exception. The *category* argument, if given, must be a warning category class (see above); it defaults to @@ -253,7 +253,7 @@ of the warning message). -.. function:: warn_explicit(message, category, filename, lineno[, module[, registry[, module_globals]]]) +.. function:: warn_explicit(message, category, filename, lineno, module=None, registry=None, module_globals=None) This is a low-level interface to the functionality of :func:`warn`, passing in explicitly the message, category, filename and line number, and optionally the @@ -270,7 +270,7 @@ sources). -.. function:: showwarning(message, category, filename, lineno[, file[, line]]) +.. function:: showwarning(message, category, filename, lineno, file=None, line=None) Write a warning to a file. The default implementation calls ``formatwarning(message, category, filename, lineno, line)`` and writes the @@ -282,7 +282,7 @@ try to read the line specified by *filename* and *lineno*. -.. function:: formatwarning(message, category, filename, lineno[, line]) +.. function:: formatwarning(message, category, filename, lineno, line=None) Format a warning the standard way. This returns a string which may contain embedded newlines and ends in a newline. *line* is a line of source code to @@ -291,7 +291,7 @@ *lineno*. -.. function:: filterwarnings(action[, message[, category[, module[, lineno[, append]]]]]) +.. function:: filterwarnings(action, message='', category=Warning, module='', lineno=0, append=False) Insert an entry into the list of :ref:`warnings filter specifications `. The entry is inserted at the front by default; if @@ -303,7 +303,7 @@ everything. -.. function:: simplefilter(action[, category[, lineno[, append]]]) +.. function:: simplefilter(action, category=Warning, lineno=0, append=False) Insert a simple entry into the list of :ref:`warnings filter specifications `. The meaning of the function parameters is as for @@ -322,7 +322,7 @@ Available Context Managers -------------------------- -.. class:: catch_warnings([\*, record=False, module=None]) +.. class:: catch_warnings(\*, record=False, module=None) A context manager that copies and, upon exit, restores the warnings filter and the :func:`showwarning` function. Modified: python/branches/release31-maint/Doc/library/wave.rst ============================================================================== --- python/branches/release31-maint/Doc/library/wave.rst (original) +++ python/branches/release31-maint/Doc/library/wave.rst Wed Sep 16 18:05:59 2009 @@ -12,7 +12,7 @@ The :mod:`wave` module defines the following function and exception: -.. function:: open(file[, mode]) +.. function:: open(file, mode=None) If *file* is a string, open the file by that name, other treat it as a seekable file-like object. *mode* can be any of Modified: python/branches/release31-maint/Doc/library/weakref.rst ============================================================================== --- python/branches/release31-maint/Doc/library/weakref.rst (original) +++ python/branches/release31-maint/Doc/library/weakref.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`weakref` --- Weak references ================================== @@ -92,10 +91,10 @@ but cannot be propagated; they are handled in exactly the same way as exceptions raised from an object's :meth:`__del__` method. - Weak references are :term:`hashable` if the *object* is hashable. They will maintain - their hash value even after the *object* was deleted. If :func:`hash` is called - the first time only after the *object* was deleted, the call will raise - :exc:`TypeError`. + Weak references are :term:`hashable` if the *object* is hashable. They will + maintain their hash value even after the *object* was deleted. If + :func:`hash` is called the first time only after the *object* was deleted, + the call will raise :exc:`TypeError`. Weak references support tests for equality, but not ordering. If the referents are still alive, two references have the same equality relationship as their Modified: python/branches/release31-maint/Doc/library/webbrowser.rst ============================================================================== --- python/branches/release31-maint/Doc/library/webbrowser.rst (original) +++ python/branches/release31-maint/Doc/library/webbrowser.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`webbrowser` --- Convenient Web-browser controller ======================================================= @@ -46,7 +45,7 @@ The following functions are defined: -.. function:: open(url[, new=0[, autoraise=True]]) +.. 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 @@ -72,14 +71,14 @@ equivalent to :func:`open_new`. -.. function:: get([name]) +.. function:: get(using=None) - Return a controller object for the browser type *name*. If *name* is empty, - return a controller for a default browser appropriate to the caller's - environment. + Return a controller object for the browser type *using*. If *using* is + ``None``, return a controller for a default browser appropriate to the + caller's environment. -.. function:: register(name, constructor[, instance]) +.. function:: register(name, constructor, instance=None) Register the browser type *name*. Once a browser type is registered, the :func:`get` function can return a controller for that browser type. If @@ -175,7 +174,7 @@ module-level convenience functions: -.. method:: controller.open(url[, new[, autoraise=True]]) +.. method:: controller.open(url, new=0, 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/release31-maint/Doc/library/winreg.rst ============================================================================== --- python/branches/release31-maint/Doc/library/winreg.rst (original) +++ python/branches/release31-maint/Doc/library/winreg.rst Wed Sep 16 18:05:59 2009 @@ -183,7 +183,7 @@ :const:`HKEY_LOCAL_MACHINE` tree. This may or may not be true. -.. function:: OpenKey(key, sub_key[, res=0][, sam=KEY_READ]) +.. function:: OpenKey(key, sub_key, res=0, sam=KEY_READ) Opens the specified key, returning a :dfn:`handle object` @@ -195,7 +195,7 @@ *res* is a reserved integer, and must be zero. The default is zero. *sam* is an integer that specifies an access mask that describes the desired - security access for the key. Default is :const:`KEY_READ` + security access for the key. Default is :const:`KEY_READ`. The result is a new handle to the specified key. Modified: python/branches/release31-maint/Doc/library/winsound.rst ============================================================================== --- python/branches/release31-maint/Doc/library/winsound.rst (original) +++ python/branches/release31-maint/Doc/library/winsound.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`winsound` --- Sound-playing interface for Windows ======================================================= @@ -31,7 +30,7 @@ indicates an error, :exc:`RuntimeError` is raised. -.. function:: MessageBeep([type=MB_OK]) +.. function:: MessageBeep(type=MB_OK) Call the underlying :cfunc:`MessageBeep` function from the Platform API. This plays a sound as specified in the registry. The *type* argument specifies which Modified: python/branches/release31-maint/Doc/library/wsgiref.rst ============================================================================== --- python/branches/release31-maint/Doc/library/wsgiref.rst (original) +++ python/branches/release31-maint/Doc/library/wsgiref.rst Wed Sep 16 18:05:59 2009 @@ -57,7 +57,7 @@ found, and "http" otherwise. -.. function:: request_uri(environ [, include_query=1]) +.. function:: request_uri(environ, include_query=True) Return the full request URI, optionally including the query string, using the algorithm found in the "URL Reconstruction" section of :pep:`333`. If @@ -146,7 +146,7 @@ :rfc:`2616`. -.. class:: FileWrapper(filelike [, blksize=8192]) +.. class:: FileWrapper(filelike, blksize=8192) A wrapper to convert a file-like object to an :term:`iterator`. The resulting objects support both :meth:`__getitem__` and :meth:`__iter__` iteration styles, for @@ -269,7 +269,7 @@ :mod:`wsgiref.util`.) -.. function:: make_server(host, port, app [, server_class=WSGIServer [, handler_class=WSGIRequestHandler]]) +.. function:: make_server(host, port, app, server_class=WSGIServer, handler_class=WSGIRequestHandler) Create a new WSGI server listening on *host* and *port*, accepting connections for *app*. The return value is an instance of the supplied *server_class*, and @@ -458,7 +458,7 @@ environment. -.. class:: BaseCGIHandler(stdin, stdout, stderr, environ [, multithread=True [, multiprocess=False]]) +.. class:: BaseCGIHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`CGIHandler`, but instead of using the :mod:`sys` and :mod:`os` modules, the CGI environment and I/O streams are specified explicitly. @@ -473,7 +473,7 @@ instead of :class:`SimpleHandler`. -.. class:: SimpleHandler(stdin, stdout, stderr, environ [,multithread=True [, multiprocess=False]]) +.. class:: SimpleHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`BaseCGIHandler`, but designed for use with HTTP origin servers. If you are writing an HTTP server implementation, you will probably Modified: python/branches/release31-maint/Doc/library/xdrlib.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xdrlib.rst (original) +++ python/branches/release31-maint/Doc/library/xdrlib.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`xdrlib` --- Encode and decode XDR data ============================================ Modified: python/branches/release31-maint/Doc/library/xml.dom.minidom.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xml.dom.minidom.rst (original) +++ python/branches/release31-maint/Doc/library/xml.dom.minidom.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`xml.dom.minidom` --- Lightweight DOM implementation ========================================================= @@ -28,7 +27,7 @@ The :func:`parse` function can take either a filename or an open file object. -.. function:: parse(filename_or_file[, parser[, bufsize]]) +.. function:: parse(filename_or_file, parser=None, bufsize=None) Return a :class:`Document` from the given input. *filename_or_file* may be either a file name, or a file-like object. *parser*, if given, must be a SAX2 @@ -40,7 +39,7 @@ instead: -.. function:: parseString(string[, parser]) +.. function:: parseString(string, parser=None) Return a :class:`Document` that represents the *string*. This method creates a :class:`StringIO` object for the string and passes that on to :func:`parse`. @@ -126,7 +125,7 @@ to discard children of that node. -.. method:: Node.writexml(writer[, indent=""[, addindent=""[, newl=""[, encoding=""]]]]) +.. method:: Node.writexml(writer, indent="", addindent="", newl="", encoding="") Write XML to the writer object. The writer should have a :meth:`write` method which matches that of the file object interface. The *indent* parameter is the @@ -138,7 +137,7 @@ used to specify the encoding field of the XML header. -.. method:: Node.toxml([encoding]) +.. method:: Node.toxml(encoding=None) Return the XML that the DOM represents as a string. @@ -153,7 +152,7 @@ encoding argument should be specified as "utf-8". -.. method:: Node.toprettyxml([indent=""[, newl=""[, encoding=""]]]) +.. method:: Node.toprettyxml(indent="", newl="", encoding="") Return a pretty-printed version of the document. *indent* specifies the indentation string and defaults to a tabulator; *newl* specifies the string Modified: python/branches/release31-maint/Doc/library/xml.dom.pulldom.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xml.dom.pulldom.rst (original) +++ python/branches/release31-maint/Doc/library/xml.dom.pulldom.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`xml.dom.pulldom` --- Support for building partial DOM trees ================================================================= @@ -11,7 +10,7 @@ Object Model representation of a document from SAX events. -.. class:: PullDOM([documentFactory]) +.. class:: PullDOM(documentFactory=None) :class:`xml.sax.handler.ContentHandler` implementation that ... @@ -21,17 +20,17 @@ ... -.. class:: SAX2DOM([documentFactory]) +.. class:: SAX2DOM(documentFactory=None) :class:`xml.sax.handler.ContentHandler` implementation that ... -.. function:: parse(stream_or_string[, parser[, bufsize]]) +.. function:: parse(stream_or_string, parser=None, bufsize=None) ... -.. function:: parseString(string[, parser]) +.. function:: parseString(string, parser=None) ... Modified: python/branches/release31-maint/Doc/library/xml.dom.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xml.dom.rst (original) +++ python/branches/release31-maint/Doc/library/xml.dom.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`xml.dom` --- The Document Object Model API ================================================ @@ -96,7 +95,7 @@ implementation supports some customization). -.. function:: getDOMImplementation([name[, features]]) +.. function:: getDOMImplementation(name=None, features=()) Return a suitable DOM implementation. The *name* is either well-known, the module name of a DOM implementation, or ``None``. If it is not ``None``, imports Modified: python/branches/release31-maint/Doc/library/xml.etree.elementtree.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xml.etree.elementtree.rst (original) +++ python/branches/release31-maint/Doc/library/xml.etree.elementtree.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`xml.etree.ElementTree` --- The ElementTree XML API ======================================================== @@ -41,7 +40,7 @@ --------- -.. function:: Comment([text]) +.. function:: Comment(text=None) Comment element factory. This factory function creates a special element that will be serialized as an XML comment. The comment string can be either @@ -61,7 +60,7 @@ *elem* is an element tree or an individual element. -.. function:: Element(tag[, attrib][, **extra]) +.. function:: Element(tag, attrib={}, **extra) Element factory. This function returns an object implementing the standard Element interface. The exact class or type of that object is implementation @@ -87,7 +86,7 @@ element instance. Returns a true value if this is an element object. -.. function:: iterparse(source[, events]) +.. function:: iterparse(source, events=None) Parses an XML section into an element tree incrementally, and reports what's going on to the user. *source* is a filename or file object containing XML data. @@ -105,7 +104,7 @@ If you need a fully populated element, look for "end" events instead. -.. function:: parse(source[, parser]) +.. function:: parse(source, parser=None) Parses an XML section into an element tree. *source* is a filename or file object containing XML data. *parser* is an optional parser instance. If not @@ -113,7 +112,7 @@ instance. -.. function:: ProcessingInstruction(target[, text]) +.. function:: ProcessingInstruction(target, text=None) PI element factory. This factory function creates a special element that will be serialized as an XML processing instruction. *target* is a string containing @@ -121,7 +120,7 @@ an element instance, representing a processing instruction. -.. function:: SubElement(parent, tag[, attrib[, **extra]]) +.. function:: SubElement(parent, tag, attrib={}, **extra) Subelement factory. This function creates an element instance, and appends it to an existing element. @@ -133,7 +132,7 @@ as keyword arguments. Returns an element instance. -.. function:: tostring(element[, encoding]) +.. function:: tostring(element, encoding=None) Generates a string representation of an XML element, including all subelements. *element* is an Element instance. *encoding* is the output encoding (default is @@ -202,7 +201,7 @@ attributes, and sets the text and tail attributes to None. -.. method:: Element.get(key[, default=None]) +.. method:: Element.get(key, default=None) Gets the element attribute named *key*. @@ -246,7 +245,7 @@ Returns an iterable yielding all matching elements in document order. -.. method:: Element.findtext(condition[, default=None]) +.. method:: Element.findtext(condition, default=None) Finds text for the first subelement matching *condition*. *condition* may be a tag name or path. Returns the text content of the first matching element, or @@ -259,7 +258,7 @@ Returns all subelements. The elements are returned in document order. -.. method:: Element.getiterator([tag=None]) +.. 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, in document (depth first) @@ -305,7 +304,7 @@ ------------------- -.. class:: ElementTree([element,] [file]) +.. class:: ElementTree(element=None, file=None) ElementTree wrapper class. This class represents an entire element hierarchy, and adds some extra support for serialization to and from standard XML. @@ -336,7 +335,7 @@ order. - .. method:: findtext(path[, default]) + .. method:: findtext(path, default=None) Finds the element text for the first toplevel element with given tag. Same as getroot().findtext(path). *path* is the toplevel element to look @@ -346,7 +345,7 @@ found, but has no text content, this method returns an empty string. - .. method:: getiterator([tag]) + .. method:: getiterator(tag=None) Creates and returns a tree iterator for the root element. The iterator loops over all elements in this tree, in section order. *tag* is the tag @@ -358,7 +357,7 @@ Returns the root element for this tree. - .. method:: parse(source[, parser]) + .. method:: parse(source, parser=None) Loads an external XML section into this element tree. *source* is a file name or file object. *parser* is an optional parser instance. If not @@ -366,7 +365,7 @@ root element. - .. method:: write(file[, encoding]) + .. method:: write(file, encoding=None) Writes the element tree to a file, as XML. *file* is a file name, or a file object opened for writing. *encoding* [1]_ is the output encoding @@ -406,7 +405,7 @@ ------------- -.. class:: QName(text_or_uri[, tag]) +.. class:: QName(text_or_uri, tag=None) QName wrapper. This can be used to wrap a QName attribute value, in order to get proper namespace handling on output. *text_or_uri* is a string containing @@ -422,7 +421,7 @@ ------------------- -.. class:: TreeBuilder([element_factory]) +.. class:: TreeBuilder(element_factory=None) Generic element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this @@ -461,7 +460,7 @@ ---------------------- -.. class:: XMLTreeBuilder([html,] [target]) +.. class:: XMLTreeBuilder(html=0, target=None) Element structure builder for XML source data, based on the expat parser. *html* are predefined HTML entities. This flag is not supported by the current Modified: python/branches/release31-maint/Doc/library/xml.sax.handler.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xml.sax.handler.rst (original) +++ python/branches/release31-maint/Doc/library/xml.sax.handler.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`xml.sax.handler` --- Base classes for SAX handlers ======================================================== Modified: python/branches/release31-maint/Doc/library/xml.sax.reader.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xml.sax.reader.rst (original) +++ python/branches/release31-maint/Doc/library/xml.sax.reader.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`xml.sax.xmlreader` --- Interface for XML parsers ====================================================== @@ -48,7 +47,7 @@ methods may return ``None``. -.. class:: InputSource([systemId]) +.. class:: InputSource(system_id=None) Encapsulation of the information needed by the :class:`XMLReader` to read entities. Modified: python/branches/release31-maint/Doc/library/xml.sax.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xml.sax.rst (original) +++ python/branches/release31-maint/Doc/library/xml.sax.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`xml.sax` --- Support for SAX2 parsers =========================================== @@ -17,7 +16,7 @@ The convenience functions are: -.. function:: make_parser([parser_list]) +.. function:: make_parser(parser_list=[]) Create and return a SAX :class:`XMLReader` object. The first parser found will be used. If *parser_list* is provided, it must be a sequence of strings which @@ -25,7 +24,7 @@ in *parser_list* will be used before modules in the default list of parsers. -.. function:: parse(filename_or_stream, handler[, error_handler]) +.. function:: parse(filename_or_stream, handler, error_handler=handler.ErrorHandler()) Create a SAX parser and use it to parse a document. The document, passed in as *filename_or_stream*, can be a filename or a file object. The *handler* @@ -35,7 +34,7 @@ return value; all work must be done by the *handler* passed in. -.. function:: parseString(string, handler[, error_handler]) +.. function:: parseString(string, handler, error_handler=handler.ErrorHandler()) Similar to :func:`parse`, but parses from a buffer *string* received as a parameter. @@ -66,7 +65,7 @@ classes. -.. exception:: SAXException(msg[, exception]) +.. exception:: SAXException(msg, exception=None) Encapsulate an XML error or warning. This class can contain basic error or warning information from either the XML parser or the application: it can be @@ -90,14 +89,14 @@ interface as well as the :class:`SAXException` interface. -.. exception:: SAXNotRecognizedException(msg[, exception]) +.. exception:: SAXNotRecognizedException(msg, exception=None) Subclass of :exc:`SAXException` raised when a SAX :class:`XMLReader` is confronted with an unrecognized feature or property. SAX applications and extensions may use this class for similar purposes. -.. exception:: SAXNotSupportedException(msg[, exception]) +.. exception:: SAXNotSupportedException(msg, exception=None) Subclass of :exc:`SAXException` raised when a SAX :class:`XMLReader` is asked to enable a feature that is not supported, or to set a property to a value that the Modified: python/branches/release31-maint/Doc/library/xml.sax.utils.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xml.sax.utils.rst (original) +++ python/branches/release31-maint/Doc/library/xml.sax.utils.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`xml.sax.saxutils` --- SAX Utilities ========================================= @@ -13,7 +12,7 @@ or as base classes. -.. function:: escape(data[, entities]) +.. function:: escape(data, entities={}) Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data. @@ -23,7 +22,7 @@ ``'>'`` are always escaped, even if *entities* is provided. -.. function:: unescape(data[, entities]) +.. function:: unescape(data, entities={}) Unescape ``'&'``, ``'<'``, and ``'>'`` in a string of data. @@ -33,7 +32,7 @@ are always unescaped, even if *entities* is provided. -.. function:: quoteattr(data[, entities]) +.. function:: quoteattr(data, entities={}) Similar to :func:`escape`, but also prepares *data* to be used as an attribute value. The return value is a quoted version of *data* with any @@ -51,7 +50,7 @@ using the reference concrete syntax. -.. class:: XMLGenerator([out[, encoding]]) +.. class:: XMLGenerator(out=None, encoding='iso-8859-1') This class implements the :class:`ContentHandler` interface by writing SAX events back into an XML document. In other words, using an :class:`XMLGenerator` @@ -69,7 +68,7 @@ requests as they pass through. -.. function:: prepare_input_source(source[, base]) +.. function:: prepare_input_source(source, base='') This function takes an input source and an optional base URL and returns a fully resolved :class:`InputSource` object ready for reading. The input source can be Modified: python/branches/release31-maint/Doc/library/xmlrpc.client.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xmlrpc.client.rst (original) +++ python/branches/release31-maint/Doc/library/xmlrpc.client.rst Wed Sep 16 18:05:59 2009 @@ -17,7 +17,7 @@ between conformable Python objects and XML on the wire. -.. class:: ServerProxy(uri[, transport[, encoding[, verbose[, allow_none[, use_datetime]]]]]) +.. class:: ServerProxy(uri, transport=None, encoding=None, verbose=False, allow_none=False, use_datetime=False) A :class:`ServerProxy` instance is an object that manages communication with a remote XML-RPC server. The required first argument is a URI (Uniform Resource @@ -458,7 +458,7 @@ Convenience Functions --------------------- -.. function:: dumps(params[, methodname[, methodresponse[, encoding[, allow_none]]]]) +.. function:: dumps(params, methodname=None, methodresponse=None, encoding=None, allow_none=False) Convert *params* into an XML-RPC request. or into a response if *methodresponse* is true. *params* can be either a tuple of arguments or an instance of the @@ -469,7 +469,7 @@ it via an extension, provide a true value for *allow_none*. -.. function:: loads(data[, use_datetime]) +.. function:: loads(data, use_datetime=False) Convert an XML-RPC request or response into Python objects, a ``(params, methodname)``. *params* is a tuple of argument; *methodname* is a string, or Modified: python/branches/release31-maint/Doc/library/xmlrpc.server.rst ============================================================================== --- python/branches/release31-maint/Doc/library/xmlrpc.server.rst (original) +++ python/branches/release31-maint/Doc/library/xmlrpc.server.rst Wed Sep 16 18:05:59 2009 @@ -13,7 +13,7 @@ :class:`CGIXMLRPCRequestHandler`. -.. class:: SimpleXMLRPCServer(addr[, requestHandler[, logRequests[, allow_none[, encoding[, bind_and_activate]]]]]) +.. class:: SimpleXMLRPCServer(addr, requestHandler=SimpleXMLRPCRequestHandler, logRequests=True, allow_none=False, encoding=None, bind_and_activate=True) Create a new server instance. This class provides methods for registration of functions that can be called by the XML-RPC protocol. The *requestHandler* @@ -29,7 +29,7 @@ the *allow_reuse_address* class variable before the address is bound. -.. class:: CGIXMLRPCRequestHandler([allow_none[, encoding]]) +.. class:: CGIXMLRPCRequestHandler(allow_none=False, encoding=None) Create a new instance to handle XML-RPC requests in a CGI environment. The *allow_none* and *encoding* parameters are passed on to :mod:`xmlrpc.client` @@ -53,7 +53,7 @@ alone XML-RPC servers. -.. method:: SimpleXMLRPCServer.register_function(function[, name]) +.. method:: SimpleXMLRPCServer.register_function(function, name=None) Register a function that can respond to XML-RPC requests. If *name* is given, it will be the method name associated with *function*, otherwise @@ -62,7 +62,7 @@ the period character. -.. method:: SimpleXMLRPCServer.register_instance(instance[, allow_dotted_names]) +.. method:: SimpleXMLRPCServer.register_instance(instance, allow_dotted_names=False) Register an object which is used to expose method names which have not been registered using :meth:`register_function`. If *instance* contains a @@ -167,7 +167,7 @@ requests sent to Python CGI scripts. -.. method:: CGIXMLRPCRequestHandler.register_function(function[, name]) +.. method:: CGIXMLRPCRequestHandler.register_function(function, name=None) Register a function that can respond to XML-RPC requests. If *name* is given, it will be the method name associated with function, otherwise @@ -201,7 +201,7 @@ Register the XML-RPC multicall function ``system.multicall``. -.. method:: CGIXMLRPCRequestHandler.handle_request([request_text = None]) +.. method:: CGIXMLRPCRequestHandler.handle_request(request_text=None) Handle a XML-RPC request. If *request_text* is given, it should be the POST data provided by the HTTP server, otherwise the contents of stdin will be used. @@ -229,7 +229,7 @@ :class:`DocCGIXMLRPCRequestHandler`. -.. class:: DocXMLRPCServer(addr[, requestHandler[, logRequests[, allow_none[, encoding[, bind_and_activate]]]]]) +.. class:: DocXMLRPCServer(addr, requestHandler=DocXMLRPCRequestHandler, logRequests=True, allow_none=False, encoding=None, bind_and_activate=True) Create a new server instance. All parameters have the same meaning as for :class:`SimpleXMLRPCServer`; *requestHandler* defaults to Modified: python/branches/release31-maint/Doc/library/zipfile.rst ============================================================================== --- python/branches/release31-maint/Doc/library/zipfile.rst (original) +++ python/branches/release31-maint/Doc/library/zipfile.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`zipfile` --- Work with ZIP archives ========================================= @@ -49,7 +48,7 @@ Class for creating ZIP archives containing Python libraries. -.. class:: ZipInfo([filename[, date_time]]) +.. class:: ZipInfo(filename='NoName', date_time=(1980,1,1,0,0,0)) Class used to represent information about a member of an archive. Instances of this class are returned by the :meth:`getinfo` and :meth:`infolist` @@ -98,7 +97,7 @@ --------------- -.. class:: ZipFile(file[, mode[, compression[, allowZip64]]]) +.. class:: ZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=False) Open a ZIP file, where *file* can be either a path to a file (a string) or a file-like object. The *mode* parameter should be ``'r'`` to read an existing @@ -149,7 +148,7 @@ Return a list of archive members by name. -.. method:: ZipFile.open(name[, mode[, pwd]]) +.. method:: ZipFile.open(name, mode='r', pwd=None) Extract a member from the archive as a file-like object (ZipExtFile). *name* is the name of the file in the archive, or a :class:`ZipInfo` object. The *mode* @@ -182,7 +181,7 @@ ZIP file that contains members with duplicate names. -.. method:: ZipFile.extract(member[, path[, pwd]]) +.. method:: ZipFile.extract(member, path=None, pwd=None) Extract a member from the archive to the current working directory; *member* must be its full name or a :class:`ZipInfo` object). Its file information is @@ -191,7 +190,7 @@ *pwd* is the password used for encrypted files. -.. method:: ZipFile.extractall([path[, members[, pwd]]]) +.. method:: ZipFile.extractall(path=None, members=None, pwd=None) Extract all members from the archive to the current working directory. *path* specifies a different directory to extract to. *members* is optional and must @@ -209,7 +208,7 @@ Set *pwd* as default password to extract encrypted files. -.. method:: ZipFile.read(name[, pwd]) +.. method:: ZipFile.read(name, pwd=None) Return the bytes of the file *name* in the archive. *name* is the name of the file in the archive, or a :class:`ZipInfo` object. The archive must be open for @@ -225,7 +224,7 @@ :meth:`testzip` on a closed ZipFile will raise a :exc:`RuntimeError`. -.. method:: ZipFile.write(filename[, arcname[, compress_type]]) +.. method:: ZipFile.write(filename, arcname=None, compress_type=None) Write the file named *filename* to the archive, giving it the archive name *arcname* (by default, this will be the same as *filename*, but without a drive @@ -297,7 +296,7 @@ :class:`ZipFile` objects. -.. method:: PyZipFile.writepy(pathname[, basename]) +.. method:: PyZipFile.writepy(pathname, basename='') Search for files :file:`\*.py` and add the corresponding file to the archive. The corresponding file is a :file:`\*.pyo` file if available, else a Modified: python/branches/release31-maint/Doc/library/zipimport.rst ============================================================================== --- python/branches/release31-maint/Doc/library/zipimport.rst (original) +++ python/branches/release31-maint/Doc/library/zipimport.rst Wed Sep 16 18:05:59 2009 @@ -1,4 +1,3 @@ - :mod:`zipimport` --- Import modules from Zip archives ===================================================== Modified: python/branches/release31-maint/Doc/library/zlib.rst ============================================================================== --- python/branches/release31-maint/Doc/library/zlib.rst (original) +++ python/branches/release31-maint/Doc/library/zlib.rst Wed Sep 16 18:05:59 2009 @@ -1,10 +1,9 @@ - :mod:`zlib` --- Compression compatible with :program:`gzip` =========================================================== .. module:: zlib - :synopsis: Low-level interface to compression and decompression routines compatible with - gzip. + :synopsis: Low-level interface to compression and decompression routines + compatible with gzip. For applications that require data compression, the functions in this module Modified: python/branches/release31-maint/Doc/reference/simple_stmts.rst ============================================================================== --- python/branches/release31-maint/Doc/reference/simple_stmts.rst (original) +++ python/branches/release31-maint/Doc/reference/simple_stmts.rst Wed Sep 16 18:05:59 2009 @@ -170,6 +170,25 @@ perform the assignment, it raises an exception (usually but not necessarily :exc:`AttributeError`). + .. _attr-target-note: + + Note: If the object is a class instance and the attribute reference occurs on + both sides of the assignment operator, the RHS expression, ``a.x`` can access + either an instance attribute or (if no instance attribute exists) a class + attribute. The LHS target ``a.x`` is always set as an instance attribute, + creating it if necessary. Thus, the two occurrences of ``a.x`` do not + necessarily refer to the same attribute: if the RHS expression refers to a + class attribute, the LHS creates a new instance attribute as the target of the + assignment:: + + class Cls: + x = 3 # class variable + inst = Cls() + inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x as 3 + + This description does not necessarily apply to descriptor attributes, such as + properties created with :func:`property`. + .. index:: pair: subscription; assignment object: mutable @@ -276,16 +295,8 @@ *in-place* behavior, the binary operation performed by augmented assignment is the same as the normal binary operations. -For targets which are attribute references, the initial value is retrieved with -a :meth:`getattr` and the result is assigned with a :meth:`setattr`. Notice -that the two methods do not necessarily refer to the same variable. When -:meth:`getattr` refers to a class variable, :meth:`setattr` still writes to an -instance variable. For example:: - - class A: - x = 3 # class variable - a = A() - a.x += 1 # writes a.x as 4 leaving A.x as 3 +For targets which are attribute references, the same :ref:`caveat about class +and instance attributes ` applies as for regular assignments. .. _assert: Modified: python/branches/release31-maint/Doc/tools/sphinxext/pyspecific.py ============================================================================== --- python/branches/release31-maint/Doc/tools/sphinxext/pyspecific.py (original) +++ python/branches/release31-maint/Doc/tools/sphinxext/pyspecific.py Wed Sep 16 18:05:59 2009 @@ -20,6 +20,20 @@ Body.enum.converters['lowerroman'] = \ Body.enum.converters['upperroman'] = lambda x: None +# monkey-patch HTML translator to give versionmodified paragraphs a class +def new_visit_versionmodified(self, node): + self.body.append(self.starttag(node, 'p', CLASS=node['type'])) + text = versionlabels[node['type']] % node['version'] + if len(node): + text += ': ' + else: + text += '.' + self.body.append('%s' % text) + +from sphinx.writers.html import HTMLTranslator +from sphinx.locale import versionlabels +HTMLTranslator.visit_versionmodified = new_visit_versionmodified + def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): issue = utils.unescape(text) Modified: python/branches/release31-maint/Doc/tools/sphinxext/static/basic.css ============================================================================== --- python/branches/release31-maint/Doc/tools/sphinxext/static/basic.css (original) +++ python/branches/release31-maint/Doc/tools/sphinxext/static/basic.css Wed Sep 16 18:05:59 2009 @@ -5,15 +5,6 @@ /* -- main layout ----------------------------------------------------------- */ -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - div.clearer { clear: both; } @@ -338,6 +329,12 @@ font-style: italic; } +p.deprecated { + background-color: #ffe4e4; + border: 1px solid #f66; + padding: 7px +} + .system-message { background-color: #fda; padding: 5px; @@ -394,7 +391,7 @@ vertical-align: middle; } -div.math p { +div.body div.math p { text-align: center; } Modified: python/branches/release31-maint/Doc/tutorial/errors.rst ============================================================================== --- python/branches/release31-maint/Doc/tutorial/errors.rst (original) +++ python/branches/release31-maint/Doc/tutorial/errors.rst Wed Sep 16 18:05:59 2009 @@ -242,9 +242,10 @@ User-defined Exceptions ======================= -Programs may name their own exceptions by creating a new exception class. -Exceptions should typically be derived from the :exc:`Exception` class, either -directly or indirectly. For example:: +Programs may name their own exceptions by creating a new exception class (see +:ref:`tut-classes` for more about Python classes). Exceptions should typically +be derived from the :exc:`Exception` class, either directly or indirectly. For +example:: >>> class MyError(Exception): ... def __init__(self, value): Modified: python/branches/release31-maint/Lib/threading.py ============================================================================== --- python/branches/release31-maint/Lib/threading.py (original) +++ python/branches/release31-maint/Lib/threading.py Wed Sep 16 18:05:59 2009 @@ -97,7 +97,7 @@ owner and owner.name, self._count) - def acquire(self, blocking=1): + def acquire(self, blocking=True): me = current_thread() if self._owner is me: self._count = self._count + 1 @@ -289,7 +289,7 @@ self._cond = Condition(Lock()) self._value = value - def acquire(self, blocking=1): + def acquire(self, blocking=True): rc = False self._cond.acquire() while self._value == 0: Modified: python/branches/release31-maint/Lib/traceback.py ============================================================================== --- python/branches/release31-maint/Lib/traceback.py (original) +++ python/branches/release31-maint/Lib/traceback.py Wed Sep 16 18:05:59 2009 @@ -70,11 +70,11 @@ tb = tb.tb_next n = n+1 -def format_tb(tb, limit = None): +def format_tb(tb, limit=None): """A shorthand for 'format_list(extract_stack(f, limit)).""" return format_list(extract_tb(tb, limit)) -def extract_tb(tb, limit = None): +def extract_tb(tb, limit=None): """Return list of up to limit pre-processed entries from traceback. This is useful for alternate formatting of stack traces. If @@ -304,7 +304,7 @@ f = sys.exc_info()[2].tb_frame.f_back return format_list(extract_stack(f, limit)) -def extract_stack(f=None, limit = None): +def extract_stack(f=None, limit=None): """Extract the raw traceback from the current stack frame. The return value has the same format as for extract_tb(). The Modified: python/branches/release31-maint/Lib/urllib/parse.py ============================================================================== --- python/branches/release31-maint/Lib/urllib/parse.py (original) +++ python/branches/release31-maint/Lib/urllib/parse.py Wed Sep 16 18:05:59 2009 @@ -329,7 +329,7 @@ res[-1] = b''.join(pct_sequence).decode(encoding, errors) return ''.join(res) -def parse_qs(qs, keep_blank_values=0, strict_parsing=0): +def parse_qs(qs, keep_blank_values=False, strict_parsing=False): """Parse a query given as a string argument. Arguments: @@ -355,7 +355,7 @@ dict[name] = [value] return dict -def parse_qsl(qs, keep_blank_values=0, strict_parsing=0): +def parse_qsl(qs, keep_blank_values=False, strict_parsing=False): """Parse a query given as a string argument. Arguments: @@ -509,7 +509,7 @@ _safe_quoters[cachekey] = quoter return ''.join([quoter[char] for char in bs]) -def urlencode(query, doseq=0): +def urlencode(query, doseq=False): """Encode a sequence of two-element tuples or dictionary into a URL query string. If any values in the query arg are sequences and doseq is true, each Modified: python/branches/release31-maint/Lib/uu.py ============================================================================== --- python/branches/release31-maint/Lib/uu.py (original) +++ python/branches/release31-maint/Lib/uu.py Wed Sep 16 18:05:59 2009 @@ -80,7 +80,7 @@ out_file.write(b' \nend\n') -def decode(in_file, out_file=None, mode=None, quiet=0): +def decode(in_file, out_file=None, mode=None, quiet=False): """Decode uuencoded file""" # # Open the input file, if needed. Modified: python/branches/release31-maint/Lib/warnings.py ============================================================================== --- python/branches/release31-maint/Lib/warnings.py (original) +++ python/branches/release31-maint/Lib/warnings.py Wed Sep 16 18:05:59 2009 @@ -29,7 +29,7 @@ return s def filterwarnings(action, message="", category=Warning, module="", lineno=0, - append=0): + append=False): """Insert an entry into the list of warnings filters (at the front). Use assertions to check that all arguments have the right type.""" @@ -49,7 +49,7 @@ else: filters.insert(0, item) -def simplefilter(action, category=Warning, lineno=0, append=0): +def simplefilter(action, category=Warning, lineno=0, append=False): """Insert a simple entry into the list of warnings filters (at the front). A simple filter matches all modules and messages. Modified: python/branches/release31-maint/Lib/wsgiref/util.py ============================================================================== --- python/branches/release31-maint/Lib/wsgiref/util.py (original) +++ python/branches/release31-maint/Lib/wsgiref/util.py Wed Sep 16 18:05:59 2009 @@ -67,7 +67,7 @@ url += quote(environ.get('SCRIPT_NAME') or '/') return url -def request_uri(environ, include_query=1): +def request_uri(environ, include_query=True): """Return the full request URI, optionally including the query string""" url = application_uri(environ) from urllib.parse import quote Modified: python/branches/release31-maint/Lib/xml/dom/domreg.py ============================================================================== --- python/branches/release31-maint/Lib/xml/dom/domreg.py (original) +++ python/branches/release31-maint/Lib/xml/dom/domreg.py Wed Sep 16 18:05:59 2009 @@ -36,7 +36,7 @@ return 0 return 1 -def getDOMImplementation(name = None, features = ()): +def getDOMImplementation(name=None, features=()): """getDOMImplementation(name = None, features = ()) -> DOM implementation. Return a suitable DOM implementation. The name is either Modified: python/branches/release31-maint/Lib/xml/dom/minidom.py ============================================================================== --- python/branches/release31-maint/Lib/xml/dom/minidom.py (original) +++ python/branches/release31-maint/Lib/xml/dom/minidom.py Wed Sep 16 18:05:59 2009 @@ -43,7 +43,7 @@ def __bool__(self): return True - def toxml(self, encoding = None): + def toxml(self, encoding=None): return self.toprettyxml("", "", encoding) def toprettyxml(self, indent="\t", newl="\n", encoding=None): Modified: python/branches/release31-maint/Lib/xml/sax/saxutils.py ============================================================================== --- python/branches/release31-maint/Lib/xml/sax/saxutils.py (original) +++ python/branches/release31-maint/Lib/xml/sax/saxutils.py Wed Sep 16 18:05:59 2009 @@ -268,7 +268,7 @@ # --- Utility functions -def prepare_input_source(source, base = ""): +def prepare_input_source(source, base=""): """This function takes an InputSource and an optional base URL and returns a fully resolved InputSource object ready for reading.""" Modified: python/branches/release31-maint/Lib/xmlrpc/client.py ============================================================================== --- python/branches/release31-maint/Lib/xmlrpc/client.py (original) +++ python/branches/release31-maint/Lib/xmlrpc/client.py Wed Sep 16 18:05:59 2009 @@ -480,7 +480,7 @@ # by the way, if you don't understand what's going on in here, # that's perfectly ok. - def __init__(self, encoding=None, allow_none=0): + def __init__(self, encoding=None, allow_none=False): self.memo = {} self.data = None self.encoding = encoding @@ -653,7 +653,7 @@ # and again, if you don't understand what's going on in here, # that's perfectly ok. - def __init__(self, use_datetime=0): + def __init__(self, use_datetime=False): self._type = None self._stack = [] self._marks = [] @@ -886,7 +886,7 @@ # # return A (parser, unmarshaller) tuple. -def getparser(use_datetime=0): +def getparser(use_datetime=False): """getparser() -> parser, unmarshaller Create an instance of the fastest available parser, and attach it @@ -923,7 +923,7 @@ # @return A string containing marshalled data. def dumps(params, methodname=None, methodresponse=None, encoding=None, - allow_none=0): + allow_none=False): """data [,options] -> marshalled data Convert an argument tuple or a Fault instance to an XML-RPC @@ -999,7 +999,7 @@ # (None if not present). # @see Fault -def loads(data, use_datetime=0): +def loads(data, use_datetime=False): """data -> unmarshalled data, method name Convert an XML-RPC packet to unmarshalled data plus a method @@ -1040,7 +1040,7 @@ # client identifier (may be overridden) user_agent = "xmlrpclib.py/%s (by www.pythonware.com)" % __version__ - def __init__(self, use_datetime=0): + def __init__(self, use_datetime=False): self._use_datetime = use_datetime ## @@ -1052,7 +1052,7 @@ # @param verbose Debugging flag. # @return Parsed response. - def request(self, host, handler, request_body, verbose=0): + def request(self, host, handler, request_body, verbose=False): # issue XML-RPC request http_conn = self.send_request(host, handler, request_body, verbose) @@ -1234,8 +1234,8 @@ the given encoding. """ - def __init__(self, uri, transport=None, encoding=None, verbose=0, - allow_none=0, use_datetime=0): + def __init__(self, uri, transport=None, encoding=None, verbose=False, + allow_none=False, use_datetime=False): # establish a "logical" server connection # get the url Modified: python/branches/release31-maint/Lib/xmlrpc/server.py ============================================================================== --- python/branches/release31-maint/Lib/xmlrpc/server.py (original) +++ python/branches/release31-maint/Lib/xmlrpc/server.py Wed Sep 16 18:05:59 2009 @@ -201,7 +201,7 @@ self.instance = instance self.allow_dotted_names = allow_dotted_names - def register_function(self, function, name = None): + def register_function(self, function, name=None): """Registers a function to respond to XML-RPC requests. The optional name argument can be used to set a Unicode name @@ -578,7 +578,7 @@ sys.stdout.buffer.write(response) sys.stdout.buffer.flush() - def handle_request(self, request_text = None): + def handle_request(self, request_text=None): """Handle a single XML-RPC request passed through a CGI post method. If no XML data is given then it is read from stdin. The resulting @@ -837,7 +837,7 @@ """ def __init__(self, addr, requestHandler=DocXMLRPCRequestHandler, - logRequests=1, allow_none=False, encoding=None, + logRequests=True, allow_none=False, encoding=None, bind_and_activate=True): SimpleXMLRPCServer.__init__(self, addr, requestHandler, logRequests, allow_none, encoding, bind_and_activate) Modified: python/branches/release31-maint/Lib/zipfile.py ============================================================================== --- python/branches/release31-maint/Lib/zipfile.py (original) +++ python/branches/release31-maint/Lib/zipfile.py Wed Sep 16 18:05:59 2009 @@ -1255,7 +1255,7 @@ class PyZipFile(ZipFile): """Class to create ZIP archives with Python library files and packages.""" - def writepy(self, pathname, basename = ""): + def writepy(self, pathname, basename=""): """Add all files from "pathname" to the ZIP archive. If pathname is a package directory, search the directory and From python-checkins at python.org Wed Sep 16 18:09:06 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 16:09:06 -0000 Subject: [Python-checkins] r74837 - in python/branches/release31-maint: Doc/library/__future__.rst Message-ID: Author: georg.brandl Date: Wed Sep 16 18:09:06 2009 New Revision: 74837 Log: Merged revisions 74792,74810 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ................ r74792 | georg.brandl | 2009-09-14 16:49:30 +0200 (Mo, 14 Sep 2009) | 9 lines Recorded merge of revisions 74791 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74791 | georg.brandl | 2009-09-14 16:08:54 +0200 (Mo, 14 Sep 2009) | 1 line #6574: list the future features in a table. ........ ................ r74810 | georg.brandl | 2009-09-15 21:55:15 +0200 (Di, 15 Sep 2009) | 1 line Do not document the most important (at least for Guido) future import. ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/__future__.rst Modified: python/branches/release31-maint/Doc/library/__future__.rst ============================================================================== --- python/branches/release31-maint/Doc/library/__future__.rst (original) +++ python/branches/release31-maint/Doc/library/__future__.rst Wed Sep 16 18:09:06 2009 @@ -10,9 +10,9 @@ * To avoid confusing existing tools that analyze import statements and expect to find the modules they're importing. -* To ensure that future_statements run under releases prior to 2.1 at least - yield runtime exceptions (the import of :mod:`__future__` will fail, because - there was no module of that name prior to 2.1). +* To ensure that :ref:`future statements ` run under releases prior to + 2.1 at least yield runtime exceptions (the import of :mod:`__future__` will + fail, because there was no module of that name prior to 2.1). * To document when incompatible changes were introduced, and when they will be --- or were --- made mandatory. This is a form of executable documentation, and @@ -56,7 +56,35 @@ dynamically compiled code. This flag is stored in the :attr:`compiler_flag` attribute on :class:`_Feature` instances. -No feature description will ever be deleted from :mod:`__future__`. +No feature description will ever be deleted from :mod:`__future__`. Since its +introduction in Python 2.1 the following features have found their way into the +language using this mechanism: + ++------------------+-------------+--------------+---------------------------------------------+ +| feature | optional in | mandatory in | effect | ++==================+=============+==============+=============================================+ +| nested_scopes | 2.1.0b1 | 2.2 | :pep:`227`: | +| | | | *Statically Nested Scopes* | ++------------------+-------------+--------------+---------------------------------------------+ +| generators | 2.2.0a1 | 2.3 | :pep:`255`: | +| | | | *Simple Generators* | ++------------------+-------------+--------------+---------------------------------------------+ +| division | 2.2.0a2 | 3.0 | :pep:`238`: | +| | | | *Changing the Division Operator* | ++------------------+-------------+--------------+---------------------------------------------+ +| absolute_import | 2.5.0a1 | 2.7 | :pep:`328`: | +| | | | *Imports: Multi-Line and Absolute/Relative* | ++------------------+-------------+--------------+---------------------------------------------+ +| with_statement | 2.5.0a1 | 2.6 | :pep:`343`: | +| | | | *The "with" Statement* | ++------------------+-------------+--------------+---------------------------------------------+ +| print_function | 2.6.0a2 | 3.0 | :pep:`3105`: | +| | | | *Make print a function* | ++------------------+-------------+--------------+---------------------------------------------+ +| unicode_literals | 2.6.0a2 | 3.0 | :pep:`3112`: | +| | | | *Bytes literals in Python 3000* | ++------------------+-------------+--------------+---------------------------------------------+ + .. seealso:: From python-checkins at python.org Wed Sep 16 18:22:13 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 16:22:13 -0000 Subject: [Python-checkins] r74838 - python/trunk/Lib/test/test_pdb.py Message-ID: Author: georg.brandl Date: Wed Sep 16 18:22:12 2009 New Revision: 74838 Log: Remove some more boilerplate from the actual tests in test_pdb. Modified: python/trunk/Lib/test/test_pdb.py Modified: python/trunk/Lib/test/test_pdb.py ============================================================================== --- python/trunk/Lib/test/test_pdb.py (original) +++ python/trunk/Lib/test/test_pdb.py Wed Sep 16 18:22:12 2009 @@ -12,23 +12,33 @@ from test_doctest import _FakeInput +class PdbTestInput(object): + """Context manager that makes testing Pdb in doctests easier.""" + + def __init__(self, input): + self.input = input + + def __enter__(self): + self.real_stdin = sys.stdin + sys.stdin = _FakeInput(self.input) + + def __exit__(self, *exc): + sys.stdin = self.real_stdin + + def test_pdb_skip_modules(): """This illustrates the simple case of module skipping. >>> def skip_module(): ... import string - ... import pdb;pdb.Pdb(skip=['string*']).set_trace() + ... import pdb; pdb.Pdb(skip=['string*']).set_trace() ... string.lower('FOO') - >>> real_stdin = sys.stdin - >>> sys.stdin = _FakeInput([ - ... 'step', - ... 'continue', - ... ]) - >>> try: + >>> with PdbTestInput([ + ... 'step', + ... 'continue' + ... ]): ... skip_module() - ... finally: - ... sys.stdin = real_stdin > (4)skip_module() -> string.lower('FOO') (Pdb) step @@ -36,7 +46,7 @@ > (4)skip_module()->None -> string.lower('FOO') (Pdb) continue -""" + """ # Module for testing skipping of module that makes a callback @@ -50,22 +60,19 @@ >>> def skip_module(): ... def callback(): ... return None - ... import pdb;pdb.Pdb(skip=['module_to_skip*']).set_trace() + ... import pdb; pdb.Pdb(skip=['module_to_skip*']).set_trace() ... mod.foo_pony(callback) - >>> real_stdin = sys.stdin - >>> sys.stdin = _FakeInput([ - ... 'step', - ... 'step', - ... 'step', - ... 'step', - ... 'step', - ... 'continue', - ... ]) - >>> try: + >>> with PdbTestInput([ + ... 'step', + ... 'step', + ... 'step', + ... 'step', + ... 'step', + ... 'continue', + ... ]): ... skip_module() - ... finally: - ... sys.stdin = real_stdin + ... pass # provides something to "step" to > (5)skip_module() -> mod.foo_pony(callback) (Pdb) step @@ -84,10 +91,10 @@ > (5)skip_module()->None -> mod.foo_pony(callback) (Pdb) step - > (4)() - -> sys.stdin = real_stdin + > (10)() + -> pass # provides something to "step" to (Pdb) continue -""" + """ def test_main(): From python-checkins at python.org Wed Sep 16 18:36:39 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 16:36:39 -0000 Subject: [Python-checkins] r74839 - in python/trunk/Lib: pdb.py test/test_pdb.py Message-ID: Author: georg.brandl Date: Wed Sep 16 18:36:39 2009 New Revision: 74839 Log: Make the pdb displayhook compatible with the standard displayhook: do not print Nones. Add a test for that. Modified: python/trunk/Lib/pdb.py python/trunk/Lib/test/test_pdb.py Modified: python/trunk/Lib/pdb.py ============================================================================== --- python/trunk/Lib/pdb.py (original) +++ python/trunk/Lib/pdb.py Wed Sep 16 18:36:39 2009 @@ -210,7 +210,9 @@ """Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins. """ - print repr(obj) + # reproduce the behavior of the standard displayhook, not printing None + if obj is not None: + print repr(obj) def default(self, line): if line[:1] == '!': line = line[1:] Modified: python/trunk/Lib/test/test_pdb.py ============================================================================== --- python/trunk/Lib/test/test_pdb.py (original) +++ python/trunk/Lib/test/test_pdb.py Wed Sep 16 18:36:39 2009 @@ -26,6 +26,38 @@ sys.stdin = self.real_stdin +def write(x): + print x + +def test_pdb_displayhook(): + """This tests the custom displayhook for pdb. + + >>> def test_function(foo, bar): + ... import pdb; pdb.Pdb().set_trace() + ... pass + + >>> with PdbTestInput([ + ... 'foo', + ... 'bar', + ... 'for i in range(5): write(i)', + ... 'continue', + ... ]): + ... test_function(1, None) + > (3)test_function() + -> pass + (Pdb) foo + 1 + (Pdb) bar + (Pdb) for i in range(5): write(i) + 0 + 1 + 2 + 3 + 4 + (Pdb) continue + """ + + def test_pdb_skip_modules(): """This illustrates the simple case of module skipping. @@ -36,7 +68,7 @@ >>> with PdbTestInput([ ... 'step', - ... 'continue' + ... 'continue', ... ]): ... skip_module() > (4)skip_module() From python-checkins at python.org Wed Sep 16 18:40:46 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 16:40:46 -0000 Subject: [Python-checkins] r74840 - in python/branches/py3k: Lib/pdb.py Lib/test/test_pdb.py Message-ID: Author: georg.brandl Date: Wed Sep 16 18:40:45 2009 New Revision: 74840 Log: Merged revisions 74838-74839 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74838 | georg.brandl | 2009-09-16 18:22:12 +0200 (Mi, 16 Sep 2009) | 1 line Remove some more boilerplate from the actual tests in test_pdb. ........ r74839 | georg.brandl | 2009-09-16 18:36:39 +0200 (Mi, 16 Sep 2009) | 1 line Make the pdb displayhook compatible with the standard displayhook: do not print Nones. Add a test for that. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/pdb.py python/branches/py3k/Lib/test/test_pdb.py Modified: python/branches/py3k/Lib/pdb.py ============================================================================== --- python/branches/py3k/Lib/pdb.py (original) +++ python/branches/py3k/Lib/pdb.py Wed Sep 16 18:40:45 2009 @@ -208,7 +208,9 @@ """Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins. """ - print(repr(obj)) + # reproduce the behavior of the standard displayhook, not printing None + if obj is not None: + print(repr(obj)) def default(self, line): if line[:1] == '!': line = line[1:] Modified: python/branches/py3k/Lib/test/test_pdb.py ============================================================================== --- python/branches/py3k/Lib/test/test_pdb.py (original) +++ python/branches/py3k/Lib/test/test_pdb.py Wed Sep 16 18:40:45 2009 @@ -12,6 +12,49 @@ from test.test_doctest import _FakeInput +class PdbTestInput(object): + """Context manager that makes testing Pdb in doctests easier.""" + + def __init__(self, input): + self.input = input + + def __enter__(self): + self.real_stdin = sys.stdin + sys.stdin = _FakeInput(self.input) + + def __exit__(self, *exc): + sys.stdin = self.real_stdin + + +def test_pdb_displayhook(): + """This tests the custom displayhook for pdb. + + >>> def test_function(foo, bar): + ... import pdb; pdb.Pdb().set_trace() + ... pass + + >>> with PdbTestInput([ + ... 'foo', + ... 'bar', + ... 'for i in range(5): print(i)', + ... 'continue', + ... ]): + ... test_function(1, None) + > (3)test_function() + -> pass + (Pdb) foo + 1 + (Pdb) bar + (Pdb) for i in range(5): print(i) + 0 + 1 + 2 + 3 + 4 + (Pdb) continue + """ + + def test_pdb_skip_modules(): """This illustrates the simple case of module skipping. @@ -19,16 +62,12 @@ ... import string ... import pdb; pdb.Pdb(skip=['stri*']).set_trace() ... string.capwords('FOO') - >>> real_stdin = sys.stdin - >>> sys.stdin = _FakeInput([ - ... 'step', - ... 'continue', - ... ]) - >>> try: + >>> with PdbTestInput([ + ... 'step', + ... 'continue', + ... ]): ... skip_module() - ... finally: - ... sys.stdin = real_stdin > (4)skip_module() -> string.capwords('FOO') (Pdb) step @@ -36,7 +75,7 @@ > (4)skip_module()->None -> string.capwords('FOO') (Pdb) continue -""" + """ # Module for testing skipping of module that makes a callback @@ -50,22 +89,19 @@ >>> def skip_module(): ... def callback(): ... return None - ... import pdb;pdb.Pdb(skip=['module_to_skip*']).set_trace() + ... import pdb; pdb.Pdb(skip=['module_to_skip*']).set_trace() ... mod.foo_pony(callback) - >>> real_stdin = sys.stdin - >>> sys.stdin = _FakeInput([ - ... 'step', - ... 'step', - ... 'step', - ... 'step', - ... 'step', - ... 'continue', - ... ]) - >>> try: + >>> with PdbTestInput([ + ... 'step', + ... 'step', + ... 'step', + ... 'step', + ... 'step', + ... 'continue', + ... ]): ... skip_module() - ... finally: - ... sys.stdin = real_stdin + ... pass # provides something to "step" to > (5)skip_module() -> mod.foo_pony(callback) (Pdb) step @@ -84,10 +120,10 @@ > (5)skip_module()->None -> mod.foo_pony(callback) (Pdb) step - > (4)() - -> sys.stdin = real_stdin + > (10)() + -> pass # provides something to "step" to (Pdb) continue -""" + """ def test_main(): From python-checkins at python.org Wed Sep 16 21:55:55 2009 From: python-checkins at python.org (thomas.wouters) Date: Wed, 16 Sep 2009 19:55:55 -0000 Subject: [Python-checkins] r74841 - in python/trunk: Doc/c-api/init.rst Include/import.h Lib/test/test_fork1.py Modules/posixmodule.c Python/import.c Message-ID: Author: thomas.wouters Date: Wed Sep 16 21:55:54 2009 New Revision: 74841 Log: Fix issue #1590864, multiple threads and fork() can cause deadlocks, by acquiring the import lock around fork() calls. This prevents other threads from having that lock while the fork happens, and is the recommended way of dealing with such issues. There are two other locks we care about, the GIL and the Thread Local Storage lock. The GIL is obviously held when calling Python functions like os.fork(), and the TLS lock is explicitly reallocated instead, while also deleting now-orphaned TLS data. This only fixes calls to os.fork(), not extension modules or embedding programs calling C's fork() directly. Solving that requires a new set of API functions, and possibly a rewrite of the Python/thread_*.c mess. Add a warning explaining the problem to the documentation in the mean time. This also changes behaviour a little on AIX. Before, AIX (but only AIX) was getting the import lock reallocated, seemingly to avoid this very same problem. This is not the right approach, because the import lock is a re-entrant one, and reallocating would do the wrong thing when forking while holding the import lock. Will backport to 2.6 and 2.5, minus the tiny AIX behaviour change. Modified: python/trunk/Doc/c-api/init.rst python/trunk/Include/import.h python/trunk/Lib/test/test_fork1.py python/trunk/Modules/posixmodule.c python/trunk/Python/import.c Modified: python/trunk/Doc/c-api/init.rst ============================================================================== --- python/trunk/Doc/c-api/init.rst (original) +++ python/trunk/Doc/c-api/init.rst Wed Sep 16 21:55:54 2009 @@ -523,6 +523,22 @@ :cfunc:`Py_NewInterpreter`), but mixing multiple interpreters and the :cfunc:`PyGILState_\*` API is unsupported. +Another important thing to note about threads is their behaviour in the face +of the C :cfunc:`fork` call. On most systems with :cfunc:`fork`, after a +process forks only the thread that issued the fork will exist. That also +means any locks held by other threads will never be released. Python solves +this for :func:`os.fork` by acquiring the locks it uses internally before +the fork, and releasing them afterwards. In addition, it resets any +:ref:`lock-objects` in the child. When extending or embedding Python, there +is no way to inform Python of additional (non-Python) locks that need to be +acquired before or reset after a fork. OS facilities such as +:cfunc:`posix_atfork` would need to be used to accomplish the same thing. +Additionally, when extending or embedding Python, calling :cfunc:`fork` +directly rather than through :func:`os.fork` (and returning to or calling +into Python) may result in a deadlock by one of Python's internal locks +being held by a thread that is defunct after the fork. +:cfunc:`PyOS_AfterFork` tries to reset the necessary locks, but is not +always able to. .. ctype:: PyInterpreterState Modified: python/trunk/Include/import.h ============================================================================== --- python/trunk/Include/import.h (original) +++ python/trunk/Include/import.h Wed Sep 16 21:55:54 2009 @@ -27,6 +27,14 @@ PyAPI_FUNC(void) PyImport_Cleanup(void); PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *); +#ifdef WITH_THREAD +PyAPI_FUNC(void) _PyImport_AcquireLock(void); +PyAPI_FUNC(int) _PyImport_ReleaseLock(void); +#else +#define _PyImport_AcquireLock() +#define _PyImport_ReleaseLock() 1 +#endif + PyAPI_FUNC(struct filedescr *) _PyImport_FindModule( const char *, PyObject *, char *, size_t, FILE **, PyObject **); PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr *); Modified: python/trunk/Lib/test/test_fork1.py ============================================================================== --- python/trunk/Lib/test/test_fork1.py (original) +++ python/trunk/Lib/test/test_fork1.py Wed Sep 16 21:55:54 2009 @@ -1,8 +1,14 @@ """This test checks for correct fork() behavior. """ +import errno +import imp import os +import signal +import sys import time +import threading + from test.fork_wait import ForkWait from test.test_support import run_unittest, reap_children, get_attribute @@ -23,6 +29,41 @@ self.assertEqual(spid, cpid) self.assertEqual(status, 0, "cause = %d, exit = %d" % (status&0xff, status>>8)) + def test_import_lock_fork(self): + import_started = threading.Event() + fake_module_name = "fake test module" + partial_module = "partial" + complete_module = "complete" + def importer(): + imp.acquire_lock() + sys.modules[fake_module_name] = partial_module + import_started.set() + time.sleep(0.01) # Give the other thread time to try and acquire. + sys.modules[fake_module_name] = complete_module + imp.release_lock() + t = threading.Thread(target=importer) + t.start() + import_started.wait() + pid = os.fork() + try: + if not pid: + m = __import__(fake_module_name) + if m == complete_module: + os._exit(0) + else: + os._exit(1) + else: + t.join() + # Exitcode 1 means the child got a partial module (bad.) No + # exitcode (but a hang, which manifests as 'got pid 0') + # means the child deadlocked (also bad.) + self.wait_impl(pid) + finally: + try: + os.kill(pid, signal.SIGKILL) + except OSError: + pass + def test_main(): run_unittest(ForkTest) reap_children() Modified: python/trunk/Modules/posixmodule.c ============================================================================== --- python/trunk/Modules/posixmodule.c (original) +++ python/trunk/Modules/posixmodule.c Wed Sep 16 21:55:54 2009 @@ -3603,11 +3603,21 @@ static PyObject * posix_fork1(PyObject *self, PyObject *noargs) { - pid_t pid = fork1(); + pid_t pid; + int result; + _PyImport_AcquireLock(); + pid = fork1(); + result = _PyImport_ReleaseLock(); if (pid == -1) return posix_error(); if (pid == 0) PyOS_AfterFork(); + if (result < 0) { + /* Don't clobber the OSError if the fork failed. */ + PyErr_SetString(PyExc_RuntimeError, + "not holding the import lock"); + return NULL; + } return PyLong_FromPid(pid); } #endif @@ -3622,11 +3632,21 @@ static PyObject * posix_fork(PyObject *self, PyObject *noargs) { - pid_t pid = fork(); + pid_t pid; + int result; + _PyImport_AcquireLock(); + pid = fork(); + result = _PyImport_ReleaseLock(); if (pid == -1) return posix_error(); if (pid == 0) PyOS_AfterFork(); + if (result < 0) { + /* Don't clobber the OSError if the fork failed. */ + PyErr_SetString(PyExc_RuntimeError, + "not holding the import lock"); + return NULL; + } return PyLong_FromPid(pid); } #endif @@ -3729,14 +3749,22 @@ static PyObject * posix_forkpty(PyObject *self, PyObject *noargs) { - int master_fd = -1; + int master_fd = -1, result; pid_t pid; + _PyImport_AcquireLock(); pid = forkpty(&master_fd, NULL, NULL, NULL); + result = _PyImport_ReleaseLock(); if (pid == -1) return posix_error(); if (pid == 0) PyOS_AfterFork(); + if (result < 0) { + /* Don't clobber the OSError if the fork failed. */ + PyErr_SetString(PyExc_RuntimeError, + "not holding the import lock"); + return NULL; + } return Py_BuildValue("(Ni)", PyLong_FromPid(pid), master_fd); } #endif Modified: python/trunk/Python/import.c ============================================================================== --- python/trunk/Python/import.c (original) +++ python/trunk/Python/import.c Wed Sep 16 21:55:54 2009 @@ -258,8 +258,8 @@ static long import_lock_thread = -1; static int import_lock_level = 0; -static void -lock_import(void) +void +_PyImport_AcquireLock(void) { long me = PyThread_get_thread_ident(); if (me == -1) @@ -283,8 +283,8 @@ import_lock_level = 1; } -static int -unlock_import(void) +int +_PyImport_ReleaseLock(void) { long me = PyThread_get_thread_ident(); if (me == -1 || import_lock == NULL) @@ -299,23 +299,16 @@ return 1; } -/* This function is called from PyOS_AfterFork to ensure that newly - created child processes do not share locks with the parent. */ +/* This function used to be called from PyOS_AfterFork to ensure that newly + created child processes do not share locks with the parent, but for some + reason only on AIX systems. Instead of re-initializing the lock, we now + acquire the import lock around fork() calls. */ void _PyImport_ReInitLock(void) { -#ifdef _AIX - if (import_lock != NULL) - import_lock = PyThread_allocate_lock(); -#endif } -#else - -#define lock_import() -#define unlock_import() 0 - #endif static PyObject * @@ -332,7 +325,7 @@ imp_acquire_lock(PyObject *self, PyObject *noargs) { #ifdef WITH_THREAD - lock_import(); + _PyImport_AcquireLock(); #endif Py_INCREF(Py_None); return Py_None; @@ -342,7 +335,7 @@ imp_release_lock(PyObject *self, PyObject *noargs) { #ifdef WITH_THREAD - if (unlock_import() < 0) { + if (_PyImport_ReleaseLock() < 0) { PyErr_SetString(PyExc_RuntimeError, "not holding the import lock"); return NULL; @@ -2185,9 +2178,9 @@ PyObject *fromlist, int level) { PyObject *result; - lock_import(); + _PyImport_AcquireLock(); result = import_module_level(name, globals, locals, fromlist, level); - if (unlock_import() < 0) { + if (_PyImport_ReleaseLock() < 0) { Py_XDECREF(result); PyErr_SetString(PyExc_RuntimeError, "not holding the import lock"); From python-checkins at python.org Wed Sep 16 22:06:37 2009 From: python-checkins at python.org (thomas.wouters) Date: Wed, 16 Sep 2009 20:06:37 -0000 Subject: [Python-checkins] r74842 - in python/branches/release26-maint: Doc/c-api/init.rst Include/import.h Lib/test/test_fork1.py Modules/posixmodule.c Python/import.c Message-ID: Author: thomas.wouters Date: Wed Sep 16 22:06:36 2009 New Revision: 74842 Log: Merged revisions 74841 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74841 | thomas.wouters | 2009-09-16 12:55:54 -0700 (Wed, 16 Sep 2009) | 23 lines Fix issue #1590864, multiple threads and fork() can cause deadlocks, by acquiring the import lock around fork() calls. This prevents other threads from having that lock while the fork happens, and is the recommended way of dealing with such issues. There are two other locks we care about, the GIL and the Thread Local Storage lock. The GIL is obviously held when calling Python functions like os.fork(), and the TLS lock is explicitly reallocated instead, while also deleting now-orphaned TLS data. This only fixes calls to os.fork(), not extension modules or embedding programs calling C's fork() directly. Solving that requires a new set of API functions, and possibly a rewrite of the Python/thread_*.c mess. Add a warning explaining the problem to the documentation in the mean time. This also changes behaviour a little on AIX. Before, AIX (but only AIX) was getting the import lock reallocated, seemingly to avoid this very same problem. This is not the right approach, because the import lock is a re-entrant one, and reallocating would do the wrong thing when forking while holding the import lock. Will backport to 2.6 and 2.5, minus the tiny AIX behaviour change. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/c-api/init.rst python/branches/release26-maint/Include/import.h python/branches/release26-maint/Lib/test/test_fork1.py python/branches/release26-maint/Modules/posixmodule.c python/branches/release26-maint/Python/import.c Modified: python/branches/release26-maint/Doc/c-api/init.rst ============================================================================== --- python/branches/release26-maint/Doc/c-api/init.rst (original) +++ python/branches/release26-maint/Doc/c-api/init.rst Wed Sep 16 22:06:36 2009 @@ -523,6 +523,22 @@ :cfunc:`Py_NewInterpreter`), but mixing multiple interpreters and the :cfunc:`PyGILState_\*` API is unsupported. +Another important thing to note about threads is their behaviour in the face +of the C :cfunc:`fork` call. On most systems with :cfunc:`fork`, after a +process forks only the thread that issued the fork will exist. That also +means any locks held by other threads will never be released. Python solves +this for :func:`os.fork` by acquiring the locks it uses internally before +the fork, and releasing them afterwards. In addition, it resets any +:ref:`lock-objects` in the child. When extending or embedding Python, there +is no way to inform Python of additional (non-Python) locks that need to be +acquired before or reset after a fork. OS facilities such as +:cfunc:`posix_atfork` would need to be used to accomplish the same thing. +Additionally, when extending or embedding Python, calling :cfunc:`fork` +directly rather than through :func:`os.fork` (and returning to or calling +into Python) may result in a deadlock by one of Python's internal locks +being held by a thread that is defunct after the fork. +:cfunc:`PyOS_AfterFork` tries to reset the necessary locks, but is not +always able to. .. ctype:: PyInterpreterState Modified: python/branches/release26-maint/Include/import.h ============================================================================== --- python/branches/release26-maint/Include/import.h (original) +++ python/branches/release26-maint/Include/import.h Wed Sep 16 22:06:36 2009 @@ -27,6 +27,14 @@ PyAPI_FUNC(void) PyImport_Cleanup(void); PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *); +#ifdef WITH_THREAD +PyAPI_FUNC(void) _PyImport_AcquireLock(void); +PyAPI_FUNC(int) _PyImport_ReleaseLock(void); +#else +#define _PyImport_AcquireLock() +#define _PyImport_ReleaseLock() 1 +#endif + PyAPI_FUNC(struct filedescr *) _PyImport_FindModule( const char *, PyObject *, char *, size_t, FILE **, PyObject **); PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr *); Modified: python/branches/release26-maint/Lib/test/test_fork1.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_fork1.py (original) +++ python/branches/release26-maint/Lib/test/test_fork1.py Wed Sep 16 22:06:36 2009 @@ -1,8 +1,14 @@ """This test checks for correct fork() behavior. """ +import errno +import imp import os +import signal +import sys import time +import threading + from test.fork_wait import ForkWait from test.test_support import TestSkipped, run_unittest, reap_children @@ -24,6 +30,41 @@ self.assertEqual(spid, cpid) self.assertEqual(status, 0, "cause = %d, exit = %d" % (status&0xff, status>>8)) + def test_import_lock_fork(self): + import_started = threading.Event() + fake_module_name = "fake test module" + partial_module = "partial" + complete_module = "complete" + def importer(): + imp.acquire_lock() + sys.modules[fake_module_name] = partial_module + import_started.set() + time.sleep(0.01) # Give the other thread time to try and acquire. + sys.modules[fake_module_name] = complete_module + imp.release_lock() + t = threading.Thread(target=importer) + t.start() + import_started.wait() + pid = os.fork() + try: + if not pid: + m = __import__(fake_module_name) + if m == complete_module: + os._exit(0) + else: + os._exit(1) + else: + t.join() + # Exitcode 1 means the child got a partial module (bad.) No + # exitcode (but a hang, which manifests as 'got pid 0') + # means the child deadlocked (also bad.) + self.wait_impl(pid) + finally: + try: + os.kill(pid, signal.SIGKILL) + except OSError: + pass + def test_main(): run_unittest(ForkTest) reap_children() Modified: python/branches/release26-maint/Modules/posixmodule.c ============================================================================== --- python/branches/release26-maint/Modules/posixmodule.c (original) +++ python/branches/release26-maint/Modules/posixmodule.c Wed Sep 16 22:06:36 2009 @@ -3630,11 +3630,21 @@ static PyObject * posix_fork1(PyObject *self, PyObject *noargs) { - pid_t pid = fork1(); + pid_t pid; + int result; + _PyImport_AcquireLock(); + pid = fork1(); + result = _PyImport_ReleaseLock(); if (pid == -1) return posix_error(); if (pid == 0) PyOS_AfterFork(); + if (result < 0) { + /* Don't clobber the OSError if the fork failed. */ + PyErr_SetString(PyExc_RuntimeError, + "not holding the import lock"); + return NULL; + } return PyLong_FromPid(pid); } #endif @@ -3649,11 +3659,21 @@ static PyObject * posix_fork(PyObject *self, PyObject *noargs) { - pid_t pid = fork(); + pid_t pid; + int result; + _PyImport_AcquireLock(); + pid = fork(); + result = _PyImport_ReleaseLock(); if (pid == -1) return posix_error(); if (pid == 0) PyOS_AfterFork(); + if (result < 0) { + /* Don't clobber the OSError if the fork failed. */ + PyErr_SetString(PyExc_RuntimeError, + "not holding the import lock"); + return NULL; + } return PyLong_FromPid(pid); } #endif @@ -3756,14 +3776,22 @@ static PyObject * posix_forkpty(PyObject *self, PyObject *noargs) { - int master_fd = -1; + int master_fd = -1, result; pid_t pid; + _PyImport_AcquireLock(); pid = forkpty(&master_fd, NULL, NULL, NULL); + result = _PyImport_ReleaseLock(); if (pid == -1) return posix_error(); if (pid == 0) PyOS_AfterFork(); + if (result < 0) { + /* Don't clobber the OSError if the fork failed. */ + PyErr_SetString(PyExc_RuntimeError, + "not holding the import lock"); + return NULL; + } return Py_BuildValue("(Ni)", PyLong_FromPid(pid), master_fd); } #endif Modified: python/branches/release26-maint/Python/import.c ============================================================================== --- python/branches/release26-maint/Python/import.c (original) +++ python/branches/release26-maint/Python/import.c Wed Sep 16 22:06:36 2009 @@ -256,8 +256,8 @@ static long import_lock_thread = -1; static int import_lock_level = 0; -static void -lock_import(void) +void +_PyImport_AcquireLock(void) { long me = PyThread_get_thread_ident(); if (me == -1) @@ -281,8 +281,8 @@ import_lock_level = 1; } -static int -unlock_import(void) +int +_PyImport_ReleaseLock(void) { long me = PyThread_get_thread_ident(); if (me == -1 || import_lock == NULL) @@ -309,11 +309,6 @@ #endif } -#else - -#define lock_import() -#define unlock_import() 0 - #endif static PyObject * @@ -330,7 +325,7 @@ imp_acquire_lock(PyObject *self, PyObject *noargs) { #ifdef WITH_THREAD - lock_import(); + _PyImport_AcquireLock(); #endif Py_INCREF(Py_None); return Py_None; @@ -340,7 +335,7 @@ imp_release_lock(PyObject *self, PyObject *noargs) { #ifdef WITH_THREAD - if (unlock_import() < 0) { + if (_PyImport_ReleaseLock() < 0) { PyErr_SetString(PyExc_RuntimeError, "not holding the import lock"); return NULL; @@ -2183,9 +2178,9 @@ PyObject *fromlist, int level) { PyObject *result; - lock_import(); + _PyImport_AcquireLock(); result = import_module_level(name, globals, locals, fromlist, level); - if (unlock_import() < 0) { + if (_PyImport_ReleaseLock() < 0) { Py_XDECREF(result); PyErr_SetString(PyExc_RuntimeError, "not holding the import lock"); From python-checkins at python.org Wed Sep 16 22:26:10 2009 From: python-checkins at python.org (thomas.wouters) Date: Wed, 16 Sep 2009 20:26:10 -0000 Subject: [Python-checkins] r74841 - svn:log Message-ID: Author: thomas.wouters Revision: 74841 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -18,5 +18,5 @@ re-entrant one, and reallocating would do the wrong thing when forking while holding the import lock. -Will backport to 2.6 and 2.5, minus the tiny AIX behaviour change. +Will backport to 2.6, minus the tiny AIX behaviour change. From python-checkins at python.org Wed Sep 16 22:26:31 2009 From: python-checkins at python.org (mark.dickinson) Date: Wed, 16 Sep 2009 20:26:31 -0000 Subject: [Python-checkins] r74843 - python/trunk/Modules/_localemodule.c Message-ID: Author: mark.dickinson Date: Wed Sep 16 22:26:31 2009 New Revision: 74843 Log: Remove outdated include; this include was breaking OS X builds using non-Apple gcc4.3 and gcc4.4 (because CoreFoundation/CoreFoundation.h won't compile under non-Apple gcc). Modified: python/trunk/Modules/_localemodule.c Modified: python/trunk/Modules/_localemodule.c ============================================================================== --- python/trunk/Modules/_localemodule.c (original) +++ python/trunk/Modules/_localemodule.c Wed Sep 16 22:26:31 2009 @@ -32,10 +32,6 @@ #include #endif -#if defined(__APPLE__) -#include -#endif - #if defined(MS_WINDOWS) #define WIN32_LEAN_AND_MEAN #include From thomas at python.org Wed Sep 16 22:27:17 2009 From: thomas at python.org (Thomas Wouters) Date: Wed, 16 Sep 2009 22:27:17 +0200 Subject: [Python-checkins] r74841 - in python/trunk: Doc/c-api/init.rst Include/import.h Lib/test/test_fork1.py Modules/posixmodule.c Python/import.c In-Reply-To: <4ab14372.0b67f10a.5c19.ffffdab9SMTPIN_ADDED@mx.google.com> References: <4ab14372.0b67f10a.5c19.ffffdab9SMTPIN_ADDED@mx.google.com> Message-ID: <9e804ac0909161327i40fc493frc2b461c3042d7435@mail.gmail.com> On Wed, Sep 16, 2009 at 21:58, thomas.wouters wrote: > Author: thomas.wouters > Date: Wed Sep 16 21:55:54 2009 > New Revision: 74841 > > Log: > > Fix issue #1590864, multiple threads and fork() can cause deadlocks, by > acquiring the import lock around fork() calls. This prevents other threads > from having that lock while the fork happens, and is the recommended way of > dealing with such issues. There are two other locks we care about, the GIL > and the Thread Local Storage lock. The GIL is obviously held when calling > Python functions like os.fork(), and the TLS lock is explicitly reallocated > instead, while also deleting now-orphaned TLS data. > > This only fixes calls to os.fork(), not extension modules or embedding > programs calling C's fork() directly. Solving that requires a new set of > API > functions, and possibly a rewrite of the Python/thread_*.c mess. Add a > warning explaining the problem to the documentation in the mean time. > > This also changes behaviour a little on AIX. Before, AIX (but only AIX) was > getting the import lock reallocated, seemingly to avoid this very same > problem. This is not the right approach, because the import lock is a > re-entrant one, and reallocating would do the wrong thing when forking > while > holding the import lock. > > Will backport to 2.6 and 2.5, minus the tiny AIX behaviour change. > Actually, I forgot 2.5 was in security-only mode now, and this isn't a security fix, so I changed the log to only say 'backport to 2.6'. -- Thomas Wouters Hi! I'm a .signature virus! copy me into your .signature file to help me spread! -------------- next part -------------- An HTML attachment was scrubbed... URL: From python-checkins at python.org Wed Sep 16 22:29:51 2009 From: python-checkins at python.org (mark.dickinson) Date: Wed, 16 Sep 2009 20:29:51 -0000 Subject: [Python-checkins] r74844 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Wed Sep 16 22:29:50 2009 New Revision: 74844 Log: Blocked revisions 74843 via svnmerge ........ r74843 | mark.dickinson | 2009-09-16 21:26:31 +0100 (Wed, 16 Sep 2009) | 4 lines Remove outdated include; this include was breaking OS X builds using non-Apple gcc4.3 and gcc4.4 (because CoreFoundation/CoreFoundation.h won't compile under non-Apple gcc). ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Wed Sep 16 22:30:09 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 20:30:09 -0000 Subject: [Python-checkins] r74845 - in python/trunk: Lib/test/test_exceptions.py Misc/NEWS Objects/exceptions.c Message-ID: Author: georg.brandl Date: Wed Sep 16 22:30:09 2009 New Revision: 74845 Log: #6844: do not emit DeprecationWarnings on access if Exception.message has been set by the user. This works by always setting it in __dict__, except when it's implicitly set in __init__. Modified: python/trunk/Lib/test/test_exceptions.py python/trunk/Misc/NEWS python/trunk/Objects/exceptions.c Modified: python/trunk/Lib/test/test_exceptions.py ============================================================================== --- python/trunk/Lib/test/test_exceptions.py (original) +++ python/trunk/Lib/test/test_exceptions.py Wed Sep 16 22:30:09 2009 @@ -303,6 +303,46 @@ 'pickled "%r", attribute "%s"' % (e, checkArgName)) + + def testDeprecatedMessageAttribute(self): + # Accessing BaseException.message and relying on its value set by + # BaseException.__init__ triggers a deprecation warning. + exc = BaseException("foo") + with warnings.catch_warnings(record=True) as w: + self.assertEquals(exc.message, "foo") + self.assertEquals(len(w), 1) + self.assertEquals(w[0].category, DeprecationWarning) + self.assertEquals( + str(w[0].message), + "BaseException.message has been deprecated as of Python 2.6") + + + def testRegularMessageAttribute(self): + # Accessing BaseException.message after explicitly setting a value + # for it does not trigger a deprecation warning. + exc = BaseException("foo") + exc.message = "bar" + with warnings.catch_warnings(record=True) as w: + self.assertEquals(exc.message, "bar") + self.assertEquals(len(w), 0) + # Deleting the message is supported, too. + del exc.message + with self.assertRaises(AttributeError): + exc.message + + def testPickleMessageAttribute(self): + # Pickling with message attribute must work, as well. + e = Exception("foo") + f = Exception("foo") + f.message = "bar" + for p in pickle, cPickle: + ep = p.loads(p.dumps(e)) + with warnings.catch_warnings(): + ignore_message_warning() + self.assertEqual(ep.message, "foo") + fp = p.loads(p.dumps(f)) + self.assertEqual(fp.message, "bar") + def testSlicing(self): # Test that you can slice an exception directly instead of requiring # going through the 'args' attribute. Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Sep 16 22:30:09 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #6844: Do not emit DeprecationWarnings when accessing a "message" + attribute on exceptions that was set explicitly. + - Issue #6846: Fix bug where bytearray.pop() returns negative integers. - classmethod no longer checks if its argument is callable. Modified: python/trunk/Objects/exceptions.c ============================================================================== --- python/trunk/Objects/exceptions.c (original) +++ python/trunk/Objects/exceptions.c Wed Sep 16 22:30:09 2009 @@ -300,30 +300,51 @@ static PyObject * BaseException_get_message(PyBaseExceptionObject *self) { - int ret; - ret = PyErr_WarnEx(PyExc_DeprecationWarning, - "BaseException.message has been deprecated as " - "of Python 2.6", 1); - if (ret < 0) - return NULL; + PyObject *msg; + + /* if "message" is in self->dict, accessing a user-set message attribute */ + if (self->dict && + (msg = PyDict_GetItemString(self->dict, "message"))) { + Py_INCREF(msg); + return msg; + } + + if (self->message == NULL) { + PyErr_SetString(PyExc_AttributeError, "message attribute was deleted"); + return NULL; + } + + /* accessing the deprecated "builtin" message attribute of Exception */ + if (PyErr_WarnEx(PyExc_DeprecationWarning, + "BaseException.message has been deprecated as " + "of Python 2.6", 1) < 0) + return NULL; - Py_INCREF(self->message); - return self->message; + Py_INCREF(self->message); + return self->message; } static int BaseException_set_message(PyBaseExceptionObject *self, PyObject *val) { - int ret; - ret = PyErr_WarnEx(PyExc_DeprecationWarning, - "BaseException.message has been deprecated as " - "of Python 2.6", 1); - if (ret < 0) - return -1; - Py_INCREF(val); - Py_DECREF(self->message); - self->message = val; - return 0; + /* if val is NULL, delete the message attribute */ + if (val == NULL) { + if (self->dict && PyDict_GetItemString(self->dict, "message")) { + if (PyDict_DelItemString(self->dict, "message") < 0) + return -1; + } + Py_XDECREF(self->message); + self->message = NULL; + return 0; + } + + /* else set it in __dict__, but may need to create the dict first */ + if (self->dict == NULL) { + self->dict = PyDict_New(); + if (!self->dict) + return -1; + } + return PyDict_SetItemString(self->dict, "message", val); } static PyGetSetDef BaseException_getset[] = { From python-checkins at python.org Wed Sep 16 22:32:35 2009 From: python-checkins at python.org (mark.dickinson) Date: Wed, 16 Sep 2009 20:32:35 -0000 Subject: [Python-checkins] r74846 - in python/branches/py3k: Modules/_localemodule.c Message-ID: Author: mark.dickinson Date: Wed Sep 16 22:32:35 2009 New Revision: 74846 Log: Merged revisions 74843 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74843 | mark.dickinson | 2009-09-16 21:26:31 +0100 (Wed, 16 Sep 2009) | 4 lines Remove outdated include; this include was breaking OS X builds using non-Apple gcc4.3 and gcc4.4 (because CoreFoundation/CoreFoundation.h won't compile under non-Apple gcc). ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Modules/_localemodule.c Modified: python/branches/py3k/Modules/_localemodule.c ============================================================================== --- python/branches/py3k/Modules/_localemodule.c (original) +++ python/branches/py3k/Modules/_localemodule.c Wed Sep 16 22:32:35 2009 @@ -32,10 +32,6 @@ #include #endif -#if defined(__APPLE__) -#include -#endif - #if defined(MS_WINDOWS) #define WIN32_LEAN_AND_MEAN #include From python-checkins at python.org Wed Sep 16 22:33:51 2009 From: python-checkins at python.org (mark.dickinson) Date: Wed, 16 Sep 2009 20:33:51 -0000 Subject: [Python-checkins] r74847 - in python/branches/release31-maint: Modules/_localemodule.c Message-ID: Author: mark.dickinson Date: Wed Sep 16 22:33:51 2009 New Revision: 74847 Log: Merged revisions 74846 via svnmerge from svn+ssh://pythondev at www.python.org/python/branches/py3k ................ r74846 | mark.dickinson | 2009-09-16 21:32:35 +0100 (Wed, 16 Sep 2009) | 11 lines Merged revisions 74843 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74843 | mark.dickinson | 2009-09-16 21:26:31 +0100 (Wed, 16 Sep 2009) | 4 lines Remove outdated include; this include was breaking OS X builds using non-Apple gcc4.3 and gcc4.4 (because CoreFoundation/CoreFoundation.h won't compile under non-Apple gcc). ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Modules/_localemodule.c Modified: python/branches/release31-maint/Modules/_localemodule.c ============================================================================== --- python/branches/release31-maint/Modules/_localemodule.c (original) +++ python/branches/release31-maint/Modules/_localemodule.c Wed Sep 16 22:33:51 2009 @@ -32,10 +32,6 @@ #include #endif -#if defined(__APPLE__) -#include -#endif - #if defined(MS_WINDOWS) #define WIN32_LEAN_AND_MEAN #include From python-checkins at python.org Wed Sep 16 22:34:51 2009 From: python-checkins at python.org (georg.brandl) Date: Wed, 16 Sep 2009 20:34:51 -0000 Subject: [Python-checkins] r74848 - in python/branches/release26-maint: Lib/test/test_exceptions.py Misc/NEWS Objects/exceptions.c Message-ID: Author: georg.brandl Date: Wed Sep 16 22:34:51 2009 New Revision: 74848 Log: Merged revisions 74845 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74845 | georg.brandl | 2009-09-16 22:30:09 +0200 (Mi, 16 Sep 2009) | 5 lines #6844: do not emit DeprecationWarnings on access if Exception.message has been set by the user. This works by always setting it in __dict__, except when it's implicitly set in __init__. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_exceptions.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Objects/exceptions.c Modified: python/branches/release26-maint/Lib/test/test_exceptions.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_exceptions.py (original) +++ python/branches/release26-maint/Lib/test/test_exceptions.py Wed Sep 16 22:34:51 2009 @@ -303,6 +303,45 @@ 'pickled "%r", attribute "%s"' % (e, checkArgName)) + + def testDeprecatedMessageAttribute(self): + # Accessing BaseException.message and relying on its value set by + # BaseException.__init__ triggers a deprecation warning. + exc = BaseException("foo") + with warnings.catch_warnings(record=True) as w: + self.assertEquals(exc.message, "foo") + self.assertEquals(len(w), 1) + self.assertEquals(w[0].category, DeprecationWarning) + self.assertEquals( + str(w[0].message), + "BaseException.message has been deprecated as of Python 2.6") + + + def testRegularMessageAttribute(self): + # Accessing BaseException.message after explicitly setting a value + # for it does not trigger a deprecation warning. + exc = BaseException("foo") + exc.message = "bar" + with warnings.catch_warnings(record=True) as w: + self.assertEquals(exc.message, "bar") + self.assertEquals(len(w), 0) + # Deleting the message is supported, too. + del exc.message + self.assertRaises(AttributeError, getattr, exc, "message") + + def testPickleMessageAttribute(self): + # Pickling with message attribute must work, as well. + e = Exception("foo") + f = Exception("foo") + f.message = "bar" + for p in pickle, cPickle: + ep = p.loads(p.dumps(e)) + with warnings.catch_warnings(): + ignore_message_warning() + self.assertEqual(ep.message, "foo") + fp = p.loads(p.dumps(f)) + self.assertEqual(fp.message, "bar") + def testSlicing(self): # Test that you can slice an exception directly instead of requiring # going through the 'args' attribute. Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Wed Sep 16 22:34:51 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #6844: Do not emit DeprecationWarnings when accessing a "message" + attribute on exceptions that was set explicitly. + - Issue #6846: Fix bug where bytearray.pop() returns negative integers. - Issue #6707: dir() on an uninitialized module caused a crash. Modified: python/branches/release26-maint/Objects/exceptions.c ============================================================================== --- python/branches/release26-maint/Objects/exceptions.c (original) +++ python/branches/release26-maint/Objects/exceptions.c Wed Sep 16 22:34:51 2009 @@ -301,30 +301,51 @@ static PyObject * BaseException_get_message(PyBaseExceptionObject *self) { - int ret; - ret = PyErr_WarnEx(PyExc_DeprecationWarning, - "BaseException.message has been deprecated as " - "of Python 2.6", 1); - if (ret < 0) - return NULL; + PyObject *msg; + + /* if "message" is in self->dict, accessing a user-set message attribute */ + if (self->dict && + (msg = PyDict_GetItemString(self->dict, "message"))) { + Py_INCREF(msg); + return msg; + } + + if (self->message == NULL) { + PyErr_SetString(PyExc_AttributeError, "message attribute was deleted"); + return NULL; + } + + /* accessing the deprecated "builtin" message attribute of Exception */ + if (PyErr_WarnEx(PyExc_DeprecationWarning, + "BaseException.message has been deprecated as " + "of Python 2.6", 1) < 0) + return NULL; - Py_INCREF(self->message); - return self->message; + Py_INCREF(self->message); + return self->message; } static int BaseException_set_message(PyBaseExceptionObject *self, PyObject *val) { - int ret; - ret = PyErr_WarnEx(PyExc_DeprecationWarning, - "BaseException.message has been deprecated as " - "of Python 2.6", 1); - if (ret < 0) - return -1; - Py_INCREF(val); - Py_DECREF(self->message); - self->message = val; - return 0; + /* if val is NULL, delete the message attribute */ + if (val == NULL) { + if (self->dict && PyDict_GetItemString(self->dict, "message")) { + if (PyDict_DelItemString(self->dict, "message") < 0) + return -1; + } + Py_XDECREF(self->message); + self->message = NULL; + return 0; + } + + /* else set it in __dict__, but may need to create the dict first */ + if (self->dict == NULL) { + self->dict = PyDict_New(); + if (!self->dict) + return -1; + } + return PyDict_SetItemString(self->dict, "message", val); } static PyGetSetDef BaseException_getset[] = { From python-checkins at python.org Wed Sep 16 22:36:34 2009 From: python-checkins at python.org (thomas.wouters) Date: Wed, 16 Sep 2009 20:36:34 -0000 Subject: [Python-checkins] r74849 - python/trunk/Misc/NEWS Message-ID: Author: thomas.wouters Date: Wed Sep 16 22:36:34 2009 New Revision: 74849 Log: Add news entry for r74841. Modified: python/trunk/Misc/NEWS Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Sep 16 22:36:34 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #1590864: Fix potential deadlock when mixing threads and fork(). + - Issue #6844: Do not emit DeprecationWarnings when accessing a "message" attribute on exceptions that was set explicitly. From python-checkins at python.org Wed Sep 16 22:37:16 2009 From: python-checkins at python.org (thomas.wouters) Date: Wed, 16 Sep 2009 20:37:16 -0000 Subject: [Python-checkins] r74842 - svn:log Message-ID: Author: thomas.wouters Revision: 74842 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -25,6 +25,6 @@ re-entrant one, and reallocating would do the wrong thing when forking while holding the import lock. - Will backport to 2.6 and 2.5, minus the tiny AIX behaviour change. + Will backport to 2.6, minus the tiny AIX behaviour change. ........ From python-checkins at python.org Wed Sep 16 22:38:23 2009 From: python-checkins at python.org (thomas.wouters) Date: Wed, 16 Sep 2009 20:38:23 -0000 Subject: [Python-checkins] r74850 - python/branches/release26-maint/Misc/NEWS Message-ID: Author: thomas.wouters Date: Wed Sep 16 22:38:23 2009 New Revision: 74850 Log: Add news entry for r74842. Modified: python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Wed Sep 16 22:38:23 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #1590864: Fix potential deadlock when mixing threads and fork(). + - Issue #6844: Do not emit DeprecationWarnings when accessing a "message" attribute on exceptions that was set explicitly. From python-checkins at python.org Wed Sep 16 23:23:35 2009 From: python-checkins at python.org (mark.dickinson) Date: Wed, 16 Sep 2009 21:23:35 -0000 Subject: [Python-checkins] r74851 - in python/branches/py3k: Include/longintrepr.h Misc/NEWS Objects/longobject.c Message-ID: Author: mark.dickinson Date: Wed Sep 16 23:23:34 2009 New Revision: 74851 Log: Issue #6713: Improve performance of str(n) and repr(n) for integers n (up to 3.1 times faster in tests), by special-casing base 10 in _PyLong_Format. Modified: python/branches/py3k/Include/longintrepr.h python/branches/py3k/Misc/NEWS python/branches/py3k/Objects/longobject.c Modified: python/branches/py3k/Include/longintrepr.h ============================================================================== --- python/branches/py3k/Include/longintrepr.h (original) +++ python/branches/py3k/Include/longintrepr.h Wed Sep 16 23:23:34 2009 @@ -50,12 +50,16 @@ typedef PY_UINT64_T twodigits; typedef PY_INT64_T stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 30 +#define _PyLong_DECIMAL_SHIFT 9 /* max(e such that 10**e fits in a digit) */ +#define _PyLong_DECIMAL_BASE ((digit)1000000000) /* 10 ** DECIMAL_SHIFT */ #elif PYLONG_BITS_IN_DIGIT == 15 typedef unsigned short digit; typedef short sdigit; /* signed variant of digit */ typedef unsigned long twodigits; typedef long stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 15 +#define _PyLong_DECIMAL_SHIFT 4 /* max(e such that 10**e fits in a digit) */ +#define _PyLong_DECIMAL_BASE ((digit)10000) /* 10 ** DECIMAL_SHIFT */ #else #error "PYLONG_BITS_IN_DIGIT should be 15 or 30" #endif Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Wed Sep 16 23:23:34 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6713: Improve performance of integer -> string conversions. + - Issue #6846: Fix bug where bytearray.pop() returns negative integers. - Issue #6750: A text file opened with io.open() could duplicate its output Modified: python/branches/py3k/Objects/longobject.c ============================================================================== --- python/branches/py3k/Objects/longobject.c (original) +++ python/branches/py3k/Objects/longobject.c Wed Sep 16 23:23:34 2009 @@ -1650,6 +1650,119 @@ return long_normalize(z); } +/* Convert a long integer to a base 10 string. Returns a new non-shared + string. (Return value is non-shared so that callers can modify the + returned value if necessary.) */ + +static PyObject * +long_to_decimal_string(PyObject *aa) +{ + PyLongObject *scratch, *a; + PyObject *str; + Py_ssize_t size, strlen, size_a, i, j; + digit *pout, *pin, rem, tenpow; + Py_UNICODE *p; + int negative; + + a = (PyLongObject *)aa; + if (a == NULL || !PyLong_Check(a)) { + PyErr_BadInternalCall(); + return NULL; + } + size_a = ABS(Py_SIZE(a)); + negative = Py_SIZE(a) < 0; + + /* quick and dirty upper bound for the number of digits + required to express a in base _PyLong_DECIMAL_BASE: + + #digits = 1 + floor(log2(a) / log2(_PyLong_DECIMAL_BASE)) + + But log2(a) < size_a * PyLong_SHIFT, and + log2(_PyLong_DECIMAL_BASE) = log2(10) * _PyLong_DECIMAL_SHIFT + > 3 * _PyLong_DECIMAL_SHIFT + */ + if (size_a > PY_SSIZE_T_MAX / PyLong_SHIFT) { + PyErr_SetString(PyExc_OverflowError, + "long is too large to format"); + return NULL; + } + /* the expression size_a * PyLong_SHIFT is now safe from overflow */ + size = 1 + size_a * PyLong_SHIFT / (3 * _PyLong_DECIMAL_SHIFT); + scratch = _PyLong_New(size); + if (scratch == NULL) + return NULL; + + /* convert array of base _PyLong_BASE digits in pin to an array of + base _PyLong_DECIMAL_BASE digits in pout, following Knuth (TAOCP, + Volume 2 (3rd edn), section 4.4, Method 1b). */ + pin = a->ob_digit; + pout = scratch->ob_digit; + size = 0; + for (i = size_a; --i >= 0; ) { + digit hi = pin[i]; + for (j = 0; j < size; j++) { + twodigits z = (twodigits)pout[j] << PyLong_SHIFT | hi; + hi = z / _PyLong_DECIMAL_BASE; + pout[j] = z - (twodigits)hi * _PyLong_DECIMAL_BASE; + } + while (hi) { + pout[size++] = hi % _PyLong_DECIMAL_BASE; + hi /= _PyLong_DECIMAL_BASE; + } + /* check for keyboard interrupt */ + SIGCHECK({ + Py_DECREF(scratch); + return NULL; + }) + } + /* pout should have at least one digit, so that the case when a = 0 + works correctly */ + if (size == 0) + pout[size++] = 0; + + /* calculate exact length of output string, and allocate */ + strlen = negative + 1 + (size - 1) * _PyLong_DECIMAL_SHIFT; + tenpow = 10; + rem = pout[size-1]; + while (rem >= tenpow) { + tenpow *= 10; + strlen++; + } + str = PyUnicode_FromUnicode(NULL, strlen); + if (str == NULL) { + Py_DECREF(scratch); + return NULL; + } + + /* fill the string right-to-left */ + p = PyUnicode_AS_UNICODE(str) + strlen; + *p = '\0'; + /* pout[0] through pout[size-2] contribute exactly + _PyLong_DECIMAL_SHIFT digits each */ + for (i=0; i < size - 1; i++) { + rem = pout[i]; + for (j = 0; j < _PyLong_DECIMAL_SHIFT; j++) { + *--p = '0' + rem % 10; + rem /= 10; + } + } + /* pout[size-1]: always produce at least one decimal digit */ + rem = pout[i]; + do { + *--p = '0' + rem % 10; + rem /= 10; + } while (rem != 0); + + /* and sign */ + if (negative) + *--p = '-'; + + /* check we've counted correctly */ + assert(p == PyUnicode_AS_UNICODE(str)); + Py_DECREF(scratch); + return (PyObject *)str; +} + /* Convert a long int object to a string, using a given conversion base. Return a string object. If base is 2, 8 or 16, add the proper prefix '0b', '0o' or '0x'. */ @@ -1665,6 +1778,9 @@ int bits; char sign = '\0'; + if (base == 10) + return long_to_decimal_string((PyObject *)a); + if (a == NULL || !PyLong_Check(a)) { PyErr_BadInternalCall(); return NULL; From python-checkins at python.org Wed Sep 16 23:24:11 2009 From: python-checkins at python.org (mark.dickinson) Date: Wed, 16 Sep 2009 21:24:11 -0000 Subject: [Python-checkins] r74852 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Wed Sep 16 23:24:11 2009 New Revision: 74852 Log: Blocked revisions 74851 via svnmerge ........ r74851 | mark.dickinson | 2009-09-16 22:23:34 +0100 (Wed, 16 Sep 2009) | 5 lines Issue #6713: Improve performance of str(n) and repr(n) for integers n (up to 3.1 times faster in tests), by special-casing base 10 in _PyLong_Format. ........ Modified: python/branches/release31-maint/ (props changed) From benjamin at python.org Wed Sep 16 22:34:09 2009 From: benjamin at python.org (Benjamin Peterson) Date: Wed, 16 Sep 2009 15:34:09 -0500 Subject: [Python-checkins] r74841 - svn:log In-Reply-To: <4ab14a14.0a67f10a.5b08.764dSMTPIN_ADDED@mx.google.com> References: <4ab14a14.0a67f10a.5b08.764dSMTPIN_ADDED@mx.google.com> Message-ID: <1afaf6160909161334l617c0e45r7ea782064a4100ab@mail.gmail.com> 2009/9/16 thomas.wouters : > Author: thomas.wouters > Revision: 74841 > Property Name: svn:log > Action: modified > > Property diff: > --- old property value > +++ new property value > @@ -18,5 +18,5 @@ > ?re-entrant one, and reallocating would do the wrong thing when forking while > ?holding the import lock. > > -Will backport to 2.6 and 2.5, minus the tiny AIX behaviour change. > +Will backport to 2.6, minus the tiny AIX behaviour change. Will you also port to Python 3? -- Regards, Benjamin From python-checkins at python.org Thu Sep 17 00:10:56 2009 From: python-checkins at python.org (mark.dickinson) Date: Wed, 16 Sep 2009 22:10:56 -0000 Subject: [Python-checkins] r74853 - in python/trunk: Include/longintrepr.h Misc/NEWS Objects/longobject.c Message-ID: Author: mark.dickinson Date: Thu Sep 17 00:10:56 2009 New Revision: 74853 Log: Issue #6713: Improve performance of str(n) and repr(n) for integers n (up to 3.1 times faster in tests), by special-casing base 10 in _PyLong_Format. (Backport of r74851 from py3k.) Modified: python/trunk/Include/longintrepr.h python/trunk/Misc/NEWS python/trunk/Objects/longobject.c Modified: python/trunk/Include/longintrepr.h ============================================================================== --- python/trunk/Include/longintrepr.h (original) +++ python/trunk/Include/longintrepr.h Thu Sep 17 00:10:56 2009 @@ -47,12 +47,16 @@ typedef PY_UINT64_T twodigits; typedef PY_INT64_T stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 30 +#define _PyLong_DECIMAL_SHIFT 9 /* max(e such that 10**e fits in a digit) */ +#define _PyLong_DECIMAL_BASE ((digit)1000000000) /* 10 ** DECIMAL_SHIFT */ #elif PYLONG_BITS_IN_DIGIT == 15 typedef unsigned short digit; typedef short sdigit; /* signed variant of digit */ typedef unsigned long twodigits; typedef long stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 15 +#define _PyLong_DECIMAL_SHIFT 4 /* max(e such that 10**e fits in a digit) */ +#define _PyLong_DECIMAL_BASE ((digit)10000) /* 10 ** DECIMAL_SHIFT */ #else #error "PYLONG_BITS_IN_DIGIT should be 15 or 30" #endif Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Thu Sep 17 00:10:56 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #6713: Improve performance of integer -> string conversions. + - Issue #1590864: Fix potential deadlock when mixing threads and fork(). - Issue #6844: Do not emit DeprecationWarnings when accessing a "message" Modified: python/trunk/Objects/longobject.c ============================================================================== --- python/trunk/Objects/longobject.c (original) +++ python/trunk/Objects/longobject.c Thu Sep 17 00:10:56 2009 @@ -1361,6 +1361,122 @@ return long_normalize(z); } +/* Convert a long integer to a base 10 string. Returns a new non-shared + string. (Return value is non-shared so that callers can modify the + returned value if necessary.) */ + +static PyObject * +long_to_decimal_string(PyObject *aa, int addL) +{ + PyLongObject *scratch, *a; + PyObject *str; + Py_ssize_t size, strlen, size_a, i, j; + digit *pout, *pin, rem, tenpow; + char *p; + int negative; + + a = (PyLongObject *)aa; + if (a == NULL || !PyLong_Check(a)) { + PyErr_BadInternalCall(); + return NULL; + } + size_a = ABS(Py_SIZE(a)); + negative = Py_SIZE(a) < 0; + + /* quick and dirty upper bound for the number of digits + required to express a in base _PyLong_DECIMAL_BASE: + + #digits = 1 + floor(log2(a) / log2(_PyLong_DECIMAL_BASE)) + + But log2(a) < size_a * PyLong_SHIFT, and + log2(_PyLong_DECIMAL_BASE) = log2(10) * _PyLong_DECIMAL_SHIFT + > 3 * _PyLong_DECIMAL_SHIFT + */ + if (size_a > PY_SSIZE_T_MAX / PyLong_SHIFT) { + PyErr_SetString(PyExc_OverflowError, + "long is too large to format"); + return NULL; + } + /* the expression size_a * PyLong_SHIFT is now safe from overflow */ + size = 1 + size_a * PyLong_SHIFT / (3 * _PyLong_DECIMAL_SHIFT); + scratch = _PyLong_New(size); + if (scratch == NULL) + return NULL; + + /* convert array of base _PyLong_BASE digits in pin to an array of + base _PyLong_DECIMAL_BASE digits in pout, following Knuth (TAOCP, + Volume 2 (3rd edn), section 4.4, Method 1b). */ + pin = a->ob_digit; + pout = scratch->ob_digit; + size = 0; + for (i = size_a; --i >= 0; ) { + digit hi = pin[i]; + for (j = 0; j < size; j++) { + twodigits z = (twodigits)pout[j] << PyLong_SHIFT | hi; + hi = z / _PyLong_DECIMAL_BASE; + pout[j] = z - (twodigits)hi * _PyLong_DECIMAL_BASE; + } + while (hi) { + pout[size++] = hi % _PyLong_DECIMAL_BASE; + hi /= _PyLong_DECIMAL_BASE; + } + /* check for keyboard interrupt */ + SIGCHECK({ + Py_DECREF(scratch); + return NULL; + }) + } + /* pout should have at least one digit, so that the case when a = 0 + works correctly */ + if (size == 0) + pout[size++] = 0; + + /* calculate exact length of output string, and allocate */ + strlen = (addL != 0) + negative + + 1 + (size - 1) * _PyLong_DECIMAL_SHIFT; + tenpow = 10; + rem = pout[size-1]; + while (rem >= tenpow) { + tenpow *= 10; + strlen++; + } + str = PyString_FromStringAndSize(NULL, strlen); + if (str == NULL) { + Py_DECREF(scratch); + return NULL; + } + + /* fill the string right-to-left */ + p = PyString_AS_STRING(str) + strlen; + *p = '\0'; + if (addL) + *--p = 'L'; + /* pout[0] through pout[size-2] contribute exactly + _PyLong_DECIMAL_SHIFT digits each */ + for (i=0; i < size - 1; i++) { + rem = pout[i]; + for (j = 0; j < _PyLong_DECIMAL_SHIFT; j++) { + *--p = '0' + rem % 10; + rem /= 10; + } + } + /* pout[size-1]: always produce at least one decimal digit */ + rem = pout[i]; + do { + *--p = '0' + rem % 10; + rem /= 10; + } while (rem != 0); + + /* and sign */ + if (negative) + *--p = '-'; + + /* check we've counted correctly */ + assert(p == PyString_AS_STRING(str)); + Py_DECREF(scratch); + return (PyObject *)str; +} + /* Convert the long to a string object with given base, appending a base prefix of 0[box] if base is 2, 8 or 16. Add a trailing "L" if addL is non-zero. @@ -1377,6 +1493,9 @@ int bits; char sign = '\0'; + if (base == 10) + return long_to_decimal_string((PyObject *)a, addL); + if (a == NULL || !PyLong_Check(a)) { PyErr_BadInternalCall(); return NULL; From python-checkins at python.org Thu Sep 17 00:13:32 2009 From: python-checkins at python.org (mark.dickinson) Date: Wed, 16 Sep 2009 22:13:32 -0000 Subject: [Python-checkins] r74854 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Thu Sep 17 00:13:31 2009 New Revision: 74854 Log: Blocked revisions 74853 via svnmerge ........ r74853 | mark.dickinson | 2009-09-16 23:10:56 +0100 (Wed, 16 Sep 2009) | 5 lines Issue #6713: Improve performance of str(n) and repr(n) for integers n (up to 3.1 times faster in tests), by special-casing base 10 in _PyLong_Format. (Backport of r74851 from py3k.) ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Thu Sep 17 00:14:54 2009 From: python-checkins at python.org (mark.dickinson) Date: Wed, 16 Sep 2009 22:14:54 -0000 Subject: [Python-checkins] r74855 - python/branches/py3k Message-ID: Author: mark.dickinson Date: Thu Sep 17 00:14:54 2009 New Revision: 74855 Log: Recorded merge of revisions 74853 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74853 | mark.dickinson | 2009-09-16 23:10:56 +0100 (Wed, 16 Sep 2009) | 5 lines Issue #6713: Improve performance of str(n) and repr(n) for integers n (up to 3.1 times faster in tests), by special-casing base 10 in _PyLong_Format. (Backport of r74851 from py3k.) ........ Modified: python/branches/py3k/ (props changed) From nnorwitz at gmail.com Thu Sep 17 00:55:32 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Wed, 16 Sep 2009 18:55:32 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090916225532.GA19271@python.psfb.org> More important issues: ---------------------- test_warnings leaked [0, 0, -44] references, sum=-44 Less important issues: ---------------------- test_cmd_line leaked [0, 0, 25] references, sum=25 test_distutils leaked [25, -25, 0] references, sum=0 test_dumbdbm leaked [0, -92, 0] references, sum=-92 test_file2k leaked [-83, 0, 0] references, sum=-83 test_smtplib leaked [-13, 8, 158] references, sum=153 test_sys leaked [-21, 42, 0] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 test_urllib2_localnet leaked [0, 277, -277] references, sum=0 test_xmlrpc leaked [0, 6, -10] references, sum=-4 From python-checkins at python.org Thu Sep 17 02:06:41 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 17 Sep 2009 00:06:41 -0000 Subject: [Python-checkins] r74856 - python/branches/py3k/Misc/NEWS Message-ID: Author: mark.dickinson Date: Thu Sep 17 02:06:41 2009 New Revision: 74856 Log: typo: Documenation -> Documentation Modified: python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Thu Sep 17 02:06:41 2009 @@ -214,7 +214,7 @@ - Issue 5390: Add uninstall icon independent of whether file extensions are installed. -Documenation +Documentation ------------ - Document that importing a module that has None in sys.modules triggers an From python-checkins at python.org Thu Sep 17 02:07:17 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 17 Sep 2009 00:07:17 -0000 Subject: [Python-checkins] r74857 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Thu Sep 17 02:07:16 2009 New Revision: 74857 Log: Blocked revisions 74856 via svnmerge ........ r74856 | mark.dickinson | 2009-09-17 01:06:41 +0100 (Thu, 17 Sep 2009) | 1 line typo: Documenation -> Documentation ........ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Thu Sep 17 02:17:48 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 17 Sep 2009 00:17:48 -0000 Subject: [Python-checkins] r74858 - python/branches/py3k/Objects/longobject.c Message-ID: Author: mark.dickinson Date: Thu Sep 17 02:17:48 2009 New Revision: 74858 Log: Bypass long_repr and _PyLong_Format for str(n), repr(n) Modified: python/branches/py3k/Objects/longobject.c Modified: python/branches/py3k/Objects/longobject.c ============================================================================== --- python/branches/py3k/Objects/longobject.c (original) +++ python/branches/py3k/Objects/longobject.c Thu Sep 17 02:17:48 2009 @@ -2515,12 +2515,6 @@ Py_TYPE(v)->tp_free(v); } -static PyObject * -long_repr(PyObject *v) -{ - return _PyLong_Format(v, 10); -} - static int long_compare(PyLongObject *a, PyLongObject *b) { @@ -4289,13 +4283,13 @@ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_reserved */ - long_repr, /* tp_repr */ + long_to_decimal_string, /* tp_repr */ &long_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)long_hash, /* tp_hash */ 0, /* tp_call */ - long_repr, /* tp_str */ + long_to_decimal_string, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ From python-checkins at python.org Thu Sep 17 02:18:25 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 17 Sep 2009 00:18:25 -0000 Subject: [Python-checkins] r74859 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Thu Sep 17 02:18:24 2009 New Revision: 74859 Log: Blocked revisions 74858 via svnmerge ........ r74858 | mark.dickinson | 2009-09-17 01:17:48 +0100 (Thu, 17 Sep 2009) | 1 line Bypass long_repr and _PyLong_Format for str(n), repr(n) ........ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Thu Sep 17 04:46:54 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 17 Sep 2009 02:46:54 -0000 Subject: [Python-checkins] r74860 - python/trunk/Lib/getpass.py Message-ID: Author: benjamin.peterson Date: Thu Sep 17 04:46:54 2009 New Revision: 74860 Log: kill bare except Modified: python/trunk/Lib/getpass.py Modified: python/trunk/Lib/getpass.py ============================================================================== --- python/trunk/Lib/getpass.py (original) +++ python/trunk/Lib/getpass.py Thu Sep 17 04:46:54 2009 @@ -51,7 +51,7 @@ # If that fails, see if stdin can be controlled. try: fd = sys.stdin.fileno() - except: + except (AttributeError, ValueError): passwd = fallback_getpass(prompt, stream) input = sys.stdin if not stream: From python-checkins at python.org Thu Sep 17 05:18:28 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 17 Sep 2009 03:18:28 -0000 Subject: [Python-checkins] r74861 - python/trunk/Doc/library/termios.rst Message-ID: Author: benjamin.peterson Date: Thu Sep 17 05:18:28 2009 New Revision: 74861 Log: pep 8 defaults Modified: python/trunk/Doc/library/termios.rst Modified: python/trunk/Doc/library/termios.rst ============================================================================== --- python/trunk/Doc/library/termios.rst (original) +++ python/trunk/Doc/library/termios.rst Thu Sep 17 05:18:28 2009 @@ -90,7 +90,7 @@ :keyword:`finally` statement to ensure that the old tty attributes are restored exactly no matter what happens:: - def getpass(prompt = "Password: "): + def getpass(prompt="Password: "): import termios, sys fd = sys.stdin.fileno() old = termios.tcgetattr(fd) From python-checkins at python.org Thu Sep 17 05:24:45 2009 From: python-checkins at python.org (brett.cannon) Date: Thu, 17 Sep 2009 03:24:45 -0000 Subject: [Python-checkins] r74862 - python/trunk/Doc/extending/extending.rst Message-ID: Author: brett.cannon Date: Thu Sep 17 05:24:45 2009 New Revision: 74862 Log: Note in the intro to Extending... that ctypes can be a simpler, more portable solution than custom C code. 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 Thu Sep 17 05:24:45 2009 @@ -20,6 +20,13 @@ The compilation of an extension module depends on its intended use as well as on your system setup; details are given in later chapters. +Do note that if your use case is calling C library functions or system calls, +you should consider using the :mod:`ctypes` module rather than writing custom +C code. Not only does :mod:`ctypes` let you write Python code to interface +with C code, but it is more portable between implementations of Python than +writing and compiling an extension module which typically ties you to CPython. + + .. _extending-simpleexample: From python-checkins at python.org Thu Sep 17 05:27:33 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 17 Sep 2009 03:27:33 -0000 Subject: [Python-checkins] r74863 - python/trunk/Doc/documenting/markup.rst Message-ID: Author: benjamin.peterson Date: Thu Sep 17 05:27:33 2009 New Revision: 74863 Log: rationalize a bit Modified: python/trunk/Doc/documenting/markup.rst Modified: python/trunk/Doc/documenting/markup.rst ============================================================================== --- python/trunk/Doc/documenting/markup.rst (original) +++ python/trunk/Doc/documenting/markup.rst Thu Sep 17 05:27:33 2009 @@ -597,8 +597,10 @@ An important bit of information about an API that a user should be aware of when using whatever bit of API the warning pertains to. The content of the directive should be written in complete sentences and include all appropriate - punctuation. This should only be chosen over ``note`` for information - regarding the possibility of crashes, data loss, or security implications. + punctuation. In the interest of not scaring users away from pages filled + with warnings, this directive should only be chosen over ``note`` for + information regarding the possibility of crashes, data loss, or security + implications. .. describe:: versionadded From python-checkins at python.org Thu Sep 17 05:39:33 2009 From: python-checkins at python.org (brett.cannon) Date: Thu, 17 Sep 2009 03:39:33 -0000 Subject: [Python-checkins] r74864 - in python/branches/py3k: Doc/extending/extending.rst Message-ID: Author: brett.cannon Date: Thu Sep 17 05:39:33 2009 New Revision: 74864 Log: Merged revisions 74862 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74862 | brett.cannon | 2009-09-16 20:24:45 -0700 (Wed, 16 Sep 2009) | 1 line Note in the intro to Extending... that ctypes can be a simpler, more portable solution than custom C code. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/extending/extending.rst Modified: python/branches/py3k/Doc/extending/extending.rst ============================================================================== --- python/branches/py3k/Doc/extending/extending.rst (original) +++ python/branches/py3k/Doc/extending/extending.rst Thu Sep 17 05:39:33 2009 @@ -20,6 +20,13 @@ The compilation of an extension module depends on its intended use as well as on your system setup; details are given in later chapters. +Do note that if your use case is calling C library functions or system calls, +you should consider using the :mod:`ctypes` module rather than writing custom +C code. Not only does :mod:`ctypes` let you write Python code to interface +with C code, but it is more portable between implementations of Python than +writing and compiling an extension module which typically ties you to CPython. + + .. _extending-simpleexample: From python-checkins at python.org Thu Sep 17 09:49:38 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 07:49:38 -0000 Subject: [Python-checkins] r74865 - python/trunk/Tools/scripts/pindent.py Message-ID: Author: georg.brandl Date: Thu Sep 17 09:49:37 2009 New Revision: 74865 Log: #6912: add "with" block support to pindent. Modified: python/trunk/Tools/scripts/pindent.py Modified: python/trunk/Tools/scripts/pindent.py ============================================================================== --- python/trunk/Tools/scripts/pindent.py (original) +++ python/trunk/Tools/scripts/pindent.py Thu Sep 17 09:49:37 2009 @@ -88,10 +88,10 @@ next['if'] = next['elif'] = 'elif', 'else', 'end' next['while'] = next['for'] = 'else', 'end' next['try'] = 'except', 'finally' -next['except'] = 'except', 'else', 'end' +next['except'] = 'except', 'else', 'finally', 'end' next['else'] = next['finally'] = next['def'] = next['class'] = 'end' next['end'] = () -start = 'if', 'while', 'for', 'try', 'def', 'class' +start = 'if', 'while', 'for', 'try', 'with', 'def', 'class' class PythonIndenter: From nnorwitz at gmail.com Thu Sep 17 10:13:38 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 17 Sep 2009 04:13:38 -0400 Subject: [Python-checkins] Python Regression Test Failures basics (1) Message-ID: <20090917081338.GA1029@python.psfb.org> 338 tests OK. 1 test failed: test_pep352 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 fetching http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml ... fetching http://people.freebsd.org/~perky/i18n/EUC-CN.TXT ... fetching http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP936.TXT ... test_codecmaps_hk fetching http://people.freebsd.org/~perky/i18n/BIG5HKSCS-2004.TXT ... test_codecmaps_jp fetching http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT ... fetching http://people.freebsd.org/~perky/i18n/EUC-JISX0213.TXT ... fetching http://people.freebsd.org/~perky/i18n/EUC-JP.TXT ... fetching http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT ... fetching http://people.freebsd.org/~perky/i18n/SHIFT_JISX0213.TXT ... test_codecmaps_kr fetching http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP949.TXT ... fetching http://people.freebsd.org/~perky/i18n/EUC-KR.TXT ... fetching http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT ... test_codecmaps_tw fetching http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT ... fetching http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT ... 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 [19542 refs] 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 [15421 refs] [15421 refs] [15421 refs] [25430 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 fetching http://www.unicode.org/Public/5.1.0/ucd/NormalizationTest.txt ... 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 test_pep352 failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.7/test/test_pep352.py", line 152, in test_message_deprecation self.fail("BaseException.message assignment not deprecated") AssertionError: BaseException.message assignment not deprecated test_pickle test_pickletools test_pipes test_pkg test_pkgimport test_pkgutil test_platform [17009 refs] [17009 refs] test_plistlib test_poll test_popen [15426 refs] [15426 refs] [15426 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 [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20919 refs] [20919 refs] test_pyexpat test_queue test_quopri [17947 refs] [17947 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 [15421 refs] [15421 refs] [15424 refs] [15421 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 [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [15421 refs] [15421 refs] [15650 refs] [15444 refs] test_tarfile /tmp/python-test/local/lib/python2.7/test/test_tarfile.py:654: DeprecationWarning: use the filter argument instead tar.add(tempdir, arcname="empty_dir", exclude=exclude) /tmp/python-test/local/lib/python2.7/tarfile.py:1978: DeprecationWarning: use the filter argument instead recursive, exclude, filter) test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [15424 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading [18734 refs] [21132 refs] [20108 refs] [20108 refs] [20108 refs] [20108 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_pep352 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 [778721 refs] From nnorwitz at gmail.com Thu Sep 17 10:23:25 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 17 Sep 2009 04:23:25 -0400 Subject: [Python-checkins] Python Regression Test Failures opt (1) Message-ID: <20090917082325.GA4818@python.psfb.org> 338 tests OK. 1 test failed: test_pep352 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 [19545 refs] [19545 refs] [19545 refs] [19542 refs] 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 [15421 refs] [15421 refs] [15421 refs] [25430 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 test_pep352 failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.7/test/test_pep352.py", line 152, in test_message_deprecation self.fail("BaseException.message assignment not deprecated") AssertionError: BaseException.message assignment not deprecated test_pickle test_pickletools test_pipes test_pkg test_pkgimport test_pkgutil test_platform [17009 refs] [17009 refs] test_plistlib test_poll test_popen [15426 refs] [15426 refs] [15426 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 [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20919 refs] [20919 refs] test_pyexpat test_queue test_quopri [17947 refs] [17947 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 [15421 refs] [15421 refs] [15424 refs] [15421 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 [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [15421 refs] [15421 refs] [15650 refs] [15444 refs] test_tarfile /tmp/python-test/local/lib/python2.7/test/test_tarfile.py:654: DeprecationWarning: use the filter argument instead tar.add(tempdir, arcname="empty_dir", exclude=exclude) /tmp/python-test/local/lib/python2.7/tarfile.py:1978: DeprecationWarning: use the filter argument instead recursive, exclude, filter) test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [15424 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading [18734 refs] [21132 refs] [20108 refs] [20108 refs] [20108 refs] [20108 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_pep352 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 [777932 refs] From python-checkins at python.org Thu Sep 17 11:37:29 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 09:37:29 -0000 Subject: [Python-checkins] r74866 - peps/trunk/pep-3143.txt Message-ID: Author: georg.brandl Date: Thu Sep 17 11:37:29 2009 New Revision: 74866 Log: Update to PEP 3143 from Ben. Modified: peps/trunk/pep-3143.txt Modified: peps/trunk/pep-3143.txt ============================================================================== --- peps/trunk/pep-3143.txt (original) +++ peps/trunk/pep-3143.txt Thu Sep 17 11:37:29 2009 @@ -210,8 +210,6 @@ actually defined in the ``signal`` module will appear in the default map: - * ``signal.SIGCLD``: ``None`` - * ``signal.SIGTTIN``: ``None`` * ``signal.SIGTTOU``: ``None`` @@ -220,6 +218,13 @@ * ``signal.SIGTERM``: ``'terminate'`` + Depending on how the program will interact with its child + processes, it may need to specify a signal map that includes the + ``signal.SIGCHLD`` signal (received when a child process exits). + See the specific operating system's documentation for more detail + on how to determine what circumstances dictate the need for signal + handlers. + `uid` :Default: ``os.getuid()`` @@ -271,6 +276,10 @@ Open the daemon context, turning the current program into a daemon process. This performs the following steps: + * If this instance's `is_open` property is true, return + immediately. This makes it safe to call `open` multiple times on + an instance. + * If the `prevent_core` attribute is true, set the resource limits for the process to prevent any core dump from the process. @@ -312,6 +321,9 @@ * If the `pidfile` attribute is not ``None``, enter its context manager. + * Mark this instance as open (for the purpose of future `open` and + `close` calls). + * Register the `close` method to be called during Python's exit processing. @@ -321,11 +333,26 @@ `close()` :Return: ``None`` - Close the daemon context. This performs the following step: + Close the daemon context. This performs the following steps: + + * If this instance's `is_open` property is false, return + immediately. This makes it safe to call `close` multiple times + on an instance. * If the `pidfile` attribute is not ``None``, exit its context manager. + * Mark this instance as closed (for the purpose of future `open` + and `close` calls). + +`is_open` + :Return: ``True`` if the instance is open, ``False`` otherwise. + + This property exposes the state indicating whether the instance is + currently open. It is ``True`` if the instance's `open` method has + been called and the `close` method has not subsequently been + called. + `terminate(signal_number, stack_frame)` :Return: ``None`` @@ -577,9 +604,5 @@ Local variables: mode: rst coding: utf-8 - time-stamp-start: "^Last-Modified:[ ]+\$Date: " - time-stamp-end: " \$$" - time-stamp-line-limit: 20 - time-stamp-format: "%:y-%02m-%02d %02H:%02M" End: vim: filetype=rst fileencoding=utf-8 : From python-checkins at python.org Thu Sep 17 11:42:10 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 09:42:10 -0000 Subject: [Python-checkins] r74867 - peps/trunk/Makefile Message-ID: Author: georg.brandl Date: Thu Sep 17 11:42:09 2009 New Revision: 74867 Log: Dont print the pep2html command for each PEP. Modified: peps/trunk/Makefile Modified: peps/trunk/Makefile ============================================================================== --- peps/trunk/Makefile (original) +++ peps/trunk/Makefile Thu Sep 17 11:42:09 2009 @@ -10,7 +10,7 @@ .SUFFIXES: .txt .html .txt.html: - $(PYTHON) $(PEP2HTML) $< + @$(PYTHON) $(PEP2HTML) $< TARGETS=$(patsubst %.txt,%.html,$(wildcard pep-????.txt)) pep-0000.html From nnorwitz at gmail.com Thu Sep 17 11:43:35 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 17 Sep 2009 05:43:35 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090917094335.GA2565@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 0, -420] references, sum=-420 Less important issues: ---------------------- test_asynchat leaked [-130, 0, 0] references, sum=-130 test_cmd_line leaked [-25, 0, 0] references, sum=-25 test_file2k leaked [0, 91, -91] references, sum=0 test_smtplib leaked [-93, 267, -176] references, sum=-2 test_sys leaked [0, 42, -21] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 From nnorwitz at gmail.com Thu Sep 17 12:02:51 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 17 Sep 2009 06:02:51 -0400 Subject: [Python-checkins] Python Regression Test Failures all (1) Message-ID: <20090917100251.GA9651@python.psfb.org> 344 tests OK. 1 test failed: test_pep352 27 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl test_epoll test_gl test_imgfile test_ioctl test_kqueue test_macos test_macostools test_multiprocessing test_pep277 test_py3kwarn test_scriptpackages test_startfile test_sunaudiodev test_tcl test_tk test_ttk_guionly test_ttk_textonly test_unicode_file 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 Sleepycat Software: Berkeley DB 4.1.25: (December 19, 2002) Test path prefix: /tmp/z-test_bsddb3-2573 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_datetime test_dbm test_decimal test_decorators test_defaultdict test_deque test_descr test_descrtut test_difflib test_dircache test_dis test_distutils [19542 refs] 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 [15421 refs] [15421 refs] [15421 refs] [25430 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_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_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 test_pep352 failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.7/test/test_pep352.py", line 152, in test_message_deprecation self.fail("BaseException.message assignment not deprecated") AssertionError: BaseException.message assignment not deprecated test_pickle test_pickletools test_pipes test_pkg test_pkgimport test_pkgutil test_platform [17009 refs] [17009 refs] test_plistlib test_poll test_popen [15426 refs] [15426 refs] [15426 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 [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20920 refs] [20919 refs] [20919 refs] test_pyexpat test_queue test_quopri [17947 refs] [17947 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 [15421 refs] [15421 refs] [15424 refs] [15421 refs] test_slice test_smtplib test_smtpnet test_socket test_socketserver 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 [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [17264 refs] [15636 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] [15421 refs] . [15421 refs] [15421 refs] this bit of output is from a test of stdout in a different process ... [15421 refs] [15421 refs] [15636 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [15421 refs] [15421 refs] [15650 refs] [15444 refs] test_tarfile /tmp/python-test/local/lib/python2.7/test/test_tarfile.py:654: DeprecationWarning: use the filter argument instead tar.add(tempdir, arcname="empty_dir", exclude=exclude) /tmp/python-test/local/lib/python2.7/tarfile.py:1978: DeprecationWarning: use the filter argument instead recursive, exclude, filter) test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [15424 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading [18734 refs] [21132 refs] [20108 refs] [20108 refs] [20108 refs] [20108 refs] test_threading_local test_threadsignals test_time test_timeout 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 /tmp/python-test/local/lib/python2.7/test/test_urllib2net.py:181: DeprecationWarning: With-statements now directly support multiple context managers with test_support.transient_internet(): test_urllibnet test_urlparse test_userdict test_userlist test_userstring test_uu test_uuid WARNING: uuid.getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._ifconfig_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._unixdll_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. test_wait3 test_wait4 test_warnings test_wave test_weakref test_whichdb test_winreg test_winreg skipped -- No module named _winreg test_winsound test_winsound skipped -- No module named winsound test_with test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c test_xmllib /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 sh: line 1: python2.4: command not found sh: line 1: python2.6: command not found 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 344 tests OK. 1 test failed: test_pep352 27 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl test_epoll test_gl test_imgfile test_ioctl test_kqueue test_macos test_macostools test_multiprocessing test_pep277 test_py3kwarn test_scriptpackages test_startfile test_sunaudiodev test_tcl test_tk test_ttk_guionly test_ttk_textonly test_unicode_file 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 [793817 refs] From python-checkins at python.org Thu Sep 17 12:23:28 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 10:23:28 -0000 Subject: [Python-checkins] r74868 - python/trunk/Doc/library/optparse.rst Message-ID: Author: georg.brandl Date: Thu Sep 17 12:23:02 2009 New Revision: 74868 Log: String values should be shown with quotes, to avoid confusion with constants. Modified: python/trunk/Doc/library/optparse.rst Modified: python/trunk/Doc/library/optparse.rst ============================================================================== --- python/trunk/Doc/library/optparse.rst (original) +++ python/trunk/Doc/library/optparse.rst Thu Sep 17 12:23:02 2009 @@ -806,31 +806,31 @@ this option on the command-line. The standard option actions hard-coded into :mod:`optparse` are: -``store`` +``'store'`` store this option's argument (default) -``store_const`` +``'store_const'`` store a constant value -``store_true`` +``'store_true'`` store a true value -``store_false`` +``'store_false'`` store a false value -``append`` +``'append'`` append this option's argument to a list -``append_const`` +``'append_const'`` append a constant value to a list -``count`` +``'count'`` increment a counter by one -``callback`` +``'callback'`` call a specified function -:attr:`help` +``'help'`` 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 @@ -880,7 +880,7 @@ 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, @@ -889,7 +889,7 @@ "Option types" section below. If ``choices`` is supplied (a list or tuple of strings), the type defaults to - ``choice``. + ``'choice'``. If :attr:`!type` is not supplied, it defaults to ``string``. @@ -913,7 +913,7 @@ options.point = (1.0, -3.5, 4.0) options.f = "bar.txt" -* ``store_const`` [required: ``const``; relevant: :attr:`dest`] +* ``'store_const'`` [required: ``const``; relevant: :attr:`dest`] The value ``const`` is stored in :attr:`dest`. @@ -930,11 +930,11 @@ options.verbose = 2 -* ``store_true`` [relevant: :attr:`dest`] +* ``'store_true'`` [relevant: :attr:`dest`] A special case of ``store_const`` that stores a true value to :attr:`dest`. -* ``store_false`` [relevant: :attr:`dest`] +* ``'store_false'`` [relevant: :attr:`dest`] Like ``store_true``, but stores a false value. @@ -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 @@ -968,13 +968,13 @@ options.tracks.append(int("4")) -* ``append_const`` [required: ``const``; relevant: :attr:`dest`] +* ``'append_const'`` [required: ``const``; relevant: :attr:`dest`] Like ``store_const``, but the value ``const`` is appended to :attr:`dest`; as with ``append``, :attr:`dest` defaults to ``None``, and an empty list is automatically created the first time the option is encountered. -* ``count`` [relevant: :attr:`dest`] +* ``'count'`` [relevant: :attr:`dest`] Increment the integer stored at :attr:`dest`. If no default value is supplied, :attr:`dest` is set to zero before being incremented the first time. @@ -993,8 +993,8 @@ options.verbosity += 1 -* ``callback`` [required: ``callback``; relevant: :attr:`!type`, ``nargs``, - ``callback_args``, ``callback_kwargs``] +* ``'callback'`` [required: ``callback``; relevant: :attr:`!type`, ``nargs``, + ``'callback_args'``, ``callback_kwargs``] Call the function specified by ``callback``, which is called as :: @@ -1002,7 +1002,7 @@ See section :ref:`optparse-option-callbacks` for more detail. -* :attr:`help` +* ``'help'`` Prints a complete help message for all the options in the current option parser. The help message is constructed from the ``usage`` string passed to @@ -1044,7 +1044,7 @@ After printing the help message, :mod:`optparse` terminates your process with ``sys.exit(0)``. -* ``version`` +* ``'version'`` Prints the version number supplied to the OptionParser to stdout and exits. The version number is actually formatted and printed by the ``print_version()`` @@ -1262,10 +1262,10 @@ The available conflict handlers are: - ``error`` (default) + ``'error'`` (default) assume option conflicts are a programming error and raise :exc:`OptionConflictError` - ``resolve`` + ``'resolve'`` resolve option conflicts intelligently (see below) From python-checkins at python.org Thu Sep 17 13:28:09 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 11:28:09 -0000 Subject: [Python-checkins] r74869 - in python/trunk: Lib/test/test_codecs.py Misc/NEWS Objects/unicodeobject.c Message-ID: Author: georg.brandl Date: Thu Sep 17 13:28:09 2009 New Revision: 74869 Log: Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32 stream with a non-raising error handler like "replace" or "ignore". Modified: python/trunk/Lib/test/test_codecs.py python/trunk/Misc/NEWS python/trunk/Objects/unicodeobject.c Modified: python/trunk/Lib/test/test_codecs.py ============================================================================== --- python/trunk/Lib/test/test_codecs.py (original) +++ python/trunk/Lib/test/test_codecs.py Thu Sep 17 13:28:09 2009 @@ -305,6 +305,12 @@ ] ) + def test_handlers(self): + self.assertEqual((u'\ufffd', 1), + codecs.utf_32_decode('\x01', 'replace', True)) + self.assertEqual((u'', 1), + codecs.utf_32_decode('\x01', 'ignore', True)) + def test_errors(self): self.assertRaises(UnicodeDecodeError, codecs.utf_32_decode, "\xff", "strict", True) @@ -422,6 +428,12 @@ ] ) + def test_handlers(self): + self.assertEqual((u'\ufffd', 1), + codecs.utf_16_decode('\x01', 'replace', True)) + self.assertEqual((u'', 1), + codecs.utf_16_decode('\x01', 'ignore', True)) + def test_errors(self): self.assertRaises(UnicodeDecodeError, codecs.utf_16_decode, "\xff", "strict", True) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Thu Sep 17 13:28:09 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #6922: Fix an infinite loop when trying to decode an invalid + UTF-32 stream with a non-raising error handler like "replace" or "ignore". + - Issue #6713: Improve performance of integer -> string conversions. - Issue #1590864: Fix potential deadlock when mixing threads and fork(). Modified: python/trunk/Objects/unicodeobject.c ============================================================================== --- python/trunk/Objects/unicodeobject.c (original) +++ python/trunk/Objects/unicodeobject.c Thu Sep 17 13:28:09 2009 @@ -2321,7 +2321,7 @@ if (unicode_decode_call_errorhandler( errors, &errorHandler, "utf32", errmsg, - starts, size, &startinpos, &endinpos, &exc, &s, + starts, size, &startinpos, &endinpos, &exc, (const char **)&q, &unicode, &outpos, &p)) goto onError; } From python-checkins at python.org Thu Sep 17 13:33:32 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 11:33:32 -0000 Subject: [Python-checkins] r74870 - in python/branches/release26-maint: Lib/test/test_codecs.py Misc/NEWS Objects/unicodeobject.c Message-ID: Author: georg.brandl Date: Thu Sep 17 13:33:31 2009 New Revision: 74870 Log: Merged revisions 74869 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74869 | georg.brandl | 2009-09-17 13:28:09 +0200 (Do, 17 Sep 2009) | 4 lines Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32 stream with a non-raising error handler like "replace" or "ignore". ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_codecs.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Objects/unicodeobject.c Modified: python/branches/release26-maint/Lib/test/test_codecs.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_codecs.py (original) +++ python/branches/release26-maint/Lib/test/test_codecs.py Thu Sep 17 13:33:31 2009 @@ -305,6 +305,12 @@ ] ) + def test_handlers(self): + self.assertEqual((u'\ufffd', 1), + codecs.utf_32_decode('\x01', 'replace', True)) + self.assertEqual((u'', 1), + codecs.utf_32_decode('\x01', 'ignore', True)) + def test_errors(self): self.assertRaises(UnicodeDecodeError, codecs.utf_32_decode, "\xff", "strict", True) @@ -422,6 +428,12 @@ ] ) + def test_handlers(self): + self.assertEqual((u'\ufffd', 1), + codecs.utf_16_decode('\x01', 'replace', True)) + self.assertEqual((u'', 1), + codecs.utf_16_decode('\x01', 'ignore', True)) + def test_errors(self): self.assertRaises(UnicodeDecodeError, codecs.utf_16_decode, "\xff", "strict", True) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Thu Sep 17 13:33:31 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #6922: Fix an infinite loop when trying to decode an invalid + UTF-32 stream with a non-raising error handler like "replace" or "ignore". + - Issue #1590864: Fix potential deadlock when mixing threads and fork(). - Issue #6844: Do not emit DeprecationWarnings when accessing a "message" Modified: python/branches/release26-maint/Objects/unicodeobject.c ============================================================================== --- python/branches/release26-maint/Objects/unicodeobject.c (original) +++ python/branches/release26-maint/Objects/unicodeobject.c Thu Sep 17 13:33:31 2009 @@ -2207,7 +2207,7 @@ if (unicode_decode_call_errorhandler( errors, &errorHandler, "utf32", errmsg, - starts, size, &startinpos, &endinpos, &exc, &s, + starts, size, &startinpos, &endinpos, &exc, (const char **)&q, &unicode, &outpos, &p)) goto onError; } From python-checkins at python.org Thu Sep 17 13:41:24 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 11:41:24 -0000 Subject: [Python-checkins] r74871 - in python/branches/py3k: Lib/test/test_codecs.py Message-ID: Author: georg.brandl Date: Thu Sep 17 13:41:24 2009 New Revision: 74871 Log: Merged revisions 74869 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk (Only the new tests, the code had already been corrected due to an API change in unicode_decode_call_errorhandler.) ........ r74869 | georg.brandl | 2009-09-17 13:28:09 +0200 (Do, 17 Sep 2009) | 4 lines Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32 stream with a non-raising error handler like "replace" or "ignore". ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_codecs.py 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 Thu Sep 17 13:41:24 2009 @@ -338,6 +338,12 @@ ] ) + def test_handlers(self): + self.assertEqual(('\ufffd', 1), + codecs.utf_32_decode(b'\x01', 'replace', True)) + self.assertEqual(('', 1), + codecs.utf_32_decode(b'\x01', 'ignore', True)) + def test_errors(self): self.assertRaises(UnicodeDecodeError, codecs.utf_32_decode, b"\xff", "strict", True) @@ -461,6 +467,12 @@ ] ) + def test_handlers(self): + self.assertEqual(('\ufffd', 1), + codecs.utf_16_decode(b'\x01', 'replace', True)) + self.assertEqual(('', 1), + codecs.utf_16_decode(b'\x01', 'ignore', True)) + def test_errors(self): self.assertRaises(UnicodeDecodeError, codecs.utf_16_decode, b"\xff", "strict", True) From python-checkins at python.org Thu Sep 17 13:46:23 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 11:46:23 -0000 Subject: [Python-checkins] r74872 - in python/branches/release31-maint: Lib/test/test_codecs.py Message-ID: Author: georg.brandl Date: Thu Sep 17 13:46:23 2009 New Revision: 74872 Log: Merged revisions 74871 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ................ r74871 | georg.brandl | 2009-09-17 13:41:24 +0200 (Do, 17 Sep 2009) | 12 lines Merged revisions 74869 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk (Only the new tests, the code had already been corrected due to an API change in unicode_decode_call_errorhandler.) ........ r74869 | georg.brandl | 2009-09-17 13:28:09 +0200 (Do, 17 Sep 2009) | 4 lines Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32 stream with a non-raising error handler like "replace" or "ignore". ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/test/test_codecs.py Modified: python/branches/release31-maint/Lib/test/test_codecs.py ============================================================================== --- python/branches/release31-maint/Lib/test/test_codecs.py (original) +++ python/branches/release31-maint/Lib/test/test_codecs.py Thu Sep 17 13:46:23 2009 @@ -338,6 +338,12 @@ ] ) + def test_handlers(self): + self.assertEqual(('\ufffd', 1), + codecs.utf_32_decode(b'\x01', 'replace', True)) + self.assertEqual(('', 1), + codecs.utf_32_decode(b'\x01', 'ignore', True)) + def test_errors(self): self.assertRaises(UnicodeDecodeError, codecs.utf_32_decode, b"\xff", "strict", True) @@ -461,6 +467,12 @@ ] ) + def test_handlers(self): + self.assertEqual(('\ufffd', 1), + codecs.utf_16_decode(b'\x01', 'replace', True)) + self.assertEqual(('', 1), + codecs.utf_16_decode(b'\x01', 'ignore', True)) + def test_errors(self): self.assertRaises(UnicodeDecodeError, codecs.utf_16_decode, b"\xff", "strict", True) From python-checkins at python.org Thu Sep 17 13:48:32 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 11:48:32 -0000 Subject: [Python-checkins] r74873 - python/trunk/Lib/test/test_pep352.py Message-ID: Author: georg.brandl Date: Thu Sep 17 13:48:31 2009 New Revision: 74873 Log: #6844 followup: the warning when setting Exception.message was removed, do not test for it. Modified: python/trunk/Lib/test/test_pep352.py Modified: python/trunk/Lib/test/test_pep352.py ============================================================================== --- python/trunk/Lib/test/test_pep352.py (original) +++ python/trunk/Lib/test/test_pep352.py Thu Sep 17 13:48:31 2009 @@ -143,13 +143,6 @@ else: self.fail("BaseException.message not deprecated") - exc = BaseException() - try: - exc.message = '' - except DeprecationWarning: - pass - else: - self.fail("BaseException.message assignment not deprecated") class UsageTests(unittest.TestCase): From python-checkins at python.org Thu Sep 17 13:49:21 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 11:49:21 -0000 Subject: [Python-checkins] r74874 - in python/branches/release26-maint: Lib/test/test_pep352.py Message-ID: Author: georg.brandl Date: Thu Sep 17 13:49:20 2009 New Revision: 74874 Log: Merged revisions 74873 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74873 | georg.brandl | 2009-09-17 13:48:31 +0200 (Do, 17 Sep 2009) | 1 line #6844 followup: the warning when setting Exception.message was removed, do not test for it. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_pep352.py Modified: python/branches/release26-maint/Lib/test/test_pep352.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_pep352.py (original) +++ python/branches/release26-maint/Lib/test/test_pep352.py Thu Sep 17 13:49:20 2009 @@ -143,13 +143,6 @@ else: self.fail("BaseException.message not deprecated") - exc = BaseException() - try: - exc.message = '' - except DeprecationWarning: - pass - else: - self.fail("BaseException.message assignment not deprecated") class UsageTests(unittest.TestCase): From python-checkins at python.org Thu Sep 17 13:50:17 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 11:50:17 -0000 Subject: [Python-checkins] r74875 - python/branches/py3k Message-ID: Author: georg.brandl Date: Thu Sep 17 13:50:17 2009 New Revision: 74875 Log: Blocked revisions 74873 via svnmerge ........ r74873 | georg.brandl | 2009-09-17 13:48:31 +0200 (Do, 17 Sep 2009) | 1 line #6844 followup: the warning when setting Exception.message was removed, do not test for it. ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Thu Sep 17 18:15:53 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 16:15:53 -0000 Subject: [Python-checkins] r74876 - python/trunk/Doc/library/shelve.rst Message-ID: Author: georg.brandl Date: Thu Sep 17 18:15:53 2009 New Revision: 74876 Log: #6932: remove paragraph that advises relying on __del__ being called. Modified: python/trunk/Doc/library/shelve.rst Modified: python/trunk/Doc/library/shelve.rst ============================================================================== --- python/trunk/Doc/library/shelve.rst (original) +++ python/trunk/Doc/library/shelve.rst Thu Sep 17 18:15:53 2009 @@ -30,27 +30,39 @@ Because of Python semantics, a shelf cannot know when a mutable persistent-dictionary entry is modified. By default modified objects are - written only when assigned to the shelf (see :ref:`shelve-example`). If - the optional *writeback* parameter is set to *True*, all entries accessed - are cached in memory, and written back at close time; this can make it - handier to mutate mutable entries in the persistent dictionary, but, if - many entries are accessed, it can consume vast amounts of memory for the - cache, and it can make the close operation very slow since all accessed - entries are written back (there is no way to determine which accessed - entries are mutable, nor which ones were actually mutated). + written only when assigned to the shelf (see :ref:`shelve-example`). If the + optional *writeback* parameter is set to *True*, all entries accessed are + cached in memory, and written back on :meth:`sync` and :meth:`close`; this + can make it handier to mutate mutable entries in the persistent dictionary, + but, if many entries are accessed, it can consume vast amounts of memory for + the cache, and it can make the close operation very slow since all accessed + entries are written back (there is no way to determine which accessed entries + are mutable, nor which ones were actually mutated). + + .. note:: + + Do not rely on the shelf being closed automatically; always call + :meth:`close` explicitly when you don't need it any more, or use a + :keyword:`with` statement with :func:`contextlib.closing`. + Shelf objects support all methods supported by dictionaries. This eases the transition from dictionary based scripts to those requiring persistent storage. -One additional method is supported: - +Two additional methods are supported: .. method:: Shelf.sync() - Write back all entries in the cache if the shelf was opened with *writeback* set - to *True*. Also empty the cache and synchronize the persistent dictionary on - disk, if feasible. This is called automatically when the shelf is closed with - :meth:`close`. + Write back all entries in the cache if the shelf was opened with *writeback* + set to :const:`True`. Also empty the cache and synchronize the persistent + dictionary on disk, if feasible. This is called automatically when the shelf + is closed with :meth:`close`. + +.. method:: Shelf.close() + + Synchronize and close the persistent *dict* object. Operations on a closed + shelf will fail with a :exc:`ValueError`. + .. seealso:: @@ -75,11 +87,6 @@ database should be fairly small, and in rare cases key collisions may cause the database to refuse updates. -* Depending on the implementation, closing a persistent dictionary may or may - not be necessary to flush changes to disk. The :meth:`__del__` method of the - :class:`Shelf` class calls the :meth:`close` method, so the programmer generally - need not do this explicitly. - * The :mod:`shelve` module does not support *concurrent* read/write access to shelved objects. (Multiple simultaneous read accesses are safe.) When a program has a shelf open for writing, no other program should have it open for From python-checkins at python.org Thu Sep 17 18:26:06 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 16:26:06 -0000 Subject: [Python-checkins] r74877 - python/trunk/Doc/library/optparse.rst Message-ID: Author: georg.brandl Date: Thu Sep 17 18:26:06 2009 New Revision: 74877 Log: Remove duplicate doc of enable/disable_interspersed_args. Modified: python/trunk/Doc/library/optparse.rst Modified: python/trunk/Doc/library/optparse.rst ============================================================================== --- python/trunk/Doc/library/optparse.rst (original) +++ python/trunk/Doc/library/optparse.rst Thu Sep 17 18:26:06 2009 @@ -1207,18 +1207,27 @@ OptionParser provides several methods to help you out: ``disable_interspersed_args()`` - Set parsing to stop on the first non-option. Use this if you have a - command processor which runs another command which has options of - its own and you want to make sure these options don't get - confused. For example, each command might have a different - set of options. + Set parsing to stop on the first non-option. For example, if ``"-a"`` and + ``"-b"`` are both simple options that take no arguments, :mod:`optparse` + normally accepts this syntax:: + + prog -a arg1 -b arg2 + + and treats it as equivalent to :: + + prog -a -b arg1 arg2 + + To disable this feature, call ``disable_interspersed_args()``. This restores + traditional Unix syntax, where option parsing stops with the first non-option + argument. + + Use this if you have a command processor which runs another command which has + options of its own and you want to make sure these options don't get confused. + For example, each command might have a different set of options. ``enable_interspersed_args()`` - Set parsing to not stop on the first non-option, allowing - interspersing switches with command arguments. For example, - ``"-s arg1 --long arg2"`` would return ``["arg1", "arg2"]`` - as the command arguments and ``-s, --long`` as options. - This is the default behavior. + Set parsing to not stop on the first non-option, allowing interspersing + switches with command arguments. This is the default behavior. ``get_option(opt_str)`` Returns the Option instance with the option string ``opt_str``, or ``None`` if @@ -1329,23 +1338,6 @@ constructor keyword argument. Passing ``None`` sets the default usage string; use ``SUPPRESS_USAGE`` to suppress a usage message. -* ``enable_interspersed_args()``, ``disable_interspersed_args()`` - - Enable/disable positional arguments interspersed with options, similar to GNU - getopt (enabled by default). For example, if ``"-a"`` and ``"-b"`` are both - simple options that take no arguments, :mod:`optparse` normally accepts this - syntax:: - - prog -a arg1 -b arg2 - - and treats it as equivalent to :: - - prog -a -b arg1 arg2 - - To disable this feature, call ``disable_interspersed_args()``. This restores - traditional Unix syntax, where option parsing stops with the first non-option - argument. - * ``set_defaults(dest=value, ...)`` Set default values for several option destinations at once. Using From python-checkins at python.org Thu Sep 17 19:14:04 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 17:14:04 -0000 Subject: [Python-checkins] r74878 - python/trunk/Doc/library/optparse.rst Message-ID: Author: georg.brandl Date: Thu Sep 17 19:14:04 2009 New Revision: 74878 Log: Make the optparse doc style a bit more standard: use standard description units for attrs/methods/etc., and use the correct referencing roles. Modified: python/trunk/Doc/library/optparse.rst Modified: python/trunk/Doc/library/optparse.rst ============================================================================== --- python/trunk/Doc/library/optparse.rst (original) +++ python/trunk/Doc/library/optparse.rst Thu Sep 17 19:14:04 2009 @@ -11,14 +11,14 @@ .. sectionauthor:: Greg Ward -``optparse`` is a more convenient, flexible, and powerful library for parsing -command-line options than the old :mod:`getopt` module. ``optparse`` uses a more declarative -style of command-line parsing: you create an instance of :class:`OptionParser`, -populate it with options, and parse the command line. ``optparse`` allows users -to specify options in the conventional GNU/POSIX syntax, and additionally -generates usage and help messages for you. +:mod:`optparse` is a more convenient, flexible, and powerful library for parsing +command-line options than the old :mod:`getopt` module. :mod:`optparse` uses a +more declarative style of command-line parsing: you create an instance of +:class:`OptionParser`, populate it with options, and parse the command +line. :mod:`optparse` allows users to specify options in the conventional +GNU/POSIX syntax, and additionally generates usage and help messages for you. -Here's an example of using ``optparse`` in a simple script:: +Here's an example of using :mod:`optparse` in a simple script:: from optparse import OptionParser [...] @@ -36,11 +36,11 @@ --file=outfile -q -As it parses the command line, ``optparse`` sets attributes of the ``options`` -object returned by :meth:`parse_args` based on user-supplied command-line -values. When :meth:`parse_args` returns from parsing this command line, -``options.filename`` will be ``"outfile"`` and ``options.verbose`` will be -``False``. ``optparse`` supports both long and short options, allows short +As it parses the command line, :mod:`optparse` sets attributes of the +``options`` object returned by :meth:`parse_args` based on user-supplied +command-line values. When :meth:`parse_args` returns from parsing this command +line, ``options.filename`` will be ``"outfile"`` and ``options.verbose`` will be +``False``. :mod:`optparse` supports both long and short options, allows short options to be merged together, and allows options to be associated with their arguments in a variety of ways. Thus, the following command lines are all equivalent to the above example:: @@ -55,7 +55,7 @@ -h --help -and ``optparse`` will print out a brief summary of your script's options:: +and :mod:`optparse` will print out a brief summary of your script's options:: usage: [options] @@ -86,10 +86,10 @@ ^^^^^^^^^^^ argument - a string entered on the command-line, and passed by the shell to ``execl()`` or - ``execv()``. In Python, arguments are elements of ``sys.argv[1:]`` - (``sys.argv[0]`` is the name of the program being executed). Unix shells also - use the term "word". + a string entered on the command-line, and passed by the shell to ``execl()`` + or ``execv()``. In Python, arguments are elements of ``sys.argv[1:]`` + (``sys.argv[0]`` is the name of the program being executed). Unix shells + also use the term "word". It is occasionally desirable to substitute an argument list other than ``sys.argv[1:]``, so you should read "argument" as "an element of @@ -97,14 +97,14 @@ ``sys.argv[1:]``". option - an argument used to supply extra information to guide or customize the execution - of a program. There are many different syntaxes for options; the traditional - Unix syntax is a hyphen ("-") followed by a single letter, e.g. ``"-x"`` or - ``"-F"``. Also, traditional Unix syntax allows multiple options to be merged - into a single argument, e.g. ``"-x -F"`` is equivalent to ``"-xF"``. The GNU - project introduced ``"--"`` followed by a series of hyphen-separated words, e.g. - ``"--file"`` or ``"--dry-run"``. These are the only two option syntaxes - provided by :mod:`optparse`. + an argument used to supply extra information to guide or customize the + execution of a program. There are many different syntaxes for options; the + traditional Unix syntax is a hyphen ("-") followed by a single letter, + e.g. ``"-x"`` or ``"-F"``. Also, traditional Unix syntax allows multiple + options to be merged into a single argument, e.g. ``"-x -F"`` is equivalent + to ``"-xF"``. The GNU project introduced ``"--"`` followed by a series of + hyphen-separated words, e.g. ``"--file"`` or ``"--dry-run"``. These are the + only two option syntaxes provided by :mod:`optparse`. Some other option syntaxes that the world has seen include: @@ -121,15 +121,16 @@ * a slash followed by a letter, or a few letters, or a word, e.g. ``"/f"``, ``"/file"`` - These option syntaxes are not supported by :mod:`optparse`, and they never will - be. This is deliberate: the first three are non-standard on any environment, - and the last only makes sense if you're exclusively targeting VMS, MS-DOS, - and/or Windows. + These option syntaxes are not supported by :mod:`optparse`, and they never + will be. This is deliberate: the first three are non-standard on any + environment, and the last only makes sense if you're exclusively targeting + VMS, MS-DOS, and/or Windows. option argument - an argument that follows an option, is closely associated with that option, and - is consumed from the argument list when that option is. With :mod:`optparse`, - option arguments may either be in a separate argument from their option:: + an argument that follows an option, is closely associated with that option, + and is consumed from the argument list when that option is. With + :mod:`optparse`, option arguments may either be in a separate argument from + their option:: -f foo --file foo @@ -139,25 +140,26 @@ -ffoo --file=foo - Typically, a given option either takes an argument or it doesn't. Lots of people - want an "optional option arguments" feature, meaning that some options will take - an argument if they see it, and won't if they don't. This is somewhat - controversial, because it makes parsing ambiguous: if ``"-a"`` takes an optional - argument and ``"-b"`` is another option entirely, how do we interpret ``"-ab"``? - Because of this ambiguity, :mod:`optparse` does not support this feature. + Typically, a given option either takes an argument or it doesn't. Lots of + people want an "optional option arguments" feature, meaning that some options + will take an argument if they see it, and won't if they don't. This is + somewhat controversial, because it makes parsing ambiguous: if ``"-a"`` takes + an optional argument and ``"-b"`` is another option entirely, how do we + interpret ``"-ab"``? Because of this ambiguity, :mod:`optparse` does not + support this feature. positional argument something leftover in the argument list after options have been parsed, i.e. - after options and their arguments have been parsed and removed from the argument - list. + after options and their arguments have been parsed and removed from the + argument list. required option an option that must be supplied on the command-line; note that the phrase "required option" is self-contradictory in English. :mod:`optparse` doesn't - prevent you from implementing required options, but doesn't give you much help - at it either. See ``examples/required_1.py`` and ``examples/required_2.py`` in - the :mod:`optparse` source distribution for two ways to implement required - options with :mod:`optparse`. + prevent you from implementing required options, but doesn't give you much + help at it either. See ``examples/required_1.py`` and + ``examples/required_2.py`` in the :mod:`optparse` source distribution for two + ways to implement required options with :mod:`optparse`. For example, consider this hypothetical command-line:: @@ -286,8 +288,9 @@ * ``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 -these, :attr:`action` is the most fundamental. +:attr:`~Option.action`, :attr:`~Option.type`, :attr:`~Option.dest` +(destination), and :attr:`~Option.help`. Of these, :attr:`~Option.action` is the +most fundamental. .. _optparse-understanding-option-actions: @@ -298,9 +301,9 @@ Actions tell :mod:`optparse` what to do when it encounters an option on the command line. There is a fixed set of actions hard-coded into :mod:`optparse`; adding new actions is an advanced topic covered in section -:ref:`optparse-extending-optparse`. Most actions tell -:mod:`optparse` to store a value in some variable---for example, take a string -from the command line and store it in an attribute of ``options``. +:ref:`optparse-extending-optparse`. Most actions tell :mod:`optparse` to store +a value in some variable---for example, take a string from the command line and +store it in an attribute of ``options``. If you don't specify an option action, :mod:`optparse` defaults to ``store``. @@ -338,7 +341,7 @@ Let's parse another fake command-line. This time, we'll jam the option argument right up against the option: since ``"-n42"`` (one argument) is equivalent to -``"-n 42"`` (two arguments), the code :: +``"-n 42"`` (two arguments), the code :: (options, args) = parser.parse_args(["-n42"]) print options.num @@ -390,16 +393,16 @@ Some other actions supported by :mod:`optparse` are: -``store_const`` +``"store_const"`` store a constant value -``append`` +``"append"`` append this option's argument to a list -``count`` +``"count"`` increment a counter by one -``callback`` +``"callback"`` call a specified function These are covered in section :ref:`optparse-reference-guide`, Reference Guide @@ -458,8 +461,8 @@ :mod:`optparse`'s ability to generate help and usage text automatically is useful for creating user-friendly command-line interfaces. All you have to do -is supply a :attr:`help` value for each option, and optionally a short usage -message for your whole program. Here's an OptionParser populated with +is supply a :attr:`~Option.help` value for each option, and optionally a short +usage message for your whole program. Here's an OptionParser populated with user-friendly (documented) options:: usage = "usage: %prog [options] arg1 arg2" @@ -503,12 +506,12 @@ usage = "usage: %prog [options] arg1 arg2" :mod:`optparse` expands ``"%prog"`` in the usage string to the name of the - current program, i.e. ``os.path.basename(sys.argv[0])``. The expanded string is - then printed before the detailed option help. + current program, i.e. ``os.path.basename(sys.argv[0])``. The expanded string + is then printed before the detailed option help. If you don't supply a usage string, :mod:`optparse` uses a bland but sensible - default: ``"usage: %prog [options]"``, which is fine if your script doesn't take - any positional arguments. + default: ``"usage: %prog [options]"``, which is fine if your script doesn't + take any positional arguments. * every option defines a help string, and doesn't worry about line-wrapping--- :mod:`optparse` takes care of wrapping lines and making the help output look @@ -522,17 +525,17 @@ Here, "MODE" is called the meta-variable: it stands for the argument that the user is expected to supply to :option:`-m`/:option:`--mode`. By default, :mod:`optparse` converts the destination variable name to uppercase and uses - that for the meta-variable. Sometimes, that's not what you want---for example, - the :option:`--filename` option explicitly sets ``metavar="FILE"``, resulting in - this automatically-generated option description:: + that for the meta-variable. Sometimes, that's not what you want---for + example, the :option:`--filename` option explicitly sets ``metavar="FILE"``, + resulting in this automatically-generated option description:: -f FILE, --filename=FILE - This is important for more than just saving space, though: the manually written - help text uses the meta-variable "FILE" to clue the user in that there's a - connection between the semi-formal syntax "-f FILE" and the informal semantic - description "write output to FILE". This is a simple but effective way to make - your help text a lot clearer and more useful for end users. + This is important for more than just saving space, though: the manually + written help text uses the meta-variable "FILE" to clue the user in that + there's a connection between the semi-formal syntax "-f FILE" and the informal + semantic description "write output to FILE". This is a simple but effective + way to make your help text a lot clearer and more useful for end users. .. versionadded:: 2.4 Options that have a default value can include ``%default`` in the help @@ -540,12 +543,12 @@ default value. If an option has no default value (or the default value is ``None``), ``%default`` expands to ``none``. -When dealing with many options, it is convenient to group these -options for better help output. An :class:`OptionParser` can contain -several option groups, each of which can contain several options. +When dealing with many options, it is convenient to group these options for +better help output. An :class:`OptionParser` can contain several option groups, +each of which can contain several options. -Continuing with the parser defined above, adding an -:class:`OptionGroup` to a parser is easy:: +Continuing with the parser defined above, adding an :class:`OptionGroup` to a +parser is easy:: group = OptionGroup(parser, "Dangerous Options", "Caution: use these options at your own risk. " @@ -600,17 +603,17 @@ There are two broad classes of errors that :mod:`optparse` has to worry about: programmer errors and user errors. Programmer errors are usually erroneous -calls to ``parser.add_option()``, e.g. invalid option strings, unknown option -attributes, missing option attributes, etc. These are dealt with in the usual -way: raise an exception (either ``optparse.OptionError`` or :exc:`TypeError`) and -let the program crash. +calls to :func:`OptionParser.add_option`, e.g. invalid option strings, unknown +option attributes, missing option attributes, etc. These are dealt with in the +usual way: raise an exception (either :exc:`optparse.OptionError` or +:exc:`TypeError`) and let the program crash. Handling user errors is much more important, since they are guaranteed to happen no matter how stable your code is. :mod:`optparse` can automatically detect some user errors, such as bad option arguments (passing ``"-n 4x"`` where :option:`-n` takes an integer argument), missing arguments (``"-n"`` at the end of the command line, where :option:`-n` takes an argument of any type). Also, -you can call ``parser.error()`` to signal an application-defined error +you can call :func:`OptionParser.error` to signal an application-defined error condition:: (options, args) = parser.parse_args() @@ -639,7 +642,7 @@ :mod:`optparse`\ -generated error messages take care always to mention the option involved in the error; be sure to do the same when calling -``parser.error()`` from your application code. +:func:`OptionParser.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:`~OptionParser.exit` @@ -687,49 +690,51 @@ Creating the parser ^^^^^^^^^^^^^^^^^^^ -The first step in using :mod:`optparse` is to create an OptionParser instance:: +The first step in using :mod:`optparse` is to create an OptionParser instance. - parser = OptionParser(...) +.. class:: OptionParser(...) -The OptionParser constructor has no required arguments, but a number of optional -keyword arguments. You should always pass them as keyword arguments, i.e. do -not rely on the order in which the arguments are declared. + The OptionParser constructor has no required arguments, but a number of + optional keyword arguments. You should always pass them as keyword + arguments, i.e. do not rely on the order in which the arguments are declared. ``usage`` (default: ``"%prog [options]"``) - The usage summary to print when your program is run incorrectly or with a help - option. When :mod:`optparse` prints the usage string, it expands ``%prog`` to - ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed that keyword - argument). To suppress a usage message, pass the special value - ``optparse.SUPPRESS_USAGE``. + The usage summary to print when your program is run incorrectly or with a + help option. When :mod:`optparse` prints the usage string, it expands + ``%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you + passed that keyword argument). To suppress a usage message, pass the + special value :data:`optparse.SUPPRESS_USAGE`. ``option_list`` (default: ``[]``) A list of Option objects to populate the parser with. The options in - ``option_list`` are added after any options in ``standard_option_list`` (a class - attribute that may be set by OptionParser subclasses), but before any version or - help options. Deprecated; use :meth:`add_option` after creating the parser - instead. + ``option_list`` are added after any options in ``standard_option_list`` (a + class attribute that may be set by OptionParser subclasses), but before + any version or help options. Deprecated; use :meth:`add_option` after + creating the parser instead. ``option_class`` (default: optparse.Option) Class to use when adding options to the parser in :meth:`add_option`. ``version`` (default: ``None``) - A version string to print when the user supplies a version option. If you supply - a true value for ``version``, :mod:`optparse` automatically adds a version - option with the single option string ``"--version"``. The substring ``"%prog"`` - is expanded the same as for ``usage``. + A version string to print when the user supplies a version option. If you + supply a true value for ``version``, :mod:`optparse` automatically adds a + version option with the single option string ``"--version"``. The + substring ``"%prog"`` is expanded the same as for ``usage``. ``conflict_handler`` (default: ``"error"``) - Specifies what to do when options with conflicting option strings are added to - the parser; see section :ref:`optparse-conflicts-between-options`. + Specifies what to do when options with conflicting option strings are + added to the parser; see section + :ref:`optparse-conflicts-between-options`. ``description`` (default: ``None``) - A paragraph of text giving a brief overview of your program. :mod:`optparse` - reformats this paragraph to fit the current terminal width and prints it when - the user requests help (after ``usage``, but before the list of options). - - ``formatter`` (default: a new IndentedHelpFormatter) - An instance of optparse.HelpFormatter that will be used for printing help text. - :mod:`optparse` provides two concrete classes for this purpose: + A paragraph of text giving a brief overview of your program. + :mod:`optparse` reformats this paragraph to fit the current terminal width + and prints it when the user requests help (after ``usage``, but before the + list of options). + + ``formatter`` (default: a new :class:`IndentedHelpFormatter`) + An instance of optparse.HelpFormatter that will be used for printing help + text. :mod:`optparse` provides two concrete classes for this purpose: IndentedHelpFormatter and TitledHelpFormatter. ``add_help_option`` (default: ``True``) @@ -748,14 +753,14 @@ ^^^^^^^^^^^^^^^^^^^^^ There are several ways to populate the parser with options. The preferred way -is by using ``OptionParser.add_option()``, as shown in section +is by using :meth:`OptionParser.add_option`, as shown in section :ref:`optparse-tutorial`. :meth:`add_option` can be called in one of two ways: * pass it an Option instance (as returned by :func:`make_option`) * pass it any combination of positional and keyword arguments that are - acceptable to :func:`make_option` (i.e., to the Option constructor), and it will - create the Option instance for you + acceptable to :func:`make_option` (i.e., to the Option constructor), and it + will create the Option instance for you The other alternative is to pass a list of pre-constructed Option instances to the OptionParser constructor, as in:: @@ -783,66 +788,67 @@ e.g. :option:`-f` and :option:`--file`. You can specify any number of short or long option strings, but you must specify at least one overall option string. -The canonical way to create an Option instance is with the :meth:`add_option` -method of :class:`OptionParser`:: +The canonical way to create an :class:`Option` instance is with the +:meth:`add_option` method of :class:`OptionParser`. - parser.add_option(opt_str[, ...], attr=value, ...) +.. method:: OptionParser.add_option(opt_str[, ...], attr=value, ...) -To define an option with only a short option string:: + To define an option with only a short option string:: - parser.add_option("-f", attr=value, ...) + parser.add_option("-f", attr=value, ...) -And to define an option with only a long option string:: + And to define an option with only a long option string:: - parser.add_option("--foo", attr=value, ...) + parser.add_option("--foo", attr=value, ...) -The keyword arguments define attributes of the new Option object. The most -important option attribute is :attr:`action`, and it largely determines which -other attributes are relevant or required. If you pass irrelevant option -attributes, or fail to pass required ones, :mod:`optparse` raises an -:exc:`OptionError` exception explaining your mistake. + The keyword arguments define attributes of the new Option object. The most + important option attribute is :attr:`~Option.action`, and it largely + determines which other attributes are relevant or required. If you pass + irrelevant option attributes, or fail to pass required ones, :mod:`optparse` + raises an :exc:`OptionError` exception explaining your mistake. -An option's *action* determines what :mod:`optparse` does when it encounters -this option on the command-line. The standard option actions hard-coded into -:mod:`optparse` are: + An option's *action* determines what :mod:`optparse` does when it encounters + this option on the command-line. The standard option actions hard-coded into + :mod:`optparse` are: -``'store'`` - store this option's argument (default) + ``"store"`` + store this option's argument (default) -``'store_const'`` - store a constant value + ``"store_const"`` + store a constant value -``'store_true'`` - store a true value + ``"store_true"`` + store a true value -``'store_false'`` - store a false value + ``"store_false"`` + store a false value -``'append'`` - append this option's argument to a list + ``"append"`` + append this option's argument to a list -``'append_const'`` - append a constant value to a list + ``"append_const"`` + append a constant value to a list -``'count'`` - increment a counter by one + ``"count"`` + increment a counter by one -``'callback'`` - call a specified function + ``"callback"`` + call a specified function -``'help'`` - print a usage message including all options and the documentation for them + ``"help"`` + 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.) + (If you don't supply an action, the default is ``"store"``. For this action, + you may also supply :attr:`~Option.type` and :attr:`~Option.dest` option + attributes; see :ref:`optparse-standard-option-actions`.) As you can see, most actions involve storing or updating a value somewhere. :mod:`optparse` always creates a special object for this, conventionally called -``options`` (it happens to be an instance of ``optparse.Values``). Option +``options`` (it happens to be an instance of :class:`optparse.Values`). Option arguments (and various other values) are stored as attributes of this object, -according to the :attr:`dest` (destination) option attribute. +according to the :attr:`~Option.dest` (destination) option attribute. -For example, when you call :: +For example, when you call :: parser.parse_args() @@ -850,7 +856,7 @@ options = Values() -If one of the options in this parser is defined with :: +If one of the options in this parser is defined with :: parser.add_option("-f", "--file", action="store", type="string", dest="filename") @@ -861,13 +867,97 @@ --file=foo --file foo -then :mod:`optparse`, on seeing this option, will do the equivalent of :: +then :mod:`optparse`, on seeing this option, will do the equivalent of :: options.filename = "foo" -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. +The :attr:`~Option.type` and :attr:`~Option.dest` option attributes are almost +as important as :attr:`~Option.action`, but :attr:`~Option.action` is the only +one that makes sense for *all* options. + + +.. _optparse-option-attributes: + +Option attributes +^^^^^^^^^^^^^^^^^ + +The following option attributes may be passed as keyword arguments to +:meth:`OptionParser.add_option`. If you pass an option attribute that is not +relevant to a particular option, or fail to pass a required option attribute, +:mod:`optparse` raises :exc:`OptionError`. + +.. attribute:: Option.action + + (default: ``"store"``) + + Determines :mod:`optparse`'s behaviour when this option is seen on the + command line; the available options are documented :ref:`here + `. + +.. attribute:: Option.type + + (default: ``"string"``) + + The argument type expected by this option (e.g., ``"string"`` or ``"int"``); + the available option types are documented :ref:`here + `. + +.. attribute:: Option.dest + + (default: derived from option strings) + + If the option's action implies writing or modifying a value somewhere, this + tells :mod:`optparse` where to write it: :attr:`~Option.dest` names an + attribute of the ``options`` object that :mod:`optparse` builds as it parses + the command line. + +.. attribute:: Option.default + + The value to use for this option's destination if the option is not seen on + the command line. See also :meth:`OptionParser.set_defaults`. + +.. attribute:: Option.nargs + + (default: 1) + + How many arguments of type :attr:`~Option.type` should be consumed when this + option is seen. If > 1, :mod:`optparse` will store a tuple of values to + :attr:`~Option.dest`. + +.. attribute:: Option.const + + For actions that store a constant value, the constant value to store. + +.. attribute:: Option.choices + + For options of type ``"choice"``, the list of strings the user may choose + from. + +.. attribute:: Option.callback + + For options with action ``"callback"``, the callable to call when this option + is seen. See section :ref:`optparse-option-callbacks` for detail on the + arguments passed to the callable. + +.. attribute:: Option.callback_args + Option.callback_kwargs + + Additional positional and keyword arguments to pass to ``callback`` after the + four standard callback arguments. + +.. attribute:: Option.help + + Help text to print for this option when listing all available options after + the user supplies a :attr:`~Option.help` option (such as ``"--help"``). If + no help text is supplied, the option will be listed without help text. To + hide this option, use the special value :data:`optparse.SUPPRESS_HELP`. + +.. attribute:: Option.metavar + + (default: derived from option strings) + + Stand-in for the option argument(s) to use when printing help text. See + section :ref:`optparse-tutorial` for an example. .. _optparse-standard-option-actions: @@ -880,42 +970,45 @@ 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:`~Option.type`, :attr:`~Option.dest`, + :attr:`~Option.nargs`, :attr:`~Option.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, - 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 - "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:`dest` is not supplied, :mod:`optparse` derives a destination from the - first long option string (e.g., ``"--foo-bar"`` implies ``foo_bar``). If there - are no long option strings, :mod:`optparse` derives a destination from the first - short option string (e.g., ``"-f"`` implies ``f``). + according to :attr:`~Option.type` and stored in :attr:`~Option.dest`. If + :attr:`~Option.nargs` > 1, multiple arguments will be consumed from the + command line; all will be converted according to :attr:`~Option.type` and + stored to :attr:`~Option.dest` as a tuple. See the + :ref:`optparse-standard-option-types` section. + + If :attr:`~Option.choices` is supplied (a list or tuple of strings), the type + defaults to ``"choice"``. + + If :attr:`~Option.type` is not supplied, it defaults to ``"string"``. + + If :attr:`~Option.dest` is not supplied, :mod:`optparse` derives a destination + from the first long option string (e.g., ``"--foo-bar"`` implies + ``foo_bar``). If there are no long option strings, :mod:`optparse` derives a + destination from the first short option string (e.g., ``"-f"`` implies ``f``). Example:: parser.add_option("-f") parser.add_option("-p", type="float", nargs=3, dest="point") - As it parses the command line :: + As it parses the command line :: -f foo.txt -p 1 -3.5 4 -fbar.txt - :mod:`optparse` will set :: + :mod:`optparse` will set :: options.f = "foo.txt" options.point = (1.0, -3.5, 4.0) options.f = "bar.txt" -* ``'store_const'`` [required: ``const``; relevant: :attr:`dest`] +* ``"store_const"`` [required: :attr:`~Option.const`; relevant: + :attr:`~Option.dest`] - The value ``const`` is stored in :attr:`dest`. + The value :attr:`~Option.const` is stored in :attr:`~Option.dest`. Example:: @@ -930,29 +1023,32 @@ options.verbose = 2 -* ``'store_true'`` [relevant: :attr:`dest`] +* ``"store_true"`` [relevant: :attr:`~Option.dest`] - A special case of ``store_const`` that stores a true value to :attr:`dest`. + A special case of ``"store_const"`` that stores a true value to + :attr:`~Option.dest`. -* ``'store_false'`` [relevant: :attr:`dest`] +* ``"store_false"`` [relevant: :attr:`~Option.dest`] - Like ``store_true``, but stores a false value. + Like ``"store_true"``, but stores a false value. Example:: 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:`~Option.type`, :attr:`~Option.dest`, + :attr:`~Option.nargs`, :attr:`~Option.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 - is automatically created when :mod:`optparse` first encounters this option on - the command-line. If ``nargs`` > 1, multiple arguments are consumed, and a - tuple of length ``nargs`` is appended to :attr:`dest`. + :attr:`~Option.dest`. If no default value for :attr:`~Option.dest` is + supplied, an empty list is automatically created when :mod:`optparse` first + encounters this option on the command-line. If :attr:`~Option.nargs` > 1, + multiple arguments are consumed, and a tuple of length :attr:`~Option.nargs` + is appended to :attr:`~Option.dest`. - The defaults for :attr:`!type` and :attr:`dest` are the same as for the ``store`` - action. + The defaults for :attr:`~Option.type` and :attr:`~Option.dest` are the same as + for the ``"store"`` action. Example:: @@ -968,16 +1064,19 @@ options.tracks.append(int("4")) -* ``'append_const'`` [required: ``const``; relevant: :attr:`dest`] - - Like ``store_const``, but the value ``const`` is appended to :attr:`dest`; as - with ``append``, :attr:`dest` defaults to ``None``, and an empty list is - automatically created the first time the option is encountered. - -* ``'count'`` [relevant: :attr:`dest`] +* ``"append_const"`` [required: :attr:`~Option.const`; relevant: + :attr:`~Option.dest`] - Increment the integer stored at :attr:`dest`. If no default value is supplied, - :attr:`dest` is set to zero before being incremented the first time. + Like ``"store_const"``, but the value :attr:`~Option.const` is appended to + :attr:`~Option.dest`; as with ``"append"``, :attr:`~Option.dest` defaults to + ``None``, and an empty list is automatically created the first time the option + is encountered. + +* ``"count"`` [relevant: :attr:`~Option.dest`] + + Increment the integer stored at :attr:`~Option.dest`. If no default value is + supplied, :attr:`~Option.dest` is set to zero before being incremented the + first time. Example:: @@ -993,27 +1092,29 @@ options.verbosity += 1 -* ``'callback'`` [required: ``callback``; relevant: :attr:`!type`, ``nargs``, - ``'callback_args'``, ``callback_kwargs``] +* ``"callback"`` [required: :attr:`~Option.callback`; relevant: + :attr:`~Option.type`, :attr:`~Option.nargs`, :attr:`~Option.callback_args`, + :attr:`~Option.callback_kwargs`] - Call the function specified by ``callback``, which is called as :: + Call the function specified by :attr:`~Option.callback`, which is called as :: func(option, opt_str, value, parser, *args, **kwargs) See section :ref:`optparse-option-callbacks` for more detail. -* ``'help'`` +* ``"help"`` - Prints a complete help message for all the options in the current option parser. - The help message is constructed from the ``usage`` string passed to - OptionParser's constructor and the :attr:`help` string passed to every option. - - If no :attr:`help` string is supplied for an option, it will still be listed in - the help message. To omit an option entirely, use the special value - ``optparse.SUPPRESS_HELP``. + Prints a complete help message for all the options in the current option + parser. The help message is constructed from the ``usage`` string passed to + OptionParser's constructor and the :attr:`~Option.help` string passed to every + option. + + If no :attr:`~Option.help` string is supplied for an option, it will still be + listed in the help message. To omit an option entirely, use the special value + :data:`optparse.SUPPRESS_HELP`. - :mod:`optparse` automatically adds a :attr:`help` option to all OptionParsers, - so you do not normally need to create one. + :mod:`optparse` automatically adds a :attr:`~Option.help` option to all + OptionParsers, so you do not normally need to create one. Example:: @@ -1030,8 +1131,8 @@ help="Input file to read data from") parser.add_option("--secret", help=SUPPRESS_HELP) - If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, it - will print something like the following help message to stdout (assuming + If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, + it will print something like the following help message to stdout (assuming ``sys.argv[0]`` is ``"foo.py"``):: usage: foo.py [options] @@ -1044,82 +1145,14 @@ After printing the help message, :mod:`optparse` terminates your process with ``sys.exit(0)``. -* ``'version'`` +* ``"version"`` - Prints the version number supplied to the OptionParser to stdout and exits. The - version number is actually formatted and printed by the ``print_version()`` - method of OptionParser. Generally only relevant if the ``version`` argument is - supplied to the OptionParser constructor. As with :attr:`help` options, you - will rarely create ``version`` options, since :mod:`optparse` automatically adds - them when needed. - - -.. _optparse-option-attributes: - -Option attributes -^^^^^^^^^^^^^^^^^ - -The following option attributes may be passed as keyword arguments to -``parser.add_option()``. If you pass an option attribute that is not relevant -to a particular option, or fail to pass a required option attribute, -:mod:`optparse` raises :exc:`OptionError`. - -* :attr:`action` (default: ``"store"``) - - Determines :mod:`optparse`'s behaviour when this option is seen on the command - line; the available options are documented above. - -* :attr:`!type` (default: ``"string"``) - - The argument type expected by this option (e.g., ``"string"`` or ``"int"``); the - available option types are documented below. - -* :attr:`dest` (default: derived from option strings) - - If the option's action implies writing or modifying a value somewhere, this - tells :mod:`optparse` where to write it: :attr:`dest` names an attribute of the - ``options`` object that :mod:`optparse` builds as it parses the command line. - -* ``default`` - - The value to use for this option's destination if the option is not seen on the - command line. See also ``parser.set_defaults()``. - -* ``nargs`` (default: 1) - - 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`` - - For actions that store a constant value, the constant value to store. - -* ``choices`` - - For options of type ``"choice"``, the list of strings the user may choose from. - -* ``callback`` - - For options with action ``"callback"``, the callable to call when this option - is seen. See section :ref:`optparse-option-callbacks` for detail on the - arguments passed to ``callable``. - -* ``callback_args``, ``callback_kwargs`` - - Additional positional and keyword arguments to pass to ``callback`` after the - four standard callback arguments. - -* :attr:`help` - - Help text to print for this option when listing all available options after the - user supplies a :attr:`help` option (such as ``"--help"``). If no help text is - supplied, the option will be listed without help text. To hide this option, use - the special value ``SUPPRESS_HELP``. - -* ``metavar`` (default: derived from option strings) - - Stand-in for the option argument(s) to use when printing help text. See section - :ref:`optparse-tutorial` for an example. + Prints the version number supplied to the OptionParser to stdout and exits. + The version number is actually formatted and printed by the + ``print_version()`` method of OptionParser. Generally only relevant if the + ``version`` argument is supplied to the OptionParser constructor. As with + :attr:`~Option.help` options, you will rarely create ``version`` options, + since :mod:`optparse` automatically adds them when needed. .. _optparse-standard-option-types: @@ -1127,14 +1160,14 @@ Standard option types ^^^^^^^^^^^^^^^^^^^^^ -:mod:`optparse` has six built-in option types: ``string``, ``int``, ``long``, -``choice``, ``float`` and ``complex``. If you need to add new option types, see -section :ref:`optparse-extending-optparse`. +:mod:`optparse` has six built-in option types: ``"string"``, ``"int"``, +``"long"``, ``"choice"``, ``"float"`` and ``"complex"``. If you need to add new +option types, see section :ref:`optparse-extending-optparse`. Arguments to string options are not checked or converted in any way: the text on the command line is stored in the destination (or passed to the callback) as-is. -Integer arguments (type ``int`` or ``long``) are parsed as follows: +Integer arguments (type ``"int"`` or ``"long"``) are parsed as follows: * if the number starts with ``0x``, it is parsed as a hexadecimal number @@ -1145,17 +1178,18 @@ * otherwise, the number is parsed as a decimal number -The conversion is done by calling either ``int()`` or ``long()`` with the +The conversion is done by calling either :func:`int` or :func:`long` with the appropriate base (2, 8, 10, or 16). If this fails, so will :mod:`optparse`, although with a more useful error message. -``float`` and ``complex`` option arguments are converted directly with -``float()`` and ``complex()``, with similar error-handling. +``"float"`` and ``"complex"`` option arguments are converted directly with +:func:`float` and :func:`complex`, with similar error-handling. -``choice`` options are a subtype of ``string`` options. The ``choices`` option -attribute (a sequence of strings) defines the set of allowed option arguments. -``optparse.check_choice()`` compares user-supplied option arguments against this -master list and raises :exc:`OptionValueError` if an invalid string is given. +``"choice"`` options are a subtype of ``"string"`` options. The +:attr:`~Option.choices`` option attribute (a sequence of strings) defines the +set of allowed option arguments. :func:`optparse.check_choice` compares +user-supplied option arguments against this master list and raises +:exc:`OptionValueError` if an invalid string is given. .. _optparse-parsing-arguments: @@ -1187,7 +1221,7 @@ the leftover positional arguments after all options have been processed The most common usage is to supply neither keyword argument. If you supply -``values``, it will be modified with repeated ``setattr()`` calls (roughly one +``values``, it will be modified with repeated :func:`setattr` calls (roughly one for every option argument stored to an option destination) and returned by :meth:`parse_args`. @@ -1202,46 +1236,51 @@ Querying and manipulating your option parser ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The default behavior of the option parser can be customized slightly, -and you can also poke around your option parser and see what's there. -OptionParser provides several methods to help you out: +The default behavior of the option parser can be customized slightly, and you +can also poke around your option parser and see what's there. OptionParser +provides several methods to help you out: + +.. method:: OptionParser.disable_interspersed_args() + + Set parsing to stop on the first non-option. For example, if ``"-a"`` and + ``"-b"`` are both simple options that take no arguments, :mod:`optparse` + normally accepts this syntax:: -``disable_interspersed_args()`` - Set parsing to stop on the first non-option. For example, if ``"-a"`` and - ``"-b"`` are both simple options that take no arguments, :mod:`optparse` - normally accepts this syntax:: + prog -a arg1 -b arg2 - prog -a arg1 -b arg2 + and treats it as equivalent to :: - and treats it as equivalent to :: + prog -a -b arg1 arg2 - prog -a -b arg1 arg2 + To disable this feature, call :meth:`disable_interspersed_args`. This + restores traditional Unix syntax, where option parsing stops with the first + non-option argument. - To disable this feature, call ``disable_interspersed_args()``. This restores - traditional Unix syntax, where option parsing stops with the first non-option - argument. + Use this if you have a command processor which runs another command which has + options of its own and you want to make sure these options don't get + confused. For example, each command might have a different set of options. - Use this if you have a command processor which runs another command which has - options of its own and you want to make sure these options don't get confused. - For example, each command might have a different set of options. +.. method:: OptionParser.enable_interspersed_args() -``enable_interspersed_args()`` - Set parsing to not stop on the first non-option, allowing interspersing - switches with command arguments. This is the default behavior. + Set parsing to not stop on the first non-option, allowing interspersing + switches with command arguments. This is the default behavior. -``get_option(opt_str)`` - Returns the Option instance with the option string ``opt_str``, or ``None`` if +.. method:: OptionParser.get_option(opt_str) + + Returns the Option instance with the option string *opt_str*, or ``None`` if no options have that option string. -``has_option(opt_str)`` - Return true if the OptionParser has an option with option string ``opt_str`` +.. method:: OptionParser.has_option(opt_str) + + Return true if the OptionParser has an option with option string *opt_str* (e.g., ``"-q"`` or ``"--verbose"``). -``remove_option(opt_str)`` - If the :class:`OptionParser` has an option corresponding to ``opt_str``, that option is - removed. If that option provided any other option strings, all of those option - strings become invalid. If ``opt_str`` does not occur in any option belonging to - this :class:`OptionParser`, raises :exc:`ValueError`. +.. method:: OptionParser.remove_option(opt_str) + + If the :class:`OptionParser` has an option corresponding to *opt_str*, that + option is removed. If that option provided any other option strings, all of + those option strings become invalid. If *opt_str* does not occur in any + option belonging to this :class:`OptionParser`, raises :exc:`ValueError`. .. _optparse-conflicts-between-options: @@ -1271,10 +1310,11 @@ The available conflict handlers are: - ``'error'`` (default) - assume option conflicts are a programming error and raise :exc:`OptionConflictError` + ``"error"`` (default) + assume option conflicts are a programming error and raise + :exc:`OptionConflictError` - ``'resolve'`` + ``"resolve"`` resolve option conflicts intelligently (see below) @@ -1320,9 +1360,10 @@ OptionParser instances have several cyclic references. This should not be a problem for Python's garbage collector, but you may wish to break the cyclic -references explicitly by calling ``destroy()`` on your OptionParser once you are -done with it. This is particularly useful in long-running applications where -large object graphs are reachable from your OptionParser. +references explicitly by calling :meth:`~OptionParser.destroy` on your +OptionParser once you are done with it. This is particularly useful in +long-running applications where large object graphs are reachable from your +OptionParser. .. _optparse-other-methods: @@ -1332,34 +1373,34 @@ OptionParser supports several other public methods: -* ``set_usage(usage)`` +.. method:: OptionParser.set_usage(usage) - Set the usage string according to the rules described above for the ``usage`` - constructor keyword argument. Passing ``None`` sets the default usage string; - use ``SUPPRESS_USAGE`` to suppress a usage message. - -* ``set_defaults(dest=value, ...)`` - - Set default values for several option destinations at once. Using - :meth:`set_defaults` is the preferred way to set default values for options, - since multiple options can share the same destination. For example, if several - "mode" options all set the same destination, any one of them can set the - default, and the last one wins:: - - parser.add_option("--advanced", action="store_const", - dest="mode", const="advanced", - default="novice") # overridden below - parser.add_option("--novice", action="store_const", - dest="mode", const="novice", - default="advanced") # overrides above setting - - To avoid this confusion, use :meth:`set_defaults`:: - - parser.set_defaults(mode="advanced") - parser.add_option("--advanced", action="store_const", - dest="mode", const="advanced") - parser.add_option("--novice", action="store_const", - dest="mode", const="novice") + Set the usage string according to the rules described above for the ``usage`` + constructor keyword argument. Passing ``None`` sets the default usage + string; use :data:`optparse.SUPPRESS_USAGE` to suppress a usage message. + +.. method:: OptionParser.set_defaults(dest=value, ...) + + Set default values for several option destinations at once. Using + :meth:`set_defaults` is the preferred way to set default values for options, + since multiple options can share the same destination. For example, if + several "mode" options all set the same destination, any one of them can set + the default, and the last one wins:: + + parser.add_option("--advanced", action="store_const", + dest="mode", const="advanced", + default="novice") # overridden below + parser.add_option("--novice", action="store_const", + dest="mode", const="novice", + default="advanced") # overrides above setting + + To avoid this confusion, use :meth:`set_defaults`:: + + parser.set_defaults(mode="advanced") + parser.add_option("--advanced", action="store_const", + dest="mode", const="advanced") + parser.add_option("--novice", action="store_const", + dest="mode", const="novice") .. _optparse-option-callbacks: @@ -1374,7 +1415,7 @@ There are two steps to defining a callback option: -* define the option itself using the ``callback`` action +* define the option itself using the ``"callback"`` action * write the callback; this is a function (or method) that takes at least four arguments, as described below @@ -1386,8 +1427,8 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^ As always, the easiest way to define a callback option is by using the -``parser.add_option()`` method. Apart from :attr:`action`, the only option -attribute you must specify is ``callback``, the function to call:: +:meth:`OptionParser.add_option` method. Apart from :attr:`~Option.action`, the +only option attribute you must specify is ``callback``, the function to call:: parser.add_option("-c", action="callback", callback=my_callback) @@ -1401,8 +1442,9 @@ it's covered later in this section. :mod:`optparse` always passes four particular arguments to your callback, and it -will only pass additional arguments if you specify them via ``callback_args`` -and ``callback_kwargs``. Thus, the minimal callback function signature is:: +will only pass additional arguments if you specify them via +:attr:`~Option.callback_args` and :attr:`~Option.callback_kwargs`. Thus, the +minimal callback function signature is:: def my_callback(option, opt, value, parser): @@ -1411,21 +1453,22 @@ There are several other option attributes that you can supply when you define a callback option: -: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 - than storing the converted value(s) anywhere, though, :mod:`optparse` passes it - to your callback function. +:attr:`~Option.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:`~Option.type`. Rather than storing the converted value(s) anywhere, + though, :mod:`optparse` passes it to your callback function. -``nargs`` +:attr:`~Option.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`. - It then passes a tuple of converted values to your callback. + consume :attr:`~Option.nargs` arguments, each of which must be convertible to + :attr:`~Option.type`. It then passes a tuple of converted values to your + callback. -``callback_args`` +:attr:`~Option.callback_args` a tuple of extra positional arguments to pass to the callback -``callback_kwargs`` +:attr:`~Option.callback_kwargs` a dictionary of extra keyword arguments to pass to the callback @@ -1445,45 +1488,48 @@ ``opt_str`` is the option string seen on the command-line that's triggering the callback. - (If an abbreviated long option was used, ``opt_str`` will be the full, canonical - option string---e.g. if the user puts ``"--foo"`` on the command-line as an - abbreviation for ``"--foobar"``, then ``opt_str`` will be ``"--foobar"``.) + (If an abbreviated long option was used, ``opt_str`` will be the full, + canonical option string---e.g. if the user puts ``"--foo"`` on the + command-line as an abbreviation for ``"--foobar"``, then ``opt_str`` will be + ``"--foobar"``.) ``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 - ``None`` (no argument expected), then ``value`` will be ``None``. If ``nargs`` + only expect an argument if :attr:`~Option.type` is set; the type of ``value`` will be + the type implied by the option's type. If :attr:`~Option.type` for this option is + ``None`` (no argument expected), then ``value`` will be ``None``. If :attr:`~Option.nargs` > 1, ``value`` will be a tuple of values of the appropriate type. ``parser`` - is the OptionParser instance driving the whole thing, mainly useful because you - can access some other interesting data through its instance attributes: + is the OptionParser instance driving the whole thing, mainly useful because + you can access some other interesting data through its instance attributes: ``parser.largs`` - the current list of leftover arguments, ie. arguments that have been consumed - but are neither options nor option arguments. Feel free to modify - ``parser.largs``, e.g. by adding more arguments to it. (This list will become - ``args``, the second return value of :meth:`parse_args`.) + the current list of leftover arguments, ie. arguments that have been + consumed but are neither options nor option arguments. Feel free to modify + ``parser.largs``, e.g. by adding more arguments to it. (This list will + become ``args``, the second return value of :meth:`parse_args`.) ``parser.rargs`` - the current list of remaining arguments, ie. with ``opt_str`` and ``value`` (if - applicable) removed, and only the arguments following them still there. Feel - free to modify ``parser.rargs``, e.g. by consuming more arguments. + the current list of remaining arguments, ie. with ``opt_str`` and + ``value`` (if applicable) removed, and only the arguments following them + still there. Feel free to modify ``parser.rargs``, e.g. by consuming more + arguments. ``parser.values`` the object where option values are by default stored (an instance of - optparse.OptionValues). This lets callbacks use the same mechanism as the rest - of :mod:`optparse` for storing option values; you don't need to mess around with - globals or closures. You can also access or modify the value(s) of any options - already encountered on the command-line. + optparse.OptionValues). This lets callbacks use the same mechanism as the + rest of :mod:`optparse` for storing option values; you don't need to mess + around with globals or closures. You can also access or modify the + value(s) of any options already encountered on the command-line. ``args`` - is a tuple of arbitrary positional arguments supplied via the ``callback_args`` - option attribute. + is a tuple of arbitrary positional arguments supplied via the + :attr:`~Option.callback_args` option attribute. ``kwargs`` - is a dictionary of arbitrary keyword arguments supplied via ``callback_kwargs``. + is a dictionary of arbitrary keyword arguments supplied via + :attr:`~Option.callback_kwargs`. .. _optparse-raising-errors-in-callback: @@ -1491,11 +1537,11 @@ Raising errors in a callback ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The callback function should raise :exc:`OptionValueError` if there are any problems -with the option or its argument(s). :mod:`optparse` catches this and terminates -the program, printing the error message you supply to stderr. Your message -should be clear, concise, accurate, and mention the option at fault. Otherwise, -the user will have a hard time figuring out what he did wrong. +The callback function should raise :exc:`OptionValueError` if there are any +problems with the option or its argument(s). :mod:`optparse` catches this and +terminates the program, printing the error message you supply to stderr. Your +message should be clear, concise, accurate, and mention the option at fault. +Otherwise, the user will have a hard time figuring out what he did wrong. .. _optparse-callback-example-1: @@ -1511,7 +1557,7 @@ parser.add_option("--foo", action="callback", callback=record_foo_seen) -Of course, you could do that with the ``store_true`` action. +Of course, you could do that with the ``"store_true"`` action. .. _optparse-callback-example-2: @@ -1578,12 +1624,12 @@ 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 -that type; if you further define ``nargs``, then the option takes ``nargs`` -arguments. +is similar to defining a ``"store"`` or ``"append"`` option: if you define +:attr:`~Option.type`, then the option takes one argument that must be +convertible to that type; if you further define :attr:`~Option.nargs`, then the +option takes :attr:`~Option.nargs` arguments. -Here's an example that just emulates the standard ``store`` action:: +Here's an example that just emulates the standard ``"store"`` action:: def store_value(option, opt_str, value, parser): setattr(parser.values, option.dest, value) @@ -1670,32 +1716,36 @@ ^^^^^^^^^^^^^^^^ To add new types, you need to define your own subclass of :mod:`optparse`'s -Option class. This class has a couple of attributes that define -:mod:`optparse`'s types: :attr:`TYPES` and :attr:`TYPE_CHECKER`. +:class:`Option` class. This class has a couple of attributes that define +:mod:`optparse`'s types: :attr:`~Option.TYPES` and :attr:`~Option.TYPE_CHECKER`. + +.. attribute:: Option.TYPES + + A tuple of type names; in your subclass, simply define a new tuple + :attr:`TYPES` that builds on the standard one. + +.. attribute:: Option.TYPE_CHECKER + + A dictionary mapping type names to type-checking functions. A type-checking + function has the following signature:: -:attr:`TYPES` is a tuple of type names; in your subclass, simply define a new -tuple :attr:`TYPES` that builds on the standard one. + def check_mytype(option, opt, value) -:attr:`TYPE_CHECKER` is a dictionary mapping type names to type-checking -functions. A type-checking function has the following signature:: + where ``option`` is an :class:`Option` instance, ``opt`` is an option string + (e.g., ``"-f"``), and ``value`` is the string from the command line that must + be checked and converted to your desired type. ``check_mytype()`` should + return an object of the hypothetical type ``mytype``. The value returned by + a type-checking function will wind up in the OptionValues instance returned + by :meth:`OptionParser.parse_args`, or be passed to a callback as the + ``value`` parameter. - def check_mytype(option, opt, value) - -where ``option`` is an :class:`Option` instance, ``opt`` is an option string -(e.g., ``"-f"``), and ``value`` is the string from the command line that must be -checked and converted to your desired type. ``check_mytype()`` should return an -object of the hypothetical type ``mytype``. The value returned by a -type-checking function will wind up in the OptionValues instance returned by -:meth:`OptionParser.parse_args`, or be passed to a callback as the ``value`` -parameter. - -Your type-checking function should raise :exc:`OptionValueError` if it encounters any -problems. :exc:`OptionValueError` takes a single string argument, which is passed -as-is to :class:`OptionParser`'s :meth:`error` method, which in turn prepends the program -name and the string ``"error:"`` and prints everything to stderr before -terminating the process. + Your type-checking function should raise :exc:`OptionValueError` if it + encounters any problems. :exc:`OptionValueError` takes a single string + argument, which is passed as-is to :class:`OptionParser`'s :meth:`error` + method, which in turn prepends the program name and the string ``"error:"`` + and prints everything to stderr before terminating the process. -Here's a silly example that demonstrates adding a ``complex`` option type to +Here's a silly example that demonstrates adding a ``"complex"`` option type to parse Python-style complex numbers on the command line. (This is even sillier than it used to be, because :mod:`optparse` 1.3 added built-in support for complex numbers, but never mind.) @@ -1706,7 +1756,7 @@ from optparse import Option, OptionValueError You need to define your type-checker first, since it's referred to later (in the -:attr:`TYPE_CHECKER` class attribute of your Option subclass):: +:attr:`~Option.TYPE_CHECKER` class attribute of your Option subclass):: def check_complex(option, opt, value): try: @@ -1723,9 +1773,9 @@ TYPE_CHECKER["complex"] = check_complex (If we didn't make a :func:`copy` of :attr:`Option.TYPE_CHECKER`, we would end -up modifying the :attr:`TYPE_CHECKER` attribute of :mod:`optparse`'s Option -class. This being Python, nothing stops you from doing that except good manners -and common sense.) +up modifying the :attr:`~Option.TYPE_CHECKER` attribute of :mod:`optparse`'s +Option class. This being Python, nothing stops you from doing that except good +manners and common sense.) That's it! Now you can write a script that uses the new option type just like any other :mod:`optparse`\ -based script, except you have to instruct your @@ -1752,45 +1802,50 @@ "store" actions actions that result in :mod:`optparse` storing a value to an attribute of the - current OptionValues instance; these options require a :attr:`dest` attribute to - be supplied to the Option constructor + current OptionValues instance; these options require a :attr:`~Option.dest` + attribute to be supplied to the Option constructor. "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. - -These are overlapping sets: some default "store" actions are ``store``, -``store_const``, ``append``, and ``count``, while the default "typed" actions -are ``store``, ``append``, and ``callback``. + 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:`~Option.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 are ``"store"``, ``"append"``, and ``"callback"``. When you add an action, you need to categorize it by listing it in at least one of the following class attributes of Option (all are lists of strings): -:attr:`ACTIONS` - all actions must be listed in ACTIONS +.. attribute:: Option.ACTIONS -:attr:`STORE_ACTIONS` - "store" actions are additionally listed here + All actions must be listed in ACTIONS. -:attr:`TYPED_ACTIONS` - "typed" actions are additionally listed here +.. attribute:: Option.STORE_ACTIONS -``ALWAYS_TYPED_ACTIONS`` - actions that always take a type (i.e. whose options always take a value) are + "store" actions are additionally listed here. + +.. attribute:: Option.TYPED_ACTIONS + + "typed" actions are additionally listed here. + +.. attribute:: Option.ALWAYS_TYPED_ACTIONS + + Actions that always take a type (i.e. whose options always take a value) are additionally listed here. The only effect of this is that :mod:`optparse` - assigns the default type, ``string``, to options with no explicit type whose - action is listed in ``ALWAYS_TYPED_ACTIONS``. + assigns the default type, ``"string"``, to options with no explicit type + whose action is listed in :attr:`ALWAYS_TYPED_ACTIONS`. In order to actually implement your new action, you must override Option's :meth:`take_action` method and add a case that recognizes your action. -For example, let's add an ``extend`` action. This is similar to the standard -``append`` action, but instead of taking a single value from the command-line -and appending it to an existing list, ``extend`` will take multiple values in a -single comma-delimited string, and extend an existing list with them. That is, -if ``"--names"`` is an ``extend`` option of type ``string``, the command line -:: +For example, let's add an ``"extend"`` action. This is similar to the standard +``"append"`` action, but instead of taking a single value from the command-line +and appending it to an existing list, ``"extend"`` will take multiple values in +a single comma-delimited string, and extend an existing list with them. That +is, if ``"--names"`` is an ``"extend"`` option of type ``"string"``, the command +line :: --names=foo,bar --names blah --names ding,dong @@ -1817,29 +1872,30 @@ Features of note: -* ``extend`` both expects a value on the command-line and stores that value - somewhere, so it goes in both :attr:`STORE_ACTIONS` and :attr:`TYPED_ACTIONS` - -* to ensure that :mod:`optparse` assigns the default type of ``string`` to - ``extend`` actions, we put the ``extend`` action in ``ALWAYS_TYPED_ACTIONS`` as - well +* ``"extend"`` both expects a value on the command-line and stores that value + somewhere, so it goes in both :attr:`~Option.STORE_ACTIONS` and + :attr:`~Option.TYPED_ACTIONS`. + +* to ensure that :mod:`optparse` assigns the default type of ``"string"`` to + ``"extend"`` actions, we put the ``"extend"`` action in + :attr:`~Option.ALWAYS_TYPED_ACTIONS` as well. * :meth:`MyOption.take_action` implements just this one new action, and passes control back to :meth:`Option.take_action` for the standard :mod:`optparse` - actions + actions. -* ``values`` is an instance of the optparse_parser.Values class, which - provides the very useful :meth:`ensure_value` method. :meth:`ensure_value` is - essentially :func:`getattr` with a safety valve; it is called as :: +* ``values`` is an instance of the optparse_parser.Values class, which provides + the very useful :meth:`ensure_value` method. :meth:`ensure_value` is + essentially :func:`getattr` with a safety valve; it is called as :: values.ensure_value(attr, value) If the ``attr`` attribute of ``values`` doesn't exist or is None, then - ensure_value() first sets it to ``value``, and then returns 'value. This is very - handy for actions like ``extend``, ``append``, and ``count``, all of which - accumulate data in a variable and expect that variable to be of a certain type - (a list for the first two, an integer for the latter). Using + ensure_value() first sets it to ``value``, and then returns 'value. This is + very handy for actions like ``"extend"``, ``"append"``, and ``"count"``, all + of which accumulate data in a variable and expect that variable to be of a + certain type (a list for the first two, an integer for the latter). Using :meth:`ensure_value` means that scripts using your action don't have to worry - about setting a default value for the option destinations in question; they can - just leave the default as None and :meth:`ensure_value` will take care of + about setting a default value for the option destinations in question; they + can just leave the default as None and :meth:`ensure_value` will take care of getting it right when it's needed. From python-checkins at python.org Thu Sep 17 19:18:01 2009 From: python-checkins at python.org (antoine.pitrou) Date: Thu, 17 Sep 2009 17:18:01 -0000 Subject: [Python-checkins] r74879 - python/branches/py3k/Doc/library/io.rst Message-ID: Author: antoine.pitrou Date: Thu Sep 17 19:18:01 2009 New Revision: 74879 Log: Issue #6929: fix a couple of statements and clarify a lot of things in the IO docs. Modified: python/branches/py3k/Doc/library/io.rst Modified: python/branches/py3k/Doc/library/io.rst ============================================================================== --- python/branches/py3k/Doc/library/io.rst (original) +++ python/branches/py3k/Doc/library/io.rst Thu Sep 17 19:18:01 2009 @@ -208,6 +208,9 @@ IOBase (and its subclasses) support the iterator protocol, meaning that an :class:`IOBase` object can be iterated over yielding the lines in a stream. + Lines are defined slightly differently depending on whether the stream is + a binary stream (yielding bytes), or a text stream (yielding character + strings). See :meth:`readline` below. IOBase is also a context manager and therefore supports the :keyword:`with` statement. In this example, *file* is closed after the @@ -314,15 +317,20 @@ Base class for raw binary I/O. It inherits :class:`IOBase`. There is no public constructor. + Raw binary I/O typically provides low-level access to an underlying OS + device or API, and does not try to encapsulate it in high-level primitives + (this is left to Buffered I/O and Text I/O, described later in this page). + In addition to the attributes and methods from :class:`IOBase`, RawIOBase provides the following methods: .. method:: read(n=-1) - Read and return all the bytes from the stream until EOF, or if *n* is - specified, up to *n* bytes. Only one system call is ever made. An empty - bytes object is returned on EOF; ``None`` is returned if the object is set - not to block and has no data to read. + Read and return up to *n* bytes from the stream. As a convenience, if + *n* is unspecified or -1, :meth:`readall` is called. Otherwise, + only one system call is ever made. An empty bytes object is returned + on EOF; ``None`` is returned if the object is set not to block and has + no data to read. .. method:: readall() @@ -337,27 +345,34 @@ .. method:: write(b) Write the given bytes or bytearray object, *b*, to the underlying raw - stream and return the number of bytes written (This is never less than - ``len(b)``, since if the write fails, an :exc:`IOError` will be raised). + stream and return the number of bytes written. This can be less than + ``len(b)``, depending on specifics of the underlying raw stream, and + especially if it is in non-blocking mode. ``None`` is returned if the + raw stream is set not to block and no single byte could be readily + written to it. .. class:: BufferedIOBase - Base class for streams that support buffering. It inherits :class:`IOBase`. - There is no public constructor. + Base class for binary streams that support some kind of buffering. + It inherits :class:`IOBase`. There is no public constructor. + + The main difference with :class:`RawIOBase` is that methods :meth:`read`, + :meth:`readinto` and :meth:`write` will try (respectively) to read as much + input as requested or to consume all given output, at the expense of + making perhaps more than one system call. + + In addition, those methods can raise :exc:`BlockingIOError` if the + underlying raw stream is in non-blocking mode and cannot take or give + enough data; unlike their :class:`RawIOBase` counterparts, they will + never return ``None``. - The main difference with :class:`RawIOBase` is that the :meth:`read` method - supports omitting the *size* argument, and does not have a default + Besides, the :meth:`read` method does not have a default implementation that defers to :meth:`readinto`. - In addition, :meth:`read`, :meth:`readinto`, and :meth:`write` may raise - :exc:`BlockingIOError` if the underlying raw stream is in non-blocking mode - and not ready; unlike their raw counterparts, they will never return - ``None``. - - A typical implementation should not inherit from a :class:`RawIOBase` - implementation, but wrap one like :class:`BufferedWriter` and - :class:`BufferedReader`. + A typical :class:`BufferedIOBase` implementation should not inherit from a + :class:`RawIOBase` implementation, but wrap one, like + :class:`BufferedWriter` and :class:`BufferedReader` do. :class:`BufferedIOBase` provides or overrides these members in addition to those from :class:`IOBase`: @@ -393,13 +408,15 @@ one raw read will be issued, and a short result does not imply that EOF is imminent. - A :exc:`BlockingIOError` is raised if the underlying raw stream has no - data at the moment. + A :exc:`BlockingIOError` is raised if the underlying raw stream is in + non blocking-mode, and has no data available at the moment. .. method:: read1(n=-1) Read and return up to *n* bytes, with at most one call to the underlying - raw stream's :meth:`~RawIOBase.read` method. + raw stream's :meth:`~RawIOBase.read` method. This can be useful if you + are implementing your own buffering on top of a :class:`BufferedIOBase` + object. .. method:: readinto(b) @@ -407,19 +424,22 @@ read. Like :meth:`read`, multiple reads may be issued to the underlying raw - stream, unless the latter is 'interactive.' + stream, unless the latter is 'interactive'. - A :exc:`BlockingIOError` is raised if the underlying raw stream has no - data at the moment. + A :exc:`BlockingIOError` is raised if the underlying raw stream is in + non blocking-mode, and has no data available at the moment. .. method:: write(b) - Write the given bytes or bytearray object, *b*, to the underlying raw - stream and return the number of bytes written (never less than ``len(b)``, - since if the write fails an :exc:`IOError` will be raised). - - A :exc:`BlockingIOError` is raised if the buffer is full, and the - underlying raw stream cannot accept more data at the moment. + Write the given bytes or bytearray object, *b* and return the number + of bytes written (never less than ``len(b)``, since if the write fails + an :exc:`IOError` will be raised). Depending on the actual + implementation, these bytes may be readily written to the underlying + stream, or held in a buffer for performance and latency reasons. + + When in non-blocking mode, a :exc:`BlockingIOError` is raised if the + data needed to be written to the raw stream but it couldn't accept + all the data without blocking. Raw File I/O @@ -427,15 +447,25 @@ .. class:: FileIO(name, mode='r', closefd=True) - :class:`FileIO` represents a file containing bytes data. It implements - the :class:`RawIOBase` interface (and therefore the :class:`IOBase` - interface, too). + :class:`FileIO` represents an OS-level file containing bytes data. + It implements the :class:`RawIOBase` interface (and therefore the + :class:`IOBase` interface, too). + + The *name* can be one of two things: + + * a character string or bytes object representing the path to the file + which will be opened; + * an integer representing the number of an existing OS-level file descriptor + to which the resulting :class:`FileIO` object will give access. The *mode* can be ``'r'``, ``'w'`` or ``'a'`` for reading (default), writing, or appending. The file will be created if it doesn't exist when opened for writing or appending; it will be truncated when opened for writing. Add a ``'+'`` to the mode to allow simultaneous reading and writing. + The :meth:`read` (when called with a positive argument), :meth:`readinto` + and :meth:`write` methods on this class will only make one system call. + In addition to the attributes and methods from :class:`IOBase` and :class:`RawIOBase`, :class:`FileIO` provides the following data attributes and methods: @@ -449,29 +479,13 @@ The file name. This is the file descriptor of the file when no name is given in the constructor. - .. method:: read(n=-1) - - Read and return at most *n* bytes. Only one system call is made, so it is - possible that less data than was requested is returned. Use :func:`len` - on the returned bytes object to see how many bytes were actually returned. - (In non-blocking mode, ``None`` is returned when no data is available.) - - .. method:: readall() - - Read and return the entire file's contents in a single bytes object. As - much as immediately available is returned in non-blocking mode. If the - EOF has been reached, ``b''`` is returned. - - .. method:: write(b) - - Write the bytes or bytearray object, *b*, to the file, and return - the number actually written. Only one system call is made, so it - is possible that only some of the data is written. - Buffered Streams ---------------- +In many situations, buffered I/O streams will provide higher performance +(bandwidth and latency) than raw I/O streams. Their API is also more usable. + .. class:: BytesIO([initial_bytes]) A stream implementation using an in-memory bytes buffer. It inherits @@ -498,8 +512,11 @@ .. class:: BufferedReader(raw, buffer_size=DEFAULT_BUFFER_SIZE) - A buffer for a readable, sequential :class:`RawIOBase` object. It inherits - :class:`BufferedIOBase`. + A buffer providing higher-level access to a readable, sequential + :class:`RawIOBase` object. It inherits :class:`BufferedIOBase`. + When reading data from this object, a larger amount of data may be + requested from the underlying raw stream, and kept in an internal buffer. + The buffered data can then be returned directly on subsequent reads. The constructor creates a :class:`BufferedReader` for the given readable *raw* stream and *buffer_size*. If *buffer_size* is omitted, @@ -528,8 +545,16 @@ .. class:: BufferedWriter(raw, buffer_size=DEFAULT_BUFFER_SIZE) - A buffer for a writeable sequential RawIO object. It inherits - :class:`BufferedIOBase`. + A buffer providing higher-level access to a writeable, sequential + :class:`RawIOBase` object. It inherits :class:`BufferedIOBase`. + When writing to this object, data is normally held into an internal + buffer. The buffer will be written out to the underlying :class:`RawIOBase` + object under various conditions, including: + + * when the buffer gets too small for all pending data; + * when :meth:`flush()` is called; + * when a :meth:`seek()` is requested (for :class:`BufferedRandom` objects); + * when the :class:`BufferedWriter` object is closed or destroyed. The constructor creates a :class:`BufferedWriter` for the given writeable *raw* stream. If the *buffer_size* is not given, it defaults to @@ -547,17 +572,17 @@ .. method:: write(b) - Write the bytes or bytearray object, *b*, onto the raw stream and return - the number of bytes written. A :exc:`BlockingIOError` is raised when the - raw stream blocks. + Write the bytes or bytearray object, *b* and return the number of bytes + written. When in non-blocking mode, a :exc:`BlockingIOError` is raised + if the buffer needs to be written out but the raw stream blocks. -.. class:: BufferedRWPair(reader, writer, buffer_size, max_buffer_size=DEFAULT_BUFFER_SIZE) +.. class:: BufferedRWPair(reader, writer, buffer_size=DEFAULT_BUFFER_SIZE) - A combined buffered writer and reader object for a raw stream that can be - written to and read from. It has and supports both :meth:`read`, :meth:`write`, - and their variants. This is useful for sockets and two-way pipes. - It inherits :class:`BufferedIOBase`. + A buffered I/O object giving a combined, higher-level access to two + sequential :class:`RawIOBase` objects: one readable, the other writeable. + It is useful for pairs of unidirectional communication channels + (pipes, for instance). It inherits :class:`BufferedIOBase`. *reader* and *writer* are :class:`RawIOBase` objects that are readable and writeable respectively. If the *buffer_size* is omitted it defaults to @@ -574,7 +599,8 @@ .. class:: BufferedRandom(raw, buffer_size=DEFAULT_BUFFER_SIZE) A buffered interface to random access streams. It inherits - :class:`BufferedReader` and :class:`BufferedWriter`. + :class:`BufferedReader` and :class:`BufferedWriter`, and further supports + :meth:`seek` and :meth:`tell` functionality. The constructor creates a reader and writer for a seekable raw stream, given in the first argument. If the *buffer_size* is omitted it defaults to @@ -611,7 +637,8 @@ .. attribute:: newlines A string, a tuple of strings, or ``None``, indicating the newlines - translated so far. + translated so far. Depending on the implementation and the initial + constructor flags, this may not be available. .. attribute:: buffer @@ -621,7 +648,8 @@ .. method:: detach() - Separate the underlying buffer from the :class:`TextIOBase` and return it. + Separate the underlying binary buffer from the :class:`TextIOBase` and + return it. After the underlying buffer has been detached, the :class:`TextIOBase` is in an unusable state. @@ -635,7 +663,7 @@ .. method:: read(n) Read and return at most *n* characters from the stream as a single - :class:`str`. If *n* is negative or ``None``, reads to EOF. + :class:`str`. If *n* is negative or ``None``, reads until EOF. .. method:: readline() @@ -650,7 +678,7 @@ .. class:: TextIOWrapper(buffer, encoding=None, errors=None, newline=None, line_buffering=False) - A buffered text stream over a :class:`BufferedIOBase` raw stream, *buffer*. + A buffered text stream over a :class:`BufferedIOBase` binary stream. It inherits :class:`TextIOBase`. *encoding* gives the name of the encoding that the stream will be decoded or From python-checkins at python.org Thu Sep 17 19:25:55 2009 From: python-checkins at python.org (antoine.pitrou) Date: Thu, 17 Sep 2009 17:25:55 -0000 Subject: [Python-checkins] r74880 - in python/branches/release31-maint: Doc/library/io.rst Message-ID: Author: antoine.pitrou Date: Thu Sep 17 19:25:55 2009 New Revision: 74880 Log: Merged revisions 74879 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74879 | antoine.pitrou | 2009-09-17 19:18:01 +0200 (jeu., 17 sept. 2009) | 3 lines Issue #6929: fix a couple of statements and clarify a lot of things in the IO docs. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/io.rst Modified: python/branches/release31-maint/Doc/library/io.rst ============================================================================== --- python/branches/release31-maint/Doc/library/io.rst (original) +++ python/branches/release31-maint/Doc/library/io.rst Thu Sep 17 19:25:55 2009 @@ -208,6 +208,9 @@ IOBase (and its subclasses) support the iterator protocol, meaning that an :class:`IOBase` object can be iterated over yielding the lines in a stream. + Lines are defined slightly differently depending on whether the stream is + a binary stream (yielding bytes), or a text stream (yielding character + strings). See :meth:`readline` below. IOBase is also a context manager and therefore supports the :keyword:`with` statement. In this example, *file* is closed after the @@ -314,15 +317,20 @@ Base class for raw binary I/O. It inherits :class:`IOBase`. There is no public constructor. + Raw binary I/O typically provides low-level access to an underlying OS + device or API, and does not try to encapsulate it in high-level primitives + (this is left to Buffered I/O and Text I/O, described later in this page). + In addition to the attributes and methods from :class:`IOBase`, RawIOBase provides the following methods: .. method:: read(n=-1) - Read and return all the bytes from the stream until EOF, or if *n* is - specified, up to *n* bytes. Only one system call is ever made. An empty - bytes object is returned on EOF; ``None`` is returned if the object is set - not to block and has no data to read. + Read and return up to *n* bytes from the stream. As a convenience, if + *n* is unspecified or -1, :meth:`readall` is called. Otherwise, + only one system call is ever made. An empty bytes object is returned + on EOF; ``None`` is returned if the object is set not to block and has + no data to read. .. method:: readall() @@ -337,27 +345,34 @@ .. method:: write(b) Write the given bytes or bytearray object, *b*, to the underlying raw - stream and return the number of bytes written (This is never less than - ``len(b)``, since if the write fails, an :exc:`IOError` will be raised). + stream and return the number of bytes written. This can be less than + ``len(b)``, depending on specifics of the underlying raw stream, and + especially if it is in non-blocking mode. ``None`` is returned if the + raw stream is set not to block and no single byte could be readily + written to it. .. class:: BufferedIOBase - Base class for streams that support buffering. It inherits :class:`IOBase`. - There is no public constructor. + Base class for binary streams that support some kind of buffering. + It inherits :class:`IOBase`. There is no public constructor. + + The main difference with :class:`RawIOBase` is that methods :meth:`read`, + :meth:`readinto` and :meth:`write` will try (respectively) to read as much + input as requested or to consume all given output, at the expense of + making perhaps more than one system call. + + In addition, those methods can raise :exc:`BlockingIOError` if the + underlying raw stream is in non-blocking mode and cannot take or give + enough data; unlike their :class:`RawIOBase` counterparts, they will + never return ``None``. - The main difference with :class:`RawIOBase` is that the :meth:`read` method - supports omitting the *size* argument, and does not have a default + Besides, the :meth:`read` method does not have a default implementation that defers to :meth:`readinto`. - In addition, :meth:`read`, :meth:`readinto`, and :meth:`write` may raise - :exc:`BlockingIOError` if the underlying raw stream is in non-blocking mode - and not ready; unlike their raw counterparts, they will never return - ``None``. - - A typical implementation should not inherit from a :class:`RawIOBase` - implementation, but wrap one like :class:`BufferedWriter` and - :class:`BufferedReader`. + A typical :class:`BufferedIOBase` implementation should not inherit from a + :class:`RawIOBase` implementation, but wrap one, like + :class:`BufferedWriter` and :class:`BufferedReader` do. :class:`BufferedIOBase` provides or overrides these members in addition to those from :class:`IOBase`: @@ -393,13 +408,15 @@ one raw read will be issued, and a short result does not imply that EOF is imminent. - A :exc:`BlockingIOError` is raised if the underlying raw stream has no - data at the moment. + A :exc:`BlockingIOError` is raised if the underlying raw stream is in + non blocking-mode, and has no data available at the moment. .. method:: read1(n=-1) Read and return up to *n* bytes, with at most one call to the underlying - raw stream's :meth:`~RawIOBase.read` method. + raw stream's :meth:`~RawIOBase.read` method. This can be useful if you + are implementing your own buffering on top of a :class:`BufferedIOBase` + object. .. method:: readinto(b) @@ -407,19 +424,22 @@ read. Like :meth:`read`, multiple reads may be issued to the underlying raw - stream, unless the latter is 'interactive.' + stream, unless the latter is 'interactive'. - A :exc:`BlockingIOError` is raised if the underlying raw stream has no - data at the moment. + A :exc:`BlockingIOError` is raised if the underlying raw stream is in + non blocking-mode, and has no data available at the moment. .. method:: write(b) - Write the given bytes or bytearray object, *b*, to the underlying raw - stream and return the number of bytes written (never less than ``len(b)``, - since if the write fails an :exc:`IOError` will be raised). - - A :exc:`BlockingIOError` is raised if the buffer is full, and the - underlying raw stream cannot accept more data at the moment. + Write the given bytes or bytearray object, *b* and return the number + of bytes written (never less than ``len(b)``, since if the write fails + an :exc:`IOError` will be raised). Depending on the actual + implementation, these bytes may be readily written to the underlying + stream, or held in a buffer for performance and latency reasons. + + When in non-blocking mode, a :exc:`BlockingIOError` is raised if the + data needed to be written to the raw stream but it couldn't accept + all the data without blocking. Raw File I/O @@ -427,15 +447,25 @@ .. class:: FileIO(name, mode='r', closefd=True) - :class:`FileIO` represents a file containing bytes data. It implements - the :class:`RawIOBase` interface (and therefore the :class:`IOBase` - interface, too). + :class:`FileIO` represents an OS-level file containing bytes data. + It implements the :class:`RawIOBase` interface (and therefore the + :class:`IOBase` interface, too). + + The *name* can be one of two things: + + * a character string or bytes object representing the path to the file + which will be opened; + * an integer representing the number of an existing OS-level file descriptor + to which the resulting :class:`FileIO` object will give access. The *mode* can be ``'r'``, ``'w'`` or ``'a'`` for reading (default), writing, or appending. The file will be created if it doesn't exist when opened for writing or appending; it will be truncated when opened for writing. Add a ``'+'`` to the mode to allow simultaneous reading and writing. + The :meth:`read` (when called with a positive argument), :meth:`readinto` + and :meth:`write` methods on this class will only make one system call. + In addition to the attributes and methods from :class:`IOBase` and :class:`RawIOBase`, :class:`FileIO` provides the following data attributes and methods: @@ -449,29 +479,13 @@ The file name. This is the file descriptor of the file when no name is given in the constructor. - .. method:: read(n=-1) - - Read and return at most *n* bytes. Only one system call is made, so it is - possible that less data than was requested is returned. Use :func:`len` - on the returned bytes object to see how many bytes were actually returned. - (In non-blocking mode, ``None`` is returned when no data is available.) - - .. method:: readall() - - Read and return the entire file's contents in a single bytes object. As - much as immediately available is returned in non-blocking mode. If the - EOF has been reached, ``b''`` is returned. - - .. method:: write(b) - - Write the bytes or bytearray object, *b*, to the file, and return - the number actually written. Only one system call is made, so it - is possible that only some of the data is written. - Buffered Streams ---------------- +In many situations, buffered I/O streams will provide higher performance +(bandwidth and latency) than raw I/O streams. Their API is also more usable. + .. class:: BytesIO([initial_bytes]) A stream implementation using an in-memory bytes buffer. It inherits @@ -498,8 +512,11 @@ .. class:: BufferedReader(raw, buffer_size=DEFAULT_BUFFER_SIZE) - A buffer for a readable, sequential :class:`RawIOBase` object. It inherits - :class:`BufferedIOBase`. + A buffer providing higher-level access to a readable, sequential + :class:`RawIOBase` object. It inherits :class:`BufferedIOBase`. + When reading data from this object, a larger amount of data may be + requested from the underlying raw stream, and kept in an internal buffer. + The buffered data can then be returned directly on subsequent reads. The constructor creates a :class:`BufferedReader` for the given readable *raw* stream and *buffer_size*. If *buffer_size* is omitted, @@ -528,8 +545,16 @@ .. class:: BufferedWriter(raw, buffer_size=DEFAULT_BUFFER_SIZE) - A buffer for a writeable sequential RawIO object. It inherits - :class:`BufferedIOBase`. + A buffer providing higher-level access to a writeable, sequential + :class:`RawIOBase` object. It inherits :class:`BufferedIOBase`. + When writing to this object, data is normally held into an internal + buffer. The buffer will be written out to the underlying :class:`RawIOBase` + object under various conditions, including: + + * when the buffer gets too small for all pending data; + * when :meth:`flush()` is called; + * when a :meth:`seek()` is requested (for :class:`BufferedRandom` objects); + * when the :class:`BufferedWriter` object is closed or destroyed. The constructor creates a :class:`BufferedWriter` for the given writeable *raw* stream. If the *buffer_size* is not given, it defaults to @@ -547,17 +572,17 @@ .. method:: write(b) - Write the bytes or bytearray object, *b*, onto the raw stream and return - the number of bytes written. A :exc:`BlockingIOError` is raised when the - raw stream blocks. + Write the bytes or bytearray object, *b* and return the number of bytes + written. When in non-blocking mode, a :exc:`BlockingIOError` is raised + if the buffer needs to be written out but the raw stream blocks. -.. class:: BufferedRWPair(reader, writer, buffer_size, max_buffer_size=DEFAULT_BUFFER_SIZE) +.. class:: BufferedRWPair(reader, writer, buffer_size=DEFAULT_BUFFER_SIZE) - A combined buffered writer and reader object for a raw stream that can be - written to and read from. It has and supports both :meth:`read`, :meth:`write`, - and their variants. This is useful for sockets and two-way pipes. - It inherits :class:`BufferedIOBase`. + A buffered I/O object giving a combined, higher-level access to two + sequential :class:`RawIOBase` objects: one readable, the other writeable. + It is useful for pairs of unidirectional communication channels + (pipes, for instance). It inherits :class:`BufferedIOBase`. *reader* and *writer* are :class:`RawIOBase` objects that are readable and writeable respectively. If the *buffer_size* is omitted it defaults to @@ -574,7 +599,8 @@ .. class:: BufferedRandom(raw, buffer_size=DEFAULT_BUFFER_SIZE) A buffered interface to random access streams. It inherits - :class:`BufferedReader` and :class:`BufferedWriter`. + :class:`BufferedReader` and :class:`BufferedWriter`, and further supports + :meth:`seek` and :meth:`tell` functionality. The constructor creates a reader and writer for a seekable raw stream, given in the first argument. If the *buffer_size* is omitted it defaults to @@ -611,7 +637,8 @@ .. attribute:: newlines A string, a tuple of strings, or ``None``, indicating the newlines - translated so far. + translated so far. Depending on the implementation and the initial + constructor flags, this may not be available. .. attribute:: buffer @@ -621,7 +648,8 @@ .. method:: detach() - Separate the underlying buffer from the :class:`TextIOBase` and return it. + Separate the underlying binary buffer from the :class:`TextIOBase` and + return it. After the underlying buffer has been detached, the :class:`TextIOBase` is in an unusable state. @@ -635,7 +663,7 @@ .. method:: read(n) Read and return at most *n* characters from the stream as a single - :class:`str`. If *n* is negative or ``None``, reads to EOF. + :class:`str`. If *n* is negative or ``None``, reads until EOF. .. method:: readline() @@ -650,7 +678,7 @@ .. class:: TextIOWrapper(buffer, encoding=None, errors=None, newline=None, line_buffering=False) - A buffered text stream over a :class:`BufferedIOBase` raw stream, *buffer*. + A buffered text stream over a :class:`BufferedIOBase` binary stream. It inherits :class:`TextIOBase`. *encoding* gives the name of the encoding that the stream will be decoded or From python-checkins at python.org Thu Sep 17 21:12:50 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 17 Sep 2009 19:12:50 -0000 Subject: [Python-checkins] r74881 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: r.david.murray Date: Thu Sep 17 21:12:49 2009 New Revision: 74881 Log: Check in first draft of maintainers.rst. Added: python/branches/py3k/Misc/maintainers.rst Added: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- (empty file) +++ python/branches/py3k/Misc/maintainers.rst Thu Sep 17 21:12:49 2009 @@ -0,0 +1,284 @@ +Maintainers Index +================= + +This document cross references Python Modules (first table) and platforms +(second table) with the Tracker user names of people who are experts +and/or resources for that module or platform. This list is intended +to be used by issue submitters, issue triage people, and other issue +participants to find people to add to the nosy list or to contact +directly by email for help and decisions on feature requests and bug +fixes. People on this list may be asked to render final judgement on a +feature or bug. If no active maintainer is listed for a given module, +then questionable changes should go to python-dev, while any other issues +can and should be decided by any committer. + +The last part of this document is a third table, listing broader topic +areas in which various people have expertise. These people can also +be contacted for help, opinions, and decisions when issues involve +their areas. + +If a listed maintainer does not respond to requests for comment for an +extended period (three weeks or more), they should be marked as inactive +in this list by placing the word 'inactive' in parenthesis behind their +tracker id. They are of course free to remove that inactive mark at +any time. + +Committers should update this table as their areas of expertise widen. +New topics may be added to the third table at will. + +The existence of this list is not meant to indicate that these people +*must* be contacted for decisions; it is, rather, a resource to be used +by non-committers to find responsible parties, and by committers who do +not feel qualified to make a decision in a particular context. + +See also `PEP 291`_ and `PEP 360`_ for information about certain modules +with special rules. + +.. _`PEP 291`: http://www.python.org/dev/peps/pep-0291/ +.. _`PEP 360`: http://www.python.org/dev/peps/pep-0360/ + + +================== =========== +Module Maintainers +================== =========== +__future__ +__main__ gvanrossum +_dummy_thread brett.cannon +_thread +abc +aifc r.david.murray +array +ast +asynchat josiahcarlson +asyncore josiahcarlson +atexit +audioop +base64 +bdb +binascii +binhex +bisect +builtins +bz2 +calendar +cgi +cgitb +chunk +cmath mark.dickinson +cmd +code +codecs +codeop +collections +colorsys +compileall +configparser +contextlib +copy +copyreg +cProfile +crypt +csv +ctypes theller +curses +datetime +dbm +decimal mark,dickinson +difflib +dis +distutils tarek +doctest +dummy_threading brett.cannon +email barry +encodings +errno +exceptions +fcntl +filecmp +fileinput +fnmatch +formatter +fpectl +fractions mark.dickinson +ftplib +functools +gc +getopt +getpass +gettext +glob +grp +gzip +hashlib +heapq +hmac +html +http +imaplib +imghdr +imp +importlib brett.cannon +inspect +io pitrou, benjamin.peterson +itertools +json +keyword +lib2to3 benjamin.peterson +linecache +locale +logging vsajip +macpath +mailbox andrew.kuchling +mailcap +marshal +math mark.dickinson +mimetypes +mmap +modulefinder theller, jvr +msilib +msvcrt +multiprocessing jnoller +netrc +nis +nntplib +numbers +operator +optparse aronacher +os +ossaudiodev +parser +pdb +pickle +pickletools +pipes +pkgutil +platform lemburg +plistlib +poplib +posix +pprint +pstats +pty +pwd +py_compile +pybench lemburg +pyclbr +pydoc +queue +quopri +random +re +readline +reprlib +resource +rlcompleter +runpy +sched +select +shelve +shlex +shutil +signal +site +smtpd +smtplib +sndhdr +socket +socketserver +spwd +sqlite3 +ssl +stat +string +stringprep +struct mark.dickinson +subprocess astrand (inactive) +sunau +symbol +symtable +sys +syslog +tabnanny +tarfile lars.gustaebel +telnetlib +tempfile +termios +test +textwrap +threading +time +timeit +tkinter gpolo +token +tokenize +trace +traceback +tty +turtle gregorlingl +types +unicodedata +unittest michael.foord +urllib +uu +uuid +warnings +wave +weakref +webbrowser georg.brandl +winreg +winsound +wsgiref pje +xdrlib +xml loewis +xml.etree effbot (inactive) +xmlrpc loewis +zipfile +zipimport +zlib +================== =========== + + +================== =========== +Platform Maintainer +------------------ ----------- +AIX +Cygwin jlt63 +FreeBSD +Linux +Mac ronaldoussoren +NetBSD1 +OS2/EMX aimacintyre +Solaris +HP-UX +================== =========== + + +================== =========== +Interest Area Maintainers +------------------ ----------- +algorithms +ast/compiler +autoconf +bsd +buildbots +data formats mark.dickinson +database +documentation georg.brandl +GUI +i18n +import machinery brett.cannon +io pitrou, benjamin.peterson +locale +makefiles +mathematics mark.dickinson, eric.smith +memory management +networking +packaging +release management +str.format eric.smith +time and dates +testing michael.foord +threads +unicode +windows +================== =========== From python-checkins at python.org Thu Sep 17 21:22:35 2009 From: python-checkins at python.org (eric.smith) Date: Thu, 17 Sep 2009 19:22:35 -0000 Subject: [Python-checkins] r74882 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: eric.smith Date: Thu Sep 17 21:22:30 2009 New Revision: 74882 Log: Typo. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Thu Sep 17 21:22:30 2009 @@ -83,7 +83,7 @@ curses datetime dbm -decimal mark,dickinson +decimal mark.dickinson difflib dis distutils tarek From python-checkins at python.org Thu Sep 17 21:37:28 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 17 Sep 2009 19:37:28 -0000 Subject: [Python-checkins] r74883 - in python/branches/py3k: Misc/maintainers.rst Objects/longobject.c Message-ID: Author: mark.dickinson Date: Thu Sep 17 21:37:28 2009 New Revision: 74883 Log: Add some more module maintainers. Modified: python/branches/py3k/Misc/maintainers.rst python/branches/py3k/Objects/longobject.c Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Thu Sep 17 21:37:28 2009 @@ -69,7 +69,7 @@ code codecs codeop -collections +collections rhettinger colorsys compileall configparser @@ -120,7 +120,7 @@ importlib brett.cannon inspect io pitrou, benjamin.peterson -itertools +itertools rhettinger json keyword lib2to3 benjamin.peterson @@ -166,13 +166,13 @@ pydoc queue quopri -random +random rhettinger re readline reprlib resource rlcompleter -runpy +runpy ncoghlan sched select shelve Modified: python/branches/py3k/Objects/longobject.c ============================================================================== --- python/branches/py3k/Objects/longobject.c (original) +++ python/branches/py3k/Objects/longobject.c Thu Sep 17 21:37:28 2009 @@ -1775,9 +1775,9 @@ Py_ssize_t i, sz; Py_ssize_t size_a; Py_UNICODE *p; - int bits; - char sign = '\0'; + int bits, negative; + assert(base == 2 || base == 8 || base == 10 || base == 16); if (base == 10) return long_to_decimal_string((PyObject *)a); @@ -1785,23 +1785,34 @@ PyErr_BadInternalCall(); return NULL; } - assert(base >= 2 && base <= 36); size_a = ABS(Py_SIZE(a)); + negative = Py_SIZE(a) < 0; /* Compute a rough upper bound for the length of the string */ - i = base; - bits = 0; - while (i > 1) { - ++bits; - i >>= 1; + switch (base) { + case 2: + bits = 1; + break; + case 8: + bits = 3; + break; + case 16: + bits = 4; + break; + default: + assert(0); /* never get here */ } + + /* length of string required: +1 for negative sign, +2 for prefix */ i = 5; /* ensure we don't get signed overflow in sz calculation */ - if (size_a > (PY_SSIZE_T_MAX - i) / PyLong_SHIFT) { + if (size_a > (PY_SSIZE_T_MAX - 4) / PyLong_SHIFT) { PyErr_SetString(PyExc_OverflowError, "int is too large to format"); return NULL; } + sz = 3 + negative + (size_a * PyLong_SHIFT - 1) / bits; + sz = i + 1 + (size_a * PyLong_SHIFT - 1) / bits; assert(sz >= 0); str = PyUnicode_FromUnicode(NULL, sz); @@ -1809,112 +1820,41 @@ return NULL; p = PyUnicode_AS_UNICODE(str) + sz; *p = '\0'; - if (Py_SIZE(a) < 0) - sign = '-'; if (Py_SIZE(a) == 0) { *--p = '0'; } - else if ((base & (base - 1)) == 0) { - /* JRH: special case for power-of-2 bases */ - twodigits accum = 0; - int accumbits = 0; /* # of bits in accum */ - int basebits = 1; /* # of bits in base-1 */ - i = base; - while ((i >>= 1) > 1) - ++basebits; - - for (i = 0; i < size_a; ++i) { - accum |= (twodigits)a->ob_digit[i] << accumbits; - accumbits += PyLong_SHIFT; - assert(accumbits >= basebits); - do { - char cdigit = (char)(accum & (base - 1)); - cdigit += (cdigit < 10) ? '0' : 'a'-10; - assert(p > PyUnicode_AS_UNICODE(str)); - *--p = cdigit; - accumbits -= basebits; - accum >>= basebits; - } while (i < size_a-1 ? accumbits >= basebits : - accum > 0); - } - } - else { - /* Not 0, and base not a power of 2. Divide repeatedly by - base, but for speed use the highest power of base that - fits in a digit. */ - Py_ssize_t size = size_a; - digit *pin = a->ob_digit; - PyLongObject *scratch; - /* powbasw <- largest power of base that fits in a digit. */ - digit powbase = base; /* powbase == base ** power */ - int power = 1; - for (;;) { - twodigits newpow = powbase * (twodigits)base; - if (newpow >> PyLong_SHIFT) - /* doesn't fit in a digit */ - break; - powbase = (digit)newpow; - ++power; - } - - /* Get a scratch area for repeated division. */ - scratch = _PyLong_New(size); - if (scratch == NULL) { - Py_DECREF(str); - return NULL; - } + assert((base & (base-1)) = 0); + /* JRH: special case for power-of-2 bases */ + twodigits accum = 0; + int accumbits = 0; /* # of bits in accum */ + int basebits = 1; /* # of bits in base-1 */ + i = base; + while ((i >>= 1) > 1) + ++basebits; - /* Repeatedly divide by powbase. */ + for (i = 0; i < size_a; ++i) { + accum |= (twodigits)a->ob_digit[i] << accumbits; + accumbits += PyLong_SHIFT; + assert(accumbits >= basebits); do { - int ntostore = power; - digit rem = inplace_divrem1(scratch->ob_digit, - pin, size, powbase); - pin = scratch->ob_digit; /* no need to use a again */ - if (pin[size - 1] == 0) - --size; - SIGCHECK({ - Py_DECREF(scratch); - Py_DECREF(str); - return NULL; - }) - - /* Break rem into digits. */ - assert(ntostore > 0); - do { - digit nextrem = (digit)(rem / base); - char c = (char)(rem - nextrem * base); - assert(p > PyUnicode_AS_UNICODE(str)); - c += (c < 10) ? '0' : 'a'-10; - *--p = c; - rem = nextrem; - --ntostore; - /* Termination is a bit delicate: must not - store leading zeroes, so must get out if - remaining quotient and rem are both 0. */ - } while (ntostore && (size || rem)); - } while (size != 0); - Py_DECREF(scratch); + char cdigit = (char)(accum & (base - 1)); + cdigit += (cdigit < 10) ? '0' : 'a'-10; + assert(p > PyUnicode_AS_UNICODE(str)); + *--p = cdigit; + accumbits -= basebits; + accum >>= basebits; + } while (i < size_a-1 ? accumbits >= basebits : + accum > 0); } - if (base == 16) { + if (base == 16) *--p = 'x'; - *--p = '0'; - } - else if (base == 8) { + else if (base == 8) *--p = 'o'; - *--p = '0'; - } - else if (base == 2) { + else /* base == 2 */ *--p = 'b'; - *--p = '0'; - } - else if (base != 10) { - *--p = '#'; - *--p = '0' + base%10; - if (base > 10) - *--p = '0' + base/10; - } + *--p = '0'; if (sign) *--p = sign; if (p != PyUnicode_AS_UNICODE(str)) { From python-checkins at python.org Thu Sep 17 21:39:13 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 17 Sep 2009 19:39:13 -0000 Subject: [Python-checkins] r74884 - python/branches/py3k/Objects/longobject.c Message-ID: Author: mark.dickinson Date: Thu Sep 17 21:39:12 2009 New Revision: 74884 Log: Revert accidental changes to Objects/longobject.c Modified: python/branches/py3k/Objects/longobject.c Modified: python/branches/py3k/Objects/longobject.c ============================================================================== --- python/branches/py3k/Objects/longobject.c (original) +++ python/branches/py3k/Objects/longobject.c Thu Sep 17 21:39:12 2009 @@ -1775,9 +1775,9 @@ Py_ssize_t i, sz; Py_ssize_t size_a; Py_UNICODE *p; - int bits, negative; + int bits; + char sign = '\0'; - assert(base == 2 || base == 8 || base == 10 || base == 16); if (base == 10) return long_to_decimal_string((PyObject *)a); @@ -1785,34 +1785,23 @@ PyErr_BadInternalCall(); return NULL; } + assert(base >= 2 && base <= 36); size_a = ABS(Py_SIZE(a)); - negative = Py_SIZE(a) < 0; /* Compute a rough upper bound for the length of the string */ - switch (base) { - case 2: - bits = 1; - break; - case 8: - bits = 3; - break; - case 16: - bits = 4; - break; - default: - assert(0); /* never get here */ + i = base; + bits = 0; + while (i > 1) { + ++bits; + i >>= 1; } - - /* length of string required: +1 for negative sign, +2 for prefix */ i = 5; /* ensure we don't get signed overflow in sz calculation */ - if (size_a > (PY_SSIZE_T_MAX - 4) / PyLong_SHIFT) { + if (size_a > (PY_SSIZE_T_MAX - i) / PyLong_SHIFT) { PyErr_SetString(PyExc_OverflowError, "int is too large to format"); return NULL; } - sz = 3 + negative + (size_a * PyLong_SHIFT - 1) / bits; - sz = i + 1 + (size_a * PyLong_SHIFT - 1) / bits; assert(sz >= 0); str = PyUnicode_FromUnicode(NULL, sz); @@ -1820,41 +1809,112 @@ return NULL; p = PyUnicode_AS_UNICODE(str) + sz; *p = '\0'; + if (Py_SIZE(a) < 0) + sign = '-'; if (Py_SIZE(a) == 0) { *--p = '0'; } - assert((base & (base-1)) = 0); - /* JRH: special case for power-of-2 bases */ - twodigits accum = 0; - int accumbits = 0; /* # of bits in accum */ - int basebits = 1; /* # of bits in base-1 */ - i = base; - while ((i >>= 1) > 1) - ++basebits; + else if ((base & (base - 1)) == 0) { + /* JRH: special case for power-of-2 bases */ + twodigits accum = 0; + int accumbits = 0; /* # of bits in accum */ + int basebits = 1; /* # of bits in base-1 */ + i = base; + while ((i >>= 1) > 1) + ++basebits; + + for (i = 0; i < size_a; ++i) { + accum |= (twodigits)a->ob_digit[i] << accumbits; + accumbits += PyLong_SHIFT; + assert(accumbits >= basebits); + do { + char cdigit = (char)(accum & (base - 1)); + cdigit += (cdigit < 10) ? '0' : 'a'-10; + assert(p > PyUnicode_AS_UNICODE(str)); + *--p = cdigit; + accumbits -= basebits; + accum >>= basebits; + } while (i < size_a-1 ? accumbits >= basebits : + accum > 0); + } + } + else { + /* Not 0, and base not a power of 2. Divide repeatedly by + base, but for speed use the highest power of base that + fits in a digit. */ + Py_ssize_t size = size_a; + digit *pin = a->ob_digit; + PyLongObject *scratch; + /* powbasw <- largest power of base that fits in a digit. */ + digit powbase = base; /* powbase == base ** power */ + int power = 1; + for (;;) { + twodigits newpow = powbase * (twodigits)base; + if (newpow >> PyLong_SHIFT) + /* doesn't fit in a digit */ + break; + powbase = (digit)newpow; + ++power; + } - for (i = 0; i < size_a; ++i) { - accum |= (twodigits)a->ob_digit[i] << accumbits; - accumbits += PyLong_SHIFT; - assert(accumbits >= basebits); + /* Get a scratch area for repeated division. */ + scratch = _PyLong_New(size); + if (scratch == NULL) { + Py_DECREF(str); + return NULL; + } + + /* Repeatedly divide by powbase. */ do { - char cdigit = (char)(accum & (base - 1)); - cdigit += (cdigit < 10) ? '0' : 'a'-10; - assert(p > PyUnicode_AS_UNICODE(str)); - *--p = cdigit; - accumbits -= basebits; - accum >>= basebits; - } while (i < size_a-1 ? accumbits >= basebits : - accum > 0); + int ntostore = power; + digit rem = inplace_divrem1(scratch->ob_digit, + pin, size, powbase); + pin = scratch->ob_digit; /* no need to use a again */ + if (pin[size - 1] == 0) + --size; + SIGCHECK({ + Py_DECREF(scratch); + Py_DECREF(str); + return NULL; + }) + + /* Break rem into digits. */ + assert(ntostore > 0); + do { + digit nextrem = (digit)(rem / base); + char c = (char)(rem - nextrem * base); + assert(p > PyUnicode_AS_UNICODE(str)); + c += (c < 10) ? '0' : 'a'-10; + *--p = c; + rem = nextrem; + --ntostore; + /* Termination is a bit delicate: must not + store leading zeroes, so must get out if + remaining quotient and rem are both 0. */ + } while (ntostore && (size || rem)); + } while (size != 0); + Py_DECREF(scratch); } - if (base == 16) + if (base == 16) { *--p = 'x'; - else if (base == 8) + *--p = '0'; + } + else if (base == 8) { *--p = 'o'; - else /* base == 2 */ + *--p = '0'; + } + else if (base == 2) { *--p = 'b'; - *--p = '0'; + *--p = '0'; + } + else if (base != 10) { + *--p = '#'; + *--p = '0' + base%10; + if (base > 10) + *--p = '0' + base/10; + } if (sign) *--p = sign; if (p != PyUnicode_AS_UNICODE(str)) { From python-checkins at python.org Thu Sep 17 22:20:01 2009 From: python-checkins at python.org (mark.dickinson) Date: Thu, 17 Sep 2009 20:20:01 -0000 Subject: [Python-checkins] r74885 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: mark.dickinson Date: Thu Sep 17 22:20:01 2009 New Revision: 74885 Log: Add decimal maintainers Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Thu Sep 17 22:20:01 2009 @@ -83,7 +83,7 @@ curses datetime dbm -decimal mark.dickinson +decimal facundobatista, rhettinger, mark.dickinson difflib dis distutils tarek From python-checkins at python.org Thu Sep 17 23:33:46 2009 From: python-checkins at python.org (benjamin.peterson) Date: Thu, 17 Sep 2009 21:33:46 -0000 Subject: [Python-checkins] r74886 - python/trunk/Objects/stringobject.c Message-ID: Author: benjamin.peterson Date: Thu Sep 17 23:33:46 2009 New Revision: 74886 Log: use macros Modified: python/trunk/Objects/stringobject.c Modified: python/trunk/Objects/stringobject.c ============================================================================== --- python/trunk/Objects/stringobject.c (original) +++ python/trunk/Objects/stringobject.c Thu Sep 17 23:33:46 2009 @@ -3948,7 +3948,7 @@ string_sizeof(PyStringObject *v) { Py_ssize_t res; - res = PyStringObject_SIZE + v->ob_size * v->ob_type->tp_itemsize; + res = PyStringObject_SIZE + PyString_GET_SIZE(v) * Py_TYPE(v)->tp_itemsize; return PyInt_FromSsize_t(res); } From nnorwitz at gmail.com Thu Sep 17 23:43:45 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 17 Sep 2009 17:43:45 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090917214345.GA20428@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 0, 339] references, sum=339 Less important issues: ---------------------- test_cmd_line leaked [0, -25, 50] references, sum=25 test_file2k leaked [-10, -70, 83] references, sum=3 test_smtplib leaked [0, 0, 88] references, sum=88 test_sys leaked [42, -21, -21] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, 0, -8] references, sum=-8 test_xmlrpc leaked [-4, 10, -6] references, sum=0 From python-checkins at python.org Fri Sep 18 00:07:38 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 22:07:38 -0000 Subject: [Python-checkins] r74887 - in python/branches/release26-maint: Doc/library/optparse.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 00:07:38 2009 New Revision: 74887 Log: Merged revisions 74621,74823-74824,74868,74877-74878 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74621 | georg.brandl | 2009-09-01 10:06:03 +0200 (Di, 01 Sep 2009) | 1 line #6638: fix wrong parameter name and markup a class. ........ r74823 | georg.brandl | 2009-09-16 15:06:22 +0200 (Mi, 16 Sep 2009) | 1 line Remove strange trailing commas. ........ r74824 | georg.brandl | 2009-09-16 15:11:06 +0200 (Mi, 16 Sep 2009) | 1 line #6892: fix optparse example involving help option. ........ r74868 | georg.brandl | 2009-09-17 12:23:02 +0200 (Do, 17 Sep 2009) | 2 lines String values should be shown with quotes, to avoid confusion with constants. ........ r74877 | georg.brandl | 2009-09-17 18:26:06 +0200 (Do, 17 Sep 2009) | 1 line Remove duplicate doc of enable/disable_interspersed_args. ........ r74878 | georg.brandl | 2009-09-17 19:14:04 +0200 (Do, 17 Sep 2009) | 1 line Make the optparse doc style a bit more standard: use standard description units for attrs/methods/etc., and use the correct referencing roles. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/optparse.rst Modified: python/branches/release26-maint/Doc/library/optparse.rst ============================================================================== --- python/branches/release26-maint/Doc/library/optparse.rst (original) +++ python/branches/release26-maint/Doc/library/optparse.rst Fri Sep 18 00:07:38 2009 @@ -11,14 +11,14 @@ .. sectionauthor:: Greg Ward -``optparse`` is a more convenient, flexible, and powerful library for parsing -command-line options than the old :mod:`getopt` module. ``optparse`` uses a more declarative -style of command-line parsing: you create an instance of :class:`OptionParser`, -populate it with options, and parse the command line. ``optparse`` allows users -to specify options in the conventional GNU/POSIX syntax, and additionally -generates usage and help messages for you. +:mod:`optparse` is a more convenient, flexible, and powerful library for parsing +command-line options than the old :mod:`getopt` module. :mod:`optparse` uses a +more declarative style of command-line parsing: you create an instance of +:class:`OptionParser`, populate it with options, and parse the command +line. :mod:`optparse` allows users to specify options in the conventional +GNU/POSIX syntax, and additionally generates usage and help messages for you. -Here's an example of using ``optparse`` in a simple script:: +Here's an example of using :mod:`optparse` in a simple script:: from optparse import OptionParser [...] @@ -36,11 +36,11 @@ --file=outfile -q -As it parses the command line, ``optparse`` sets attributes of the ``options`` -object returned by :meth:`parse_args` based on user-supplied command-line -values. When :meth:`parse_args` returns from parsing this command line, -``options.filename`` will be ``"outfile"`` and ``options.verbose`` will be -``False``. ``optparse`` supports both long and short options, allows short +As it parses the command line, :mod:`optparse` sets attributes of the +``options`` object returned by :meth:`parse_args` based on user-supplied +command-line values. When :meth:`parse_args` returns from parsing this command +line, ``options.filename`` will be ``"outfile"`` and ``options.verbose`` will be +``False``. :mod:`optparse` supports both long and short options, allows short options to be merged together, and allows options to be associated with their arguments in a variety of ways. Thus, the following command lines are all equivalent to the above example:: @@ -55,7 +55,7 @@ -h --help -and ``optparse`` will print out a brief summary of your script's options:: +and :mod:`optparse` will print out a brief summary of your script's options:: usage: [options] @@ -86,10 +86,10 @@ ^^^^^^^^^^^ argument - a string entered on the command-line, and passed by the shell to ``execl()`` or - ``execv()``. In Python, arguments are elements of ``sys.argv[1:]`` - (``sys.argv[0]`` is the name of the program being executed). Unix shells also - use the term "word". + a string entered on the command-line, and passed by the shell to ``execl()`` + or ``execv()``. In Python, arguments are elements of ``sys.argv[1:]`` + (``sys.argv[0]`` is the name of the program being executed). Unix shells + also use the term "word". It is occasionally desirable to substitute an argument list other than ``sys.argv[1:]``, so you should read "argument" as "an element of @@ -97,14 +97,14 @@ ``sys.argv[1:]``". option - an argument used to supply extra information to guide or customize the execution - of a program. There are many different syntaxes for options; the traditional - Unix syntax is a hyphen ("-") followed by a single letter, e.g. ``"-x"`` or - ``"-F"``. Also, traditional Unix syntax allows multiple options to be merged - into a single argument, e.g. ``"-x -F"`` is equivalent to ``"-xF"``. The GNU - project introduced ``"--"`` followed by a series of hyphen-separated words, e.g. - ``"--file"`` or ``"--dry-run"``. These are the only two option syntaxes - provided by :mod:`optparse`. + an argument used to supply extra information to guide or customize the + execution of a program. There are many different syntaxes for options; the + traditional Unix syntax is a hyphen ("-") followed by a single letter, + e.g. ``"-x"`` or ``"-F"``. Also, traditional Unix syntax allows multiple + options to be merged into a single argument, e.g. ``"-x -F"`` is equivalent + to ``"-xF"``. The GNU project introduced ``"--"`` followed by a series of + hyphen-separated words, e.g. ``"--file"`` or ``"--dry-run"``. These are the + only two option syntaxes provided by :mod:`optparse`. Some other option syntaxes that the world has seen include: @@ -121,15 +121,16 @@ * a slash followed by a letter, or a few letters, or a word, e.g. ``"/f"``, ``"/file"`` - These option syntaxes are not supported by :mod:`optparse`, and they never will - be. This is deliberate: the first three are non-standard on any environment, - and the last only makes sense if you're exclusively targeting VMS, MS-DOS, - and/or Windows. + These option syntaxes are not supported by :mod:`optparse`, and they never + will be. This is deliberate: the first three are non-standard on any + environment, and the last only makes sense if you're exclusively targeting + VMS, MS-DOS, and/or Windows. option argument - an argument that follows an option, is closely associated with that option, and - is consumed from the argument list when that option is. With :mod:`optparse`, - option arguments may either be in a separate argument from their option:: + an argument that follows an option, is closely associated with that option, + and is consumed from the argument list when that option is. With + :mod:`optparse`, option arguments may either be in a separate argument from + their option:: -f foo --file foo @@ -139,25 +140,26 @@ -ffoo --file=foo - Typically, a given option either takes an argument or it doesn't. Lots of people - want an "optional option arguments" feature, meaning that some options will take - an argument if they see it, and won't if they don't. This is somewhat - controversial, because it makes parsing ambiguous: if ``"-a"`` takes an optional - argument and ``"-b"`` is another option entirely, how do we interpret ``"-ab"``? - Because of this ambiguity, :mod:`optparse` does not support this feature. + Typically, a given option either takes an argument or it doesn't. Lots of + people want an "optional option arguments" feature, meaning that some options + will take an argument if they see it, and won't if they don't. This is + somewhat controversial, because it makes parsing ambiguous: if ``"-a"`` takes + an optional argument and ``"-b"`` is another option entirely, how do we + interpret ``"-ab"``? Because of this ambiguity, :mod:`optparse` does not + support this feature. positional argument something leftover in the argument list after options have been parsed, i.e. - after options and their arguments have been parsed and removed from the argument - list. + after options and their arguments have been parsed and removed from the + argument list. required option an option that must be supplied on the command-line; note that the phrase "required option" is self-contradictory in English. :mod:`optparse` doesn't - prevent you from implementing required options, but doesn't give you much help - at it either. See ``examples/required_1.py`` and ``examples/required_2.py`` in - the :mod:`optparse` source distribution for two ways to implement required - options with :mod:`optparse`. + prevent you from implementing required options, but doesn't give you much + help at it either. See ``examples/required_1.py`` and + ``examples/required_2.py`` in the :mod:`optparse` source distribution for two + ways to implement required options with :mod:`optparse`. For example, consider this hypothetical command-line:: @@ -286,8 +288,9 @@ * ``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 -these, :attr:`action` is the most fundamental. +:attr:`~Option.action`, :attr:`~Option.type`, :attr:`~Option.dest` +(destination), and :attr:`~Option.help`. Of these, :attr:`~Option.action` is the +most fundamental. .. _optparse-understanding-option-actions: @@ -298,9 +301,9 @@ Actions tell :mod:`optparse` what to do when it encounters an option on the command line. There is a fixed set of actions hard-coded into :mod:`optparse`; adding new actions is an advanced topic covered in section -:ref:`optparse-extending-optparse`. Most actions tell -:mod:`optparse` to store a value in some variable---for example, take a string -from the command line and store it in an attribute of ``options``. +:ref:`optparse-extending-optparse`. Most actions tell :mod:`optparse` to store +a value in some variable---for example, take a string from the command line and +store it in an attribute of ``options``. If you don't specify an option action, :mod:`optparse` defaults to ``store``. @@ -338,7 +341,7 @@ Let's parse another fake command-line. This time, we'll jam the option argument right up against the option: since ``"-n42"`` (one argument) is equivalent to -``"-n 42"`` (two arguments), the code :: +``"-n 42"`` (two arguments), the code :: (options, args) = parser.parse_args(["-n42"]) print options.num @@ -390,16 +393,16 @@ Some other actions supported by :mod:`optparse` are: -``store_const`` +``"store_const"`` store a constant value -``append`` +``"append"`` append this option's argument to a list -``count`` +``"count"`` increment a counter by one -``callback`` +``"callback"`` call a specified function These are covered in section :ref:`optparse-reference-guide`, Reference Guide @@ -458,8 +461,8 @@ :mod:`optparse`'s ability to generate help and usage text automatically is useful for creating user-friendly command-line interfaces. All you have to do -is supply a :attr:`help` value for each option, and optionally a short usage -message for your whole program. Here's an OptionParser populated with +is supply a :attr:`~Option.help` value for each option, and optionally a short +usage message for your whole program. Here's an OptionParser populated with user-friendly (documented) options:: usage = "usage: %prog [options] arg1 arg2" @@ -471,7 +474,7 @@ action="store_false", dest="verbose", help="be vewwy quiet (I'm hunting wabbits)") parser.add_option("-f", "--filename", - metavar="FILE", help="write output to FILE"), + metavar="FILE", help="write output to FILE") parser.add_option("-m", "--mode", default="intermediate", help="interaction mode: novice, intermediate, " @@ -503,12 +506,12 @@ usage = "usage: %prog [options] arg1 arg2" :mod:`optparse` expands ``"%prog"`` in the usage string to the name of the - current program, i.e. ``os.path.basename(sys.argv[0])``. The expanded string is - then printed before the detailed option help. + current program, i.e. ``os.path.basename(sys.argv[0])``. The expanded string + is then printed before the detailed option help. If you don't supply a usage string, :mod:`optparse` uses a bland but sensible - default: ``"usage: %prog [options]"``, which is fine if your script doesn't take - any positional arguments. + default: ``"usage: %prog [options]"``, which is fine if your script doesn't + take any positional arguments. * every option defines a help string, and doesn't worry about line-wrapping--- :mod:`optparse` takes care of wrapping lines and making the help output look @@ -522,17 +525,17 @@ Here, "MODE" is called the meta-variable: it stands for the argument that the user is expected to supply to :option:`-m`/:option:`--mode`. By default, :mod:`optparse` converts the destination variable name to uppercase and uses - that for the meta-variable. Sometimes, that's not what you want---for example, - the :option:`--filename` option explicitly sets ``metavar="FILE"``, resulting in - this automatically-generated option description:: + that for the meta-variable. Sometimes, that's not what you want---for + example, the :option:`--filename` option explicitly sets ``metavar="FILE"``, + resulting in this automatically-generated option description:: -f FILE, --filename=FILE - This is important for more than just saving space, though: the manually written - help text uses the meta-variable "FILE" to clue the user in that there's a - connection between the semi-formal syntax "-f FILE" and the informal semantic - description "write output to FILE". This is a simple but effective way to make - your help text a lot clearer and more useful for end users. + This is important for more than just saving space, though: the manually + written help text uses the meta-variable "FILE" to clue the user in that + there's a connection between the semi-formal syntax "-f FILE" and the informal + semantic description "write output to FILE". This is a simple but effective + way to make your help text a lot clearer and more useful for end users. .. versionadded:: 2.4 Options that have a default value can include ``%default`` in the help @@ -540,12 +543,12 @@ default value. If an option has no default value (or the default value is ``None``), ``%default`` expands to ``none``. -When dealing with many options, it is convenient to group these -options for better help output. An :class:`OptionParser` can contain -several option groups, each of which can contain several options. +When dealing with many options, it is convenient to group these options for +better help output. An :class:`OptionParser` can contain several option groups, +each of which can contain several options. -Continuing with the parser defined above, adding an -:class:`OptionGroup` to a parser is easy:: +Continuing with the parser defined above, adding an :class:`OptionGroup` to a +parser is easy:: group = OptionGroup(parser, "Dangerous Options", "Caution: use these options at your own risk. " @@ -600,17 +603,17 @@ There are two broad classes of errors that :mod:`optparse` has to worry about: programmer errors and user errors. Programmer errors are usually erroneous -calls to ``parser.add_option()``, e.g. invalid option strings, unknown option -attributes, missing option attributes, etc. These are dealt with in the usual -way: raise an exception (either ``optparse.OptionError`` or :exc:`TypeError`) and -let the program crash. +calls to :func:`OptionParser.add_option`, e.g. invalid option strings, unknown +option attributes, missing option attributes, etc. These are dealt with in the +usual way: raise an exception (either :exc:`optparse.OptionError` or +:exc:`TypeError`) and let the program crash. Handling user errors is much more important, since they are guaranteed to happen no matter how stable your code is. :mod:`optparse` can automatically detect some user errors, such as bad option arguments (passing ``"-n 4x"`` where :option:`-n` takes an integer argument), missing arguments (``"-n"`` at the end of the command line, where :option:`-n` takes an argument of any type). Also, -you can call ``parser.error()`` to signal an application-defined error +you can call :func:`OptionParser.error` to signal an application-defined error condition:: (options, args) = parser.parse_args() @@ -639,7 +642,7 @@ :mod:`optparse`\ -generated error messages take care always to mention the option involved in the error; be sure to do the same when calling -``parser.error()`` from your application code. +:func:`OptionParser.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 @@ -687,49 +690,51 @@ Creating the parser ^^^^^^^^^^^^^^^^^^^ -The first step in using :mod:`optparse` is to create an OptionParser instance:: +The first step in using :mod:`optparse` is to create an OptionParser instance. - parser = OptionParser(...) +.. class:: OptionParser(...) -The OptionParser constructor has no required arguments, but a number of optional -keyword arguments. You should always pass them as keyword arguments, i.e. do -not rely on the order in which the arguments are declared. + The OptionParser constructor has no required arguments, but a number of + optional keyword arguments. You should always pass them as keyword + arguments, i.e. do not rely on the order in which the arguments are declared. ``usage`` (default: ``"%prog [options]"``) - The usage summary to print when your program is run incorrectly or with a help - option. When :mod:`optparse` prints the usage string, it expands ``%prog`` to - ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed that keyword - argument). To suppress a usage message, pass the special value - ``optparse.SUPPRESS_USAGE``. + The usage summary to print when your program is run incorrectly or with a + help option. When :mod:`optparse` prints the usage string, it expands + ``%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you + passed that keyword argument). To suppress a usage message, pass the + special value :data:`optparse.SUPPRESS_USAGE`. ``option_list`` (default: ``[]``) A list of Option objects to populate the parser with. The options in - ``option_list`` are added after any options in ``standard_option_list`` (a class - attribute that may be set by OptionParser subclasses), but before any version or - help options. Deprecated; use :meth:`add_option` after creating the parser - instead. + ``option_list`` are added after any options in ``standard_option_list`` (a + class attribute that may be set by OptionParser subclasses), but before + any version or help options. Deprecated; use :meth:`add_option` after + creating the parser instead. ``option_class`` (default: optparse.Option) Class to use when adding options to the parser in :meth:`add_option`. ``version`` (default: ``None``) - A version string to print when the user supplies a version option. If you supply - a true value for ``version``, :mod:`optparse` automatically adds a version - option with the single option string ``"--version"``. The substring ``"%prog"`` - is expanded the same as for ``usage``. + A version string to print when the user supplies a version option. If you + supply a true value for ``version``, :mod:`optparse` automatically adds a + version option with the single option string ``"--version"``. The + substring ``"%prog"`` is expanded the same as for ``usage``. ``conflict_handler`` (default: ``"error"``) - Specifies what to do when options with conflicting option strings are added to - the parser; see section :ref:`optparse-conflicts-between-options`. + Specifies what to do when options with conflicting option strings are + added to the parser; see section + :ref:`optparse-conflicts-between-options`. ``description`` (default: ``None``) - A paragraph of text giving a brief overview of your program. :mod:`optparse` - reformats this paragraph to fit the current terminal width and prints it when - the user requests help (after ``usage``, but before the list of options). - - ``formatter`` (default: a new IndentedHelpFormatter) - An instance of optparse.HelpFormatter that will be used for printing help text. - :mod:`optparse` provides two concrete classes for this purpose: + A paragraph of text giving a brief overview of your program. + :mod:`optparse` reformats this paragraph to fit the current terminal width + and prints it when the user requests help (after ``usage``, but before the + list of options). + + ``formatter`` (default: a new :class:`IndentedHelpFormatter`) + An instance of optparse.HelpFormatter that will be used for printing help + text. :mod:`optparse` provides two concrete classes for this purpose: IndentedHelpFormatter and TitledHelpFormatter. ``add_help_option`` (default: ``True``) @@ -748,14 +753,14 @@ ^^^^^^^^^^^^^^^^^^^^^ There are several ways to populate the parser with options. The preferred way -is by using ``OptionParser.add_option()``, as shown in section +is by using :meth:`OptionParser.add_option`, as shown in section :ref:`optparse-tutorial`. :meth:`add_option` can be called in one of two ways: * pass it an Option instance (as returned by :func:`make_option`) * pass it any combination of positional and keyword arguments that are - acceptable to :func:`make_option` (i.e., to the Option constructor), and it will - create the Option instance for you + acceptable to :func:`make_option` (i.e., to the Option constructor), and it + will create the Option instance for you The other alternative is to pass a list of pre-constructed Option instances to the OptionParser constructor, as in:: @@ -783,66 +788,67 @@ e.g. :option:`-f` and :option:`--file`. You can specify any number of short or long option strings, but you must specify at least one overall option string. -The canonical way to create an Option instance is with the :meth:`add_option` -method of :class:`OptionParser`:: +The canonical way to create an :class:`Option` instance is with the +:meth:`add_option` method of :class:`OptionParser`. - parser.add_option(opt_str[, ...], attr=value, ...) +.. method:: OptionParser.add_option(opt_str[, ...], attr=value, ...) -To define an option with only a short option string:: + To define an option with only a short option string:: - parser.add_option("-f", attr=value, ...) + parser.add_option("-f", attr=value, ...) -And to define an option with only a long option string:: + And to define an option with only a long option string:: - parser.add_option("--foo", attr=value, ...) + parser.add_option("--foo", attr=value, ...) -The keyword arguments define attributes of the new Option object. The most -important option attribute is :attr:`action`, and it largely determines which -other attributes are relevant or required. If you pass irrelevant option -attributes, or fail to pass required ones, :mod:`optparse` raises an -:exc:`OptionError` exception explaining your mistake. + The keyword arguments define attributes of the new Option object. The most + important option attribute is :attr:`~Option.action`, and it largely + determines which other attributes are relevant or required. If you pass + irrelevant option attributes, or fail to pass required ones, :mod:`optparse` + raises an :exc:`OptionError` exception explaining your mistake. -An option's *action* determines what :mod:`optparse` does when it encounters -this option on the command-line. The standard option actions hard-coded into -:mod:`optparse` are: + An option's *action* determines what :mod:`optparse` does when it encounters + this option on the command-line. The standard option actions hard-coded into + :mod:`optparse` are: -``store`` - store this option's argument (default) + ``"store"`` + store this option's argument (default) -``store_const`` - store a constant value + ``"store_const"`` + store a constant value -``store_true`` - store a true value + ``"store_true"`` + store a true value -``store_false`` - store a false value + ``"store_false"`` + store a false value -``append`` - append this option's argument to a list + ``"append"`` + append this option's argument to a list -``append_const`` - append a constant value to a list + ``"append_const"`` + append a constant value to a list -``count`` - increment a counter by one + ``"count"`` + increment a counter by one -``callback`` - call a specified function + ``"callback"`` + call a specified function -:attr:`help` - print a usage message including all options and the documentation for them + ``"help"`` + 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.) + (If you don't supply an action, the default is ``"store"``. For this action, + you may also supply :attr:`~Option.type` and :attr:`~Option.dest` option + attributes; see :ref:`optparse-standard-option-actions`.) As you can see, most actions involve storing or updating a value somewhere. :mod:`optparse` always creates a special object for this, conventionally called -``options`` (it happens to be an instance of ``optparse.Values``). Option +``options`` (it happens to be an instance of :class:`optparse.Values`). Option arguments (and various other values) are stored as attributes of this object, -according to the :attr:`dest` (destination) option attribute. +according to the :attr:`~Option.dest` (destination) option attribute. -For example, when you call :: +For example, when you call :: parser.parse_args() @@ -850,7 +856,7 @@ options = Values() -If one of the options in this parser is defined with :: +If one of the options in this parser is defined with :: parser.add_option("-f", "--file", action="store", type="string", dest="filename") @@ -861,13 +867,97 @@ --file=foo --file foo -then :mod:`optparse`, on seeing this option, will do the equivalent of :: +then :mod:`optparse`, on seeing this option, will do the equivalent of :: options.filename = "foo" -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. +The :attr:`~Option.type` and :attr:`~Option.dest` option attributes are almost +as important as :attr:`~Option.action`, but :attr:`~Option.action` is the only +one that makes sense for *all* options. + + +.. _optparse-option-attributes: + +Option attributes +^^^^^^^^^^^^^^^^^ + +The following option attributes may be passed as keyword arguments to +:meth:`OptionParser.add_option`. If you pass an option attribute that is not +relevant to a particular option, or fail to pass a required option attribute, +:mod:`optparse` raises :exc:`OptionError`. + +.. attribute:: Option.action + + (default: ``"store"``) + + Determines :mod:`optparse`'s behaviour when this option is seen on the + command line; the available options are documented :ref:`here + `. + +.. attribute:: Option.type + + (default: ``"string"``) + + The argument type expected by this option (e.g., ``"string"`` or ``"int"``); + the available option types are documented :ref:`here + `. + +.. attribute:: Option.dest + + (default: derived from option strings) + + If the option's action implies writing or modifying a value somewhere, this + tells :mod:`optparse` where to write it: :attr:`~Option.dest` names an + attribute of the ``options`` object that :mod:`optparse` builds as it parses + the command line. + +.. attribute:: Option.default + + The value to use for this option's destination if the option is not seen on + the command line. See also :meth:`OptionParser.set_defaults`. + +.. attribute:: Option.nargs + + (default: 1) + + How many arguments of type :attr:`~Option.type` should be consumed when this + option is seen. If > 1, :mod:`optparse` will store a tuple of values to + :attr:`~Option.dest`. + +.. attribute:: Option.const + + For actions that store a constant value, the constant value to store. + +.. attribute:: Option.choices + + For options of type ``"choice"``, the list of strings the user may choose + from. + +.. attribute:: Option.callback + + For options with action ``"callback"``, the callable to call when this option + is seen. See section :ref:`optparse-option-callbacks` for detail on the + arguments passed to the callable. + +.. attribute:: Option.callback_args + Option.callback_kwargs + + Additional positional and keyword arguments to pass to ``callback`` after the + four standard callback arguments. + +.. attribute:: Option.help + + Help text to print for this option when listing all available options after + the user supplies a :attr:`~Option.help` option (such as ``"--help"``). If + no help text is supplied, the option will be listed without help text. To + hide this option, use the special value :data:`optparse.SUPPRESS_HELP`. + +.. attribute:: Option.metavar + + (default: derived from option strings) + + Stand-in for the option argument(s) to use when printing help text. See + section :ref:`optparse-tutorial` for an example. .. _optparse-standard-option-actions: @@ -880,42 +970,45 @@ 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:`~Option.type`, :attr:`~Option.dest`, + :attr:`~Option.nargs`, :attr:`~Option.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, - 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 - "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:`dest` is not supplied, :mod:`optparse` derives a destination from the - first long option string (e.g., ``"--foo-bar"`` implies ``foo_bar``). If there - are no long option strings, :mod:`optparse` derives a destination from the first - short option string (e.g., ``"-f"`` implies ``f``). + according to :attr:`~Option.type` and stored in :attr:`~Option.dest`. If + :attr:`~Option.nargs` > 1, multiple arguments will be consumed from the + command line; all will be converted according to :attr:`~Option.type` and + stored to :attr:`~Option.dest` as a tuple. See the + :ref:`optparse-standard-option-types` section. + + If :attr:`~Option.choices` is supplied (a list or tuple of strings), the type + defaults to ``"choice"``. + + If :attr:`~Option.type` is not supplied, it defaults to ``"string"``. + + If :attr:`~Option.dest` is not supplied, :mod:`optparse` derives a destination + from the first long option string (e.g., ``"--foo-bar"`` implies + ``foo_bar``). If there are no long option strings, :mod:`optparse` derives a + destination from the first short option string (e.g., ``"-f"`` implies ``f``). Example:: parser.add_option("-f") parser.add_option("-p", type="float", nargs=3, dest="point") - As it parses the command line :: + As it parses the command line :: -f foo.txt -p 1 -3.5 4 -fbar.txt - :mod:`optparse` will set :: + :mod:`optparse` will set :: options.f = "foo.txt" options.point = (1.0, -3.5, 4.0) options.f = "bar.txt" -* ``store_const`` [required: ``const``; relevant: :attr:`dest`] +* ``"store_const"`` [required: :attr:`~Option.const`; relevant: + :attr:`~Option.dest`] - The value ``const`` is stored in :attr:`dest`. + The value :attr:`~Option.const` is stored in :attr:`~Option.dest`. Example:: @@ -930,29 +1023,32 @@ options.verbose = 2 -* ``store_true`` [relevant: :attr:`dest`] +* ``"store_true"`` [relevant: :attr:`~Option.dest`] - A special case of ``store_const`` that stores a true value to :attr:`dest`. + A special case of ``"store_const"`` that stores a true value to + :attr:`~Option.dest`. -* ``store_false`` [relevant: :attr:`dest`] +* ``"store_false"`` [relevant: :attr:`~Option.dest`] - Like ``store_true``, but stores a false value. + Like ``"store_true"``, but stores a false value. Example:: 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:`~Option.type`, :attr:`~Option.dest`, + :attr:`~Option.nargs`, :attr:`~Option.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 - is automatically created when :mod:`optparse` first encounters this option on - the command-line. If ``nargs`` > 1, multiple arguments are consumed, and a - tuple of length ``nargs`` is appended to :attr:`dest`. + :attr:`~Option.dest`. If no default value for :attr:`~Option.dest` is + supplied, an empty list is automatically created when :mod:`optparse` first + encounters this option on the command-line. If :attr:`~Option.nargs` > 1, + multiple arguments are consumed, and a tuple of length :attr:`~Option.nargs` + is appended to :attr:`~Option.dest`. - The defaults for :attr:`type` and :attr:`dest` are the same as for the ``store`` - action. + The defaults for :attr:`~Option.type` and :attr:`~Option.dest` are the same as + for the ``"store"`` action. Example:: @@ -968,16 +1064,19 @@ options.tracks.append(int("4")) -* ``append_const`` [required: ``const``; relevant: :attr:`dest`] +* ``"append_const"`` [required: :attr:`~Option.const`; relevant: + :attr:`~Option.dest`] - Like ``store_const``, but the value ``const`` is appended to :attr:`dest`; as - with ``append``, :attr:`dest` defaults to ``None``, and an empty list is - automatically created the first time the option is encountered. - -* ``count`` [relevant: :attr:`dest`] - - Increment the integer stored at :attr:`dest`. If no default value is supplied, - :attr:`dest` is set to zero before being incremented the first time. + Like ``"store_const"``, but the value :attr:`~Option.const` is appended to + :attr:`~Option.dest`; as with ``"append"``, :attr:`~Option.dest` defaults to + ``None``, and an empty list is automatically created the first time the option + is encountered. + +* ``"count"`` [relevant: :attr:`~Option.dest`] + + Increment the integer stored at :attr:`~Option.dest`. If no default value is + supplied, :attr:`~Option.dest` is set to zero before being incremented the + first time. Example:: @@ -993,42 +1092,47 @@ options.verbosity += 1 -* ``callback`` [required: ``callback``; relevant: :attr:`type`, ``nargs``, - ``callback_args``, ``callback_kwargs``] +* ``"callback"`` [required: :attr:`~Option.callback`; relevant: + :attr:`~Option.type`, :attr:`~Option.nargs`, :attr:`~Option.callback_args`, + :attr:`~Option.callback_kwargs`] - Call the function specified by ``callback``, which is called as :: + Call the function specified by :attr:`~Option.callback`, which is called as :: func(option, opt_str, value, parser, *args, **kwargs) See section :ref:`optparse-option-callbacks` for more detail. -* :attr:`help` +* ``"help"`` - Prints a complete help message for all the options in the current option parser. - The help message is constructed from the ``usage`` string passed to - OptionParser's constructor and the :attr:`help` string passed to every option. - - If no :attr:`help` string is supplied for an option, it will still be listed in - the help message. To omit an option entirely, use the special value - ``optparse.SUPPRESS_HELP``. + Prints a complete help message for all the options in the current option + parser. The help message is constructed from the ``usage`` string passed to + OptionParser's constructor and the :attr:`~Option.help` string passed to every + option. + + If no :attr:`~Option.help` string is supplied for an option, it will still be + listed in the help message. To omit an option entirely, use the special value + :data:`optparse.SUPPRESS_HELP`. - :mod:`optparse` automatically adds a :attr:`help` option to all OptionParsers, - so you do not normally need to create one. + :mod:`optparse` automatically adds a :attr:`~Option.help` option to all + OptionParsers, so you do not normally need to create one. Example:: from optparse import OptionParser, SUPPRESS_HELP - parser = OptionParser() - parser.add_option("-h", "--help", action="help"), + # usually, a help option is added automatically, but that can + # be suppressed using the add_help_option argument + parser = OptionParser(add_help_option=False) + + parser.add_option("-h", "--help", action="help") parser.add_option("-v", action="store_true", dest="verbose", help="Be moderately verbose") parser.add_option("--file", dest="filename", - help="Input file to read data from"), + help="Input file to read data from") parser.add_option("--secret", help=SUPPRESS_HELP) - If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, it - will print something like the following help message to stdout (assuming + If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, + it will print something like the following help message to stdout (assuming ``sys.argv[0]`` is ``"foo.py"``):: usage: foo.py [options] @@ -1041,82 +1145,14 @@ After printing the help message, :mod:`optparse` terminates your process with ``sys.exit(0)``. -* ``version`` - - Prints the version number supplied to the OptionParser to stdout and exits. The - version number is actually formatted and printed by the ``print_version()`` - method of OptionParser. Generally only relevant if the ``version`` argument is - supplied to the OptionParser constructor. As with :attr:`help` options, you - will rarely create ``version`` options, since :mod:`optparse` automatically adds - them when needed. - - -.. _optparse-option-attributes: - -Option attributes -^^^^^^^^^^^^^^^^^ - -The following option attributes may be passed as keyword arguments to -``parser.add_option()``. If you pass an option attribute that is not relevant -to a particular option, or fail to pass a required option attribute, -:mod:`optparse` raises :exc:`OptionError`. - -* :attr:`action` (default: ``"store"``) - - Determines :mod:`optparse`'s behaviour when this option is seen on the command - line; the available options are documented above. - -* :attr:`type` (default: ``"string"``) - - The argument type expected by this option (e.g., ``"string"`` or ``"int"``); the - available option types are documented below. - -* :attr:`dest` (default: derived from option strings) - - If the option's action implies writing or modifying a value somewhere, this - tells :mod:`optparse` where to write it: :attr:`dest` names an attribute of the - ``options`` object that :mod:`optparse` builds as it parses the command line. - -* ``default`` - - The value to use for this option's destination if the option is not seen on the - command line. See also ``parser.set_defaults()``. - -* ``nargs`` (default: 1) - - 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`` - - For actions that store a constant value, the constant value to store. - -* ``choices`` - - For options of type ``"choice"``, the list of strings the user may choose from. +* ``"version"`` -* ``callback`` - - For options with action ``"callback"``, the callable to call when this option - is seen. See section :ref:`optparse-option-callbacks` for detail on the - arguments passed to ``callable``. - -* ``callback_args``, ``callback_kwargs`` - - Additional positional and keyword arguments to pass to ``callback`` after the - four standard callback arguments. - -* :attr:`help` - - Help text to print for this option when listing all available options after the - user supplies a :attr:`help` option (such as ``"--help"``). If no help text is - supplied, the option will be listed without help text. To hide this option, use - the special value ``SUPPRESS_HELP``. - -* ``metavar`` (default: derived from option strings) - - Stand-in for the option argument(s) to use when printing help text. See section - :ref:`optparse-tutorial` for an example. + Prints the version number supplied to the OptionParser to stdout and exits. + The version number is actually formatted and printed by the + ``print_version()`` method of OptionParser. Generally only relevant if the + ``version`` argument is supplied to the OptionParser constructor. As with + :attr:`~Option.help` options, you will rarely create ``version`` options, + since :mod:`optparse` automatically adds them when needed. .. _optparse-standard-option-types: @@ -1124,14 +1160,14 @@ Standard option types ^^^^^^^^^^^^^^^^^^^^^ -:mod:`optparse` has six built-in option types: ``string``, ``int``, ``long``, -``choice``, ``float`` and ``complex``. If you need to add new option types, see -section :ref:`optparse-extending-optparse`. +:mod:`optparse` has six built-in option types: ``"string"``, ``"int"``, +``"long"``, ``"choice"``, ``"float"`` and ``"complex"``. If you need to add new +option types, see section :ref:`optparse-extending-optparse`. Arguments to string options are not checked or converted in any way: the text on the command line is stored in the destination (or passed to the callback) as-is. -Integer arguments (type ``int`` or ``long``) are parsed as follows: +Integer arguments (type ``"int"`` or ``"long"``) are parsed as follows: * if the number starts with ``0x``, it is parsed as a hexadecimal number @@ -1142,17 +1178,18 @@ * otherwise, the number is parsed as a decimal number -The conversion is done by calling either ``int()`` or ``long()`` with the +The conversion is done by calling either :func:`int` or :func:`long` with the appropriate base (2, 8, 10, or 16). If this fails, so will :mod:`optparse`, although with a more useful error message. -``float`` and ``complex`` option arguments are converted directly with -``float()`` and ``complex()``, with similar error-handling. +``"float"`` and ``"complex"`` option arguments are converted directly with +:func:`float` and :func:`complex`, with similar error-handling. -``choice`` options are a subtype of ``string`` options. The ``choices`` option -attribute (a sequence of strings) defines the set of allowed option arguments. -``optparse.check_choice()`` compares user-supplied option arguments against this -master list and raises :exc:`OptionValueError` if an invalid string is given. +``"choice"`` options are a subtype of ``"string"`` options. The +:attr:`~Option.choices`` option attribute (a sequence of strings) defines the +set of allowed option arguments. :func:`optparse.check_choice` compares +user-supplied option arguments against this master list and raises +:exc:`OptionValueError` if an invalid string is given. .. _optparse-parsing-arguments: @@ -1171,19 +1208,20 @@ the list of arguments to process (default: ``sys.argv[1:]``) ``values`` - object to store option arguments in (default: a new instance of optparse.Values) + object to store option arguments in (default: a new instance of + :class:`optparse.Values`) and the return values are ``options`` - the same object that was passed in as ``options``, or the optparse.Values + the same object that was passed in as ``values``, or the optparse.Values instance created by :mod:`optparse` ``args`` the leftover positional arguments after all options have been processed The most common usage is to supply neither keyword argument. If you supply -``options``, it will be modified with repeated ``setattr()`` calls (roughly one +``values``, it will be modified with repeated :func:`setattr` calls (roughly one for every option argument stored to an option destination) and returned by :meth:`parse_args`. @@ -1198,37 +1236,51 @@ Querying and manipulating your option parser ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The default behavior of the option parser can be customized slightly, -and you can also poke around your option parser and see what's there. -OptionParser provides several methods to help you out: - -``disable_interspersed_args()`` - Set parsing to stop on the first non-option. Use this if you have a - command processor which runs another command which has options of - its own and you want to make sure these options don't get - confused. For example, each command might have a different - set of options. - -``enable_interspersed_args()`` - Set parsing to not stop on the first non-option, allowing - interspersing switches with command arguments. For example, - ``"-s arg1 --long arg2"`` would return ``["arg1", "arg2"]`` - as the command arguments and ``-s, --long`` as options. - This is the default behavior. +The default behavior of the option parser can be customized slightly, and you +can also poke around your option parser and see what's there. OptionParser +provides several methods to help you out: + +.. method:: OptionParser.disable_interspersed_args() + + Set parsing to stop on the first non-option. For example, if ``"-a"`` and + ``"-b"`` are both simple options that take no arguments, :mod:`optparse` + normally accepts this syntax:: + + prog -a arg1 -b arg2 + + and treats it as equivalent to :: + + prog -a -b arg1 arg2 + + To disable this feature, call :meth:`disable_interspersed_args`. This + restores traditional Unix syntax, where option parsing stops with the first + non-option argument. -``get_option(opt_str)`` - Returns the Option instance with the option string ``opt_str``, or ``None`` if + Use this if you have a command processor which runs another command which has + options of its own and you want to make sure these options don't get + confused. For example, each command might have a different set of options. + +.. method:: OptionParser.enable_interspersed_args() + + Set parsing to not stop on the first non-option, allowing interspersing + switches with command arguments. This is the default behavior. + +.. method:: OptionParser.get_option(opt_str) + + Returns the Option instance with the option string *opt_str*, or ``None`` if no options have that option string. -``has_option(opt_str)`` - Return true if the OptionParser has an option with option string ``opt_str`` +.. method:: OptionParser.has_option(opt_str) + + Return true if the OptionParser has an option with option string *opt_str* (e.g., ``"-q"`` or ``"--verbose"``). -``remove_option(opt_str)`` - If the :class:`OptionParser` has an option corresponding to ``opt_str``, that option is - removed. If that option provided any other option strings, all of those option - strings become invalid. If ``opt_str`` does not occur in any option belonging to - this :class:`OptionParser`, raises :exc:`ValueError`. +.. method:: OptionParser.remove_option(opt_str) + + If the :class:`OptionParser` has an option corresponding to *opt_str*, that + option is removed. If that option provided any other option strings, all of + those option strings become invalid. If *opt_str* does not occur in any + option belonging to this :class:`OptionParser`, raises :exc:`ValueError`. .. _optparse-conflicts-between-options: @@ -1258,10 +1310,11 @@ The available conflict handlers are: - ``error`` (default) - assume option conflicts are a programming error and raise :exc:`OptionConflictError` + ``"error"`` (default) + assume option conflicts are a programming error and raise + :exc:`OptionConflictError` - ``resolve`` + ``"resolve"`` resolve option conflicts intelligently (see below) @@ -1307,9 +1360,10 @@ OptionParser instances have several cyclic references. This should not be a problem for Python's garbage collector, but you may wish to break the cyclic -references explicitly by calling ``destroy()`` on your OptionParser once you are -done with it. This is particularly useful in long-running applications where -large object graphs are reachable from your OptionParser. +references explicitly by calling :meth:`~OptionParser.destroy` on your +OptionParser once you are done with it. This is particularly useful in +long-running applications where large object graphs are reachable from your +OptionParser. .. _optparse-other-methods: @@ -1319,51 +1373,34 @@ OptionParser supports several other public methods: -* ``set_usage(usage)`` - - Set the usage string according to the rules described above for the ``usage`` - constructor keyword argument. Passing ``None`` sets the default usage string; - use ``SUPPRESS_USAGE`` to suppress a usage message. - -* ``enable_interspersed_args()``, ``disable_interspersed_args()`` - - Enable/disable positional arguments interspersed with options, similar to GNU - getopt (enabled by default). For example, if ``"-a"`` and ``"-b"`` are both - simple options that take no arguments, :mod:`optparse` normally accepts this - syntax:: - - prog -a arg1 -b arg2 - - and treats it as equivalent to :: - - prog -a -b arg1 arg2 - - To disable this feature, call ``disable_interspersed_args()``. This restores - traditional Unix syntax, where option parsing stops with the first non-option - argument. +.. method:: OptionParser.set_usage(usage) -* ``set_defaults(dest=value, ...)`` - - Set default values for several option destinations at once. Using - :meth:`set_defaults` is the preferred way to set default values for options, - since multiple options can share the same destination. For example, if several - "mode" options all set the same destination, any one of them can set the - default, and the last one wins:: - - parser.add_option("--advanced", action="store_const", - dest="mode", const="advanced", - default="novice") # overridden below - parser.add_option("--novice", action="store_const", - dest="mode", const="novice", - default="advanced") # overrides above setting - - To avoid this confusion, use :meth:`set_defaults`:: - - parser.set_defaults(mode="advanced") - parser.add_option("--advanced", action="store_const", - dest="mode", const="advanced") - parser.add_option("--novice", action="store_const", - dest="mode", const="novice") + Set the usage string according to the rules described above for the ``usage`` + constructor keyword argument. Passing ``None`` sets the default usage + string; use :data:`optparse.SUPPRESS_USAGE` to suppress a usage message. + +.. method:: OptionParser.set_defaults(dest=value, ...) + + Set default values for several option destinations at once. Using + :meth:`set_defaults` is the preferred way to set default values for options, + since multiple options can share the same destination. For example, if + several "mode" options all set the same destination, any one of them can set + the default, and the last one wins:: + + parser.add_option("--advanced", action="store_const", + dest="mode", const="advanced", + default="novice") # overridden below + parser.add_option("--novice", action="store_const", + dest="mode", const="novice", + default="advanced") # overrides above setting + + To avoid this confusion, use :meth:`set_defaults`:: + + parser.set_defaults(mode="advanced") + parser.add_option("--advanced", action="store_const", + dest="mode", const="advanced") + parser.add_option("--novice", action="store_const", + dest="mode", const="novice") .. _optparse-option-callbacks: @@ -1378,7 +1415,7 @@ There are two steps to defining a callback option: -* define the option itself using the ``callback`` action +* define the option itself using the ``"callback"`` action * write the callback; this is a function (or method) that takes at least four arguments, as described below @@ -1390,8 +1427,8 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^ As always, the easiest way to define a callback option is by using the -``parser.add_option()`` method. Apart from :attr:`action`, the only option -attribute you must specify is ``callback``, the function to call:: +:meth:`OptionParser.add_option` method. Apart from :attr:`~Option.action`, the +only option attribute you must specify is ``callback``, the function to call:: parser.add_option("-c", action="callback", callback=my_callback) @@ -1405,8 +1442,9 @@ it's covered later in this section. :mod:`optparse` always passes four particular arguments to your callback, and it -will only pass additional arguments if you specify them via ``callback_args`` -and ``callback_kwargs``. Thus, the minimal callback function signature is:: +will only pass additional arguments if you specify them via +:attr:`~Option.callback_args` and :attr:`~Option.callback_kwargs`. Thus, the +minimal callback function signature is:: def my_callback(option, opt, value, parser): @@ -1415,21 +1453,22 @@ There are several other option attributes that you can supply when you define a callback option: -: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 - than storing the converted value(s) anywhere, though, :mod:`optparse` passes it - to your callback function. +:attr:`~Option.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:`~Option.type`. Rather than storing the converted value(s) anywhere, + though, :mod:`optparse` passes it to your callback function. -``nargs`` +:attr:`~Option.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`. - It then passes a tuple of converted values to your callback. + consume :attr:`~Option.nargs` arguments, each of which must be convertible to + :attr:`~Option.type`. It then passes a tuple of converted values to your + callback. -``callback_args`` +:attr:`~Option.callback_args` a tuple of extra positional arguments to pass to the callback -``callback_kwargs`` +:attr:`~Option.callback_kwargs` a dictionary of extra keyword arguments to pass to the callback @@ -1449,45 +1488,48 @@ ``opt_str`` is the option string seen on the command-line that's triggering the callback. - (If an abbreviated long option was used, ``opt_str`` will be the full, canonical - option string---e.g. if the user puts ``"--foo"`` on the command-line as an - abbreviation for ``"--foobar"``, then ``opt_str`` will be ``"--foobar"``.) + (If an abbreviated long option was used, ``opt_str`` will be the full, + canonical option string---e.g. if the user puts ``"--foo"`` on the + command-line as an abbreviation for ``"--foobar"``, then ``opt_str`` will be + ``"--foobar"``.) ``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 - ``None`` (no argument expected), then ``value`` will be ``None``. If ``nargs`` + only expect an argument if :attr:`~Option.type` is set; the type of ``value`` will be + the type implied by the option's type. If :attr:`~Option.type` for this option is + ``None`` (no argument expected), then ``value`` will be ``None``. If :attr:`~Option.nargs` > 1, ``value`` will be a tuple of values of the appropriate type. ``parser`` - is the OptionParser instance driving the whole thing, mainly useful because you - can access some other interesting data through its instance attributes: + is the OptionParser instance driving the whole thing, mainly useful because + you can access some other interesting data through its instance attributes: ``parser.largs`` - the current list of leftover arguments, ie. arguments that have been consumed - but are neither options nor option arguments. Feel free to modify - ``parser.largs``, e.g. by adding more arguments to it. (This list will become - ``args``, the second return value of :meth:`parse_args`.) + the current list of leftover arguments, ie. arguments that have been + consumed but are neither options nor option arguments. Feel free to modify + ``parser.largs``, e.g. by adding more arguments to it. (This list will + become ``args``, the second return value of :meth:`parse_args`.) ``parser.rargs`` - the current list of remaining arguments, ie. with ``opt_str`` and ``value`` (if - applicable) removed, and only the arguments following them still there. Feel - free to modify ``parser.rargs``, e.g. by consuming more arguments. + the current list of remaining arguments, ie. with ``opt_str`` and + ``value`` (if applicable) removed, and only the arguments following them + still there. Feel free to modify ``parser.rargs``, e.g. by consuming more + arguments. ``parser.values`` the object where option values are by default stored (an instance of - optparse.OptionValues). This lets callbacks use the same mechanism as the rest - of :mod:`optparse` for storing option values; you don't need to mess around with - globals or closures. You can also access or modify the value(s) of any options - already encountered on the command-line. + optparse.OptionValues). This lets callbacks use the same mechanism as the + rest of :mod:`optparse` for storing option values; you don't need to mess + around with globals or closures. You can also access or modify the + value(s) of any options already encountered on the command-line. ``args`` - is a tuple of arbitrary positional arguments supplied via the ``callback_args`` - option attribute. + is a tuple of arbitrary positional arguments supplied via the + :attr:`~Option.callback_args` option attribute. ``kwargs`` - is a dictionary of arbitrary keyword arguments supplied via ``callback_kwargs``. + is a dictionary of arbitrary keyword arguments supplied via + :attr:`~Option.callback_kwargs`. .. _optparse-raising-errors-in-callback: @@ -1495,11 +1537,11 @@ Raising errors in a callback ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The callback function should raise :exc:`OptionValueError` if there are any problems -with the option or its argument(s). :mod:`optparse` catches this and terminates -the program, printing the error message you supply to stderr. Your message -should be clear, concise, accurate, and mention the option at fault. Otherwise, -the user will have a hard time figuring out what he did wrong. +The callback function should raise :exc:`OptionValueError` if there are any +problems with the option or its argument(s). :mod:`optparse` catches this and +terminates the program, printing the error message you supply to stderr. Your +message should be clear, concise, accurate, and mention the option at fault. +Otherwise, the user will have a hard time figuring out what he did wrong. .. _optparse-callback-example-1: @@ -1515,7 +1557,7 @@ parser.add_option("--foo", action="callback", callback=record_foo_seen) -Of course, you could do that with the ``store_true`` action. +Of course, you could do that with the ``"store_true"`` action. .. _optparse-callback-example-2: @@ -1582,12 +1624,12 @@ 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 -that type; if you further define ``nargs``, then the option takes ``nargs`` -arguments. +is similar to defining a ``"store"`` or ``"append"`` option: if you define +:attr:`~Option.type`, then the option takes one argument that must be +convertible to that type; if you further define :attr:`~Option.nargs`, then the +option takes :attr:`~Option.nargs` arguments. -Here's an example that just emulates the standard ``store`` action:: +Here's an example that just emulates the standard ``"store"`` action:: def store_value(option, opt_str, value, parser): setattr(parser.values, option.dest, value) @@ -1674,32 +1716,36 @@ ^^^^^^^^^^^^^^^^ To add new types, you need to define your own subclass of :mod:`optparse`'s -Option class. This class has a couple of attributes that define -:mod:`optparse`'s types: :attr:`TYPES` and :attr:`TYPE_CHECKER`. +:class:`Option` class. This class has a couple of attributes that define +:mod:`optparse`'s types: :attr:`~Option.TYPES` and :attr:`~Option.TYPE_CHECKER`. + +.. attribute:: Option.TYPES + + A tuple of type names; in your subclass, simply define a new tuple + :attr:`TYPES` that builds on the standard one. + +.. attribute:: Option.TYPE_CHECKER -:attr:`TYPES` is a tuple of type names; in your subclass, simply define a new -tuple :attr:`TYPES` that builds on the standard one. + A dictionary mapping type names to type-checking functions. A type-checking + function has the following signature:: -:attr:`TYPE_CHECKER` is a dictionary mapping type names to type-checking -functions. A type-checking function has the following signature:: + def check_mytype(option, opt, value) - def check_mytype(option, opt, value) - -where ``option`` is an :class:`Option` instance, ``opt`` is an option string -(e.g., ``"-f"``), and ``value`` is the string from the command line that must be -checked and converted to your desired type. ``check_mytype()`` should return an -object of the hypothetical type ``mytype``. The value returned by a -type-checking function will wind up in the OptionValues instance returned by -:meth:`OptionParser.parse_args`, or be passed to a callback as the ``value`` -parameter. - -Your type-checking function should raise :exc:`OptionValueError` if it encounters any -problems. :exc:`OptionValueError` takes a single string argument, which is passed -as-is to :class:`OptionParser`'s :meth:`error` method, which in turn prepends the program -name and the string ``"error:"`` and prints everything to stderr before -terminating the process. + where ``option`` is an :class:`Option` instance, ``opt`` is an option string + (e.g., ``"-f"``), and ``value`` is the string from the command line that must + be checked and converted to your desired type. ``check_mytype()`` should + return an object of the hypothetical type ``mytype``. The value returned by + a type-checking function will wind up in the OptionValues instance returned + by :meth:`OptionParser.parse_args`, or be passed to a callback as the + ``value`` parameter. -Here's a silly example that demonstrates adding a ``complex`` option type to + Your type-checking function should raise :exc:`OptionValueError` if it + encounters any problems. :exc:`OptionValueError` takes a single string + argument, which is passed as-is to :class:`OptionParser`'s :meth:`error` + method, which in turn prepends the program name and the string ``"error:"`` + and prints everything to stderr before terminating the process. + +Here's a silly example that demonstrates adding a ``"complex"`` option type to parse Python-style complex numbers on the command line. (This is even sillier than it used to be, because :mod:`optparse` 1.3 added built-in support for complex numbers, but never mind.) @@ -1710,7 +1756,7 @@ from optparse import Option, OptionValueError You need to define your type-checker first, since it's referred to later (in the -:attr:`TYPE_CHECKER` class attribute of your Option subclass):: +:attr:`~Option.TYPE_CHECKER` class attribute of your Option subclass):: def check_complex(option, opt, value): try: @@ -1727,9 +1773,9 @@ TYPE_CHECKER["complex"] = check_complex (If we didn't make a :func:`copy` of :attr:`Option.TYPE_CHECKER`, we would end -up modifying the :attr:`TYPE_CHECKER` attribute of :mod:`optparse`'s Option -class. This being Python, nothing stops you from doing that except good manners -and common sense.) +up modifying the :attr:`~Option.TYPE_CHECKER` attribute of :mod:`optparse`'s +Option class. This being Python, nothing stops you from doing that except good +manners and common sense.) That's it! Now you can write a script that uses the new option type just like any other :mod:`optparse`\ -based script, except you have to instruct your @@ -1756,45 +1802,50 @@ "store" actions actions that result in :mod:`optparse` storing a value to an attribute of the - current OptionValues instance; these options require a :attr:`dest` attribute to - be supplied to the Option constructor + current OptionValues instance; these options require a :attr:`~Option.dest` + attribute to be supplied to the Option constructor. "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. - -These are overlapping sets: some default "store" actions are ``store``, -``store_const``, ``append``, and ``count``, while the default "typed" actions -are ``store``, ``append``, and ``callback``. + 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:`~Option.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 are ``"store"``, ``"append"``, and ``"callback"``. When you add an action, you need to categorize it by listing it in at least one of the following class attributes of Option (all are lists of strings): -:attr:`ACTIONS` - all actions must be listed in ACTIONS +.. attribute:: Option.ACTIONS + + All actions must be listed in ACTIONS. + +.. attribute:: Option.STORE_ACTIONS -:attr:`STORE_ACTIONS` - "store" actions are additionally listed here + "store" actions are additionally listed here. -:attr:`TYPED_ACTIONS` - "typed" actions are additionally listed here +.. attribute:: Option.TYPED_ACTIONS -``ALWAYS_TYPED_ACTIONS`` - actions that always take a type (i.e. whose options always take a value) are + "typed" actions are additionally listed here. + +.. attribute:: Option.ALWAYS_TYPED_ACTIONS + + Actions that always take a type (i.e. whose options always take a value) are additionally listed here. The only effect of this is that :mod:`optparse` - assigns the default type, ``string``, to options with no explicit type whose - action is listed in ``ALWAYS_TYPED_ACTIONS``. + assigns the default type, ``"string"``, to options with no explicit type + whose action is listed in :attr:`ALWAYS_TYPED_ACTIONS`. In order to actually implement your new action, you must override Option's :meth:`take_action` method and add a case that recognizes your action. -For example, let's add an ``extend`` action. This is similar to the standard -``append`` action, but instead of taking a single value from the command-line -and appending it to an existing list, ``extend`` will take multiple values in a -single comma-delimited string, and extend an existing list with them. That is, -if ``"--names"`` is an ``extend`` option of type ``string``, the command line -:: +For example, let's add an ``"extend"`` action. This is similar to the standard +``"append"`` action, but instead of taking a single value from the command-line +and appending it to an existing list, ``"extend"`` will take multiple values in +a single comma-delimited string, and extend an existing list with them. That +is, if ``"--names"`` is an ``"extend"`` option of type ``"string"``, the command +line :: --names=foo,bar --names blah --names ding,dong @@ -1821,29 +1872,30 @@ Features of note: -* ``extend`` both expects a value on the command-line and stores that value - somewhere, so it goes in both :attr:`STORE_ACTIONS` and :attr:`TYPED_ACTIONS` - -* to ensure that :mod:`optparse` assigns the default type of ``string`` to - ``extend`` actions, we put the ``extend`` action in ``ALWAYS_TYPED_ACTIONS`` as - well +* ``"extend"`` both expects a value on the command-line and stores that value + somewhere, so it goes in both :attr:`~Option.STORE_ACTIONS` and + :attr:`~Option.TYPED_ACTIONS`. + +* to ensure that :mod:`optparse` assigns the default type of ``"string"`` to + ``"extend"`` actions, we put the ``"extend"`` action in + :attr:`~Option.ALWAYS_TYPED_ACTIONS` as well. * :meth:`MyOption.take_action` implements just this one new action, and passes control back to :meth:`Option.take_action` for the standard :mod:`optparse` - actions + actions. -* ``values`` is an instance of the optparse_parser.Values class, which - provides the very useful :meth:`ensure_value` method. :meth:`ensure_value` is - essentially :func:`getattr` with a safety valve; it is called as :: +* ``values`` is an instance of the optparse_parser.Values class, which provides + the very useful :meth:`ensure_value` method. :meth:`ensure_value` is + essentially :func:`getattr` with a safety valve; it is called as :: values.ensure_value(attr, value) If the ``attr`` attribute of ``values`` doesn't exist or is None, then - ensure_value() first sets it to ``value``, and then returns 'value. This is very - handy for actions like ``extend``, ``append``, and ``count``, all of which - accumulate data in a variable and expect that variable to be of a certain type - (a list for the first two, an integer for the latter). Using + ensure_value() first sets it to ``value``, and then returns 'value. This is + very handy for actions like ``"extend"``, ``"append"``, and ``"count"``, all + of which accumulate data in a variable and expect that variable to be of a + certain type (a list for the first two, an integer for the latter). Using :meth:`ensure_value` means that scripts using your action don't have to worry - about setting a default value for the option destinations in question; they can - just leave the default as None and :meth:`ensure_value` will take care of + about setting a default value for the option destinations in question; they + can just leave the default as None and :meth:`ensure_value` will take care of getting it right when it's needed. From python-checkins at python.org Fri Sep 18 00:10:48 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 17 Sep 2009 22:10:48 -0000 Subject: [Python-checkins] r74888 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: r.david.murray Date: Fri Sep 18 00:10:48 2009 New Revision: 74888 Log: Maintainer additions from MAL. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 00:10:48 2009 @@ -67,7 +67,7 @@ cmath mark.dickinson cmd code -codecs +codecs lemburg, doerwalter codeop collections rhettinger colorsys @@ -90,7 +90,7 @@ doctest dummy_threading brett.cannon email barry -encodings +encodings lemburg, loewis errno exceptions fcntl @@ -125,7 +125,7 @@ keyword lib2to3 benjamin.peterson linecache -locale +locale loewis, lemburg logging vsajip macpath mailbox andrew.kuchling @@ -135,7 +135,7 @@ mimetypes mmap modulefinder theller, jvr -msilib +msilib loewis msvcrt multiprocessing jnoller netrc @@ -144,7 +144,7 @@ numbers operator optparse aronacher -os +os loewis ossaudiodev parser pdb @@ -167,7 +167,7 @@ queue quopri random rhettinger -re +re effbot (inactive) readline reprlib resource @@ -187,7 +187,7 @@ socketserver spwd sqlite3 -ssl +ssl janssen stat string stringprep @@ -198,7 +198,7 @@ symtable sys syslog -tabnanny +tabnanny tim_one tarfile lars.gustaebel telnetlib tempfile @@ -216,17 +216,17 @@ tty turtle gregorlingl types -unicodedata +unicodedata loewis, lemburg unittest michael.foord urllib uu uuid warnings wave -weakref +weakref fdrake webbrowser georg.brandl winreg -winsound +winsound effbot wsgiref pje xdrlib xml loewis @@ -262,23 +262,23 @@ bsd buildbots data formats mark.dickinson -database +database lemburg documentation georg.brandl GUI -i18n +i18n lemburg import machinery brett.cannon io pitrou, benjamin.peterson -locale +locale lemburg, loewis makefiles -mathematics mark.dickinson, eric.smith -memory management +mathematics mark.dickinson, eric.smith, lemburg +memory management tim_one, lemburg networking -packaging -release management +packaging tarek, lemburg +release management tarek, lemburg str.format eric.smith -time and dates +time and dates lemburg testing michael.foord threads -unicode +unicode lemburg windows ================== =========== From python-checkins at python.org Fri Sep 18 00:11:50 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 22:11:50 -0000 Subject: [Python-checkins] r74889 - in python/branches/py3k: Doc/library/optparse.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 00:11:49 2009 New Revision: 74889 Log: Merged revisions 74868,74877-74878 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74868 | georg.brandl | 2009-09-17 12:23:02 +0200 (Do, 17 Sep 2009) | 2 lines String values should be shown with quotes, to avoid confusion with constants. ........ r74877 | georg.brandl | 2009-09-17 18:26:06 +0200 (Do, 17 Sep 2009) | 1 line Remove duplicate doc of enable/disable_interspersed_args. ........ r74878 | georg.brandl | 2009-09-17 19:14:04 +0200 (Do, 17 Sep 2009) | 1 line Make the optparse doc style a bit more standard: use standard description units for attrs/methods/etc., and use the correct referencing roles. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/optparse.rst Modified: python/branches/py3k/Doc/library/optparse.rst ============================================================================== --- python/branches/py3k/Doc/library/optparse.rst (original) +++ python/branches/py3k/Doc/library/optparse.rst Fri Sep 18 00:11:49 2009 @@ -7,14 +7,14 @@ .. sectionauthor:: Greg Ward -``optparse`` is a more convenient, flexible, and powerful library for parsing -command-line options than the old :mod:`getopt` module. ``optparse`` uses a more declarative -style of command-line parsing: you create an instance of :class:`OptionParser`, -populate it with options, and parse the command line. ``optparse`` allows users -to specify options in the conventional GNU/POSIX syntax, and additionally -generates usage and help messages for you. +:mod:`optparse` is a more convenient, flexible, and powerful library for parsing +command-line options than the old :mod:`getopt` module. :mod:`optparse` uses a +more declarative style of command-line parsing: you create an instance of +:class:`OptionParser`, populate it with options, and parse the command +line. :mod:`optparse` allows users to specify options in the conventional +GNU/POSIX syntax, and additionally generates usage and help messages for you. -Here's an example of using ``optparse`` in a simple script:: +Here's an example of using :mod:`optparse` in a simple script:: from optparse import OptionParser [...] @@ -32,11 +32,11 @@ --file=outfile -q -As it parses the command line, ``optparse`` sets attributes of the ``options`` -object returned by :meth:`parse_args` based on user-supplied command-line -values. When :meth:`parse_args` returns from parsing this command line, -``options.filename`` will be ``"outfile"`` and ``options.verbose`` will be -``False``. ``optparse`` supports both long and short options, allows short +As it parses the command line, :mod:`optparse` sets attributes of the +``options`` object returned by :meth:`parse_args` based on user-supplied +command-line values. When :meth:`parse_args` returns from parsing this command +line, ``options.filename`` will be ``"outfile"`` and ``options.verbose`` will be +``False``. :mod:`optparse` supports both long and short options, allows short options to be merged together, and allows options to be associated with their arguments in a variety of ways. Thus, the following command lines are all equivalent to the above example:: @@ -51,7 +51,7 @@ -h --help -and ``optparse`` will print out a brief summary of your script's options:: +and :mod:`optparse` will print out a brief summary of your script's options:: usage: [options] @@ -82,10 +82,10 @@ ^^^^^^^^^^^ argument - a string entered on the command-line, and passed by the shell to ``execl()`` or - ``execv()``. In Python, arguments are elements of ``sys.argv[1:]`` - (``sys.argv[0]`` is the name of the program being executed). Unix shells also - use the term "word". + a string entered on the command-line, and passed by the shell to ``execl()`` + or ``execv()``. In Python, arguments are elements of ``sys.argv[1:]`` + (``sys.argv[0]`` is the name of the program being executed). Unix shells + also use the term "word". It is occasionally desirable to substitute an argument list other than ``sys.argv[1:]``, so you should read "argument" as "an element of @@ -93,14 +93,14 @@ ``sys.argv[1:]``". option - an argument used to supply extra information to guide or customize the execution - of a program. There are many different syntaxes for options; the traditional - Unix syntax is a hyphen ("-") followed by a single letter, e.g. ``"-x"`` or - ``"-F"``. Also, traditional Unix syntax allows multiple options to be merged - into a single argument, e.g. ``"-x -F"`` is equivalent to ``"-xF"``. The GNU - project introduced ``"--"`` followed by a series of hyphen-separated words, e.g. - ``"--file"`` or ``"--dry-run"``. These are the only two option syntaxes - provided by :mod:`optparse`. + an argument used to supply extra information to guide or customize the + execution of a program. There are many different syntaxes for options; the + traditional Unix syntax is a hyphen ("-") followed by a single letter, + e.g. ``"-x"`` or ``"-F"``. Also, traditional Unix syntax allows multiple + options to be merged into a single argument, e.g. ``"-x -F"`` is equivalent + to ``"-xF"``. The GNU project introduced ``"--"`` followed by a series of + hyphen-separated words, e.g. ``"--file"`` or ``"--dry-run"``. These are the + only two option syntaxes provided by :mod:`optparse`. Some other option syntaxes that the world has seen include: @@ -117,15 +117,16 @@ * a slash followed by a letter, or a few letters, or a word, e.g. ``"/f"``, ``"/file"`` - These option syntaxes are not supported by :mod:`optparse`, and they never will - be. This is deliberate: the first three are non-standard on any environment, - and the last only makes sense if you're exclusively targeting VMS, MS-DOS, - and/or Windows. + These option syntaxes are not supported by :mod:`optparse`, and they never + will be. This is deliberate: the first three are non-standard on any + environment, and the last only makes sense if you're exclusively targeting + VMS, MS-DOS, and/or Windows. option argument - an argument that follows an option, is closely associated with that option, and - is consumed from the argument list when that option is. With :mod:`optparse`, - option arguments may either be in a separate argument from their option:: + an argument that follows an option, is closely associated with that option, + and is consumed from the argument list when that option is. With + :mod:`optparse`, option arguments may either be in a separate argument from + their option:: -f foo --file foo @@ -135,25 +136,26 @@ -ffoo --file=foo - Typically, a given option either takes an argument or it doesn't. Lots of people - want an "optional option arguments" feature, meaning that some options will take - an argument if they see it, and won't if they don't. This is somewhat - controversial, because it makes parsing ambiguous: if ``"-a"`` takes an optional - argument and ``"-b"`` is another option entirely, how do we interpret ``"-ab"``? - Because of this ambiguity, :mod:`optparse` does not support this feature. + Typically, a given option either takes an argument or it doesn't. Lots of + people want an "optional option arguments" feature, meaning that some options + will take an argument if they see it, and won't if they don't. This is + somewhat controversial, because it makes parsing ambiguous: if ``"-a"`` takes + an optional argument and ``"-b"`` is another option entirely, how do we + interpret ``"-ab"``? Because of this ambiguity, :mod:`optparse` does not + support this feature. positional argument something leftover in the argument list after options have been parsed, i.e. - after options and their arguments have been parsed and removed from the argument - list. + after options and their arguments have been parsed and removed from the + argument list. required option an option that must be supplied on the command-line; note that the phrase "required option" is self-contradictory in English. :mod:`optparse` doesn't - prevent you from implementing required options, but doesn't give you much help - at it either. See ``examples/required_1.py`` and ``examples/required_2.py`` in - the :mod:`optparse` source distribution for two ways to implement required - options with :mod:`optparse`. + prevent you from implementing required options, but doesn't give you much + help at it either. See ``examples/required_1.py`` and + ``examples/required_2.py`` in the :mod:`optparse` source distribution for two + ways to implement required options with :mod:`optparse`. For example, consider this hypothetical command-line:: @@ -282,8 +284,9 @@ * ``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 -these, :attr:`action` is the most fundamental. +:attr:`~Option.action`, :attr:`~Option.type`, :attr:`~Option.dest` +(destination), and :attr:`~Option.help`. Of these, :attr:`~Option.action` is the +most fundamental. .. _optparse-understanding-option-actions: @@ -294,9 +297,9 @@ Actions tell :mod:`optparse` what to do when it encounters an option on the command line. There is a fixed set of actions hard-coded into :mod:`optparse`; adding new actions is an advanced topic covered in section -:ref:`optparse-extending-optparse`. Most actions tell -:mod:`optparse` to store a value in some variable---for example, take a string -from the command line and store it in an attribute of ``options``. +:ref:`optparse-extending-optparse`. Most actions tell :mod:`optparse` to store +a value in some variable---for example, take a string from the command line and +store it in an attribute of ``options``. If you don't specify an option action, :mod:`optparse` defaults to ``store``. @@ -334,7 +337,7 @@ Let's parse another fake command-line. This time, we'll jam the option argument right up against the option: since ``"-n42"`` (one argument) is equivalent to -``"-n 42"`` (two arguments), the code :: +``"-n 42"`` (two arguments), the code :: (options, args) = parser.parse_args(["-n42"]) print(options.num) @@ -386,16 +389,16 @@ Some other actions supported by :mod:`optparse` are: -``store_const`` +``"store_const"`` store a constant value -``append`` +``"append"`` append this option's argument to a list -``count`` +``"count"`` increment a counter by one -``callback`` +``"callback"`` call a specified function These are covered in section :ref:`optparse-reference-guide`, Reference Guide @@ -454,8 +457,8 @@ :mod:`optparse`'s ability to generate help and usage text automatically is useful for creating user-friendly command-line interfaces. All you have to do -is supply a :attr:`help` value for each option, and optionally a short usage -message for your whole program. Here's an OptionParser populated with +is supply a :attr:`~Option.help` value for each option, and optionally a short +usage message for your whole program. Here's an OptionParser populated with user-friendly (documented) options:: usage = "usage: %prog [options] arg1 arg2" @@ -499,12 +502,12 @@ usage = "usage: %prog [options] arg1 arg2" :mod:`optparse` expands ``"%prog"`` in the usage string to the name of the - current program, i.e. ``os.path.basename(sys.argv[0])``. The expanded string is - then printed before the detailed option help. + current program, i.e. ``os.path.basename(sys.argv[0])``. The expanded string + is then printed before the detailed option help. If you don't supply a usage string, :mod:`optparse` uses a bland but sensible - default: ``"usage: %prog [options]"``, which is fine if your script doesn't take - any positional arguments. + default: ``"usage: %prog [options]"``, which is fine if your script doesn't + take any positional arguments. * every option defines a help string, and doesn't worry about line-wrapping--- :mod:`optparse` takes care of wrapping lines and making the help output look @@ -518,29 +521,29 @@ Here, "MODE" is called the meta-variable: it stands for the argument that the user is expected to supply to :option:`-m`/:option:`--mode`. By default, :mod:`optparse` converts the destination variable name to uppercase and uses - that for the meta-variable. Sometimes, that's not what you want---for example, - the :option:`--filename` option explicitly sets ``metavar="FILE"``, resulting in - this automatically-generated option description:: + that for the meta-variable. Sometimes, that's not what you want---for + example, the :option:`--filename` option explicitly sets ``metavar="FILE"``, + resulting in this automatically-generated option description:: -f FILE, --filename=FILE - This is important for more than just saving space, though: the manually written - help text uses the meta-variable "FILE" to clue the user in that there's a - connection between the semi-formal syntax "-f FILE" and the informal semantic - description "write output to FILE". This is a simple but effective way to make - your help text a lot clearer and more useful for end users. + This is important for more than just saving space, though: the manually + written help text uses the meta-variable "FILE" to clue the user in that + there's a connection between the semi-formal syntax "-f FILE" and the informal + semantic description "write output to FILE". This is a simple but effective + way to make your help text a lot clearer and more useful for end users. * options that have a default value can include ``%default`` in the help string---\ :mod:`optparse` will replace it with :func:`str` of the option's default value. If an option has no default value (or the default value is ``None``), ``%default`` expands to ``none``. -When dealing with many options, it is convenient to group these -options for better help output. An :class:`OptionParser` can contain -several option groups, each of which can contain several options. +When dealing with many options, it is convenient to group these options for +better help output. An :class:`OptionParser` can contain several option groups, +each of which can contain several options. -Continuing with the parser defined above, adding an -:class:`OptionGroup` to a parser is easy:: +Continuing with the parser defined above, adding an :class:`OptionGroup` to a +parser is easy:: group = OptionGroup(parser, "Dangerous Options", "Caution: use these options at your own risk. " @@ -595,17 +598,17 @@ There are two broad classes of errors that :mod:`optparse` has to worry about: programmer errors and user errors. Programmer errors are usually erroneous -calls to ``parser.add_option()``, e.g. invalid option strings, unknown option -attributes, missing option attributes, etc. These are dealt with in the usual -way: raise an exception (either ``optparse.OptionError`` or :exc:`TypeError`) and -let the program crash. +calls to :func:`OptionParser.add_option`, e.g. invalid option strings, unknown +option attributes, missing option attributes, etc. These are dealt with in the +usual way: raise an exception (either :exc:`optparse.OptionError` or +:exc:`TypeError`) and let the program crash. Handling user errors is much more important, since they are guaranteed to happen no matter how stable your code is. :mod:`optparse` can automatically detect some user errors, such as bad option arguments (passing ``"-n 4x"`` where :option:`-n` takes an integer argument), missing arguments (``"-n"`` at the end of the command line, where :option:`-n` takes an argument of any type). Also, -you can call ``parser.error()`` to signal an application-defined error +you can call :func:`OptionParser.error` to signal an application-defined error condition:: (options, args) = parser.parse_args() @@ -634,7 +637,7 @@ :mod:`optparse`\ -generated error messages take care always to mention the option involved in the error; be sure to do the same when calling -``parser.error()`` from your application code. +:func:`OptionParser.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:`~OptionParser.exit` @@ -682,49 +685,51 @@ Creating the parser ^^^^^^^^^^^^^^^^^^^ -The first step in using :mod:`optparse` is to create an OptionParser instance:: +The first step in using :mod:`optparse` is to create an OptionParser instance. - parser = OptionParser(...) +.. class:: OptionParser(...) -The OptionParser constructor has no required arguments, but a number of optional -keyword arguments. You should always pass them as keyword arguments, i.e. do -not rely on the order in which the arguments are declared. + The OptionParser constructor has no required arguments, but a number of + optional keyword arguments. You should always pass them as keyword + arguments, i.e. do not rely on the order in which the arguments are declared. ``usage`` (default: ``"%prog [options]"``) - The usage summary to print when your program is run incorrectly or with a help - option. When :mod:`optparse` prints the usage string, it expands ``%prog`` to - ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed that keyword - argument). To suppress a usage message, pass the special value - ``optparse.SUPPRESS_USAGE``. + The usage summary to print when your program is run incorrectly or with a + help option. When :mod:`optparse` prints the usage string, it expands + ``%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you + passed that keyword argument). To suppress a usage message, pass the + special value :data:`optparse.SUPPRESS_USAGE`. ``option_list`` (default: ``[]``) A list of Option objects to populate the parser with. The options in - ``option_list`` are added after any options in ``standard_option_list`` (a class - attribute that may be set by OptionParser subclasses), but before any version or - help options. Deprecated; use :meth:`add_option` after creating the parser - instead. + ``option_list`` are added after any options in ``standard_option_list`` (a + class attribute that may be set by OptionParser subclasses), but before + any version or help options. Deprecated; use :meth:`add_option` after + creating the parser instead. ``option_class`` (default: optparse.Option) Class to use when adding options to the parser in :meth:`add_option`. ``version`` (default: ``None``) - A version string to print when the user supplies a version option. If you supply - a true value for ``version``, :mod:`optparse` automatically adds a version - option with the single option string ``"--version"``. The substring ``"%prog"`` - is expanded the same as for ``usage``. + A version string to print when the user supplies a version option. If you + supply a true value for ``version``, :mod:`optparse` automatically adds a + version option with the single option string ``"--version"``. The + substring ``"%prog"`` is expanded the same as for ``usage``. ``conflict_handler`` (default: ``"error"``) - Specifies what to do when options with conflicting option strings are added to - the parser; see section :ref:`optparse-conflicts-between-options`. + Specifies what to do when options with conflicting option strings are + added to the parser; see section + :ref:`optparse-conflicts-between-options`. ``description`` (default: ``None``) - A paragraph of text giving a brief overview of your program. :mod:`optparse` - reformats this paragraph to fit the current terminal width and prints it when - the user requests help (after ``usage``, but before the list of options). - - ``formatter`` (default: a new IndentedHelpFormatter) - An instance of optparse.HelpFormatter that will be used for printing help text. - :mod:`optparse` provides two concrete classes for this purpose: + A paragraph of text giving a brief overview of your program. + :mod:`optparse` reformats this paragraph to fit the current terminal width + and prints it when the user requests help (after ``usage``, but before the + list of options). + + ``formatter`` (default: a new :class:`IndentedHelpFormatter`) + An instance of optparse.HelpFormatter that will be used for printing help + text. :mod:`optparse` provides two concrete classes for this purpose: IndentedHelpFormatter and TitledHelpFormatter. ``add_help_option`` (default: ``True``) @@ -743,14 +748,14 @@ ^^^^^^^^^^^^^^^^^^^^^ There are several ways to populate the parser with options. The preferred way -is by using ``OptionParser.add_option()``, as shown in section +is by using :meth:`OptionParser.add_option`, as shown in section :ref:`optparse-tutorial`. :meth:`add_option` can be called in one of two ways: * pass it an Option instance (as returned by :func:`make_option`) * pass it any combination of positional and keyword arguments that are - acceptable to :func:`make_option` (i.e., to the Option constructor), and it will - create the Option instance for you + acceptable to :func:`make_option` (i.e., to the Option constructor), and it + will create the Option instance for you The other alternative is to pass a list of pre-constructed Option instances to the OptionParser constructor, as in:: @@ -778,66 +783,67 @@ e.g. :option:`-f` and :option:`--file`. You can specify any number of short or long option strings, but you must specify at least one overall option string. -The canonical way to create an Option instance is with the :meth:`add_option` -method of :class:`OptionParser`:: +The canonical way to create an :class:`Option` instance is with the +:meth:`add_option` method of :class:`OptionParser`. - parser.add_option(opt_str[, ...], attr=value, ...) +.. method:: OptionParser.add_option(opt_str[, ...], attr=value, ...) -To define an option with only a short option string:: + To define an option with only a short option string:: - parser.add_option("-f", attr=value, ...) + parser.add_option("-f", attr=value, ...) -And to define an option with only a long option string:: + And to define an option with only a long option string:: - parser.add_option("--foo", attr=value, ...) + parser.add_option("--foo", attr=value, ...) -The keyword arguments define attributes of the new Option object. The most -important option attribute is :attr:`action`, and it largely determines which -other attributes are relevant or required. If you pass irrelevant option -attributes, or fail to pass required ones, :mod:`optparse` raises an -:exc:`OptionError` exception explaining your mistake. + The keyword arguments define attributes of the new Option object. The most + important option attribute is :attr:`~Option.action`, and it largely + determines which other attributes are relevant or required. If you pass + irrelevant option attributes, or fail to pass required ones, :mod:`optparse` + raises an :exc:`OptionError` exception explaining your mistake. -An option's *action* determines what :mod:`optparse` does when it encounters -this option on the command-line. The standard option actions hard-coded into -:mod:`optparse` are: + An option's *action* determines what :mod:`optparse` does when it encounters + this option on the command-line. The standard option actions hard-coded into + :mod:`optparse` are: -``store`` - store this option's argument (default) + ``"store"`` + store this option's argument (default) -``store_const`` - store a constant value + ``"store_const"`` + store a constant value -``store_true`` - store a true value + ``"store_true"`` + store a true value -``store_false`` - store a false value + ``"store_false"`` + store a false value -``append`` - append this option's argument to a list + ``"append"`` + append this option's argument to a list -``append_const`` - append a constant value to a list + ``"append_const"`` + append a constant value to a list -``count`` - increment a counter by one + ``"count"`` + increment a counter by one -``callback`` - call a specified function + ``"callback"`` + call a specified function -:attr:`help` - print a usage message including all options and the documentation for them + ``"help"`` + 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.) + (If you don't supply an action, the default is ``"store"``. For this action, + you may also supply :attr:`~Option.type` and :attr:`~Option.dest` option + attributes; see :ref:`optparse-standard-option-actions`.) As you can see, most actions involve storing or updating a value somewhere. :mod:`optparse` always creates a special object for this, conventionally called -``options`` (it happens to be an instance of ``optparse.Values``). Option +``options`` (it happens to be an instance of :class:`optparse.Values`). Option arguments (and various other values) are stored as attributes of this object, -according to the :attr:`dest` (destination) option attribute. +according to the :attr:`~Option.dest` (destination) option attribute. -For example, when you call :: +For example, when you call :: parser.parse_args() @@ -845,7 +851,7 @@ options = Values() -If one of the options in this parser is defined with :: +If one of the options in this parser is defined with :: parser.add_option("-f", "--file", action="store", type="string", dest="filename") @@ -856,13 +862,97 @@ --file=foo --file foo -then :mod:`optparse`, on seeing this option, will do the equivalent of :: +then :mod:`optparse`, on seeing this option, will do the equivalent of :: options.filename = "foo" -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. +The :attr:`~Option.type` and :attr:`~Option.dest` option attributes are almost +as important as :attr:`~Option.action`, but :attr:`~Option.action` is the only +one that makes sense for *all* options. + + +.. _optparse-option-attributes: + +Option attributes +^^^^^^^^^^^^^^^^^ + +The following option attributes may be passed as keyword arguments to +:meth:`OptionParser.add_option`. If you pass an option attribute that is not +relevant to a particular option, or fail to pass a required option attribute, +:mod:`optparse` raises :exc:`OptionError`. + +.. attribute:: Option.action + + (default: ``"store"``) + + Determines :mod:`optparse`'s behaviour when this option is seen on the + command line; the available options are documented :ref:`here + `. + +.. attribute:: Option.type + + (default: ``"string"``) + + The argument type expected by this option (e.g., ``"string"`` or ``"int"``); + the available option types are documented :ref:`here + `. + +.. attribute:: Option.dest + + (default: derived from option strings) + + If the option's action implies writing or modifying a value somewhere, this + tells :mod:`optparse` where to write it: :attr:`~Option.dest` names an + attribute of the ``options`` object that :mod:`optparse` builds as it parses + the command line. + +.. attribute:: Option.default + + The value to use for this option's destination if the option is not seen on + the command line. See also :meth:`OptionParser.set_defaults`. + +.. attribute:: Option.nargs + + (default: 1) + + How many arguments of type :attr:`~Option.type` should be consumed when this + option is seen. If > 1, :mod:`optparse` will store a tuple of values to + :attr:`~Option.dest`. + +.. attribute:: Option.const + + For actions that store a constant value, the constant value to store. + +.. attribute:: Option.choices + + For options of type ``"choice"``, the list of strings the user may choose + from. + +.. attribute:: Option.callback + + For options with action ``"callback"``, the callable to call when this option + is seen. See section :ref:`optparse-option-callbacks` for detail on the + arguments passed to the callable. + +.. attribute:: Option.callback_args + Option.callback_kwargs + + Additional positional and keyword arguments to pass to ``callback`` after the + four standard callback arguments. + +.. attribute:: Option.help + + Help text to print for this option when listing all available options after + the user supplies a :attr:`~Option.help` option (such as ``"--help"``). If + no help text is supplied, the option will be listed without help text. To + hide this option, use the special value :data:`optparse.SUPPRESS_HELP`. + +.. attribute:: Option.metavar + + (default: derived from option strings) + + Stand-in for the option argument(s) to use when printing help text. See + section :ref:`optparse-tutorial` for an example. .. _optparse-standard-option-actions: @@ -875,42 +965,45 @@ 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:`~Option.type`, :attr:`~Option.dest`, + :attr:`~Option.nargs`, :attr:`~Option.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, - 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 - "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:`dest` is not supplied, :mod:`optparse` derives a destination from the - first long option string (e.g., ``"--foo-bar"`` implies ``foo_bar``). If there - are no long option strings, :mod:`optparse` derives a destination from the first - short option string (e.g., ``"-f"`` implies ``f``). + according to :attr:`~Option.type` and stored in :attr:`~Option.dest`. If + :attr:`~Option.nargs` > 1, multiple arguments will be consumed from the + command line; all will be converted according to :attr:`~Option.type` and + stored to :attr:`~Option.dest` as a tuple. See the + :ref:`optparse-standard-option-types` section. + + If :attr:`~Option.choices` is supplied (a list or tuple of strings), the type + defaults to ``"choice"``. + + If :attr:`~Option.type` is not supplied, it defaults to ``"string"``. + + If :attr:`~Option.dest` is not supplied, :mod:`optparse` derives a destination + from the first long option string (e.g., ``"--foo-bar"`` implies + ``foo_bar``). If there are no long option strings, :mod:`optparse` derives a + destination from the first short option string (e.g., ``"-f"`` implies ``f``). Example:: parser.add_option("-f") parser.add_option("-p", type="float", nargs=3, dest="point") - As it parses the command line :: + As it parses the command line :: -f foo.txt -p 1 -3.5 4 -fbar.txt - :mod:`optparse` will set :: + :mod:`optparse` will set :: options.f = "foo.txt" options.point = (1.0, -3.5, 4.0) options.f = "bar.txt" -* ``store_const`` [required: ``const``; relevant: :attr:`dest`] +* ``"store_const"`` [required: :attr:`~Option.const`; relevant: + :attr:`~Option.dest`] - The value ``const`` is stored in :attr:`dest`. + The value :attr:`~Option.const` is stored in :attr:`~Option.dest`. Example:: @@ -925,29 +1018,32 @@ options.verbose = 2 -* ``store_true`` [relevant: :attr:`dest`] +* ``"store_true"`` [relevant: :attr:`~Option.dest`] - A special case of ``store_const`` that stores a true value to :attr:`dest`. + A special case of ``"store_const"`` that stores a true value to + :attr:`~Option.dest`. -* ``store_false`` [relevant: :attr:`dest`] +* ``"store_false"`` [relevant: :attr:`~Option.dest`] - Like ``store_true``, but stores a false value. + Like ``"store_true"``, but stores a false value. Example:: 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:`~Option.type`, :attr:`~Option.dest`, + :attr:`~Option.nargs`, :attr:`~Option.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 - is automatically created when :mod:`optparse` first encounters this option on - the command-line. If ``nargs`` > 1, multiple arguments are consumed, and a - tuple of length ``nargs`` is appended to :attr:`dest`. + :attr:`~Option.dest`. If no default value for :attr:`~Option.dest` is + supplied, an empty list is automatically created when :mod:`optparse` first + encounters this option on the command-line. If :attr:`~Option.nargs` > 1, + multiple arguments are consumed, and a tuple of length :attr:`~Option.nargs` + is appended to :attr:`~Option.dest`. - The defaults for :attr:`!type` and :attr:`dest` are the same as for the ``store`` - action. + The defaults for :attr:`~Option.type` and :attr:`~Option.dest` are the same as + for the ``"store"`` action. Example:: @@ -963,16 +1059,19 @@ options.tracks.append(int("4")) -* ``append_const`` [required: ``const``; relevant: :attr:`dest`] +* ``"append_const"`` [required: :attr:`~Option.const`; relevant: + :attr:`~Option.dest`] - Like ``store_const``, but the value ``const`` is appended to :attr:`dest`; as - with ``append``, :attr:`dest` defaults to ``None``, and an empty list is - automatically created the first time the option is encountered. - -* ``count`` [relevant: :attr:`dest`] - - Increment the integer stored at :attr:`dest`. If no default value is supplied, - :attr:`dest` is set to zero before being incremented the first time. + Like ``"store_const"``, but the value :attr:`~Option.const` is appended to + :attr:`~Option.dest`; as with ``"append"``, :attr:`~Option.dest` defaults to + ``None``, and an empty list is automatically created the first time the option + is encountered. + +* ``"count"`` [relevant: :attr:`~Option.dest`] + + Increment the integer stored at :attr:`~Option.dest`. If no default value is + supplied, :attr:`~Option.dest` is set to zero before being incremented the + first time. Example:: @@ -988,27 +1087,29 @@ options.verbosity += 1 -* ``callback`` [required: ``callback``; relevant: :attr:`!type`, ``nargs``, - ``callback_args``, ``callback_kwargs``] +* ``"callback"`` [required: :attr:`~Option.callback`; relevant: + :attr:`~Option.type`, :attr:`~Option.nargs`, :attr:`~Option.callback_args`, + :attr:`~Option.callback_kwargs`] - Call the function specified by ``callback``, which is called as :: + Call the function specified by :attr:`~Option.callback`, which is called as :: func(option, opt_str, value, parser, *args, **kwargs) See section :ref:`optparse-option-callbacks` for more detail. -* :attr:`help` +* ``"help"`` - Prints a complete help message for all the options in the current option parser. - The help message is constructed from the ``usage`` string passed to - OptionParser's constructor and the :attr:`help` string passed to every option. - - If no :attr:`help` string is supplied for an option, it will still be listed in - the help message. To omit an option entirely, use the special value - ``optparse.SUPPRESS_HELP``. + Prints a complete help message for all the options in the current option + parser. The help message is constructed from the ``usage`` string passed to + OptionParser's constructor and the :attr:`~Option.help` string passed to every + option. + + If no :attr:`~Option.help` string is supplied for an option, it will still be + listed in the help message. To omit an option entirely, use the special value + :data:`optparse.SUPPRESS_HELP`. - :mod:`optparse` automatically adds a :attr:`help` option to all OptionParsers, - so you do not normally need to create one. + :mod:`optparse` automatically adds a :attr:`~Option.help` option to all + OptionParsers, so you do not normally need to create one. Example:: @@ -1025,8 +1126,8 @@ help="Input file to read data from") parser.add_option("--secret", help=SUPPRESS_HELP) - If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, it - will print something like the following help message to stdout (assuming + If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, + it will print something like the following help message to stdout (assuming ``sys.argv[0]`` is ``"foo.py"``):: usage: foo.py [options] @@ -1039,82 +1140,14 @@ After printing the help message, :mod:`optparse` terminates your process with ``sys.exit(0)``. -* ``version`` - - Prints the version number supplied to the OptionParser to stdout and exits. The - version number is actually formatted and printed by the ``print_version()`` - method of OptionParser. Generally only relevant if the ``version`` argument is - supplied to the OptionParser constructor. As with :attr:`help` options, you - will rarely create ``version`` options, since :mod:`optparse` automatically adds - them when needed. - - -.. _optparse-option-attributes: - -Option attributes -^^^^^^^^^^^^^^^^^ - -The following option attributes may be passed as keyword arguments to -``parser.add_option()``. If you pass an option attribute that is not relevant -to a particular option, or fail to pass a required option attribute, -:mod:`optparse` raises :exc:`OptionError`. - -* :attr:`action` (default: ``"store"``) +* ``"version"`` - Determines :mod:`optparse`'s behaviour when this option is seen on the command - line; the available options are documented above. - -* :attr:`!type` (default: ``"string"``) - - The argument type expected by this option (e.g., ``"string"`` or ``"int"``); the - available option types are documented below. - -* :attr:`dest` (default: derived from option strings) - - If the option's action implies writing or modifying a value somewhere, this - tells :mod:`optparse` where to write it: :attr:`dest` names an attribute of the - ``options`` object that :mod:`optparse` builds as it parses the command line. - -* ``default`` - - The value to use for this option's destination if the option is not seen on the - command line. See also ``parser.set_defaults()``. - -* ``nargs`` (default: 1) - - 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`` - - For actions that store a constant value, the constant value to store. - -* ``choices`` - - For options of type ``"choice"``, the list of strings the user may choose from. - -* ``callback`` - - For options with action ``"callback"``, the callable to call when this option - is seen. See section :ref:`optparse-option-callbacks` for detail on the - arguments passed to ``callable``. - -* ``callback_args``, ``callback_kwargs`` - - Additional positional and keyword arguments to pass to ``callback`` after the - four standard callback arguments. - -* :attr:`help` - - Help text to print for this option when listing all available options after the - user supplies a :attr:`help` option (such as ``"--help"``). If no help text is - supplied, the option will be listed without help text. To hide this option, use - the special value ``SUPPRESS_HELP``. - -* ``metavar`` (default: derived from option strings) - - Stand-in for the option argument(s) to use when printing help text. See section - :ref:`optparse-tutorial` for an example. + Prints the version number supplied to the OptionParser to stdout and exits. + The version number is actually formatted and printed by the + ``print_version()`` method of OptionParser. Generally only relevant if the + ``version`` argument is supplied to the OptionParser constructor. As with + :attr:`~Option.help` options, you will rarely create ``version`` options, + since :mod:`optparse` automatically adds them when needed. .. _optparse-standard-option-types: @@ -1122,14 +1155,14 @@ Standard option types ^^^^^^^^^^^^^^^^^^^^^ -:mod:`optparse` has five built-in option types: ``string``, ``int``, -``choice``, ``float`` and ``complex``. If you need to add new option types, see -section :ref:`optparse-extending-optparse`. +:mod:`optparse` has five built-in option types: ``"string"``, ``"int"``, +``"choice"``, ``"float"`` and ``"complex"``. If you need to add new +option types, see section :ref:`optparse-extending-optparse`. Arguments to string options are not checked or converted in any way: the text on the command line is stored in the destination (or passed to the callback) as-is. -Integer arguments (type ``int``) are parsed as follows: +Integer arguments (type ``"int"``) are parsed as follows: * if the number starts with ``0x``, it is parsed as a hexadecimal number @@ -1140,17 +1173,18 @@ * otherwise, the number is parsed as a decimal number -The conversion is done by calling ``int()`` with the appropriate base (2, 8, 10, -or 16). If this fails, so will :mod:`optparse`, although with a more useful +The conversion is done by calling :func:`int` with the appropriate base (2, 8, +10, or 16). If this fails, so will :mod:`optparse`, although with a more useful error message. -``float`` and ``complex`` option arguments are converted directly with -``float()`` and ``complex()``, with similar error-handling. +``"float"`` and ``"complex"`` option arguments are converted directly with +:func:`float` and :func:`complex`, with similar error-handling. -``choice`` options are a subtype of ``string`` options. The ``choices`` option -attribute (a sequence of strings) defines the set of allowed option arguments. -``optparse.check_choice()`` compares user-supplied option arguments against this -master list and raises :exc:`OptionValueError` if an invalid string is given. +``"choice"`` options are a subtype of ``"string"`` options. The +:attr:`~Option.choices`` option attribute (a sequence of strings) defines the +set of allowed option arguments. :func:`optparse.check_choice` compares +user-supplied option arguments against this master list and raises +:exc:`OptionValueError` if an invalid string is given. .. _optparse-parsing-arguments: @@ -1182,7 +1216,7 @@ the leftover positional arguments after all options have been processed The most common usage is to supply neither keyword argument. If you supply -``values``, it will be modified with repeated ``setattr()`` calls (roughly one +``values``, it will be modified with repeated :func:`setattr` calls (roughly one for every option argument stored to an option destination) and returned by :meth:`parse_args`. @@ -1197,37 +1231,51 @@ Querying and manipulating your option parser ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The default behavior of the option parser can be customized slightly, -and you can also poke around your option parser and see what's there. -OptionParser provides several methods to help you out: - -``disable_interspersed_args()`` - Set parsing to stop on the first non-option. Use this if you have a - command processor which runs another command which has options of - its own and you want to make sure these options don't get - confused. For example, each command might have a different - set of options. - -``enable_interspersed_args()`` - Set parsing to not stop on the first non-option, allowing - interspersing switches with command arguments. For example, - ``"-s arg1 --long arg2"`` would return ``["arg1", "arg2"]`` - as the command arguments and ``-s, --long`` as options. - This is the default behavior. +The default behavior of the option parser can be customized slightly, and you +can also poke around your option parser and see what's there. OptionParser +provides several methods to help you out: + +.. method:: OptionParser.disable_interspersed_args() + + Set parsing to stop on the first non-option. For example, if ``"-a"`` and + ``"-b"`` are both simple options that take no arguments, :mod:`optparse` + normally accepts this syntax:: + + prog -a arg1 -b arg2 + + and treats it as equivalent to :: + + prog -a -b arg1 arg2 + + To disable this feature, call :meth:`disable_interspersed_args`. This + restores traditional Unix syntax, where option parsing stops with the first + non-option argument. -``get_option(opt_str)`` - Returns the Option instance with the option string ``opt_str``, or ``None`` if + Use this if you have a command processor which runs another command which has + options of its own and you want to make sure these options don't get + confused. For example, each command might have a different set of options. + +.. method:: OptionParser.enable_interspersed_args() + + Set parsing to not stop on the first non-option, allowing interspersing + switches with command arguments. This is the default behavior. + +.. method:: OptionParser.get_option(opt_str) + + Returns the Option instance with the option string *opt_str*, or ``None`` if no options have that option string. -``has_option(opt_str)`` - Return true if the OptionParser has an option with option string ``opt_str`` +.. method:: OptionParser.has_option(opt_str) + + Return true if the OptionParser has an option with option string *opt_str* (e.g., ``"-q"`` or ``"--verbose"``). -``remove_option(opt_str)`` - If the :class:`OptionParser` has an option corresponding to ``opt_str``, that option is - removed. If that option provided any other option strings, all of those option - strings become invalid. If ``opt_str`` does not occur in any option belonging to - this :class:`OptionParser`, raises :exc:`ValueError`. +.. method:: OptionParser.remove_option(opt_str) + + If the :class:`OptionParser` has an option corresponding to *opt_str*, that + option is removed. If that option provided any other option strings, all of + those option strings become invalid. If *opt_str* does not occur in any + option belonging to this :class:`OptionParser`, raises :exc:`ValueError`. .. _optparse-conflicts-between-options: @@ -1257,10 +1305,11 @@ The available conflict handlers are: - ``error`` (default) - assume option conflicts are a programming error and raise :exc:`OptionConflictError` + ``"error"`` (default) + assume option conflicts are a programming error and raise + :exc:`OptionConflictError` - ``resolve`` + ``"resolve"`` resolve option conflicts intelligently (see below) @@ -1306,9 +1355,10 @@ OptionParser instances have several cyclic references. This should not be a problem for Python's garbage collector, but you may wish to break the cyclic -references explicitly by calling ``destroy()`` on your OptionParser once you are -done with it. This is particularly useful in long-running applications where -large object graphs are reachable from your OptionParser. +references explicitly by calling :meth:`~OptionParser.destroy` on your +OptionParser once you are done with it. This is particularly useful in +long-running applications where large object graphs are reachable from your +OptionParser. .. _optparse-other-methods: @@ -1318,51 +1368,34 @@ OptionParser supports several other public methods: -* ``set_usage(usage)`` - - Set the usage string according to the rules described above for the ``usage`` - constructor keyword argument. Passing ``None`` sets the default usage string; - use ``SUPPRESS_USAGE`` to suppress a usage message. - -* ``enable_interspersed_args()``, ``disable_interspersed_args()`` - - Enable/disable positional arguments interspersed with options, similar to GNU - getopt (enabled by default). For example, if ``"-a"`` and ``"-b"`` are both - simple options that take no arguments, :mod:`optparse` normally accepts this - syntax:: - - prog -a arg1 -b arg2 - - and treats it as equivalent to :: - - prog -a -b arg1 arg2 - - To disable this feature, call ``disable_interspersed_args()``. This restores - traditional Unix syntax, where option parsing stops with the first non-option - argument. +.. method:: OptionParser.set_usage(usage) -* ``set_defaults(dest=value, ...)`` - - Set default values for several option destinations at once. Using - :meth:`set_defaults` is the preferred way to set default values for options, - since multiple options can share the same destination. For example, if several - "mode" options all set the same destination, any one of them can set the - default, and the last one wins:: - - parser.add_option("--advanced", action="store_const", - dest="mode", const="advanced", - default="novice") # overridden below - parser.add_option("--novice", action="store_const", - dest="mode", const="novice", - default="advanced") # overrides above setting - - To avoid this confusion, use :meth:`set_defaults`:: - - parser.set_defaults(mode="advanced") - parser.add_option("--advanced", action="store_const", - dest="mode", const="advanced") - parser.add_option("--novice", action="store_const", - dest="mode", const="novice") + Set the usage string according to the rules described above for the ``usage`` + constructor keyword argument. Passing ``None`` sets the default usage + string; use :data:`optparse.SUPPRESS_USAGE` to suppress a usage message. + +.. method:: OptionParser.set_defaults(dest=value, ...) + + Set default values for several option destinations at once. Using + :meth:`set_defaults` is the preferred way to set default values for options, + since multiple options can share the same destination. For example, if + several "mode" options all set the same destination, any one of them can set + the default, and the last one wins:: + + parser.add_option("--advanced", action="store_const", + dest="mode", const="advanced", + default="novice") # overridden below + parser.add_option("--novice", action="store_const", + dest="mode", const="novice", + default="advanced") # overrides above setting + + To avoid this confusion, use :meth:`set_defaults`:: + + parser.set_defaults(mode="advanced") + parser.add_option("--advanced", action="store_const", + dest="mode", const="advanced") + parser.add_option("--novice", action="store_const", + dest="mode", const="novice") .. _optparse-option-callbacks: @@ -1377,7 +1410,7 @@ There are two steps to defining a callback option: -* define the option itself using the ``callback`` action +* define the option itself using the ``"callback"`` action * write the callback; this is a function (or method) that takes at least four arguments, as described below @@ -1389,8 +1422,8 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^ As always, the easiest way to define a callback option is by using the -``parser.add_option()`` method. Apart from :attr:`action`, the only option -attribute you must specify is ``callback``, the function to call:: +:meth:`OptionParser.add_option` method. Apart from :attr:`~Option.action`, the +only option attribute you must specify is ``callback``, the function to call:: parser.add_option("-c", action="callback", callback=my_callback) @@ -1404,8 +1437,9 @@ it's covered later in this section. :mod:`optparse` always passes four particular arguments to your callback, and it -will only pass additional arguments if you specify them via ``callback_args`` -and ``callback_kwargs``. Thus, the minimal callback function signature is:: +will only pass additional arguments if you specify them via +:attr:`~Option.callback_args` and :attr:`~Option.callback_kwargs`. Thus, the +minimal callback function signature is:: def my_callback(option, opt, value, parser): @@ -1414,21 +1448,22 @@ There are several other option attributes that you can supply when you define a callback option: -: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 - than storing the converted value(s) anywhere, though, :mod:`optparse` passes it - to your callback function. +:attr:`~Option.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:`~Option.type`. Rather than storing the converted value(s) anywhere, + though, :mod:`optparse` passes it to your callback function. -``nargs`` +:attr:`~Option.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`. - It then passes a tuple of converted values to your callback. + consume :attr:`~Option.nargs` arguments, each of which must be convertible to + :attr:`~Option.type`. It then passes a tuple of converted values to your + callback. -``callback_args`` +:attr:`~Option.callback_args` a tuple of extra positional arguments to pass to the callback -``callback_kwargs`` +:attr:`~Option.callback_kwargs` a dictionary of extra keyword arguments to pass to the callback @@ -1448,45 +1483,48 @@ ``opt_str`` is the option string seen on the command-line that's triggering the callback. - (If an abbreviated long option was used, ``opt_str`` will be the full, canonical - option string---e.g. if the user puts ``"--foo"`` on the command-line as an - abbreviation for ``"--foobar"``, then ``opt_str`` will be ``"--foobar"``.) + (If an abbreviated long option was used, ``opt_str`` will be the full, + canonical option string---e.g. if the user puts ``"--foo"`` on the + command-line as an abbreviation for ``"--foobar"``, then ``opt_str`` will be + ``"--foobar"``.) ``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 - ``None`` (no argument expected), then ``value`` will be ``None``. If ``nargs`` + only expect an argument if :attr:`~Option.type` is set; the type of ``value`` will be + the type implied by the option's type. If :attr:`~Option.type` for this option is + ``None`` (no argument expected), then ``value`` will be ``None``. If :attr:`~Option.nargs` > 1, ``value`` will be a tuple of values of the appropriate type. ``parser`` - is the OptionParser instance driving the whole thing, mainly useful because you - can access some other interesting data through its instance attributes: + is the OptionParser instance driving the whole thing, mainly useful because + you can access some other interesting data through its instance attributes: ``parser.largs`` - the current list of leftover arguments, ie. arguments that have been consumed - but are neither options nor option arguments. Feel free to modify - ``parser.largs``, e.g. by adding more arguments to it. (This list will become - ``args``, the second return value of :meth:`parse_args`.) + the current list of leftover arguments, ie. arguments that have been + consumed but are neither options nor option arguments. Feel free to modify + ``parser.largs``, e.g. by adding more arguments to it. (This list will + become ``args``, the second return value of :meth:`parse_args`.) ``parser.rargs`` - the current list of remaining arguments, ie. with ``opt_str`` and ``value`` (if - applicable) removed, and only the arguments following them still there. Feel - free to modify ``parser.rargs``, e.g. by consuming more arguments. + the current list of remaining arguments, ie. with ``opt_str`` and + ``value`` (if applicable) removed, and only the arguments following them + still there. Feel free to modify ``parser.rargs``, e.g. by consuming more + arguments. ``parser.values`` the object where option values are by default stored (an instance of - optparse.OptionValues). This lets callbacks use the same mechanism as the rest - of :mod:`optparse` for storing option values; you don't need to mess around with - globals or closures. You can also access or modify the value(s) of any options - already encountered on the command-line. + optparse.OptionValues). This lets callbacks use the same mechanism as the + rest of :mod:`optparse` for storing option values; you don't need to mess + around with globals or closures. You can also access or modify the + value(s) of any options already encountered on the command-line. ``args`` - is a tuple of arbitrary positional arguments supplied via the ``callback_args`` - option attribute. + is a tuple of arbitrary positional arguments supplied via the + :attr:`~Option.callback_args` option attribute. ``kwargs`` - is a dictionary of arbitrary keyword arguments supplied via ``callback_kwargs``. + is a dictionary of arbitrary keyword arguments supplied via + :attr:`~Option.callback_kwargs`. .. _optparse-raising-errors-in-callback: @@ -1494,11 +1532,11 @@ Raising errors in a callback ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The callback function should raise :exc:`OptionValueError` if there are any problems -with the option or its argument(s). :mod:`optparse` catches this and terminates -the program, printing the error message you supply to stderr. Your message -should be clear, concise, accurate, and mention the option at fault. Otherwise, -the user will have a hard time figuring out what he did wrong. +The callback function should raise :exc:`OptionValueError` if there are any +problems with the option or its argument(s). :mod:`optparse` catches this and +terminates the program, printing the error message you supply to stderr. Your +message should be clear, concise, accurate, and mention the option at fault. +Otherwise, the user will have a hard time figuring out what he did wrong. .. _optparse-callback-example-1: @@ -1514,7 +1552,7 @@ parser.add_option("--foo", action="callback", callback=record_foo_seen) -Of course, you could do that with the ``store_true`` action. +Of course, you could do that with the ``"store_true"`` action. .. _optparse-callback-example-2: @@ -1581,12 +1619,12 @@ 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 -that type; if you further define ``nargs``, then the option takes ``nargs`` -arguments. +is similar to defining a ``"store"`` or ``"append"`` option: if you define +:attr:`~Option.type`, then the option takes one argument that must be +convertible to that type; if you further define :attr:`~Option.nargs`, then the +option takes :attr:`~Option.nargs` arguments. -Here's an example that just emulates the standard ``store`` action:: +Here's an example that just emulates the standard ``"store"`` action:: def store_value(option, opt_str, value, parser): setattr(parser.values, option.dest, value) @@ -1673,32 +1711,36 @@ ^^^^^^^^^^^^^^^^ To add new types, you need to define your own subclass of :mod:`optparse`'s -Option class. This class has a couple of attributes that define -:mod:`optparse`'s types: :attr:`TYPES` and :attr:`TYPE_CHECKER`. +:class:`Option` class. This class has a couple of attributes that define +:mod:`optparse`'s types: :attr:`~Option.TYPES` and :attr:`~Option.TYPE_CHECKER`. + +.. attribute:: Option.TYPES + + A tuple of type names; in your subclass, simply define a new tuple + :attr:`TYPES` that builds on the standard one. + +.. attribute:: Option.TYPE_CHECKER -:attr:`TYPES` is a tuple of type names; in your subclass, simply define a new -tuple :attr:`TYPES` that builds on the standard one. + A dictionary mapping type names to type-checking functions. A type-checking + function has the following signature:: -:attr:`TYPE_CHECKER` is a dictionary mapping type names to type-checking -functions. A type-checking function has the following signature:: + def check_mytype(option, opt, value) - def check_mytype(option, opt, value) - -where ``option`` is an :class:`Option` instance, ``opt`` is an option string -(e.g., ``"-f"``), and ``value`` is the string from the command line that must be -checked and converted to your desired type. ``check_mytype()`` should return an -object of the hypothetical type ``mytype``. The value returned by a -type-checking function will wind up in the OptionValues instance returned by -:meth:`OptionParser.parse_args`, or be passed to a callback as the ``value`` -parameter. - -Your type-checking function should raise :exc:`OptionValueError` if it encounters any -problems. :exc:`OptionValueError` takes a single string argument, which is passed -as-is to :class:`OptionParser`'s :meth:`error` method, which in turn prepends the program -name and the string ``"error:"`` and prints everything to stderr before -terminating the process. + where ``option`` is an :class:`Option` instance, ``opt`` is an option string + (e.g., ``"-f"``), and ``value`` is the string from the command line that must + be checked and converted to your desired type. ``check_mytype()`` should + return an object of the hypothetical type ``mytype``. The value returned by + a type-checking function will wind up in the OptionValues instance returned + by :meth:`OptionParser.parse_args`, or be passed to a callback as the + ``value`` parameter. -Here's a silly example that demonstrates adding a ``complex`` option type to + Your type-checking function should raise :exc:`OptionValueError` if it + encounters any problems. :exc:`OptionValueError` takes a single string + argument, which is passed as-is to :class:`OptionParser`'s :meth:`error` + method, which in turn prepends the program name and the string ``"error:"`` + and prints everything to stderr before terminating the process. + +Here's a silly example that demonstrates adding a ``"complex"`` option type to parse Python-style complex numbers on the command line. (This is even sillier than it used to be, because :mod:`optparse` 1.3 added built-in support for complex numbers, but never mind.) @@ -1709,7 +1751,7 @@ from optparse import Option, OptionValueError You need to define your type-checker first, since it's referred to later (in the -:attr:`TYPE_CHECKER` class attribute of your Option subclass):: +:attr:`~Option.TYPE_CHECKER` class attribute of your Option subclass):: def check_complex(option, opt, value): try: @@ -1726,9 +1768,9 @@ TYPE_CHECKER["complex"] = check_complex (If we didn't make a :func:`copy` of :attr:`Option.TYPE_CHECKER`, we would end -up modifying the :attr:`TYPE_CHECKER` attribute of :mod:`optparse`'s Option -class. This being Python, nothing stops you from doing that except good manners -and common sense.) +up modifying the :attr:`~Option.TYPE_CHECKER` attribute of :mod:`optparse`'s +Option class. This being Python, nothing stops you from doing that except good +manners and common sense.) That's it! Now you can write a script that uses the new option type just like any other :mod:`optparse`\ -based script, except you have to instruct your @@ -1755,45 +1797,50 @@ "store" actions actions that result in :mod:`optparse` storing a value to an attribute of the - current OptionValues instance; these options require a :attr:`dest` attribute to - be supplied to the Option constructor + current OptionValues instance; these options require a :attr:`~Option.dest` + attribute to be supplied to the Option constructor. "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. - -These are overlapping sets: some default "store" actions are ``store``, -``store_const``, ``append``, and ``count``, while the default "typed" actions -are ``store``, ``append``, and ``callback``. + 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:`~Option.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 are ``"store"``, ``"append"``, and ``"callback"``. When you add an action, you need to categorize it by listing it in at least one of the following class attributes of Option (all are lists of strings): -:attr:`ACTIONS` - all actions must be listed in ACTIONS +.. attribute:: Option.ACTIONS + + All actions must be listed in ACTIONS. + +.. attribute:: Option.STORE_ACTIONS -:attr:`STORE_ACTIONS` - "store" actions are additionally listed here + "store" actions are additionally listed here. -:attr:`TYPED_ACTIONS` - "typed" actions are additionally listed here +.. attribute:: Option.TYPED_ACTIONS -``ALWAYS_TYPED_ACTIONS`` - actions that always take a type (i.e. whose options always take a value) are + "typed" actions are additionally listed here. + +.. attribute:: Option.ALWAYS_TYPED_ACTIONS + + Actions that always take a type (i.e. whose options always take a value) are additionally listed here. The only effect of this is that :mod:`optparse` - assigns the default type, ``string``, to options with no explicit type whose - action is listed in ``ALWAYS_TYPED_ACTIONS``. + assigns the default type, ``"string"``, to options with no explicit type + whose action is listed in :attr:`ALWAYS_TYPED_ACTIONS`. In order to actually implement your new action, you must override Option's :meth:`take_action` method and add a case that recognizes your action. -For example, let's add an ``extend`` action. This is similar to the standard -``append`` action, but instead of taking a single value from the command-line -and appending it to an existing list, ``extend`` will take multiple values in a -single comma-delimited string, and extend an existing list with them. That is, -if ``"--names"`` is an ``extend`` option of type ``string``, the command line -:: +For example, let's add an ``"extend"`` action. This is similar to the standard +``"append"`` action, but instead of taking a single value from the command-line +and appending it to an existing list, ``"extend"`` will take multiple values in +a single comma-delimited string, and extend an existing list with them. That +is, if ``"--names"`` is an ``"extend"`` option of type ``"string"``, the command +line :: --names=foo,bar --names blah --names ding,dong @@ -1820,29 +1867,30 @@ Features of note: -* ``extend`` both expects a value on the command-line and stores that value - somewhere, so it goes in both :attr:`STORE_ACTIONS` and :attr:`TYPED_ACTIONS` - -* to ensure that :mod:`optparse` assigns the default type of ``string`` to - ``extend`` actions, we put the ``extend`` action in ``ALWAYS_TYPED_ACTIONS`` as - well +* ``"extend"`` both expects a value on the command-line and stores that value + somewhere, so it goes in both :attr:`~Option.STORE_ACTIONS` and + :attr:`~Option.TYPED_ACTIONS`. + +* to ensure that :mod:`optparse` assigns the default type of ``"string"`` to + ``"extend"`` actions, we put the ``"extend"`` action in + :attr:`~Option.ALWAYS_TYPED_ACTIONS` as well. * :meth:`MyOption.take_action` implements just this one new action, and passes control back to :meth:`Option.take_action` for the standard :mod:`optparse` - actions + actions. -* ``values`` is an instance of the optparse_parser.Values class, which - provides the very useful :meth:`ensure_value` method. :meth:`ensure_value` is - essentially :func:`getattr` with a safety valve; it is called as :: +* ``values`` is an instance of the optparse_parser.Values class, which provides + the very useful :meth:`ensure_value` method. :meth:`ensure_value` is + essentially :func:`getattr` with a safety valve; it is called as :: values.ensure_value(attr, value) If the ``attr`` attribute of ``values`` doesn't exist or is None, then - ensure_value() first sets it to ``value``, and then returns 'value. This is very - handy for actions like ``extend``, ``append``, and ``count``, all of which - accumulate data in a variable and expect that variable to be of a certain type - (a list for the first two, an integer for the latter). Using + ensure_value() first sets it to ``value``, and then returns 'value. This is + very handy for actions like ``"extend"``, ``"append"``, and ``"count"``, all + of which accumulate data in a variable and expect that variable to be of a + certain type (a list for the first two, an integer for the latter). Using :meth:`ensure_value` means that scripts using your action don't have to worry - about setting a default value for the option destinations in question; they can - just leave the default as None and :meth:`ensure_value` will take care of + about setting a default value for the option destinations in question; they + can just leave the default as None and :meth:`ensure_value` will take care of getting it right when it's needed. From python-checkins at python.org Fri Sep 18 00:17:38 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 22:17:38 -0000 Subject: [Python-checkins] r74890 - in python/branches/release31-maint: Doc/library/optparse.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 00:17:38 2009 New Revision: 74890 Log: Merged revisions 74889 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ................ r74889 | georg.brandl | 2009-09-18 00:11:49 +0200 (Fr, 18 Sep 2009) | 17 lines Merged revisions 74868,74877-74878 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74868 | georg.brandl | 2009-09-17 12:23:02 +0200 (Do, 17 Sep 2009) | 2 lines String values should be shown with quotes, to avoid confusion with constants. ........ r74877 | georg.brandl | 2009-09-17 18:26:06 +0200 (Do, 17 Sep 2009) | 1 line Remove duplicate doc of enable/disable_interspersed_args. ........ r74878 | georg.brandl | 2009-09-17 19:14:04 +0200 (Do, 17 Sep 2009) | 1 line Make the optparse doc style a bit more standard: use standard description units for attrs/methods/etc., and use the correct referencing roles. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/optparse.rst Modified: python/branches/release31-maint/Doc/library/optparse.rst ============================================================================== --- python/branches/release31-maint/Doc/library/optparse.rst (original) +++ python/branches/release31-maint/Doc/library/optparse.rst Fri Sep 18 00:17:38 2009 @@ -7,14 +7,14 @@ .. sectionauthor:: Greg Ward -``optparse`` is a more convenient, flexible, and powerful library for parsing -command-line options than the old :mod:`getopt` module. ``optparse`` uses a more declarative -style of command-line parsing: you create an instance of :class:`OptionParser`, -populate it with options, and parse the command line. ``optparse`` allows users -to specify options in the conventional GNU/POSIX syntax, and additionally -generates usage and help messages for you. +:mod:`optparse` is a more convenient, flexible, and powerful library for parsing +command-line options than the old :mod:`getopt` module. :mod:`optparse` uses a +more declarative style of command-line parsing: you create an instance of +:class:`OptionParser`, populate it with options, and parse the command +line. :mod:`optparse` allows users to specify options in the conventional +GNU/POSIX syntax, and additionally generates usage and help messages for you. -Here's an example of using ``optparse`` in a simple script:: +Here's an example of using :mod:`optparse` in a simple script:: from optparse import OptionParser [...] @@ -32,11 +32,11 @@ --file=outfile -q -As it parses the command line, ``optparse`` sets attributes of the ``options`` -object returned by :meth:`parse_args` based on user-supplied command-line -values. When :meth:`parse_args` returns from parsing this command line, -``options.filename`` will be ``"outfile"`` and ``options.verbose`` will be -``False``. ``optparse`` supports both long and short options, allows short +As it parses the command line, :mod:`optparse` sets attributes of the +``options`` object returned by :meth:`parse_args` based on user-supplied +command-line values. When :meth:`parse_args` returns from parsing this command +line, ``options.filename`` will be ``"outfile"`` and ``options.verbose`` will be +``False``. :mod:`optparse` supports both long and short options, allows short options to be merged together, and allows options to be associated with their arguments in a variety of ways. Thus, the following command lines are all equivalent to the above example:: @@ -51,7 +51,7 @@ -h --help -and ``optparse`` will print out a brief summary of your script's options:: +and :mod:`optparse` will print out a brief summary of your script's options:: usage: [options] @@ -82,10 +82,10 @@ ^^^^^^^^^^^ argument - a string entered on the command-line, and passed by the shell to ``execl()`` or - ``execv()``. In Python, arguments are elements of ``sys.argv[1:]`` - (``sys.argv[0]`` is the name of the program being executed). Unix shells also - use the term "word". + a string entered on the command-line, and passed by the shell to ``execl()`` + or ``execv()``. In Python, arguments are elements of ``sys.argv[1:]`` + (``sys.argv[0]`` is the name of the program being executed). Unix shells + also use the term "word". It is occasionally desirable to substitute an argument list other than ``sys.argv[1:]``, so you should read "argument" as "an element of @@ -93,14 +93,14 @@ ``sys.argv[1:]``". option - an argument used to supply extra information to guide or customize the execution - of a program. There are many different syntaxes for options; the traditional - Unix syntax is a hyphen ("-") followed by a single letter, e.g. ``"-x"`` or - ``"-F"``. Also, traditional Unix syntax allows multiple options to be merged - into a single argument, e.g. ``"-x -F"`` is equivalent to ``"-xF"``. The GNU - project introduced ``"--"`` followed by a series of hyphen-separated words, e.g. - ``"--file"`` or ``"--dry-run"``. These are the only two option syntaxes - provided by :mod:`optparse`. + an argument used to supply extra information to guide or customize the + execution of a program. There are many different syntaxes for options; the + traditional Unix syntax is a hyphen ("-") followed by a single letter, + e.g. ``"-x"`` or ``"-F"``. Also, traditional Unix syntax allows multiple + options to be merged into a single argument, e.g. ``"-x -F"`` is equivalent + to ``"-xF"``. The GNU project introduced ``"--"`` followed by a series of + hyphen-separated words, e.g. ``"--file"`` or ``"--dry-run"``. These are the + only two option syntaxes provided by :mod:`optparse`. Some other option syntaxes that the world has seen include: @@ -117,15 +117,16 @@ * a slash followed by a letter, or a few letters, or a word, e.g. ``"/f"``, ``"/file"`` - These option syntaxes are not supported by :mod:`optparse`, and they never will - be. This is deliberate: the first three are non-standard on any environment, - and the last only makes sense if you're exclusively targeting VMS, MS-DOS, - and/or Windows. + These option syntaxes are not supported by :mod:`optparse`, and they never + will be. This is deliberate: the first three are non-standard on any + environment, and the last only makes sense if you're exclusively targeting + VMS, MS-DOS, and/or Windows. option argument - an argument that follows an option, is closely associated with that option, and - is consumed from the argument list when that option is. With :mod:`optparse`, - option arguments may either be in a separate argument from their option:: + an argument that follows an option, is closely associated with that option, + and is consumed from the argument list when that option is. With + :mod:`optparse`, option arguments may either be in a separate argument from + their option:: -f foo --file foo @@ -135,25 +136,26 @@ -ffoo --file=foo - Typically, a given option either takes an argument or it doesn't. Lots of people - want an "optional option arguments" feature, meaning that some options will take - an argument if they see it, and won't if they don't. This is somewhat - controversial, because it makes parsing ambiguous: if ``"-a"`` takes an optional - argument and ``"-b"`` is another option entirely, how do we interpret ``"-ab"``? - Because of this ambiguity, :mod:`optparse` does not support this feature. + Typically, a given option either takes an argument or it doesn't. Lots of + people want an "optional option arguments" feature, meaning that some options + will take an argument if they see it, and won't if they don't. This is + somewhat controversial, because it makes parsing ambiguous: if ``"-a"`` takes + an optional argument and ``"-b"`` is another option entirely, how do we + interpret ``"-ab"``? Because of this ambiguity, :mod:`optparse` does not + support this feature. positional argument something leftover in the argument list after options have been parsed, i.e. - after options and their arguments have been parsed and removed from the argument - list. + after options and their arguments have been parsed and removed from the + argument list. required option an option that must be supplied on the command-line; note that the phrase "required option" is self-contradictory in English. :mod:`optparse` doesn't - prevent you from implementing required options, but doesn't give you much help - at it either. See ``examples/required_1.py`` and ``examples/required_2.py`` in - the :mod:`optparse` source distribution for two ways to implement required - options with :mod:`optparse`. + prevent you from implementing required options, but doesn't give you much + help at it either. See ``examples/required_1.py`` and + ``examples/required_2.py`` in the :mod:`optparse` source distribution for two + ways to implement required options with :mod:`optparse`. For example, consider this hypothetical command-line:: @@ -282,8 +284,9 @@ * ``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 -these, :attr:`action` is the most fundamental. +:attr:`~Option.action`, :attr:`~Option.type`, :attr:`~Option.dest` +(destination), and :attr:`~Option.help`. Of these, :attr:`~Option.action` is the +most fundamental. .. _optparse-understanding-option-actions: @@ -294,9 +297,9 @@ Actions tell :mod:`optparse` what to do when it encounters an option on the command line. There is a fixed set of actions hard-coded into :mod:`optparse`; adding new actions is an advanced topic covered in section -:ref:`optparse-extending-optparse`. Most actions tell -:mod:`optparse` to store a value in some variable---for example, take a string -from the command line and store it in an attribute of ``options``. +:ref:`optparse-extending-optparse`. Most actions tell :mod:`optparse` to store +a value in some variable---for example, take a string from the command line and +store it in an attribute of ``options``. If you don't specify an option action, :mod:`optparse` defaults to ``store``. @@ -334,7 +337,7 @@ Let's parse another fake command-line. This time, we'll jam the option argument right up against the option: since ``"-n42"`` (one argument) is equivalent to -``"-n 42"`` (two arguments), the code :: +``"-n 42"`` (two arguments), the code :: (options, args) = parser.parse_args(["-n42"]) print(options.num) @@ -386,16 +389,16 @@ Some other actions supported by :mod:`optparse` are: -``store_const`` +``"store_const"`` store a constant value -``append`` +``"append"`` append this option's argument to a list -``count`` +``"count"`` increment a counter by one -``callback`` +``"callback"`` call a specified function These are covered in section :ref:`optparse-reference-guide`, Reference Guide @@ -454,8 +457,8 @@ :mod:`optparse`'s ability to generate help and usage text automatically is useful for creating user-friendly command-line interfaces. All you have to do -is supply a :attr:`help` value for each option, and optionally a short usage -message for your whole program. Here's an OptionParser populated with +is supply a :attr:`~Option.help` value for each option, and optionally a short +usage message for your whole program. Here's an OptionParser populated with user-friendly (documented) options:: usage = "usage: %prog [options] arg1 arg2" @@ -499,12 +502,12 @@ usage = "usage: %prog [options] arg1 arg2" :mod:`optparse` expands ``"%prog"`` in the usage string to the name of the - current program, i.e. ``os.path.basename(sys.argv[0])``. The expanded string is - then printed before the detailed option help. + current program, i.e. ``os.path.basename(sys.argv[0])``. The expanded string + is then printed before the detailed option help. If you don't supply a usage string, :mod:`optparse` uses a bland but sensible - default: ``"usage: %prog [options]"``, which is fine if your script doesn't take - any positional arguments. + default: ``"usage: %prog [options]"``, which is fine if your script doesn't + take any positional arguments. * every option defines a help string, and doesn't worry about line-wrapping--- :mod:`optparse` takes care of wrapping lines and making the help output look @@ -518,29 +521,29 @@ Here, "MODE" is called the meta-variable: it stands for the argument that the user is expected to supply to :option:`-m`/:option:`--mode`. By default, :mod:`optparse` converts the destination variable name to uppercase and uses - that for the meta-variable. Sometimes, that's not what you want---for example, - the :option:`--filename` option explicitly sets ``metavar="FILE"``, resulting in - this automatically-generated option description:: + that for the meta-variable. Sometimes, that's not what you want---for + example, the :option:`--filename` option explicitly sets ``metavar="FILE"``, + resulting in this automatically-generated option description:: -f FILE, --filename=FILE - This is important for more than just saving space, though: the manually written - help text uses the meta-variable "FILE" to clue the user in that there's a - connection between the semi-formal syntax "-f FILE" and the informal semantic - description "write output to FILE". This is a simple but effective way to make - your help text a lot clearer and more useful for end users. + This is important for more than just saving space, though: the manually + written help text uses the meta-variable "FILE" to clue the user in that + there's a connection between the semi-formal syntax "-f FILE" and the informal + semantic description "write output to FILE". This is a simple but effective + way to make your help text a lot clearer and more useful for end users. * options that have a default value can include ``%default`` in the help string---\ :mod:`optparse` will replace it with :func:`str` of the option's default value. If an option has no default value (or the default value is ``None``), ``%default`` expands to ``none``. -When dealing with many options, it is convenient to group these -options for better help output. An :class:`OptionParser` can contain -several option groups, each of which can contain several options. +When dealing with many options, it is convenient to group these options for +better help output. An :class:`OptionParser` can contain several option groups, +each of which can contain several options. -Continuing with the parser defined above, adding an -:class:`OptionGroup` to a parser is easy:: +Continuing with the parser defined above, adding an :class:`OptionGroup` to a +parser is easy:: group = OptionGroup(parser, "Dangerous Options", "Caution: use these options at your own risk. " @@ -595,17 +598,17 @@ There are two broad classes of errors that :mod:`optparse` has to worry about: programmer errors and user errors. Programmer errors are usually erroneous -calls to ``parser.add_option()``, e.g. invalid option strings, unknown option -attributes, missing option attributes, etc. These are dealt with in the usual -way: raise an exception (either ``optparse.OptionError`` or :exc:`TypeError`) and -let the program crash. +calls to :func:`OptionParser.add_option`, e.g. invalid option strings, unknown +option attributes, missing option attributes, etc. These are dealt with in the +usual way: raise an exception (either :exc:`optparse.OptionError` or +:exc:`TypeError`) and let the program crash. Handling user errors is much more important, since they are guaranteed to happen no matter how stable your code is. :mod:`optparse` can automatically detect some user errors, such as bad option arguments (passing ``"-n 4x"`` where :option:`-n` takes an integer argument), missing arguments (``"-n"`` at the end of the command line, where :option:`-n` takes an argument of any type). Also, -you can call ``parser.error()`` to signal an application-defined error +you can call :func:`OptionParser.error` to signal an application-defined error condition:: (options, args) = parser.parse_args() @@ -634,7 +637,7 @@ :mod:`optparse`\ -generated error messages take care always to mention the option involved in the error; be sure to do the same when calling -``parser.error()`` from your application code. +:func:`OptionParser.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:`~OptionParser.exit` @@ -682,49 +685,51 @@ Creating the parser ^^^^^^^^^^^^^^^^^^^ -The first step in using :mod:`optparse` is to create an OptionParser instance:: +The first step in using :mod:`optparse` is to create an OptionParser instance. - parser = OptionParser(...) +.. class:: OptionParser(...) -The OptionParser constructor has no required arguments, but a number of optional -keyword arguments. You should always pass them as keyword arguments, i.e. do -not rely on the order in which the arguments are declared. + The OptionParser constructor has no required arguments, but a number of + optional keyword arguments. You should always pass them as keyword + arguments, i.e. do not rely on the order in which the arguments are declared. ``usage`` (default: ``"%prog [options]"``) - The usage summary to print when your program is run incorrectly or with a help - option. When :mod:`optparse` prints the usage string, it expands ``%prog`` to - ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed that keyword - argument). To suppress a usage message, pass the special value - ``optparse.SUPPRESS_USAGE``. + The usage summary to print when your program is run incorrectly or with a + help option. When :mod:`optparse` prints the usage string, it expands + ``%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you + passed that keyword argument). To suppress a usage message, pass the + special value :data:`optparse.SUPPRESS_USAGE`. ``option_list`` (default: ``[]``) A list of Option objects to populate the parser with. The options in - ``option_list`` are added after any options in ``standard_option_list`` (a class - attribute that may be set by OptionParser subclasses), but before any version or - help options. Deprecated; use :meth:`add_option` after creating the parser - instead. + ``option_list`` are added after any options in ``standard_option_list`` (a + class attribute that may be set by OptionParser subclasses), but before + any version or help options. Deprecated; use :meth:`add_option` after + creating the parser instead. ``option_class`` (default: optparse.Option) Class to use when adding options to the parser in :meth:`add_option`. ``version`` (default: ``None``) - A version string to print when the user supplies a version option. If you supply - a true value for ``version``, :mod:`optparse` automatically adds a version - option with the single option string ``"--version"``. The substring ``"%prog"`` - is expanded the same as for ``usage``. + A version string to print when the user supplies a version option. If you + supply a true value for ``version``, :mod:`optparse` automatically adds a + version option with the single option string ``"--version"``. The + substring ``"%prog"`` is expanded the same as for ``usage``. ``conflict_handler`` (default: ``"error"``) - Specifies what to do when options with conflicting option strings are added to - the parser; see section :ref:`optparse-conflicts-between-options`. + Specifies what to do when options with conflicting option strings are + added to the parser; see section + :ref:`optparse-conflicts-between-options`. ``description`` (default: ``None``) - A paragraph of text giving a brief overview of your program. :mod:`optparse` - reformats this paragraph to fit the current terminal width and prints it when - the user requests help (after ``usage``, but before the list of options). - - ``formatter`` (default: a new IndentedHelpFormatter) - An instance of optparse.HelpFormatter that will be used for printing help text. - :mod:`optparse` provides two concrete classes for this purpose: + A paragraph of text giving a brief overview of your program. + :mod:`optparse` reformats this paragraph to fit the current terminal width + and prints it when the user requests help (after ``usage``, but before the + list of options). + + ``formatter`` (default: a new :class:`IndentedHelpFormatter`) + An instance of optparse.HelpFormatter that will be used for printing help + text. :mod:`optparse` provides two concrete classes for this purpose: IndentedHelpFormatter and TitledHelpFormatter. ``add_help_option`` (default: ``True``) @@ -743,14 +748,14 @@ ^^^^^^^^^^^^^^^^^^^^^ There are several ways to populate the parser with options. The preferred way -is by using ``OptionParser.add_option()``, as shown in section +is by using :meth:`OptionParser.add_option`, as shown in section :ref:`optparse-tutorial`. :meth:`add_option` can be called in one of two ways: * pass it an Option instance (as returned by :func:`make_option`) * pass it any combination of positional and keyword arguments that are - acceptable to :func:`make_option` (i.e., to the Option constructor), and it will - create the Option instance for you + acceptable to :func:`make_option` (i.e., to the Option constructor), and it + will create the Option instance for you The other alternative is to pass a list of pre-constructed Option instances to the OptionParser constructor, as in:: @@ -778,66 +783,67 @@ e.g. :option:`-f` and :option:`--file`. You can specify any number of short or long option strings, but you must specify at least one overall option string. -The canonical way to create an Option instance is with the :meth:`add_option` -method of :class:`OptionParser`:: +The canonical way to create an :class:`Option` instance is with the +:meth:`add_option` method of :class:`OptionParser`. - parser.add_option(opt_str[, ...], attr=value, ...) +.. method:: OptionParser.add_option(opt_str[, ...], attr=value, ...) -To define an option with only a short option string:: + To define an option with only a short option string:: - parser.add_option("-f", attr=value, ...) + parser.add_option("-f", attr=value, ...) -And to define an option with only a long option string:: + And to define an option with only a long option string:: - parser.add_option("--foo", attr=value, ...) + parser.add_option("--foo", attr=value, ...) -The keyword arguments define attributes of the new Option object. The most -important option attribute is :attr:`action`, and it largely determines which -other attributes are relevant or required. If you pass irrelevant option -attributes, or fail to pass required ones, :mod:`optparse` raises an -:exc:`OptionError` exception explaining your mistake. + The keyword arguments define attributes of the new Option object. The most + important option attribute is :attr:`~Option.action`, and it largely + determines which other attributes are relevant or required. If you pass + irrelevant option attributes, or fail to pass required ones, :mod:`optparse` + raises an :exc:`OptionError` exception explaining your mistake. -An option's *action* determines what :mod:`optparse` does when it encounters -this option on the command-line. The standard option actions hard-coded into -:mod:`optparse` are: + An option's *action* determines what :mod:`optparse` does when it encounters + this option on the command-line. The standard option actions hard-coded into + :mod:`optparse` are: -``store`` - store this option's argument (default) + ``"store"`` + store this option's argument (default) -``store_const`` - store a constant value + ``"store_const"`` + store a constant value -``store_true`` - store a true value + ``"store_true"`` + store a true value -``store_false`` - store a false value + ``"store_false"`` + store a false value -``append`` - append this option's argument to a list + ``"append"`` + append this option's argument to a list -``append_const`` - append a constant value to a list + ``"append_const"`` + append a constant value to a list -``count`` - increment a counter by one + ``"count"`` + increment a counter by one -``callback`` - call a specified function + ``"callback"`` + call a specified function -:attr:`help` - print a usage message including all options and the documentation for them + ``"help"`` + 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.) + (If you don't supply an action, the default is ``"store"``. For this action, + you may also supply :attr:`~Option.type` and :attr:`~Option.dest` option + attributes; see :ref:`optparse-standard-option-actions`.) As you can see, most actions involve storing or updating a value somewhere. :mod:`optparse` always creates a special object for this, conventionally called -``options`` (it happens to be an instance of ``optparse.Values``). Option +``options`` (it happens to be an instance of :class:`optparse.Values`). Option arguments (and various other values) are stored as attributes of this object, -according to the :attr:`dest` (destination) option attribute. +according to the :attr:`~Option.dest` (destination) option attribute. -For example, when you call :: +For example, when you call :: parser.parse_args() @@ -845,7 +851,7 @@ options = Values() -If one of the options in this parser is defined with :: +If one of the options in this parser is defined with :: parser.add_option("-f", "--file", action="store", type="string", dest="filename") @@ -856,13 +862,97 @@ --file=foo --file foo -then :mod:`optparse`, on seeing this option, will do the equivalent of :: +then :mod:`optparse`, on seeing this option, will do the equivalent of :: options.filename = "foo" -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. +The :attr:`~Option.type` and :attr:`~Option.dest` option attributes are almost +as important as :attr:`~Option.action`, but :attr:`~Option.action` is the only +one that makes sense for *all* options. + + +.. _optparse-option-attributes: + +Option attributes +^^^^^^^^^^^^^^^^^ + +The following option attributes may be passed as keyword arguments to +:meth:`OptionParser.add_option`. If you pass an option attribute that is not +relevant to a particular option, or fail to pass a required option attribute, +:mod:`optparse` raises :exc:`OptionError`. + +.. attribute:: Option.action + + (default: ``"store"``) + + Determines :mod:`optparse`'s behaviour when this option is seen on the + command line; the available options are documented :ref:`here + `. + +.. attribute:: Option.type + + (default: ``"string"``) + + The argument type expected by this option (e.g., ``"string"`` or ``"int"``); + the available option types are documented :ref:`here + `. + +.. attribute:: Option.dest + + (default: derived from option strings) + + If the option's action implies writing or modifying a value somewhere, this + tells :mod:`optparse` where to write it: :attr:`~Option.dest` names an + attribute of the ``options`` object that :mod:`optparse` builds as it parses + the command line. + +.. attribute:: Option.default + + The value to use for this option's destination if the option is not seen on + the command line. See also :meth:`OptionParser.set_defaults`. + +.. attribute:: Option.nargs + + (default: 1) + + How many arguments of type :attr:`~Option.type` should be consumed when this + option is seen. If > 1, :mod:`optparse` will store a tuple of values to + :attr:`~Option.dest`. + +.. attribute:: Option.const + + For actions that store a constant value, the constant value to store. + +.. attribute:: Option.choices + + For options of type ``"choice"``, the list of strings the user may choose + from. + +.. attribute:: Option.callback + + For options with action ``"callback"``, the callable to call when this option + is seen. See section :ref:`optparse-option-callbacks` for detail on the + arguments passed to the callable. + +.. attribute:: Option.callback_args + Option.callback_kwargs + + Additional positional and keyword arguments to pass to ``callback`` after the + four standard callback arguments. + +.. attribute:: Option.help + + Help text to print for this option when listing all available options after + the user supplies a :attr:`~Option.help` option (such as ``"--help"``). If + no help text is supplied, the option will be listed without help text. To + hide this option, use the special value :data:`optparse.SUPPRESS_HELP`. + +.. attribute:: Option.metavar + + (default: derived from option strings) + + Stand-in for the option argument(s) to use when printing help text. See + section :ref:`optparse-tutorial` for an example. .. _optparse-standard-option-actions: @@ -875,42 +965,45 @@ 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:`~Option.type`, :attr:`~Option.dest`, + :attr:`~Option.nargs`, :attr:`~Option.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, - 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 - "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:`dest` is not supplied, :mod:`optparse` derives a destination from the - first long option string (e.g., ``"--foo-bar"`` implies ``foo_bar``). If there - are no long option strings, :mod:`optparse` derives a destination from the first - short option string (e.g., ``"-f"`` implies ``f``). + according to :attr:`~Option.type` and stored in :attr:`~Option.dest`. If + :attr:`~Option.nargs` > 1, multiple arguments will be consumed from the + command line; all will be converted according to :attr:`~Option.type` and + stored to :attr:`~Option.dest` as a tuple. See the + :ref:`optparse-standard-option-types` section. + + If :attr:`~Option.choices` is supplied (a list or tuple of strings), the type + defaults to ``"choice"``. + + If :attr:`~Option.type` is not supplied, it defaults to ``"string"``. + + If :attr:`~Option.dest` is not supplied, :mod:`optparse` derives a destination + from the first long option string (e.g., ``"--foo-bar"`` implies + ``foo_bar``). If there are no long option strings, :mod:`optparse` derives a + destination from the first short option string (e.g., ``"-f"`` implies ``f``). Example:: parser.add_option("-f") parser.add_option("-p", type="float", nargs=3, dest="point") - As it parses the command line :: + As it parses the command line :: -f foo.txt -p 1 -3.5 4 -fbar.txt - :mod:`optparse` will set :: + :mod:`optparse` will set :: options.f = "foo.txt" options.point = (1.0, -3.5, 4.0) options.f = "bar.txt" -* ``store_const`` [required: ``const``; relevant: :attr:`dest`] +* ``"store_const"`` [required: :attr:`~Option.const`; relevant: + :attr:`~Option.dest`] - The value ``const`` is stored in :attr:`dest`. + The value :attr:`~Option.const` is stored in :attr:`~Option.dest`. Example:: @@ -925,29 +1018,32 @@ options.verbose = 2 -* ``store_true`` [relevant: :attr:`dest`] +* ``"store_true"`` [relevant: :attr:`~Option.dest`] - A special case of ``store_const`` that stores a true value to :attr:`dest`. + A special case of ``"store_const"`` that stores a true value to + :attr:`~Option.dest`. -* ``store_false`` [relevant: :attr:`dest`] +* ``"store_false"`` [relevant: :attr:`~Option.dest`] - Like ``store_true``, but stores a false value. + Like ``"store_true"``, but stores a false value. Example:: 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:`~Option.type`, :attr:`~Option.dest`, + :attr:`~Option.nargs`, :attr:`~Option.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 - is automatically created when :mod:`optparse` first encounters this option on - the command-line. If ``nargs`` > 1, multiple arguments are consumed, and a - tuple of length ``nargs`` is appended to :attr:`dest`. + :attr:`~Option.dest`. If no default value for :attr:`~Option.dest` is + supplied, an empty list is automatically created when :mod:`optparse` first + encounters this option on the command-line. If :attr:`~Option.nargs` > 1, + multiple arguments are consumed, and a tuple of length :attr:`~Option.nargs` + is appended to :attr:`~Option.dest`. - The defaults for :attr:`!type` and :attr:`dest` are the same as for the ``store`` - action. + The defaults for :attr:`~Option.type` and :attr:`~Option.dest` are the same as + for the ``"store"`` action. Example:: @@ -963,16 +1059,19 @@ options.tracks.append(int("4")) -* ``append_const`` [required: ``const``; relevant: :attr:`dest`] +* ``"append_const"`` [required: :attr:`~Option.const`; relevant: + :attr:`~Option.dest`] - Like ``store_const``, but the value ``const`` is appended to :attr:`dest`; as - with ``append``, :attr:`dest` defaults to ``None``, and an empty list is - automatically created the first time the option is encountered. - -* ``count`` [relevant: :attr:`dest`] - - Increment the integer stored at :attr:`dest`. If no default value is supplied, - :attr:`dest` is set to zero before being incremented the first time. + Like ``"store_const"``, but the value :attr:`~Option.const` is appended to + :attr:`~Option.dest`; as with ``"append"``, :attr:`~Option.dest` defaults to + ``None``, and an empty list is automatically created the first time the option + is encountered. + +* ``"count"`` [relevant: :attr:`~Option.dest`] + + Increment the integer stored at :attr:`~Option.dest`. If no default value is + supplied, :attr:`~Option.dest` is set to zero before being incremented the + first time. Example:: @@ -988,27 +1087,29 @@ options.verbosity += 1 -* ``callback`` [required: ``callback``; relevant: :attr:`!type`, ``nargs``, - ``callback_args``, ``callback_kwargs``] +* ``"callback"`` [required: :attr:`~Option.callback`; relevant: + :attr:`~Option.type`, :attr:`~Option.nargs`, :attr:`~Option.callback_args`, + :attr:`~Option.callback_kwargs`] - Call the function specified by ``callback``, which is called as :: + Call the function specified by :attr:`~Option.callback`, which is called as :: func(option, opt_str, value, parser, *args, **kwargs) See section :ref:`optparse-option-callbacks` for more detail. -* :attr:`help` +* ``"help"`` - Prints a complete help message for all the options in the current option parser. - The help message is constructed from the ``usage`` string passed to - OptionParser's constructor and the :attr:`help` string passed to every option. - - If no :attr:`help` string is supplied for an option, it will still be listed in - the help message. To omit an option entirely, use the special value - ``optparse.SUPPRESS_HELP``. + Prints a complete help message for all the options in the current option + parser. The help message is constructed from the ``usage`` string passed to + OptionParser's constructor and the :attr:`~Option.help` string passed to every + option. + + If no :attr:`~Option.help` string is supplied for an option, it will still be + listed in the help message. To omit an option entirely, use the special value + :data:`optparse.SUPPRESS_HELP`. - :mod:`optparse` automatically adds a :attr:`help` option to all OptionParsers, - so you do not normally need to create one. + :mod:`optparse` automatically adds a :attr:`~Option.help` option to all + OptionParsers, so you do not normally need to create one. Example:: @@ -1025,8 +1126,8 @@ help="Input file to read data from") parser.add_option("--secret", help=SUPPRESS_HELP) - If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, it - will print something like the following help message to stdout (assuming + If :mod:`optparse` sees either ``"-h"`` or ``"--help"`` on the command line, + it will print something like the following help message to stdout (assuming ``sys.argv[0]`` is ``"foo.py"``):: usage: foo.py [options] @@ -1039,82 +1140,14 @@ After printing the help message, :mod:`optparse` terminates your process with ``sys.exit(0)``. -* ``version`` - - Prints the version number supplied to the OptionParser to stdout and exits. The - version number is actually formatted and printed by the ``print_version()`` - method of OptionParser. Generally only relevant if the ``version`` argument is - supplied to the OptionParser constructor. As with :attr:`help` options, you - will rarely create ``version`` options, since :mod:`optparse` automatically adds - them when needed. - - -.. _optparse-option-attributes: - -Option attributes -^^^^^^^^^^^^^^^^^ - -The following option attributes may be passed as keyword arguments to -``parser.add_option()``. If you pass an option attribute that is not relevant -to a particular option, or fail to pass a required option attribute, -:mod:`optparse` raises :exc:`OptionError`. - -* :attr:`action` (default: ``"store"``) +* ``"version"`` - Determines :mod:`optparse`'s behaviour when this option is seen on the command - line; the available options are documented above. - -* :attr:`!type` (default: ``"string"``) - - The argument type expected by this option (e.g., ``"string"`` or ``"int"``); the - available option types are documented below. - -* :attr:`dest` (default: derived from option strings) - - If the option's action implies writing or modifying a value somewhere, this - tells :mod:`optparse` where to write it: :attr:`dest` names an attribute of the - ``options`` object that :mod:`optparse` builds as it parses the command line. - -* ``default`` - - The value to use for this option's destination if the option is not seen on the - command line. See also ``parser.set_defaults()``. - -* ``nargs`` (default: 1) - - 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`` - - For actions that store a constant value, the constant value to store. - -* ``choices`` - - For options of type ``"choice"``, the list of strings the user may choose from. - -* ``callback`` - - For options with action ``"callback"``, the callable to call when this option - is seen. See section :ref:`optparse-option-callbacks` for detail on the - arguments passed to ``callable``. - -* ``callback_args``, ``callback_kwargs`` - - Additional positional and keyword arguments to pass to ``callback`` after the - four standard callback arguments. - -* :attr:`help` - - Help text to print for this option when listing all available options after the - user supplies a :attr:`help` option (such as ``"--help"``). If no help text is - supplied, the option will be listed without help text. To hide this option, use - the special value ``SUPPRESS_HELP``. - -* ``metavar`` (default: derived from option strings) - - Stand-in for the option argument(s) to use when printing help text. See section - :ref:`optparse-tutorial` for an example. + Prints the version number supplied to the OptionParser to stdout and exits. + The version number is actually formatted and printed by the + ``print_version()`` method of OptionParser. Generally only relevant if the + ``version`` argument is supplied to the OptionParser constructor. As with + :attr:`~Option.help` options, you will rarely create ``version`` options, + since :mod:`optparse` automatically adds them when needed. .. _optparse-standard-option-types: @@ -1122,14 +1155,14 @@ Standard option types ^^^^^^^^^^^^^^^^^^^^^ -:mod:`optparse` has five built-in option types: ``string``, ``int``, -``choice``, ``float`` and ``complex``. If you need to add new option types, see -section :ref:`optparse-extending-optparse`. +:mod:`optparse` has five built-in option types: ``"string"``, ``"int"``, +``"choice"``, ``"float"`` and ``"complex"``. If you need to add new +option types, see section :ref:`optparse-extending-optparse`. Arguments to string options are not checked or converted in any way: the text on the command line is stored in the destination (or passed to the callback) as-is. -Integer arguments (type ``int``) are parsed as follows: +Integer arguments (type ``"int"``) are parsed as follows: * if the number starts with ``0x``, it is parsed as a hexadecimal number @@ -1140,17 +1173,18 @@ * otherwise, the number is parsed as a decimal number -The conversion is done by calling ``int()`` with the appropriate base (2, 8, 10, -or 16). If this fails, so will :mod:`optparse`, although with a more useful +The conversion is done by calling :func:`int` with the appropriate base (2, 8, +10, or 16). If this fails, so will :mod:`optparse`, although with a more useful error message. -``float`` and ``complex`` option arguments are converted directly with -``float()`` and ``complex()``, with similar error-handling. +``"float"`` and ``"complex"`` option arguments are converted directly with +:func:`float` and :func:`complex`, with similar error-handling. -``choice`` options are a subtype of ``string`` options. The ``choices`` option -attribute (a sequence of strings) defines the set of allowed option arguments. -``optparse.check_choice()`` compares user-supplied option arguments against this -master list and raises :exc:`OptionValueError` if an invalid string is given. +``"choice"`` options are a subtype of ``"string"`` options. The +:attr:`~Option.choices`` option attribute (a sequence of strings) defines the +set of allowed option arguments. :func:`optparse.check_choice` compares +user-supplied option arguments against this master list and raises +:exc:`OptionValueError` if an invalid string is given. .. _optparse-parsing-arguments: @@ -1182,7 +1216,7 @@ the leftover positional arguments after all options have been processed The most common usage is to supply neither keyword argument. If you supply -``values``, it will be modified with repeated ``setattr()`` calls (roughly one +``values``, it will be modified with repeated :func:`setattr` calls (roughly one for every option argument stored to an option destination) and returned by :meth:`parse_args`. @@ -1197,37 +1231,51 @@ Querying and manipulating your option parser ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The default behavior of the option parser can be customized slightly, -and you can also poke around your option parser and see what's there. -OptionParser provides several methods to help you out: - -``disable_interspersed_args()`` - Set parsing to stop on the first non-option. Use this if you have a - command processor which runs another command which has options of - its own and you want to make sure these options don't get - confused. For example, each command might have a different - set of options. - -``enable_interspersed_args()`` - Set parsing to not stop on the first non-option, allowing - interspersing switches with command arguments. For example, - ``"-s arg1 --long arg2"`` would return ``["arg1", "arg2"]`` - as the command arguments and ``-s, --long`` as options. - This is the default behavior. +The default behavior of the option parser can be customized slightly, and you +can also poke around your option parser and see what's there. OptionParser +provides several methods to help you out: + +.. method:: OptionParser.disable_interspersed_args() + + Set parsing to stop on the first non-option. For example, if ``"-a"`` and + ``"-b"`` are both simple options that take no arguments, :mod:`optparse` + normally accepts this syntax:: + + prog -a arg1 -b arg2 + + and treats it as equivalent to :: + + prog -a -b arg1 arg2 + + To disable this feature, call :meth:`disable_interspersed_args`. This + restores traditional Unix syntax, where option parsing stops with the first + non-option argument. -``get_option(opt_str)`` - Returns the Option instance with the option string ``opt_str``, or ``None`` if + Use this if you have a command processor which runs another command which has + options of its own and you want to make sure these options don't get + confused. For example, each command might have a different set of options. + +.. method:: OptionParser.enable_interspersed_args() + + Set parsing to not stop on the first non-option, allowing interspersing + switches with command arguments. This is the default behavior. + +.. method:: OptionParser.get_option(opt_str) + + Returns the Option instance with the option string *opt_str*, or ``None`` if no options have that option string. -``has_option(opt_str)`` - Return true if the OptionParser has an option with option string ``opt_str`` +.. method:: OptionParser.has_option(opt_str) + + Return true if the OptionParser has an option with option string *opt_str* (e.g., ``"-q"`` or ``"--verbose"``). -``remove_option(opt_str)`` - If the :class:`OptionParser` has an option corresponding to ``opt_str``, that option is - removed. If that option provided any other option strings, all of those option - strings become invalid. If ``opt_str`` does not occur in any option belonging to - this :class:`OptionParser`, raises :exc:`ValueError`. +.. method:: OptionParser.remove_option(opt_str) + + If the :class:`OptionParser` has an option corresponding to *opt_str*, that + option is removed. If that option provided any other option strings, all of + those option strings become invalid. If *opt_str* does not occur in any + option belonging to this :class:`OptionParser`, raises :exc:`ValueError`. .. _optparse-conflicts-between-options: @@ -1257,10 +1305,11 @@ The available conflict handlers are: - ``error`` (default) - assume option conflicts are a programming error and raise :exc:`OptionConflictError` + ``"error"`` (default) + assume option conflicts are a programming error and raise + :exc:`OptionConflictError` - ``resolve`` + ``"resolve"`` resolve option conflicts intelligently (see below) @@ -1306,9 +1355,10 @@ OptionParser instances have several cyclic references. This should not be a problem for Python's garbage collector, but you may wish to break the cyclic -references explicitly by calling ``destroy()`` on your OptionParser once you are -done with it. This is particularly useful in long-running applications where -large object graphs are reachable from your OptionParser. +references explicitly by calling :meth:`~OptionParser.destroy` on your +OptionParser once you are done with it. This is particularly useful in +long-running applications where large object graphs are reachable from your +OptionParser. .. _optparse-other-methods: @@ -1318,51 +1368,34 @@ OptionParser supports several other public methods: -* ``set_usage(usage)`` - - Set the usage string according to the rules described above for the ``usage`` - constructor keyword argument. Passing ``None`` sets the default usage string; - use ``SUPPRESS_USAGE`` to suppress a usage message. - -* ``enable_interspersed_args()``, ``disable_interspersed_args()`` - - Enable/disable positional arguments interspersed with options, similar to GNU - getopt (enabled by default). For example, if ``"-a"`` and ``"-b"`` are both - simple options that take no arguments, :mod:`optparse` normally accepts this - syntax:: - - prog -a arg1 -b arg2 - - and treats it as equivalent to :: - - prog -a -b arg1 arg2 - - To disable this feature, call ``disable_interspersed_args()``. This restores - traditional Unix syntax, where option parsing stops with the first non-option - argument. +.. method:: OptionParser.set_usage(usage) -* ``set_defaults(dest=value, ...)`` - - Set default values for several option destinations at once. Using - :meth:`set_defaults` is the preferred way to set default values for options, - since multiple options can share the same destination. For example, if several - "mode" options all set the same destination, any one of them can set the - default, and the last one wins:: - - parser.add_option("--advanced", action="store_const", - dest="mode", const="advanced", - default="novice") # overridden below - parser.add_option("--novice", action="store_const", - dest="mode", const="novice", - default="advanced") # overrides above setting - - To avoid this confusion, use :meth:`set_defaults`:: - - parser.set_defaults(mode="advanced") - parser.add_option("--advanced", action="store_const", - dest="mode", const="advanced") - parser.add_option("--novice", action="store_const", - dest="mode", const="novice") + Set the usage string according to the rules described above for the ``usage`` + constructor keyword argument. Passing ``None`` sets the default usage + string; use :data:`optparse.SUPPRESS_USAGE` to suppress a usage message. + +.. method:: OptionParser.set_defaults(dest=value, ...) + + Set default values for several option destinations at once. Using + :meth:`set_defaults` is the preferred way to set default values for options, + since multiple options can share the same destination. For example, if + several "mode" options all set the same destination, any one of them can set + the default, and the last one wins:: + + parser.add_option("--advanced", action="store_const", + dest="mode", const="advanced", + default="novice") # overridden below + parser.add_option("--novice", action="store_const", + dest="mode", const="novice", + default="advanced") # overrides above setting + + To avoid this confusion, use :meth:`set_defaults`:: + + parser.set_defaults(mode="advanced") + parser.add_option("--advanced", action="store_const", + dest="mode", const="advanced") + parser.add_option("--novice", action="store_const", + dest="mode", const="novice") .. _optparse-option-callbacks: @@ -1377,7 +1410,7 @@ There are two steps to defining a callback option: -* define the option itself using the ``callback`` action +* define the option itself using the ``"callback"`` action * write the callback; this is a function (or method) that takes at least four arguments, as described below @@ -1389,8 +1422,8 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^ As always, the easiest way to define a callback option is by using the -``parser.add_option()`` method. Apart from :attr:`action`, the only option -attribute you must specify is ``callback``, the function to call:: +:meth:`OptionParser.add_option` method. Apart from :attr:`~Option.action`, the +only option attribute you must specify is ``callback``, the function to call:: parser.add_option("-c", action="callback", callback=my_callback) @@ -1404,8 +1437,9 @@ it's covered later in this section. :mod:`optparse` always passes four particular arguments to your callback, and it -will only pass additional arguments if you specify them via ``callback_args`` -and ``callback_kwargs``. Thus, the minimal callback function signature is:: +will only pass additional arguments if you specify them via +:attr:`~Option.callback_args` and :attr:`~Option.callback_kwargs`. Thus, the +minimal callback function signature is:: def my_callback(option, opt, value, parser): @@ -1414,21 +1448,22 @@ There are several other option attributes that you can supply when you define a callback option: -: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 - than storing the converted value(s) anywhere, though, :mod:`optparse` passes it - to your callback function. +:attr:`~Option.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:`~Option.type`. Rather than storing the converted value(s) anywhere, + though, :mod:`optparse` passes it to your callback function. -``nargs`` +:attr:`~Option.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`. - It then passes a tuple of converted values to your callback. + consume :attr:`~Option.nargs` arguments, each of which must be convertible to + :attr:`~Option.type`. It then passes a tuple of converted values to your + callback. -``callback_args`` +:attr:`~Option.callback_args` a tuple of extra positional arguments to pass to the callback -``callback_kwargs`` +:attr:`~Option.callback_kwargs` a dictionary of extra keyword arguments to pass to the callback @@ -1448,45 +1483,48 @@ ``opt_str`` is the option string seen on the command-line that's triggering the callback. - (If an abbreviated long option was used, ``opt_str`` will be the full, canonical - option string---e.g. if the user puts ``"--foo"`` on the command-line as an - abbreviation for ``"--foobar"``, then ``opt_str`` will be ``"--foobar"``.) + (If an abbreviated long option was used, ``opt_str`` will be the full, + canonical option string---e.g. if the user puts ``"--foo"`` on the + command-line as an abbreviation for ``"--foobar"``, then ``opt_str`` will be + ``"--foobar"``.) ``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 - ``None`` (no argument expected), then ``value`` will be ``None``. If ``nargs`` + only expect an argument if :attr:`~Option.type` is set; the type of ``value`` will be + the type implied by the option's type. If :attr:`~Option.type` for this option is + ``None`` (no argument expected), then ``value`` will be ``None``. If :attr:`~Option.nargs` > 1, ``value`` will be a tuple of values of the appropriate type. ``parser`` - is the OptionParser instance driving the whole thing, mainly useful because you - can access some other interesting data through its instance attributes: + is the OptionParser instance driving the whole thing, mainly useful because + you can access some other interesting data through its instance attributes: ``parser.largs`` - the current list of leftover arguments, ie. arguments that have been consumed - but are neither options nor option arguments. Feel free to modify - ``parser.largs``, e.g. by adding more arguments to it. (This list will become - ``args``, the second return value of :meth:`parse_args`.) + the current list of leftover arguments, ie. arguments that have been + consumed but are neither options nor option arguments. Feel free to modify + ``parser.largs``, e.g. by adding more arguments to it. (This list will + become ``args``, the second return value of :meth:`parse_args`.) ``parser.rargs`` - the current list of remaining arguments, ie. with ``opt_str`` and ``value`` (if - applicable) removed, and only the arguments following them still there. Feel - free to modify ``parser.rargs``, e.g. by consuming more arguments. + the current list of remaining arguments, ie. with ``opt_str`` and + ``value`` (if applicable) removed, and only the arguments following them + still there. Feel free to modify ``parser.rargs``, e.g. by consuming more + arguments. ``parser.values`` the object where option values are by default stored (an instance of - optparse.OptionValues). This lets callbacks use the same mechanism as the rest - of :mod:`optparse` for storing option values; you don't need to mess around with - globals or closures. You can also access or modify the value(s) of any options - already encountered on the command-line. + optparse.OptionValues). This lets callbacks use the same mechanism as the + rest of :mod:`optparse` for storing option values; you don't need to mess + around with globals or closures. You can also access or modify the + value(s) of any options already encountered on the command-line. ``args`` - is a tuple of arbitrary positional arguments supplied via the ``callback_args`` - option attribute. + is a tuple of arbitrary positional arguments supplied via the + :attr:`~Option.callback_args` option attribute. ``kwargs`` - is a dictionary of arbitrary keyword arguments supplied via ``callback_kwargs``. + is a dictionary of arbitrary keyword arguments supplied via + :attr:`~Option.callback_kwargs`. .. _optparse-raising-errors-in-callback: @@ -1494,11 +1532,11 @@ Raising errors in a callback ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The callback function should raise :exc:`OptionValueError` if there are any problems -with the option or its argument(s). :mod:`optparse` catches this and terminates -the program, printing the error message you supply to stderr. Your message -should be clear, concise, accurate, and mention the option at fault. Otherwise, -the user will have a hard time figuring out what he did wrong. +The callback function should raise :exc:`OptionValueError` if there are any +problems with the option or its argument(s). :mod:`optparse` catches this and +terminates the program, printing the error message you supply to stderr. Your +message should be clear, concise, accurate, and mention the option at fault. +Otherwise, the user will have a hard time figuring out what he did wrong. .. _optparse-callback-example-1: @@ -1514,7 +1552,7 @@ parser.add_option("--foo", action="callback", callback=record_foo_seen) -Of course, you could do that with the ``store_true`` action. +Of course, you could do that with the ``"store_true"`` action. .. _optparse-callback-example-2: @@ -1581,12 +1619,12 @@ 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 -that type; if you further define ``nargs``, then the option takes ``nargs`` -arguments. +is similar to defining a ``"store"`` or ``"append"`` option: if you define +:attr:`~Option.type`, then the option takes one argument that must be +convertible to that type; if you further define :attr:`~Option.nargs`, then the +option takes :attr:`~Option.nargs` arguments. -Here's an example that just emulates the standard ``store`` action:: +Here's an example that just emulates the standard ``"store"`` action:: def store_value(option, opt_str, value, parser): setattr(parser.values, option.dest, value) @@ -1673,32 +1711,36 @@ ^^^^^^^^^^^^^^^^ To add new types, you need to define your own subclass of :mod:`optparse`'s -Option class. This class has a couple of attributes that define -:mod:`optparse`'s types: :attr:`TYPES` and :attr:`TYPE_CHECKER`. +:class:`Option` class. This class has a couple of attributes that define +:mod:`optparse`'s types: :attr:`~Option.TYPES` and :attr:`~Option.TYPE_CHECKER`. + +.. attribute:: Option.TYPES + + A tuple of type names; in your subclass, simply define a new tuple + :attr:`TYPES` that builds on the standard one. + +.. attribute:: Option.TYPE_CHECKER -:attr:`TYPES` is a tuple of type names; in your subclass, simply define a new -tuple :attr:`TYPES` that builds on the standard one. + A dictionary mapping type names to type-checking functions. A type-checking + function has the following signature:: -:attr:`TYPE_CHECKER` is a dictionary mapping type names to type-checking -functions. A type-checking function has the following signature:: + def check_mytype(option, opt, value) - def check_mytype(option, opt, value) - -where ``option`` is an :class:`Option` instance, ``opt`` is an option string -(e.g., ``"-f"``), and ``value`` is the string from the command line that must be -checked and converted to your desired type. ``check_mytype()`` should return an -object of the hypothetical type ``mytype``. The value returned by a -type-checking function will wind up in the OptionValues instance returned by -:meth:`OptionParser.parse_args`, or be passed to a callback as the ``value`` -parameter. - -Your type-checking function should raise :exc:`OptionValueError` if it encounters any -problems. :exc:`OptionValueError` takes a single string argument, which is passed -as-is to :class:`OptionParser`'s :meth:`error` method, which in turn prepends the program -name and the string ``"error:"`` and prints everything to stderr before -terminating the process. + where ``option`` is an :class:`Option` instance, ``opt`` is an option string + (e.g., ``"-f"``), and ``value`` is the string from the command line that must + be checked and converted to your desired type. ``check_mytype()`` should + return an object of the hypothetical type ``mytype``. The value returned by + a type-checking function will wind up in the OptionValues instance returned + by :meth:`OptionParser.parse_args`, or be passed to a callback as the + ``value`` parameter. -Here's a silly example that demonstrates adding a ``complex`` option type to + Your type-checking function should raise :exc:`OptionValueError` if it + encounters any problems. :exc:`OptionValueError` takes a single string + argument, which is passed as-is to :class:`OptionParser`'s :meth:`error` + method, which in turn prepends the program name and the string ``"error:"`` + and prints everything to stderr before terminating the process. + +Here's a silly example that demonstrates adding a ``"complex"`` option type to parse Python-style complex numbers on the command line. (This is even sillier than it used to be, because :mod:`optparse` 1.3 added built-in support for complex numbers, but never mind.) @@ -1709,7 +1751,7 @@ from optparse import Option, OptionValueError You need to define your type-checker first, since it's referred to later (in the -:attr:`TYPE_CHECKER` class attribute of your Option subclass):: +:attr:`~Option.TYPE_CHECKER` class attribute of your Option subclass):: def check_complex(option, opt, value): try: @@ -1726,9 +1768,9 @@ TYPE_CHECKER["complex"] = check_complex (If we didn't make a :func:`copy` of :attr:`Option.TYPE_CHECKER`, we would end -up modifying the :attr:`TYPE_CHECKER` attribute of :mod:`optparse`'s Option -class. This being Python, nothing stops you from doing that except good manners -and common sense.) +up modifying the :attr:`~Option.TYPE_CHECKER` attribute of :mod:`optparse`'s +Option class. This being Python, nothing stops you from doing that except good +manners and common sense.) That's it! Now you can write a script that uses the new option type just like any other :mod:`optparse`\ -based script, except you have to instruct your @@ -1755,45 +1797,50 @@ "store" actions actions that result in :mod:`optparse` storing a value to an attribute of the - current OptionValues instance; these options require a :attr:`dest` attribute to - be supplied to the Option constructor + current OptionValues instance; these options require a :attr:`~Option.dest` + attribute to be supplied to the Option constructor. "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. - -These are overlapping sets: some default "store" actions are ``store``, -``store_const``, ``append``, and ``count``, while the default "typed" actions -are ``store``, ``append``, and ``callback``. + 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:`~Option.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 are ``"store"``, ``"append"``, and ``"callback"``. When you add an action, you need to categorize it by listing it in at least one of the following class attributes of Option (all are lists of strings): -:attr:`ACTIONS` - all actions must be listed in ACTIONS +.. attribute:: Option.ACTIONS + + All actions must be listed in ACTIONS. + +.. attribute:: Option.STORE_ACTIONS -:attr:`STORE_ACTIONS` - "store" actions are additionally listed here + "store" actions are additionally listed here. -:attr:`TYPED_ACTIONS` - "typed" actions are additionally listed here +.. attribute:: Option.TYPED_ACTIONS -``ALWAYS_TYPED_ACTIONS`` - actions that always take a type (i.e. whose options always take a value) are + "typed" actions are additionally listed here. + +.. attribute:: Option.ALWAYS_TYPED_ACTIONS + + Actions that always take a type (i.e. whose options always take a value) are additionally listed here. The only effect of this is that :mod:`optparse` - assigns the default type, ``string``, to options with no explicit type whose - action is listed in ``ALWAYS_TYPED_ACTIONS``. + assigns the default type, ``"string"``, to options with no explicit type + whose action is listed in :attr:`ALWAYS_TYPED_ACTIONS`. In order to actually implement your new action, you must override Option's :meth:`take_action` method and add a case that recognizes your action. -For example, let's add an ``extend`` action. This is similar to the standard -``append`` action, but instead of taking a single value from the command-line -and appending it to an existing list, ``extend`` will take multiple values in a -single comma-delimited string, and extend an existing list with them. That is, -if ``"--names"`` is an ``extend`` option of type ``string``, the command line -:: +For example, let's add an ``"extend"`` action. This is similar to the standard +``"append"`` action, but instead of taking a single value from the command-line +and appending it to an existing list, ``"extend"`` will take multiple values in +a single comma-delimited string, and extend an existing list with them. That +is, if ``"--names"`` is an ``"extend"`` option of type ``"string"``, the command +line :: --names=foo,bar --names blah --names ding,dong @@ -1820,29 +1867,30 @@ Features of note: -* ``extend`` both expects a value on the command-line and stores that value - somewhere, so it goes in both :attr:`STORE_ACTIONS` and :attr:`TYPED_ACTIONS` - -* to ensure that :mod:`optparse` assigns the default type of ``string`` to - ``extend`` actions, we put the ``extend`` action in ``ALWAYS_TYPED_ACTIONS`` as - well +* ``"extend"`` both expects a value on the command-line and stores that value + somewhere, so it goes in both :attr:`~Option.STORE_ACTIONS` and + :attr:`~Option.TYPED_ACTIONS`. + +* to ensure that :mod:`optparse` assigns the default type of ``"string"`` to + ``"extend"`` actions, we put the ``"extend"`` action in + :attr:`~Option.ALWAYS_TYPED_ACTIONS` as well. * :meth:`MyOption.take_action` implements just this one new action, and passes control back to :meth:`Option.take_action` for the standard :mod:`optparse` - actions + actions. -* ``values`` is an instance of the optparse_parser.Values class, which - provides the very useful :meth:`ensure_value` method. :meth:`ensure_value` is - essentially :func:`getattr` with a safety valve; it is called as :: +* ``values`` is an instance of the optparse_parser.Values class, which provides + the very useful :meth:`ensure_value` method. :meth:`ensure_value` is + essentially :func:`getattr` with a safety valve; it is called as :: values.ensure_value(attr, value) If the ``attr`` attribute of ``values`` doesn't exist or is None, then - ensure_value() first sets it to ``value``, and then returns 'value. This is very - handy for actions like ``extend``, ``append``, and ``count``, all of which - accumulate data in a variable and expect that variable to be of a certain type - (a list for the first two, an integer for the latter). Using + ensure_value() first sets it to ``value``, and then returns 'value. This is + very handy for actions like ``"extend"``, ``"append"``, and ``"count"``, all + of which accumulate data in a variable and expect that variable to be of a + certain type (a list for the first two, an integer for the latter). Using :meth:`ensure_value` means that scripts using your action don't have to worry - about setting a default value for the option destinations in question; they can - just leave the default as None and :meth:`ensure_value` will take care of + about setting a default value for the option destinations in question; they + can just leave the default as None and :meth:`ensure_value` will take care of getting it right when it's needed. From python-checkins at python.org Fri Sep 18 00:18:01 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 17 Sep 2009 22:18:01 -0000 Subject: [Python-checkins] r74891 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 00:18:01 2009 New Revision: 74891 Log: Some more maintainers. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 00:18:01 2009 @@ -57,7 +57,7 @@ bdb binascii binhex -bisect +bisect rhettinger builtins bz2 calendar @@ -87,7 +87,7 @@ difflib dis distutils tarek -doctest +doctest tim_one (inactive) dummy_threading brett.cannon email barry encodings lemburg, loewis @@ -105,12 +105,12 @@ gc getopt getpass -gettext +gettext loewis glob grp gzip hashlib -heapq +heapq rhettinger hmac html http @@ -121,7 +121,7 @@ inspect io pitrou, benjamin.peterson itertools rhettinger -json +json bob.ippolito (inactive) keyword lib2to3 benjamin.peterson linecache @@ -156,7 +156,7 @@ plistlib poplib posix -pprint +pprint fdrake pstats pty pwd @@ -186,7 +186,7 @@ socket socketserver spwd -sqlite3 +sqlite3 ghaering ssl janssen stat string From python-checkins at python.org Fri Sep 18 01:23:56 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 17 Sep 2009 23:23:56 -0000 Subject: [Python-checkins] r74892 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: r.david.murray Date: Fri Sep 18 01:23:56 2009 New Revision: 74892 Log: Add a couple interest areas for Nick per his request. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 01:23:56 2009 @@ -257,7 +257,7 @@ Interest Area Maintainers ------------------ ----------- algorithms -ast/compiler +ast/compiler ncoghlan autoconf bsd buildbots @@ -266,7 +266,7 @@ documentation georg.brandl GUI i18n lemburg -import machinery brett.cannon +import machinery brett.cannon, ncoghlan io pitrou, benjamin.peterson locale lemburg, loewis makefiles From python-checkins at python.org Fri Sep 18 01:43:20 2009 From: python-checkins at python.org (r.david.murray) Date: Thu, 17 Sep 2009 23:43:20 -0000 Subject: [Python-checkins] r74893 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: r.david.murray Date: Fri Sep 18 01:43:20 2009 New Revision: 74893 Log: Benajmin is also compiler-knowledgeable. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 01:43:20 2009 @@ -257,7 +257,7 @@ Interest Area Maintainers ------------------ ----------- algorithms -ast/compiler ncoghlan +ast/compiler ncoghlan, benjamin.peterson autoconf bsd buildbots From python-checkins at python.org Fri Sep 18 02:59:06 2009 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 18 Sep 2009 00:59:06 -0000 Subject: [Python-checkins] r74894 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: alexandre.vassalotti Date: Fri Sep 18 02:59:05 2009 New Revision: 74894 Log: Added myself to my areas of interest. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 02:59:05 2009 @@ -74,8 +74,8 @@ compileall configparser contextlib -copy -copyreg +copy alexandre.vassalotti +copyreg alexandre.vassalotti cProfile crypt csv @@ -148,8 +148,8 @@ ossaudiodev parser pdb -pickle -pickletools +pickle alexandre.vassalotti +pickletools alexandre.vassalotti pipes pkgutil platform lemburg From python-checkins at python.org Fri Sep 18 03:03:35 2009 From: python-checkins at python.org (brett.cannon) Date: Fri, 18 Sep 2009 01:03:35 -0000 Subject: [Python-checkins] r74895 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: brett.cannon Date: Fri Sep 18 03:03:35 2009 New Revision: 74895 Log: Add myself to a couple places as maintainer. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 03:03:35 2009 @@ -206,7 +206,7 @@ test textwrap threading -time +time brett.cannon timeit tkinter gpolo token @@ -257,7 +257,7 @@ Interest Area Maintainers ------------------ ----------- algorithms -ast/compiler ncoghlan, benjamin.peterson +ast/compiler ncoghlan, benjamin.peterson, brett.cannon autoconf bsd buildbots From python-checkins at python.org Fri Sep 18 09:22:42 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 07:22:42 -0000 Subject: [Python-checkins] r74896 - python/trunk/Doc/tutorial/interpreter.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 09:22:41 2009 New Revision: 74896 Log: #6936: for interactive use, quit() is just fine. Modified: python/trunk/Doc/tutorial/interpreter.rst Modified: python/trunk/Doc/tutorial/interpreter.rst ============================================================================== --- python/trunk/Doc/tutorial/interpreter.rst (original) +++ python/trunk/Doc/tutorial/interpreter.rst Fri Sep 18 09:22:41 2009 @@ -31,7 +31,7 @@ Typing an end-of-file character (:kbd:`Control-D` on Unix, :kbd:`Control-Z` on Windows) at the primary prompt causes the interpreter to exit with a zero exit status. If that doesn't work, you can exit the interpreter by typing the -following commands: ``import sys; sys.exit()``. +following command: ``quit()``. The interpreter's line-editing features usually aren't very sophisticated. On Unix, whoever installed the interpreter may have enabled support for the GNU From python-checkins at python.org Fri Sep 18 09:27:51 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 07:27:51 -0000 Subject: [Python-checkins] r74897 - python/branches/py3k/Doc/tutorial/interpreter.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 09:27:51 2009 New Revision: 74897 Log: #6935: update version. Modified: python/branches/py3k/Doc/tutorial/interpreter.rst Modified: python/branches/py3k/Doc/tutorial/interpreter.rst ============================================================================== --- python/branches/py3k/Doc/tutorial/interpreter.rst (original) +++ python/branches/py3k/Doc/tutorial/interpreter.rst Fri Sep 18 09:27:51 2009 @@ -101,13 +101,13 @@ prints a welcome message stating its version number and a copyright notice before printing the first prompt:: - $ python3.1 - Python 3.1a1 (py3k, Sep 12 2007, 12:21:02) + $ python3.2 + Python 3.2 (py3k, Sep 12 2007, 12:21:02) [GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> -.. XXX update for final release of Python 3.1 +.. XXX update for new releases Continuation lines are needed when entering a multi-line construct. As an example, take a look at this :keyword:`if` statement:: @@ -243,7 +243,7 @@ .. rubric:: Footnotes -.. [#] On Unix, the 3.1 interpreter is by default not installed with the +.. [#] On Unix, the Python 3.x interpreter is by default not installed with the executable named ``python``, so that it does not conflict with a simultaneously installed Python 2.x executable. From python-checkins at python.org Fri Sep 18 09:28:32 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 07:28:32 -0000 Subject: [Python-checkins] r74898 - python/branches/release31-maint/Doc/tutorial/interpreter.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 09:28:32 2009 New Revision: 74898 Log: #6935: update version. Modified: python/branches/release31-maint/Doc/tutorial/interpreter.rst Modified: python/branches/release31-maint/Doc/tutorial/interpreter.rst ============================================================================== --- python/branches/release31-maint/Doc/tutorial/interpreter.rst (original) +++ python/branches/release31-maint/Doc/tutorial/interpreter.rst Fri Sep 18 09:28:32 2009 @@ -102,12 +102,12 @@ before printing the first prompt:: $ python3.1 - Python 3.1a1 (py3k, Sep 12 2007, 12:21:02) + Python 3.1 (py3k, Sep 12 2007, 12:21:02) [GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> -.. XXX update for final release of Python 3.1 +.. XXX update for new releases Continuation lines are needed when entering a multi-line construct. As an example, take a look at this :keyword:`if` statement:: @@ -243,7 +243,7 @@ .. rubric:: Footnotes -.. [#] On Unix, the 3.1 interpreter is by default not installed with the +.. [#] On Unix, the Python 3.x interpreter is by default not installed with the executable named ``python``, so that it does not conflict with a simultaneously installed Python 2.x executable. From python-checkins at python.org Fri Sep 18 09:28:54 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 07:28:54 -0000 Subject: [Python-checkins] r74899 - python/branches/release31-maint Message-ID: Author: georg.brandl Date: Fri Sep 18 09:28:54 2009 New Revision: 74899 Log: Blocked revisions 74897 via svnmerge ........ r74897 | georg.brandl | 2009-09-18 09:27:51 +0200 (Fr, 18 Sep 2009) | 1 line #6935: update version. ........ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Fri Sep 18 11:06:37 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 09:06:37 -0000 Subject: [Python-checkins] r74900 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 11:06:37 2009 New Revision: 74900 Log: Add myself in interest areas. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 11:06:37 2009 @@ -257,11 +257,11 @@ Interest Area Maintainers ------------------ ----------- algorithms -ast/compiler ncoghlan, benjamin.peterson, brett.cannon +ast/compiler ncoghlan, benjamin.peterson, brett.cannon, georg.brandl autoconf bsd buildbots -data formats mark.dickinson +data formats mark.dickinson, georg.brandl database lemburg documentation georg.brandl GUI From python-checkins at python.org Fri Sep 18 11:14:52 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 09:14:52 -0000 Subject: [Python-checkins] r74901 - python/trunk/Lib/inspect.py Message-ID: Author: georg.brandl Date: Fri Sep 18 11:14:52 2009 New Revision: 74901 Log: #6905: use better exception messages in inspect when the argument is of the wrong type. Modified: python/trunk/Lib/inspect.py Modified: python/trunk/Lib/inspect.py ============================================================================== --- python/trunk/Lib/inspect.py (original) +++ python/trunk/Lib/inspect.py Fri Sep 18 11:14:52 2009 @@ -402,12 +402,12 @@ if ismodule(object): if hasattr(object, '__file__'): return object.__file__ - raise TypeError('arg is a built-in module') + raise TypeError('%r is a built-in module' % object) if isclass(object): object = sys.modules.get(object.__module__) if hasattr(object, '__file__'): return object.__file__ - raise TypeError('arg is a built-in class') + raise TypeError('%r is a built-in class' % object) if ismethod(object): object = object.im_func if isfunction(object): @@ -418,8 +418,8 @@ object = object.f_code if iscode(object): return object.co_filename - raise TypeError('arg is not a module, class, method, ' - 'function, traceback, frame, or code object') + raise TypeError('%r is not a module, class, method, ' + 'function, traceback, frame, or code object' % object) ModuleInfo = namedtuple('ModuleInfo', 'name suffix mode module_type') @@ -741,7 +741,7 @@ 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not iscode(co): - raise TypeError('arg is not a code object') + raise TypeError('%r is not a code object' % co) nargs = co.co_argcount names = co.co_varnames @@ -805,7 +805,7 @@ if ismethod(func): func = func.im_func if not isfunction(func): - raise TypeError('arg is not a Python function') + raise TypeError('%r is not a Python function' % func) args, varargs, varkw = getargs(func.func_code) return ArgSpec(args, varargs, varkw, func.func_defaults) @@ -902,7 +902,7 @@ else: lineno = frame.f_lineno if not isframe(frame): - raise TypeError('arg is not a frame or traceback object') + raise TypeError('%r is not a frame or traceback object' % frame) filename = getsourcefile(frame) or getfile(frame) if context > 0: From python-checkins at python.org Fri Sep 18 11:15:59 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 09:15:59 -0000 Subject: [Python-checkins] r74902 - python/branches/release26-maint Message-ID: Author: georg.brandl Date: Fri Sep 18 11:15:58 2009 New Revision: 74902 Log: Blocked revisions 74901 via svnmerge ........ r74901 | georg.brandl | 2009-09-18 11:14:52 +0200 (Fr, 18 Sep 2009) | 1 line #6905: use better exception messages in inspect when the argument is of the wrong type. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Fri Sep 18 11:18:28 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 09:18:28 -0000 Subject: [Python-checkins] r74903 - in python/trunk: Lib/multiprocessing/managers.py Misc/NEWS Message-ID: Author: georg.brandl Date: Fri Sep 18 11:18:27 2009 New Revision: 74903 Log: #6938: "ident" is always a string, so use a format code which works. Modified: python/trunk/Lib/multiprocessing/managers.py python/trunk/Misc/NEWS Modified: python/trunk/Lib/multiprocessing/managers.py ============================================================================== --- python/trunk/Lib/multiprocessing/managers.py (original) +++ python/trunk/Lib/multiprocessing/managers.py Fri Sep 18 11:18:27 2009 @@ -410,7 +410,7 @@ self.id_to_refcount[ident] -= 1 if self.id_to_refcount[ident] == 0: del self.id_to_obj[ident], self.id_to_refcount[ident] - util.debug('disposing of obj with id %d', ident) + util.debug('disposing of obj with id %r', ident) finally: self.mutex.release() Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Sep 18 11:18:27 2009 @@ -376,6 +376,9 @@ Library ------- +- Issue #6938: Fix a TypeError in string formatting of a multiprocessing + debug message. + - Issue #6635: Fix profiler printing usage message. - Issue #6856: Add a filter keyword argument to TarFile.add(). From python-checkins at python.org Fri Sep 18 11:19:53 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 09:19:53 -0000 Subject: [Python-checkins] r74904 - in python/branches/release26-maint: Lib/multiprocessing/managers.py Misc/NEWS Message-ID: Author: georg.brandl Date: Fri Sep 18 11:19:52 2009 New Revision: 74904 Log: Merged revisions 74903 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74903 | georg.brandl | 2009-09-18 11:18:27 +0200 (Fr, 18 Sep 2009) | 1 line #6938: "ident" is always a string, so use a format code which works. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/multiprocessing/managers.py python/branches/release26-maint/Misc/NEWS Modified: python/branches/release26-maint/Lib/multiprocessing/managers.py ============================================================================== --- python/branches/release26-maint/Lib/multiprocessing/managers.py (original) +++ python/branches/release26-maint/Lib/multiprocessing/managers.py Fri Sep 18 11:19:52 2009 @@ -410,7 +410,7 @@ self.id_to_refcount[ident] -= 1 if self.id_to_refcount[ident] == 0: del self.id_to_obj[ident], self.id_to_refcount[ident] - util.debug('disposing of obj with id %d', ident) + util.debug('disposing of obj with id %r', ident) finally: self.mutex.release() Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Fri Sep 18 11:19:52 2009 @@ -82,6 +82,9 @@ Library ------- +- Issue #6938: Fix a TypeError in string formatting of a multiprocessing + debug message. + - Issue #6635: Fix profiler printing usage message. - Issue #6795: int(Decimal('nan')) now raises ValueError instead of From python-checkins at python.org Fri Sep 18 11:58:43 2009 From: python-checkins at python.org (ezio.melotti) Date: Fri, 18 Sep 2009 09:58:43 -0000 Subject: [Python-checkins] r74905 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: ezio.melotti Date: Fri Sep 18 11:58:43 2009 New Revision: 74905 Log: Add myself in interest areas and mark effbot as inactive in winsound Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 11:58:43 2009 @@ -226,7 +226,7 @@ weakref fdrake webbrowser georg.brandl winreg -winsound effbot +winsound effbot (inactive) wsgiref pje xdrlib xml loewis @@ -263,7 +263,7 @@ buildbots data formats mark.dickinson, georg.brandl database lemburg -documentation georg.brandl +documentation georg.brandl, ezio.melotti GUI i18n lemburg import machinery brett.cannon, ncoghlan From benjamin at python.org Fri Sep 18 13:38:20 2009 From: benjamin at python.org (Benjamin Peterson) Date: Fri, 18 Sep 2009 06:38:20 -0500 Subject: [Python-checkins] r74901 - python/trunk/Lib/inspect.py In-Reply-To: <4ab34f91.1367f10a.14e7.213aSMTPIN_ADDED@mx.google.com> References: <4ab34f91.1367f10a.14e7.213aSMTPIN_ADDED@mx.google.com> Message-ID: <1afaf6160909180438n318b3f67l7fa83651ef031801@mail.gmail.com> 2009/9/18 georg.brandl : > Author: georg.brandl > Date: Fri Sep 18 11:14:52 2009 > New Revision: 74901 > > Log: > #6905: use better exception messages in inspect when the argument is of the wrong type. > > Modified: > ? python/trunk/Lib/inspect.py > > Modified: python/trunk/Lib/inspect.py > ============================================================================== > --- python/trunk/Lib/inspect.py (original) > +++ python/trunk/Lib/inspect.py Fri Sep 18 11:14:52 2009 > @@ -402,12 +402,12 @@ > ? ? if ismodule(object): > ? ? ? ? if hasattr(object, '__file__'): > ? ? ? ? ? ? return object.__file__ > - ? ? ? ?raise TypeError('arg is a built-in module') > + ? ? ? ?raise TypeError('%r is a built-in module' % object) You should use a (object,) or .format(). -- Regards, Benjamin From python-checkins at python.org Fri Sep 18 15:15:23 2009 From: python-checkins at python.org (antoine.pitrou) Date: Fri, 18 Sep 2009 13:15:23 -0000 Subject: [Python-checkins] r74906 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: antoine.pitrou Date: Fri Sep 18 15:15:23 2009 New Revision: 74906 Log: Add myself in a couple of places Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 15:15:23 2009 @@ -102,7 +102,7 @@ fractions mark.dickinson ftplib functools -gc +gc pitrou getopt getpass gettext loewis @@ -148,7 +148,7 @@ ossaudiodev parser pdb -pickle alexandre.vassalotti +pickle alexandre.vassalotti, pitrou pickletools alexandre.vassalotti pipes pkgutil @@ -161,13 +161,13 @@ pty pwd py_compile -pybench lemburg +pybench lemburg, pitrou pyclbr pydoc queue quopri random rhettinger -re effbot (inactive) +re effbot (inactive), pitrou readline reprlib resource @@ -261,6 +261,7 @@ autoconf bsd buildbots +bytecode pitrou data formats mark.dickinson, georg.brandl database lemburg documentation georg.brandl, ezio.melotti @@ -277,7 +278,7 @@ release management tarek, lemburg str.format eric.smith time and dates lemburg -testing michael.foord +testing michael.foord, pitrou threads unicode lemburg windows From python-checkins at python.org Fri Sep 18 15:23:14 2009 From: python-checkins at python.org (eric.smith) Date: Fri, 18 Sep 2009 13:23:14 -0000 Subject: [Python-checkins] r74907 - in python/branches/py3k: Lib/ctypes/util.py Misc/NEWS Message-ID: Author: eric.smith Date: Fri Sep 18 15:23:13 2009 New Revision: 74907 Log: Issue #6882: Import uuid creates zombies processes. I used a slightly different patch than the one attached to the issue, to be consistent with the style in the rest of the module. Modified: python/branches/py3k/Lib/ctypes/util.py python/branches/py3k/Misc/NEWS Modified: python/branches/py3k/Lib/ctypes/util.py ============================================================================== --- python/branches/py3k/Lib/ctypes/util.py (original) +++ python/branches/py3k/Lib/ctypes/util.py Fri Sep 18 15:23:13 2009 @@ -219,8 +219,12 @@ # XXX assuming GLIBC's ldconfig (with option -p) expr = r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]*lib%s\.[^\(\)\s]*)' \ % (abi_type, re.escape(name)) - res = re.search(expr, - os.popen('/sbin/ldconfig -p 2>/dev/null').read()) + f = os.popen('/sbin/ldconfig -p 2>/dev/null') + try: + data = f.read() + finally: + f.close() + res = re.search(expr, data) if not res: return None return res.group(1) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Sep 18 15:23:13 2009 @@ -72,6 +72,8 @@ Library ------- +- Issue #6882: Import uuid creates zombies processes. + - Issue #6635: Fix profiler printing usage message. - Issue #6856: Add a filter keyword argument to TarFile.add(). From python-checkins at python.org Fri Sep 18 15:57:11 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 13:57:11 -0000 Subject: [Python-checkins] r74908 - python/trunk/Lib/inspect.py Message-ID: Author: georg.brandl Date: Fri Sep 18 15:57:11 2009 New Revision: 74908 Log: Use str.format() to fix beginner's mistake with %-style string formatting. Modified: python/trunk/Lib/inspect.py Modified: python/trunk/Lib/inspect.py ============================================================================== --- python/trunk/Lib/inspect.py (original) +++ python/trunk/Lib/inspect.py Fri Sep 18 15:57:11 2009 @@ -402,12 +402,12 @@ if ismodule(object): if hasattr(object, '__file__'): return object.__file__ - raise TypeError('%r is a built-in module' % object) + raise TypeError('{!r} is a built-in module'.format(object)) if isclass(object): object = sys.modules.get(object.__module__) if hasattr(object, '__file__'): return object.__file__ - raise TypeError('%r is a built-in class' % object) + raise TypeError('{!r} is a built-in class'.format(object)) if ismethod(object): object = object.im_func if isfunction(object): @@ -418,8 +418,8 @@ object = object.f_code if iscode(object): return object.co_filename - raise TypeError('%r is not a module, class, method, ' - 'function, traceback, frame, or code object' % object) + raise TypeError('{!r} is not a module, class, method, ' + 'function, traceback, frame, or code object'.format(object)) ModuleInfo = namedtuple('ModuleInfo', 'name suffix mode module_type') @@ -741,7 +741,7 @@ 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not iscode(co): - raise TypeError('%r is not a code object' % co) + raise TypeError('{!r} is not a code object'.format(co)) nargs = co.co_argcount names = co.co_varnames @@ -805,7 +805,7 @@ if ismethod(func): func = func.im_func if not isfunction(func): - raise TypeError('%r is not a Python function' % func) + raise TypeError('{!r} is not a Python function'.format(func)) args, varargs, varkw = getargs(func.func_code) return ArgSpec(args, varargs, varkw, func.func_defaults) @@ -902,7 +902,7 @@ else: lineno = frame.f_lineno if not isframe(frame): - raise TypeError('%r is not a frame or traceback object' % frame) + raise TypeError('{!r} is not a frame or traceback object'.format(frame)) filename = getsourcefile(frame) or getfile(frame) if context > 0: From g.brandl at gmx.net Fri Sep 18 15:55:14 2009 From: g.brandl at gmx.net (Georg Brandl) Date: Fri, 18 Sep 2009 15:55:14 +0200 Subject: [Python-checkins] r74901 - python/trunk/Lib/inspect.py In-Reply-To: <1afaf6160909180438n318b3f67l7fa83651ef031801@mail.gmail.com> References: <4ab34f91.1367f10a.14e7.213aSMTPIN_ADDED@mx.google.com> <1afaf6160909180438n318b3f67l7fa83651ef031801@mail.gmail.com> Message-ID: Benjamin Peterson schrieb: > 2009/9/18 georg.brandl : >> Author: georg.brandl >> Date: Fri Sep 18 11:14:52 2009 >> New Revision: 74901 >> >> Log: >> #6905: use better exception messages in inspect when the argument is of the wrong type. >> >> Modified: >> python/trunk/Lib/inspect.py >> >> Modified: python/trunk/Lib/inspect.py >> ============================================================================== >> --- python/trunk/Lib/inspect.py (original) >> +++ python/trunk/Lib/inspect.py Fri Sep 18 11:14:52 2009 >> @@ -402,12 +402,12 @@ >> if ismodule(object): >> if hasattr(object, '__file__'): >> return object.__file__ >> - raise TypeError('arg is a built-in module') >> + raise TypeError('%r is a built-in module' % object) > > You should use a (object,) or .format(). Ouch. Fixed in r74908. 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 Fri Sep 18 15:59:58 2009 From: python-checkins at python.org (eric.smith) Date: Fri, 18 Sep 2009 13:59:58 -0000 Subject: [Python-checkins] r74909 - in python/branches/release31-maint: Lib/ctypes/util.py Misc/NEWS Message-ID: Author: eric.smith Date: Fri Sep 18 15:59:58 2009 New Revision: 74909 Log: Merged revisions 74907 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74907 | eric.smith | 2009-09-18 09:23:13 -0400 (Fri, 18 Sep 2009) | 1 line Issue #6882: Import uuid creates zombies processes. I used a slightly different patch than the one attached to the issue, to be consistent with the style in the rest of the module. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/ctypes/util.py python/branches/release31-maint/Misc/NEWS Modified: python/branches/release31-maint/Lib/ctypes/util.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/util.py (original) +++ python/branches/release31-maint/Lib/ctypes/util.py Fri Sep 18 15:59:58 2009 @@ -219,8 +219,12 @@ # XXX assuming GLIBC's ldconfig (with option -p) expr = r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]*lib%s\.[^\(\)\s]*)' \ % (abi_type, re.escape(name)) - res = re.search(expr, - os.popen('/sbin/ldconfig -p 2>/dev/null').read()) + f = os.popen('/sbin/ldconfig -p 2>/dev/null') + try: + data = f.read() + finally: + f.close() + res = re.search(expr, data) if not res: return None return res.group(1) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Sep 18 15:59:58 2009 @@ -21,6 +21,8 @@ Library ------- +- Issue #6882: Import uuid creates zombies processes. + - Issue #6635: Fix profiler printing usage message. - Issue #6888: pdb's alias command was broken when no arguments were given. From python-checkins at python.org Fri Sep 18 16:53:09 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 14:53:09 -0000 Subject: [Python-checkins] r74910 - python/branches/py3k/Objects/longobject.c Message-ID: Author: mark.dickinson Date: Fri Sep 18 16:53:08 2009 New Revision: 74910 Log: Issue #6713 (continued): remove unused arbitrary-base conversion code from _PyLong_Format. Modified: python/branches/py3k/Objects/longobject.c Modified: python/branches/py3k/Objects/longobject.c ============================================================================== --- python/branches/py3k/Objects/longobject.c (original) +++ python/branches/py3k/Objects/longobject.c Fri Sep 18 16:53:08 2009 @@ -1763,8 +1763,8 @@ return (PyObject *)str; } -/* Convert a long int object to a string, using a given conversion base. - Return a string object. +/* Convert a long int object to a string, using a given conversion base, + which should be one of 2, 8, 10 or 16. Return a string object. If base is 2, 8 or 16, add the proper prefix '0b', '0o' or '0x'. */ PyObject * @@ -1774,10 +1774,10 @@ PyObject *str; Py_ssize_t i, sz; Py_ssize_t size_a; - Py_UNICODE *p; + Py_UNICODE *p, sign = '\0'; int bits; - char sign = '\0'; + assert(base == 2 || base == 8 || base == 10 || base == 16); if (base == 10) return long_to_decimal_string((PyObject *)a); @@ -1785,24 +1785,33 @@ PyErr_BadInternalCall(); return NULL; } - assert(base >= 2 && base <= 36); size_a = ABS(Py_SIZE(a)); /* Compute a rough upper bound for the length of the string */ - i = base; - bits = 0; - while (i > 1) { - ++bits; - i >>= 1; - } - i = 5; - /* ensure we don't get signed overflow in sz calculation */ - if (size_a > (PY_SSIZE_T_MAX - i) / PyLong_SHIFT) { + switch (base) { + case 16: + bits = 4; + break; + case 8: + bits = 3; + break; + case 2: + bits = 1; + break; + default: + assert(0); /* shouldn't ever get here */ + bits = 0; /* to silence gcc warning */ + } + /* compute length of output string: allow 2 characters for prefix and + 1 for possible '-' sign. */ + if (size_a > (PY_SSIZE_T_MAX - 3) / PyLong_SHIFT) { PyErr_SetString(PyExc_OverflowError, "int is too large to format"); return NULL; } - sz = i + 1 + (size_a * PyLong_SHIFT - 1) / bits; + /* now size_a * PyLong_SHIFT + 3 <= PY_SSIZE_T_MAX, so the RHS below + is safe from overflow */ + sz = 3 + (size_a * PyLong_SHIFT + (bits - 1)) / bits; assert(sz >= 0); str = PyUnicode_FromUnicode(NULL, sz); if (str == NULL) @@ -1815,106 +1824,32 @@ if (Py_SIZE(a) == 0) { *--p = '0'; } - else if ((base & (base - 1)) == 0) { + else { /* JRH: special case for power-of-2 bases */ twodigits accum = 0; int accumbits = 0; /* # of bits in accum */ - int basebits = 1; /* # of bits in base-1 */ - i = base; - while ((i >>= 1) > 1) - ++basebits; - for (i = 0; i < size_a; ++i) { accum |= (twodigits)a->ob_digit[i] << accumbits; accumbits += PyLong_SHIFT; - assert(accumbits >= basebits); + assert(accumbits >= bits); do { - char cdigit = (char)(accum & (base - 1)); + Py_UNICODE cdigit = accum & (base - 1); cdigit += (cdigit < 10) ? '0' : 'a'-10; assert(p > PyUnicode_AS_UNICODE(str)); *--p = cdigit; - accumbits -= basebits; - accum >>= basebits; - } while (i < size_a-1 ? accumbits >= basebits : - accum > 0); - } - } - else { - /* Not 0, and base not a power of 2. Divide repeatedly by - base, but for speed use the highest power of base that - fits in a digit. */ - Py_ssize_t size = size_a; - digit *pin = a->ob_digit; - PyLongObject *scratch; - /* powbasw <- largest power of base that fits in a digit. */ - digit powbase = base; /* powbase == base ** power */ - int power = 1; - for (;;) { - twodigits newpow = powbase * (twodigits)base; - if (newpow >> PyLong_SHIFT) - /* doesn't fit in a digit */ - break; - powbase = (digit)newpow; - ++power; - } - - /* Get a scratch area for repeated division. */ - scratch = _PyLong_New(size); - if (scratch == NULL) { - Py_DECREF(str); - return NULL; + accumbits -= bits; + accum >>= bits; + } while (i < size_a-1 ? accumbits >= bits : accum > 0); } - - /* Repeatedly divide by powbase. */ - do { - int ntostore = power; - digit rem = inplace_divrem1(scratch->ob_digit, - pin, size, powbase); - pin = scratch->ob_digit; /* no need to use a again */ - if (pin[size - 1] == 0) - --size; - SIGCHECK({ - Py_DECREF(scratch); - Py_DECREF(str); - return NULL; - }) - - /* Break rem into digits. */ - assert(ntostore > 0); - do { - digit nextrem = (digit)(rem / base); - char c = (char)(rem - nextrem * base); - assert(p > PyUnicode_AS_UNICODE(str)); - c += (c < 10) ? '0' : 'a'-10; - *--p = c; - rem = nextrem; - --ntostore; - /* Termination is a bit delicate: must not - store leading zeroes, so must get out if - remaining quotient and rem are both 0. */ - } while (ntostore && (size || rem)); - } while (size != 0); - Py_DECREF(scratch); } - if (base == 16) { + if (base == 16) *--p = 'x'; - *--p = '0'; - } - else if (base == 8) { + else if (base == 8) *--p = 'o'; - *--p = '0'; - } - else if (base == 2) { + else /* (base == 2) */ *--p = 'b'; - *--p = '0'; - } - else if (base != 10) { - *--p = '#'; - *--p = '0' + base%10; - if (base > 10) - *--p = '0' + base/10; - } + *--p = '0'; if (sign) *--p = sign; if (p != PyUnicode_AS_UNICODE(str)) { From python-checkins at python.org Fri Sep 18 16:53:47 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 14:53:47 -0000 Subject: [Python-checkins] r74911 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Fri Sep 18 16:53:47 2009 New Revision: 74911 Log: Blocked revisions 74910 via svnmerge ........ r74910 | mark.dickinson | 2009-09-18 15:53:08 +0100 (Fri, 18 Sep 2009) | 3 lines Issue #6713 (continued): remove unused arbitrary-base conversion code from _PyLong_Format. ........ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Fri Sep 18 18:19:56 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 16:19:56 -0000 Subject: [Python-checkins] r74912 - python/trunk/Lib/textwrap.py Message-ID: Author: georg.brandl Date: Fri Sep 18 18:19:56 2009 New Revision: 74912 Log: Optimize optimization and fix method name in docstring. Modified: python/trunk/Lib/textwrap.py Modified: python/trunk/Lib/textwrap.py ============================================================================== --- python/trunk/Lib/textwrap.py (original) +++ python/trunk/Lib/textwrap.py Fri Sep 18 18:19:56 2009 @@ -156,7 +156,7 @@ """_split(text : string) -> [string] Split the text to wrap into indivisible chunks. Chunks are - not quite the same as words; see wrap_chunks() for full + not quite the same as words; see _wrap_chunks() for full details. As an example, the text Look, goof-ball -- use the -b option! breaks into the following chunks: @@ -191,9 +191,9 @@ space to two. """ i = 0 - pat = self.sentence_end_re + patsearch = self.sentence_end_re.search while i < len(chunks)-1: - if chunks[i+1] == " " and pat.search(chunks[i]): + if chunks[i+1] == " " and patsearch(chunks[i]): chunks[i+1] = " " i += 2 else: From python-checkins at python.org Fri Sep 18 20:35:43 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 18:35:43 -0000 Subject: [Python-checkins] r74913 - python/trunk/Misc/ACKS Message-ID: Author: mark.dickinson Date: Fri Sep 18 20:35:42 2009 New Revision: 74913 Log: Add Gawain Bolton to Misc/ACKS for his work on base 10 integer -> string optimizations. Modified: python/trunk/Misc/ACKS Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Fri Sep 18 20:35:42 2009 @@ -81,6 +81,7 @@ Paul Boddie Matthew Boedicker David Bolen +Gawain Bolton Gregory Bond Jurjen Bos Peter Bosch From python-checkins at python.org Fri Sep 18 20:36:57 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 18:36:57 -0000 Subject: [Python-checkins] r74914 - in python/branches/py3k: Misc/ACKS Message-ID: Author: mark.dickinson Date: Fri Sep 18 20:36:57 2009 New Revision: 74914 Log: Merged revisions 74913 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74913 | mark.dickinson | 2009-09-18 19:35:42 +0100 (Fri, 18 Sep 2009) | 2 lines Add Gawain Bolton to Misc/ACKS for his work on base 10 integer -> string optimizations. ........ 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 Fri Sep 18 20:36:57 2009 @@ -80,6 +80,7 @@ Paul Boddie Matthew Boedicker David Bolen +Gawain Bolton Gregory Bond Jurjen Bos Peter Bosch From python-checkins at python.org Fri Sep 18 20:37:39 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 18:37:39 -0000 Subject: [Python-checkins] r74915 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Fri Sep 18 20:37:39 2009 New Revision: 74915 Log: Blocked revisions 74913 via svnmerge ........ r74913 | mark.dickinson | 2009-09-18 19:35:42 +0100 (Fri, 18 Sep 2009) | 2 lines Add Gawain Bolton to Misc/ACKS for his work on base 10 integer -> string optimizations. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Fri Sep 18 20:38:27 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 18:38:27 -0000 Subject: [Python-checkins] r74916 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Fri Sep 18 20:38:26 2009 New Revision: 74916 Log: Blocked revisions 74914 via svnmerge ................ r74914 | mark.dickinson | 2009-09-18 19:36:57 +0100 (Fri, 18 Sep 2009) | 9 lines Merged revisions 74913 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74913 | mark.dickinson | 2009-09-18 19:35:42 +0100 (Fri, 18 Sep 2009) | 2 lines Add Gawain Bolton to Misc/ACKS for his work on base 10 integer -> string optimizations. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Fri Sep 18 20:55:17 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 18 Sep 2009 18:55:17 -0000 Subject: [Python-checkins] r74917 - in python/trunk: Lib/ctypes/test/test_structures.py Misc/NEWS Modules/_ctypes/_ctypes.c Message-ID: Author: thomas.heller Date: Fri Sep 18 20:55:17 2009 New Revision: 74917 Log: Issue #5042: Structure sub-subclass does now initialize correctly with base class positional arguments. Modified: python/trunk/Lib/ctypes/test/test_structures.py python/trunk/Misc/NEWS python/trunk/Modules/_ctypes/_ctypes.c Modified: python/trunk/Lib/ctypes/test/test_structures.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_structures.py (original) +++ python/trunk/Lib/ctypes/test/test_structures.py Fri Sep 18 20:55:17 2009 @@ -355,6 +355,25 @@ self.assertTrue("from_address" in dir(type(Structure))) self.assertTrue("in_dll" in dir(type(Structure))) + def test_positional_args(self): + # see also http://bugs.python.org/issue5042 + class W(Structure): + _fields_ = [("a", c_int), ("b", c_int)] + class X(W): + _fields_ = [("c", c_int)] + class Y(X): + pass + class Z(Y): + _fields_ = [("d", c_int), ("e", c_int), ("f", c_int)] + + z = Z(1, 2, 3, 4, 5, 6) + self.failUnlessEqual((z.a, z.b, z.c, z.d, z.e, z.f), + (1, 2, 3, 4, 5, 6)) + z = Z(1) + self.failUnlessEqual((z.a, z.b, z.c, z.d, z.e, z.f), + (1, 0, 0, 0, 0, 0)) + self.assertRaises(TypeError, lambda: Z(1, 2, 3, 4, 5, 6, 7)) + class PointerMemberTestCase(unittest.TestCase): def test(self): Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Sep 18 20:55:17 2009 @@ -376,6 +376,9 @@ Library ------- +- Issue #5042: Structure sub-subclass does now initialize correctly + with base class positional arguments. + - Issue #6938: Fix a TypeError in string formatting of a multiprocessing debug message. Modified: python/trunk/Modules/_ctypes/_ctypes.c ============================================================================== --- python/trunk/Modules/_ctypes/_ctypes.c (original) +++ python/trunk/Modules/_ctypes/_ctypes.c Fri Sep 18 20:55:17 2009 @@ -4017,82 +4017,97 @@ return -1; } +/* + This function is called to initialize a Structure or Union with positional + arguments. It calls itself recursively for all Structure or Union base + classes, then retrieves the _fields_ member to associate the argument + position with the correct field name. + + Returns -1 on error, or the index of next argument on success. + */ static int -Struct_init(PyObject *self, PyObject *args, PyObject *kwds) +_init_pos_args(PyObject *self, PyTypeObject *type, + PyObject *args, PyObject *kwds, + int index) { - int i; + StgDictObject *dict; PyObject *fields; + int i; + + if (PyType_stgdict((PyObject *)type->tp_base)) { + index = _init_pos_args(self, type->tp_base, + args, kwds, + index); + if (index == -1) + return -1; + } + + dict = PyType_stgdict((PyObject *)type); + fields = PyDict_GetItemString((PyObject *)dict, "_fields_"); + if (fields == NULL) + return index; + + for (i = 0; + i < dict->length && (i+index) < PyTuple_GET_SIZE(args); + ++i) { + PyObject *pair = PySequence_GetItem(fields, i); + PyObject *name, *val; + int res; + if (!pair) + return -1; + name = PySequence_GetItem(pair, 0); + if (!name) { + Py_DECREF(pair); + return -1; + } + val = PyTuple_GET_ITEM(args, i + index); + if (kwds && PyDict_GetItem(kwds, name)) { + char *field = PyString_AsString(name); + if (field == NULL) { + PyErr_Clear(); + field = "???"; + } + PyErr_Format(PyExc_TypeError, + "duplicate values for field '%s'", + field); + Py_DECREF(pair); + Py_DECREF(name); + return -1; + } + + res = PyObject_SetAttr(self, name, val); + Py_DECREF(pair); + Py_DECREF(name); + if (res == -1) + return -1; + } + return index + dict->length; +} + +static int +Struct_init(PyObject *self, PyObject *args, PyObject *kwds) +{ + StgDictObject *stgdict = PyObject_stgdict(self); /* Optimization possible: Store the attribute names _fields_[x][0] * in C accessible fields somewhere ? */ -/* Check this code again for correctness! */ - if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, "args not a tuple?"); return -1; } if (PyTuple_GET_SIZE(args)) { - fields = PyObject_GetAttrString(self, "_fields_"); - if (!fields) { - PyErr_Clear(); - fields = PyTuple_New(0); - if (!fields) - return -1; - } - - if (PyTuple_GET_SIZE(args) > PySequence_Length(fields)) { - Py_DECREF(fields); + int res = _init_pos_args(self, Py_TYPE(self), + args, kwds, 0); + if (res == -1) + return -1; + if (res < PyTuple_GET_SIZE(args)) { PyErr_SetString(PyExc_TypeError, "too many initializers"); return -1; } - - for (i = 0; i < PyTuple_GET_SIZE(args); ++i) { - PyObject *pair = PySequence_GetItem(fields, i); - PyObject *name; - PyObject *val; - if (!pair) { - Py_DECREF(fields); - return IBUG("_fields_[i] failed"); - } - - name = PySequence_GetItem(pair, 0); - if (!name) { - Py_DECREF(pair); - Py_DECREF(fields); - return IBUG("_fields_[i][0] failed"); - } - - if (kwds && PyDict_GetItem(kwds, name)) { - char *field = PyString_AsString(name); - if (field == NULL) { - PyErr_Clear(); - field = "???"; - } - PyErr_Format(PyExc_TypeError, - "duplicate values for field %s", - field); - Py_DECREF(pair); - Py_DECREF(name); - Py_DECREF(fields); - return -1; - } - - val = PyTuple_GET_ITEM(args, i); - if (-1 == PyObject_SetAttr(self, name, val)) { - Py_DECREF(pair); - Py_DECREF(name); - Py_DECREF(fields); - return -1; - } - - Py_DECREF(name); - Py_DECREF(pair); - } - Py_DECREF(fields); } if (kwds) { From python-checkins at python.org Fri Sep 18 21:05:13 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 18 Sep 2009 19:05:13 -0000 Subject: [Python-checkins] r74918 - in python/branches/py3k: Lib/ctypes/test/test_structures.py Misc/NEWS Modules/_ctypes/_ctypes.c Message-ID: Author: thomas.heller Date: Fri Sep 18 21:05:13 2009 New Revision: 74918 Log: Merged revisions 74917 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74917 | thomas.heller | 2009-09-18 20:55:17 +0200 (Fr, 18 Sep 2009) | 3 lines Issue #5042: Structure sub-subclass does now initialize correctly with base class positional arguments. ........ Also made small stylistic changes. Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/ctypes/test/test_structures.py python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/_ctypes/_ctypes.c Modified: python/branches/py3k/Lib/ctypes/test/test_structures.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_structures.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_structures.py Fri Sep 18 21:05:13 2009 @@ -349,6 +349,25 @@ self.assertTrue("from_address" in dir(type(Structure))) self.assertTrue("in_dll" in dir(type(Structure))) + def test_positional_args(self): + # see also http://bugs.python.org/issue5042 + class W(Structure): + _fields_ = [("a", c_int), ("b", c_int)] + class X(W): + _fields_ = [("c", c_int)] + class Y(X): + pass + class Z(Y): + _fields_ = [("d", c_int), ("e", c_int), ("f", c_int)] + + z = Z(1, 2, 3, 4, 5, 6) + self.assertEqual((z.a, z.b, z.c, z.d, z.e, z.f), + (1, 2, 3, 4, 5, 6)) + z = Z(1) + self.assertEqual((z.a, z.b, z.c, z.d, z.e, z.f), + (1, 0, 0, 0, 0, 0)) + self.assertRaises(TypeError, lambda: Z(1, 2, 3, 4, 5, 6, 7)) + class PointerMemberTestCase(unittest.TestCase): def test(self): Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Sep 18 21:05:13 2009 @@ -72,6 +72,9 @@ Library ------- +- Issue #5042: Structure sub-subclass does now initialize correctly + with base class positional arguments. + - Issue #6882: Import uuid creates zombies processes. - Issue #6635: Fix profiler printing usage message. Modified: python/branches/py3k/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/py3k/Modules/_ctypes/_ctypes.c (original) +++ python/branches/py3k/Modules/_ctypes/_ctypes.c Fri Sep 18 21:05:13 2009 @@ -3936,82 +3936,97 @@ return -1; } +/* + This function is called to initialize a Structure or Union with positional + arguments. It calls itself recursively for all Structure or Union base + classes, then retrieves the _fields_ member to associate the argument + position with the correct field name. + + Returns -1 on error, or the index of next argument on success. + */ static int -Struct_init(PyObject *self, PyObject *args, PyObject *kwds) +_init_pos_args(PyObject *self, PyTypeObject *type, + PyObject *args, PyObject *kwds, + int index) { - int i; + StgDictObject *dict; PyObject *fields; + int i; + + if (PyType_stgdict((PyObject *)type->tp_base)) { + index = _init_pos_args(self, type->tp_base, + args, kwds, + index); + if (index == -1) + return -1; + } + + dict = PyType_stgdict((PyObject *)type); + fields = PyDict_GetItemString((PyObject *)dict, "_fields_"); + if (fields == NULL) + return index; + + for (i = 0; + i < dict->length && (i+index) < PyTuple_GET_SIZE(args); + ++i) { + PyObject *pair = PySequence_GetItem(fields, i); + PyObject *name, *val; + int res; + if (!pair) + return -1; + name = PySequence_GetItem(pair, 0); + if (!name) { + Py_DECREF(pair); + return -1; + } + val = PyTuple_GET_ITEM(args, i + index); + if (kwds && PyDict_GetItem(kwds, name)) { + char *field = PyBytes_AsString(name); + if (field == NULL) { + PyErr_Clear(); + field = "???"; + } + PyErr_Format(PyExc_TypeError, + "duplicate values for field '%s'", + field); + Py_DECREF(pair); + Py_DECREF(name); + return -1; + } + + res = PyObject_SetAttr(self, name, val); + Py_DECREF(pair); + Py_DECREF(name); + if (res == -1) + return -1; + } + return index + dict->length; +} + +static int +Struct_init(PyObject *self, PyObject *args, PyObject *kwds) +{ + StgDictObject *stgdict = PyObject_stgdict(self); /* Optimization possible: Store the attribute names _fields_[x][0] * in C accessible fields somewhere ? */ -/* Check this code again for correctness! */ - if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, "args not a tuple?"); return -1; } if (PyTuple_GET_SIZE(args)) { - fields = PyObject_GetAttrString(self, "_fields_"); - if (!fields) { - PyErr_Clear(); - fields = PyTuple_New(0); - if (!fields) - return -1; - } - - if (PyTuple_GET_SIZE(args) > PySequence_Length(fields)) { - Py_DECREF(fields); + int res = _init_pos_args(self, Py_TYPE(self), + args, kwds, 0); + if (res == -1) + return -1; + if (res < PyTuple_GET_SIZE(args)) { PyErr_SetString(PyExc_TypeError, "too many initializers"); return -1; } - - for (i = 0; i < PyTuple_GET_SIZE(args); ++i) { - PyObject *pair = PySequence_GetItem(fields, i); - PyObject *name; - PyObject *val; - if (!pair) { - Py_DECREF(fields); - return IBUG("_fields_[i] failed"); - } - - name = PySequence_GetItem(pair, 0); - if (!name) { - Py_DECREF(pair); - Py_DECREF(fields); - return IBUG("_fields_[i][0] failed"); - } - - if (kwds && PyDict_GetItem(kwds, name)) { - char *field = PyBytes_AsString(name); - if (field == NULL) { - PyErr_Clear(); - field = "???"; - } - PyErr_Format(PyExc_TypeError, - "duplicate values for field %s", - field); - Py_DECREF(pair); - Py_DECREF(name); - Py_DECREF(fields); - return -1; - } - - val = PyTuple_GET_ITEM(args, i); - if (-1 == PyObject_SetAttr(self, name, val)) { - Py_DECREF(pair); - Py_DECREF(name); - Py_DECREF(fields); - return -1; - } - - Py_DECREF(name); - Py_DECREF(pair); - } - Py_DECREF(fields); } if (kwds) { From python-checkins at python.org Fri Sep 18 21:32:13 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 18 Sep 2009 19:32:13 -0000 Subject: [Python-checkins] r74919 - in python/branches/release26-maint: Lib/ctypes/test/test_structures.py Misc/NEWS Modules/_ctypes/_ctypes.c Message-ID: Author: thomas.heller Date: Fri Sep 18 21:32:08 2009 New Revision: 74919 Log: Merged revisions 74917 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74917 | thomas.heller | 2009-09-18 20:55:17 +0200 (Fr, 18 Sep 2009) | 3 lines Issue #5042: Structure sub-subclass does now initialize correctly with base class positional arguments. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/ctypes/test/test_structures.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Modules/_ctypes/_ctypes.c Modified: python/branches/release26-maint/Lib/ctypes/test/test_structures.py ============================================================================== --- python/branches/release26-maint/Lib/ctypes/test/test_structures.py (original) +++ python/branches/release26-maint/Lib/ctypes/test/test_structures.py Fri Sep 18 21:32:08 2009 @@ -355,6 +355,25 @@ self.failUnless("from_address" in dir(type(Structure))) self.failUnless("in_dll" in dir(type(Structure))) + def test_positional_args(self): + # see also http://bugs.python.org/issue5042 + class W(Structure): + _fields_ = [("a", c_int), ("b", c_int)] + class X(W): + _fields_ = [("c", c_int)] + class Y(X): + pass + class Z(Y): + _fields_ = [("d", c_int), ("e", c_int), ("f", c_int)] + + z = Z(1, 2, 3, 4, 5, 6) + self.failUnlessEqual((z.a, z.b, z.c, z.d, z.e, z.f), + (1, 2, 3, 4, 5, 6)) + z = Z(1) + self.failUnlessEqual((z.a, z.b, z.c, z.d, z.e, z.f), + (1, 0, 0, 0, 0, 0)) + self.assertRaises(TypeError, lambda: Z(1, 2, 3, 4, 5, 6, 7)) + class PointerMemberTestCase(unittest.TestCase): def test(self): Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Fri Sep 18 21:32:08 2009 @@ -82,6 +82,9 @@ Library ------- +- Issue #5042: Structure sub-subclass does now initialize correctly + with base class positional arguments. + - Issue #6938: Fix a TypeError in string formatting of a multiprocessing debug message. Modified: python/branches/release26-maint/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/_ctypes.c (original) +++ python/branches/release26-maint/Modules/_ctypes/_ctypes.c Fri Sep 18 21:32:08 2009 @@ -4017,82 +4017,97 @@ return -1; } +/* + This function is called to initialize a Structure or Union with positional + arguments. It calls itself recursively for all Structure or Union base + classes, then retrieves the _fields_ member to associate the argument + position with the correct field name. + + Returns -1 on error, or the index of next argument on success. + */ static int -Struct_init(PyObject *self, PyObject *args, PyObject *kwds) +_init_pos_args(PyObject *self, PyTypeObject *type, + PyObject *args, PyObject *kwds, + int index) { - int i; + StgDictObject *dict; PyObject *fields; + int i; + + if (PyType_stgdict((PyObject *)type->tp_base)) { + index = _init_pos_args(self, type->tp_base, + args, kwds, + index); + if (index == -1) + return -1; + } + + dict = PyType_stgdict((PyObject *)type); + fields = PyDict_GetItemString((PyObject *)dict, "_fields_"); + if (fields == NULL) + return index; + + for (i = 0; + i < dict->length && (i+index) < PyTuple_GET_SIZE(args); + ++i) { + PyObject *pair = PySequence_GetItem(fields, i); + PyObject *name, *val; + int res; + if (!pair) + return -1; + name = PySequence_GetItem(pair, 0); + if (!name) { + Py_DECREF(pair); + return -1; + } + val = PyTuple_GET_ITEM(args, i + index); + if (kwds && PyDict_GetItem(kwds, name)) { + char *field = PyString_AsString(name); + if (field == NULL) { + PyErr_Clear(); + field = "???"; + } + PyErr_Format(PyExc_TypeError, + "duplicate values for field '%s'", + field); + Py_DECREF(pair); + Py_DECREF(name); + return -1; + } + + res = PyObject_SetAttr(self, name, val); + Py_DECREF(pair); + Py_DECREF(name); + if (res == -1) + return -1; + } + return index + dict->length; +} + +static int +Struct_init(PyObject *self, PyObject *args, PyObject *kwds) +{ + StgDictObject *stgdict = PyObject_stgdict(self); /* Optimization possible: Store the attribute names _fields_[x][0] * in C accessible fields somewhere ? */ -/* Check this code again for correctness! */ - if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, "args not a tuple?"); return -1; } if (PyTuple_GET_SIZE(args)) { - fields = PyObject_GetAttrString(self, "_fields_"); - if (!fields) { - PyErr_Clear(); - fields = PyTuple_New(0); - if (!fields) - return -1; - } - - if (PyTuple_GET_SIZE(args) > PySequence_Length(fields)) { - Py_DECREF(fields); + int res = _init_pos_args(self, Py_TYPE(self), + args, kwds, 0); + if (res == -1) + return -1; + if (res < PyTuple_GET_SIZE(args)) { PyErr_SetString(PyExc_TypeError, "too many initializers"); return -1; } - - for (i = 0; i < PyTuple_GET_SIZE(args); ++i) { - PyObject *pair = PySequence_GetItem(fields, i); - PyObject *name; - PyObject *val; - if (!pair) { - Py_DECREF(fields); - return IBUG("_fields_[i] failed"); - } - - name = PySequence_GetItem(pair, 0); - if (!name) { - Py_DECREF(pair); - Py_DECREF(fields); - return IBUG("_fields_[i][0] failed"); - } - - if (kwds && PyDict_GetItem(kwds, name)) { - char *field = PyString_AsString(name); - if (field == NULL) { - PyErr_Clear(); - field = "???"; - } - PyErr_Format(PyExc_TypeError, - "duplicate values for field %s", - field); - Py_DECREF(pair); - Py_DECREF(name); - Py_DECREF(fields); - return -1; - } - - val = PyTuple_GET_ITEM(args, i); - if (-1 == PyObject_SetAttr(self, name, val)) { - Py_DECREF(pair); - Py_DECREF(name); - Py_DECREF(fields); - return -1; - } - - Py_DECREF(name); - Py_DECREF(pair); - } - Py_DECREF(fields); } if (kwds) { From python-checkins at python.org Fri Sep 18 21:46:56 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 18 Sep 2009 19:46:56 -0000 Subject: [Python-checkins] r74920 - in python/branches/release31-maint: Lib/ctypes/test/test_structures.py Misc/NEWS Modules/_ctypes/_ctypes.c Message-ID: Author: thomas.heller Date: Fri Sep 18 21:46:56 2009 New Revision: 74920 Log: Merged revisions 74918 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74918 | thomas.heller | 2009-09-18 21:05:13 +0200 (Fr, 18 Sep 2009) | 11 lines Merged revisions 74917 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74917 | thomas.heller | 2009-09-18 20:55:17 +0200 (Fr, 18 Sep 2009) | 3 lines Issue #5042: Structure sub-subclass does now initialize correctly with base class positional arguments. ........ Also made small stylistic changes. ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/ctypes/test/test_structures.py python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Modules/_ctypes/_ctypes.c Modified: python/branches/release31-maint/Lib/ctypes/test/test_structures.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_structures.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_structures.py Fri Sep 18 21:46:56 2009 @@ -349,6 +349,25 @@ self.assertTrue("from_address" in dir(type(Structure))) self.assertTrue("in_dll" in dir(type(Structure))) + def test_positional_args(self): + # see also http://bugs.python.org/issue5042 + class W(Structure): + _fields_ = [("a", c_int), ("b", c_int)] + class X(W): + _fields_ = [("c", c_int)] + class Y(X): + pass + class Z(Y): + _fields_ = [("d", c_int), ("e", c_int), ("f", c_int)] + + z = Z(1, 2, 3, 4, 5, 6) + self.assertEqual((z.a, z.b, z.c, z.d, z.e, z.f), + (1, 2, 3, 4, 5, 6)) + z = Z(1) + self.assertEqual((z.a, z.b, z.c, z.d, z.e, z.f), + (1, 0, 0, 0, 0, 0)) + self.assertRaises(TypeError, lambda: Z(1, 2, 3, 4, 5, 6, 7)) + class PointerMemberTestCase(unittest.TestCase): def test(self): Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Sep 18 21:46:56 2009 @@ -21,6 +21,9 @@ Library ------- +- Issue #5042: Structure sub-subclass does now initialize correctly + with base class positional arguments. + - Issue #6882: Import uuid creates zombies processes. - Issue #6635: Fix profiler printing usage message. Modified: python/branches/release31-maint/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/_ctypes.c (original) +++ python/branches/release31-maint/Modules/_ctypes/_ctypes.c Fri Sep 18 21:46:56 2009 @@ -3936,82 +3936,97 @@ return -1; } +/* + This function is called to initialize a Structure or Union with positional + arguments. It calls itself recursively for all Structure or Union base + classes, then retrieves the _fields_ member to associate the argument + position with the correct field name. + + Returns -1 on error, or the index of next argument on success. + */ static int -Struct_init(PyObject *self, PyObject *args, PyObject *kwds) +_init_pos_args(PyObject *self, PyTypeObject *type, + PyObject *args, PyObject *kwds, + int index) { - int i; + StgDictObject *dict; PyObject *fields; + int i; + + if (PyType_stgdict((PyObject *)type->tp_base)) { + index = _init_pos_args(self, type->tp_base, + args, kwds, + index); + if (index == -1) + return -1; + } + + dict = PyType_stgdict((PyObject *)type); + fields = PyDict_GetItemString((PyObject *)dict, "_fields_"); + if (fields == NULL) + return index; + + for (i = 0; + i < dict->length && (i+index) < PyTuple_GET_SIZE(args); + ++i) { + PyObject *pair = PySequence_GetItem(fields, i); + PyObject *name, *val; + int res; + if (!pair) + return -1; + name = PySequence_GetItem(pair, 0); + if (!name) { + Py_DECREF(pair); + return -1; + } + val = PyTuple_GET_ITEM(args, i + index); + if (kwds && PyDict_GetItem(kwds, name)) { + char *field = PyBytes_AsString(name); + if (field == NULL) { + PyErr_Clear(); + field = "???"; + } + PyErr_Format(PyExc_TypeError, + "duplicate values for field '%s'", + field); + Py_DECREF(pair); + Py_DECREF(name); + return -1; + } + + res = PyObject_SetAttr(self, name, val); + Py_DECREF(pair); + Py_DECREF(name); + if (res == -1) + return -1; + } + return index + dict->length; +} + +static int +Struct_init(PyObject *self, PyObject *args, PyObject *kwds) +{ + StgDictObject *stgdict = PyObject_stgdict(self); /* Optimization possible: Store the attribute names _fields_[x][0] * in C accessible fields somewhere ? */ -/* Check this code again for correctness! */ - if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, "args not a tuple?"); return -1; } if (PyTuple_GET_SIZE(args)) { - fields = PyObject_GetAttrString(self, "_fields_"); - if (!fields) { - PyErr_Clear(); - fields = PyTuple_New(0); - if (!fields) - return -1; - } - - if (PyTuple_GET_SIZE(args) > PySequence_Length(fields)) { - Py_DECREF(fields); + int res = _init_pos_args(self, Py_TYPE(self), + args, kwds, 0); + if (res == -1) + return -1; + if (res < PyTuple_GET_SIZE(args)) { PyErr_SetString(PyExc_TypeError, "too many initializers"); return -1; } - - for (i = 0; i < PyTuple_GET_SIZE(args); ++i) { - PyObject *pair = PySequence_GetItem(fields, i); - PyObject *name; - PyObject *val; - if (!pair) { - Py_DECREF(fields); - return IBUG("_fields_[i] failed"); - } - - name = PySequence_GetItem(pair, 0); - if (!name) { - Py_DECREF(pair); - Py_DECREF(fields); - return IBUG("_fields_[i][0] failed"); - } - - if (kwds && PyDict_GetItem(kwds, name)) { - char *field = PyBytes_AsString(name); - if (field == NULL) { - PyErr_Clear(); - field = "???"; - } - PyErr_Format(PyExc_TypeError, - "duplicate values for field %s", - field); - Py_DECREF(pair); - Py_DECREF(name); - Py_DECREF(fields); - return -1; - } - - val = PyTuple_GET_ITEM(args, i); - if (-1 == PyObject_SetAttr(self, name, val)) { - Py_DECREF(pair); - Py_DECREF(name); - Py_DECREF(fields); - return -1; - } - - Py_DECREF(name); - Py_DECREF(pair); - } - Py_DECREF(fields); } if (kwds) { From python-checkins at python.org Fri Sep 18 22:05:44 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 18 Sep 2009 20:05:44 -0000 Subject: [Python-checkins] r74921 - in python/trunk: Lib/ctypes/test/test_parameters.py Misc/NEWS Modules/_ctypes/_ctypes.c Modules/_ctypes/callproc.c Message-ID: Author: thomas.heller Date: Fri Sep 18 22:05:44 2009 New Revision: 74921 Log: Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL. Modified: python/trunk/Lib/ctypes/test/test_parameters.py python/trunk/Misc/NEWS python/trunk/Modules/_ctypes/_ctypes.c python/trunk/Modules/_ctypes/callproc.c 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 Fri Sep 18 22:05:44 2009 @@ -97,7 +97,7 @@ self.assertEqual(x.contents.value, 42) self.assertEqual(LPINT(c_int(42)).contents.value, 42) - self.assertEqual(LPINT.from_param(None), 0) + self.assertEqual(LPINT.from_param(None), None) if c_int != c_long: self.assertRaises(TypeError, LPINT.from_param, pointer(c_long(42))) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Sep 18 22:05:44 2009 @@ -376,8 +376,11 @@ Library ------- -- Issue #5042: Structure sub-subclass does now initialize correctly - with base class positional arguments. +- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) + does now always result in NULL. + +- Issue #5042: ctypes Structure sub-subclass does now initialize + correctly with base class positional arguments. - Issue #6938: Fix a TypeError in string formatting of a multiprocessing debug message. Modified: python/trunk/Modules/_ctypes/_ctypes.c ============================================================================== --- python/trunk/Modules/_ctypes/_ctypes.c (original) +++ python/trunk/Modules/_ctypes/_ctypes.c Fri Sep 18 22:05:44 2009 @@ -972,8 +972,11 @@ { StgDictObject *typedict; - if (value == Py_None) - return PyInt_FromLong(0); /* NULL pointer */ + if (value == Py_None) { + /* ConvParam will convert to a NULL pointer later */ + Py_INCREF(value); + return value; + } typedict = PyType_stgdict(type); assert(typedict); /* Cannot be NULL for pointer types */ Modified: python/trunk/Modules/_ctypes/callproc.c ============================================================================== --- python/trunk/Modules/_ctypes/callproc.c (original) +++ python/trunk/Modules/_ctypes/callproc.c Fri Sep 18 22:05:44 2009 @@ -542,6 +542,7 @@ * C function call. * * 1. Python integers are converted to C int and passed by value. + * Py_None is converted to a C NULL pointer. * * 2. 3-tuples are expected to have a format character in the first * item, which must be 'i', 'f', 'd', 'q', or 'P'. From python-checkins at python.org Fri Sep 18 22:08:39 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 18 Sep 2009 20:08:39 -0000 Subject: [Python-checkins] r74922 - in python/branches/py3k: Lib/ctypes/test/test_parameters.py Misc/NEWS Modules/_ctypes/_ctypes.c Modules/_ctypes/callproc.c Message-ID: Author: thomas.heller Date: Fri Sep 18 22:08:39 2009 New Revision: 74922 Log: Merged revisions 74921 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74921 | thomas.heller | 2009-09-18 22:05:44 +0200 (Fr, 18 Sep 2009) | 3 lines Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/ctypes/test/test_parameters.py python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/_ctypes/_ctypes.c python/branches/py3k/Modules/_ctypes/callproc.c 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 Fri Sep 18 22:08:39 2009 @@ -97,7 +97,7 @@ self.assertEqual(x.contents.value, 42) self.assertEqual(LPINT(c_int(42)).contents.value, 42) - self.assertEqual(LPINT.from_param(None), 0) + self.assertEqual(LPINT.from_param(None), None) if c_int != c_long: self.assertRaises(TypeError, LPINT.from_param, pointer(c_long(42))) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Fri Sep 18 22:08:39 2009 @@ -72,6 +72,9 @@ Library ------- +- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) + does now always result in NULL. + - Issue #5042: Structure sub-subclass does now initialize correctly with base class positional arguments. Modified: python/branches/py3k/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/py3k/Modules/_ctypes/_ctypes.c (original) +++ python/branches/py3k/Modules/_ctypes/_ctypes.c Fri Sep 18 22:08:39 2009 @@ -936,8 +936,11 @@ { StgDictObject *typedict; - if (value == Py_None) - return PyLong_FromLong(0); /* NULL pointer */ + if (value == Py_None) { + /* ConvParam will convert to a NULL pointer later */ + Py_INCREF(value); + return value; + } typedict = PyType_stgdict(type); assert(typedict); /* Cannot be NULL for pointer types */ Modified: python/branches/py3k/Modules/_ctypes/callproc.c ============================================================================== --- python/branches/py3k/Modules/_ctypes/callproc.c (original) +++ python/branches/py3k/Modules/_ctypes/callproc.c Fri Sep 18 22:08:39 2009 @@ -547,6 +547,7 @@ * C function call. * * 1. Python integers are converted to C int and passed by value. + * Py_None is converted to a C NULL pointer. * * 2. 3-tuples are expected to have a format character in the first * item, which must be 'i', 'f', 'd', 'q', or 'P'. From python-checkins at python.org Fri Sep 18 22:09:57 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 18 Sep 2009 20:09:57 -0000 Subject: [Python-checkins] r74923 - in python/branches/release31-maint: Lib/ctypes/test/test_parameters.py Misc/NEWS Modules/_ctypes/_ctypes.c Modules/_ctypes/callproc.c Message-ID: Author: thomas.heller Date: Fri Sep 18 22:09:57 2009 New Revision: 74923 Log: Merged revisions 74922 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74922 | thomas.heller | 2009-09-18 22:08:39 +0200 (Fr, 18 Sep 2009) | 10 lines Merged revisions 74921 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74921 | thomas.heller | 2009-09-18 22:05:44 +0200 (Fr, 18 Sep 2009) | 3 lines Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/ctypes/test/test_parameters.py python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Modules/_ctypes/_ctypes.c python/branches/release31-maint/Modules/_ctypes/callproc.c Modified: python/branches/release31-maint/Lib/ctypes/test/test_parameters.py ============================================================================== --- python/branches/release31-maint/Lib/ctypes/test/test_parameters.py (original) +++ python/branches/release31-maint/Lib/ctypes/test/test_parameters.py Fri Sep 18 22:09:57 2009 @@ -97,7 +97,7 @@ self.assertEqual(x.contents.value, 42) self.assertEqual(LPINT(c_int(42)).contents.value, 42) - self.assertEqual(LPINT.from_param(None), 0) + self.assertEqual(LPINT.from_param(None), None) if c_int != c_long: self.assertRaises(TypeError, LPINT.from_param, pointer(c_long(42))) Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Fri Sep 18 22:09:57 2009 @@ -21,6 +21,9 @@ Library ------- +- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) + does now always result in NULL. + - Issue #5042: Structure sub-subclass does now initialize correctly with base class positional arguments. Modified: python/branches/release31-maint/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/_ctypes.c (original) +++ python/branches/release31-maint/Modules/_ctypes/_ctypes.c Fri Sep 18 22:09:57 2009 @@ -936,8 +936,11 @@ { StgDictObject *typedict; - if (value == Py_None) - return PyLong_FromLong(0); /* NULL pointer */ + if (value == Py_None) { + /* ConvParam will convert to a NULL pointer later */ + Py_INCREF(value); + return value; + } typedict = PyType_stgdict(type); assert(typedict); /* Cannot be NULL for pointer types */ Modified: python/branches/release31-maint/Modules/_ctypes/callproc.c ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/callproc.c (original) +++ python/branches/release31-maint/Modules/_ctypes/callproc.c Fri Sep 18 22:09:57 2009 @@ -547,6 +547,7 @@ * C function call. * * 1. Python integers are converted to C int and passed by value. + * Py_None is converted to a C NULL pointer. * * 2. 3-tuples are expected to have a format character in the first * item, which must be 'i', 'f', 'd', 'q', or 'P'. From python-checkins at python.org Fri Sep 18 22:12:29 2009 From: python-checkins at python.org (thomas.heller) Date: Fri, 18 Sep 2009 20:12:29 -0000 Subject: [Python-checkins] r74924 - in python/branches/release26-maint: Lib/ctypes/test/test_parameters.py Misc/NEWS Modules/_ctypes/_ctypes.c Modules/_ctypes/callproc.c Message-ID: Author: thomas.heller Date: Fri Sep 18 22:12:29 2009 New Revision: 74924 Log: Merged revisions 74921 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74921 | thomas.heller | 2009-09-18 22:05:44 +0200 (Fr, 18 Sep 2009) | 3 lines Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/ctypes/test/test_parameters.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Modules/_ctypes/_ctypes.c python/branches/release26-maint/Modules/_ctypes/callproc.c Modified: python/branches/release26-maint/Lib/ctypes/test/test_parameters.py ============================================================================== --- python/branches/release26-maint/Lib/ctypes/test/test_parameters.py (original) +++ python/branches/release26-maint/Lib/ctypes/test/test_parameters.py Fri Sep 18 22:12:29 2009 @@ -97,7 +97,7 @@ self.failUnlessEqual(x.contents.value, 42) self.failUnlessEqual(LPINT(c_int(42)).contents.value, 42) - self.failUnlessEqual(LPINT.from_param(None), 0) + self.assertEqual(LPINT.from_param(None), None) if c_int != c_long: self.assertRaises(TypeError, LPINT.from_param, pointer(c_long(42))) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Fri Sep 18 22:12:29 2009 @@ -82,8 +82,11 @@ Library ------- -- Issue #5042: Structure sub-subclass does now initialize correctly - with base class positional arguments. +- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) + does now always result in NULL. + +- Issue #5042: ctypes Structure sub-subclass does now initialize + correctly with base class positional arguments. - Issue #6938: Fix a TypeError in string formatting of a multiprocessing debug message. Modified: python/branches/release26-maint/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/_ctypes.c (original) +++ python/branches/release26-maint/Modules/_ctypes/_ctypes.c Fri Sep 18 22:12:29 2009 @@ -972,8 +972,11 @@ { StgDictObject *typedict; - if (value == Py_None) - return PyInt_FromLong(0); /* NULL pointer */ + if (value == Py_None) { + /* ConvParam will convert to a NULL pointer later */ + Py_INCREF(value); + return value; + } typedict = PyType_stgdict(type); assert(typedict); /* Cannot be NULL for pointer types */ Modified: python/branches/release26-maint/Modules/_ctypes/callproc.c ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/callproc.c (original) +++ python/branches/release26-maint/Modules/_ctypes/callproc.c Fri Sep 18 22:12:29 2009 @@ -546,6 +546,7 @@ * C function call. * * 1. Python integers are converted to C int and passed by value. + * Py_None is converted to a C NULL pointer. * * 2. 3-tuples are expected to have a format character in the first * item, which must be 'i', 'f', 'd', 'q', or 'P'. From benjamin at python.org Fri Sep 18 22:51:40 2009 From: benjamin at python.org (Benjamin Peterson) Date: Fri, 18 Sep 2009 15:51:40 -0500 Subject: [Python-checkins] r74917 - in python/trunk: Lib/ctypes/test/test_structures.py Misc/NEWS Modules/_ctypes/_ctypes.c In-Reply-To: <4ab3d7f8.1767f10a.5bc2.ffffbb0eSMTPIN_ADDED@mx.google.com> References: <4ab3d7f8.1767f10a.5bc2.ffffbb0eSMTPIN_ADDED@mx.google.com> Message-ID: <1afaf6160909181351y421dbdbqe34841c1b8e3a33a@mail.gmail.com> 2009/9/18 thomas.heller : > Author: thomas.heller > Date: Fri Sep 18 20:55:17 2009 > New Revision: 74917 > > Log: > Issue #5042: Structure sub-subclass does now initialize correctly with > base class positional arguments. Either this commit or you next one causes these warnings on gcc 4.3: /home/benjamin/dev/python/trunk/Modules/_ctypes/_ctypes.c: In function 'Struct_init': /home/benjamin/dev/python/trunk/Modules/_ctypes/_ctypes.c:4093: warning: unused variable 'stgdict' /home/benjamin/dev/python/trunk/Modules/_ctypes/_ctypes.c: At top level: /home/benjamin/dev/python/trunk/Modules/_ctypes/_ctypes.c:4017: warning: 'IBUG' defined but not used -- Regards, Benjamin From python-checkins at python.org Fri Sep 18 23:01:50 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 21:01:50 -0000 Subject: [Python-checkins] r74925 - python/trunk/Lib/test/test_math.py Message-ID: Author: mark.dickinson Date: Fri Sep 18 23:01:50 2009 New Revision: 74925 Log: Use skipUnless to skip math module tests on non-IEEE 754 platforms. Modified: python/trunk/Lib/test/test_math.py Modified: python/trunk/Lib/test/test_math.py ============================================================================== --- python/trunk/Lib/test/test_math.py (original) +++ python/trunk/Lib/test/test_math.py Fri Sep 18 23:01:50 2009 @@ -13,6 +13,11 @@ INF = float('inf') NINF = float('-inf') +# decorator for skipping tests on non-IEEE 754 platforms +requires_IEEE_754 = unittest.skipUnless( + float.__getformat__("double").startswith("IEEE"), + "test requires IEEE 754 doubles") + # detect evidence of double-rounding: fsum is not always correctly # rounded on machines that suffer from double rounding. x, y = 1e16, 2.9999 # use temporary values to defeat peephole optimizer @@ -212,33 +217,33 @@ self.assertRaises(TypeError, math.ceil, t) self.assertRaises(TypeError, math.ceil, t, 0) - if float.__getformat__("double").startswith("IEEE"): - def testCopysign(self): - self.assertRaises(TypeError, math.copysign) - # copysign should let us distinguish signs of zeros - self.assertEquals(copysign(1., 0.), 1.) - self.assertEquals(copysign(1., -0.), -1.) - self.assertEquals(copysign(INF, 0.), INF) - self.assertEquals(copysign(INF, -0.), NINF) - self.assertEquals(copysign(NINF, 0.), INF) - self.assertEquals(copysign(NINF, -0.), NINF) - # and of infinities - self.assertEquals(copysign(1., INF), 1.) - self.assertEquals(copysign(1., NINF), -1.) - self.assertEquals(copysign(INF, INF), INF) - self.assertEquals(copysign(INF, NINF), NINF) - self.assertEquals(copysign(NINF, INF), INF) - self.assertEquals(copysign(NINF, NINF), NINF) - 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.assertTrue(math.isinf(copysign(INF, NAN))) - # similarly, copysign(2., NAN) could be 2. or -2. - self.assertEquals(abs(copysign(2., NAN)), 2.) + @requires_IEEE_754 + def testCopysign(self): + self.assertRaises(TypeError, math.copysign) + # copysign should let us distinguish signs of zeros + self.assertEquals(copysign(1., 0.), 1.) + self.assertEquals(copysign(1., -0.), -1.) + self.assertEquals(copysign(INF, 0.), INF) + self.assertEquals(copysign(INF, -0.), NINF) + self.assertEquals(copysign(NINF, 0.), INF) + self.assertEquals(copysign(NINF, -0.), NINF) + # and of infinities + self.assertEquals(copysign(1., INF), 1.) + self.assertEquals(copysign(1., NINF), -1.) + self.assertEquals(copysign(INF, INF), INF) + self.assertEquals(copysign(INF, NINF), NINF) + self.assertEquals(copysign(NINF, INF), INF) + self.assertEquals(copysign(NINF, NINF), NINF) + 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.assertTrue(math.isinf(copysign(INF, NAN))) + # similarly, copysign(2., NAN) could be 2. or -2. + self.assertEquals(abs(copysign(2., NAN)), 2.) def testCos(self): self.assertRaises(TypeError, math.cos) @@ -369,8 +374,7 @@ self.assertEquals(math.frexp(NINF)[0], NINF) self.assertTrue(math.isnan(math.frexp(NAN)[0])) - @unittest.skipUnless(float.__getformat__("double").startswith("IEEE"), - "test requires IEEE 754 doubles") + @requires_IEEE_754 @unittest.skipIf(HAVE_DOUBLE_ROUNDING, "fsum is not exact on machines with double rounding") def testFsum(self): @@ -860,9 +864,8 @@ else: self.fail("sqrt(-1) didn't raise ValueError") + @requires_IEEE_754 def test_testfile(self): - if not float.__getformat__("double").startswith("IEEE"): - return for id, fn, ar, ai, er, ei, flags in parse_testfile(test_file): # Skip if either the input or result is complex, or if # flags is nonempty From python-checkins at python.org Fri Sep 18 23:02:27 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 21:02:27 -0000 Subject: [Python-checkins] r74926 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Fri Sep 18 23:02:27 2009 New Revision: 74926 Log: Blocked revisions 74925 via svnmerge ........ r74925 | mark.dickinson | 2009-09-18 22:01:50 +0100 (Fri, 18 Sep 2009) | 2 lines Use skipUnless to skip math module tests on non-IEEE 754 platforms. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Fri Sep 18 23:04:20 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 21:04:20 -0000 Subject: [Python-checkins] r74927 - in python/branches/py3k: Lib/test/test_math.py Message-ID: Author: mark.dickinson Date: Fri Sep 18 23:04:19 2009 New Revision: 74927 Log: Merged revisions 74925 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74925 | mark.dickinson | 2009-09-18 22:01:50 +0100 (Fri, 18 Sep 2009) | 2 lines Use skipUnless to skip math module tests on non-IEEE 754 platforms. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_math.py 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 Fri Sep 18 23:04:19 2009 @@ -13,6 +13,11 @@ INF = float('inf') NINF = float('-inf') +# decorator for skipping tests on non-IEEE 754 platforms +requires_IEEE_754 = unittest.skipUnless( + float.__getformat__("double").startswith("IEEE"), + "test requires IEEE 754 doubles") + # detect evidence of double-rounding: fsum is not always correctly # rounded on machines that suffer from double rounding. x, y = 1e16, 2.9999 # use temporary values to defeat peephole optimizer @@ -209,33 +214,33 @@ self.assertRaises(TypeError, math.ceil, t) self.assertRaises(TypeError, math.ceil, t, 0) - if float.__getformat__("double").startswith("IEEE"): - def testCopysign(self): - self.assertRaises(TypeError, math.copysign) - # copysign should let us distinguish signs of zeros - self.assertEquals(copysign(1., 0.), 1.) - self.assertEquals(copysign(1., -0.), -1.) - self.assertEquals(copysign(INF, 0.), INF) - self.assertEquals(copysign(INF, -0.), NINF) - self.assertEquals(copysign(NINF, 0.), INF) - self.assertEquals(copysign(NINF, -0.), NINF) - # and of infinities - self.assertEquals(copysign(1., INF), 1.) - self.assertEquals(copysign(1., NINF), -1.) - self.assertEquals(copysign(INF, INF), INF) - self.assertEquals(copysign(INF, NINF), NINF) - self.assertEquals(copysign(NINF, INF), INF) - self.assertEquals(copysign(NINF, NINF), NINF) - 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.assertTrue(math.isinf(copysign(INF, NAN))) - # similarly, copysign(2., NAN) could be 2. or -2. - self.assertEquals(abs(copysign(2., NAN)), 2.) + @requires_IEEE_754 + def testCopysign(self): + self.assertRaises(TypeError, math.copysign) + # copysign should let us distinguish signs of zeros + self.assertEquals(copysign(1., 0.), 1.) + self.assertEquals(copysign(1., -0.), -1.) + self.assertEquals(copysign(INF, 0.), INF) + self.assertEquals(copysign(INF, -0.), NINF) + self.assertEquals(copysign(NINF, 0.), INF) + self.assertEquals(copysign(NINF, -0.), NINF) + # and of infinities + self.assertEquals(copysign(1., INF), 1.) + self.assertEquals(copysign(1., NINF), -1.) + self.assertEquals(copysign(INF, INF), INF) + self.assertEquals(copysign(INF, NINF), NINF) + self.assertEquals(copysign(NINF, INF), INF) + self.assertEquals(copysign(NINF, NINF), NINF) + 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.assertTrue(math.isinf(copysign(INF, NAN))) + # similarly, copysign(2., NAN) could be 2. or -2. + self.assertEquals(abs(copysign(2., NAN)), 2.) def testCos(self): self.assertRaises(TypeError, math.cos) @@ -364,8 +369,7 @@ self.assertEquals(math.frexp(NINF)[0], NINF) self.assertTrue(math.isnan(math.frexp(NAN)[0])) - @unittest.skipUnless(float.__getformat__("double").startswith("IEEE"), - "test requires IEEE 754 doubles") + @requires_IEEE_754 @unittest.skipIf(HAVE_DOUBLE_ROUNDING, "fsum is not exact on machines with double rounding") def testFsum(self): @@ -857,9 +861,8 @@ else: self.fail("sqrt(-1) didn't raise ValueError") + @requires_IEEE_754 def test_testfile(self): - if not float.__getformat__("double").startswith("IEEE"): - return for id, fn, ar, ai, er, ei, flags in parse_testfile(test_file): # Skip if either the input or result is complex, or if # flags is nonempty From python-checkins at python.org Fri Sep 18 23:05:09 2009 From: python-checkins at python.org (mark.dickinson) Date: Fri, 18 Sep 2009 21:05:09 -0000 Subject: [Python-checkins] r74928 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Fri Sep 18 23:05:09 2009 New Revision: 74928 Log: Blocked revisions 74927 via svnmerge ................ r74927 | mark.dickinson | 2009-09-18 22:04:19 +0100 (Fri, 18 Sep 2009) | 9 lines Merged revisions 74925 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74925 | mark.dickinson | 2009-09-18 22:01:50 +0100 (Fri, 18 Sep 2009) | 2 lines Use skipUnless to skip math module tests on non-IEEE 754 platforms. ........ ................ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Fri Sep 18 23:14:56 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 18 Sep 2009 21:14:56 -0000 Subject: [Python-checkins] r74929 - in python/trunk: Doc/library/stdtypes.rst Lib/test/test_str.py Lib/test/test_unicode.py Misc/ACKS Misc/NEWS Objects/stringobject.c Objects/unicodeobject.c Message-ID: Author: benjamin.peterson Date: Fri Sep 18 23:14:55 2009 New Revision: 74929 Log: add keyword arguments support to str/unicode encode and decode #6300 Modified: python/trunk/Doc/library/stdtypes.rst python/trunk/Lib/test/test_str.py python/trunk/Lib/test/test_unicode.py python/trunk/Misc/ACKS python/trunk/Misc/NEWS python/trunk/Objects/stringobject.c python/trunk/Objects/unicodeobject.c Modified: python/trunk/Doc/library/stdtypes.rst ============================================================================== --- python/trunk/Doc/library/stdtypes.rst (original) +++ python/trunk/Doc/library/stdtypes.rst Fri Sep 18 23:14:55 2009 @@ -815,8 +815,8 @@ .. index:: pair: string; methods -Below are listed the string methods which both 8-bit strings and Unicode objects -support. Note that none of these methods take keyword arguments. +Below are listed the string methods which both 8-bit strings and +Unicode objects support. In addition, Python's strings support the sequence type methods described in the :ref:`typesseq` section. To output formatted strings @@ -861,6 +861,8 @@ .. versionchanged:: 2.3 Support for other error handling schemes added. + .. versionchanged:: 2.7 + Support for keyword arguments added. .. method:: str.encode([encoding[,errors]]) @@ -879,6 +881,8 @@ Support for ``'xmlcharrefreplace'`` and ``'backslashreplace'`` and other error handling schemes added. + .. versionchanged:: 2.7 + Support for keyword arguments added. .. method:: str.endswith(suffix[, start[, end]]) Modified: python/trunk/Lib/test/test_str.py ============================================================================== --- python/trunk/Lib/test/test_str.py (original) +++ python/trunk/Lib/test/test_str.py Fri Sep 18 23:14:55 2009 @@ -401,6 +401,17 @@ def test_buffer_is_readonly(self): self.assertRaises(TypeError, sys.stdin.readinto, b"") + def test_encode_and_decode_kwargs(self): + self.assertEqual('abcde'.encode('ascii', 'replace'), + 'abcde'.encode('ascii', errors='replace')) + self.assertEqual('abcde'.encode('ascii', 'ignore'), + 'abcde'.encode(encoding='ascii', errors='ignore')) + self.assertEqual('Andr\202 x'.decode('ascii', 'ignore'), + 'Andr\202 x'.decode('ascii', errors='ignore')) + self.assertEqual('Andr\202 x'.decode('ascii', 'replace'), + 'Andr\202 x'.decode(encoding='ascii', errors='replace')) + + def test_main(): test_support.run_unittest(StrTest) Modified: python/trunk/Lib/test/test_unicode.py ============================================================================== --- python/trunk/Lib/test/test_unicode.py (original) +++ python/trunk/Lib/test/test_unicode.py Fri Sep 18 23:14:55 2009 @@ -593,12 +593,20 @@ self.assertRaises(UnicodeError, u'Andr\202 x'.encode, 'ascii','strict') self.assertEqual(u'Andr\202 x'.encode('ascii','ignore'), "Andr x") self.assertEqual(u'Andr\202 x'.encode('ascii','replace'), "Andr? x") + self.assertEqual(u'Andr\202 x'.encode('ascii', 'replace'), + u'Andr\202 x'.encode('ascii', errors='replace')) + self.assertEqual(u'Andr\202 x'.encode('ascii', 'ignore'), + u'Andr\202 x'.encode(encoding='ascii', errors='ignore')) # Error handling (decoding) self.assertRaises(UnicodeError, unicode, 'Andr\202 x', 'ascii') self.assertRaises(UnicodeError, unicode, 'Andr\202 x', 'ascii','strict') self.assertEqual(unicode('Andr\202 x','ascii','ignore'), u"Andr x") self.assertEqual(unicode('Andr\202 x','ascii','replace'), u'Andr\uFFFD x') + self.assertEqual(u'abcde'.decode('ascii', 'ignore'), + u'abcde'.decode('ascii', errors='ignore')) + self.assertEqual(u'abcde'.decode('ascii', 'replace'), + u'abcde'.decode(encoding='ascii', errors='replace')) # Error handling (unknown character names) self.assertEqual("\\N{foo}xx".decode("unicode-escape", "ignore"), u"xx") Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Fri Sep 18 23:14:55 2009 @@ -88,6 +88,7 @@ Eric Bouck Thierry Bousch Sebastian Boving +Jeff Bradberry Monty Brandenberg Georg Brandl Christopher Brannon Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Sep 18 23:14:55 2009 @@ -12,6 +12,9 @@ Core and Builtins ----------------- +- Issue #6300: unicode.encode, unicode.docode, str.decode, and str.encode now + take keyword arguments. + - Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32 stream with a non-raising error handler like "replace" or "ignore". Modified: python/trunk/Objects/stringobject.c ============================================================================== --- python/trunk/Objects/stringobject.c (original) +++ python/trunk/Objects/stringobject.c Fri Sep 18 23:14:55 2009 @@ -3332,13 +3332,15 @@ codecs.register_error that is able to handle UnicodeEncodeErrors."); static PyObject * -string_encode(PyStringObject *self, PyObject *args) +string_encode(PyStringObject *self, PyObject *args, PyObject *kwargs) { + static char *kwlist[] = {"encoding", "errors", 0}; char *encoding = NULL; char *errors = NULL; PyObject *v; - if (!PyArg_ParseTuple(args, "|ss:encode", &encoding, &errors)) + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:encode", + kwlist, &encoding, &errors)) return NULL; v = PyString_AsEncodedObject((PyObject *)self, encoding, errors); if (v == NULL) @@ -3369,13 +3371,15 @@ able to handle UnicodeDecodeErrors."); static PyObject * -string_decode(PyStringObject *self, PyObject *args) +string_decode(PyStringObject *self, PyObject *args, PyObject *kwargs) { + static char *kwlist[] = {"encoding", "errors", 0}; char *encoding = NULL; char *errors = NULL; PyObject *v; - if (!PyArg_ParseTuple(args, "|ss:decode", &encoding, &errors)) + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", + kwlist, &encoding, &errors)) return NULL; v = PyString_AsDecodedObject((PyObject *)self, encoding, errors); if (v == NULL) @@ -4053,8 +4057,8 @@ {"__format__", (PyCFunction) string__format__, METH_VARARGS, p_format__doc__}, {"_formatter_field_name_split", (PyCFunction) formatter_field_name_split, METH_NOARGS}, {"_formatter_parser", (PyCFunction) formatter_parser, METH_NOARGS}, - {"encode", (PyCFunction)string_encode, METH_VARARGS, encode__doc__}, - {"decode", (PyCFunction)string_decode, METH_VARARGS, decode__doc__}, + {"encode", (PyCFunction)string_encode, METH_VARARGS | METH_KEYWORDS, encode__doc__}, + {"decode", (PyCFunction)string_decode, METH_VARARGS | METH_KEYWORDS, decode__doc__}, {"expandtabs", (PyCFunction)string_expandtabs, METH_VARARGS, expandtabs__doc__}, {"splitlines", (PyCFunction)string_splitlines, METH_VARARGS, Modified: python/trunk/Objects/unicodeobject.c ============================================================================== --- python/trunk/Objects/unicodeobject.c (original) +++ python/trunk/Objects/unicodeobject.c Fri Sep 18 23:14:55 2009 @@ -6610,13 +6610,15 @@ codecs.register_error that can handle UnicodeEncodeErrors."); static PyObject * -unicode_encode(PyUnicodeObject *self, PyObject *args) +unicode_encode(PyUnicodeObject *self, PyObject *args, PyObject *kwargs) { + static char *kwlist[] = {"encoding", "errors", 0}; char *encoding = NULL; char *errors = NULL; PyObject *v; - if (!PyArg_ParseTuple(args, "|ss:encode", &encoding, &errors)) + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:encode", + kwlist, &encoding, &errors)) return NULL; v = PyUnicode_AsEncodedObject((PyObject *)self, encoding, errors); if (v == NULL) @@ -6646,13 +6648,15 @@ able to handle UnicodeDecodeErrors."); static PyObject * -unicode_decode(PyUnicodeObject *self, PyObject *args) +unicode_decode(PyUnicodeObject *self, PyObject *args, PyObject *kwargs) { + static char *kwlist[] = {"encoding", "errors", 0}; char *encoding = NULL; char *errors = NULL; PyObject *v; - if (!PyArg_ParseTuple(args, "|ss:decode", &encoding, &errors)) + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", + kwlist, &encoding, &errors)) return NULL; v = PyUnicode_AsDecodedObject((PyObject *)self, encoding, errors); if (v == NULL) @@ -8054,7 +8058,7 @@ /* Order is according to common usage: often used methods should appear first, since lookup is done sequentially. */ - {"encode", (PyCFunction) unicode_encode, METH_VARARGS, encode__doc__}, + {"encode", (PyCFunction) unicode_encode, METH_VARARGS | METH_KEYWORDS, encode__doc__}, {"replace", (PyCFunction) unicode_replace, METH_VARARGS, replace__doc__}, {"split", (PyCFunction) unicode_split, METH_VARARGS, split__doc__}, {"rsplit", (PyCFunction) unicode_rsplit, METH_VARARGS, rsplit__doc__}, @@ -8070,7 +8074,7 @@ {"ljust", (PyCFunction) unicode_ljust, METH_VARARGS, ljust__doc__}, {"lower", (PyCFunction) unicode_lower, METH_NOARGS, lower__doc__}, {"lstrip", (PyCFunction) unicode_lstrip, METH_VARARGS, lstrip__doc__}, - {"decode", (PyCFunction) unicode_decode, METH_VARARGS, decode__doc__}, + {"decode", (PyCFunction) unicode_decode, METH_VARARGS | METH_KEYWORDS, decode__doc__}, /* {"maketrans", (PyCFunction) unicode_maketrans, METH_VARARGS, maketrans__doc__}, */ {"rfind", (PyCFunction) unicode_rfind, METH_VARARGS, rfind__doc__}, {"rindex", (PyCFunction) unicode_rindex, METH_VARARGS, rindex__doc__}, From python-checkins at python.org Fri Sep 18 23:21:41 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 21:21:41 -0000 Subject: [Python-checkins] r74930 - python/trunk/Doc/library/functions.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 23:21:41 2009 New Revision: 74930 Log: #6925: rewrite docs for locals() and vars() a bit. Modified: python/trunk/Doc/library/functions.rst Modified: python/trunk/Doc/library/functions.rst ============================================================================== --- python/trunk/Doc/library/functions.rst (original) +++ python/trunk/Doc/library/functions.rst Fri Sep 18 23:21:41 2009 @@ -632,15 +632,13 @@ .. function:: locals() Update and return a dictionary representing the current local symbol table. + Free variables are returned by :func:`locals` when it is called in function + blocks, but not in class blocks. .. note:: - The contents of this dictionary should not be modified; changes may not affect - the values of local variables used by the interpreter. - - Free variables are returned by :func:`locals` when it is called in a function block. - Modifications of free variables may not affect the values used by the - interpreter. Free variables are not returned in class blocks. + The contents of this dictionary should not be modified; changes may not + affect the values of local and free variables used by the interpreter. .. function:: long([x[, base]]) @@ -1359,10 +1357,10 @@ .. function:: vars([object]) - Without arguments, return a dictionary corresponding to the current local symbol - table. With a module, class or class instance object as argument (or anything - else that has a :attr:`__dict__` attribute), returns a dictionary corresponding - to the object's symbol table. + Without an argument, act like :func:`locals`. + + With a module, class or class instance object as argument (or anything else that + has a :attr:`__dict__` attribute), return that attribute. .. note:: From python-checkins at python.org Fri Sep 18 23:25:36 2009 From: python-checkins at python.org (r.david.murray) Date: Fri, 18 Sep 2009 21:25:36 -0000 Subject: [Python-checkins] r74931 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: r.david.murray Date: Fri Sep 18 23:25:36 2009 New Revision: 74931 Log: Add some names gleaned from the "Tracker Archeology" thread on python-dev from back in February. Also consolidate the autoconf and makefiles topics into one, and add tracker and svn/hg topics. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 23:25:36 2009 @@ -216,12 +216,12 @@ tty turtle gregorlingl types -unicodedata loewis, lemburg +unicodedata loewis, lemburg, ezio.melotti unittest michael.foord -urllib +urllib orsenthil uu uuid -warnings +warnings brett.cannon wave weakref fdrake webbrowser georg.brandl @@ -258,7 +258,7 @@ ------------------ ----------- algorithms ast/compiler ncoghlan, benjamin.peterson, brett.cannon, georg.brandl -autoconf +autoconf/makefiles bsd buildbots bytecode pitrou @@ -270,7 +270,6 @@ import machinery brett.cannon, ncoghlan io pitrou, benjamin.peterson locale lemburg, loewis -makefiles mathematics mark.dickinson, eric.smith, lemburg memory management tim_one, lemburg networking @@ -280,6 +279,8 @@ time and dates lemburg testing michael.foord, pitrou threads -unicode lemburg +tracker +unicode lemburg, haypo +svn/hg windows ================== =========== From python-checkins at python.org Fri Sep 18 23:32:16 2009 From: python-checkins at python.org (r.david.murray) Date: Fri, 18 Sep 2009 21:32:16 -0000 Subject: [Python-checkins] r74932 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: r.david.murray Date: Fri Sep 18 23:32:16 2009 New Revision: 74932 Log: Remove non-committer mistakenly added. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 23:32:16 2009 @@ -280,7 +280,7 @@ testing michael.foord, pitrou threads tracker -unicode lemburg, haypo +unicode lemburg svn/hg windows ================== =========== From python-checkins at python.org Fri Sep 18 23:35:59 2009 From: python-checkins at python.org (georg.brandl) Date: Fri, 18 Sep 2009 21:35:59 -0000 Subject: [Python-checkins] r74933 - python/trunk/Doc/c-api/unicode.rst Message-ID: Author: georg.brandl Date: Fri Sep 18 23:35:59 2009 New Revision: 74933 Log: #6930: clarify description about byteorder handling in UTF decoder routines. Modified: python/trunk/Doc/c-api/unicode.rst Modified: python/trunk/Doc/c-api/unicode.rst ============================================================================== --- python/trunk/Doc/c-api/unicode.rst (original) +++ python/trunk/Doc/c-api/unicode.rst Fri Sep 18 23:35:59 2009 @@ -414,10 +414,13 @@ *byteorder == 0: native order *byteorder == 1: big endian - and then switches if the first four bytes of the input data are a byte order mark - (BOM) and the specified byte order is native order. This BOM is not copied into - the resulting Unicode string. After completion, *\*byteorder* is set to the - current byte order at the end of input data. + If ``*byteorder`` is zero, and the first four bytes of the input data are a + byte order mark (BOM), the decoder switches to this byte order and the BOM is + not copied into the resulting Unicode string. If ``*byteorder`` is ``-1`` or + ``1``, any byte order mark is copied to the output. + + After completion, *\*byteorder* is set to the current byte order at the end + of input data. In a narrow build codepoints outside the BMP will be decoded as surrogate pairs. @@ -442,8 +445,7 @@ .. cfunction:: PyObject* PyUnicode_EncodeUTF32(const Py_UNICODE *s, Py_ssize_t size, const char *errors, int byteorder) Return a Python bytes object holding the UTF-32 encoded value of the Unicode - data in *s*. If *byteorder* is not ``0``, output is written according to the - following byte order:: + data in *s*. Output is written according to the following byte order:: byteorder == -1: little endian byteorder == 0: native byte order (writes a BOM mark) @@ -487,10 +489,14 @@ *byteorder == 0: native order *byteorder == 1: big endian - and then switches if the first two bytes of the input data are a byte order mark - (BOM) and the specified byte order is native order. This BOM is not copied into - the resulting Unicode string. After completion, *\*byteorder* is set to the - current byte order at the. + If ``*byteorder`` is zero, and the first two bytes of the input data are a + byte order mark (BOM), the decoder switches to this byte order and the BOM is + not copied into the resulting Unicode string. If ``*byteorder`` is ``-1`` or + ``1``, any byte order mark is copied to the output (where it will result in + either a ``\ufeff`` or a ``\ufffe`` character). + + After completion, *\*byteorder* is set to the current byte order at the end + of input data. If *byteorder* is *NULL*, the codec starts in native order mode. @@ -520,8 +526,7 @@ .. cfunction:: PyObject* PyUnicode_EncodeUTF16(const Py_UNICODE *s, Py_ssize_t size, const char *errors, int byteorder) Return a Python string object holding the UTF-16 encoded value of the Unicode - data in *s*. If *byteorder* is not ``0``, output is written according to the - following byte order:: + data in *s*. Output is written according to the following byte order:: byteorder == -1: little endian byteorder == 0: native byte order (writes a BOM mark) From python-checkins at python.org Fri Sep 18 23:40:30 2009 From: python-checkins at python.org (r.david.murray) Date: Fri, 18 Sep 2009 21:40:30 -0000 Subject: [Python-checkins] r74934 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: r.david.murray Date: Fri Sep 18 23:40:30 2009 New Revision: 74934 Log: More descriptive/generic name for the svn/hg entry (version control) Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Fri Sep 18 23:40:30 2009 @@ -281,6 +281,6 @@ threads tracker unicode lemburg -svn/hg +version control windows ================== =========== From python-checkins at python.org Fri Sep 18 23:42:35 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 18 Sep 2009 21:42:35 -0000 Subject: [Python-checkins] r74935 - in python/branches/py3k: Doc/library/stdtypes.rst Lib/test/test_bytes.py Lib/test/test_unicode.py Misc/ACKS Objects/bytearrayobject.c Objects/bytesobject.c Objects/unicodeobject.c Message-ID: Author: benjamin.peterson Date: Fri Sep 18 23:42:35 2009 New Revision: 74935 Log: Merged revisions 74929 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74929 | benjamin.peterson | 2009-09-18 16:14:55 -0500 (Fri, 18 Sep 2009) | 1 line add keyword arguments support to str/unicode encode and decode #6300 ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/stdtypes.rst python/branches/py3k/Lib/test/test_bytes.py python/branches/py3k/Lib/test/test_unicode.py python/branches/py3k/Misc/ACKS python/branches/py3k/Objects/bytearrayobject.c python/branches/py3k/Objects/bytesobject.c python/branches/py3k/Objects/unicodeobject.c Modified: python/branches/py3k/Doc/library/stdtypes.rst ============================================================================== --- python/branches/py3k/Doc/library/stdtypes.rst (original) +++ python/branches/py3k/Doc/library/stdtypes.rst Fri Sep 18 23:42:35 2009 @@ -788,11 +788,10 @@ .. index:: pair: string; methods -String objects support the methods listed below. Note that none of these -methods take keyword arguments. +String objects support the methods listed below. -In addition, Python's strings support the sequence type methods described in -the :ref:`typesseq` section. To output formatted strings, see the +In addition, Python's strings support the sequence type methods described in the +:ref:`typesseq` section. To output formatted strings, see the :ref:`string-formatting` section. Also, see the :mod:`re` module for string functions based on regular expressions. @@ -825,6 +824,8 @@ :func:`codecs.register_error`, see section :ref:`codec-base-classes`. For a list of possible encodings, see section :ref:`standard-encodings`. + .. versionchanged:: 3.1 + Added support for keyword arguments added. .. method:: str.endswith(suffix[, start[, end]]) @@ -1539,6 +1540,9 @@ :func:`codecs.register_error`, see section :ref:`codec-base-classes`. For a list of possible encodings, see section :ref:`standard-encodings`. + .. versionchanged:: 3.1 + Added support for keyword arguments. + The bytes and bytearray types have an additional class method: 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 Fri Sep 18 23:42:35 2009 @@ -186,6 +186,8 @@ b = self.type2test(sample, "latin1") self.assertRaises(UnicodeDecodeError, b.decode, "utf8") self.assertEqual(b.decode("utf8", "ignore"), "Hello world\n") + self.assertEqual(b.decode(errors="ignore", encoding="utf8"), + "Hello world\n") def test_from_int(self): b = self.type2test(0) 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 Fri Sep 18 23:42:35 2009 @@ -955,6 +955,10 @@ self.assertRaises(UnicodeError, 'Andr\202 x'.encode, 'ascii','strict') self.assertEqual('Andr\202 x'.encode('ascii','ignore'), b"Andr x") self.assertEqual('Andr\202 x'.encode('ascii','replace'), b"Andr? x") + self.assertEqual('Andr\202 x'.encode('ascii', 'replace'), + 'Andr\202 x'.encode('ascii', errors='replace')) + self.assertEqual('Andr\202 x'.encode('ascii', 'ignore'), + 'Andr\202 x'.encode(encoding='ascii', errors='ignore')) # Error handling (decoding) self.assertRaises(UnicodeError, str, b'Andr\202 x', 'ascii') Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Fri Sep 18 23:42:35 2009 @@ -87,6 +87,7 @@ Eric Bouck Thierry Bousch Sebastian Boving +Jeff Bradberry Monty Brandenberg Georg Brandl Christopher Brannon Modified: python/branches/py3k/Objects/bytearrayobject.c ============================================================================== --- python/branches/py3k/Objects/bytearrayobject.c (original) +++ python/branches/py3k/Objects/bytearrayobject.c Fri Sep 18 23:42:35 2009 @@ -2877,12 +2877,13 @@ able to handle UnicodeDecodeErrors."); static PyObject * -bytearray_decode(PyObject *self, PyObject *args) +bytearray_decode(PyObject *self, PyObject *args, PyObject *kwargs) { const char *encoding = NULL; const char *errors = NULL; + static char *kwlist[] = {"encoding", "errors", 0}; - if (!PyArg_ParseTuple(args, "|ss:decode", &encoding, &errors)) + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", kwlist, &encoding, &errors)) return NULL; if (encoding == NULL) encoding = PyUnicode_GetDefaultEncoding(); @@ -3112,7 +3113,7 @@ _Py_capitalize__doc__}, {"center", (PyCFunction)stringlib_center, METH_VARARGS, center__doc__}, {"count", (PyCFunction)bytearray_count, METH_VARARGS, count__doc__}, - {"decode", (PyCFunction)bytearray_decode, METH_VARARGS, decode_doc}, + {"decode", (PyCFunction)bytearray_decode, METH_VARARGS | METH_KEYWORDS, decode_doc}, {"endswith", (PyCFunction)bytearray_endswith, METH_VARARGS, endswith__doc__}, {"expandtabs", (PyCFunction)stringlib_expandtabs, METH_VARARGS, expandtabs__doc__}, Modified: python/branches/py3k/Objects/bytesobject.c ============================================================================== --- python/branches/py3k/Objects/bytesobject.c (original) +++ python/branches/py3k/Objects/bytesobject.c Fri Sep 18 23:42:35 2009 @@ -2725,12 +2725,13 @@ able to handle UnicodeDecodeErrors."); static PyObject * -bytes_decode(PyObject *self, PyObject *args) +bytes_decode(PyObject *self, PyObject *args, PyObject *kwargs) { const char *encoding = NULL; const char *errors = NULL; + static char *kwlist[] = {"encoding", "errors", 0}; - if (!PyArg_ParseTuple(args, "|ss:decode", &encoding, &errors)) + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", kwlist, &encoding, &errors)) return NULL; if (encoding == NULL) encoding = PyUnicode_GetDefaultEncoding(); @@ -2831,7 +2832,7 @@ _Py_capitalize__doc__}, {"center", (PyCFunction)stringlib_center, METH_VARARGS, center__doc__}, {"count", (PyCFunction)bytes_count, METH_VARARGS, count__doc__}, - {"decode", (PyCFunction)bytes_decode, METH_VARARGS, decode__doc__}, + {"decode", (PyCFunction)bytes_decode, METH_VARARGS | METH_KEYWORDS, decode__doc__}, {"endswith", (PyCFunction)bytes_endswith, METH_VARARGS, endswith__doc__}, {"expandtabs", (PyCFunction)stringlib_expandtabs, METH_VARARGS, Modified: python/branches/py3k/Objects/unicodeobject.c ============================================================================== --- python/branches/py3k/Objects/unicodeobject.c (original) +++ python/branches/py3k/Objects/unicodeobject.c Fri Sep 18 23:42:35 2009 @@ -7141,13 +7141,15 @@ codecs.register_error that can handle UnicodeEncodeErrors."); static PyObject * -unicode_encode(PyUnicodeObject *self, PyObject *args) +unicode_encode(PyUnicodeObject *self, PyObject *args, PyObject *kwargs) { + static char *kwlist[] = {"encoding", "errors", 0}; char *encoding = NULL; char *errors = NULL; PyObject *v; - if (!PyArg_ParseTuple(args, "|ss:encode", &encoding, &errors)) + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:encode", + kwlist, &encoding, &errors)) return NULL; v = PyUnicode_AsEncodedString((PyObject *)self, encoding, errors); if (v == NULL) @@ -8804,7 +8806,7 @@ /* Order is according to common usage: often used methods should appear first, since lookup is done sequentially. */ - {"encode", (PyCFunction) unicode_encode, METH_VARARGS, encode__doc__}, + {"encode", (PyCFunction) unicode_encode, METH_VARARGS | METH_KEYWORDS, encode__doc__}, {"replace", (PyCFunction) unicode_replace, METH_VARARGS, replace__doc__}, {"split", (PyCFunction) unicode_split, METH_VARARGS, split__doc__}, {"rsplit", (PyCFunction) unicode_rsplit, METH_VARARGS, rsplit__doc__}, @@ -8820,6 +8822,7 @@ {"ljust", (PyCFunction) unicode_ljust, METH_VARARGS, ljust__doc__}, {"lower", (PyCFunction) unicode_lower, METH_NOARGS, lower__doc__}, {"lstrip", (PyCFunction) unicode_lstrip, METH_VARARGS, lstrip__doc__}, +/* {"maketrans", (PyCFunction) unicode_maketrans, METH_VARARGS, maketrans__doc__}, */ {"rfind", (PyCFunction) unicode_rfind, METH_VARARGS, rfind__doc__}, {"rindex", (PyCFunction) unicode_rindex, METH_VARARGS, rindex__doc__}, {"rjust", (PyCFunction) unicode_rjust, METH_VARARGS, rjust__doc__}, From python-checkins at python.org Fri Sep 18 23:46:21 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 18 Sep 2009 21:46:21 -0000 Subject: [Python-checkins] r74936 - in python/trunk: Lib/test/test_bytes.py Objects/bytearrayobject.c Message-ID: Author: benjamin.peterson Date: Fri Sep 18 23:46:21 2009 New Revision: 74936 Log: backport keyword argument support for bytearray.decode Modified: python/trunk/Lib/test/test_bytes.py python/trunk/Objects/bytearrayobject.c Modified: python/trunk/Lib/test/test_bytes.py ============================================================================== --- python/trunk/Lib/test/test_bytes.py (original) +++ python/trunk/Lib/test/test_bytes.py Fri Sep 18 23:46:21 2009 @@ -186,6 +186,8 @@ b = self.type2test(sample, "latin1") self.assertRaises(UnicodeDecodeError, b.decode, "utf8") self.assertEqual(b.decode("utf8", "ignore"), "Hello world\n") + self.assertEqual(b.decode(errors="ignore", encoding="utf8"), + "Hello world\n") def test_from_int(self): b = self.type2test(0) Modified: python/trunk/Objects/bytearrayobject.c ============================================================================== --- python/trunk/Objects/bytearrayobject.c (original) +++ python/trunk/Objects/bytearrayobject.c Fri Sep 18 23:46:21 2009 @@ -2942,12 +2942,13 @@ able to handle UnicodeDecodeErrors."); static PyObject * -bytearray_decode(PyObject *self, PyObject *args) +bytearray_decode(PyObject *self, PyObject *args, PyObject *kwargs) { const char *encoding = NULL; const char *errors = NULL; + static char *kwlist[] = {"encoding", "errors", 0}; - if (!PyArg_ParseTuple(args, "|ss:decode", &encoding, &errors)) + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", kwlist, &encoding, &errors)) return NULL; if (encoding == NULL) { #ifdef Py_USING_UNICODE @@ -3189,7 +3190,7 @@ _Py_capitalize__doc__}, {"center", (PyCFunction)stringlib_center, METH_VARARGS, center__doc__}, {"count", (PyCFunction)bytearray_count, METH_VARARGS, count__doc__}, - {"decode", (PyCFunction)bytearray_decode, METH_VARARGS, decode_doc}, + {"decode", (PyCFunction)bytearray_decode, METH_VARARGS | METH_KEYWORDS, decode_doc}, {"endswith", (PyCFunction)bytearray_endswith, METH_VARARGS, endswith__doc__}, {"expandtabs", (PyCFunction)stringlib_expandtabs, METH_VARARGS, expandtabs__doc__}, From python-checkins at python.org Fri Sep 18 23:47:27 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 18 Sep 2009 21:47:27 -0000 Subject: [Python-checkins] r74937 - python/trunk/Misc/NEWS Message-ID: Author: benjamin.peterson Date: Fri Sep 18 23:47:27 2009 New Revision: 74937 Log: typo Modified: python/trunk/Misc/NEWS Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Sep 18 23:47:27 2009 @@ -12,7 +12,7 @@ Core and Builtins ----------------- -- Issue #6300: unicode.encode, unicode.docode, str.decode, and str.encode now +- Issue #6300: unicode.encode, unicode.decode, str.decode, and str.encode now take keyword arguments. - Issue #6922: Fix an infinite loop when trying to decode an invalid From python-checkins at python.org Fri Sep 18 23:49:06 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 18 Sep 2009 21:49:06 -0000 Subject: [Python-checkins] r74938 - python/branches/py3k/Objects/unicodeobject.c Message-ID: Author: benjamin.peterson Date: Fri Sep 18 23:49:06 2009 New Revision: 74938 Log: kill merged line Modified: 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 Fri Sep 18 23:49:06 2009 @@ -8822,7 +8822,6 @@ {"ljust", (PyCFunction) unicode_ljust, METH_VARARGS, ljust__doc__}, {"lower", (PyCFunction) unicode_lower, METH_NOARGS, lower__doc__}, {"lstrip", (PyCFunction) unicode_lstrip, METH_VARARGS, lstrip__doc__}, -/* {"maketrans", (PyCFunction) unicode_maketrans, METH_VARARGS, maketrans__doc__}, */ {"rfind", (PyCFunction) unicode_rfind, METH_VARARGS, rfind__doc__}, {"rindex", (PyCFunction) unicode_rindex, METH_VARARGS, rindex__doc__}, {"rjust", (PyCFunction) unicode_rjust, METH_VARARGS, rjust__doc__}, From python-checkins at python.org Fri Sep 18 23:51:43 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 18 Sep 2009 21:51:43 -0000 Subject: [Python-checkins] r74939 - python/branches/py3k Message-ID: Author: benjamin.peterson Date: Fri Sep 18 23:51:43 2009 New Revision: 74939 Log: Blocked revisions 74936-74937 via svnmerge ........ r74936 | benjamin.peterson | 2009-09-18 16:46:21 -0500 (Fri, 18 Sep 2009) | 1 line backport keyword argument support for bytearray.decode ........ r74937 | benjamin.peterson | 2009-09-18 16:47:27 -0500 (Fri, 18 Sep 2009) | 1 line typo ........ Modified: python/branches/py3k/ (props changed) From python-checkins at python.org Fri Sep 18 23:57:34 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 18 Sep 2009 21:57:34 -0000 Subject: [Python-checkins] r74940 - python/branches/py3k/Doc/library/stdtypes.rst Message-ID: Author: benjamin.peterson Date: Fri Sep 18 23:57:33 2009 New Revision: 74940 Log: adjust signature Modified: python/branches/py3k/Doc/library/stdtypes.rst Modified: python/branches/py3k/Doc/library/stdtypes.rst ============================================================================== --- python/branches/py3k/Doc/library/stdtypes.rst (original) +++ python/branches/py3k/Doc/library/stdtypes.rst Fri Sep 18 23:57:33 2009 @@ -813,7 +813,7 @@ interpreted as in slice notation. -.. method:: str.encode([encoding[, errors]]) +.. method:: str.encode(encoding=sys.getdefaultencoding(), errors="strict") Return an encoded version of the string as a bytes object. Default encoding is the current default string encoding. *errors* may be given to set a @@ -1529,8 +1529,8 @@ b = a.replace(b"a", b"f") -.. method:: bytes.decode([encoding[, errors]]) - bytearray.decode([encoding[, errors]]) +.. method:: bytes.decode(encoding=sys.getdefaultencoding(), errors="strict") + bytearray.decode(encoding=sys.getdefaultencoding(), errors="strict") Return a string decoded from the given bytes. Default encoding is the current default string encoding. *errors* may be given to set a different From theller at ctypes.org Sat Sep 19 00:02:53 2009 From: theller at ctypes.org (Thomas Heller) Date: Sat, 19 Sep 2009 00:02:53 +0200 Subject: [Python-checkins] r74917 - in python/trunk: Lib/ctypes/test/test_structures.py Misc/NEWS Modules/_ctypes/_ctypes.c In-Reply-To: <1afaf6160909181351y421dbdbqe34841c1b8e3a33a@mail.gmail.com> References: <4ab3d7f8.1767f10a.5bc2.ffffbb0eSMTPIN_ADDED@mx.google.com> <1afaf6160909181351y421dbdbqe34841c1b8e3a33a@mail.gmail.com> Message-ID: Benjamin Peterson schrieb: > 2009/9/18 thomas.heller : >> Author: thomas.heller >> Date: Fri Sep 18 20:55:17 2009 >> New Revision: 74917 >> >> Log: >> Issue #5042: Structure sub-subclass does now initialize correctly with >> base class positional arguments. > > Either this commit or you next one causes these warnings on gcc 4.3: > > /home/benjamin/dev/python/trunk/Modules/_ctypes/_ctypes.c: In function > 'Struct_init': > /home/benjamin/dev/python/trunk/Modules/_ctypes/_ctypes.c:4093: > warning: unused variable 'stgdict' > /home/benjamin/dev/python/trunk/Modules/_ctypes/_ctypes.c: At top level: > /home/benjamin/dev/python/trunk/Modules/_ctypes/_ctypes.c:4017: > warning: 'IBUG' defined but not used > I'll fix it, maybe tomorrow. -- Thanks, Thomas From python-checkins at python.org Sat Sep 19 00:45:59 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 18 Sep 2009 22:45:59 -0000 Subject: [Python-checkins] r74941 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: benjamin.peterson Date: Sat Sep 19 00:45:59 2009 New Revision: 74941 Log: add a new category for myself Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Sat Sep 19 00:45:59 2009 @@ -274,6 +274,7 @@ memory management tim_one, lemburg networking packaging tarek, lemburg +py3 transition benjamin.peterson release management tarek, lemburg str.format eric.smith time and dates lemburg From python-checkins at python.org Sat Sep 19 00:50:55 2009 From: python-checkins at python.org (benjamin.peterson) Date: Fri, 18 Sep 2009 22:50:55 -0000 Subject: [Python-checkins] r74942 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: benjamin.peterson Date: Sat Sep 19 00:50:55 2009 New Revision: 74942 Log: add myself for symtable Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Sat Sep 19 00:50:55 2009 @@ -195,7 +195,7 @@ subprocess astrand (inactive) sunau symbol -symtable +symtable benjamin.peterson sys syslog tabnanny tim_one From nnorwitz at gmail.com Sat Sep 19 00:55:58 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 18 Sep 2009 18:55:58 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090918225558.GA32564@python.psfb.org> More important issues: ---------------------- test_urllib2_localnet leaked [-277, 0, 0] references, sum=-277 Less important issues: ---------------------- test_cmd_line leaked [25, -25, 25] references, sum=25 test_smtplib leaked [-88, 0, 88] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_xmlrpc leaked [0, 281, -281] references, sum=0 From python-checkins at python.org Sat Sep 19 09:35:07 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 19 Sep 2009 07:35:07 -0000 Subject: [Python-checkins] r74943 - in python/trunk: Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c Message-ID: Author: georg.brandl Date: Sat Sep 19 09:35:07 2009 New Revision: 74943 Log: #6944: the argument to PyArg_ParseTuple should be a tuple, otherwise a SystemError is set. Also clean up another usage of PyArg_ParseTuple. Modified: python/trunk/Lib/test/test_socket.py python/trunk/Misc/NEWS python/trunk/Modules/socketmodule.c Modified: python/trunk/Lib/test/test_socket.py ============================================================================== --- python/trunk/Lib/test/test_socket.py (original) +++ python/trunk/Lib/test/test_socket.py Sat Sep 19 09:35:07 2009 @@ -281,7 +281,7 @@ # On some versions, this loses a reference orig = sys.getrefcount(__name__) socket.getnameinfo(__name__,0) - except SystemError: + except TypeError: if sys.getrefcount(__name__) <> orig: self.fail("socket.getnameinfo loses a reference") Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Sep 19 09:35:07 2009 @@ -1333,6 +1333,9 @@ Extension Modules ----------------- +- Issue #6944: Fix a SystemError when socket.getnameinfo() was called + with something other than a tuple as first argument. + - Issue #6865: Fix reference counting issue in the initialization of the pwd module. Modified: python/trunk/Modules/socketmodule.c ============================================================================== --- python/trunk/Modules/socketmodule.c (original) +++ python/trunk/Modules/socketmodule.c Sat Sep 19 09:35:07 2009 @@ -4100,8 +4100,13 @@ flags = flowinfo = scope_id = 0; if (!PyArg_ParseTuple(args, "Oi:getnameinfo", &sa, &flags)) return NULL; - if (!PyArg_ParseTuple(sa, "si|ii", - &hostp, &port, &flowinfo, &scope_id)) + if (!PyTuple_Check(sa)) { + PyErr_SetString(PyExc_TypeError, + "getnameinfo() argument 1 must be a tuple"); + return NULL; + } + if (!PyArg_ParseTuple(sa, "si|ii", + &hostp, &port, &flowinfo, &scope_id)) return NULL; PyOS_snprintf(pbuf, sizeof(pbuf), "%d", port); memset(&hints, 0, sizeof(hints)); @@ -4124,9 +4129,7 @@ switch (res->ai_family) { case AF_INET: { - char *t1; - int t2; - if (PyArg_ParseTuple(sa, "si", &t1, &t2) == 0) { + if (PyTuple_GET_SIZE(sa) != 2) { PyErr_SetString(socket_error, "IPv4 sockaddr must be 2 tuple"); goto fail; From python-checkins at python.org Sat Sep 19 09:39:05 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 19 Sep 2009 07:39:05 -0000 Subject: [Python-checkins] r74944 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: georg.brandl Date: Sat Sep 19 09:39:05 2009 New Revision: 74944 Log: I would like to maintain the token module! Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Sat Sep 19 09:39:05 2009 @@ -209,10 +209,10 @@ time brett.cannon timeit tkinter gpolo -token +token georg.brandl tokenize trace -traceback +traceback georg.brandl tty turtle gregorlingl types From python-checkins at python.org Sat Sep 19 09:46:25 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 19 Sep 2009 07:46:25 -0000 Subject: [Python-checkins] r74945 - in python/branches/release26-maint: Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c Message-ID: Author: georg.brandl Date: Sat Sep 19 09:46:24 2009 New Revision: 74945 Log: Merged revisions 74943 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74943 | georg.brandl | 2009-09-19 09:35:07 +0200 (Sa, 19 Sep 2009) | 1 line #6944: the argument to PyArg_ParseTuple should be a tuple, otherwise a SystemError is set. Also clean up another usage of PyArg_ParseTuple. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/test/test_socket.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Modules/socketmodule.c Modified: python/branches/release26-maint/Lib/test/test_socket.py ============================================================================== --- python/branches/release26-maint/Lib/test/test_socket.py (original) +++ python/branches/release26-maint/Lib/test/test_socket.py Sat Sep 19 09:46:24 2009 @@ -281,7 +281,7 @@ # On some versions, this loses a reference orig = sys.getrefcount(__name__) socket.getnameinfo(__name__,0) - except SystemError: + except TypeError: if sys.getrefcount(__name__) <> orig: self.fail("socket.getnameinfo loses a reference") Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sat Sep 19 09:46:24 2009 @@ -262,6 +262,9 @@ Extension Modules ----------------- +- Issue #6944: Fix a SystemError when socket.getnameinfo() was called + with something other than a tuple as first argument. + - Issue #6848: Fix curses module build failure on OS X 10.6. - Fix expat to not segfault with specially crafted input. Modified: python/branches/release26-maint/Modules/socketmodule.c ============================================================================== --- python/branches/release26-maint/Modules/socketmodule.c (original) +++ python/branches/release26-maint/Modules/socketmodule.c Sat Sep 19 09:46:24 2009 @@ -4060,8 +4060,13 @@ flags = flowinfo = scope_id = 0; if (!PyArg_ParseTuple(args, "Oi:getnameinfo", &sa, &flags)) return NULL; - if (!PyArg_ParseTuple(sa, "si|ii", - &hostp, &port, &flowinfo, &scope_id)) + if (!PyTuple_Check(sa)) { + PyErr_SetString(PyExc_TypeError, + "getnameinfo() argument 1 must be a tuple"); + return NULL; + } + if (!PyArg_ParseTuple(sa, "si|ii", + &hostp, &port, &flowinfo, &scope_id)) return NULL; PyOS_snprintf(pbuf, sizeof(pbuf), "%d", port); memset(&hints, 0, sizeof(hints)); @@ -4084,9 +4089,7 @@ switch (res->ai_family) { case AF_INET: { - char *t1; - int t2; - if (PyArg_ParseTuple(sa, "si", &t1, &t2) == 0) { + if (PyTuple_GET_SIZE(sa) != 2) { PyErr_SetString(socket_error, "IPv4 sockaddr must be 2 tuple"); goto fail; From python-checkins at python.org Sat Sep 19 10:43:16 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 19 Sep 2009 08:43:16 -0000 Subject: [Python-checkins] r74946 - python/trunk/Lib/platform.py Message-ID: Author: georg.brandl Date: Sat Sep 19 10:43:16 2009 New Revision: 74946 Log: Update bug tracker reference. Modified: python/trunk/Lib/platform.py Modified: python/trunk/Lib/platform.py ============================================================================== --- python/trunk/Lib/platform.py (original) +++ python/trunk/Lib/platform.py Sat Sep 19 10:43:16 2009 @@ -10,7 +10,7 @@ """ # This module is maintained by Marc-Andre Lemburg . # If you find problems, please submit bug reports/patches via the -# Python SourceForge Project Page and assign them to "lemburg". +# Python bug tracker (http://bugs.python.org) and assign them to "lemburg". # # Note: Please keep this module compatible to Python 1.5.2. # From python-checkins at python.org Sat Sep 19 11:58:51 2009 From: python-checkins at python.org (tarek.ziade) Date: Sat, 19 Sep 2009 09:58:51 -0000 Subject: [Python-checkins] r74947 - in python/branches/release26-maint: Lib/distutils/tests/test_build_ext.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Sat Sep 19 11:58:51 2009 New Revision: 74947 Log: Fixed #6947 - SO extension varies under windows Modified: 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 Sat Sep 19 11:58:51 2009 @@ -338,7 +338,8 @@ cmd.distribution.package_dir = {'': 'src'} cmd.distribution.packages = ['lxml', 'lxml.html'] curdir = os.getcwd() - wanted = os.path.join(curdir, 'src', 'lxml', 'etree.so') + ext = sysconfig.get_config_var("SO") + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) path = cmd.get_ext_fullpath('lxml.etree') self.assertEquals(wanted, path) Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sat Sep 19 11:58:51 2009 @@ -82,6 +82,8 @@ Library ------- +- Issue #6947: Fix distutils test on windows. Patch by Hirokazu Yamamoto. + - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL. From python-checkins at python.org Sat Sep 19 12:04:54 2009 From: python-checkins at python.org (thomas.heller) Date: Sat, 19 Sep 2009 10:04:54 -0000 Subject: [Python-checkins] r74948 - python/trunk/Modules/_ctypes/_ctypes.c Message-ID: Author: thomas.heller Date: Sat Sep 19 12:04:54 2009 New Revision: 74948 Log: Remove unused variable and static function to fix compiler warnings. Modified: python/trunk/Modules/_ctypes/_ctypes.c Modified: python/trunk/Modules/_ctypes/_ctypes.c ============================================================================== --- python/trunk/Modules/_ctypes/_ctypes.c (original) +++ python/trunk/Modules/_ctypes/_ctypes.c Sat Sep 19 12:04:54 2009 @@ -4012,14 +4012,6 @@ /* Struct_Type */ -static int -IBUG(char *msg) -{ - PyErr_Format(PyExc_RuntimeError, - "inconsistent state in CDataObject (%s)", msg); - return -1; -} - /* This function is called to initialize a Structure or Union with positional arguments. It calls itself recursively for all Structure or Union base @@ -4090,12 +4082,9 @@ static int Struct_init(PyObject *self, PyObject *args, PyObject *kwds) { - StgDictObject *stgdict = PyObject_stgdict(self); - /* Optimization possible: Store the attribute names _fields_[x][0] * in C accessible fields somewhere ? */ - if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, "args not a tuple?"); From python-checkins at python.org Sat Sep 19 12:12:46 2009 From: python-checkins at python.org (thomas.heller) Date: Sat, 19 Sep 2009 10:12:46 -0000 Subject: [Python-checkins] r74949 - in python/branches/py3k: Modules/_ctypes/_ctypes.c Message-ID: Author: thomas.heller Date: Sat Sep 19 12:12:45 2009 New Revision: 74949 Log: Merged revisions 74948 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74948 | thomas.heller | 2009-09-19 12:04:54 +0200 (Sa, 19 Sep 2009) | 1 line Remove unused variable and static function to fix compiler warnings. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Modules/_ctypes/_ctypes.c Modified: python/branches/py3k/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/py3k/Modules/_ctypes/_ctypes.c (original) +++ python/branches/py3k/Modules/_ctypes/_ctypes.c Sat Sep 19 12:12:45 2009 @@ -3931,14 +3931,6 @@ /* Struct_Type */ -static int -IBUG(char *msg) -{ - PyErr_Format(PyExc_RuntimeError, - "inconsistent state in CDataObject (%s)", msg); - return -1; -} - /* This function is called to initialize a Structure or Union with positional arguments. It calls itself recursively for all Structure or Union base @@ -4009,12 +4001,9 @@ static int Struct_init(PyObject *self, PyObject *args, PyObject *kwds) { - StgDictObject *stgdict = PyObject_stgdict(self); - /* Optimization possible: Store the attribute names _fields_[x][0] * in C accessible fields somewhere ? */ - if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, "args not a tuple?"); From python-checkins at python.org Sat Sep 19 12:15:05 2009 From: python-checkins at python.org (thomas.heller) Date: Sat, 19 Sep 2009 10:15:05 -0000 Subject: [Python-checkins] r74950 - in python/branches/release26-maint: Modules/_ctypes/_ctypes.c Message-ID: Author: thomas.heller Date: Sat Sep 19 12:15:04 2009 New Revision: 74950 Log: Merged revisions 74948 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74948 | thomas.heller | 2009-09-19 12:04:54 +0200 (Sa, 19 Sep 2009) | 1 line Remove unused variable and static function to fix compiler warnings. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Modules/_ctypes/_ctypes.c Modified: python/branches/release26-maint/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/_ctypes.c (original) +++ python/branches/release26-maint/Modules/_ctypes/_ctypes.c Sat Sep 19 12:15:04 2009 @@ -4012,14 +4012,6 @@ /* Struct_Type */ -static int -IBUG(char *msg) -{ - PyErr_Format(PyExc_RuntimeError, - "inconsistent state in CDataObject (%s)", msg); - return -1; -} - /* This function is called to initialize a Structure or Union with positional arguments. It calls itself recursively for all Structure or Union base @@ -4090,12 +4082,9 @@ static int Struct_init(PyObject *self, PyObject *args, PyObject *kwds) { - StgDictObject *stgdict = PyObject_stgdict(self); - /* Optimization possible: Store the attribute names _fields_[x][0] * in C accessible fields somewhere ? */ - if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, "args not a tuple?"); From python-checkins at python.org Sat Sep 19 12:24:07 2009 From: python-checkins at python.org (thomas.heller) Date: Sat, 19 Sep 2009 10:24:07 -0000 Subject: [Python-checkins] r74951 - in python/branches/release31-maint: Modules/_ctypes/_ctypes.c Message-ID: Author: thomas.heller Date: Sat Sep 19 12:24:07 2009 New Revision: 74951 Log: Merged revisions 74949 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74949 | thomas.heller | 2009-09-19 12:12:45 +0200 (Sa, 19 Sep 2009) | 9 lines Merged revisions 74948 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74948 | thomas.heller | 2009-09-19 12:04:54 +0200 (Sa, 19 Sep 2009) | 1 line Remove unused variable and static function to fix compiler warnings. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Modules/_ctypes/_ctypes.c Modified: python/branches/release31-maint/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/_ctypes.c (original) +++ python/branches/release31-maint/Modules/_ctypes/_ctypes.c Sat Sep 19 12:24:07 2009 @@ -3931,14 +3931,6 @@ /* Struct_Type */ -static int -IBUG(char *msg) -{ - PyErr_Format(PyExc_RuntimeError, - "inconsistent state in CDataObject (%s)", msg); - return -1; -} - /* This function is called to initialize a Structure or Union with positional arguments. It calls itself recursively for all Structure or Union base @@ -4009,12 +4001,9 @@ static int Struct_init(PyObject *self, PyObject *args, PyObject *kwds) { - StgDictObject *stgdict = PyObject_stgdict(self); - /* Optimization possible: Store the attribute names _fields_[x][0] * in C accessible fields somewhere ? */ - if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, "args not a tuple?"); From nnorwitz at gmail.com Sat Sep 19 12:36:32 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sat, 19 Sep 2009 06:36:32 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090919103632.GA11965@python.psfb.org> More important issues: ---------------------- test_distutils leaked [0, 0, 50] references, sum=50 Less important issues: ---------------------- test_asynchat leaked [0, 0, 117] references, sum=117 test_socketserver leaked [0, 80, -80] references, sum=0 test_threadedtempfile leaked [0, 94, -94] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_xmlrpc leaked [-85, 0, 0] references, sum=-85 From python-checkins at python.org Sat Sep 19 12:42:34 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 19 Sep 2009 10:42:34 -0000 Subject: [Python-checkins] r74952 - python/trunk/Doc/library/datetime.rst Message-ID: Author: georg.brandl Date: Sat Sep 19 12:42:34 2009 New Revision: 74952 Log: #6946: fix duplicate index entries for datetime classes. Modified: python/trunk/Doc/library/datetime.rst Modified: python/trunk/Doc/library/datetime.rst ============================================================================== --- python/trunk/Doc/library/datetime.rst (original) +++ python/trunk/Doc/library/datetime.rst Sat Sep 19 12:42:34 2009 @@ -65,6 +65,7 @@ .. class:: date + :noindex: An idealized naive date, assuming the current Gregorian calendar always was, and always will be, in effect. Attributes: :attr:`year`, :attr:`month`, and @@ -72,6 +73,7 @@ .. class:: time + :noindex: An idealized time, independent of any particular day, assuming that every day has exactly 24\*60\*60 seconds (there is no notion of "leap seconds" here). @@ -80,6 +82,7 @@ .. class:: datetime + :noindex: A combination of a date and a time. Attributes: :attr:`year`, :attr:`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`, @@ -87,6 +90,7 @@ .. class:: timedelta + :noindex: A duration expressing the difference between two :class:`date`, :class:`time`, or :class:`datetime` instances to microsecond resolution. From python-checkins at python.org Sat Sep 19 14:04:16 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 19 Sep 2009 12:04:16 -0000 Subject: [Python-checkins] r74953 - python/trunk/Doc/library/threading.rst Message-ID: Author: georg.brandl Date: Sat Sep 19 14:04:16 2009 New Revision: 74953 Log: Fix references to threading.enumerate(). 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 Sat Sep 19 14:04:16 2009 @@ -33,7 +33,7 @@ activeCount() Return the number of :class:`Thread` objects currently alive. The returned - count is equal to the length of the list returned by :func:`enumerate`. + count is equal to the length of the list returned by :func:`.enumerate`. .. function:: Condition() @@ -321,7 +321,7 @@ 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. + :func:`.enumerate` returns a list of all alive threads. .. method:: isDaemon() setDaemon() From python-checkins at python.org Sat Sep 19 15:13:56 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 19 Sep 2009 13:13:56 -0000 Subject: [Python-checkins] r74954 - python/trunk/Misc/developers.txt Message-ID: Author: georg.brandl Date: Sat Sep 19 15:13:56 2009 New Revision: 74954 Log: Add Doug. Modified: python/trunk/Misc/developers.txt Modified: python/trunk/Misc/developers.txt ============================================================================== --- python/trunk/Misc/developers.txt (original) +++ python/trunk/Misc/developers.txt Sat Sep 19 15:13:56 2009 @@ -20,6 +20,9 @@ Permissions History ------------------- +- Doug Hellmann was given SVN access on September 19 2009 by GFB, at + suggestion of Jesse Noller, for documentation work. + - Ezio Melotti was given SVN access on June 7 2009 by GFB, for work on and fixes to the documentation. From python-checkins at python.org Sat Sep 19 15:20:49 2009 From: python-checkins at python.org (georg.brandl) Date: Sat, 19 Sep 2009 13:20:49 -0000 Subject: [Python-checkins] r74955 - python/trunk/Misc/developers.txt Message-ID: Author: georg.brandl Date: Sat Sep 19 15:20:49 2009 New Revision: 74955 Log: Add Mark Summerfield. Modified: python/trunk/Misc/developers.txt Modified: python/trunk/Misc/developers.txt ============================================================================== --- python/trunk/Misc/developers.txt (original) +++ python/trunk/Misc/developers.txt Sat Sep 19 15:20:49 2009 @@ -112,6 +112,9 @@ - Jeffrey Yasskin was given SVN access on 9 August 2007 by NCN, for his work on PEPs and other general patches. +- Mark Summerfield was given SVN access on 1 August 2007 by GFB, + for work on documentation. + - Armin Ronacher was given SVN access on 23 July 2007 by GFB, for work on the documentation toolset. He now maintains the ast module. From python-checkins at python.org Sat Sep 19 20:40:08 2009 From: python-checkins at python.org (r.david.murray) Date: Sat, 19 Sep 2009 18:40:08 -0000 Subject: [Python-checkins] r74956 - python/branches/py3k/Misc/maintainers.rst Message-ID: Author: r.david.murray Date: Sat Sep 19 20:40:08 2009 New Revision: 74956 Log: Add everyone who we know has been a release manager as a resource for the 'release management' topic. Modified: python/branches/py3k/Misc/maintainers.rst Modified: python/branches/py3k/Misc/maintainers.rst ============================================================================== --- python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/py3k/Misc/maintainers.rst Sat Sep 19 20:40:08 2009 @@ -275,7 +275,8 @@ networking packaging tarek, lemburg py3 transition benjamin.peterson -release management tarek, lemburg +release management tarek, lemburg, benjamin.peterson, barry, loewis, + gvanrossum, anthonybaxter str.format eric.smith time and dates lemburg testing michael.foord, pitrou From python-checkins at python.org Sat Sep 19 21:04:37 2009 From: python-checkins at python.org (r.david.murray) Date: Sat, 19 Sep 2009 19:04:37 -0000 Subject: [Python-checkins] r74957 - in python/branches/release31-maint: Misc/maintainers.rst Message-ID: Author: r.david.murray Date: Sat Sep 19 21:04:37 2009 New Revision: 74957 Log: Merged revisions 74881-74885,74888,74891-74895,74900,74905-74906,74931-74932,74934,74941-74942,74944,74956 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74881 | r.david.murray | 2009-09-17 15:12:49 -0400 (Thu, 17 Sep 2009) | 2 lines Check in first draft of maintainers.rst. ........ r74882 | eric.smith | 2009-09-17 15:22:30 -0400 (Thu, 17 Sep 2009) | 1 line Typo. ........ r74883 | mark.dickinson | 2009-09-17 15:37:28 -0400 (Thu, 17 Sep 2009) | 1 line Add some more module maintainers. ........ r74884 | mark.dickinson | 2009-09-17 15:39:12 -0400 (Thu, 17 Sep 2009) | 1 line Revert accidental changes to Objects/longobject.c ........ r74885 | mark.dickinson | 2009-09-17 16:20:01 -0400 (Thu, 17 Sep 2009) | 1 line Add decimal maintainers ........ r74888 | r.david.murray | 2009-09-17 18:10:48 -0400 (Thu, 17 Sep 2009) | 2 lines Maintainer additions from MAL. ........ r74891 | georg.brandl | 2009-09-17 18:18:01 -0400 (Thu, 17 Sep 2009) | 1 line Some more maintainers. ........ r74892 | r.david.murray | 2009-09-17 19:23:56 -0400 (Thu, 17 Sep 2009) | 2 lines Add a couple interest areas for Nick per his request. ........ r74893 | r.david.murray | 2009-09-17 19:43:20 -0400 (Thu, 17 Sep 2009) | 2 lines Benajmin is also compiler-knowledgeable. ........ r74894 | alexandre.vassalotti | 2009-09-17 20:59:05 -0400 (Thu, 17 Sep 2009) | 2 lines Added myself to my areas of interest. ........ r74895 | brett.cannon | 2009-09-17 21:03:35 -0400 (Thu, 17 Sep 2009) | 1 line Add myself to a couple places as maintainer. ........ r74900 | georg.brandl | 2009-09-18 05:06:37 -0400 (Fri, 18 Sep 2009) | 1 line Add myself in interest areas. ........ r74905 | ezio.melotti | 2009-09-18 05:58:43 -0400 (Fri, 18 Sep 2009) | 1 line Add myself in interest areas and mark effbot as inactive in winsound ........ r74906 | antoine.pitrou | 2009-09-18 09:15:23 -0400 (Fri, 18 Sep 2009) | 3 lines Add myself in a couple of places ........ r74931 | r.david.murray | 2009-09-18 17:25:36 -0400 (Fri, 18 Sep 2009) | 5 lines Add some names gleaned from the "Tracker Archeology" thread on python-dev from back in February. Also consolidate the autoconf and makefiles topics into one, and add tracker and svn/hg topics. ........ r74932 | r.david.murray | 2009-09-18 17:32:16 -0400 (Fri, 18 Sep 2009) | 2 lines Remove non-committer mistakenly added. ........ r74934 | r.david.murray | 2009-09-18 17:40:30 -0400 (Fri, 18 Sep 2009) | 2 lines More descriptive/generic name for the svn/hg entry (version control) ........ r74941 | benjamin.peterson | 2009-09-18 18:45:59 -0400 (Fri, 18 Sep 2009) | 1 line add a new category for myself ........ r74942 | benjamin.peterson | 2009-09-18 18:50:55 -0400 (Fri, 18 Sep 2009) | 1 line add myself for symtable ........ r74944 | georg.brandl | 2009-09-19 03:39:05 -0400 (Sat, 19 Sep 2009) | 1 line I would like to maintain the token module! ........ r74956 | r.david.murray | 2009-09-19 14:40:08 -0400 (Sat, 19 Sep 2009) | 3 lines Add everyone who we know has been a release manager as a resource for the 'release management' topic. ........ Added: python/branches/release31-maint/Misc/maintainers.rst - copied, changed from r74888, /python/branches/py3k/Misc/maintainers.rst Modified: python/branches/release31-maint/ (props changed) Copied: python/branches/release31-maint/Misc/maintainers.rst (from r74888, /python/branches/py3k/Misc/maintainers.rst) ============================================================================== --- /python/branches/py3k/Misc/maintainers.rst (original) +++ python/branches/release31-maint/Misc/maintainers.rst Sat Sep 19 21:04:37 2009 @@ -57,7 +57,7 @@ bdb binascii binhex -bisect +bisect rhettinger builtins bz2 calendar @@ -74,8 +74,8 @@ compileall configparser contextlib -copy -copyreg +copy alexandre.vassalotti +copyreg alexandre.vassalotti cProfile crypt csv @@ -87,7 +87,7 @@ difflib dis distutils tarek -doctest +doctest tim_one (inactive) dummy_threading brett.cannon email barry encodings lemburg, loewis @@ -102,15 +102,15 @@ fractions mark.dickinson ftplib functools -gc +gc pitrou getopt getpass -gettext +gettext loewis glob grp gzip hashlib -heapq +heapq rhettinger hmac html http @@ -121,7 +121,7 @@ inspect io pitrou, benjamin.peterson itertools rhettinger -json +json bob.ippolito (inactive) keyword lib2to3 benjamin.peterson linecache @@ -148,26 +148,26 @@ ossaudiodev parser pdb -pickle -pickletools +pickle alexandre.vassalotti, pitrou +pickletools alexandre.vassalotti pipes pkgutil platform lemburg plistlib poplib posix -pprint +pprint fdrake pstats pty pwd py_compile -pybench lemburg +pybench lemburg, pitrou pyclbr pydoc queue quopri random rhettinger -re effbot (inactive) +re effbot (inactive), pitrou readline reprlib resource @@ -186,7 +186,7 @@ socket socketserver spwd -sqlite3 +sqlite3 ghaering ssl janssen stat string @@ -195,7 +195,7 @@ subprocess astrand (inactive) sunau symbol -symtable +symtable benjamin.peterson sys syslog tabnanny tim_one @@ -206,27 +206,27 @@ test textwrap threading -time +time brett.cannon timeit tkinter gpolo -token +token georg.brandl tokenize trace -traceback +traceback georg.brandl tty turtle gregorlingl types -unicodedata loewis, lemburg +unicodedata loewis, lemburg, ezio.melotti unittest michael.foord -urllib +urllib orsenthil uu uuid -warnings +warnings brett.cannon wave weakref fdrake webbrowser georg.brandl winreg -winsound effbot +winsound effbot (inactive) wsgiref pje xdrlib xml loewis @@ -257,28 +257,32 @@ Interest Area Maintainers ------------------ ----------- algorithms -ast/compiler -autoconf +ast/compiler ncoghlan, benjamin.peterson, brett.cannon, georg.brandl +autoconf/makefiles bsd buildbots -data formats mark.dickinson +bytecode pitrou +data formats mark.dickinson, georg.brandl database lemburg -documentation georg.brandl +documentation georg.brandl, ezio.melotti GUI i18n lemburg -import machinery brett.cannon +import machinery brett.cannon, ncoghlan io pitrou, benjamin.peterson locale lemburg, loewis -makefiles mathematics mark.dickinson, eric.smith, lemburg memory management tim_one, lemburg networking packaging tarek, lemburg -release management tarek, lemburg +py3 transition benjamin.peterson +release management tarek, lemburg, benjamin.peterson, barry, loewis, + gvanrossum, anthonybaxter str.format eric.smith time and dates lemburg -testing michael.foord +testing michael.foord, pitrou threads +tracker unicode lemburg +version control windows ================== =========== From nnorwitz at gmail.com Sat Sep 19 23:42:22 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sat, 19 Sep 2009 17:42:22 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090919214222.GA26125@python.psfb.org> More important issues: ---------------------- test_ssl leaked [-81, 420, 0] references, sum=339 test_urllib2_localnet leaked [-277, 0, 0] references, sum=-277 Less important issues: ---------------------- test_asynchat leaked [0, 126, -126] references, sum=0 test_cmd_line leaked [0, -25, 0] references, sum=-25 test_file2k leaked [0, 83, -83] references, sum=0 test_smtplib leaked [0, -88, -6] references, sum=-94 test_sys leaked [-21, 0, 42] references, sum=21 test_threadedtempfile leaked [0, 102, -102] references, sum=0 test_threading leaked [48, 48, 48] references, sum=144 test_threadsignals leaked [0, 0, -8] references, sum=-8 From python-checkins at python.org Sun Sep 20 09:10:39 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 20 Sep 2009 07:10:39 -0000 Subject: [Python-checkins] r74958 - python/trunk/Doc/c-api/bytearray.rst Message-ID: Author: ezio.melotti Date: Sun Sep 20 09:10:39 2009 New Revision: 74958 Log: #6881 - fixed wrong return type; improved the formatting Modified: python/trunk/Doc/c-api/bytearray.rst Modified: python/trunk/Doc/c-api/bytearray.rst ============================================================================== --- python/trunk/Doc/c-api/bytearray.rst (original) +++ python/trunk/Doc/c-api/bytearray.rst Sun Sep 20 09:10:39 2009 @@ -20,6 +20,8 @@ This instance of :ctype:`PyTypeObject` represents the Python bytearray type; it is the same object as ``bytearray`` in the Python layer. +Type check macros +^^^^^^^^^^^^^^^^^ .. cfunction:: int PyByteArray_Check(PyObject *o) @@ -33,6 +35,9 @@ subtype of the bytearray type. +Direct API functions +^^^^^^^^^^^^^^^^^^^^ + .. cfunction:: PyObject* PyByteArray_FromObject(PyObject *o) Return a new bytearray object from any object, *o*, that implements the @@ -47,14 +52,14 @@ failure, *NULL* is returned. -.. cfunction:: Py_ssize_t PyByteArray_Size(PyObject *bytearray) +.. cfunction:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b) - Return the size of *bytearray* after checking for a *NULL* pointer. + Concat bytearrays *a* and *b* and return a new bytearray with the result. -.. cfunction:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray) +.. cfunction:: Py_ssize_t PyByteArray_Size(PyObject *bytearray) - Macro version of :cfunc:`PyByteArray_Size` that doesn't do pointer checking. + Return the size of *bytearray* after checking for a *NULL* pointer. .. cfunction:: char* PyByteArray_AsString(PyObject *bytearray) @@ -63,16 +68,20 @@ *NULL* pointer. -.. cfunction:: char* PyByteArray_AS_STRING(PyObject *bytearray) +.. cfunction:: int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len) - Macro version of :cfunc:`PyByteArray_AsString` that doesn't check pointers. + Resize the internal buffer of *bytearray* to *len*. +Macros +^^^^^^ -.. cfunction:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b) +These macros trade safety for speed and they don't check pointers. - Concat bytearrays *a* and *b* and return a new bytearray with the result. +.. cfunction:: char* PyByteArray_AS_STRING(PyObject *bytearray) + Macro version of :cfunc:`PyByteArray_AsString`. -.. cfunction:: PyObject* PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len) - Resize the internal buffer of *bytearray* to *len*. +.. cfunction:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray) + + Macro version of :cfunc:`PyByteArray_Size`. From python-checkins at python.org Sun Sep 20 09:14:47 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 20 Sep 2009 07:14:47 -0000 Subject: [Python-checkins] r74959 - in python/branches/release26-maint: Doc/c-api/bytearray.rst Message-ID: Author: ezio.melotti Date: Sun Sep 20 09:14:47 2009 New Revision: 74959 Log: Merged revisions 74958 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74958 | ezio.melotti | 2009-09-20 10:10:39 +0300 (Sun, 20 Sep 2009) | 1 line #6881 - fixed wrong return type; improved the formatting ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/c-api/bytearray.rst Modified: python/branches/release26-maint/Doc/c-api/bytearray.rst ============================================================================== --- python/branches/release26-maint/Doc/c-api/bytearray.rst (original) +++ python/branches/release26-maint/Doc/c-api/bytearray.rst Sun Sep 20 09:14:47 2009 @@ -20,6 +20,8 @@ This instance of :ctype:`PyTypeObject` represents the Python bytearray type; it is the same object as ``bytearray`` in the Python layer. +Type check macros +^^^^^^^^^^^^^^^^^ .. cfunction:: int PyByteArray_Check(PyObject *o) @@ -33,6 +35,9 @@ subtype of the bytearray type. +Direct API functions +^^^^^^^^^^^^^^^^^^^^ + .. cfunction:: PyObject* PyByteArray_FromObject(PyObject *o) Return a new bytearray object from any object, *o*, that implements the @@ -47,14 +52,14 @@ failure, *NULL* is returned. -.. cfunction:: Py_ssize_t PyByteArray_Size(PyObject *bytearray) +.. cfunction:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b) - Return the size of *bytearray* after checking for a *NULL* pointer. + Concat bytearrays *a* and *b* and return a new bytearray with the result. -.. cfunction:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray) +.. cfunction:: Py_ssize_t PyByteArray_Size(PyObject *bytearray) - Macro version of :cfunc:`PyByteArray_Size` that doesn't do pointer checking. + Return the size of *bytearray* after checking for a *NULL* pointer. .. cfunction:: char* PyByteArray_AsString(PyObject *bytearray) @@ -63,16 +68,20 @@ *NULL* pointer. -.. cfunction:: char* PyByteArray_AS_STRING(PyObject *bytearray) +.. cfunction:: int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len) - Macro version of :cfunc:`PyByteArray_AsString` that doesn't check pointers. + Resize the internal buffer of *bytearray* to *len*. +Macros +^^^^^^ -.. cfunction:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b) +These macros trade safety for speed and they don't check pointers. - Concat bytearrays *a* and *b* and return a new bytearray with the result. +.. cfunction:: char* PyByteArray_AS_STRING(PyObject *bytearray) + Macro version of :cfunc:`PyByteArray_AsString`. -.. cfunction:: PyObject* PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len) - Resize the internal buffer of *bytearray* to *len*. +.. cfunction:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray) + + Macro version of :cfunc:`PyByteArray_Size`. From python-checkins at python.org Sun Sep 20 09:19:57 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 20 Sep 2009 07:19:57 -0000 Subject: [Python-checkins] r74960 - in python/branches/py3k: Doc/c-api/bytearray.rst Message-ID: Author: ezio.melotti Date: Sun Sep 20 09:19:57 2009 New Revision: 74960 Log: Merged revisions 74958 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74958 | ezio.melotti | 2009-09-20 10:10:39 +0300 (Sun, 20 Sep 2009) | 1 line #6881 - fixed wrong return type; improved the formatting ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/c-api/bytearray.rst Modified: python/branches/py3k/Doc/c-api/bytearray.rst ============================================================================== --- python/branches/py3k/Doc/c-api/bytearray.rst (original) +++ python/branches/py3k/Doc/c-api/bytearray.rst Sun Sep 20 09:19:57 2009 @@ -18,6 +18,8 @@ This instance of :ctype:`PyTypeObject` represents the Python bytearray type; it is the same object as ``bytearray`` in the Python layer. +Type check macros +^^^^^^^^^^^^^^^^^ .. cfunction:: int PyByteArray_Check(PyObject *o) @@ -31,6 +33,9 @@ subtype of the bytearray type. +Direct API functions +^^^^^^^^^^^^^^^^^^^^ + .. cfunction:: PyObject* PyByteArray_FromObject(PyObject *o) Return a new bytearray object from any object, *o*, that implements the @@ -45,14 +50,14 @@ failure, *NULL* is returned. -.. cfunction:: Py_ssize_t PyByteArray_Size(PyObject *bytearray) +.. cfunction:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b) - Return the size of *bytearray* after checking for a *NULL* pointer. + Concat bytearrays *a* and *b* and return a new bytearray with the result. -.. cfunction:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray) +.. cfunction:: Py_ssize_t PyByteArray_Size(PyObject *bytearray) - Macro version of :cfunc:`PyByteArray_Size` that doesn't do pointer checking. + Return the size of *bytearray* after checking for a *NULL* pointer. .. cfunction:: char* PyByteArray_AsString(PyObject *bytearray) @@ -61,16 +66,20 @@ *NULL* pointer. -.. cfunction:: char* PyByteArray_AS_STRING(PyObject *bytearray) +.. cfunction:: int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len) - Macro version of :cfunc:`PyByteArray_AsString` that doesn't check pointers. + Resize the internal buffer of *bytearray* to *len*. +Macros +^^^^^^ -.. cfunction:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b) +These macros trade safety for speed and they don't check pointers. - Concat bytearrays *a* and *b* and return a new bytearray with the result. +.. cfunction:: char* PyByteArray_AS_STRING(PyObject *bytearray) + Macro version of :cfunc:`PyByteArray_AsString`. -.. cfunction:: PyObject* PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len) - Resize the internal buffer of *bytearray* to *len*. +.. cfunction:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray) + + Macro version of :cfunc:`PyByteArray_Size`. From python-checkins at python.org Sun Sep 20 09:22:01 2009 From: python-checkins at python.org (ezio.melotti) Date: Sun, 20 Sep 2009 07:22:01 -0000 Subject: [Python-checkins] r74961 - in python/branches/release31-maint: Doc/c-api/bytearray.rst Message-ID: Author: ezio.melotti Date: Sun Sep 20 09:22:00 2009 New Revision: 74961 Log: Merged revisions 74960 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74960 | ezio.melotti | 2009-09-20 10:19:57 +0300 (Sun, 20 Sep 2009) | 9 lines Merged revisions 74958 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74958 | ezio.melotti | 2009-09-20 10:10:39 +0300 (Sun, 20 Sep 2009) | 1 line #6881 - fixed wrong return type; improved the formatting ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/c-api/bytearray.rst Modified: python/branches/release31-maint/Doc/c-api/bytearray.rst ============================================================================== --- python/branches/release31-maint/Doc/c-api/bytearray.rst (original) +++ python/branches/release31-maint/Doc/c-api/bytearray.rst Sun Sep 20 09:22:00 2009 @@ -18,6 +18,8 @@ This instance of :ctype:`PyTypeObject` represents the Python bytearray type; it is the same object as ``bytearray`` in the Python layer. +Type check macros +^^^^^^^^^^^^^^^^^ .. cfunction:: int PyByteArray_Check(PyObject *o) @@ -31,6 +33,9 @@ subtype of the bytearray type. +Direct API functions +^^^^^^^^^^^^^^^^^^^^ + .. cfunction:: PyObject* PyByteArray_FromObject(PyObject *o) Return a new bytearray object from any object, *o*, that implements the @@ -45,14 +50,14 @@ failure, *NULL* is returned. -.. cfunction:: Py_ssize_t PyByteArray_Size(PyObject *bytearray) +.. cfunction:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b) - Return the size of *bytearray* after checking for a *NULL* pointer. + Concat bytearrays *a* and *b* and return a new bytearray with the result. -.. cfunction:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray) +.. cfunction:: Py_ssize_t PyByteArray_Size(PyObject *bytearray) - Macro version of :cfunc:`PyByteArray_Size` that doesn't do pointer checking. + Return the size of *bytearray* after checking for a *NULL* pointer. .. cfunction:: char* PyByteArray_AsString(PyObject *bytearray) @@ -61,16 +66,20 @@ *NULL* pointer. -.. cfunction:: char* PyByteArray_AS_STRING(PyObject *bytearray) +.. cfunction:: int PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len) - Macro version of :cfunc:`PyByteArray_AsString` that doesn't check pointers. + Resize the internal buffer of *bytearray* to *len*. +Macros +^^^^^^ -.. cfunction:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b) +These macros trade safety for speed and they don't check pointers. - Concat bytearrays *a* and *b* and return a new bytearray with the result. +.. cfunction:: char* PyByteArray_AS_STRING(PyObject *bytearray) + Macro version of :cfunc:`PyByteArray_AsString`. -.. cfunction:: PyObject* PyByteArray_Resize(PyObject *bytearray, Py_ssize_t len) - Resize the internal buffer of *bytearray* to *len*. +.. cfunction:: Py_ssize_t PyByteArray_GET_SIZE(PyObject *bytearray) + + Macro version of :cfunc:`PyByteArray_Size`. From nnorwitz at gmail.com Sun Sep 20 11:43:32 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sun, 20 Sep 2009 05:43:32 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090920094332.GA31283@python.psfb.org> More important issues: ---------------------- test_ssl leaked [0, 26, -446] references, sum=-420 Less important issues: ---------------------- test_asynchat leaked [139, -139, 0] references, sum=0 test_cmd_line leaked [0, 0, -25] references, sum=-25 test_file2k leaked [0, 0, 91] references, sum=91 test_smtplib leaked [88, 0, 0] references, sum=88 test_socketserver leaked [77, -77, 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 [277, -277, 0] references, sum=0 From python-checkins at python.org Sun Sep 20 12:31:22 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 10:31:22 -0000 Subject: [Python-checkins] r74962 - in python/trunk: Lib/urllib.py Mac/Modules/_scproxy.c Misc/NEWS setup.py Message-ID: Author: ronald.oussoren Date: Sun Sep 20 12:31:22 2009 New Revision: 74962 Log: Fix for issue 6851: urllib.urlopen crashes in a thread on OSX 10.6 Added: python/trunk/Mac/Modules/_scproxy.c (contents, props changed) Modified: python/trunk/Lib/urllib.py python/trunk/Misc/NEWS python/trunk/setup.py Modified: python/trunk/Lib/urllib.py ============================================================================== --- python/trunk/Lib/urllib.py (original) +++ python/trunk/Lib/urllib.py Sun Sep 20 12:31:22 2009 @@ -1327,38 +1327,7 @@ if sys.platform == 'darwin': - - def _CFSetup(sc): - from ctypes import c_int32, c_void_p, c_char_p, c_int - sc.CFStringCreateWithCString.argtypes = [ c_void_p, c_char_p, c_int32 ] - sc.CFStringCreateWithCString.restype = c_void_p - sc.SCDynamicStoreCopyProxies.argtypes = [ c_void_p ] - sc.SCDynamicStoreCopyProxies.restype = c_void_p - sc.CFDictionaryGetValue.argtypes = [ c_void_p, c_void_p ] - sc.CFDictionaryGetValue.restype = c_void_p - sc.CFStringGetLength.argtypes = [ c_void_p ] - sc.CFStringGetLength.restype = c_int32 - sc.CFStringGetCString.argtypes = [ c_void_p, c_char_p, c_int32, c_int32 ] - sc.CFStringGetCString.restype = c_int32 - sc.CFNumberGetValue.argtypes = [ c_void_p, c_int, c_void_p ] - sc.CFNumberGetValue.restype = c_int32 - sc.CFRelease.argtypes = [ c_void_p ] - sc.CFRelease.restype = None - - def _CStringFromCFString(sc, value): - from ctypes import create_string_buffer - length = sc.CFStringGetLength(value) + 1 - buff = create_string_buffer(length) - sc.CFStringGetCString(value, buff, length, 0) - return buff.value - - def _CFNumberToInt32(sc, cfnum): - from ctypes import byref, c_int - val = c_int() - kCFNumberSInt32Type = 3 - sc.CFNumberGetValue(cfnum, kCFNumberSInt32Type, byref(val)) - return val.value - + from _scproxy import _get_proxy_settings, _get_proxies def proxy_bypass_macosx_sysconf(host): """ @@ -1367,8 +1336,6 @@ This function uses the MacOSX framework SystemConfiguration to fetch the proxy information. """ - from ctypes import cdll - from ctypes.util import find_library import re import socket from fnmatch import fnmatch @@ -1380,63 +1347,35 @@ parts = (parts + [0, 0, 0, 0])[:4] return (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8) | parts[3] - sc = cdll.LoadLibrary(find_library("SystemConfiguration")) - _CFSetup(sc) - - hostIP = None - - if not sc: - return False - - kSCPropNetProxiesExceptionsList = sc.CFStringCreateWithCString(0, "ExceptionsList", 0) - kSCPropNetProxiesExcludeSimpleHostnames = sc.CFStringCreateWithCString(0, - "ExcludeSimpleHostnames", 0) - + proxy_settings = _get_proxy_settings() - proxyDict = sc.SCDynamicStoreCopyProxies(None) - if proxyDict is None: - return False + # Check for simple host names: + if '.' not in host: + if proxy_settings['exclude_simple']: + return True + + for value in proxy_settings.get('exceptions'): + # Items in the list are strings like these: *.local, 169.254/16 + value = sc.CFArrayGetValueAtIndex(exceptions, index) + if not value: continue + + m = re.match(r"(\d+(?:\.\d+)*)(/\d+)?", value) + if m is not None: + if hostIP is None: + hostIP = socket.gethostbyname(host) + hostIP = ip2num(hostIP) + + base = ip2num(m.group(1)) + mask = int(m.group(2)[1:]) + mask = 32 - mask - try: - # Check for simple host names: - if '.' not in host: - exclude_simple = sc.CFDictionaryGetValue(proxyDict, - kSCPropNetProxiesExcludeSimpleHostnames) - if exclude_simple and _CFNumberToInt32(sc, exclude_simple): + if (hostIP >> mask) == (base >> mask): return True + elif fnmatch(host, value): + return True - # Check the exceptions list: - exceptions = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesExceptionsList) - if exceptions: - # Items in the list are strings like these: *.local, 169.254/16 - for index in xrange(sc.CFArrayGetCount(exceptions)): - value = sc.CFArrayGetValueAtIndex(exceptions, index) - if not value: continue - value = _CStringFromCFString(sc, value) - - m = re.match(r"(\d+(?:\.\d+)*)(/\d+)?", value) - if m is not None: - if hostIP is None: - hostIP = socket.gethostbyname(host) - hostIP = ip2num(hostIP) - - base = ip2num(m.group(1)) - mask = int(m.group(2)[1:]) - mask = 32 - mask - - if (hostIP >> mask) == (base >> mask): - return True - - elif fnmatch(host, value): - return True - - return False - - finally: - sc.CFRelease(kSCPropNetProxiesExceptionsList) - sc.CFRelease(kSCPropNetProxiesExcludeSimpleHostnames) - + return False def getproxies_macosx_sysconf(): @@ -1445,106 +1384,7 @@ This function uses the MacOSX framework SystemConfiguration to fetch the proxy information. """ - from ctypes import cdll - from ctypes.util import find_library - - sc = cdll.LoadLibrary(find_library("SystemConfiguration")) - _CFSetup(sc) - - if not sc: - return {} - - kSCPropNetProxiesHTTPEnable = sc.CFStringCreateWithCString(0, "HTTPEnable", 0) - kSCPropNetProxiesHTTPProxy = sc.CFStringCreateWithCString(0, "HTTPProxy", 0) - kSCPropNetProxiesHTTPPort = sc.CFStringCreateWithCString(0, "HTTPPort", 0) - - kSCPropNetProxiesHTTPSEnable = sc.CFStringCreateWithCString(0, "HTTPSEnable", 0) - kSCPropNetProxiesHTTPSProxy = sc.CFStringCreateWithCString(0, "HTTPSProxy", 0) - kSCPropNetProxiesHTTPSPort = sc.CFStringCreateWithCString(0, "HTTPSPort", 0) - - kSCPropNetProxiesFTPEnable = sc.CFStringCreateWithCString(0, "FTPEnable", 0) - kSCPropNetProxiesFTPPassive = sc.CFStringCreateWithCString(0, "FTPPassive", 0) - kSCPropNetProxiesFTPPort = sc.CFStringCreateWithCString(0, "FTPPort", 0) - kSCPropNetProxiesFTPProxy = sc.CFStringCreateWithCString(0, "FTPProxy", 0) - - kSCPropNetProxiesGopherEnable = sc.CFStringCreateWithCString(0, "GopherEnable", 0) - kSCPropNetProxiesGopherPort = sc.CFStringCreateWithCString(0, "GopherPort", 0) - kSCPropNetProxiesGopherProxy = sc.CFStringCreateWithCString(0, "GopherProxy", 0) - - proxies = {} - proxyDict = sc.SCDynamicStoreCopyProxies(None) - - try: - # HTTP: - enabled = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPEnable) - if enabled and _CFNumberToInt32(sc, enabled): - proxy = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPProxy) - port = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPPort) - - if proxy: - proxy = _CStringFromCFString(sc, proxy) - if port: - port = _CFNumberToInt32(sc, port) - proxies["http"] = "http://%s:%i" % (proxy, port) - else: - proxies["http"] = "http://%s" % (proxy, ) - - # HTTPS: - enabled = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPSEnable) - if enabled and _CFNumberToInt32(sc, enabled): - proxy = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPSProxy) - port = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPSPort) - - if proxy: - proxy = _CStringFromCFString(sc, proxy) - if port: - port = _CFNumberToInt32(sc, port) - proxies["https"] = "http://%s:%i" % (proxy, port) - else: - proxies["https"] = "http://%s" % (proxy, ) - - # FTP: - enabled = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesFTPEnable) - if enabled and _CFNumberToInt32(sc, enabled): - proxy = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesFTPProxy) - port = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesFTPPort) - - if proxy: - proxy = _CStringFromCFString(sc, proxy) - if port: - port = _CFNumberToInt32(sc, port) - proxies["ftp"] = "http://%s:%i" % (proxy, port) - else: - proxies["ftp"] = "http://%s" % (proxy, ) - - # Gopher: - enabled = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesGopherEnable) - if enabled and _CFNumberToInt32(sc, enabled): - proxy = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesGopherProxy) - port = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesGopherPort) - - if proxy: - proxy = _CStringFromCFString(sc, proxy) - if port: - port = _CFNumberToInt32(sc, port) - proxies["gopher"] = "http://%s:%i" % (proxy, port) - else: - proxies["gopher"] = "http://%s" % (proxy, ) - finally: - sc.CFRelease(proxyDict) - - sc.CFRelease(kSCPropNetProxiesHTTPEnable) - sc.CFRelease(kSCPropNetProxiesHTTPProxy) - sc.CFRelease(kSCPropNetProxiesHTTPPort) - sc.CFRelease(kSCPropNetProxiesFTPEnable) - sc.CFRelease(kSCPropNetProxiesFTPPassive) - sc.CFRelease(kSCPropNetProxiesFTPPort) - sc.CFRelease(kSCPropNetProxiesFTPProxy) - sc.CFRelease(kSCPropNetProxiesGopherEnable) - sc.CFRelease(kSCPropNetProxiesGopherPort) - sc.CFRelease(kSCPropNetProxiesGopherProxy) - - return proxies + return _get_proxies() Added: python/trunk/Mac/Modules/_scproxy.c ============================================================================== --- (empty file) +++ python/trunk/Mac/Modules/_scproxy.c Sun Sep 20 12:31:22 2009 @@ -0,0 +1,226 @@ +/* + * Helper method for urllib to fetch the proxy configuration settings + * using the SystemConfiguration framework. + */ +#include +#include + +static int32_t +cfnum_to_int32(CFNumberRef num) +{ + int32_t result; + + CFNumberGetValue(num, kCFNumberSInt32Type, &result); + return result; +} + +static PyObject* +cfstring_to_pystring(CFStringRef ref) +{ + const char* s; + + s = CFStringGetCStringPtr(ref, kCFStringEncodingUTF8); + if (s) { + return PyString_FromString(s); + + } else { + CFIndex len = CFStringGetLength(ref); + Boolean ok; + PyObject* result; + result = PyString_FromStringAndSize(NULL, len*4); + + ok = CFStringGetCString(ref, + PyString_AS_STRING(result), + PyString_GET_SIZE(result), + kCFStringEncodingUTF8); + if (!ok) { + Py_DECREF(result); + return NULL; + } else { + _PyString_Resize(&result, + strlen(PyString_AS_STRING(result))); + } + return result; + } +} + + +static PyObject* +get_proxy_settings(PyObject* mod __attribute__((__unused__))) +{ + CFDictionaryRef proxyDict = NULL; + CFNumberRef aNum = NULL; + CFArrayRef anArray = NULL; + PyObject* result = NULL; + PyObject* v; + int r; + + proxyDict = SCDynamicStoreCopyProxies(NULL); + if (!proxyDict) { + Py_INCREF(Py_None); + return Py_None; + } + + result = PyDict_New(); + if (result == NULL) goto error; + + aNum = CFDictionaryGetValue(proxyDict, + kSCPropNetProxiesExcludeSimpleHostnames); + if (aNum == NULL) { + v = PyBool_FromLong(0); + } else { + v = PyBool_FromLong(cfnum_to_int32(aNum)); + } + if (v == NULL) goto error; + + r = PyDict_SetItemString(result, "exclude_simple", v); + Py_DECREF(v); v = NULL; + if (r == -1) goto error; + + anArray = CFDictionaryGetValue(proxyDict, + kSCPropNetProxiesExceptionsList); + if (anArray != NULL) { + CFIndex len = CFArrayGetCount(anArray); + CFIndex i; + v = PyTuple_New(len); + if (v == NULL) goto error; + + r = PyDict_SetItemString(result, "exceptions", v); + Py_DECREF(v); + if (r == -1) goto error; + + for (i = 0; i < len; i++) { + CFStringRef aString = NULL; + + aString = CFArrayGetValueAtIndex(anArray, i); + if (aString == NULL) { + PyTuple_SetItem(v, i, Py_None); + Py_INCREF(Py_None); + } else { + PyObject* t = cfstring_to_pystring(aString); + if (!t) { + PyTuple_SetItem(v, i, Py_None); + Py_INCREF(Py_None); + } else { + PyTuple_SetItem(v, i, t); + } + } + } + } + + CFRelease(proxyDict); + return result; + +error: + if (proxyDict) CFRelease(proxyDict); + Py_XDECREF(result); + return NULL; +} + +static int +set_proxy(PyObject* proxies, char* proto, CFDictionaryRef proxyDict, + CFStringRef enabledKey, + CFStringRef hostKey, CFStringRef portKey) +{ + CFNumberRef aNum; + + aNum = CFDictionaryGetValue(proxyDict, enabledKey); + if (aNum && cfnum_to_int32(aNum)) { + CFStringRef hostString; + + hostString = CFDictionaryGetValue(proxyDict, hostKey); + aNum = CFDictionaryGetValue(proxyDict, portKey); + + if (hostString) { + int r; + PyObject* h = cfstring_to_pystring(hostString); + PyObject* v; + if (h) { + if (aNum) { + int32_t port = cfnum_to_int32(aNum); + v = PyString_FromFormat("http://%s:%ld", + PyString_AS_STRING(h), + (long)port); + } else { + v = PyString_FromFormat("http://%s", + PyString_AS_STRING(h)); + } + Py_DECREF(h); + if (!v) return -1; + r = PyDict_SetItemString(proxies, proto, + v); + Py_DECREF(v); + return r; + } + } + + } + return 0; +} + + + +static PyObject* +get_proxies(PyObject* mod __attribute__((__unused__))) +{ + PyObject* result = NULL; + int r; + CFDictionaryRef proxyDict = NULL; + + proxyDict = SCDynamicStoreCopyProxies(NULL); + if (proxyDict == NULL) { + return PyDict_New(); + } + + result = PyDict_New(); + if (result == NULL) goto error; + + r = set_proxy(result, "http", proxyDict, + kSCPropNetProxiesHTTPEnable, + kSCPropNetProxiesHTTPProxy, + kSCPropNetProxiesHTTPPort); + if (r == -1) goto error; + r = set_proxy(result, "https", proxyDict, + kSCPropNetProxiesHTTPSEnable, + kSCPropNetProxiesHTTPSProxy, + kSCPropNetProxiesHTTPSPort); + if (r == -1) goto error; + r = set_proxy(result, "ftp", proxyDict, + kSCPropNetProxiesFTPEnable, + kSCPropNetProxiesFTPProxy, + kSCPropNetProxiesFTPPort); + if (r == -1) goto error; + r = set_proxy(result, "gopher", proxyDict, + kSCPropNetProxiesGopherEnable, + kSCPropNetProxiesGopherProxy, + kSCPropNetProxiesGopherPort); + if (r == -1) goto error; + + CFRelease(proxyDict); + return result; +error: + if (proxyDict) CFRelease(proxyDict); + Py_XDECREF(result); + return NULL; +} + +static PyMethodDef mod_methods[] = { + { + "_get_proxy_settings", + (PyCFunction)get_proxy_settings, + METH_NOARGS, + NULL, + }, + { + "_get_proxies", + (PyCFunction)get_proxies, + METH_NOARGS, + NULL, + }, + { 0, 0, 0, 0 } +}; + +void init_scproxy(void) +{ + (void)Py_InitModule4("_scproxy", mod_methods, NULL, NULL, PYTHON_API_VERSION); +} Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sun Sep 20 12:31:22 2009 @@ -379,6 +379,8 @@ Library ------- +- Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 + - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL. Modified: python/trunk/setup.py ============================================================================== --- python/trunk/setup.py (original) +++ python/trunk/setup.py Sun Sep 20 12:31:22 2009 @@ -1400,6 +1400,17 @@ addMacExtension('_CF', core_kwds, ['cf/pycfbridge.c']) addMacExtension('autoGIL', core_kwds) + # _scproxy + sc_kwds = { + 'extra_compile_args': carbon_extra_compile_args, + 'extra_link_args': [ + '-framework', 'SystemConfiguration', + '-framework', 'CoreFoundation' + ], + } + addMacExtension("_scproxy", sc_kwds) + + # Carbon carbon_kwds = {'extra_compile_args': carbon_extra_compile_args, 'extra_link_args': ['-framework', 'Carbon'], From python-checkins at python.org Sun Sep 20 12:37:34 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 10:37:34 -0000 Subject: [Python-checkins] r74963 - in python/branches/release26-maint: Lib/urllib.py Misc/NEWS setup.py Message-ID: Author: ronald.oussoren Date: Sun Sep 20 12:37:33 2009 New Revision: 74963 Log: Merged revisions 74962 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74962 | ronald.oussoren | 2009-09-20 12:31:22 +0200 (Sun, 20 Sep 2009) | 2 lines Fix for issue 6851: urllib.urlopen crashes in a thread on OSX 10.6 ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/urllib.py python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/setup.py Modified: python/branches/release26-maint/Lib/urllib.py ============================================================================== --- python/branches/release26-maint/Lib/urllib.py (original) +++ python/branches/release26-maint/Lib/urllib.py Sun Sep 20 12:37:33 2009 @@ -1331,38 +1331,7 @@ if sys.platform == 'darwin': - - def _CFSetup(sc): - from ctypes import c_int32, c_void_p, c_char_p, c_int - sc.CFStringCreateWithCString.argtypes = [ c_void_p, c_char_p, c_int32 ] - sc.CFStringCreateWithCString.restype = c_void_p - sc.SCDynamicStoreCopyProxies.argtypes = [ c_void_p ] - sc.SCDynamicStoreCopyProxies.restype = c_void_p - sc.CFDictionaryGetValue.argtypes = [ c_void_p, c_void_p ] - sc.CFDictionaryGetValue.restype = c_void_p - sc.CFStringGetLength.argtypes = [ c_void_p ] - sc.CFStringGetLength.restype = c_int32 - sc.CFStringGetCString.argtypes = [ c_void_p, c_char_p, c_int32, c_int32 ] - sc.CFStringGetCString.restype = c_int32 - sc.CFNumberGetValue.argtypes = [ c_void_p, c_int, c_void_p ] - sc.CFNumberGetValue.restype = c_int32 - sc.CFRelease.argtypes = [ c_void_p ] - sc.CFRelease.restype = None - - def _CStringFromCFString(sc, value): - from ctypes import create_string_buffer - length = sc.CFStringGetLength(value) + 1 - buff = create_string_buffer(length) - sc.CFStringGetCString(value, buff, length, 0) - return buff.value - - def _CFNumberToInt32(sc, cfnum): - from ctypes import byref, c_int - val = c_int() - kCFNumberSInt32Type = 3 - sc.CFNumberGetValue(cfnum, kCFNumberSInt32Type, byref(val)) - return val.value - + from _scproxy import _get_proxy_settings, _get_proxies def proxy_bypass_macosx_sysconf(host): """ @@ -1371,8 +1340,6 @@ This function uses the MacOSX framework SystemConfiguration to fetch the proxy information. """ - from ctypes import cdll - from ctypes.util import find_library import re import socket from fnmatch import fnmatch @@ -1384,63 +1351,35 @@ parts = (parts + [0, 0, 0, 0])[:4] return (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8) | parts[3] - sc = cdll.LoadLibrary(find_library("SystemConfiguration")) - _CFSetup(sc) - - hostIP = None - - if not sc: - return False - - kSCPropNetProxiesExceptionsList = sc.CFStringCreateWithCString(0, "ExceptionsList", 0) - kSCPropNetProxiesExcludeSimpleHostnames = sc.CFStringCreateWithCString(0, - "ExcludeSimpleHostnames", 0) - + proxy_settings = _get_proxy_settings() - proxyDict = sc.SCDynamicStoreCopyProxies(None) - if proxyDict is None: - return False + # Check for simple host names: + if '.' not in host: + if proxy_settings['exclude_simple']: + return True + + for value in proxy_settings.get('exceptions'): + # Items in the list are strings like these: *.local, 169.254/16 + value = sc.CFArrayGetValueAtIndex(exceptions, index) + if not value: continue + + m = re.match(r"(\d+(?:\.\d+)*)(/\d+)?", value) + if m is not None: + if hostIP is None: + hostIP = socket.gethostbyname(host) + hostIP = ip2num(hostIP) + + base = ip2num(m.group(1)) + mask = int(m.group(2)[1:]) + mask = 32 - mask - try: - # Check for simple host names: - if '.' not in host: - exclude_simple = sc.CFDictionaryGetValue(proxyDict, - kSCPropNetProxiesExcludeSimpleHostnames) - if exclude_simple and _CFNumberToInt32(sc, exclude_simple): + if (hostIP >> mask) == (base >> mask): return True + elif fnmatch(host, value): + return True - # Check the exceptions list: - exceptions = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesExceptionsList) - if exceptions: - # Items in the list are strings like these: *.local, 169.254/16 - for index in xrange(sc.CFArrayGetCount(exceptions)): - value = sc.CFArrayGetValueAtIndex(exceptions, index) - if not value: continue - value = _CStringFromCFString(sc, value) - - m = re.match(r"(\d+(?:\.\d+)*)(/\d+)?", value) - if m is not None: - if hostIP is None: - hostIP = socket.gethostbyname(host) - hostIP = ip2num(hostIP) - - base = ip2num(m.group(1)) - mask = int(m.group(2)[1:]) - mask = 32 - mask - - if (hostIP >> mask) == (base >> mask): - return True - - elif fnmatch(host, value): - return True - - return False - - finally: - sc.CFRelease(kSCPropNetProxiesExceptionsList) - sc.CFRelease(kSCPropNetProxiesExcludeSimpleHostnames) - + return False def getproxies_macosx_sysconf(): @@ -1449,106 +1388,7 @@ This function uses the MacOSX framework SystemConfiguration to fetch the proxy information. """ - from ctypes import cdll - from ctypes.util import find_library - - sc = cdll.LoadLibrary(find_library("SystemConfiguration")) - _CFSetup(sc) - - if not sc: - return {} - - kSCPropNetProxiesHTTPEnable = sc.CFStringCreateWithCString(0, "HTTPEnable", 0) - kSCPropNetProxiesHTTPProxy = sc.CFStringCreateWithCString(0, "HTTPProxy", 0) - kSCPropNetProxiesHTTPPort = sc.CFStringCreateWithCString(0, "HTTPPort", 0) - - kSCPropNetProxiesHTTPSEnable = sc.CFStringCreateWithCString(0, "HTTPSEnable", 0) - kSCPropNetProxiesHTTPSProxy = sc.CFStringCreateWithCString(0, "HTTPSProxy", 0) - kSCPropNetProxiesHTTPSPort = sc.CFStringCreateWithCString(0, "HTTPSPort", 0) - - kSCPropNetProxiesFTPEnable = sc.CFStringCreateWithCString(0, "FTPEnable", 0) - kSCPropNetProxiesFTPPassive = sc.CFStringCreateWithCString(0, "FTPPassive", 0) - kSCPropNetProxiesFTPPort = sc.CFStringCreateWithCString(0, "FTPPort", 0) - kSCPropNetProxiesFTPProxy = sc.CFStringCreateWithCString(0, "FTPProxy", 0) - - kSCPropNetProxiesGopherEnable = sc.CFStringCreateWithCString(0, "GopherEnable", 0) - kSCPropNetProxiesGopherPort = sc.CFStringCreateWithCString(0, "GopherPort", 0) - kSCPropNetProxiesGopherProxy = sc.CFStringCreateWithCString(0, "GopherProxy", 0) - - proxies = {} - proxyDict = sc.SCDynamicStoreCopyProxies(None) - - try: - # HTTP: - enabled = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPEnable) - if enabled and _CFNumberToInt32(sc, enabled): - proxy = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPProxy) - port = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPPort) - - if proxy: - proxy = _CStringFromCFString(sc, proxy) - if port: - port = _CFNumberToInt32(sc, port) - proxies["http"] = "http://%s:%i" % (proxy, port) - else: - proxies["http"] = "http://%s" % (proxy, ) - - # HTTPS: - enabled = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPSEnable) - if enabled and _CFNumberToInt32(sc, enabled): - proxy = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPSProxy) - port = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPSPort) - - if proxy: - proxy = _CStringFromCFString(sc, proxy) - if port: - port = _CFNumberToInt32(sc, port) - proxies["https"] = "http://%s:%i" % (proxy, port) - else: - proxies["https"] = "http://%s" % (proxy, ) - - # FTP: - enabled = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesFTPEnable) - if enabled and _CFNumberToInt32(sc, enabled): - proxy = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesFTPProxy) - port = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesFTPPort) - - if proxy: - proxy = _CStringFromCFString(sc, proxy) - if port: - port = _CFNumberToInt32(sc, port) - proxies["ftp"] = "http://%s:%i" % (proxy, port) - else: - proxies["ftp"] = "http://%s" % (proxy, ) - - # Gopher: - enabled = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesGopherEnable) - if enabled and _CFNumberToInt32(sc, enabled): - proxy = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesGopherProxy) - port = sc.CFDictionaryGetValue(proxyDict, kSCPropNetProxiesGopherPort) - - if proxy: - proxy = _CStringFromCFString(sc, proxy) - if port: - port = _CFNumberToInt32(sc, port) - proxies["gopher"] = "http://%s:%i" % (proxy, port) - else: - proxies["gopher"] = "http://%s" % (proxy, ) - finally: - sc.CFRelease(proxyDict) - - sc.CFRelease(kSCPropNetProxiesHTTPEnable) - sc.CFRelease(kSCPropNetProxiesHTTPProxy) - sc.CFRelease(kSCPropNetProxiesHTTPPort) - sc.CFRelease(kSCPropNetProxiesFTPEnable) - sc.CFRelease(kSCPropNetProxiesFTPPassive) - sc.CFRelease(kSCPropNetProxiesFTPPort) - sc.CFRelease(kSCPropNetProxiesFTPProxy) - sc.CFRelease(kSCPropNetProxiesGopherEnable) - sc.CFRelease(kSCPropNetProxiesGopherPort) - sc.CFRelease(kSCPropNetProxiesGopherProxy) - - return proxies + return _get_proxies() Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Sun Sep 20 12:37:33 2009 @@ -82,6 +82,8 @@ Library ------- +- Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 + - Issue #6947: Fix distutils test on windows. Patch by Hirokazu Yamamoto. - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) Modified: python/branches/release26-maint/setup.py ============================================================================== --- python/branches/release26-maint/setup.py (original) +++ python/branches/release26-maint/setup.py Sun Sep 20 12:37:33 2009 @@ -1402,6 +1402,17 @@ addMacExtension('_CF', core_kwds, ['cf/pycfbridge.c']) addMacExtension('autoGIL', core_kwds) + # _scproxy + sc_kwds = { + 'extra_compile_args': carbon_extra_compile_args, + 'extra_link_args': [ + '-framework', 'SystemConfiguration', + '-framework', 'CoreFoundation' + ], + } + addMacExtension("_scproxy", sc_kwds) + + # Carbon carbon_kwds = {'extra_compile_args': carbon_extra_compile_args, 'extra_link_args': ['-framework', 'Carbon'], From python-checkins at python.org Sun Sep 20 12:54:07 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 10:54:07 -0000 Subject: [Python-checkins] r74964 - python/trunk/Lib/urllib.py Message-ID: Author: ronald.oussoren Date: Sun Sep 20 12:54:07 2009 New Revision: 74964 Log: Followup for r74962 Modified: python/trunk/Lib/urllib.py Modified: python/trunk/Lib/urllib.py ============================================================================== --- python/trunk/Lib/urllib.py (original) +++ python/trunk/Lib/urllib.py Sun Sep 20 12:54:07 2009 @@ -1354,9 +1354,8 @@ if proxy_settings['exclude_simple']: return True - for value in proxy_settings.get('exceptions'): + for value in proxy_settings.get('exceptions', ()): # Items in the list are strings like these: *.local, 169.254/16 - value = sc.CFArrayGetValueAtIndex(exceptions, index) if not value: continue m = re.match(r"(\d+(?:\.\d+)*)(/\d+)?", value) From python-checkins at python.org Sun Sep 20 12:54:47 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 10:54:47 -0000 Subject: [Python-checkins] r74965 - in python/branches/release26-maint: Lib/urllib.py Message-ID: Author: ronald.oussoren Date: Sun Sep 20 12:54:47 2009 New Revision: 74965 Log: Merged revisions 74964 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74964 | ronald.oussoren | 2009-09-20 12:54:07 +0200 (Sun, 20 Sep 2009) | 2 lines Followup for r74962 ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/urllib.py Modified: python/branches/release26-maint/Lib/urllib.py ============================================================================== --- python/branches/release26-maint/Lib/urllib.py (original) +++ python/branches/release26-maint/Lib/urllib.py Sun Sep 20 12:54:47 2009 @@ -1358,9 +1358,8 @@ if proxy_settings['exclude_simple']: return True - for value in proxy_settings.get('exceptions'): + for value in proxy_settings.get('exceptions', ()): # Items in the list are strings like these: *.local, 169.254/16 - value = sc.CFArrayGetValueAtIndex(exceptions, index) if not value: continue m = re.match(r"(\d+(?:\.\d+)*)(/\d+)?", value) From python-checkins at python.org Sun Sep 20 13:19:00 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 11:19:00 -0000 Subject: [Python-checkins] r74966 - python/trunk/Mac/BuildScript/scripts/postflight.framework Message-ID: Author: ronald.oussoren Date: Sun Sep 20 13:19:00 2009 New Revision: 74966 Log: For for issue 6934: failures in postflight script in OSX installer Modified: python/trunk/Mac/BuildScript/scripts/postflight.framework Modified: python/trunk/Mac/BuildScript/scripts/postflight.framework ============================================================================== --- python/trunk/Mac/BuildScript/scripts/postflight.framework (original) +++ python/trunk/Mac/BuildScript/scripts/postflight.framework Sun Sep 20 13:19:00 2009 @@ -6,28 +6,27 @@ PYVER="@PYVER@" FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@" -"${FWK}/bin/python" -Wi -tt \ +"${FWK}/bin/python at PYVER@" -Wi -tt \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python" -Wi -tt -O \ +"${FWK}/bin/python at PYVER@" -Wi -tt -O \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python" -Wi -tt \ +"${FWK}/bin/python at PYVER@" -Wi -tt \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/Mac/Tools" -"${FWK}/bin/python" -Wi -tt -O \ +"${FWK}/bin/python at PYVER@" -Wi -tt -O \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/Mac/Tools" - -chown -R admin "${FWK}" +chgrp -R admin "${FWK}" chmod -R g+w "${FWK}" exit 0 From python-checkins at python.org Sun Sep 20 13:19:24 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 11:19:24 -0000 Subject: [Python-checkins] r74967 - in python/branches/release26-maint: Mac/BuildScript/scripts/postflight.framework Message-ID: Author: ronald.oussoren Date: Sun Sep 20 13:19:24 2009 New Revision: 74967 Log: Merged revisions 74966 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74966 | ronald.oussoren | 2009-09-20 13:19:00 +0200 (Sun, 20 Sep 2009) | 2 lines For for issue 6934: failures in postflight script in OSX installer ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Mac/BuildScript/scripts/postflight.framework Modified: python/branches/release26-maint/Mac/BuildScript/scripts/postflight.framework ============================================================================== --- python/branches/release26-maint/Mac/BuildScript/scripts/postflight.framework (original) +++ python/branches/release26-maint/Mac/BuildScript/scripts/postflight.framework Sun Sep 20 13:19:24 2009 @@ -6,28 +6,27 @@ PYVER="@PYVER@" FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@" -"${FWK}/bin/python" -Wi -tt \ +"${FWK}/bin/python at PYVER@" -Wi -tt \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python" -Wi -tt -O \ +"${FWK}/bin/python at PYVER@" -Wi -tt -O \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python" -Wi -tt \ +"${FWK}/bin/python at PYVER@" -Wi -tt \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/Mac/Tools" -"${FWK}/bin/python" -Wi -tt -O \ +"${FWK}/bin/python at PYVER@" -Wi -tt -O \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/Mac/Tools" - -chown -R admin "${FWK}" +chgrp -R admin "${FWK}" chmod -R g+w "${FWK}" exit 0 From python-checkins at python.org Sun Sep 20 13:22:30 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 11:22:30 -0000 Subject: [Python-checkins] r74968 - in python/branches/py3k: Mac/BuildScript/scripts/postflight.framework Message-ID: Author: ronald.oussoren Date: Sun Sep 20 13:22:29 2009 New Revision: 74968 Log: Merged revisions 74966 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74966 | ronald.oussoren | 2009-09-20 13:19:00 +0200 (Sun, 20 Sep 2009) | 2 lines For for issue 6934: failures in postflight script in OSX installer ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Mac/BuildScript/scripts/postflight.framework Modified: python/branches/py3k/Mac/BuildScript/scripts/postflight.framework ============================================================================== --- python/branches/py3k/Mac/BuildScript/scripts/postflight.framework (original) +++ python/branches/py3k/Mac/BuildScript/scripts/postflight.framework Sun Sep 20 13:22:29 2009 @@ -6,28 +6,27 @@ PYVER="@PYVER@" FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@" -"${FWK}/bin/python" -Wi \ +"${FWK}/bin/python at PYVER@" -Wi \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python" -Wi -O \ +"${FWK}/bin/python at PYVER@" -Wi -O \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python" -Wi \ +"${FWK}/bin/python at PYVER@" -Wi \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/Mac/Tools" -"${FWK}/bin/python" -Wi -O \ +"${FWK}/bin/python at PYVER@" -Wi -O \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/Mac/Tools" - -chown -R admin "${FWK}" +chgrp -R admin "${FWK}" chmod -R g+w "${FWK}" exit 0 From python-checkins at python.org Sun Sep 20 13:28:04 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 11:28:04 -0000 Subject: [Python-checkins] r74969 - in python/branches/release31-maint: Mac/BuildScript/scripts/postflight.framework Message-ID: Author: ronald.oussoren Date: Sun Sep 20 13:28:04 2009 New Revision: 74969 Log: Merged revisions 74968 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74968 | ronald.oussoren | 2009-09-20 13:22:29 +0200 (Sun, 20 Sep 2009) | 9 lines Merged revisions 74966 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74966 | ronald.oussoren | 2009-09-20 13:19:00 +0200 (Sun, 20 Sep 2009) | 2 lines For for issue 6934: failures in postflight script in OSX installer ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Mac/BuildScript/scripts/postflight.framework Modified: python/branches/release31-maint/Mac/BuildScript/scripts/postflight.framework ============================================================================== --- python/branches/release31-maint/Mac/BuildScript/scripts/postflight.framework (original) +++ python/branches/release31-maint/Mac/BuildScript/scripts/postflight.framework Sun Sep 20 13:28:04 2009 @@ -6,28 +6,27 @@ PYVER="@PYVER@" FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@" -"${FWK}/bin/python" -Wi \ +"${FWK}/bin/python at PYVER@" -Wi \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python" -Wi -O \ +"${FWK}/bin/python at PYVER@" -Wi -O \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python" -Wi \ +"${FWK}/bin/python at PYVER@" -Wi \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/Mac/Tools" -"${FWK}/bin/python" -Wi -O \ +"${FWK}/bin/python at PYVER@" -Wi -O \ "${FWK}/lib/python${PYVER}/compileall.py" \ -x badsyntax -x site-packages \ "${FWK}/Mac/Tools" - -chown -R admin "${FWK}" +chgrp -R admin "${FWK}" chmod -R g+w "${FWK}" exit 0 From python-checkins at python.org Sun Sep 20 16:18:16 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 14:18:16 -0000 Subject: [Python-checkins] r74970 - in python/trunk: Doc/library/readline.rst Lib/test/test_readline.py Misc/NEWS Modules/readline.c setup.py Message-ID: Author: ronald.oussoren Date: Sun Sep 20 16:18:15 2009 New Revision: 74970 Log: Issue 6877: this patch makes it possible to link the readline extension to the libedit emulation of the readline API on OSX 10.5 or later. This also adds a minimal testsuite for readline to check that the history manipuation functions have the same interface with both C libraries. Added: python/trunk/Lib/test/test_readline.py (contents, props changed) Modified: python/trunk/Doc/library/readline.rst python/trunk/Misc/NEWS python/trunk/Modules/readline.c python/trunk/setup.py Modified: python/trunk/Doc/library/readline.rst ============================================================================== --- python/trunk/Doc/library/readline.rst (original) +++ python/trunk/Doc/library/readline.rst Sun Sep 20 16:18:15 2009 @@ -14,6 +14,17 @@ interactive prompt and the prompts offered by the :func:`raw_input` and :func:`input` built-in functions. +..note:: + + On MacOS X the :mod:`readline` module can be implemented using + the ``libedit`` library instead of GNU readline. + + The configuration file for ``libedit`` is different from that + of GNU readline. If you programmaticly load configuration strings + you can check for the text "libedit" in :const:`readline.__doc__` + to differentiate between GNU readline and libedit. + + The :mod:`readline` module defines the following functions: @@ -181,7 +192,6 @@ Append a line to the history buffer, as if it was the last line typed. - .. seealso:: Module :mod:`rlcompleter` Added: python/trunk/Lib/test/test_readline.py ============================================================================== --- (empty file) +++ python/trunk/Lib/test/test_readline.py Sun Sep 20 16:18:15 2009 @@ -0,0 +1,42 @@ +""" +Very minimal unittests for parts of the readline module. + +These tests were added to check that the libedit emulation on OSX and +the "real" readline have the same interface for history manipulation. That's +why the tests cover only a small subset of the interface. +""" +import unittest +from test.test_support import run_unittest + +import readline + +class TestHistoryManipulation (unittest.TestCase): + def testHistoryUpdates(self): + readline.clear_history() + + readline.add_history("first line") + readline.add_history("second line") + + self.assertEqual(readline.get_history_item(0), None) + self.assertEqual(readline.get_history_item(1), "first line") + self.assertEqual(readline.get_history_item(2), "second line") + + readline.replace_history_item(0, "replaced line") + self.assertEqual(readline.get_history_item(0), None) + self.assertEqual(readline.get_history_item(1), "replaced line") + self.assertEqual(readline.get_history_item(2), "second line") + + self.assertEqual(readline.get_current_history_length(), 2) + + readline.remove_history_item(0) + self.assertEqual(readline.get_history_item(0), None) + self.assertEqual(readline.get_history_item(1), "second line") + + self.assertEqual(readline.get_current_history_length(), 1) + + +def test_main(): + run_unittest(TestHistoryManipulation) + +if __name__ == "__main__": + test_main() Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sun Sep 20 16:18:15 2009 @@ -1335,6 +1335,9 @@ Extension Modules ----------------- +- Issue #6877: Make it possible to link the readline extension to libedit + on OSX. + - Issue #6944: Fix a SystemError when socket.getnameinfo() was called with something other than a tuple as first argument. Modified: python/trunk/Modules/readline.c ============================================================================== --- python/trunk/Modules/readline.c (original) +++ python/trunk/Modules/readline.c Sun Sep 20 16:18:15 2009 @@ -42,6 +42,25 @@ #endif #endif +#ifdef __APPLE__ +/* + * It is possible to link the readline module to the readline + * emulation library of editline/libedit. + * + * On OSX this emulation library is not 100% API compatible + * with the "real" readline and cannot be detected at compile-time, + * hence we use a runtime check to detect if we're using libedit + * + * Currently there is one know API incompatibility: + * - 'get_history' has a 1-based index with GNU readline, and a 0-based + * index with libedit's emulation. + * - Note that replace_history and remove_history use a 0-based index + * with both implementation. + */ +static int using_libedit_emulation = 0; +static const char libedit_version_tag[] = "EditLine wrapper"; +#endif /* __APPLE__ */ + static void on_completion_display_matches_hook(char **matches, int num_matches, int max_length); @@ -478,6 +497,29 @@ if (!PyArg_ParseTuple(args, "i:index", &idx)) return NULL; +#ifdef __APPLE__ + if (using_libedit_emulation) { + /* Libedit emulation uses 0-based indexes, + * the real one uses 1-based indexes, + * adjust the index to ensure that Python + * code doesn't have to worry about the + * difference. + */ + HISTORY_STATE *hist_st; + hist_st = history_get_history_state(); + + idx --; + + /* + * Apple's readline emulation crashes when + * the index is out of range, therefore + * test for that and fail gracefully. + */ + if (idx < 0 || idx >= hist_st->length) { + Py_RETURN_NONE; + } + } +#endif /* __APPLE__ */ if ((hist_ent = history_get(idx))) return PyString_FromString(hist_ent->line); else { @@ -978,6 +1020,15 @@ char *line; HISTORY_STATE *state = history_get_history_state(); if (state->length > 0) +#ifdef __APPLE__ + if (using_libedit_emulation) { + /* + * Libedit's emulation uses 0-based indexes, + * the real readline uses 1-based indexes. + */ + line = history_get(state->length - 1)->line; + } else +#endif /* __APPLE__ */ line = history_get(state->length)->line; else line = ""; @@ -1011,16 +1062,35 @@ PyDoc_STRVAR(doc_module, "Importing this module enables command line editing using GNU readline."); +#ifdef __APPLE__ +PyDoc_STRVAR(doc_module_le, +"Importing this module enables command line editing using libedit readline."); +#endif /* __APPLE__ */ + PyMODINIT_FUNC initreadline(void) { PyObject *m; +#ifdef __APPLE__ + if (strncmp(rl_library_version, libedit_version_tag, strlen(libedit_version_tag)) == 0) { + using_libedit_emulation = 1; + } + + if (using_libedit_emulation) + m = Py_InitModule4("readline", readline_methods, doc_module_le, + (PyObject *)NULL, PYTHON_API_VERSION); + else + +#endif /* __APPLE__ */ + m = Py_InitModule4("readline", readline_methods, doc_module, (PyObject *)NULL, PYTHON_API_VERSION); if (m == NULL) return; + + PyOS_ReadlineFunctionPointer = call_readline; setup_readline(); } Modified: python/trunk/setup.py ============================================================================== --- python/trunk/setup.py (original) +++ python/trunk/setup.py Sun Sep 20 16:18:15 2009 @@ -546,16 +546,16 @@ # 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 - # readline package - # FIXME: The readline emulation on 10.5 is better, but the - # readline module doesn't compile out of the box. - if find_file('readline/rlconf.h', inc_dirs, []) is None: - do_readline = False + if platform == 'darwin': + os_release = int(os.uname()[2].split('.')[0]) + if os_release < 9: + # MacOSX 10.4 has a broken readline. Don't try to build + # the readline module unless the user has installed a fixed + # readline package + if find_file('readline/rlconf.h', inc_dirs, []) is None: + do_readline = False if do_readline: - if sys.platform == 'darwin': + if platform == 'darwin' and os_release < 9: # In every directory on the search path search for a dynamic # library and then a static library, instead of first looking # for dynamic libraries on the entiry path. From python-checkins at python.org Sun Sep 20 16:53:23 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 14:53:23 -0000 Subject: [Python-checkins] r74971 - in python/branches/py3k: Doc/library/readline.rst Lib/test/test_readline.py Misc/NEWS Modules/readline.c setup.py Message-ID: Author: ronald.oussoren Date: Sun Sep 20 16:53:22 2009 New Revision: 74971 Log: Merged revisions 74970 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74970 | ronald.oussoren | 2009-09-20 16:18:15 +0200 (Sun, 20 Sep 2009) | 7 lines Issue 6877: this patch makes it possible to link the readline extension to the libedit emulation of the readline API on OSX 10.5 or later. This also adds a minimal testsuite for readline to check that the history manipuation functions have the same interface with both C libraries. ........ Added: python/branches/py3k/Lib/test/test_readline.py - copied, changed from r74970, /python/trunk/Lib/test/test_readline.py Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/readline.rst python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/readline.c python/branches/py3k/setup.py Modified: python/branches/py3k/Doc/library/readline.rst ============================================================================== --- python/branches/py3k/Doc/library/readline.rst (original) +++ python/branches/py3k/Doc/library/readline.rst Sun Sep 20 16:53:22 2009 @@ -14,6 +14,17 @@ interactive prompt and the prompts offered by the built-in :func:`input` function. +..note:: + + On MacOS X the :mod:`readline` module can be implemented using + the ``libedit`` library instead of GNU readline. + + The configuration file for ``libedit`` is different from that + of GNU readline. If you programmaticly load configuration strings + you can check for the text "libedit" in :const:`readline.__doc__` + to differentiate between GNU readline and libedit. + + The :mod:`readline` module defines the following functions: @@ -166,7 +177,6 @@ Append a line to the history buffer, as if it was the last line typed. - .. seealso:: Module :mod:`rlcompleter` Copied: python/branches/py3k/Lib/test/test_readline.py (from r74970, /python/trunk/Lib/test/test_readline.py) ============================================================================== --- /python/trunk/Lib/test/test_readline.py (original) +++ python/branches/py3k/Lib/test/test_readline.py Sun Sep 20 16:53:22 2009 @@ -6,7 +6,7 @@ why the tests cover only a small subset of the interface. """ import unittest -from test.test_support import run_unittest +from test.support import run_unittest import readline Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Sun Sep 20 16:53:22 2009 @@ -194,6 +194,8 @@ Extension Modules ----------------- +- Issue #6877: It is now possible to link the readline extension to the + libedit readline emulation on OSX 10.5 or later. - Issue #6848: Fix curses module build failure on OS X 10.6. Modified: python/branches/py3k/Modules/readline.c ============================================================================== --- python/branches/py3k/Modules/readline.c (original) +++ python/branches/py3k/Modules/readline.c Sun Sep 20 16:53:22 2009 @@ -42,6 +42,25 @@ #endif #endif +#ifdef __APPLE__ +/* + * It is possible to link the readline module to the readline + * emulation library of editline/libedit. + * + * On OSX this emulation library is not 100% API compatible + * with the "real" readline and cannot be detected at compile-time, + * hence we use a runtime check to detect if we're using libedit + * + * Currently there is one know API incompatibility: + * - 'get_history' has a 1-based index with GNU readline, and a 0-based + * index with libedit's emulation. + * - Note that replace_history and remove_history use a 0-based index + * with both implementation. + */ +static int using_libedit_emulation = 0; +static const char libedit_version_tag[] = "EditLine wrapper"; +#endif /* __APPLE__ */ + static void on_completion_display_matches_hook(char **matches, int num_matches, int max_length); @@ -478,6 +497,29 @@ if (!PyArg_ParseTuple(args, "i:index", &idx)) return NULL; +#ifdef __APPLE__ + if (using_libedit_emulation) { + /* Libedit emulation uses 0-based indexes, + * the real one uses 1-based indexes, + * adjust the index to ensure that Python + * code doesn't have to worry about the + * difference. + */ + HISTORY_STATE *hist_st; + hist_st = history_get_history_state(); + + idx --; + + /* + * Apple's readline emulation crashes when + * the index is out of range, therefore + * test for that and fail gracefully. + */ + if (idx < 0 || idx >= hist_st->length) { + Py_RETURN_NONE; + } + } +#endif /* __APPLE__ */ if ((hist_ent = history_get(idx))) return PyUnicode_FromString(hist_ent->line); else { @@ -977,6 +1019,15 @@ char *line; HISTORY_STATE *state = history_get_history_state(); if (state->length > 0) +#ifdef __APPLE__ + if (using_libedit_emulation) { + /* + * Libedit's emulation uses 0-based indexes, + * the real readline uses 1-based indexes. + */ + line = history_get(state->length - 1)->line; + } else +#endif /* __APPLE__ */ line = history_get(state->length)->line; else line = ""; @@ -1010,6 +1061,10 @@ PyDoc_STRVAR(doc_module, "Importing this module enables command line editing using GNU readline."); +#ifdef __APPLE__ +PyDoc_STRVAR(doc_module_le, +"Importing this module enables command line editing using libedit readline."); +#endif /* __APPLE__ */ static struct PyModuleDef readlinemodule = { PyModuleDef_HEAD_INIT, @@ -1023,15 +1078,29 @@ NULL }; + PyMODINIT_FUNC PyInit_readline(void) { PyObject *m; +#ifdef __APPLE__ + if (strncmp(rl_library_version, libedit_version_tag, strlen(libedit_version_tag)) == 0) { + using_libedit_emulation = 1; + } + + if (using_libedit_emulation) + readlinemodule.m_doc = doc_module_le; + +#endif /* __APPLE__ */ + m = PyModule_Create(&readlinemodule); + if (m == NULL) return NULL; + + PyOS_ReadlineFunctionPointer = call_readline; setup_readline(); return m; Modified: python/branches/py3k/setup.py ============================================================================== --- python/branches/py3k/setup.py (original) +++ python/branches/py3k/setup.py Sun Sep 20 16:53:22 2009 @@ -493,16 +493,16 @@ # 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 - # readline package - # FIXME: The readline emulation on 10.5 is better, but the - # readline module doesn't compile out of the box. - if find_file('readline/rlconf.h', inc_dirs, []) is None: - do_readline = False + if platform == 'darwin': + os_release = int(os.uname()[2].split('.')[0]) + if os_release < 9: + # MacOSX 10.4 has a broken readline. Don't try to build + # the readline module unless the user has installed a fixed + # readline package + if find_file('readline/rlconf.h', inc_dirs, []) is None: + do_readline = False if do_readline: - if sys.platform == 'darwin': + if platform == 'darwin' and os_release < 9: # In every directory on the search path search for a dynamic # library and then a static library, instead of first looking # for dynamic libraries on the entire path. From python-checkins at python.org Sun Sep 20 20:54:17 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 18:54:17 -0000 Subject: [Python-checkins] r74972 - in python/trunk/Modules/_ctypes/libffi_osx: powerpc/ppc-darwin.S powerpc/ppc-darwin.h powerpc/ppc-darwin_closure.S powerpc/ppc-ffi_darwin.c powerpc/ppc64-darwin_closure.S x86/x86-darwin.S x86/x86-ffi64.c x86/x86-ffi_darwin.c Message-ID: Author: ronald.oussoren Date: Sun Sep 20 20:54:16 2009 New Revision: 74972 Log: Merge a newer version of libffi_osx, based on the version of libffi in OSX 10.6.1. This fixes issue6918 Modified: python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S python/trunk/Modules/_ctypes/libffi_osx/x86/x86-darwin.S python/trunk/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c python/trunk/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Modified: python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S ============================================================================== --- python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S (original) +++ python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S Sun Sep 20 20:54:16 2009 @@ -1,7 +1,7 @@ #if defined(__ppc__) || defined(__ppc64__) /* ----------------------------------------------------------------------- - darwin.S - Copyright (c) 2000 John Hornkvist + ppc-darwin.S - Copyright (c) 2000 John Hornkvist Copyright (c) 2004 Free Software Foundation, Inc. PowerPC Assembly glue. @@ -294,7 +294,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -308,7 +308,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB0$non_lazy_ptr-. ; FDE initial location + .g_long LFB0-. ; FDE initial location .set L$set$3,LFE1-LFB0 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -338,10 +338,6 @@ .byte 0x1c ; uleb128 0x1c .align LOG2_GPR_BYTES LEFDE1: -.data - .align LOG2_GPR_BYTES -LLFB0$non_lazy_ptr: - .g_long LFB0 #if defined(__ppc64__) .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 Modified: python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h ============================================================================== --- python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h (original) +++ python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h Sun Sep 20 20:54:16 2009 @@ -22,7 +22,6 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ - #define L(x) x #define SF_ARG9 MODE_CHOICE(56,112) @@ -57,7 +56,6 @@ ((x) == FFI_TYPE_UINT32 || (x) == FFI_TYPE_SINT32 ||\ (x) == FFI_TYPE_INT || (x) == FFI_TYPE_FLOAT) - #if !defined(LIBFFI_ASM) enum { @@ -75,20 +73,6 @@ FLAG_RETVAL_REFERENCE = 1 << (31 - 4) }; - -void ffi_prep_args(extended_cif* inEcif, unsigned *const stack); - -typedef union -{ - float f; - double d; -} ffi_dblfl; - -int ffi_closure_helper_DARWIN( ffi_closure* closure, - void* rvalue, unsigned long* pgr, - ffi_dblfl* pfr); - - #if defined(__ppc64__) void ffi64_struct_to_ram_form(const ffi_type*, const char*, unsigned int*, const char*, unsigned int*, unsigned int*, char*, unsigned int*); @@ -96,11 +80,6 @@ unsigned int*, char*, unsigned int*, char*, unsigned int*); bool ffi64_stret_needs_ptr(const ffi_type* inType, unsigned short*, unsigned short*); -bool ffi64_struct_contains_fp(const ffi_type* inType); -unsigned int ffi64_data_size(const ffi_type* inType); - - - #endif -#endif // !defined(LIBFFI_ASM) +#endif // !defined(LIBFFI_ASM) \ No newline at end of file Modified: python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S ============================================================================== --- python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S (original) +++ python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S Sun Sep 20 20:54:16 2009 @@ -1,7 +1,7 @@ #if defined(__ppc__) /* ----------------------------------------------------------------------- - darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, + ppc-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, Inc. based on ppc_closure.S PowerPC Assembly glue. @@ -43,8 +43,8 @@ _ffi_closure_ASM: LFB1: - mflr r0 /* extract return address */ - stg r0,MODE_CHOICE(8,16)(r1) /* save return address */ + mflr r0 // Save return address + stg r0,SF_RETURN(r1) LCFI0: /* 24/48 bytes (Linkage Area) @@ -54,7 +54,7 @@ 176/232 total bytes */ /* skip over caller save area and keep stack aligned to 16/32. */ - stgu r1,-SF_ROUND(MODE_CHOICE(176,248))(r1) + stgu r1,-SF_ROUND(176)(r1) LCFI1: /* We want to build up an area for the parameters passed @@ -67,58 +67,44 @@ /* Save GPRs 3 - 10 (aligned to 4/8) in the parents outgoing area. */ - stg r3,MODE_CHOICE(200,304)(r1) - stg r4,MODE_CHOICE(204,312)(r1) - stg r5,MODE_CHOICE(208,320)(r1) - stg r6,MODE_CHOICE(212,328)(r1) - stg r7,MODE_CHOICE(216,336)(r1) - stg r8,MODE_CHOICE(220,344)(r1) - stg r9,MODE_CHOICE(224,352)(r1) - stg r10,MODE_CHOICE(228,360)(r1) + stg r3,200(r1) + stg r4,204(r1) + stg r5,208(r1) + stg r6,212(r1) + stg r7,216(r1) + stg r8,220(r1) + stg r9,224(r1) + stg r10,228(r1) /* Save FPRs 1 - 13. (aligned to 8) */ - stfd f1,MODE_CHOICE(56,112)(r1) - stfd f2,MODE_CHOICE(64,120)(r1) - stfd f3,MODE_CHOICE(72,128)(r1) - stfd f4,MODE_CHOICE(80,136)(r1) - stfd f5,MODE_CHOICE(88,144)(r1) - stfd f6,MODE_CHOICE(96,152)(r1) - stfd f7,MODE_CHOICE(104,160)(r1) - stfd f8,MODE_CHOICE(112,168)(r1) - stfd f9,MODE_CHOICE(120,176)(r1) - stfd f10,MODE_CHOICE(128,184)(r1) - stfd f11,MODE_CHOICE(136,192)(r1) - stfd f12,MODE_CHOICE(144,200)(r1) - stfd f13,MODE_CHOICE(152,208)(r1) - - /* Set up registers for the routine that actually does the work. - Get the context pointer from the trampoline. */ - mr r3,r11 - - /* Load the pointer to the result storage. */ - /* current stack frame size - ((4/8 * 4) + saved registers) */ - addi r4,r1,MODE_CHOICE(160,216) - - /* Load the pointer to the saved gpr registers. */ - addi r5,r1,MODE_CHOICE(200,304) - - /* Load the pointer to the saved fpr registers. */ - addi r6,r1,MODE_CHOICE(56,112) - - /* Make the call. */ + stfd f1,56(r1) + stfd f2,64(r1) + stfd f3,72(r1) + stfd f4,80(r1) + stfd f5,88(r1) + stfd f6,96(r1) + stfd f7,104(r1) + stfd f8,112(r1) + stfd f9,120(r1) + stfd f10,128(r1) + stfd f11,136(r1) + stfd f12,144(r1) + stfd f13,152(r1) + + // Set up registers for the routine that actually does the work. + mr r3,r11 // context pointer from the trampoline + addi r4,r1,160 // result storage + addi r5,r1,200 // saved GPRs + addi r6,r1,56 // saved FPRs bl Lffi_closure_helper_DARWIN$stub - /* Now r3 contains the return type - so use it to look up in a table + /* Now r3 contains the return type. Use it to look up in a table so we know how to deal with each type. */ - - /* Look the proper starting point in table - by using return type as offset. */ - addi r5,r1,MODE_CHOICE(160,216) // Get pointer to results area. - bl Lget_ret_type0_addr // Get pointer to Lret_type0 into LR. - mflr r4 // Move to r4. - slwi r3,r3,4 // Now multiply return type by 16. - add r3,r3,r4 // Add contents of table to table address. + addi r5,r1,160 // Copy result storage pointer. + bl Lget_ret_type0_addr // Get pointer to Lret_type0 into LR. + mflr r4 // Move to r4. + slwi r3,r3,4 // Multiply return type by 16. + add r3,r3,r4 // Add contents of table to table address. mtctr r3 bctr @@ -143,7 +129,7 @@ /* case FFI_TYPE_INT */ Lret_type1: - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop @@ -171,42 +157,42 @@ /* case FFI_TYPE_UINT8 */ Lret_type5: - lbz r3,MODE_CHOICE(3,7)(r5) + lbz r3,3(r5) b Lfinish nop nop /* case FFI_TYPE_SINT8 */ Lret_type6: - lbz r3,MODE_CHOICE(3,7)(r5) + lbz r3,3(r5) extsb r3,r3 b Lfinish nop /* case FFI_TYPE_UINT16 */ Lret_type7: - lhz r3,MODE_CHOICE(2,6)(r5) + lhz r3,2(r5) b Lfinish nop nop /* case FFI_TYPE_SINT16 */ Lret_type8: - lha r3,MODE_CHOICE(2,6)(r5) + lha r3,2(r5) b Lfinish nop nop /* case FFI_TYPE_UINT32 */ Lret_type9: // same as Lret_type1 - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop /* case FFI_TYPE_SINT32 */ Lret_type10: // same as Lret_type1 - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop @@ -227,7 +213,7 @@ /* case FFI_TYPE_STRUCT */ Lret_type13: - b MODE_CHOICE(Lfinish,Lret_struct) + b Lfinish nop nop nop @@ -239,12 +225,13 @@ // padded to 16 bytes. Lret_type14: lg r3,0(r5) + // fall through /* case done */ Lfinish: - addi r1,r1,SF_ROUND(MODE_CHOICE(176,248)) // Restore stack pointer. - lg r0,MODE_CHOICE(8,16)(r1) /* Get return address. */ - mtlr r0 /* Reset link register. */ + addi r1,r1,SF_ROUND(176) // Restore stack pointer. + lg r0,SF_RETURN(r1) // Restore return address. + mtlr r0 // Restore link register. blr /* END(ffi_closure_ASM) */ @@ -261,7 +248,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -275,7 +262,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB1$non_lazy_ptr-. ; FDE initial location + .g_long LFB1-. ; FDE initial location .set L$set$3,LFE1-LFB1 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -317,9 +304,5 @@ .indirect_symbol _ffi_closure_helper_DARWIN .g_long dyld_stub_binding_helper -.data - .align LOG2_GPR_BYTES -LLFB1$non_lazy_ptr: - .g_long LFB1 #endif // __ppc__ Modified: python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c ============================================================================== --- python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c (original) +++ python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c Sun Sep 20 20:54:16 2009 @@ -28,13 +28,13 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ -#include "ffi.h" -#include "ffi_common.h" +#include +#include #include #include #include -#include "ppc-darwin.h" +#include #include #if 0 @@ -42,17 +42,14 @@ #include // for sys_icache_invalidate() #endif -#else - -/* Explicit prototype instead of including a header to allow compilation - * on Tiger systems. - */ +#else #pragma weak sys_icache_invalidate extern void sys_icache_invalidate(void *start, size_t len); #endif + extern void ffi_closure_ASM(void); // The layout of a function descriptor. A C function pointer really @@ -760,9 +757,7 @@ // Flush the icache. Only necessary on Darwin. #if defined(POWERPC_DARWIN) - if (sys_icache_invalidate) { - sys_icache_invalidate(closure->tramp, FFI_TRAMPOLINE_SIZE); - } + sys_icache_invalidate(closure->tramp, FFI_TRAMPOLINE_SIZE); #else flush_range(closure->tramp, FFI_TRAMPOLINE_SIZE); #endif @@ -804,6 +799,12 @@ } ldu; #endif +typedef union +{ + float f; + double d; +} ffi_dblfl; + /* The trampoline invokes ffi_closure_ASM, and on entry, r11 holds the address of the closure. After storing the registers that could possibly contain parameters to be passed into the stack frame and setting up space @@ -829,7 +830,7 @@ unsigned int nf = 0; /* number of FPRs already used. */ unsigned int ng = 0; /* number of GPRs already used. */ ffi_cif* cif = closure->cif; - unsigned int avn = cif->nargs; + long avn = cif->nargs; void** avalue = alloca(cif->nargs * sizeof(void*)); ffi_type** arg_types = cif->arg_types; @@ -906,9 +907,9 @@ size_al = ALIGN(arg_types[i]->size, 8); if (size_al < 3) - avalue[i] = (char*)pgr + MODE_CHOICE(4,8) - size_al; + avalue[i] = (void*)pgr + MODE_CHOICE(4,8) - size_al; else - avalue[i] = (char*)pgr; + avalue[i] = (void*)pgr; ng += (size_al + 3) / sizeof(long); pgr += (size_al + 3) / sizeof(long); @@ -988,8 +989,8 @@ We use a union to pass the long double to avalue[i]. */ else if (nf == NUM_FPR_ARG_REGISTERS - 1) { - memcpy (&temp_ld.lb[0], pfr, sizeof(ldbits)); - memcpy (&temp_ld.lb[1], pgr + 2, sizeof(ldbits)); + memcpy (&temp_ld.lb[0], pfr, sizeof(temp_ld.lb[0])); + memcpy (&temp_ld.lb[1], pgr + 2, sizeof(temp_ld.lb[1])); avalue[i] = &temp_ld.ld; } #else Modified: python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S ============================================================================== --- python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S (original) +++ python/trunk/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S Sun Sep 20 20:54:16 2009 @@ -1,7 +1,7 @@ #if defined(__ppc64__) /* ----------------------------------------------------------------------- - darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, + ppc64-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, Inc. based on ppc_closure.S PowerPC Assembly glue. @@ -297,8 +297,8 @@ // case done Lfinish: - lg r1,0(r1) // Restore stack pointer. - ld r31,-8(r1) // Restore registers we used. + lg r1,0(r1) // Restore stack pointer. + ld r31,-8(r1) // Restore registers we used. ld r30,-16(r1) lg r0,SF_RETURN(r1) // Get return address. mtlr r0 // Reset link register. @@ -318,7 +318,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -332,7 +332,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB1$non_lazy_ptr-. ; FDE initial location + .g_long LFB1-. ; FDE initial location .set L$set$3,LFE1-LFB1 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -374,11 +374,6 @@ .indirect_symbol _ffi_closure_helper_DARWIN .g_long dyld_stub_binding_helper -.data - .align LOG2_GPR_BYTES -LLFB1$non_lazy_ptr: - .g_long LFB1 - .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 .align LOG2_GPR_BYTES Modified: python/trunk/Modules/_ctypes/libffi_osx/x86/x86-darwin.S ============================================================================== --- python/trunk/Modules/_ctypes/libffi_osx/x86/x86-darwin.S (original) +++ python/trunk/Modules/_ctypes/libffi_osx/x86/x86-darwin.S Sun Sep 20 20:54:16 2009 @@ -46,23 +46,20 @@ .globl _ffi_prep_args -.align 4 + .align 4 .globl _ffi_call_SYSV _ffi_call_SYSV: -.LFB1: +LFB1: pushl %ebp -.LCFI0: +LCFI0: movl %esp,%ebp - subl $8,%esp - ASSERT_STACK_ALIGNED -.LCFI1: +LCFI1: + subl $8,%esp /* Make room for all of the new args. */ movl 16(%ebp),%ecx subl %ecx,%esp - ASSERT_STACK_ALIGNED - movl %esp,%eax /* Place all of the ffi_prep_args in position */ @@ -71,170 +68,349 @@ pushl %eax call *8(%ebp) - ASSERT_STACK_ALIGNED - /* Return stack to previous state and call the function */ - addl $16,%esp - - ASSERT_STACK_ALIGNED + addl $16,%esp call *28(%ebp) - - /* XXX: return returns return with 'ret $4', that upsets the stack! */ + + /* Remove the space we pushed for the args */ movl 16(%ebp),%ecx addl %ecx,%esp - /* Load %ecx with the return type code */ movl 20(%ebp),%ecx - /* If the return value pointer is NULL, assume no return value. */ cmpl $0,24(%ebp) - jne retint + jne Lretint /* Even if there is no space for the return value, we are obliged to handle floating-point values. */ cmpl $FFI_TYPE_FLOAT,%ecx - jne noretval + jne Lnoretval fstp %st(0) - jmp epilogue + jmp Lepilogue -retint: +Lretint: cmpl $FFI_TYPE_INT,%ecx - jne retfloat + jne Lretfloat /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx movl %eax,0(%ecx) - jmp epilogue + jmp Lepilogue -retfloat: +Lretfloat: cmpl $FFI_TYPE_FLOAT,%ecx - jne retdouble + jne Lretdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstps (%ecx) - jmp epilogue + jmp Lepilogue -retdouble: +Lretdouble: cmpl $FFI_TYPE_DOUBLE,%ecx - jne retlongdouble + jne Lretlongdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpl (%ecx) - jmp epilogue + jmp Lepilogue -retlongdouble: +Lretlongdouble: cmpl $FFI_TYPE_LONGDOUBLE,%ecx - jne retint64 + jne Lretint64 /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpt (%ecx) - jmp epilogue + jmp Lepilogue -retint64: +Lretint64: cmpl $FFI_TYPE_SINT64,%ecx - jne retstruct1b + jne Lretstruct1b /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx movl %eax,0(%ecx) movl %edx,4(%ecx) - jmp epilogue - -retstruct1b: - cmpl $FFI_TYPE_SINT8,%ecx - jne retstruct2b - movl 24(%ebp),%ecx - movb %al,0(%ecx) - jmp epilogue - -retstruct2b: - cmpl $FFI_TYPE_SINT16,%ecx - jne retstruct - movl 24(%ebp),%ecx - movw %ax,0(%ecx) - jmp epilogue + jmp Lepilogue -retstruct: - cmpl $FFI_TYPE_STRUCT,%ecx - jne noretval - /* Nothing to do! */ - - subl $4,%esp - - ASSERT_STACK_ALIGNED - - addl $8,%esp - movl %ebp, %esp - popl %ebp - ret - -noretval: -epilogue: - ASSERT_STACK_ALIGNED - addl $8, %esp +Lretstruct1b: + cmpl $FFI_TYPE_SINT8,%ecx + jne Lretstruct2b + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movb %al,0(%ecx) + jmp Lepilogue +Lretstruct2b: + cmpl $FFI_TYPE_SINT16,%ecx + jne Lretstruct + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movw %ax,0(%ecx) + jmp Lepilogue +Lretstruct: + cmpl $FFI_TYPE_STRUCT,%ecx + jne Lnoretval + /* Nothing to do! */ + addl $4,%esp + popl %ebp + ret + +Lnoretval: +Lepilogue: + addl $8,%esp movl %ebp,%esp popl %ebp ret +LFE1: .ffi_call_SYSV_end: -#if 0 - .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV -#endif -#if 0 - .section .eh_frame,EH_FRAME_FLAGS, at progbits -.Lframe1: - .long .LECIE1-.LSCIE1 /* Length of Common Information Entry */ -.LSCIE1: - .long 0x0 /* CIE Identifier Tag */ - .byte 0x1 /* CIE Version */ -#ifdef __PIC__ - .ascii "zR\0" /* CIE Augmentation */ -#else - .ascii "\0" /* CIE Augmentation */ -#endif - .byte 0x1 /* .uleb128 0x1; CIE Code Alignment Factor */ - .byte 0x7c /* .sleb128 -4; CIE Data Alignment Factor */ - .byte 0x8 /* CIE RA Column */ -#ifdef __PIC__ - .byte 0x1 /* .uleb128 0x1; Augmentation size */ - .byte 0x1b /* FDE Encoding (pcrel sdata4) */ -#endif - .byte 0xc /* DW_CFA_def_cfa */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x88 /* DW_CFA_offset, column 0x8 */ - .byte 0x1 /* .uleb128 0x1 */ - .align 4 -.LECIE1: -.LSFDE1: - .long .LEFDE1-.LASFDE1 /* FDE Length */ -.LASFDE1: - .long .LASFDE1-.Lframe1 /* FDE CIE offset */ -#ifdef __PIC__ - .long .LFB1-. /* FDE initial location */ -#else - .long .LFB1 /* FDE initial location */ -#endif - .long .ffi_call_SYSV_end-.LFB1 /* FDE address range */ -#ifdef __PIC__ - .byte 0x0 /* .uleb128 0x0; Augmentation size */ + .align 4 +FFI_HIDDEN (ffi_closure_SYSV) +.globl _ffi_closure_SYSV + +_ffi_closure_SYSV: +LFB2: + pushl %ebp +LCFI2: + movl %esp, %ebp +LCFI3: + subl $56, %esp + leal -40(%ebp), %edx + movl %edx, -12(%ebp) /* resp */ + leal 8(%ebp), %edx + movl %edx, 4(%esp) /* args = __builtin_dwarf_cfa () */ + leal -12(%ebp), %edx + movl %edx, (%esp) /* &resp */ + movl %ebx, 8(%esp) +LCFI7: + call L_ffi_closure_SYSV_inner$stub + movl 8(%esp), %ebx + movl -12(%ebp), %ecx + cmpl $FFI_TYPE_INT, %eax + je Lcls_retint + cmpl $FFI_TYPE_FLOAT, %eax + je Lcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je Lcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je Lcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je Lcls_retllong + cmpl $FFI_TYPE_SINT8, %eax + je Lcls_retstruct1 + cmpl $FFI_TYPE_SINT16, %eax + je Lcls_retstruct2 + cmpl $FFI_TYPE_STRUCT, %eax + je Lcls_retstruct +Lcls_epilogue: + movl %ebp, %esp + popl %ebp + ret +Lcls_retint: + movl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retfloat: + flds (%ecx) + jmp Lcls_epilogue +Lcls_retdouble: + fldl (%ecx) + jmp Lcls_epilogue +Lcls_retldouble: + fldt (%ecx) + jmp Lcls_epilogue +Lcls_retllong: + movl (%ecx), %eax + movl 4(%ecx), %edx + jmp Lcls_epilogue +Lcls_retstruct1: + movsbl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retstruct2: + movswl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retstruct: + lea -8(%ebp),%esp + movl %ebp, %esp + popl %ebp + ret $4 +LFE2: + +#if !FFI_NO_RAW_API + +#define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3) +#define RAW_CLOSURE_FUN_OFFSET (RAW_CLOSURE_CIF_OFFSET + 4) +#define RAW_CLOSURE_USER_DATA_OFFSET (RAW_CLOSURE_FUN_OFFSET + 4) +#define CIF_FLAGS_OFFSET 20 + + .align 4 +FFI_HIDDEN (ffi_closure_raw_SYSV) +.globl _ffi_closure_raw_SYSV + +_ffi_closure_raw_SYSV: +LFB3: + pushl %ebp +LCFI4: + movl %esp, %ebp +LCFI5: + pushl %esi +LCFI6: + subl $36, %esp + movl RAW_CLOSURE_CIF_OFFSET(%eax), %esi /* closure->cif */ + movl RAW_CLOSURE_USER_DATA_OFFSET(%eax), %edx /* closure->user_data */ + movl %edx, 12(%esp) /* user_data */ + leal 8(%ebp), %edx /* __builtin_dwarf_cfa () */ + movl %edx, 8(%esp) /* raw_args */ + leal -24(%ebp), %edx + movl %edx, 4(%esp) /* &res */ + movl %esi, (%esp) /* cif */ + call *RAW_CLOSURE_FUN_OFFSET(%eax) /* closure->fun */ + movl CIF_FLAGS_OFFSET(%esi), %eax /* rtype */ + cmpl $FFI_TYPE_INT, %eax + je Lrcls_retint + cmpl $FFI_TYPE_FLOAT, %eax + je Lrcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je Lrcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je Lrcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je Lrcls_retllong +Lrcls_epilogue: + addl $36, %esp + popl %esi + popl %ebp + ret +Lrcls_retint: + movl -24(%ebp), %eax + jmp Lrcls_epilogue +Lrcls_retfloat: + flds -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retdouble: + fldl -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retldouble: + fldt -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retllong: + movl -24(%ebp), %eax + movl -20(%ebp), %edx + jmp Lrcls_epilogue +LFE3: #endif - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI0-.LFB1 - .byte 0xe /* DW_CFA_def_cfa_offset */ - .byte 0x8 /* .uleb128 0x8 */ - .byte 0x85 /* DW_CFA_offset, column 0x5 */ - .byte 0x2 /* .uleb128 0x2 */ - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI1-.LCFI0 - .byte 0xd /* DW_CFA_def_cfa_register */ - .byte 0x5 /* .uleb128 0x5 */ - .align 4 -.LEFDE1: + +.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_ffi_closure_SYSV_inner$stub: + .indirect_symbol _ffi_closure_SYSV_inner + hlt ; hlt ; hlt ; hlt ; hlt + + +.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support +EH_frame1: + .set L$set$0,LECIE1-LSCIE1 + .long L$set$0 +LSCIE1: + .long 0x0 + .byte 0x1 + .ascii "zR\0" + .byte 0x1 + .byte 0x7c + .byte 0x8 + .byte 0x1 + .byte 0x10 + .byte 0xc + .byte 0x5 + .byte 0x4 + .byte 0x88 + .byte 0x1 + .align 2 +LECIE1: +.globl _ffi_call_SYSV.eh +_ffi_call_SYSV.eh: +LSFDE1: + .set L$set$1,LEFDE1-LASFDE1 + .long L$set$1 +LASFDE1: + .long LASFDE1-EH_frame1 + .long LFB1-. + .set L$set$2,LFE1-LFB1 + .long L$set$2 + .byte 0x0 + .byte 0x4 + .set L$set$3,LCFI0-LFB1 + .long L$set$3 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$4,LCFI1-LCFI0 + .long L$set$4 + .byte 0xd + .byte 0x4 + .align 2 +LEFDE1: +.globl _ffi_closure_SYSV.eh +_ffi_closure_SYSV.eh: +LSFDE2: + .set L$set$5,LEFDE2-LASFDE2 + .long L$set$5 +LASFDE2: + .long LASFDE2-EH_frame1 + .long LFB2-. + .set L$set$6,LFE2-LFB2 + .long L$set$6 + .byte 0x0 + .byte 0x4 + .set L$set$7,LCFI2-LFB2 + .long L$set$7 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$8,LCFI3-LCFI2 + .long L$set$8 + .byte 0xd + .byte 0x4 + .align 2 +LEFDE2: + +#if !FFI_NO_RAW_API + +.globl _ffi_closure_raw_SYSV.eh +_ffi_closure_raw_SYSV.eh: +LSFDE3: + .set L$set$10,LEFDE3-LASFDE3 + .long L$set$10 +LASFDE3: + .long LASFDE3-EH_frame1 + .long LFB3-. + .set L$set$11,LFE3-LFB3 + .long L$set$11 + .byte 0x0 + .byte 0x4 + .set L$set$12,LCFI4-LFB3 + .long L$set$12 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$13,LCFI5-LCFI4 + .long L$set$13 + .byte 0xd + .byte 0x4 + .byte 0x4 + .set L$set$14,LCFI6-LCFI5 + .long L$set$14 + .byte 0x85 + .byte 0x3 + .align 2 +LEFDE3: + #endif #endif /* ifndef __x86_64__ */ Modified: python/trunk/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c ============================================================================== --- python/trunk/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c (original) +++ python/trunk/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c Sun Sep 20 20:54:16 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 reformatting penalties. + use SF or DFmode move instead of DImode to avoid reformating penalties. Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves whenever possible (upper half does contain padding). */ @@ -621,4 +621,4 @@ return ret; } -#endif /* __x86_64__ */ +#endif /* __x86_64__ */ \ No newline at end of file Modified: python/trunk/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c ============================================================================== --- python/trunk/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c (original) +++ python/trunk/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Sun Sep 20 20:54:16 2009 @@ -27,543 +27,410 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ -//#ifndef __x86_64__ - #include #include #include -//void ffi_prep_args(char *stack, extended_cif *ecif); - -static inline int -retval_on_stack( - ffi_type* tp) -{ - if (tp->type == FFI_TYPE_STRUCT) - { -// int size = tp->size; - - if (tp->size > 8) - return 1; - - switch (tp->size) - { - case 1: case 2: case 4: case 8: - return 0; - default: - return 1; - } - } - - return 0; -} - /* ffi_prep_args is called by the assembly routine once stack space - has been allocated for the function's arguments */ -/*@-exportheader@*/ -extern void ffi_prep_args(char*, extended_cif*); -void -ffi_prep_args( - char* stack, - extended_cif* ecif) -/*@=exportheader@*/ -{ - register unsigned int i; - register void** p_argv = ecif->avalue; - register char* argp = stack; - register ffi_type** p_arg; - - if (retval_on_stack(ecif->cif->rtype)) - { - *(void**)argp = ecif->rvalue; - argp += 4; - } + has been allocated for the function's arguments */ - p_arg = ecif->cif->arg_types; - - for (i = ecif->cif->nargs; i > 0; i--, p_arg++, p_argv++) +void ffi_prep_args(char *stack, extended_cif *ecif) +{ + register unsigned int i; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if (ecif->cif->flags == FFI_TYPE_STRUCT) { - size_t z = (*p_arg)->size; - - /* Align if necessary */ - if ((sizeof(int) - 1) & (unsigned)argp) - argp = (char*)ALIGN(argp, sizeof(int)); - - if (z < sizeof(int)) - { - z = sizeof(int); - - switch ((*p_arg)->type) - { - case FFI_TYPE_SINT8: - *(signed int*)argp = (signed int)*(SINT8*)(*p_argv); - break; - - case FFI_TYPE_UINT8: - *(unsigned int*)argp = (unsigned int)*(UINT8*)(*p_argv); - break; - - case FFI_TYPE_SINT16: - *(signed int*)argp = (signed int)*(SINT16*)(*p_argv); - break; - - case FFI_TYPE_UINT16: - *(unsigned int*)argp = (unsigned int)*(UINT16*)(*p_argv); - break; - - case FFI_TYPE_SINT32: - *(signed int*)argp = (signed int)*(SINT32*)(*p_argv); - break; - - case FFI_TYPE_UINT32: - *(unsigned int*)argp = (unsigned int)*(UINT32*)(*p_argv); - break; - - case FFI_TYPE_STRUCT: - *(unsigned int*)argp = (unsigned int)*(UINT32*)(*p_argv); - break; - - default: - FFI_ASSERT(0); - break; - } - } - else - memcpy(argp, *p_argv, z); - - argp += z; - } + *(void **) argp = ecif->rvalue; + argp += 4; + } + + p_argv = ecif->avalue; + + for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; + i != 0; + i--, p_arg++) + { + size_t z; + + /* Align if necessary */ + if ((sizeof(int) - 1) & (unsigned) argp) + argp = (char *) ALIGN(argp, sizeof(int)); + + z = (*p_arg)->size; + if (z < sizeof(int)) + { + z = sizeof(int); + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv); + break; + + case FFI_TYPE_UINT8: + *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv); + break; + + case FFI_TYPE_SINT16: + *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv); + break; + + case FFI_TYPE_UINT16: + *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv); + break; + + case FFI_TYPE_SINT32: + *(signed int *) argp = (signed int)*(SINT32 *)(* p_argv); + break; + + case FFI_TYPE_UINT32: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + case FFI_TYPE_STRUCT: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + default: + FFI_ASSERT(0); + } + } + else + { + memcpy(argp, *p_argv, z); + } + p_argv++; + argp += z; + } + + return; } /* Perform machine dependent cif processing */ -ffi_status -ffi_prep_cif_machdep( - ffi_cif* cif) +ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { - /* Set the return type flag */ - switch (cif->rtype->type) - { -#if !defined(X86_WIN32) && !defined(X86_DARWIN) - case FFI_TYPE_STRUCT: + /* Set the return type flag */ + switch (cif->rtype->type) + { + case FFI_TYPE_VOID: +#ifdef X86 + case FFI_TYPE_STRUCT: + case FFI_TYPE_UINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT8: + case FFI_TYPE_SINT16: #endif - case FFI_TYPE_VOID: - case FFI_TYPE_SINT64: - case FFI_TYPE_FLOAT: - case FFI_TYPE_DOUBLE: - case FFI_TYPE_LONGDOUBLE: - cif->flags = (unsigned)cif->rtype->type; - break; - - case FFI_TYPE_UINT64: - cif->flags = FFI_TYPE_SINT64; - break; - -#if defined(X86_WIN32) || defined(X86_DARWIN) - case FFI_TYPE_STRUCT: - switch (cif->rtype->size) - { - case 1: - cif->flags = FFI_TYPE_SINT8; - break; - - case 2: - cif->flags = FFI_TYPE_SINT16; - break; - - case 4: - cif->flags = FFI_TYPE_INT; - break; - - case 8: - cif->flags = FFI_TYPE_SINT64; - break; - - default: - cif->flags = FFI_TYPE_STRUCT; - break; - } - - break; + + case FFI_TYPE_SINT64: + case FFI_TYPE_FLOAT: + case FFI_TYPE_DOUBLE: + case FFI_TYPE_LONGDOUBLE: + cif->flags = (unsigned) cif->rtype->type; + break; + + case FFI_TYPE_UINT64: + cif->flags = FFI_TYPE_SINT64; + break; + +#ifndef X86 + case FFI_TYPE_STRUCT: + if (cif->rtype->size == 1) + { + cif->flags = FFI_TYPE_SINT8; /* same as char size */ + } + else if (cif->rtype->size == 2) + { + cif->flags = FFI_TYPE_SINT16; /* same as short size */ + } + else if (cif->rtype->size == 4) + { + cif->flags = FFI_TYPE_INT; /* same as int type */ + } + else if (cif->rtype->size == 8) + { + cif->flags = FFI_TYPE_SINT64; /* same as int64 type */ + } + else + { + cif->flags = FFI_TYPE_STRUCT; + } + break; #endif - - default: - cif->flags = FFI_TYPE_INT; - break; - } - - /* Darwin: The stack needs to be aligned to a multiple of 16 bytes */ - cif->bytes = (cif->bytes + 15) & ~0xF; - - return FFI_OK; + + default: + cif->flags = FFI_TYPE_INT; + break; + } + +#ifdef X86_DARWIN + cif->bytes = (cif->bytes + 15) & ~0xF; +#endif + + return FFI_OK; } -/*@-declundef@*/ -/*@-exportheader@*/ -extern void -ffi_call_SYSV( - void (*)(char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)(void)); -/*@=declundef@*/ -/*@=exportheader@*/ +extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, + unsigned, unsigned, unsigned *, void (*fn)()); #ifdef X86_WIN32 -/*@-declundef@*/ -/*@-exportheader@*/ -extern void -ffi_call_STDCALL( - void (char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)(void)); -/*@=declundef@*/ -/*@=exportheader@*/ +extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, + unsigned, unsigned, unsigned *, void (*fn)()); + #endif /* X86_WIN32 */ -void -ffi_call( -/*@dependent@*/ ffi_cif* cif, - void (*fn)(void), -/*@out@*/ void* rvalue, -/*@dependent@*/ void** avalue) +void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) { - extended_cif ecif; - - ecif.cif = cif; - ecif.avalue = avalue; - - /* If the return value is a struct and we don't have a return - value address then we need to make one. */ - - if ((rvalue == NULL) && retval_on_stack(cif->rtype)) - { - /*@-sysunrecog@*/ - ecif.rvalue = alloca(cif->rtype->size); - /*@=sysunrecog@*/ - } - else - ecif.rvalue = rvalue; - - switch (cif->abi) - { - case FFI_SYSV: - /*@-usedef@*/ - /* To avoid changing the assembly code make sure the size of the argument - block is a multiple of 16. Then add 8 to compensate for local variables - in ffi_call_SYSV. */ - ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; - + extended_cif ecif; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->flags == FFI_TYPE_STRUCT)) + { + ecif.rvalue = alloca(cif->rtype->size); + } + else + ecif.rvalue = rvalue; + + + switch (cif->abi) + { + case FFI_SYSV: + ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, + fn); + break; #ifdef X86_WIN32 - case FFI_STDCALL: - /*@-usedef@*/ - ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + case FFI_STDCALL: + ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #endif /* X86_WIN32 */ - - default: - FFI_ASSERT(0); - break; - } + default: + FFI_ASSERT(0); + break; + } } -/** private members **/ -static void -ffi_closure_SYSV( - ffi_closure* closure) __attribute__((regparm(1))); - -#if !FFI_NO_RAW_API -static void -ffi_closure_raw_SYSV( - ffi_raw_closure* closure) __attribute__((regparm(1))); -#endif - -/*@-exportheader@*/ -static inline -void -ffi_prep_incoming_args_SYSV( - char* stack, - void** rvalue, - void** avalue, - ffi_cif* cif) -/*@=exportheader@*/ -{ - register unsigned int i; - register void** p_argv = avalue; - register char* argp = stack; - register ffi_type** p_arg; - - if (retval_on_stack(cif->rtype)) - { - *rvalue = *(void**)argp; - argp += 4; - } - - for (i = cif->nargs, p_arg = cif->arg_types; i > 0; i--, p_arg++, p_argv++) - { -// size_t z; - - /* Align if necessary */ - if ((sizeof(int) - 1) & (unsigned)argp) - argp = (char*)ALIGN(argp, sizeof(int)); +/** private members **/ -// z = (*p_arg)->size; +static void ffi_prep_incoming_args_SYSV (char *stack, void **ret, + void** args, ffi_cif* cif); +void FFI_HIDDEN ffi_closure_SYSV (ffi_closure *) +__attribute__ ((regparm(1))); +unsigned int FFI_HIDDEN ffi_closure_SYSV_inner (ffi_closure *, void **, void *) +__attribute__ ((regparm(1))); +void FFI_HIDDEN ffi_closure_raw_SYSV (ffi_raw_closure *) +__attribute__ ((regparm(1))); - /* because we're little endian, this is what it turns into. */ - *p_argv = (void*)argp; +/* This function is jumped to by the trampoline */ - argp += (*p_arg)->size; - } +unsigned int FFI_HIDDEN +ffi_closure_SYSV_inner (closure, respp, args) +ffi_closure *closure; +void **respp; +void *args; +{ + // our various things... + ffi_cif *cif; + void **arg_area; + + cif = closure->cif; + arg_area = (void**) alloca (cif->nargs * sizeof (void*)); + + /* this call will initialize ARG_AREA, such that each + * element in that array points to the corresponding + * value on the stack; and if the function returns + * a structure, it will re-set RESP to point to the + * structure return address. */ + + ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif); + + (closure->fun) (cif, *respp, arg_area, closure->user_data); + + return cif->flags; } -/* This function is jumped to by the trampoline */ -__attribute__((regparm(1))) static void -ffi_closure_SYSV( - ffi_closure* closure) +ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, void **avalue, + ffi_cif *cif) { - long double res; - ffi_cif* cif = closure->cif; - void** arg_area = (void**)alloca(cif->nargs * sizeof(void*)); - void* resp = (void*)&res; - void* args = __builtin_dwarf_cfa(); - - /* This call will initialize ARG_AREA, such that each - element in that array points to the corresponding - value on the stack; and if the function returns - a structure, it will reset RESP to point to the - structure return address. */ - ffi_prep_incoming_args_SYSV(args, (void**)&resp, arg_area, cif); - - (closure->fun)(cif, resp, arg_area, closure->user_data); - - /* now, do a generic return based on the value of rtype */ - if (cif->flags == FFI_TYPE_INT) - asm("movl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (cif->flags == FFI_TYPE_FLOAT) - asm("flds (%0)" - : : "r" (resp) : "st"); - else if (cif->flags == FFI_TYPE_DOUBLE) - asm("fldl (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (cif->flags == FFI_TYPE_LONGDOUBLE) - asm("fldt (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (cif->flags == FFI_TYPE_SINT64) - asm("movl 0(%0),%%eax;" - "movl 4(%0),%%edx" - : : "r" (resp) - : "eax", "edx"); - -#if defined(X86_WIN32) || defined(X86_DARWIN) - else if (cif->flags == FFI_TYPE_SINT8) /* 1-byte struct */ - asm("movsbl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (cif->flags == FFI_TYPE_SINT16) /* 2-bytes struct */ - asm("movswl (%0),%%eax" - : : "r" (resp) : "eax"); -#endif - - else if (cif->flags == FFI_TYPE_STRUCT) - asm("lea -8(%ebp),%esp;" - "pop %esi;" - "pop %edi;" - "pop %ebp;" - "ret $4"); + register unsigned int i; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if ( cif->flags == FFI_TYPE_STRUCT ) { + *rvalue = *(void **) argp; + argp += 4; + } + + p_argv = avalue; + + for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++) + { + size_t z; + + /* Align if necessary */ + if ((sizeof(int) - 1) & (unsigned) argp) { + argp = (char *) ALIGN(argp, sizeof(int)); + } + + z = (*p_arg)->size; + + /* because we're little endian, this is what it turns into. */ + + *p_argv = (void*) argp; + + p_argv++; + argp += z; + } + + return; } - /* How to make a trampoline. Derived from gcc/config/i386/i386.c. */ -#define FFI_INIT_TRAMPOLINE(TRAMP, FUN, CTX) \ - ({ \ - unsigned char* __tramp = (unsigned char*)(TRAMP); \ - unsigned int __fun = (unsigned int)(FUN); \ - unsigned int __ctx = (unsigned int)(CTX); \ - unsigned int __dis = __fun - ((unsigned int)__tramp + FFI_TRAMPOLINE_SIZE); \ - *(unsigned char*)&__tramp[0] = 0xb8; \ - *(unsigned int*)&__tramp[1] = __ctx; /* movl __ctx, %eax */ \ - *(unsigned char*)&__tramp[5] = 0xe9; \ - *(unsigned int*)&__tramp[6] = __dis; /* jmp __fun */ \ - }) + +#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \ +({ unsigned char *__tramp = (unsigned char*)(TRAMP); \ +unsigned int __fun = (unsigned int)(FUN); \ +unsigned int __ctx = (unsigned int)(CTX); \ +unsigned int __dis = __fun - (__ctx + FFI_TRAMPOLINE_SIZE); \ +*(unsigned char*) &__tramp[0] = 0xb8; \ +*(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \ +*(unsigned char *) &__tramp[5] = 0xe9; \ +*(unsigned int*) &__tramp[6] = __dis; /* jmp __fun */ \ +}) + /* the cif must already be prep'ed */ ffi_status -ffi_prep_closure( - ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,void**,void*), - void* user_data) +ffi_prep_closure (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data) { -// FFI_ASSERT(cif->abi == FFI_SYSV); if (cif->abi != FFI_SYSV) return FFI_BAD_ABI; - - FFI_INIT_TRAMPOLINE(closure->tramp, &ffi_closure_SYSV, (void*)closure); - - closure->cif = cif; - closure->user_data = user_data; - closure->fun = fun; - - return FFI_OK; + + FFI_INIT_TRAMPOLINE (&closure->tramp[0], \ + &ffi_closure_SYSV, \ + (void*)closure); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; } /* ------- Native raw API support -------------------------------- */ #if !FFI_NO_RAW_API -__attribute__((regparm(1))) -static void -ffi_closure_raw_SYSV( - ffi_raw_closure* closure) -{ - long double res; - ffi_raw* raw_args = (ffi_raw*)__builtin_dwarf_cfa(); - ffi_cif* cif = closure->cif; - unsigned short rtype = cif->flags; - void* resp = (void*)&res; - - (closure->fun)(cif, resp, raw_args, closure->user_data); - - /* now, do a generic return based on the value of rtype */ - if (rtype == FFI_TYPE_INT) - asm("movl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (rtype == FFI_TYPE_FLOAT) - asm("flds (%0)" - : : "r" (resp) : "st"); - else if (rtype == FFI_TYPE_DOUBLE) - asm("fldl (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (rtype == FFI_TYPE_LONGDOUBLE) - asm("fldt (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (rtype == FFI_TYPE_SINT64) - asm("movl 0(%0),%%eax;" - "movl 4(%0),%%edx" - : : "r" (resp) : "eax", "edx"); -} - ffi_status -ffi_prep_raw_closure( - ffi_raw_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), - void* user_data) -{ -// FFI_ASSERT (cif->abi == FFI_SYSV); - if (cif->abi != FFI_SYSV) - return FFI_BAD_ABI; - - int i; - -/* We currently don't support certain kinds of arguments for raw - closures. This should be implemented by a separate assembly language - routine, since it would require argument processing, something we - don't do now for performance. */ - for (i = cif->nargs - 1; i >= 0; i--) - { - FFI_ASSERT(cif->arg_types[i]->type != FFI_TYPE_STRUCT); - FFI_ASSERT(cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE); - } - - FFI_INIT_TRAMPOLINE(closure->tramp, &ffi_closure_raw_SYSV, (void*)closure); - - closure->cif = cif; - closure->user_data = user_data; - closure->fun = fun; - - return FFI_OK; +ffi_prep_raw_closure_loc (ffi_raw_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data, + void *codeloc) +{ + int i; + + FFI_ASSERT (cif->abi == FFI_SYSV); + + // we currently don't support certain kinds of arguments for raw + // closures. This should be implemented by a separate assembly language + // routine, since it would require argument processing, something we + // don't do now for performance. + + for (i = cif->nargs-1; i >= 0; i--) + { + FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_STRUCT); + FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE); + } + + + FFI_INIT_TRAMPOLINE (&closure->tramp[0], &ffi_closure_raw_SYSV, + codeloc); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; } static void -ffi_prep_args_raw( - char* stack, - extended_cif* ecif) +ffi_prep_args_raw(char *stack, extended_cif *ecif) { - memcpy(stack, ecif->avalue, ecif->cif->bytes); + memcpy (stack, ecif->avalue, ecif->cif->bytes); } -/* We borrow this routine from libffi (it must be changed, though, to - actually call the function passed in the first argument. as of - libffi-1.20, this is not the case.) */ -//extern void -//ffi_call_SYSV( -// void (*)(char *, extended_cif *), -///*@out@*/ extended_cif* , -// unsigned , -// unsigned , -//*@out@*/ unsigned* , -// void (*fn)()); +/* we borrow this routine from libffi (it must be changed, though, to + * actually call the function passed in the first argument. as of + * libffi-1.20, this is not the case.) + */ + +extern void +ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, unsigned, + unsigned, unsigned *, void (*fn)()); #ifdef X86_WIN32 extern void -ffi_call_STDCALL( - void (*)(char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)()); -#endif // X86_WIN32 +ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, unsigned, + unsigned, unsigned *, void (*fn)()); +#endif /* X86_WIN32 */ void -ffi_raw_call( -/*@dependent@*/ ffi_cif* cif, - void (*fn)(), -/*@out@*/ void* rvalue, -/*@dependent@*/ ffi_raw* fake_avalue) +ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue) { - extended_cif ecif; - void **avalue = (void **)fake_avalue; - - ecif.cif = cif; - ecif.avalue = avalue; - - /* If the return value is a struct and we don't have a return - value address then we need to make one */ - if ((rvalue == NULL) && retval_on_stack(cif->rtype)) - { - /*@-sysunrecog@*/ - ecif.rvalue = alloca(cif->rtype->size); - /*@=sysunrecog@*/ - } - else - ecif.rvalue = rvalue; - - switch (cif->abi) - { - case FFI_SYSV: - /*@-usedef@*/ - ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + extended_cif ecif; + void **avalue = (void **)fake_avalue; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->rtype->type == FFI_TYPE_STRUCT)) + { + ecif.rvalue = alloca(cif->rtype->size); + } + else + ecif.rvalue = rvalue; + + + switch (cif->abi) + { + case FFI_SYSV: + ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #ifdef X86_WIN32 - case FFI_STDCALL: - /*@-usedef@*/ - ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + case FFI_STDCALL: + ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #endif /* X86_WIN32 */ - default: - FFI_ASSERT(0); - break; + default: + FFI_ASSERT(0); + break; } } -#endif // !FFI_NO_RAW_API -//#endif // !__x86_64__ -#endif // __i386__ +#endif +#endif // __i386__ \ No newline at end of file From python-checkins at python.org Sun Sep 20 20:56:49 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 18:56:49 -0000 Subject: [Python-checkins] r74973 - in python/branches/release26-maint: Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S Modules/_ctypes/libffi_osx/x86/x86-darwin.S Modules/_ctypes/libffi_osx/x86/x86-ffi64.c Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Message-ID: Author: ronald.oussoren Date: Sun Sep 20 20:56:49 2009 New Revision: 74973 Log: Merged revisions 74972 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74972 | ronald.oussoren | 2009-09-20 20:54:16 +0200 (Sun, 20 Sep 2009) | 5 lines Merge a newer version of libffi_osx, based on the version of libffi in OSX 10.6.1. This fixes issue6918 ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-darwin.S python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Modified: python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S Sun Sep 20 20:56:49 2009 @@ -1,7 +1,7 @@ #if defined(__ppc__) || defined(__ppc64__) /* ----------------------------------------------------------------------- - darwin.S - Copyright (c) 2000 John Hornkvist + ppc-darwin.S - Copyright (c) 2000 John Hornkvist Copyright (c) 2004 Free Software Foundation, Inc. PowerPC Assembly glue. @@ -294,7 +294,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -308,7 +308,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB0$non_lazy_ptr-. ; FDE initial location + .g_long LFB0-. ; FDE initial location .set L$set$3,LFE1-LFB0 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -338,10 +338,6 @@ .byte 0x1c ; uleb128 0x1c .align LOG2_GPR_BYTES LEFDE1: -.data - .align LOG2_GPR_BYTES -LLFB0$non_lazy_ptr: - .g_long LFB0 #if defined(__ppc64__) .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 Modified: python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h Sun Sep 20 20:56:49 2009 @@ -22,7 +22,6 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ - #define L(x) x #define SF_ARG9 MODE_CHOICE(56,112) @@ -57,7 +56,6 @@ ((x) == FFI_TYPE_UINT32 || (x) == FFI_TYPE_SINT32 ||\ (x) == FFI_TYPE_INT || (x) == FFI_TYPE_FLOAT) - #if !defined(LIBFFI_ASM) enum { @@ -75,20 +73,6 @@ FLAG_RETVAL_REFERENCE = 1 << (31 - 4) }; - -void ffi_prep_args(extended_cif* inEcif, unsigned *const stack); - -typedef union -{ - float f; - double d; -} ffi_dblfl; - -int ffi_closure_helper_DARWIN( ffi_closure* closure, - void* rvalue, unsigned long* pgr, - ffi_dblfl* pfr); - - #if defined(__ppc64__) void ffi64_struct_to_ram_form(const ffi_type*, const char*, unsigned int*, const char*, unsigned int*, unsigned int*, char*, unsigned int*); @@ -96,11 +80,6 @@ unsigned int*, char*, unsigned int*, char*, unsigned int*); bool ffi64_stret_needs_ptr(const ffi_type* inType, unsigned short*, unsigned short*); -bool ffi64_struct_contains_fp(const ffi_type* inType); -unsigned int ffi64_data_size(const ffi_type* inType); - - - #endif -#endif // !defined(LIBFFI_ASM) +#endif // !defined(LIBFFI_ASM) \ No newline at end of file Modified: python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S Sun Sep 20 20:56:49 2009 @@ -1,7 +1,7 @@ #if defined(__ppc__) /* ----------------------------------------------------------------------- - darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, + ppc-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, Inc. based on ppc_closure.S PowerPC Assembly glue. @@ -43,8 +43,8 @@ _ffi_closure_ASM: LFB1: - mflr r0 /* extract return address */ - stg r0,MODE_CHOICE(8,16)(r1) /* save return address */ + mflr r0 // Save return address + stg r0,SF_RETURN(r1) LCFI0: /* 24/48 bytes (Linkage Area) @@ -54,7 +54,7 @@ 176/232 total bytes */ /* skip over caller save area and keep stack aligned to 16/32. */ - stgu r1,-SF_ROUND(MODE_CHOICE(176,248))(r1) + stgu r1,-SF_ROUND(176)(r1) LCFI1: /* We want to build up an area for the parameters passed @@ -67,58 +67,44 @@ /* Save GPRs 3 - 10 (aligned to 4/8) in the parents outgoing area. */ - stg r3,MODE_CHOICE(200,304)(r1) - stg r4,MODE_CHOICE(204,312)(r1) - stg r5,MODE_CHOICE(208,320)(r1) - stg r6,MODE_CHOICE(212,328)(r1) - stg r7,MODE_CHOICE(216,336)(r1) - stg r8,MODE_CHOICE(220,344)(r1) - stg r9,MODE_CHOICE(224,352)(r1) - stg r10,MODE_CHOICE(228,360)(r1) + stg r3,200(r1) + stg r4,204(r1) + stg r5,208(r1) + stg r6,212(r1) + stg r7,216(r1) + stg r8,220(r1) + stg r9,224(r1) + stg r10,228(r1) /* Save FPRs 1 - 13. (aligned to 8) */ - stfd f1,MODE_CHOICE(56,112)(r1) - stfd f2,MODE_CHOICE(64,120)(r1) - stfd f3,MODE_CHOICE(72,128)(r1) - stfd f4,MODE_CHOICE(80,136)(r1) - stfd f5,MODE_CHOICE(88,144)(r1) - stfd f6,MODE_CHOICE(96,152)(r1) - stfd f7,MODE_CHOICE(104,160)(r1) - stfd f8,MODE_CHOICE(112,168)(r1) - stfd f9,MODE_CHOICE(120,176)(r1) - stfd f10,MODE_CHOICE(128,184)(r1) - stfd f11,MODE_CHOICE(136,192)(r1) - stfd f12,MODE_CHOICE(144,200)(r1) - stfd f13,MODE_CHOICE(152,208)(r1) - - /* Set up registers for the routine that actually does the work. - Get the context pointer from the trampoline. */ - mr r3,r11 - - /* Load the pointer to the result storage. */ - /* current stack frame size - ((4/8 * 4) + saved registers) */ - addi r4,r1,MODE_CHOICE(160,216) - - /* Load the pointer to the saved gpr registers. */ - addi r5,r1,MODE_CHOICE(200,304) - - /* Load the pointer to the saved fpr registers. */ - addi r6,r1,MODE_CHOICE(56,112) - - /* Make the call. */ + stfd f1,56(r1) + stfd f2,64(r1) + stfd f3,72(r1) + stfd f4,80(r1) + stfd f5,88(r1) + stfd f6,96(r1) + stfd f7,104(r1) + stfd f8,112(r1) + stfd f9,120(r1) + stfd f10,128(r1) + stfd f11,136(r1) + stfd f12,144(r1) + stfd f13,152(r1) + + // Set up registers for the routine that actually does the work. + mr r3,r11 // context pointer from the trampoline + addi r4,r1,160 // result storage + addi r5,r1,200 // saved GPRs + addi r6,r1,56 // saved FPRs bl Lffi_closure_helper_DARWIN$stub - /* Now r3 contains the return type - so use it to look up in a table + /* Now r3 contains the return type. Use it to look up in a table so we know how to deal with each type. */ - - /* Look the proper starting point in table - by using return type as offset. */ - addi r5,r1,MODE_CHOICE(160,216) // Get pointer to results area. - bl Lget_ret_type0_addr // Get pointer to Lret_type0 into LR. - mflr r4 // Move to r4. - slwi r3,r3,4 // Now multiply return type by 16. - add r3,r3,r4 // Add contents of table to table address. + addi r5,r1,160 // Copy result storage pointer. + bl Lget_ret_type0_addr // Get pointer to Lret_type0 into LR. + mflr r4 // Move to r4. + slwi r3,r3,4 // Multiply return type by 16. + add r3,r3,r4 // Add contents of table to table address. mtctr r3 bctr @@ -143,7 +129,7 @@ /* case FFI_TYPE_INT */ Lret_type1: - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop @@ -171,42 +157,42 @@ /* case FFI_TYPE_UINT8 */ Lret_type5: - lbz r3,MODE_CHOICE(3,7)(r5) + lbz r3,3(r5) b Lfinish nop nop /* case FFI_TYPE_SINT8 */ Lret_type6: - lbz r3,MODE_CHOICE(3,7)(r5) + lbz r3,3(r5) extsb r3,r3 b Lfinish nop /* case FFI_TYPE_UINT16 */ Lret_type7: - lhz r3,MODE_CHOICE(2,6)(r5) + lhz r3,2(r5) b Lfinish nop nop /* case FFI_TYPE_SINT16 */ Lret_type8: - lha r3,MODE_CHOICE(2,6)(r5) + lha r3,2(r5) b Lfinish nop nop /* case FFI_TYPE_UINT32 */ Lret_type9: // same as Lret_type1 - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop /* case FFI_TYPE_SINT32 */ Lret_type10: // same as Lret_type1 - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop @@ -227,7 +213,7 @@ /* case FFI_TYPE_STRUCT */ Lret_type13: - b MODE_CHOICE(Lfinish,Lret_struct) + b Lfinish nop nop nop @@ -239,12 +225,13 @@ // padded to 16 bytes. Lret_type14: lg r3,0(r5) + // fall through /* case done */ Lfinish: - addi r1,r1,SF_ROUND(MODE_CHOICE(176,248)) // Restore stack pointer. - lg r0,MODE_CHOICE(8,16)(r1) /* Get return address. */ - mtlr r0 /* Reset link register. */ + addi r1,r1,SF_ROUND(176) // Restore stack pointer. + lg r0,SF_RETURN(r1) // Restore return address. + mtlr r0 // Restore link register. blr /* END(ffi_closure_ASM) */ @@ -261,7 +248,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -275,7 +262,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB1$non_lazy_ptr-. ; FDE initial location + .g_long LFB1-. ; FDE initial location .set L$set$3,LFE1-LFB1 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -317,9 +304,5 @@ .indirect_symbol _ffi_closure_helper_DARWIN .g_long dyld_stub_binding_helper -.data - .align LOG2_GPR_BYTES -LLFB1$non_lazy_ptr: - .g_long LFB1 #endif // __ppc__ Modified: python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c Sun Sep 20 20:56:49 2009 @@ -28,13 +28,13 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ -#include "ffi.h" -#include "ffi_common.h" +#include +#include #include #include #include -#include "ppc-darwin.h" +#include #include #if 0 @@ -42,17 +42,14 @@ #include // for sys_icache_invalidate() #endif -#else - -/* Explicit prototype instead of including a header to allow compilation - * on Tiger systems. - */ +#else #pragma weak sys_icache_invalidate extern void sys_icache_invalidate(void *start, size_t len); #endif + extern void ffi_closure_ASM(void); // The layout of a function descriptor. A C function pointer really @@ -760,9 +757,7 @@ // Flush the icache. Only necessary on Darwin. #if defined(POWERPC_DARWIN) - if (sys_icache_invalidate) { - sys_icache_invalidate(closure->tramp, FFI_TRAMPOLINE_SIZE); - } + sys_icache_invalidate(closure->tramp, FFI_TRAMPOLINE_SIZE); #else flush_range(closure->tramp, FFI_TRAMPOLINE_SIZE); #endif @@ -804,6 +799,12 @@ } ldu; #endif +typedef union +{ + float f; + double d; +} ffi_dblfl; + /* The trampoline invokes ffi_closure_ASM, and on entry, r11 holds the address of the closure. After storing the registers that could possibly contain parameters to be passed into the stack frame and setting up space @@ -829,7 +830,7 @@ unsigned int nf = 0; /* number of FPRs already used. */ unsigned int ng = 0; /* number of GPRs already used. */ ffi_cif* cif = closure->cif; - unsigned int avn = cif->nargs; + long avn = cif->nargs; void** avalue = alloca(cif->nargs * sizeof(void*)); ffi_type** arg_types = cif->arg_types; @@ -906,9 +907,9 @@ size_al = ALIGN(arg_types[i]->size, 8); if (size_al < 3) - avalue[i] = (char*)pgr + MODE_CHOICE(4,8) - size_al; + avalue[i] = (void*)pgr + MODE_CHOICE(4,8) - size_al; else - avalue[i] = (char*)pgr; + avalue[i] = (void*)pgr; ng += (size_al + 3) / sizeof(long); pgr += (size_al + 3) / sizeof(long); @@ -988,8 +989,8 @@ We use a union to pass the long double to avalue[i]. */ else if (nf == NUM_FPR_ARG_REGISTERS - 1) { - memcpy (&temp_ld.lb[0], pfr, sizeof(ldbits)); - memcpy (&temp_ld.lb[1], pgr + 2, sizeof(ldbits)); + memcpy (&temp_ld.lb[0], pfr, sizeof(temp_ld.lb[0])); + memcpy (&temp_ld.lb[1], pgr + 2, sizeof(temp_ld.lb[1])); avalue[i] = &temp_ld.ld; } #else Modified: python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S Sun Sep 20 20:56:49 2009 @@ -1,7 +1,7 @@ #if defined(__ppc64__) /* ----------------------------------------------------------------------- - darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, + ppc64-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, Inc. based on ppc_closure.S PowerPC Assembly glue. @@ -297,8 +297,8 @@ // case done Lfinish: - lg r1,0(r1) // Restore stack pointer. - ld r31,-8(r1) // Restore registers we used. + lg r1,0(r1) // Restore stack pointer. + ld r31,-8(r1) // Restore registers we used. ld r30,-16(r1) lg r0,SF_RETURN(r1) // Get return address. mtlr r0 // Reset link register. @@ -318,7 +318,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -332,7 +332,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB1$non_lazy_ptr-. ; FDE initial location + .g_long LFB1-. ; FDE initial location .set L$set$3,LFE1-LFB1 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -374,11 +374,6 @@ .indirect_symbol _ffi_closure_helper_DARWIN .g_long dyld_stub_binding_helper -.data - .align LOG2_GPR_BYTES -LLFB1$non_lazy_ptr: - .g_long LFB1 - .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 .align LOG2_GPR_BYTES Modified: python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-darwin.S ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-darwin.S (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-darwin.S Sun Sep 20 20:56:49 2009 @@ -46,23 +46,20 @@ .globl _ffi_prep_args -.align 4 + .align 4 .globl _ffi_call_SYSV _ffi_call_SYSV: -.LFB1: +LFB1: pushl %ebp -.LCFI0: +LCFI0: movl %esp,%ebp - subl $8,%esp - ASSERT_STACK_ALIGNED -.LCFI1: +LCFI1: + subl $8,%esp /* Make room for all of the new args. */ movl 16(%ebp),%ecx subl %ecx,%esp - ASSERT_STACK_ALIGNED - movl %esp,%eax /* Place all of the ffi_prep_args in position */ @@ -71,170 +68,349 @@ pushl %eax call *8(%ebp) - ASSERT_STACK_ALIGNED - /* Return stack to previous state and call the function */ - addl $16,%esp - - ASSERT_STACK_ALIGNED + addl $16,%esp call *28(%ebp) - - /* XXX: return returns return with 'ret $4', that upsets the stack! */ + + /* Remove the space we pushed for the args */ movl 16(%ebp),%ecx addl %ecx,%esp - /* Load %ecx with the return type code */ movl 20(%ebp),%ecx - /* If the return value pointer is NULL, assume no return value. */ cmpl $0,24(%ebp) - jne retint + jne Lretint /* Even if there is no space for the return value, we are obliged to handle floating-point values. */ cmpl $FFI_TYPE_FLOAT,%ecx - jne noretval + jne Lnoretval fstp %st(0) - jmp epilogue + jmp Lepilogue -retint: +Lretint: cmpl $FFI_TYPE_INT,%ecx - jne retfloat + jne Lretfloat /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx movl %eax,0(%ecx) - jmp epilogue + jmp Lepilogue -retfloat: +Lretfloat: cmpl $FFI_TYPE_FLOAT,%ecx - jne retdouble + jne Lretdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstps (%ecx) - jmp epilogue + jmp Lepilogue -retdouble: +Lretdouble: cmpl $FFI_TYPE_DOUBLE,%ecx - jne retlongdouble + jne Lretlongdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpl (%ecx) - jmp epilogue + jmp Lepilogue -retlongdouble: +Lretlongdouble: cmpl $FFI_TYPE_LONGDOUBLE,%ecx - jne retint64 + jne Lretint64 /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpt (%ecx) - jmp epilogue + jmp Lepilogue -retint64: +Lretint64: cmpl $FFI_TYPE_SINT64,%ecx - jne retstruct1b + jne Lretstruct1b /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx movl %eax,0(%ecx) movl %edx,4(%ecx) - jmp epilogue - -retstruct1b: - cmpl $FFI_TYPE_SINT8,%ecx - jne retstruct2b - movl 24(%ebp),%ecx - movb %al,0(%ecx) - jmp epilogue - -retstruct2b: - cmpl $FFI_TYPE_SINT16,%ecx - jne retstruct - movl 24(%ebp),%ecx - movw %ax,0(%ecx) - jmp epilogue + jmp Lepilogue -retstruct: - cmpl $FFI_TYPE_STRUCT,%ecx - jne noretval - /* Nothing to do! */ - - subl $4,%esp - - ASSERT_STACK_ALIGNED - - addl $8,%esp - movl %ebp, %esp - popl %ebp - ret - -noretval: -epilogue: - ASSERT_STACK_ALIGNED - addl $8, %esp +Lretstruct1b: + cmpl $FFI_TYPE_SINT8,%ecx + jne Lretstruct2b + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movb %al,0(%ecx) + jmp Lepilogue +Lretstruct2b: + cmpl $FFI_TYPE_SINT16,%ecx + jne Lretstruct + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movw %ax,0(%ecx) + jmp Lepilogue +Lretstruct: + cmpl $FFI_TYPE_STRUCT,%ecx + jne Lnoretval + /* Nothing to do! */ + addl $4,%esp + popl %ebp + ret + +Lnoretval: +Lepilogue: + addl $8,%esp movl %ebp,%esp popl %ebp ret +LFE1: .ffi_call_SYSV_end: -#if 0 - .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV -#endif -#if 0 - .section .eh_frame,EH_FRAME_FLAGS, at progbits -.Lframe1: - .long .LECIE1-.LSCIE1 /* Length of Common Information Entry */ -.LSCIE1: - .long 0x0 /* CIE Identifier Tag */ - .byte 0x1 /* CIE Version */ -#ifdef __PIC__ - .ascii "zR\0" /* CIE Augmentation */ -#else - .ascii "\0" /* CIE Augmentation */ -#endif - .byte 0x1 /* .uleb128 0x1; CIE Code Alignment Factor */ - .byte 0x7c /* .sleb128 -4; CIE Data Alignment Factor */ - .byte 0x8 /* CIE RA Column */ -#ifdef __PIC__ - .byte 0x1 /* .uleb128 0x1; Augmentation size */ - .byte 0x1b /* FDE Encoding (pcrel sdata4) */ -#endif - .byte 0xc /* DW_CFA_def_cfa */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x88 /* DW_CFA_offset, column 0x8 */ - .byte 0x1 /* .uleb128 0x1 */ - .align 4 -.LECIE1: -.LSFDE1: - .long .LEFDE1-.LASFDE1 /* FDE Length */ -.LASFDE1: - .long .LASFDE1-.Lframe1 /* FDE CIE offset */ -#ifdef __PIC__ - .long .LFB1-. /* FDE initial location */ -#else - .long .LFB1 /* FDE initial location */ -#endif - .long .ffi_call_SYSV_end-.LFB1 /* FDE address range */ -#ifdef __PIC__ - .byte 0x0 /* .uleb128 0x0; Augmentation size */ + .align 4 +FFI_HIDDEN (ffi_closure_SYSV) +.globl _ffi_closure_SYSV + +_ffi_closure_SYSV: +LFB2: + pushl %ebp +LCFI2: + movl %esp, %ebp +LCFI3: + subl $56, %esp + leal -40(%ebp), %edx + movl %edx, -12(%ebp) /* resp */ + leal 8(%ebp), %edx + movl %edx, 4(%esp) /* args = __builtin_dwarf_cfa () */ + leal -12(%ebp), %edx + movl %edx, (%esp) /* &resp */ + movl %ebx, 8(%esp) +LCFI7: + call L_ffi_closure_SYSV_inner$stub + movl 8(%esp), %ebx + movl -12(%ebp), %ecx + cmpl $FFI_TYPE_INT, %eax + je Lcls_retint + cmpl $FFI_TYPE_FLOAT, %eax + je Lcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je Lcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je Lcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je Lcls_retllong + cmpl $FFI_TYPE_SINT8, %eax + je Lcls_retstruct1 + cmpl $FFI_TYPE_SINT16, %eax + je Lcls_retstruct2 + cmpl $FFI_TYPE_STRUCT, %eax + je Lcls_retstruct +Lcls_epilogue: + movl %ebp, %esp + popl %ebp + ret +Lcls_retint: + movl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retfloat: + flds (%ecx) + jmp Lcls_epilogue +Lcls_retdouble: + fldl (%ecx) + jmp Lcls_epilogue +Lcls_retldouble: + fldt (%ecx) + jmp Lcls_epilogue +Lcls_retllong: + movl (%ecx), %eax + movl 4(%ecx), %edx + jmp Lcls_epilogue +Lcls_retstruct1: + movsbl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retstruct2: + movswl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retstruct: + lea -8(%ebp),%esp + movl %ebp, %esp + popl %ebp + ret $4 +LFE2: + +#if !FFI_NO_RAW_API + +#define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3) +#define RAW_CLOSURE_FUN_OFFSET (RAW_CLOSURE_CIF_OFFSET + 4) +#define RAW_CLOSURE_USER_DATA_OFFSET (RAW_CLOSURE_FUN_OFFSET + 4) +#define CIF_FLAGS_OFFSET 20 + + .align 4 +FFI_HIDDEN (ffi_closure_raw_SYSV) +.globl _ffi_closure_raw_SYSV + +_ffi_closure_raw_SYSV: +LFB3: + pushl %ebp +LCFI4: + movl %esp, %ebp +LCFI5: + pushl %esi +LCFI6: + subl $36, %esp + movl RAW_CLOSURE_CIF_OFFSET(%eax), %esi /* closure->cif */ + movl RAW_CLOSURE_USER_DATA_OFFSET(%eax), %edx /* closure->user_data */ + movl %edx, 12(%esp) /* user_data */ + leal 8(%ebp), %edx /* __builtin_dwarf_cfa () */ + movl %edx, 8(%esp) /* raw_args */ + leal -24(%ebp), %edx + movl %edx, 4(%esp) /* &res */ + movl %esi, (%esp) /* cif */ + call *RAW_CLOSURE_FUN_OFFSET(%eax) /* closure->fun */ + movl CIF_FLAGS_OFFSET(%esi), %eax /* rtype */ + cmpl $FFI_TYPE_INT, %eax + je Lrcls_retint + cmpl $FFI_TYPE_FLOAT, %eax + je Lrcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je Lrcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je Lrcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je Lrcls_retllong +Lrcls_epilogue: + addl $36, %esp + popl %esi + popl %ebp + ret +Lrcls_retint: + movl -24(%ebp), %eax + jmp Lrcls_epilogue +Lrcls_retfloat: + flds -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retdouble: + fldl -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retldouble: + fldt -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retllong: + movl -24(%ebp), %eax + movl -20(%ebp), %edx + jmp Lrcls_epilogue +LFE3: #endif - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI0-.LFB1 - .byte 0xe /* DW_CFA_def_cfa_offset */ - .byte 0x8 /* .uleb128 0x8 */ - .byte 0x85 /* DW_CFA_offset, column 0x5 */ - .byte 0x2 /* .uleb128 0x2 */ - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI1-.LCFI0 - .byte 0xd /* DW_CFA_def_cfa_register */ - .byte 0x5 /* .uleb128 0x5 */ - .align 4 -.LEFDE1: + +.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_ffi_closure_SYSV_inner$stub: + .indirect_symbol _ffi_closure_SYSV_inner + hlt ; hlt ; hlt ; hlt ; hlt + + +.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support +EH_frame1: + .set L$set$0,LECIE1-LSCIE1 + .long L$set$0 +LSCIE1: + .long 0x0 + .byte 0x1 + .ascii "zR\0" + .byte 0x1 + .byte 0x7c + .byte 0x8 + .byte 0x1 + .byte 0x10 + .byte 0xc + .byte 0x5 + .byte 0x4 + .byte 0x88 + .byte 0x1 + .align 2 +LECIE1: +.globl _ffi_call_SYSV.eh +_ffi_call_SYSV.eh: +LSFDE1: + .set L$set$1,LEFDE1-LASFDE1 + .long L$set$1 +LASFDE1: + .long LASFDE1-EH_frame1 + .long LFB1-. + .set L$set$2,LFE1-LFB1 + .long L$set$2 + .byte 0x0 + .byte 0x4 + .set L$set$3,LCFI0-LFB1 + .long L$set$3 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$4,LCFI1-LCFI0 + .long L$set$4 + .byte 0xd + .byte 0x4 + .align 2 +LEFDE1: +.globl _ffi_closure_SYSV.eh +_ffi_closure_SYSV.eh: +LSFDE2: + .set L$set$5,LEFDE2-LASFDE2 + .long L$set$5 +LASFDE2: + .long LASFDE2-EH_frame1 + .long LFB2-. + .set L$set$6,LFE2-LFB2 + .long L$set$6 + .byte 0x0 + .byte 0x4 + .set L$set$7,LCFI2-LFB2 + .long L$set$7 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$8,LCFI3-LCFI2 + .long L$set$8 + .byte 0xd + .byte 0x4 + .align 2 +LEFDE2: + +#if !FFI_NO_RAW_API + +.globl _ffi_closure_raw_SYSV.eh +_ffi_closure_raw_SYSV.eh: +LSFDE3: + .set L$set$10,LEFDE3-LASFDE3 + .long L$set$10 +LASFDE3: + .long LASFDE3-EH_frame1 + .long LFB3-. + .set L$set$11,LFE3-LFB3 + .long L$set$11 + .byte 0x0 + .byte 0x4 + .set L$set$12,LCFI4-LFB3 + .long L$set$12 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$13,LCFI5-LCFI4 + .long L$set$13 + .byte 0xd + .byte 0x4 + .byte 0x4 + .set L$set$14,LCFI6-LCFI5 + .long L$set$14 + .byte 0x85 + .byte 0x3 + .align 2 +LEFDE3: + #endif #endif /* ifndef __x86_64__ */ 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 Sun Sep 20 20:56:49 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 reformatting penalties. + use SF or DFmode move instead of DImode to avoid reformating penalties. Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves whenever possible (upper half does contain padding). */ @@ -621,4 +621,4 @@ return ret; } -#endif /* __x86_64__ */ +#endif /* __x86_64__ */ \ No newline at end of file Modified: python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Sun Sep 20 20:56:49 2009 @@ -27,543 +27,410 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ -//#ifndef __x86_64__ - #include #include #include -//void ffi_prep_args(char *stack, extended_cif *ecif); - -static inline int -retval_on_stack( - ffi_type* tp) -{ - if (tp->type == FFI_TYPE_STRUCT) - { -// int size = tp->size; - - if (tp->size > 8) - return 1; - - switch (tp->size) - { - case 1: case 2: case 4: case 8: - return 0; - default: - return 1; - } - } - - return 0; -} - /* ffi_prep_args is called by the assembly routine once stack space - has been allocated for the function's arguments */ -/*@-exportheader@*/ -extern void ffi_prep_args(char*, extended_cif*); -void -ffi_prep_args( - char* stack, - extended_cif* ecif) -/*@=exportheader@*/ -{ - register unsigned int i; - register void** p_argv = ecif->avalue; - register char* argp = stack; - register ffi_type** p_arg; - - if (retval_on_stack(ecif->cif->rtype)) - { - *(void**)argp = ecif->rvalue; - argp += 4; - } + has been allocated for the function's arguments */ - p_arg = ecif->cif->arg_types; - - for (i = ecif->cif->nargs; i > 0; i--, p_arg++, p_argv++) +void ffi_prep_args(char *stack, extended_cif *ecif) +{ + register unsigned int i; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if (ecif->cif->flags == FFI_TYPE_STRUCT) { - size_t z = (*p_arg)->size; - - /* Align if necessary */ - if ((sizeof(int) - 1) & (unsigned)argp) - argp = (char*)ALIGN(argp, sizeof(int)); - - if (z < sizeof(int)) - { - z = sizeof(int); - - switch ((*p_arg)->type) - { - case FFI_TYPE_SINT8: - *(signed int*)argp = (signed int)*(SINT8*)(*p_argv); - break; - - case FFI_TYPE_UINT8: - *(unsigned int*)argp = (unsigned int)*(UINT8*)(*p_argv); - break; - - case FFI_TYPE_SINT16: - *(signed int*)argp = (signed int)*(SINT16*)(*p_argv); - break; - - case FFI_TYPE_UINT16: - *(unsigned int*)argp = (unsigned int)*(UINT16*)(*p_argv); - break; - - case FFI_TYPE_SINT32: - *(signed int*)argp = (signed int)*(SINT32*)(*p_argv); - break; - - case FFI_TYPE_UINT32: - *(unsigned int*)argp = (unsigned int)*(UINT32*)(*p_argv); - break; - - case FFI_TYPE_STRUCT: - *(unsigned int*)argp = (unsigned int)*(UINT32*)(*p_argv); - break; - - default: - FFI_ASSERT(0); - break; - } - } - else - memcpy(argp, *p_argv, z); - - argp += z; - } + *(void **) argp = ecif->rvalue; + argp += 4; + } + + p_argv = ecif->avalue; + + for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; + i != 0; + i--, p_arg++) + { + size_t z; + + /* Align if necessary */ + if ((sizeof(int) - 1) & (unsigned) argp) + argp = (char *) ALIGN(argp, sizeof(int)); + + z = (*p_arg)->size; + if (z < sizeof(int)) + { + z = sizeof(int); + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv); + break; + + case FFI_TYPE_UINT8: + *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv); + break; + + case FFI_TYPE_SINT16: + *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv); + break; + + case FFI_TYPE_UINT16: + *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv); + break; + + case FFI_TYPE_SINT32: + *(signed int *) argp = (signed int)*(SINT32 *)(* p_argv); + break; + + case FFI_TYPE_UINT32: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + case FFI_TYPE_STRUCT: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + default: + FFI_ASSERT(0); + } + } + else + { + memcpy(argp, *p_argv, z); + } + p_argv++; + argp += z; + } + + return; } /* Perform machine dependent cif processing */ -ffi_status -ffi_prep_cif_machdep( - ffi_cif* cif) +ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { - /* Set the return type flag */ - switch (cif->rtype->type) - { -#if !defined(X86_WIN32) && !defined(X86_DARWIN) - case FFI_TYPE_STRUCT: + /* Set the return type flag */ + switch (cif->rtype->type) + { + case FFI_TYPE_VOID: +#ifdef X86 + case FFI_TYPE_STRUCT: + case FFI_TYPE_UINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT8: + case FFI_TYPE_SINT16: #endif - case FFI_TYPE_VOID: - case FFI_TYPE_SINT64: - case FFI_TYPE_FLOAT: - case FFI_TYPE_DOUBLE: - case FFI_TYPE_LONGDOUBLE: - cif->flags = (unsigned)cif->rtype->type; - break; - - case FFI_TYPE_UINT64: - cif->flags = FFI_TYPE_SINT64; - break; - -#if defined(X86_WIN32) || defined(X86_DARWIN) - case FFI_TYPE_STRUCT: - switch (cif->rtype->size) - { - case 1: - cif->flags = FFI_TYPE_SINT8; - break; - - case 2: - cif->flags = FFI_TYPE_SINT16; - break; - - case 4: - cif->flags = FFI_TYPE_INT; - break; - - case 8: - cif->flags = FFI_TYPE_SINT64; - break; - - default: - cif->flags = FFI_TYPE_STRUCT; - break; - } - - break; + + case FFI_TYPE_SINT64: + case FFI_TYPE_FLOAT: + case FFI_TYPE_DOUBLE: + case FFI_TYPE_LONGDOUBLE: + cif->flags = (unsigned) cif->rtype->type; + break; + + case FFI_TYPE_UINT64: + cif->flags = FFI_TYPE_SINT64; + break; + +#ifndef X86 + case FFI_TYPE_STRUCT: + if (cif->rtype->size == 1) + { + cif->flags = FFI_TYPE_SINT8; /* same as char size */ + } + else if (cif->rtype->size == 2) + { + cif->flags = FFI_TYPE_SINT16; /* same as short size */ + } + else if (cif->rtype->size == 4) + { + cif->flags = FFI_TYPE_INT; /* same as int type */ + } + else if (cif->rtype->size == 8) + { + cif->flags = FFI_TYPE_SINT64; /* same as int64 type */ + } + else + { + cif->flags = FFI_TYPE_STRUCT; + } + break; #endif - - default: - cif->flags = FFI_TYPE_INT; - break; - } - - /* Darwin: The stack needs to be aligned to a multiple of 16 bytes */ - cif->bytes = (cif->bytes + 15) & ~0xF; - - return FFI_OK; + + default: + cif->flags = FFI_TYPE_INT; + break; + } + +#ifdef X86_DARWIN + cif->bytes = (cif->bytes + 15) & ~0xF; +#endif + + return FFI_OK; } -/*@-declundef@*/ -/*@-exportheader@*/ -extern void -ffi_call_SYSV( - void (*)(char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)(void)); -/*@=declundef@*/ -/*@=exportheader@*/ +extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, + unsigned, unsigned, unsigned *, void (*fn)()); #ifdef X86_WIN32 -/*@-declundef@*/ -/*@-exportheader@*/ -extern void -ffi_call_STDCALL( - void (char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)(void)); -/*@=declundef@*/ -/*@=exportheader@*/ +extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, + unsigned, unsigned, unsigned *, void (*fn)()); + #endif /* X86_WIN32 */ -void -ffi_call( -/*@dependent@*/ ffi_cif* cif, - void (*fn)(void), -/*@out@*/ void* rvalue, -/*@dependent@*/ void** avalue) +void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) { - extended_cif ecif; - - ecif.cif = cif; - ecif.avalue = avalue; - - /* If the return value is a struct and we don't have a return - value address then we need to make one. */ - - if ((rvalue == NULL) && retval_on_stack(cif->rtype)) - { - /*@-sysunrecog@*/ - ecif.rvalue = alloca(cif->rtype->size); - /*@=sysunrecog@*/ - } - else - ecif.rvalue = rvalue; - - switch (cif->abi) - { - case FFI_SYSV: - /*@-usedef@*/ - /* To avoid changing the assembly code make sure the size of the argument - block is a multiple of 16. Then add 8 to compensate for local variables - in ffi_call_SYSV. */ - ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; - + extended_cif ecif; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->flags == FFI_TYPE_STRUCT)) + { + ecif.rvalue = alloca(cif->rtype->size); + } + else + ecif.rvalue = rvalue; + + + switch (cif->abi) + { + case FFI_SYSV: + ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, + fn); + break; #ifdef X86_WIN32 - case FFI_STDCALL: - /*@-usedef@*/ - ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + case FFI_STDCALL: + ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #endif /* X86_WIN32 */ - - default: - FFI_ASSERT(0); - break; - } + default: + FFI_ASSERT(0); + break; + } } -/** private members **/ -static void -ffi_closure_SYSV( - ffi_closure* closure) __attribute__((regparm(1))); - -#if !FFI_NO_RAW_API -static void -ffi_closure_raw_SYSV( - ffi_raw_closure* closure) __attribute__((regparm(1))); -#endif - -/*@-exportheader@*/ -static inline -void -ffi_prep_incoming_args_SYSV( - char* stack, - void** rvalue, - void** avalue, - ffi_cif* cif) -/*@=exportheader@*/ -{ - register unsigned int i; - register void** p_argv = avalue; - register char* argp = stack; - register ffi_type** p_arg; - - if (retval_on_stack(cif->rtype)) - { - *rvalue = *(void**)argp; - argp += 4; - } - - for (i = cif->nargs, p_arg = cif->arg_types; i > 0; i--, p_arg++, p_argv++) - { -// size_t z; - - /* Align if necessary */ - if ((sizeof(int) - 1) & (unsigned)argp) - argp = (char*)ALIGN(argp, sizeof(int)); +/** private members **/ -// z = (*p_arg)->size; +static void ffi_prep_incoming_args_SYSV (char *stack, void **ret, + void** args, ffi_cif* cif); +void FFI_HIDDEN ffi_closure_SYSV (ffi_closure *) +__attribute__ ((regparm(1))); +unsigned int FFI_HIDDEN ffi_closure_SYSV_inner (ffi_closure *, void **, void *) +__attribute__ ((regparm(1))); +void FFI_HIDDEN ffi_closure_raw_SYSV (ffi_raw_closure *) +__attribute__ ((regparm(1))); - /* because we're little endian, this is what it turns into. */ - *p_argv = (void*)argp; +/* This function is jumped to by the trampoline */ - argp += (*p_arg)->size; - } +unsigned int FFI_HIDDEN +ffi_closure_SYSV_inner (closure, respp, args) +ffi_closure *closure; +void **respp; +void *args; +{ + // our various things... + ffi_cif *cif; + void **arg_area; + + cif = closure->cif; + arg_area = (void**) alloca (cif->nargs * sizeof (void*)); + + /* this call will initialize ARG_AREA, such that each + * element in that array points to the corresponding + * value on the stack; and if the function returns + * a structure, it will re-set RESP to point to the + * structure return address. */ + + ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif); + + (closure->fun) (cif, *respp, arg_area, closure->user_data); + + return cif->flags; } -/* This function is jumped to by the trampoline */ -__attribute__((regparm(1))) static void -ffi_closure_SYSV( - ffi_closure* closure) +ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, void **avalue, + ffi_cif *cif) { - long double res; - ffi_cif* cif = closure->cif; - void** arg_area = (void**)alloca(cif->nargs * sizeof(void*)); - void* resp = (void*)&res; - void* args = __builtin_dwarf_cfa(); - - /* This call will initialize ARG_AREA, such that each - element in that array points to the corresponding - value on the stack; and if the function returns - a structure, it will reset RESP to point to the - structure return address. */ - ffi_prep_incoming_args_SYSV(args, (void**)&resp, arg_area, cif); - - (closure->fun)(cif, resp, arg_area, closure->user_data); - - /* now, do a generic return based on the value of rtype */ - if (cif->flags == FFI_TYPE_INT) - asm("movl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (cif->flags == FFI_TYPE_FLOAT) - asm("flds (%0)" - : : "r" (resp) : "st"); - else if (cif->flags == FFI_TYPE_DOUBLE) - asm("fldl (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (cif->flags == FFI_TYPE_LONGDOUBLE) - asm("fldt (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (cif->flags == FFI_TYPE_SINT64) - asm("movl 0(%0),%%eax;" - "movl 4(%0),%%edx" - : : "r" (resp) - : "eax", "edx"); - -#if defined(X86_WIN32) || defined(X86_DARWIN) - else if (cif->flags == FFI_TYPE_SINT8) /* 1-byte struct */ - asm("movsbl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (cif->flags == FFI_TYPE_SINT16) /* 2-bytes struct */ - asm("movswl (%0),%%eax" - : : "r" (resp) : "eax"); -#endif - - else if (cif->flags == FFI_TYPE_STRUCT) - asm("lea -8(%ebp),%esp;" - "pop %esi;" - "pop %edi;" - "pop %ebp;" - "ret $4"); + register unsigned int i; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if ( cif->flags == FFI_TYPE_STRUCT ) { + *rvalue = *(void **) argp; + argp += 4; + } + + p_argv = avalue; + + for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++) + { + size_t z; + + /* Align if necessary */ + if ((sizeof(int) - 1) & (unsigned) argp) { + argp = (char *) ALIGN(argp, sizeof(int)); + } + + z = (*p_arg)->size; + + /* because we're little endian, this is what it turns into. */ + + *p_argv = (void*) argp; + + p_argv++; + argp += z; + } + + return; } - /* How to make a trampoline. Derived from gcc/config/i386/i386.c. */ -#define FFI_INIT_TRAMPOLINE(TRAMP, FUN, CTX) \ - ({ \ - unsigned char* __tramp = (unsigned char*)(TRAMP); \ - unsigned int __fun = (unsigned int)(FUN); \ - unsigned int __ctx = (unsigned int)(CTX); \ - unsigned int __dis = __fun - ((unsigned int)__tramp + FFI_TRAMPOLINE_SIZE); \ - *(unsigned char*)&__tramp[0] = 0xb8; \ - *(unsigned int*)&__tramp[1] = __ctx; /* movl __ctx, %eax */ \ - *(unsigned char*)&__tramp[5] = 0xe9; \ - *(unsigned int*)&__tramp[6] = __dis; /* jmp __fun */ \ - }) + +#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \ +({ unsigned char *__tramp = (unsigned char*)(TRAMP); \ +unsigned int __fun = (unsigned int)(FUN); \ +unsigned int __ctx = (unsigned int)(CTX); \ +unsigned int __dis = __fun - (__ctx + FFI_TRAMPOLINE_SIZE); \ +*(unsigned char*) &__tramp[0] = 0xb8; \ +*(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \ +*(unsigned char *) &__tramp[5] = 0xe9; \ +*(unsigned int*) &__tramp[6] = __dis; /* jmp __fun */ \ +}) + /* the cif must already be prep'ed */ ffi_status -ffi_prep_closure( - ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,void**,void*), - void* user_data) +ffi_prep_closure (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data) { -// FFI_ASSERT(cif->abi == FFI_SYSV); if (cif->abi != FFI_SYSV) return FFI_BAD_ABI; - - FFI_INIT_TRAMPOLINE(closure->tramp, &ffi_closure_SYSV, (void*)closure); - - closure->cif = cif; - closure->user_data = user_data; - closure->fun = fun; - - return FFI_OK; + + FFI_INIT_TRAMPOLINE (&closure->tramp[0], \ + &ffi_closure_SYSV, \ + (void*)closure); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; } /* ------- Native raw API support -------------------------------- */ #if !FFI_NO_RAW_API -__attribute__((regparm(1))) -static void -ffi_closure_raw_SYSV( - ffi_raw_closure* closure) -{ - long double res; - ffi_raw* raw_args = (ffi_raw*)__builtin_dwarf_cfa(); - ffi_cif* cif = closure->cif; - unsigned short rtype = cif->flags; - void* resp = (void*)&res; - - (closure->fun)(cif, resp, raw_args, closure->user_data); - - /* now, do a generic return based on the value of rtype */ - if (rtype == FFI_TYPE_INT) - asm("movl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (rtype == FFI_TYPE_FLOAT) - asm("flds (%0)" - : : "r" (resp) : "st"); - else if (rtype == FFI_TYPE_DOUBLE) - asm("fldl (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (rtype == FFI_TYPE_LONGDOUBLE) - asm("fldt (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (rtype == FFI_TYPE_SINT64) - asm("movl 0(%0),%%eax;" - "movl 4(%0),%%edx" - : : "r" (resp) : "eax", "edx"); -} - ffi_status -ffi_prep_raw_closure( - ffi_raw_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), - void* user_data) -{ -// FFI_ASSERT (cif->abi == FFI_SYSV); - if (cif->abi != FFI_SYSV) - return FFI_BAD_ABI; - - int i; - -/* We currently don't support certain kinds of arguments for raw - closures. This should be implemented by a separate assembly language - routine, since it would require argument processing, something we - don't do now for performance. */ - for (i = cif->nargs - 1; i >= 0; i--) - { - FFI_ASSERT(cif->arg_types[i]->type != FFI_TYPE_STRUCT); - FFI_ASSERT(cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE); - } - - FFI_INIT_TRAMPOLINE(closure->tramp, &ffi_closure_raw_SYSV, (void*)closure); - - closure->cif = cif; - closure->user_data = user_data; - closure->fun = fun; - - return FFI_OK; +ffi_prep_raw_closure_loc (ffi_raw_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data, + void *codeloc) +{ + int i; + + FFI_ASSERT (cif->abi == FFI_SYSV); + + // we currently don't support certain kinds of arguments for raw + // closures. This should be implemented by a separate assembly language + // routine, since it would require argument processing, something we + // don't do now for performance. + + for (i = cif->nargs-1; i >= 0; i--) + { + FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_STRUCT); + FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE); + } + + + FFI_INIT_TRAMPOLINE (&closure->tramp[0], &ffi_closure_raw_SYSV, + codeloc); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; } static void -ffi_prep_args_raw( - char* stack, - extended_cif* ecif) +ffi_prep_args_raw(char *stack, extended_cif *ecif) { - memcpy(stack, ecif->avalue, ecif->cif->bytes); + memcpy (stack, ecif->avalue, ecif->cif->bytes); } -/* We borrow this routine from libffi (it must be changed, though, to - actually call the function passed in the first argument. as of - libffi-1.20, this is not the case.) */ -//extern void -//ffi_call_SYSV( -// void (*)(char *, extended_cif *), -///*@out@*/ extended_cif* , -// unsigned , -// unsigned , -//*@out@*/ unsigned* , -// void (*fn)()); +/* we borrow this routine from libffi (it must be changed, though, to + * actually call the function passed in the first argument. as of + * libffi-1.20, this is not the case.) + */ + +extern void +ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, unsigned, + unsigned, unsigned *, void (*fn)()); #ifdef X86_WIN32 extern void -ffi_call_STDCALL( - void (*)(char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)()); -#endif // X86_WIN32 +ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, unsigned, + unsigned, unsigned *, void (*fn)()); +#endif /* X86_WIN32 */ void -ffi_raw_call( -/*@dependent@*/ ffi_cif* cif, - void (*fn)(), -/*@out@*/ void* rvalue, -/*@dependent@*/ ffi_raw* fake_avalue) +ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue) { - extended_cif ecif; - void **avalue = (void **)fake_avalue; - - ecif.cif = cif; - ecif.avalue = avalue; - - /* If the return value is a struct and we don't have a return - value address then we need to make one */ - if ((rvalue == NULL) && retval_on_stack(cif->rtype)) - { - /*@-sysunrecog@*/ - ecif.rvalue = alloca(cif->rtype->size); - /*@=sysunrecog@*/ - } - else - ecif.rvalue = rvalue; - - switch (cif->abi) - { - case FFI_SYSV: - /*@-usedef@*/ - ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + extended_cif ecif; + void **avalue = (void **)fake_avalue; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->rtype->type == FFI_TYPE_STRUCT)) + { + ecif.rvalue = alloca(cif->rtype->size); + } + else + ecif.rvalue = rvalue; + + + switch (cif->abi) + { + case FFI_SYSV: + ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #ifdef X86_WIN32 - case FFI_STDCALL: - /*@-usedef@*/ - ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + case FFI_STDCALL: + ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #endif /* X86_WIN32 */ - default: - FFI_ASSERT(0); - break; + default: + FFI_ASSERT(0); + break; } } -#endif // !FFI_NO_RAW_API -//#endif // !__x86_64__ -#endif // __i386__ +#endif +#endif // __i386__ \ No newline at end of file From python-checkins at python.org Sun Sep 20 20:57:51 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 18:57:51 -0000 Subject: [Python-checkins] r74974 - in python/branches/py3k: Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S Modules/_ctypes/libffi_osx/x86/x86-darwin.S Modules/_ctypes/libffi_osx/x86/x86-ffi64.c Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Message-ID: Author: ronald.oussoren Date: Sun Sep 20 20:57:50 2009 New Revision: 74974 Log: Merged revisions 74972 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74972 | ronald.oussoren | 2009-09-20 20:54:16 +0200 (Sun, 20 Sep 2009) | 5 lines Merge a newer version of libffi_osx, based on the version of libffi in OSX 10.6.1. This fixes issue6918 ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-darwin.S python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Modified: python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S ============================================================================== --- python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S (original) +++ python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S Sun Sep 20 20:57:50 2009 @@ -1,7 +1,7 @@ #if defined(__ppc__) || defined(__ppc64__) /* ----------------------------------------------------------------------- - darwin.S - Copyright (c) 2000 John Hornkvist + ppc-darwin.S - Copyright (c) 2000 John Hornkvist Copyright (c) 2004 Free Software Foundation, Inc. PowerPC Assembly glue. @@ -294,7 +294,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -308,7 +308,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB0$non_lazy_ptr-. ; FDE initial location + .g_long LFB0-. ; FDE initial location .set L$set$3,LFE1-LFB0 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -338,10 +338,6 @@ .byte 0x1c ; uleb128 0x1c .align LOG2_GPR_BYTES LEFDE1: -.data - .align LOG2_GPR_BYTES -LLFB0$non_lazy_ptr: - .g_long LFB0 #if defined(__ppc64__) .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 Modified: python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h ============================================================================== --- python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h (original) +++ python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h Sun Sep 20 20:57:50 2009 @@ -22,7 +22,6 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ - #define L(x) x #define SF_ARG9 MODE_CHOICE(56,112) @@ -57,7 +56,6 @@ ((x) == FFI_TYPE_UINT32 || (x) == FFI_TYPE_SINT32 ||\ (x) == FFI_TYPE_INT || (x) == FFI_TYPE_FLOAT) - #if !defined(LIBFFI_ASM) enum { @@ -75,20 +73,6 @@ FLAG_RETVAL_REFERENCE = 1 << (31 - 4) }; - -void ffi_prep_args(extended_cif* inEcif, unsigned *const stack); - -typedef union -{ - float f; - double d; -} ffi_dblfl; - -int ffi_closure_helper_DARWIN( ffi_closure* closure, - void* rvalue, unsigned long* pgr, - ffi_dblfl* pfr); - - #if defined(__ppc64__) void ffi64_struct_to_ram_form(const ffi_type*, const char*, unsigned int*, const char*, unsigned int*, unsigned int*, char*, unsigned int*); @@ -96,11 +80,6 @@ unsigned int*, char*, unsigned int*, char*, unsigned int*); bool ffi64_stret_needs_ptr(const ffi_type* inType, unsigned short*, unsigned short*); -bool ffi64_struct_contains_fp(const ffi_type* inType); -unsigned int ffi64_data_size(const ffi_type* inType); - - - #endif -#endif // !defined(LIBFFI_ASM) +#endif // !defined(LIBFFI_ASM) \ No newline at end of file Modified: python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S ============================================================================== --- python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S (original) +++ python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S Sun Sep 20 20:57:50 2009 @@ -1,7 +1,7 @@ #if defined(__ppc__) /* ----------------------------------------------------------------------- - darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, + ppc-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, Inc. based on ppc_closure.S PowerPC Assembly glue. @@ -43,8 +43,8 @@ _ffi_closure_ASM: LFB1: - mflr r0 /* extract return address */ - stg r0,MODE_CHOICE(8,16)(r1) /* save return address */ + mflr r0 // Save return address + stg r0,SF_RETURN(r1) LCFI0: /* 24/48 bytes (Linkage Area) @@ -54,7 +54,7 @@ 176/232 total bytes */ /* skip over caller save area and keep stack aligned to 16/32. */ - stgu r1,-SF_ROUND(MODE_CHOICE(176,248))(r1) + stgu r1,-SF_ROUND(176)(r1) LCFI1: /* We want to build up an area for the parameters passed @@ -67,58 +67,44 @@ /* Save GPRs 3 - 10 (aligned to 4/8) in the parents outgoing area. */ - stg r3,MODE_CHOICE(200,304)(r1) - stg r4,MODE_CHOICE(204,312)(r1) - stg r5,MODE_CHOICE(208,320)(r1) - stg r6,MODE_CHOICE(212,328)(r1) - stg r7,MODE_CHOICE(216,336)(r1) - stg r8,MODE_CHOICE(220,344)(r1) - stg r9,MODE_CHOICE(224,352)(r1) - stg r10,MODE_CHOICE(228,360)(r1) + stg r3,200(r1) + stg r4,204(r1) + stg r5,208(r1) + stg r6,212(r1) + stg r7,216(r1) + stg r8,220(r1) + stg r9,224(r1) + stg r10,228(r1) /* Save FPRs 1 - 13. (aligned to 8) */ - stfd f1,MODE_CHOICE(56,112)(r1) - stfd f2,MODE_CHOICE(64,120)(r1) - stfd f3,MODE_CHOICE(72,128)(r1) - stfd f4,MODE_CHOICE(80,136)(r1) - stfd f5,MODE_CHOICE(88,144)(r1) - stfd f6,MODE_CHOICE(96,152)(r1) - stfd f7,MODE_CHOICE(104,160)(r1) - stfd f8,MODE_CHOICE(112,168)(r1) - stfd f9,MODE_CHOICE(120,176)(r1) - stfd f10,MODE_CHOICE(128,184)(r1) - stfd f11,MODE_CHOICE(136,192)(r1) - stfd f12,MODE_CHOICE(144,200)(r1) - stfd f13,MODE_CHOICE(152,208)(r1) - - /* Set up registers for the routine that actually does the work. - Get the context pointer from the trampoline. */ - mr r3,r11 - - /* Load the pointer to the result storage. */ - /* current stack frame size - ((4/8 * 4) + saved registers) */ - addi r4,r1,MODE_CHOICE(160,216) - - /* Load the pointer to the saved gpr registers. */ - addi r5,r1,MODE_CHOICE(200,304) - - /* Load the pointer to the saved fpr registers. */ - addi r6,r1,MODE_CHOICE(56,112) - - /* Make the call. */ + stfd f1,56(r1) + stfd f2,64(r1) + stfd f3,72(r1) + stfd f4,80(r1) + stfd f5,88(r1) + stfd f6,96(r1) + stfd f7,104(r1) + stfd f8,112(r1) + stfd f9,120(r1) + stfd f10,128(r1) + stfd f11,136(r1) + stfd f12,144(r1) + stfd f13,152(r1) + + // Set up registers for the routine that actually does the work. + mr r3,r11 // context pointer from the trampoline + addi r4,r1,160 // result storage + addi r5,r1,200 // saved GPRs + addi r6,r1,56 // saved FPRs bl Lffi_closure_helper_DARWIN$stub - /* Now r3 contains the return type - so use it to look up in a table + /* Now r3 contains the return type. Use it to look up in a table so we know how to deal with each type. */ - - /* Look the proper starting point in table - by using return type as offset. */ - addi r5,r1,MODE_CHOICE(160,216) // Get pointer to results area. - bl Lget_ret_type0_addr // Get pointer to Lret_type0 into LR. - mflr r4 // Move to r4. - slwi r3,r3,4 // Now multiply return type by 16. - add r3,r3,r4 // Add contents of table to table address. + addi r5,r1,160 // Copy result storage pointer. + bl Lget_ret_type0_addr // Get pointer to Lret_type0 into LR. + mflr r4 // Move to r4. + slwi r3,r3,4 // Multiply return type by 16. + add r3,r3,r4 // Add contents of table to table address. mtctr r3 bctr @@ -143,7 +129,7 @@ /* case FFI_TYPE_INT */ Lret_type1: - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop @@ -171,42 +157,42 @@ /* case FFI_TYPE_UINT8 */ Lret_type5: - lbz r3,MODE_CHOICE(3,7)(r5) + lbz r3,3(r5) b Lfinish nop nop /* case FFI_TYPE_SINT8 */ Lret_type6: - lbz r3,MODE_CHOICE(3,7)(r5) + lbz r3,3(r5) extsb r3,r3 b Lfinish nop /* case FFI_TYPE_UINT16 */ Lret_type7: - lhz r3,MODE_CHOICE(2,6)(r5) + lhz r3,2(r5) b Lfinish nop nop /* case FFI_TYPE_SINT16 */ Lret_type8: - lha r3,MODE_CHOICE(2,6)(r5) + lha r3,2(r5) b Lfinish nop nop /* case FFI_TYPE_UINT32 */ Lret_type9: // same as Lret_type1 - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop /* case FFI_TYPE_SINT32 */ Lret_type10: // same as Lret_type1 - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop @@ -227,7 +213,7 @@ /* case FFI_TYPE_STRUCT */ Lret_type13: - b MODE_CHOICE(Lfinish,Lret_struct) + b Lfinish nop nop nop @@ -239,12 +225,13 @@ // padded to 16 bytes. Lret_type14: lg r3,0(r5) + // fall through /* case done */ Lfinish: - addi r1,r1,SF_ROUND(MODE_CHOICE(176,248)) // Restore stack pointer. - lg r0,MODE_CHOICE(8,16)(r1) /* Get return address. */ - mtlr r0 /* Reset link register. */ + addi r1,r1,SF_ROUND(176) // Restore stack pointer. + lg r0,SF_RETURN(r1) // Restore return address. + mtlr r0 // Restore link register. blr /* END(ffi_closure_ASM) */ @@ -261,7 +248,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -275,7 +262,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB1$non_lazy_ptr-. ; FDE initial location + .g_long LFB1-. ; FDE initial location .set L$set$3,LFE1-LFB1 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -317,9 +304,5 @@ .indirect_symbol _ffi_closure_helper_DARWIN .g_long dyld_stub_binding_helper -.data - .align LOG2_GPR_BYTES -LLFB1$non_lazy_ptr: - .g_long LFB1 #endif // __ppc__ Modified: python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c ============================================================================== --- python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c (original) +++ python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c Sun Sep 20 20:57:50 2009 @@ -28,13 +28,13 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ -#include "ffi.h" -#include "ffi_common.h" +#include +#include #include #include #include -#include "ppc-darwin.h" +#include #include #if 0 @@ -42,17 +42,14 @@ #include // for sys_icache_invalidate() #endif -#else - -/* Explicit prototype instead of including a header to allow compilation - * on Tiger systems. - */ +#else #pragma weak sys_icache_invalidate extern void sys_icache_invalidate(void *start, size_t len); #endif + extern void ffi_closure_ASM(void); // The layout of a function descriptor. A C function pointer really @@ -760,9 +757,7 @@ // Flush the icache. Only necessary on Darwin. #if defined(POWERPC_DARWIN) - if (sys_icache_invalidate) { - sys_icache_invalidate(closure->tramp, FFI_TRAMPOLINE_SIZE); - } + sys_icache_invalidate(closure->tramp, FFI_TRAMPOLINE_SIZE); #else flush_range(closure->tramp, FFI_TRAMPOLINE_SIZE); #endif @@ -804,6 +799,12 @@ } ldu; #endif +typedef union +{ + float f; + double d; +} ffi_dblfl; + /* The trampoline invokes ffi_closure_ASM, and on entry, r11 holds the address of the closure. After storing the registers that could possibly contain parameters to be passed into the stack frame and setting up space @@ -829,7 +830,7 @@ unsigned int nf = 0; /* number of FPRs already used. */ unsigned int ng = 0; /* number of GPRs already used. */ ffi_cif* cif = closure->cif; - unsigned int avn = cif->nargs; + long avn = cif->nargs; void** avalue = alloca(cif->nargs * sizeof(void*)); ffi_type** arg_types = cif->arg_types; @@ -906,9 +907,9 @@ size_al = ALIGN(arg_types[i]->size, 8); if (size_al < 3) - avalue[i] = (char*)pgr + MODE_CHOICE(4,8) - size_al; + avalue[i] = (void*)pgr + MODE_CHOICE(4,8) - size_al; else - avalue[i] = (char*)pgr; + avalue[i] = (void*)pgr; ng += (size_al + 3) / sizeof(long); pgr += (size_al + 3) / sizeof(long); @@ -988,8 +989,8 @@ We use a union to pass the long double to avalue[i]. */ else if (nf == NUM_FPR_ARG_REGISTERS - 1) { - memcpy (&temp_ld.lb[0], pfr, sizeof(ldbits)); - memcpy (&temp_ld.lb[1], pgr + 2, sizeof(ldbits)); + memcpy (&temp_ld.lb[0], pfr, sizeof(temp_ld.lb[0])); + memcpy (&temp_ld.lb[1], pgr + 2, sizeof(temp_ld.lb[1])); avalue[i] = &temp_ld.ld; } #else Modified: python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S ============================================================================== --- python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S (original) +++ python/branches/py3k/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S Sun Sep 20 20:57:50 2009 @@ -1,7 +1,7 @@ #if defined(__ppc64__) /* ----------------------------------------------------------------------- - darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, + ppc64-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, Inc. based on ppc_closure.S PowerPC Assembly glue. @@ -297,8 +297,8 @@ // case done Lfinish: - lg r1,0(r1) // Restore stack pointer. - ld r31,-8(r1) // Restore registers we used. + lg r1,0(r1) // Restore stack pointer. + ld r31,-8(r1) // Restore registers we used. ld r30,-16(r1) lg r0,SF_RETURN(r1) // Get return address. mtlr r0 // Reset link register. @@ -318,7 +318,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -332,7 +332,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB1$non_lazy_ptr-. ; FDE initial location + .g_long LFB1-. ; FDE initial location .set L$set$3,LFE1-LFB1 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -374,11 +374,6 @@ .indirect_symbol _ffi_closure_helper_DARWIN .g_long dyld_stub_binding_helper -.data - .align LOG2_GPR_BYTES -LLFB1$non_lazy_ptr: - .g_long LFB1 - .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 .align LOG2_GPR_BYTES Modified: python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-darwin.S ============================================================================== --- python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-darwin.S (original) +++ python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-darwin.S Sun Sep 20 20:57:50 2009 @@ -46,23 +46,20 @@ .globl _ffi_prep_args -.align 4 + .align 4 .globl _ffi_call_SYSV _ffi_call_SYSV: -.LFB1: +LFB1: pushl %ebp -.LCFI0: +LCFI0: movl %esp,%ebp - subl $8,%esp - ASSERT_STACK_ALIGNED -.LCFI1: +LCFI1: + subl $8,%esp /* Make room for all of the new args. */ movl 16(%ebp),%ecx subl %ecx,%esp - ASSERT_STACK_ALIGNED - movl %esp,%eax /* Place all of the ffi_prep_args in position */ @@ -71,170 +68,349 @@ pushl %eax call *8(%ebp) - ASSERT_STACK_ALIGNED - /* Return stack to previous state and call the function */ - addl $16,%esp - - ASSERT_STACK_ALIGNED + addl $16,%esp call *28(%ebp) - - /* XXX: return returns return with 'ret $4', that upsets the stack! */ + + /* Remove the space we pushed for the args */ movl 16(%ebp),%ecx addl %ecx,%esp - /* Load %ecx with the return type code */ movl 20(%ebp),%ecx - /* If the return value pointer is NULL, assume no return value. */ cmpl $0,24(%ebp) - jne retint + jne Lretint /* Even if there is no space for the return value, we are obliged to handle floating-point values. */ cmpl $FFI_TYPE_FLOAT,%ecx - jne noretval + jne Lnoretval fstp %st(0) - jmp epilogue + jmp Lepilogue -retint: +Lretint: cmpl $FFI_TYPE_INT,%ecx - jne retfloat + jne Lretfloat /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx movl %eax,0(%ecx) - jmp epilogue + jmp Lepilogue -retfloat: +Lretfloat: cmpl $FFI_TYPE_FLOAT,%ecx - jne retdouble + jne Lretdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstps (%ecx) - jmp epilogue + jmp Lepilogue -retdouble: +Lretdouble: cmpl $FFI_TYPE_DOUBLE,%ecx - jne retlongdouble + jne Lretlongdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpl (%ecx) - jmp epilogue + jmp Lepilogue -retlongdouble: +Lretlongdouble: cmpl $FFI_TYPE_LONGDOUBLE,%ecx - jne retint64 + jne Lretint64 /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpt (%ecx) - jmp epilogue + jmp Lepilogue -retint64: +Lretint64: cmpl $FFI_TYPE_SINT64,%ecx - jne retstruct1b + jne Lretstruct1b /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx movl %eax,0(%ecx) movl %edx,4(%ecx) - jmp epilogue - -retstruct1b: - cmpl $FFI_TYPE_SINT8,%ecx - jne retstruct2b - movl 24(%ebp),%ecx - movb %al,0(%ecx) - jmp epilogue - -retstruct2b: - cmpl $FFI_TYPE_SINT16,%ecx - jne retstruct - movl 24(%ebp),%ecx - movw %ax,0(%ecx) - jmp epilogue + jmp Lepilogue -retstruct: - cmpl $FFI_TYPE_STRUCT,%ecx - jne noretval - /* Nothing to do! */ - - subl $4,%esp - - ASSERT_STACK_ALIGNED - - addl $8,%esp - movl %ebp, %esp - popl %ebp - ret - -noretval: -epilogue: - ASSERT_STACK_ALIGNED - addl $8, %esp +Lretstruct1b: + cmpl $FFI_TYPE_SINT8,%ecx + jne Lretstruct2b + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movb %al,0(%ecx) + jmp Lepilogue +Lretstruct2b: + cmpl $FFI_TYPE_SINT16,%ecx + jne Lretstruct + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movw %ax,0(%ecx) + jmp Lepilogue +Lretstruct: + cmpl $FFI_TYPE_STRUCT,%ecx + jne Lnoretval + /* Nothing to do! */ + addl $4,%esp + popl %ebp + ret + +Lnoretval: +Lepilogue: + addl $8,%esp movl %ebp,%esp popl %ebp ret +LFE1: .ffi_call_SYSV_end: -#if 0 - .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV -#endif -#if 0 - .section .eh_frame,EH_FRAME_FLAGS, at progbits -.Lframe1: - .long .LECIE1-.LSCIE1 /* Length of Common Information Entry */ -.LSCIE1: - .long 0x0 /* CIE Identifier Tag */ - .byte 0x1 /* CIE Version */ -#ifdef __PIC__ - .ascii "zR\0" /* CIE Augmentation */ -#else - .ascii "\0" /* CIE Augmentation */ -#endif - .byte 0x1 /* .uleb128 0x1; CIE Code Alignment Factor */ - .byte 0x7c /* .sleb128 -4; CIE Data Alignment Factor */ - .byte 0x8 /* CIE RA Column */ -#ifdef __PIC__ - .byte 0x1 /* .uleb128 0x1; Augmentation size */ - .byte 0x1b /* FDE Encoding (pcrel sdata4) */ -#endif - .byte 0xc /* DW_CFA_def_cfa */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x88 /* DW_CFA_offset, column 0x8 */ - .byte 0x1 /* .uleb128 0x1 */ - .align 4 -.LECIE1: -.LSFDE1: - .long .LEFDE1-.LASFDE1 /* FDE Length */ -.LASFDE1: - .long .LASFDE1-.Lframe1 /* FDE CIE offset */ -#ifdef __PIC__ - .long .LFB1-. /* FDE initial location */ -#else - .long .LFB1 /* FDE initial location */ -#endif - .long .ffi_call_SYSV_end-.LFB1 /* FDE address range */ -#ifdef __PIC__ - .byte 0x0 /* .uleb128 0x0; Augmentation size */ + .align 4 +FFI_HIDDEN (ffi_closure_SYSV) +.globl _ffi_closure_SYSV + +_ffi_closure_SYSV: +LFB2: + pushl %ebp +LCFI2: + movl %esp, %ebp +LCFI3: + subl $56, %esp + leal -40(%ebp), %edx + movl %edx, -12(%ebp) /* resp */ + leal 8(%ebp), %edx + movl %edx, 4(%esp) /* args = __builtin_dwarf_cfa () */ + leal -12(%ebp), %edx + movl %edx, (%esp) /* &resp */ + movl %ebx, 8(%esp) +LCFI7: + call L_ffi_closure_SYSV_inner$stub + movl 8(%esp), %ebx + movl -12(%ebp), %ecx + cmpl $FFI_TYPE_INT, %eax + je Lcls_retint + cmpl $FFI_TYPE_FLOAT, %eax + je Lcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je Lcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je Lcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je Lcls_retllong + cmpl $FFI_TYPE_SINT8, %eax + je Lcls_retstruct1 + cmpl $FFI_TYPE_SINT16, %eax + je Lcls_retstruct2 + cmpl $FFI_TYPE_STRUCT, %eax + je Lcls_retstruct +Lcls_epilogue: + movl %ebp, %esp + popl %ebp + ret +Lcls_retint: + movl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retfloat: + flds (%ecx) + jmp Lcls_epilogue +Lcls_retdouble: + fldl (%ecx) + jmp Lcls_epilogue +Lcls_retldouble: + fldt (%ecx) + jmp Lcls_epilogue +Lcls_retllong: + movl (%ecx), %eax + movl 4(%ecx), %edx + jmp Lcls_epilogue +Lcls_retstruct1: + movsbl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retstruct2: + movswl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retstruct: + lea -8(%ebp),%esp + movl %ebp, %esp + popl %ebp + ret $4 +LFE2: + +#if !FFI_NO_RAW_API + +#define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3) +#define RAW_CLOSURE_FUN_OFFSET (RAW_CLOSURE_CIF_OFFSET + 4) +#define RAW_CLOSURE_USER_DATA_OFFSET (RAW_CLOSURE_FUN_OFFSET + 4) +#define CIF_FLAGS_OFFSET 20 + + .align 4 +FFI_HIDDEN (ffi_closure_raw_SYSV) +.globl _ffi_closure_raw_SYSV + +_ffi_closure_raw_SYSV: +LFB3: + pushl %ebp +LCFI4: + movl %esp, %ebp +LCFI5: + pushl %esi +LCFI6: + subl $36, %esp + movl RAW_CLOSURE_CIF_OFFSET(%eax), %esi /* closure->cif */ + movl RAW_CLOSURE_USER_DATA_OFFSET(%eax), %edx /* closure->user_data */ + movl %edx, 12(%esp) /* user_data */ + leal 8(%ebp), %edx /* __builtin_dwarf_cfa () */ + movl %edx, 8(%esp) /* raw_args */ + leal -24(%ebp), %edx + movl %edx, 4(%esp) /* &res */ + movl %esi, (%esp) /* cif */ + call *RAW_CLOSURE_FUN_OFFSET(%eax) /* closure->fun */ + movl CIF_FLAGS_OFFSET(%esi), %eax /* rtype */ + cmpl $FFI_TYPE_INT, %eax + je Lrcls_retint + cmpl $FFI_TYPE_FLOAT, %eax + je Lrcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je Lrcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je Lrcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je Lrcls_retllong +Lrcls_epilogue: + addl $36, %esp + popl %esi + popl %ebp + ret +Lrcls_retint: + movl -24(%ebp), %eax + jmp Lrcls_epilogue +Lrcls_retfloat: + flds -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retdouble: + fldl -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retldouble: + fldt -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retllong: + movl -24(%ebp), %eax + movl -20(%ebp), %edx + jmp Lrcls_epilogue +LFE3: #endif - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI0-.LFB1 - .byte 0xe /* DW_CFA_def_cfa_offset */ - .byte 0x8 /* .uleb128 0x8 */ - .byte 0x85 /* DW_CFA_offset, column 0x5 */ - .byte 0x2 /* .uleb128 0x2 */ - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI1-.LCFI0 - .byte 0xd /* DW_CFA_def_cfa_register */ - .byte 0x5 /* .uleb128 0x5 */ - .align 4 -.LEFDE1: + +.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_ffi_closure_SYSV_inner$stub: + .indirect_symbol _ffi_closure_SYSV_inner + hlt ; hlt ; hlt ; hlt ; hlt + + +.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support +EH_frame1: + .set L$set$0,LECIE1-LSCIE1 + .long L$set$0 +LSCIE1: + .long 0x0 + .byte 0x1 + .ascii "zR\0" + .byte 0x1 + .byte 0x7c + .byte 0x8 + .byte 0x1 + .byte 0x10 + .byte 0xc + .byte 0x5 + .byte 0x4 + .byte 0x88 + .byte 0x1 + .align 2 +LECIE1: +.globl _ffi_call_SYSV.eh +_ffi_call_SYSV.eh: +LSFDE1: + .set L$set$1,LEFDE1-LASFDE1 + .long L$set$1 +LASFDE1: + .long LASFDE1-EH_frame1 + .long LFB1-. + .set L$set$2,LFE1-LFB1 + .long L$set$2 + .byte 0x0 + .byte 0x4 + .set L$set$3,LCFI0-LFB1 + .long L$set$3 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$4,LCFI1-LCFI0 + .long L$set$4 + .byte 0xd + .byte 0x4 + .align 2 +LEFDE1: +.globl _ffi_closure_SYSV.eh +_ffi_closure_SYSV.eh: +LSFDE2: + .set L$set$5,LEFDE2-LASFDE2 + .long L$set$5 +LASFDE2: + .long LASFDE2-EH_frame1 + .long LFB2-. + .set L$set$6,LFE2-LFB2 + .long L$set$6 + .byte 0x0 + .byte 0x4 + .set L$set$7,LCFI2-LFB2 + .long L$set$7 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$8,LCFI3-LCFI2 + .long L$set$8 + .byte 0xd + .byte 0x4 + .align 2 +LEFDE2: + +#if !FFI_NO_RAW_API + +.globl _ffi_closure_raw_SYSV.eh +_ffi_closure_raw_SYSV.eh: +LSFDE3: + .set L$set$10,LEFDE3-LASFDE3 + .long L$set$10 +LASFDE3: + .long LASFDE3-EH_frame1 + .long LFB3-. + .set L$set$11,LFE3-LFB3 + .long L$set$11 + .byte 0x0 + .byte 0x4 + .set L$set$12,LCFI4-LFB3 + .long L$set$12 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$13,LCFI5-LCFI4 + .long L$set$13 + .byte 0xd + .byte 0x4 + .byte 0x4 + .set L$set$14,LCFI6-LCFI5 + .long L$set$14 + .byte 0x85 + .byte 0x3 + .align 2 +LEFDE3: + #endif #endif /* ifndef __x86_64__ */ Modified: python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c ============================================================================== --- python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c (original) +++ python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c Sun Sep 20 20:57:50 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 reformatting penalties. + use SF or DFmode move instead of DImode to avoid reformating penalties. Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves whenever possible (upper half does contain padding). */ @@ -621,4 +621,4 @@ return ret; } -#endif /* __x86_64__ */ +#endif /* __x86_64__ */ \ No newline at end of file Modified: python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c ============================================================================== --- python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c (original) +++ python/branches/py3k/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Sun Sep 20 20:57:50 2009 @@ -27,543 +27,410 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ -//#ifndef __x86_64__ - #include #include #include -//void ffi_prep_args(char *stack, extended_cif *ecif); - -static inline int -retval_on_stack( - ffi_type* tp) -{ - if (tp->type == FFI_TYPE_STRUCT) - { -// int size = tp->size; - - if (tp->size > 8) - return 1; - - switch (tp->size) - { - case 1: case 2: case 4: case 8: - return 0; - default: - return 1; - } - } - - return 0; -} - /* ffi_prep_args is called by the assembly routine once stack space - has been allocated for the function's arguments */ -/*@-exportheader@*/ -extern void ffi_prep_args(char*, extended_cif*); -void -ffi_prep_args( - char* stack, - extended_cif* ecif) -/*@=exportheader@*/ -{ - register unsigned int i; - register void** p_argv = ecif->avalue; - register char* argp = stack; - register ffi_type** p_arg; - - if (retval_on_stack(ecif->cif->rtype)) - { - *(void**)argp = ecif->rvalue; - argp += 4; - } + has been allocated for the function's arguments */ - p_arg = ecif->cif->arg_types; - - for (i = ecif->cif->nargs; i > 0; i--, p_arg++, p_argv++) +void ffi_prep_args(char *stack, extended_cif *ecif) +{ + register unsigned int i; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if (ecif->cif->flags == FFI_TYPE_STRUCT) { - size_t z = (*p_arg)->size; - - /* Align if necessary */ - if ((sizeof(int) - 1) & (unsigned)argp) - argp = (char*)ALIGN(argp, sizeof(int)); - - if (z < sizeof(int)) - { - z = sizeof(int); - - switch ((*p_arg)->type) - { - case FFI_TYPE_SINT8: - *(signed int*)argp = (signed int)*(SINT8*)(*p_argv); - break; - - case FFI_TYPE_UINT8: - *(unsigned int*)argp = (unsigned int)*(UINT8*)(*p_argv); - break; - - case FFI_TYPE_SINT16: - *(signed int*)argp = (signed int)*(SINT16*)(*p_argv); - break; - - case FFI_TYPE_UINT16: - *(unsigned int*)argp = (unsigned int)*(UINT16*)(*p_argv); - break; - - case FFI_TYPE_SINT32: - *(signed int*)argp = (signed int)*(SINT32*)(*p_argv); - break; - - case FFI_TYPE_UINT32: - *(unsigned int*)argp = (unsigned int)*(UINT32*)(*p_argv); - break; - - case FFI_TYPE_STRUCT: - *(unsigned int*)argp = (unsigned int)*(UINT32*)(*p_argv); - break; - - default: - FFI_ASSERT(0); - break; - } - } - else - memcpy(argp, *p_argv, z); - - argp += z; - } + *(void **) argp = ecif->rvalue; + argp += 4; + } + + p_argv = ecif->avalue; + + for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; + i != 0; + i--, p_arg++) + { + size_t z; + + /* Align if necessary */ + if ((sizeof(int) - 1) & (unsigned) argp) + argp = (char *) ALIGN(argp, sizeof(int)); + + z = (*p_arg)->size; + if (z < sizeof(int)) + { + z = sizeof(int); + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv); + break; + + case FFI_TYPE_UINT8: + *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv); + break; + + case FFI_TYPE_SINT16: + *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv); + break; + + case FFI_TYPE_UINT16: + *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv); + break; + + case FFI_TYPE_SINT32: + *(signed int *) argp = (signed int)*(SINT32 *)(* p_argv); + break; + + case FFI_TYPE_UINT32: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + case FFI_TYPE_STRUCT: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + default: + FFI_ASSERT(0); + } + } + else + { + memcpy(argp, *p_argv, z); + } + p_argv++; + argp += z; + } + + return; } /* Perform machine dependent cif processing */ -ffi_status -ffi_prep_cif_machdep( - ffi_cif* cif) +ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { - /* Set the return type flag */ - switch (cif->rtype->type) - { -#if !defined(X86_WIN32) && !defined(X86_DARWIN) - case FFI_TYPE_STRUCT: + /* Set the return type flag */ + switch (cif->rtype->type) + { + case FFI_TYPE_VOID: +#ifdef X86 + case FFI_TYPE_STRUCT: + case FFI_TYPE_UINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT8: + case FFI_TYPE_SINT16: #endif - case FFI_TYPE_VOID: - case FFI_TYPE_SINT64: - case FFI_TYPE_FLOAT: - case FFI_TYPE_DOUBLE: - case FFI_TYPE_LONGDOUBLE: - cif->flags = (unsigned)cif->rtype->type; - break; - - case FFI_TYPE_UINT64: - cif->flags = FFI_TYPE_SINT64; - break; - -#if defined(X86_WIN32) || defined(X86_DARWIN) - case FFI_TYPE_STRUCT: - switch (cif->rtype->size) - { - case 1: - cif->flags = FFI_TYPE_SINT8; - break; - - case 2: - cif->flags = FFI_TYPE_SINT16; - break; - - case 4: - cif->flags = FFI_TYPE_INT; - break; - - case 8: - cif->flags = FFI_TYPE_SINT64; - break; - - default: - cif->flags = FFI_TYPE_STRUCT; - break; - } - - break; + + case FFI_TYPE_SINT64: + case FFI_TYPE_FLOAT: + case FFI_TYPE_DOUBLE: + case FFI_TYPE_LONGDOUBLE: + cif->flags = (unsigned) cif->rtype->type; + break; + + case FFI_TYPE_UINT64: + cif->flags = FFI_TYPE_SINT64; + break; + +#ifndef X86 + case FFI_TYPE_STRUCT: + if (cif->rtype->size == 1) + { + cif->flags = FFI_TYPE_SINT8; /* same as char size */ + } + else if (cif->rtype->size == 2) + { + cif->flags = FFI_TYPE_SINT16; /* same as short size */ + } + else if (cif->rtype->size == 4) + { + cif->flags = FFI_TYPE_INT; /* same as int type */ + } + else if (cif->rtype->size == 8) + { + cif->flags = FFI_TYPE_SINT64; /* same as int64 type */ + } + else + { + cif->flags = FFI_TYPE_STRUCT; + } + break; #endif - - default: - cif->flags = FFI_TYPE_INT; - break; - } - - /* Darwin: The stack needs to be aligned to a multiple of 16 bytes */ - cif->bytes = (cif->bytes + 15) & ~0xF; - - return FFI_OK; + + default: + cif->flags = FFI_TYPE_INT; + break; + } + +#ifdef X86_DARWIN + cif->bytes = (cif->bytes + 15) & ~0xF; +#endif + + return FFI_OK; } -/*@-declundef@*/ -/*@-exportheader@*/ -extern void -ffi_call_SYSV( - void (*)(char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)(void)); -/*@=declundef@*/ -/*@=exportheader@*/ +extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, + unsigned, unsigned, unsigned *, void (*fn)()); #ifdef X86_WIN32 -/*@-declundef@*/ -/*@-exportheader@*/ -extern void -ffi_call_STDCALL( - void (char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)(void)); -/*@=declundef@*/ -/*@=exportheader@*/ +extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, + unsigned, unsigned, unsigned *, void (*fn)()); + #endif /* X86_WIN32 */ -void -ffi_call( -/*@dependent@*/ ffi_cif* cif, - void (*fn)(void), -/*@out@*/ void* rvalue, -/*@dependent@*/ void** avalue) +void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) { - extended_cif ecif; - - ecif.cif = cif; - ecif.avalue = avalue; - - /* If the return value is a struct and we don't have a return - value address then we need to make one. */ - - if ((rvalue == NULL) && retval_on_stack(cif->rtype)) - { - /*@-sysunrecog@*/ - ecif.rvalue = alloca(cif->rtype->size); - /*@=sysunrecog@*/ - } - else - ecif.rvalue = rvalue; - - switch (cif->abi) - { - case FFI_SYSV: - /*@-usedef@*/ - /* To avoid changing the assembly code make sure the size of the argument - block is a multiple of 16. Then add 8 to compensate for local variables - in ffi_call_SYSV. */ - ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; - + extended_cif ecif; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->flags == FFI_TYPE_STRUCT)) + { + ecif.rvalue = alloca(cif->rtype->size); + } + else + ecif.rvalue = rvalue; + + + switch (cif->abi) + { + case FFI_SYSV: + ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, + fn); + break; #ifdef X86_WIN32 - case FFI_STDCALL: - /*@-usedef@*/ - ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + case FFI_STDCALL: + ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #endif /* X86_WIN32 */ - - default: - FFI_ASSERT(0); - break; - } + default: + FFI_ASSERT(0); + break; + } } -/** private members **/ -static void -ffi_closure_SYSV( - ffi_closure* closure) __attribute__((regparm(1))); - -#if !FFI_NO_RAW_API -static void -ffi_closure_raw_SYSV( - ffi_raw_closure* closure) __attribute__((regparm(1))); -#endif - -/*@-exportheader@*/ -static inline -void -ffi_prep_incoming_args_SYSV( - char* stack, - void** rvalue, - void** avalue, - ffi_cif* cif) -/*@=exportheader@*/ -{ - register unsigned int i; - register void** p_argv = avalue; - register char* argp = stack; - register ffi_type** p_arg; - - if (retval_on_stack(cif->rtype)) - { - *rvalue = *(void**)argp; - argp += 4; - } - - for (i = cif->nargs, p_arg = cif->arg_types; i > 0; i--, p_arg++, p_argv++) - { -// size_t z; - - /* Align if necessary */ - if ((sizeof(int) - 1) & (unsigned)argp) - argp = (char*)ALIGN(argp, sizeof(int)); +/** private members **/ -// z = (*p_arg)->size; +static void ffi_prep_incoming_args_SYSV (char *stack, void **ret, + void** args, ffi_cif* cif); +void FFI_HIDDEN ffi_closure_SYSV (ffi_closure *) +__attribute__ ((regparm(1))); +unsigned int FFI_HIDDEN ffi_closure_SYSV_inner (ffi_closure *, void **, void *) +__attribute__ ((regparm(1))); +void FFI_HIDDEN ffi_closure_raw_SYSV (ffi_raw_closure *) +__attribute__ ((regparm(1))); - /* because we're little endian, this is what it turns into. */ - *p_argv = (void*)argp; +/* This function is jumped to by the trampoline */ - argp += (*p_arg)->size; - } +unsigned int FFI_HIDDEN +ffi_closure_SYSV_inner (closure, respp, args) +ffi_closure *closure; +void **respp; +void *args; +{ + // our various things... + ffi_cif *cif; + void **arg_area; + + cif = closure->cif; + arg_area = (void**) alloca (cif->nargs * sizeof (void*)); + + /* this call will initialize ARG_AREA, such that each + * element in that array points to the corresponding + * value on the stack; and if the function returns + * a structure, it will re-set RESP to point to the + * structure return address. */ + + ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif); + + (closure->fun) (cif, *respp, arg_area, closure->user_data); + + return cif->flags; } -/* This function is jumped to by the trampoline */ -__attribute__((regparm(1))) static void -ffi_closure_SYSV( - ffi_closure* closure) +ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, void **avalue, + ffi_cif *cif) { - long double res; - ffi_cif* cif = closure->cif; - void** arg_area = (void**)alloca(cif->nargs * sizeof(void*)); - void* resp = (void*)&res; - void* args = __builtin_dwarf_cfa(); - - /* This call will initialize ARG_AREA, such that each - element in that array points to the corresponding - value on the stack; and if the function returns - a structure, it will reset RESP to point to the - structure return address. */ - ffi_prep_incoming_args_SYSV(args, (void**)&resp, arg_area, cif); - - (closure->fun)(cif, resp, arg_area, closure->user_data); - - /* now, do a generic return based on the value of rtype */ - if (cif->flags == FFI_TYPE_INT) - asm("movl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (cif->flags == FFI_TYPE_FLOAT) - asm("flds (%0)" - : : "r" (resp) : "st"); - else if (cif->flags == FFI_TYPE_DOUBLE) - asm("fldl (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (cif->flags == FFI_TYPE_LONGDOUBLE) - asm("fldt (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (cif->flags == FFI_TYPE_SINT64) - asm("movl 0(%0),%%eax;" - "movl 4(%0),%%edx" - : : "r" (resp) - : "eax", "edx"); - -#if defined(X86_WIN32) || defined(X86_DARWIN) - else if (cif->flags == FFI_TYPE_SINT8) /* 1-byte struct */ - asm("movsbl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (cif->flags == FFI_TYPE_SINT16) /* 2-bytes struct */ - asm("movswl (%0),%%eax" - : : "r" (resp) : "eax"); -#endif - - else if (cif->flags == FFI_TYPE_STRUCT) - asm("lea -8(%ebp),%esp;" - "pop %esi;" - "pop %edi;" - "pop %ebp;" - "ret $4"); + register unsigned int i; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if ( cif->flags == FFI_TYPE_STRUCT ) { + *rvalue = *(void **) argp; + argp += 4; + } + + p_argv = avalue; + + for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++) + { + size_t z; + + /* Align if necessary */ + if ((sizeof(int) - 1) & (unsigned) argp) { + argp = (char *) ALIGN(argp, sizeof(int)); + } + + z = (*p_arg)->size; + + /* because we're little endian, this is what it turns into. */ + + *p_argv = (void*) argp; + + p_argv++; + argp += z; + } + + return; } - /* How to make a trampoline. Derived from gcc/config/i386/i386.c. */ -#define FFI_INIT_TRAMPOLINE(TRAMP, FUN, CTX) \ - ({ \ - unsigned char* __tramp = (unsigned char*)(TRAMP); \ - unsigned int __fun = (unsigned int)(FUN); \ - unsigned int __ctx = (unsigned int)(CTX); \ - unsigned int __dis = __fun - ((unsigned int)__tramp + FFI_TRAMPOLINE_SIZE); \ - *(unsigned char*)&__tramp[0] = 0xb8; \ - *(unsigned int*)&__tramp[1] = __ctx; /* movl __ctx, %eax */ \ - *(unsigned char*)&__tramp[5] = 0xe9; \ - *(unsigned int*)&__tramp[6] = __dis; /* jmp __fun */ \ - }) + +#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \ +({ unsigned char *__tramp = (unsigned char*)(TRAMP); \ +unsigned int __fun = (unsigned int)(FUN); \ +unsigned int __ctx = (unsigned int)(CTX); \ +unsigned int __dis = __fun - (__ctx + FFI_TRAMPOLINE_SIZE); \ +*(unsigned char*) &__tramp[0] = 0xb8; \ +*(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \ +*(unsigned char *) &__tramp[5] = 0xe9; \ +*(unsigned int*) &__tramp[6] = __dis; /* jmp __fun */ \ +}) + /* the cif must already be prep'ed */ ffi_status -ffi_prep_closure( - ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,void**,void*), - void* user_data) +ffi_prep_closure (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data) { -// FFI_ASSERT(cif->abi == FFI_SYSV); if (cif->abi != FFI_SYSV) return FFI_BAD_ABI; - - FFI_INIT_TRAMPOLINE(closure->tramp, &ffi_closure_SYSV, (void*)closure); - - closure->cif = cif; - closure->user_data = user_data; - closure->fun = fun; - - return FFI_OK; + + FFI_INIT_TRAMPOLINE (&closure->tramp[0], \ + &ffi_closure_SYSV, \ + (void*)closure); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; } /* ------- Native raw API support -------------------------------- */ #if !FFI_NO_RAW_API -__attribute__((regparm(1))) -static void -ffi_closure_raw_SYSV( - ffi_raw_closure* closure) -{ - long double res; - ffi_raw* raw_args = (ffi_raw*)__builtin_dwarf_cfa(); - ffi_cif* cif = closure->cif; - unsigned short rtype = cif->flags; - void* resp = (void*)&res; - - (closure->fun)(cif, resp, raw_args, closure->user_data); - - /* now, do a generic return based on the value of rtype */ - if (rtype == FFI_TYPE_INT) - asm("movl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (rtype == FFI_TYPE_FLOAT) - asm("flds (%0)" - : : "r" (resp) : "st"); - else if (rtype == FFI_TYPE_DOUBLE) - asm("fldl (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (rtype == FFI_TYPE_LONGDOUBLE) - asm("fldt (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (rtype == FFI_TYPE_SINT64) - asm("movl 0(%0),%%eax;" - "movl 4(%0),%%edx" - : : "r" (resp) : "eax", "edx"); -} - ffi_status -ffi_prep_raw_closure( - ffi_raw_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), - void* user_data) -{ -// FFI_ASSERT (cif->abi == FFI_SYSV); - if (cif->abi != FFI_SYSV) - return FFI_BAD_ABI; - - int i; - -/* We currently don't support certain kinds of arguments for raw - closures. This should be implemented by a separate assembly language - routine, since it would require argument processing, something we - don't do now for performance. */ - for (i = cif->nargs - 1; i >= 0; i--) - { - FFI_ASSERT(cif->arg_types[i]->type != FFI_TYPE_STRUCT); - FFI_ASSERT(cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE); - } - - FFI_INIT_TRAMPOLINE(closure->tramp, &ffi_closure_raw_SYSV, (void*)closure); - - closure->cif = cif; - closure->user_data = user_data; - closure->fun = fun; - - return FFI_OK; +ffi_prep_raw_closure_loc (ffi_raw_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data, + void *codeloc) +{ + int i; + + FFI_ASSERT (cif->abi == FFI_SYSV); + + // we currently don't support certain kinds of arguments for raw + // closures. This should be implemented by a separate assembly language + // routine, since it would require argument processing, something we + // don't do now for performance. + + for (i = cif->nargs-1; i >= 0; i--) + { + FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_STRUCT); + FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE); + } + + + FFI_INIT_TRAMPOLINE (&closure->tramp[0], &ffi_closure_raw_SYSV, + codeloc); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; } static void -ffi_prep_args_raw( - char* stack, - extended_cif* ecif) +ffi_prep_args_raw(char *stack, extended_cif *ecif) { - memcpy(stack, ecif->avalue, ecif->cif->bytes); + memcpy (stack, ecif->avalue, ecif->cif->bytes); } -/* We borrow this routine from libffi (it must be changed, though, to - actually call the function passed in the first argument. as of - libffi-1.20, this is not the case.) */ -//extern void -//ffi_call_SYSV( -// void (*)(char *, extended_cif *), -///*@out@*/ extended_cif* , -// unsigned , -// unsigned , -//*@out@*/ unsigned* , -// void (*fn)()); +/* we borrow this routine from libffi (it must be changed, though, to + * actually call the function passed in the first argument. as of + * libffi-1.20, this is not the case.) + */ + +extern void +ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, unsigned, + unsigned, unsigned *, void (*fn)()); #ifdef X86_WIN32 extern void -ffi_call_STDCALL( - void (*)(char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)()); -#endif // X86_WIN32 +ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, unsigned, + unsigned, unsigned *, void (*fn)()); +#endif /* X86_WIN32 */ void -ffi_raw_call( -/*@dependent@*/ ffi_cif* cif, - void (*fn)(), -/*@out@*/ void* rvalue, -/*@dependent@*/ ffi_raw* fake_avalue) +ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue) { - extended_cif ecif; - void **avalue = (void **)fake_avalue; - - ecif.cif = cif; - ecif.avalue = avalue; - - /* If the return value is a struct and we don't have a return - value address then we need to make one */ - if ((rvalue == NULL) && retval_on_stack(cif->rtype)) - { - /*@-sysunrecog@*/ - ecif.rvalue = alloca(cif->rtype->size); - /*@=sysunrecog@*/ - } - else - ecif.rvalue = rvalue; - - switch (cif->abi) - { - case FFI_SYSV: - /*@-usedef@*/ - ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + extended_cif ecif; + void **avalue = (void **)fake_avalue; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->rtype->type == FFI_TYPE_STRUCT)) + { + ecif.rvalue = alloca(cif->rtype->size); + } + else + ecif.rvalue = rvalue; + + + switch (cif->abi) + { + case FFI_SYSV: + ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #ifdef X86_WIN32 - case FFI_STDCALL: - /*@-usedef@*/ - ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + case FFI_STDCALL: + ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #endif /* X86_WIN32 */ - default: - FFI_ASSERT(0); - break; + default: + FFI_ASSERT(0); + break; } } -#endif // !FFI_NO_RAW_API -//#endif // !__x86_64__ -#endif // __i386__ +#endif +#endif // __i386__ \ No newline at end of file From python-checkins at python.org Sun Sep 20 20:58:52 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 18:58:52 -0000 Subject: [Python-checkins] r74975 - in python/branches/release31-maint: Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S Modules/_ctypes/libffi_osx/x86/x86-darwin.S Modules/_ctypes/libffi_osx/x86/x86-ffi64.c Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Message-ID: Author: ronald.oussoren Date: Sun Sep 20 20:58:52 2009 New Revision: 74975 Log: Merged revisions 74974 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74974 | ronald.oussoren | 2009-09-20 20:57:50 +0200 (Sun, 20 Sep 2009) | 12 lines Merged revisions 74972 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74972 | ronald.oussoren | 2009-09-20 20:54:16 +0200 (Sun, 20 Sep 2009) | 5 lines Merge a newer version of libffi_osx, based on the version of libffi in OSX 10.6.1. This fixes issue6918 ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-darwin.S python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Modified: python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S (original) +++ python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.S Sun Sep 20 20:58:52 2009 @@ -1,7 +1,7 @@ #if defined(__ppc__) || defined(__ppc64__) /* ----------------------------------------------------------------------- - darwin.S - Copyright (c) 2000 John Hornkvist + ppc-darwin.S - Copyright (c) 2000 John Hornkvist Copyright (c) 2004 Free Software Foundation, Inc. PowerPC Assembly glue. @@ -294,7 +294,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -308,7 +308,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB0$non_lazy_ptr-. ; FDE initial location + .g_long LFB0-. ; FDE initial location .set L$set$3,LFE1-LFB0 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -338,10 +338,6 @@ .byte 0x1c ; uleb128 0x1c .align LOG2_GPR_BYTES LEFDE1: -.data - .align LOG2_GPR_BYTES -LLFB0$non_lazy_ptr: - .g_long LFB0 #if defined(__ppc64__) .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 Modified: python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h (original) +++ python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin.h Sun Sep 20 20:58:52 2009 @@ -22,7 +22,6 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ - #define L(x) x #define SF_ARG9 MODE_CHOICE(56,112) @@ -57,7 +56,6 @@ ((x) == FFI_TYPE_UINT32 || (x) == FFI_TYPE_SINT32 ||\ (x) == FFI_TYPE_INT || (x) == FFI_TYPE_FLOAT) - #if !defined(LIBFFI_ASM) enum { @@ -75,20 +73,6 @@ FLAG_RETVAL_REFERENCE = 1 << (31 - 4) }; - -void ffi_prep_args(extended_cif* inEcif, unsigned *const stack); - -typedef union -{ - float f; - double d; -} ffi_dblfl; - -int ffi_closure_helper_DARWIN( ffi_closure* closure, - void* rvalue, unsigned long* pgr, - ffi_dblfl* pfr); - - #if defined(__ppc64__) void ffi64_struct_to_ram_form(const ffi_type*, const char*, unsigned int*, const char*, unsigned int*, unsigned int*, char*, unsigned int*); @@ -96,11 +80,6 @@ unsigned int*, char*, unsigned int*, char*, unsigned int*); bool ffi64_stret_needs_ptr(const ffi_type* inType, unsigned short*, unsigned short*); -bool ffi64_struct_contains_fp(const ffi_type* inType); -unsigned int ffi64_data_size(const ffi_type* inType); - - - #endif -#endif // !defined(LIBFFI_ASM) +#endif // !defined(LIBFFI_ASM) \ No newline at end of file Modified: python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S (original) +++ python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-darwin_closure.S Sun Sep 20 20:58:52 2009 @@ -1,7 +1,7 @@ #if defined(__ppc__) /* ----------------------------------------------------------------------- - darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, + ppc-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, Inc. based on ppc_closure.S PowerPC Assembly glue. @@ -43,8 +43,8 @@ _ffi_closure_ASM: LFB1: - mflr r0 /* extract return address */ - stg r0,MODE_CHOICE(8,16)(r1) /* save return address */ + mflr r0 // Save return address + stg r0,SF_RETURN(r1) LCFI0: /* 24/48 bytes (Linkage Area) @@ -54,7 +54,7 @@ 176/232 total bytes */ /* skip over caller save area and keep stack aligned to 16/32. */ - stgu r1,-SF_ROUND(MODE_CHOICE(176,248))(r1) + stgu r1,-SF_ROUND(176)(r1) LCFI1: /* We want to build up an area for the parameters passed @@ -67,58 +67,44 @@ /* Save GPRs 3 - 10 (aligned to 4/8) in the parents outgoing area. */ - stg r3,MODE_CHOICE(200,304)(r1) - stg r4,MODE_CHOICE(204,312)(r1) - stg r5,MODE_CHOICE(208,320)(r1) - stg r6,MODE_CHOICE(212,328)(r1) - stg r7,MODE_CHOICE(216,336)(r1) - stg r8,MODE_CHOICE(220,344)(r1) - stg r9,MODE_CHOICE(224,352)(r1) - stg r10,MODE_CHOICE(228,360)(r1) + stg r3,200(r1) + stg r4,204(r1) + stg r5,208(r1) + stg r6,212(r1) + stg r7,216(r1) + stg r8,220(r1) + stg r9,224(r1) + stg r10,228(r1) /* Save FPRs 1 - 13. (aligned to 8) */ - stfd f1,MODE_CHOICE(56,112)(r1) - stfd f2,MODE_CHOICE(64,120)(r1) - stfd f3,MODE_CHOICE(72,128)(r1) - stfd f4,MODE_CHOICE(80,136)(r1) - stfd f5,MODE_CHOICE(88,144)(r1) - stfd f6,MODE_CHOICE(96,152)(r1) - stfd f7,MODE_CHOICE(104,160)(r1) - stfd f8,MODE_CHOICE(112,168)(r1) - stfd f9,MODE_CHOICE(120,176)(r1) - stfd f10,MODE_CHOICE(128,184)(r1) - stfd f11,MODE_CHOICE(136,192)(r1) - stfd f12,MODE_CHOICE(144,200)(r1) - stfd f13,MODE_CHOICE(152,208)(r1) - - /* Set up registers for the routine that actually does the work. - Get the context pointer from the trampoline. */ - mr r3,r11 - - /* Load the pointer to the result storage. */ - /* current stack frame size - ((4/8 * 4) + saved registers) */ - addi r4,r1,MODE_CHOICE(160,216) - - /* Load the pointer to the saved gpr registers. */ - addi r5,r1,MODE_CHOICE(200,304) - - /* Load the pointer to the saved fpr registers. */ - addi r6,r1,MODE_CHOICE(56,112) - - /* Make the call. */ + stfd f1,56(r1) + stfd f2,64(r1) + stfd f3,72(r1) + stfd f4,80(r1) + stfd f5,88(r1) + stfd f6,96(r1) + stfd f7,104(r1) + stfd f8,112(r1) + stfd f9,120(r1) + stfd f10,128(r1) + stfd f11,136(r1) + stfd f12,144(r1) + stfd f13,152(r1) + + // Set up registers for the routine that actually does the work. + mr r3,r11 // context pointer from the trampoline + addi r4,r1,160 // result storage + addi r5,r1,200 // saved GPRs + addi r6,r1,56 // saved FPRs bl Lffi_closure_helper_DARWIN$stub - /* Now r3 contains the return type - so use it to look up in a table + /* Now r3 contains the return type. Use it to look up in a table so we know how to deal with each type. */ - - /* Look the proper starting point in table - by using return type as offset. */ - addi r5,r1,MODE_CHOICE(160,216) // Get pointer to results area. - bl Lget_ret_type0_addr // Get pointer to Lret_type0 into LR. - mflr r4 // Move to r4. - slwi r3,r3,4 // Now multiply return type by 16. - add r3,r3,r4 // Add contents of table to table address. + addi r5,r1,160 // Copy result storage pointer. + bl Lget_ret_type0_addr // Get pointer to Lret_type0 into LR. + mflr r4 // Move to r4. + slwi r3,r3,4 // Multiply return type by 16. + add r3,r3,r4 // Add contents of table to table address. mtctr r3 bctr @@ -143,7 +129,7 @@ /* case FFI_TYPE_INT */ Lret_type1: - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop @@ -171,42 +157,42 @@ /* case FFI_TYPE_UINT8 */ Lret_type5: - lbz r3,MODE_CHOICE(3,7)(r5) + lbz r3,3(r5) b Lfinish nop nop /* case FFI_TYPE_SINT8 */ Lret_type6: - lbz r3,MODE_CHOICE(3,7)(r5) + lbz r3,3(r5) extsb r3,r3 b Lfinish nop /* case FFI_TYPE_UINT16 */ Lret_type7: - lhz r3,MODE_CHOICE(2,6)(r5) + lhz r3,2(r5) b Lfinish nop nop /* case FFI_TYPE_SINT16 */ Lret_type8: - lha r3,MODE_CHOICE(2,6)(r5) + lha r3,2(r5) b Lfinish nop nop /* case FFI_TYPE_UINT32 */ Lret_type9: // same as Lret_type1 - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop /* case FFI_TYPE_SINT32 */ Lret_type10: // same as Lret_type1 - lwz r3,MODE_CHOICE(0,4)(r5) + lwz r3,0(r5) b Lfinish nop nop @@ -227,7 +213,7 @@ /* case FFI_TYPE_STRUCT */ Lret_type13: - b MODE_CHOICE(Lfinish,Lret_struct) + b Lfinish nop nop nop @@ -239,12 +225,13 @@ // padded to 16 bytes. Lret_type14: lg r3,0(r5) + // fall through /* case done */ Lfinish: - addi r1,r1,SF_ROUND(MODE_CHOICE(176,248)) // Restore stack pointer. - lg r0,MODE_CHOICE(8,16)(r1) /* Get return address. */ - mtlr r0 /* Reset link register. */ + addi r1,r1,SF_ROUND(176) // Restore stack pointer. + lg r0,SF_RETURN(r1) // Restore return address. + mtlr r0 // Restore link register. blr /* END(ffi_closure_ASM) */ @@ -261,7 +248,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -275,7 +262,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB1$non_lazy_ptr-. ; FDE initial location + .g_long LFB1-. ; FDE initial location .set L$set$3,LFE1-LFB1 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -317,9 +304,5 @@ .indirect_symbol _ffi_closure_helper_DARWIN .g_long dyld_stub_binding_helper -.data - .align LOG2_GPR_BYTES -LLFB1$non_lazy_ptr: - .g_long LFB1 #endif // __ppc__ Modified: python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c (original) +++ python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c Sun Sep 20 20:58:52 2009 @@ -28,13 +28,13 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ -#include "ffi.h" -#include "ffi_common.h" +#include +#include #include #include #include -#include "ppc-darwin.h" +#include #include #if 0 @@ -42,17 +42,14 @@ #include // for sys_icache_invalidate() #endif -#else - -/* Explicit prototype instead of including a header to allow compilation - * on Tiger systems. - */ +#else #pragma weak sys_icache_invalidate extern void sys_icache_invalidate(void *start, size_t len); #endif + extern void ffi_closure_ASM(void); // The layout of a function descriptor. A C function pointer really @@ -760,9 +757,7 @@ // Flush the icache. Only necessary on Darwin. #if defined(POWERPC_DARWIN) - if (sys_icache_invalidate) { - sys_icache_invalidate(closure->tramp, FFI_TRAMPOLINE_SIZE); - } + sys_icache_invalidate(closure->tramp, FFI_TRAMPOLINE_SIZE); #else flush_range(closure->tramp, FFI_TRAMPOLINE_SIZE); #endif @@ -804,6 +799,12 @@ } ldu; #endif +typedef union +{ + float f; + double d; +} ffi_dblfl; + /* The trampoline invokes ffi_closure_ASM, and on entry, r11 holds the address of the closure. After storing the registers that could possibly contain parameters to be passed into the stack frame and setting up space @@ -829,7 +830,7 @@ unsigned int nf = 0; /* number of FPRs already used. */ unsigned int ng = 0; /* number of GPRs already used. */ ffi_cif* cif = closure->cif; - unsigned int avn = cif->nargs; + long avn = cif->nargs; void** avalue = alloca(cif->nargs * sizeof(void*)); ffi_type** arg_types = cif->arg_types; @@ -906,9 +907,9 @@ size_al = ALIGN(arg_types[i]->size, 8); if (size_al < 3) - avalue[i] = (char*)pgr + MODE_CHOICE(4,8) - size_al; + avalue[i] = (void*)pgr + MODE_CHOICE(4,8) - size_al; else - avalue[i] = (char*)pgr; + avalue[i] = (void*)pgr; ng += (size_al + 3) / sizeof(long); pgr += (size_al + 3) / sizeof(long); @@ -988,8 +989,8 @@ We use a union to pass the long double to avalue[i]. */ else if (nf == NUM_FPR_ARG_REGISTERS - 1) { - memcpy (&temp_ld.lb[0], pfr, sizeof(ldbits)); - memcpy (&temp_ld.lb[1], pgr + 2, sizeof(ldbits)); + memcpy (&temp_ld.lb[0], pfr, sizeof(temp_ld.lb[0])); + memcpy (&temp_ld.lb[1], pgr + 2, sizeof(temp_ld.lb[1])); avalue[i] = &temp_ld.ld; } #else Modified: python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S (original) +++ python/branches/release31-maint/Modules/_ctypes/libffi_osx/powerpc/ppc64-darwin_closure.S Sun Sep 20 20:58:52 2009 @@ -1,7 +1,7 @@ #if defined(__ppc64__) /* ----------------------------------------------------------------------- - darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, + ppc64-darwin_closure.S - Copyright (c) 2002, 2003, 2004, Free Software Foundation, Inc. based on ppc_closure.S PowerPC Assembly glue. @@ -297,8 +297,8 @@ // case done Lfinish: - lg r1,0(r1) // Restore stack pointer. - ld r31,-8(r1) // Restore registers we used. + lg r1,0(r1) // Restore stack pointer. + ld r31,-8(r1) // Restore registers we used. ld r30,-16(r1) lg r0,SF_RETURN(r1) // Get return address. mtlr r0 // Reset link register. @@ -318,7 +318,7 @@ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .byte 0x1 ; uleb128 0x1; Augmentation size - .byte 0x90 ; FDE Encoding (indirect pcrel) + .byte 0x10 ; FDE Encoding (pcrel) .byte 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 @@ -332,7 +332,7 @@ LASFDE1: .long LASFDE1-EH_frame1 ; FDE CIE offset - .g_long LLFB1$non_lazy_ptr-. ; FDE initial location + .g_long LFB1-. ; FDE initial location .set L$set$3,LFE1-LFB1 .g_long L$set$3 ; FDE address range .byte 0x0 ; uleb128 0x0; Augmentation size @@ -374,11 +374,6 @@ .indirect_symbol _ffi_closure_helper_DARWIN .g_long dyld_stub_binding_helper -.data - .align LOG2_GPR_BYTES -LLFB1$non_lazy_ptr: - .g_long LFB1 - .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 .align LOG2_GPR_BYTES Modified: python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-darwin.S ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-darwin.S (original) +++ python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-darwin.S Sun Sep 20 20:58:52 2009 @@ -46,23 +46,20 @@ .globl _ffi_prep_args -.align 4 + .align 4 .globl _ffi_call_SYSV _ffi_call_SYSV: -.LFB1: +LFB1: pushl %ebp -.LCFI0: +LCFI0: movl %esp,%ebp - subl $8,%esp - ASSERT_STACK_ALIGNED -.LCFI1: +LCFI1: + subl $8,%esp /* Make room for all of the new args. */ movl 16(%ebp),%ecx subl %ecx,%esp - ASSERT_STACK_ALIGNED - movl %esp,%eax /* Place all of the ffi_prep_args in position */ @@ -71,170 +68,349 @@ pushl %eax call *8(%ebp) - ASSERT_STACK_ALIGNED - /* Return stack to previous state and call the function */ - addl $16,%esp - - ASSERT_STACK_ALIGNED + addl $16,%esp call *28(%ebp) - - /* XXX: return returns return with 'ret $4', that upsets the stack! */ + + /* Remove the space we pushed for the args */ movl 16(%ebp),%ecx addl %ecx,%esp - /* Load %ecx with the return type code */ movl 20(%ebp),%ecx - /* If the return value pointer is NULL, assume no return value. */ cmpl $0,24(%ebp) - jne retint + jne Lretint /* Even if there is no space for the return value, we are obliged to handle floating-point values. */ cmpl $FFI_TYPE_FLOAT,%ecx - jne noretval + jne Lnoretval fstp %st(0) - jmp epilogue + jmp Lepilogue -retint: +Lretint: cmpl $FFI_TYPE_INT,%ecx - jne retfloat + jne Lretfloat /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx movl %eax,0(%ecx) - jmp epilogue + jmp Lepilogue -retfloat: +Lretfloat: cmpl $FFI_TYPE_FLOAT,%ecx - jne retdouble + jne Lretdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstps (%ecx) - jmp epilogue + jmp Lepilogue -retdouble: +Lretdouble: cmpl $FFI_TYPE_DOUBLE,%ecx - jne retlongdouble + jne Lretlongdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpl (%ecx) - jmp epilogue + jmp Lepilogue -retlongdouble: +Lretlongdouble: cmpl $FFI_TYPE_LONGDOUBLE,%ecx - jne retint64 + jne Lretint64 /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpt (%ecx) - jmp epilogue + jmp Lepilogue -retint64: +Lretint64: cmpl $FFI_TYPE_SINT64,%ecx - jne retstruct1b + jne Lretstruct1b /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx movl %eax,0(%ecx) movl %edx,4(%ecx) - jmp epilogue - -retstruct1b: - cmpl $FFI_TYPE_SINT8,%ecx - jne retstruct2b - movl 24(%ebp),%ecx - movb %al,0(%ecx) - jmp epilogue - -retstruct2b: - cmpl $FFI_TYPE_SINT16,%ecx - jne retstruct - movl 24(%ebp),%ecx - movw %ax,0(%ecx) - jmp epilogue + jmp Lepilogue -retstruct: - cmpl $FFI_TYPE_STRUCT,%ecx - jne noretval - /* Nothing to do! */ - - subl $4,%esp - - ASSERT_STACK_ALIGNED - - addl $8,%esp - movl %ebp, %esp - popl %ebp - ret - -noretval: -epilogue: - ASSERT_STACK_ALIGNED - addl $8, %esp +Lretstruct1b: + cmpl $FFI_TYPE_SINT8,%ecx + jne Lretstruct2b + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movb %al,0(%ecx) + jmp Lepilogue +Lretstruct2b: + cmpl $FFI_TYPE_SINT16,%ecx + jne Lretstruct + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movw %ax,0(%ecx) + jmp Lepilogue +Lretstruct: + cmpl $FFI_TYPE_STRUCT,%ecx + jne Lnoretval + /* Nothing to do! */ + addl $4,%esp + popl %ebp + ret + +Lnoretval: +Lepilogue: + addl $8,%esp movl %ebp,%esp popl %ebp ret +LFE1: .ffi_call_SYSV_end: -#if 0 - .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV -#endif -#if 0 - .section .eh_frame,EH_FRAME_FLAGS, at progbits -.Lframe1: - .long .LECIE1-.LSCIE1 /* Length of Common Information Entry */ -.LSCIE1: - .long 0x0 /* CIE Identifier Tag */ - .byte 0x1 /* CIE Version */ -#ifdef __PIC__ - .ascii "zR\0" /* CIE Augmentation */ -#else - .ascii "\0" /* CIE Augmentation */ -#endif - .byte 0x1 /* .uleb128 0x1; CIE Code Alignment Factor */ - .byte 0x7c /* .sleb128 -4; CIE Data Alignment Factor */ - .byte 0x8 /* CIE RA Column */ -#ifdef __PIC__ - .byte 0x1 /* .uleb128 0x1; Augmentation size */ - .byte 0x1b /* FDE Encoding (pcrel sdata4) */ -#endif - .byte 0xc /* DW_CFA_def_cfa */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x4 /* .uleb128 0x4 */ - .byte 0x88 /* DW_CFA_offset, column 0x8 */ - .byte 0x1 /* .uleb128 0x1 */ - .align 4 -.LECIE1: -.LSFDE1: - .long .LEFDE1-.LASFDE1 /* FDE Length */ -.LASFDE1: - .long .LASFDE1-.Lframe1 /* FDE CIE offset */ -#ifdef __PIC__ - .long .LFB1-. /* FDE initial location */ -#else - .long .LFB1 /* FDE initial location */ -#endif - .long .ffi_call_SYSV_end-.LFB1 /* FDE address range */ -#ifdef __PIC__ - .byte 0x0 /* .uleb128 0x0; Augmentation size */ + .align 4 +FFI_HIDDEN (ffi_closure_SYSV) +.globl _ffi_closure_SYSV + +_ffi_closure_SYSV: +LFB2: + pushl %ebp +LCFI2: + movl %esp, %ebp +LCFI3: + subl $56, %esp + leal -40(%ebp), %edx + movl %edx, -12(%ebp) /* resp */ + leal 8(%ebp), %edx + movl %edx, 4(%esp) /* args = __builtin_dwarf_cfa () */ + leal -12(%ebp), %edx + movl %edx, (%esp) /* &resp */ + movl %ebx, 8(%esp) +LCFI7: + call L_ffi_closure_SYSV_inner$stub + movl 8(%esp), %ebx + movl -12(%ebp), %ecx + cmpl $FFI_TYPE_INT, %eax + je Lcls_retint + cmpl $FFI_TYPE_FLOAT, %eax + je Lcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je Lcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je Lcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je Lcls_retllong + cmpl $FFI_TYPE_SINT8, %eax + je Lcls_retstruct1 + cmpl $FFI_TYPE_SINT16, %eax + je Lcls_retstruct2 + cmpl $FFI_TYPE_STRUCT, %eax + je Lcls_retstruct +Lcls_epilogue: + movl %ebp, %esp + popl %ebp + ret +Lcls_retint: + movl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retfloat: + flds (%ecx) + jmp Lcls_epilogue +Lcls_retdouble: + fldl (%ecx) + jmp Lcls_epilogue +Lcls_retldouble: + fldt (%ecx) + jmp Lcls_epilogue +Lcls_retllong: + movl (%ecx), %eax + movl 4(%ecx), %edx + jmp Lcls_epilogue +Lcls_retstruct1: + movsbl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retstruct2: + movswl (%ecx), %eax + jmp Lcls_epilogue +Lcls_retstruct: + lea -8(%ebp),%esp + movl %ebp, %esp + popl %ebp + ret $4 +LFE2: + +#if !FFI_NO_RAW_API + +#define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3) +#define RAW_CLOSURE_FUN_OFFSET (RAW_CLOSURE_CIF_OFFSET + 4) +#define RAW_CLOSURE_USER_DATA_OFFSET (RAW_CLOSURE_FUN_OFFSET + 4) +#define CIF_FLAGS_OFFSET 20 + + .align 4 +FFI_HIDDEN (ffi_closure_raw_SYSV) +.globl _ffi_closure_raw_SYSV + +_ffi_closure_raw_SYSV: +LFB3: + pushl %ebp +LCFI4: + movl %esp, %ebp +LCFI5: + pushl %esi +LCFI6: + subl $36, %esp + movl RAW_CLOSURE_CIF_OFFSET(%eax), %esi /* closure->cif */ + movl RAW_CLOSURE_USER_DATA_OFFSET(%eax), %edx /* closure->user_data */ + movl %edx, 12(%esp) /* user_data */ + leal 8(%ebp), %edx /* __builtin_dwarf_cfa () */ + movl %edx, 8(%esp) /* raw_args */ + leal -24(%ebp), %edx + movl %edx, 4(%esp) /* &res */ + movl %esi, (%esp) /* cif */ + call *RAW_CLOSURE_FUN_OFFSET(%eax) /* closure->fun */ + movl CIF_FLAGS_OFFSET(%esi), %eax /* rtype */ + cmpl $FFI_TYPE_INT, %eax + je Lrcls_retint + cmpl $FFI_TYPE_FLOAT, %eax + je Lrcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je Lrcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je Lrcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je Lrcls_retllong +Lrcls_epilogue: + addl $36, %esp + popl %esi + popl %ebp + ret +Lrcls_retint: + movl -24(%ebp), %eax + jmp Lrcls_epilogue +Lrcls_retfloat: + flds -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retdouble: + fldl -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retldouble: + fldt -24(%ebp) + jmp Lrcls_epilogue +Lrcls_retllong: + movl -24(%ebp), %eax + movl -20(%ebp), %edx + jmp Lrcls_epilogue +LFE3: #endif - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI0-.LFB1 - .byte 0xe /* DW_CFA_def_cfa_offset */ - .byte 0x8 /* .uleb128 0x8 */ - .byte 0x85 /* DW_CFA_offset, column 0x5 */ - .byte 0x2 /* .uleb128 0x2 */ - .byte 0x4 /* DW_CFA_advance_loc4 */ - .long .LCFI1-.LCFI0 - .byte 0xd /* DW_CFA_def_cfa_register */ - .byte 0x5 /* .uleb128 0x5 */ - .align 4 -.LEFDE1: + +.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 +L_ffi_closure_SYSV_inner$stub: + .indirect_symbol _ffi_closure_SYSV_inner + hlt ; hlt ; hlt ; hlt ; hlt + + +.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support +EH_frame1: + .set L$set$0,LECIE1-LSCIE1 + .long L$set$0 +LSCIE1: + .long 0x0 + .byte 0x1 + .ascii "zR\0" + .byte 0x1 + .byte 0x7c + .byte 0x8 + .byte 0x1 + .byte 0x10 + .byte 0xc + .byte 0x5 + .byte 0x4 + .byte 0x88 + .byte 0x1 + .align 2 +LECIE1: +.globl _ffi_call_SYSV.eh +_ffi_call_SYSV.eh: +LSFDE1: + .set L$set$1,LEFDE1-LASFDE1 + .long L$set$1 +LASFDE1: + .long LASFDE1-EH_frame1 + .long LFB1-. + .set L$set$2,LFE1-LFB1 + .long L$set$2 + .byte 0x0 + .byte 0x4 + .set L$set$3,LCFI0-LFB1 + .long L$set$3 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$4,LCFI1-LCFI0 + .long L$set$4 + .byte 0xd + .byte 0x4 + .align 2 +LEFDE1: +.globl _ffi_closure_SYSV.eh +_ffi_closure_SYSV.eh: +LSFDE2: + .set L$set$5,LEFDE2-LASFDE2 + .long L$set$5 +LASFDE2: + .long LASFDE2-EH_frame1 + .long LFB2-. + .set L$set$6,LFE2-LFB2 + .long L$set$6 + .byte 0x0 + .byte 0x4 + .set L$set$7,LCFI2-LFB2 + .long L$set$7 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$8,LCFI3-LCFI2 + .long L$set$8 + .byte 0xd + .byte 0x4 + .align 2 +LEFDE2: + +#if !FFI_NO_RAW_API + +.globl _ffi_closure_raw_SYSV.eh +_ffi_closure_raw_SYSV.eh: +LSFDE3: + .set L$set$10,LEFDE3-LASFDE3 + .long L$set$10 +LASFDE3: + .long LASFDE3-EH_frame1 + .long LFB3-. + .set L$set$11,LFE3-LFB3 + .long L$set$11 + .byte 0x0 + .byte 0x4 + .set L$set$12,LCFI4-LFB3 + .long L$set$12 + .byte 0xe + .byte 0x8 + .byte 0x84 + .byte 0x2 + .byte 0x4 + .set L$set$13,LCFI5-LCFI4 + .long L$set$13 + .byte 0xd + .byte 0x4 + .byte 0x4 + .set L$set$14,LCFI6-LCFI5 + .long L$set$14 + .byte 0x85 + .byte 0x3 + .align 2 +LEFDE3: + #endif #endif /* ifndef __x86_64__ */ Modified: python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c (original) +++ python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c Sun Sep 20 20:58:52 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 reformatting penalties. + use SF or DFmode move instead of DImode to avoid reformating penalties. Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves whenever possible (upper half does contain padding). */ @@ -621,4 +621,4 @@ return ret; } -#endif /* __x86_64__ */ +#endif /* __x86_64__ */ \ No newline at end of file Modified: python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c ============================================================================== --- python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c (original) +++ python/branches/release31-maint/Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c Sun Sep 20 20:58:52 2009 @@ -27,543 +27,410 @@ OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ -//#ifndef __x86_64__ - #include #include #include -//void ffi_prep_args(char *stack, extended_cif *ecif); - -static inline int -retval_on_stack( - ffi_type* tp) -{ - if (tp->type == FFI_TYPE_STRUCT) - { -// int size = tp->size; - - if (tp->size > 8) - return 1; - - switch (tp->size) - { - case 1: case 2: case 4: case 8: - return 0; - default: - return 1; - } - } - - return 0; -} - /* ffi_prep_args is called by the assembly routine once stack space - has been allocated for the function's arguments */ -/*@-exportheader@*/ -extern void ffi_prep_args(char*, extended_cif*); -void -ffi_prep_args( - char* stack, - extended_cif* ecif) -/*@=exportheader@*/ -{ - register unsigned int i; - register void** p_argv = ecif->avalue; - register char* argp = stack; - register ffi_type** p_arg; - - if (retval_on_stack(ecif->cif->rtype)) - { - *(void**)argp = ecif->rvalue; - argp += 4; - } + has been allocated for the function's arguments */ - p_arg = ecif->cif->arg_types; - - for (i = ecif->cif->nargs; i > 0; i--, p_arg++, p_argv++) +void ffi_prep_args(char *stack, extended_cif *ecif) +{ + register unsigned int i; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if (ecif->cif->flags == FFI_TYPE_STRUCT) { - size_t z = (*p_arg)->size; - - /* Align if necessary */ - if ((sizeof(int) - 1) & (unsigned)argp) - argp = (char*)ALIGN(argp, sizeof(int)); - - if (z < sizeof(int)) - { - z = sizeof(int); - - switch ((*p_arg)->type) - { - case FFI_TYPE_SINT8: - *(signed int*)argp = (signed int)*(SINT8*)(*p_argv); - break; - - case FFI_TYPE_UINT8: - *(unsigned int*)argp = (unsigned int)*(UINT8*)(*p_argv); - break; - - case FFI_TYPE_SINT16: - *(signed int*)argp = (signed int)*(SINT16*)(*p_argv); - break; - - case FFI_TYPE_UINT16: - *(unsigned int*)argp = (unsigned int)*(UINT16*)(*p_argv); - break; - - case FFI_TYPE_SINT32: - *(signed int*)argp = (signed int)*(SINT32*)(*p_argv); - break; - - case FFI_TYPE_UINT32: - *(unsigned int*)argp = (unsigned int)*(UINT32*)(*p_argv); - break; - - case FFI_TYPE_STRUCT: - *(unsigned int*)argp = (unsigned int)*(UINT32*)(*p_argv); - break; - - default: - FFI_ASSERT(0); - break; - } - } - else - memcpy(argp, *p_argv, z); - - argp += z; - } + *(void **) argp = ecif->rvalue; + argp += 4; + } + + p_argv = ecif->avalue; + + for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; + i != 0; + i--, p_arg++) + { + size_t z; + + /* Align if necessary */ + if ((sizeof(int) - 1) & (unsigned) argp) + argp = (char *) ALIGN(argp, sizeof(int)); + + z = (*p_arg)->size; + if (z < sizeof(int)) + { + z = sizeof(int); + switch ((*p_arg)->type) + { + case FFI_TYPE_SINT8: + *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv); + break; + + case FFI_TYPE_UINT8: + *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv); + break; + + case FFI_TYPE_SINT16: + *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv); + break; + + case FFI_TYPE_UINT16: + *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv); + break; + + case FFI_TYPE_SINT32: + *(signed int *) argp = (signed int)*(SINT32 *)(* p_argv); + break; + + case FFI_TYPE_UINT32: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + case FFI_TYPE_STRUCT: + *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + break; + + default: + FFI_ASSERT(0); + } + } + else + { + memcpy(argp, *p_argv, z); + } + p_argv++; + argp += z; + } + + return; } /* Perform machine dependent cif processing */ -ffi_status -ffi_prep_cif_machdep( - ffi_cif* cif) +ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { - /* Set the return type flag */ - switch (cif->rtype->type) - { -#if !defined(X86_WIN32) && !defined(X86_DARWIN) - case FFI_TYPE_STRUCT: + /* Set the return type flag */ + switch (cif->rtype->type) + { + case FFI_TYPE_VOID: +#ifdef X86 + case FFI_TYPE_STRUCT: + case FFI_TYPE_UINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT8: + case FFI_TYPE_SINT16: #endif - case FFI_TYPE_VOID: - case FFI_TYPE_SINT64: - case FFI_TYPE_FLOAT: - case FFI_TYPE_DOUBLE: - case FFI_TYPE_LONGDOUBLE: - cif->flags = (unsigned)cif->rtype->type; - break; - - case FFI_TYPE_UINT64: - cif->flags = FFI_TYPE_SINT64; - break; - -#if defined(X86_WIN32) || defined(X86_DARWIN) - case FFI_TYPE_STRUCT: - switch (cif->rtype->size) - { - case 1: - cif->flags = FFI_TYPE_SINT8; - break; - - case 2: - cif->flags = FFI_TYPE_SINT16; - break; - - case 4: - cif->flags = FFI_TYPE_INT; - break; - - case 8: - cif->flags = FFI_TYPE_SINT64; - break; - - default: - cif->flags = FFI_TYPE_STRUCT; - break; - } - - break; + + case FFI_TYPE_SINT64: + case FFI_TYPE_FLOAT: + case FFI_TYPE_DOUBLE: + case FFI_TYPE_LONGDOUBLE: + cif->flags = (unsigned) cif->rtype->type; + break; + + case FFI_TYPE_UINT64: + cif->flags = FFI_TYPE_SINT64; + break; + +#ifndef X86 + case FFI_TYPE_STRUCT: + if (cif->rtype->size == 1) + { + cif->flags = FFI_TYPE_SINT8; /* same as char size */ + } + else if (cif->rtype->size == 2) + { + cif->flags = FFI_TYPE_SINT16; /* same as short size */ + } + else if (cif->rtype->size == 4) + { + cif->flags = FFI_TYPE_INT; /* same as int type */ + } + else if (cif->rtype->size == 8) + { + cif->flags = FFI_TYPE_SINT64; /* same as int64 type */ + } + else + { + cif->flags = FFI_TYPE_STRUCT; + } + break; #endif - - default: - cif->flags = FFI_TYPE_INT; - break; - } - - /* Darwin: The stack needs to be aligned to a multiple of 16 bytes */ - cif->bytes = (cif->bytes + 15) & ~0xF; - - return FFI_OK; + + default: + cif->flags = FFI_TYPE_INT; + break; + } + +#ifdef X86_DARWIN + cif->bytes = (cif->bytes + 15) & ~0xF; +#endif + + return FFI_OK; } -/*@-declundef@*/ -/*@-exportheader@*/ -extern void -ffi_call_SYSV( - void (*)(char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)(void)); -/*@=declundef@*/ -/*@=exportheader@*/ +extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, + unsigned, unsigned, unsigned *, void (*fn)()); #ifdef X86_WIN32 -/*@-declundef@*/ -/*@-exportheader@*/ -extern void -ffi_call_STDCALL( - void (char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)(void)); -/*@=declundef@*/ -/*@=exportheader@*/ +extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, + unsigned, unsigned, unsigned *, void (*fn)()); + #endif /* X86_WIN32 */ -void -ffi_call( -/*@dependent@*/ ffi_cif* cif, - void (*fn)(void), -/*@out@*/ void* rvalue, -/*@dependent@*/ void** avalue) +void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) { - extended_cif ecif; - - ecif.cif = cif; - ecif.avalue = avalue; - - /* If the return value is a struct and we don't have a return - value address then we need to make one. */ - - if ((rvalue == NULL) && retval_on_stack(cif->rtype)) - { - /*@-sysunrecog@*/ - ecif.rvalue = alloca(cif->rtype->size); - /*@=sysunrecog@*/ - } - else - ecif.rvalue = rvalue; - - switch (cif->abi) - { - case FFI_SYSV: - /*@-usedef@*/ - /* To avoid changing the assembly code make sure the size of the argument - block is a multiple of 16. Then add 8 to compensate for local variables - in ffi_call_SYSV. */ - ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; - + extended_cif ecif; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->flags == FFI_TYPE_STRUCT)) + { + ecif.rvalue = alloca(cif->rtype->size); + } + else + ecif.rvalue = rvalue; + + + switch (cif->abi) + { + case FFI_SYSV: + ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, + fn); + break; #ifdef X86_WIN32 - case FFI_STDCALL: - /*@-usedef@*/ - ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + case FFI_STDCALL: + ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #endif /* X86_WIN32 */ - - default: - FFI_ASSERT(0); - break; - } + default: + FFI_ASSERT(0); + break; + } } -/** private members **/ -static void -ffi_closure_SYSV( - ffi_closure* closure) __attribute__((regparm(1))); - -#if !FFI_NO_RAW_API -static void -ffi_closure_raw_SYSV( - ffi_raw_closure* closure) __attribute__((regparm(1))); -#endif - -/*@-exportheader@*/ -static inline -void -ffi_prep_incoming_args_SYSV( - char* stack, - void** rvalue, - void** avalue, - ffi_cif* cif) -/*@=exportheader@*/ -{ - register unsigned int i; - register void** p_argv = avalue; - register char* argp = stack; - register ffi_type** p_arg; - - if (retval_on_stack(cif->rtype)) - { - *rvalue = *(void**)argp; - argp += 4; - } - - for (i = cif->nargs, p_arg = cif->arg_types; i > 0; i--, p_arg++, p_argv++) - { -// size_t z; - - /* Align if necessary */ - if ((sizeof(int) - 1) & (unsigned)argp) - argp = (char*)ALIGN(argp, sizeof(int)); +/** private members **/ -// z = (*p_arg)->size; +static void ffi_prep_incoming_args_SYSV (char *stack, void **ret, + void** args, ffi_cif* cif); +void FFI_HIDDEN ffi_closure_SYSV (ffi_closure *) +__attribute__ ((regparm(1))); +unsigned int FFI_HIDDEN ffi_closure_SYSV_inner (ffi_closure *, void **, void *) +__attribute__ ((regparm(1))); +void FFI_HIDDEN ffi_closure_raw_SYSV (ffi_raw_closure *) +__attribute__ ((regparm(1))); - /* because we're little endian, this is what it turns into. */ - *p_argv = (void*)argp; +/* This function is jumped to by the trampoline */ - argp += (*p_arg)->size; - } +unsigned int FFI_HIDDEN +ffi_closure_SYSV_inner (closure, respp, args) +ffi_closure *closure; +void **respp; +void *args; +{ + // our various things... + ffi_cif *cif; + void **arg_area; + + cif = closure->cif; + arg_area = (void**) alloca (cif->nargs * sizeof (void*)); + + /* this call will initialize ARG_AREA, such that each + * element in that array points to the corresponding + * value on the stack; and if the function returns + * a structure, it will re-set RESP to point to the + * structure return address. */ + + ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif); + + (closure->fun) (cif, *respp, arg_area, closure->user_data); + + return cif->flags; } -/* This function is jumped to by the trampoline */ -__attribute__((regparm(1))) static void -ffi_closure_SYSV( - ffi_closure* closure) +ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, void **avalue, + ffi_cif *cif) { - long double res; - ffi_cif* cif = closure->cif; - void** arg_area = (void**)alloca(cif->nargs * sizeof(void*)); - void* resp = (void*)&res; - void* args = __builtin_dwarf_cfa(); - - /* This call will initialize ARG_AREA, such that each - element in that array points to the corresponding - value on the stack; and if the function returns - a structure, it will reset RESP to point to the - structure return address. */ - ffi_prep_incoming_args_SYSV(args, (void**)&resp, arg_area, cif); - - (closure->fun)(cif, resp, arg_area, closure->user_data); - - /* now, do a generic return based on the value of rtype */ - if (cif->flags == FFI_TYPE_INT) - asm("movl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (cif->flags == FFI_TYPE_FLOAT) - asm("flds (%0)" - : : "r" (resp) : "st"); - else if (cif->flags == FFI_TYPE_DOUBLE) - asm("fldl (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (cif->flags == FFI_TYPE_LONGDOUBLE) - asm("fldt (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (cif->flags == FFI_TYPE_SINT64) - asm("movl 0(%0),%%eax;" - "movl 4(%0),%%edx" - : : "r" (resp) - : "eax", "edx"); - -#if defined(X86_WIN32) || defined(X86_DARWIN) - else if (cif->flags == FFI_TYPE_SINT8) /* 1-byte struct */ - asm("movsbl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (cif->flags == FFI_TYPE_SINT16) /* 2-bytes struct */ - asm("movswl (%0),%%eax" - : : "r" (resp) : "eax"); -#endif - - else if (cif->flags == FFI_TYPE_STRUCT) - asm("lea -8(%ebp),%esp;" - "pop %esi;" - "pop %edi;" - "pop %ebp;" - "ret $4"); + register unsigned int i; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if ( cif->flags == FFI_TYPE_STRUCT ) { + *rvalue = *(void **) argp; + argp += 4; + } + + p_argv = avalue; + + for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++) + { + size_t z; + + /* Align if necessary */ + if ((sizeof(int) - 1) & (unsigned) argp) { + argp = (char *) ALIGN(argp, sizeof(int)); + } + + z = (*p_arg)->size; + + /* because we're little endian, this is what it turns into. */ + + *p_argv = (void*) argp; + + p_argv++; + argp += z; + } + + return; } - /* How to make a trampoline. Derived from gcc/config/i386/i386.c. */ -#define FFI_INIT_TRAMPOLINE(TRAMP, FUN, CTX) \ - ({ \ - unsigned char* __tramp = (unsigned char*)(TRAMP); \ - unsigned int __fun = (unsigned int)(FUN); \ - unsigned int __ctx = (unsigned int)(CTX); \ - unsigned int __dis = __fun - ((unsigned int)__tramp + FFI_TRAMPOLINE_SIZE); \ - *(unsigned char*)&__tramp[0] = 0xb8; \ - *(unsigned int*)&__tramp[1] = __ctx; /* movl __ctx, %eax */ \ - *(unsigned char*)&__tramp[5] = 0xe9; \ - *(unsigned int*)&__tramp[6] = __dis; /* jmp __fun */ \ - }) + +#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \ +({ unsigned char *__tramp = (unsigned char*)(TRAMP); \ +unsigned int __fun = (unsigned int)(FUN); \ +unsigned int __ctx = (unsigned int)(CTX); \ +unsigned int __dis = __fun - (__ctx + FFI_TRAMPOLINE_SIZE); \ +*(unsigned char*) &__tramp[0] = 0xb8; \ +*(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \ +*(unsigned char *) &__tramp[5] = 0xe9; \ +*(unsigned int*) &__tramp[6] = __dis; /* jmp __fun */ \ +}) + /* the cif must already be prep'ed */ ffi_status -ffi_prep_closure( - ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,void**,void*), - void* user_data) +ffi_prep_closure (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data) { -// FFI_ASSERT(cif->abi == FFI_SYSV); if (cif->abi != FFI_SYSV) return FFI_BAD_ABI; - - FFI_INIT_TRAMPOLINE(closure->tramp, &ffi_closure_SYSV, (void*)closure); - - closure->cif = cif; - closure->user_data = user_data; - closure->fun = fun; - - return FFI_OK; + + FFI_INIT_TRAMPOLINE (&closure->tramp[0], \ + &ffi_closure_SYSV, \ + (void*)closure); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; } /* ------- Native raw API support -------------------------------- */ #if !FFI_NO_RAW_API -__attribute__((regparm(1))) -static void -ffi_closure_raw_SYSV( - ffi_raw_closure* closure) -{ - long double res; - ffi_raw* raw_args = (ffi_raw*)__builtin_dwarf_cfa(); - ffi_cif* cif = closure->cif; - unsigned short rtype = cif->flags; - void* resp = (void*)&res; - - (closure->fun)(cif, resp, raw_args, closure->user_data); - - /* now, do a generic return based on the value of rtype */ - if (rtype == FFI_TYPE_INT) - asm("movl (%0),%%eax" - : : "r" (resp) : "eax"); - else if (rtype == FFI_TYPE_FLOAT) - asm("flds (%0)" - : : "r" (resp) : "st"); - else if (rtype == FFI_TYPE_DOUBLE) - asm("fldl (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (rtype == FFI_TYPE_LONGDOUBLE) - asm("fldt (%0)" - : : "r" (resp) : "st", "st(1)"); - else if (rtype == FFI_TYPE_SINT64) - asm("movl 0(%0),%%eax;" - "movl 4(%0),%%edx" - : : "r" (resp) : "eax", "edx"); -} - ffi_status -ffi_prep_raw_closure( - ffi_raw_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), - void* user_data) -{ -// FFI_ASSERT (cif->abi == FFI_SYSV); - if (cif->abi != FFI_SYSV) - return FFI_BAD_ABI; - - int i; - -/* We currently don't support certain kinds of arguments for raw - closures. This should be implemented by a separate assembly language - routine, since it would require argument processing, something we - don't do now for performance. */ - for (i = cif->nargs - 1; i >= 0; i--) - { - FFI_ASSERT(cif->arg_types[i]->type != FFI_TYPE_STRUCT); - FFI_ASSERT(cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE); - } - - FFI_INIT_TRAMPOLINE(closure->tramp, &ffi_closure_raw_SYSV, (void*)closure); - - closure->cif = cif; - closure->user_data = user_data; - closure->fun = fun; - - return FFI_OK; +ffi_prep_raw_closure_loc (ffi_raw_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data, + void *codeloc) +{ + int i; + + FFI_ASSERT (cif->abi == FFI_SYSV); + + // we currently don't support certain kinds of arguments for raw + // closures. This should be implemented by a separate assembly language + // routine, since it would require argument processing, something we + // don't do now for performance. + + for (i = cif->nargs-1; i >= 0; i--) + { + FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_STRUCT); + FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE); + } + + + FFI_INIT_TRAMPOLINE (&closure->tramp[0], &ffi_closure_raw_SYSV, + codeloc); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; } static void -ffi_prep_args_raw( - char* stack, - extended_cif* ecif) +ffi_prep_args_raw(char *stack, extended_cif *ecif) { - memcpy(stack, ecif->avalue, ecif->cif->bytes); + memcpy (stack, ecif->avalue, ecif->cif->bytes); } -/* We borrow this routine from libffi (it must be changed, though, to - actually call the function passed in the first argument. as of - libffi-1.20, this is not the case.) */ -//extern void -//ffi_call_SYSV( -// void (*)(char *, extended_cif *), -///*@out@*/ extended_cif* , -// unsigned , -// unsigned , -//*@out@*/ unsigned* , -// void (*fn)()); +/* we borrow this routine from libffi (it must be changed, though, to + * actually call the function passed in the first argument. as of + * libffi-1.20, this is not the case.) + */ + +extern void +ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, unsigned, + unsigned, unsigned *, void (*fn)()); #ifdef X86_WIN32 extern void -ffi_call_STDCALL( - void (*)(char *, extended_cif *), -/*@out@*/ extended_cif* , - unsigned , - unsigned , -/*@out@*/ unsigned* , - void (*fn)()); -#endif // X86_WIN32 +ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *, unsigned, + unsigned, unsigned *, void (*fn)()); +#endif /* X86_WIN32 */ void -ffi_raw_call( -/*@dependent@*/ ffi_cif* cif, - void (*fn)(), -/*@out@*/ void* rvalue, -/*@dependent@*/ ffi_raw* fake_avalue) +ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue) { - extended_cif ecif; - void **avalue = (void **)fake_avalue; - - ecif.cif = cif; - ecif.avalue = avalue; - - /* If the return value is a struct and we don't have a return - value address then we need to make one */ - if ((rvalue == NULL) && retval_on_stack(cif->rtype)) - { - /*@-sysunrecog@*/ - ecif.rvalue = alloca(cif->rtype->size); - /*@=sysunrecog@*/ - } - else - ecif.rvalue = rvalue; - - switch (cif->abi) - { - case FFI_SYSV: - /*@-usedef@*/ - ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + extended_cif ecif; + void **avalue = (void **)fake_avalue; + + ecif.cif = cif; + ecif.avalue = avalue; + + /* If the return value is a struct and we don't have a return */ + /* value address then we need to make one */ + + if ((rvalue == NULL) && + (cif->rtype->type == FFI_TYPE_STRUCT)) + { + ecif.rvalue = alloca(cif->rtype->size); + } + else + ecif.rvalue = rvalue; + + + switch (cif->abi) + { + case FFI_SYSV: + ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #ifdef X86_WIN32 - case FFI_STDCALL: - /*@-usedef@*/ - ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); - /*@=usedef@*/ - break; + case FFI_STDCALL: + ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags, + ecif.rvalue, fn); + break; #endif /* X86_WIN32 */ - default: - FFI_ASSERT(0); - break; + default: + FFI_ASSERT(0); + break; } } -#endif // !FFI_NO_RAW_API -//#endif // !__x86_64__ -#endif // __i386__ +#endif +#endif // __i386__ \ No newline at end of file From python-checkins at python.org Sun Sep 20 21:06:58 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 19:06:58 -0000 Subject: [Python-checkins] r74976 - in python/branches/release26-maint: Lib/idlelib/macosxSupport.py Message-ID: Author: ronald.oussoren Date: Sun Sep 20 21:06:58 2009 New Revision: 74976 Log: Backport of r72946. This closes Issue 6100 and 6951 for the 2.6 branch. Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/idlelib/macosxSupport.py Modified: python/branches/release26-maint/Lib/idlelib/macosxSupport.py ============================================================================== --- python/branches/release26-maint/Lib/idlelib/macosxSupport.py (original) +++ python/branches/release26-maint/Lib/idlelib/macosxSupport.py Sun Sep 20 21:06:58 2009 @@ -82,6 +82,7 @@ def config_dialog(event=None): import configDialog + root.instance_dict = flist.inversedict configDialog.ConfigDialog(root, 'Settings') @@ -95,7 +96,7 @@ tkversion = root.tk.eval('info patchlevel') # Note: we cannot check if the string tkversion >= '8.4.14', because # the string '8.4.7' is greater than the string '8.4.14'. - if map(int, tkversion.split('.')) >= (8, 4, 14): + if tuple(map(int, tkversion.split('.'))) >= (8, 4, 14): Bindings.menudefs[0] = ('application', [ ('About IDLE', '<>'), None, From python-checkins at python.org Sun Sep 20 21:21:25 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 19:21:25 -0000 Subject: [Python-checkins] r74977 - python/branches/release26-maint/Mac/Modules/_scproxy.c Message-ID: Author: ronald.oussoren Date: Sun Sep 20 21:21:24 2009 New Revision: 74977 Log: r74963 didn't include the merger of _scproxy.c Added: python/branches/release26-maint/Mac/Modules/_scproxy.c (contents, props changed) Added: python/branches/release26-maint/Mac/Modules/_scproxy.c ============================================================================== --- (empty file) +++ python/branches/release26-maint/Mac/Modules/_scproxy.c Sun Sep 20 21:21:24 2009 @@ -0,0 +1,226 @@ +/* + * Helper method for urllib to fetch the proxy configuration settings + * using the SystemConfiguration framework. + */ +#include +#include + +static int32_t +cfnum_to_int32(CFNumberRef num) +{ + int32_t result; + + CFNumberGetValue(num, kCFNumberSInt32Type, &result); + return result; +} + +static PyObject* +cfstring_to_pystring(CFStringRef ref) +{ + const char* s; + + s = CFStringGetCStringPtr(ref, kCFStringEncodingUTF8); + if (s) { + return PyString_FromString(s); + + } else { + CFIndex len = CFStringGetLength(ref); + Boolean ok; + PyObject* result; + result = PyString_FromStringAndSize(NULL, len*4); + + ok = CFStringGetCString(ref, + PyString_AS_STRING(result), + PyString_GET_SIZE(result), + kCFStringEncodingUTF8); + if (!ok) { + Py_DECREF(result); + return NULL; + } else { + _PyString_Resize(&result, + strlen(PyString_AS_STRING(result))); + } + return result; + } +} + + +static PyObject* +get_proxy_settings(PyObject* mod __attribute__((__unused__))) +{ + CFDictionaryRef proxyDict = NULL; + CFNumberRef aNum = NULL; + CFArrayRef anArray = NULL; + PyObject* result = NULL; + PyObject* v; + int r; + + proxyDict = SCDynamicStoreCopyProxies(NULL); + if (!proxyDict) { + Py_INCREF(Py_None); + return Py_None; + } + + result = PyDict_New(); + if (result == NULL) goto error; + + aNum = CFDictionaryGetValue(proxyDict, + kSCPropNetProxiesExcludeSimpleHostnames); + if (aNum == NULL) { + v = PyBool_FromLong(0); + } else { + v = PyBool_FromLong(cfnum_to_int32(aNum)); + } + if (v == NULL) goto error; + + r = PyDict_SetItemString(result, "exclude_simple", v); + Py_DECREF(v); v = NULL; + if (r == -1) goto error; + + anArray = CFDictionaryGetValue(proxyDict, + kSCPropNetProxiesExceptionsList); + if (anArray != NULL) { + CFIndex len = CFArrayGetCount(anArray); + CFIndex i; + v = PyTuple_New(len); + if (v == NULL) goto error; + + r = PyDict_SetItemString(result, "exceptions", v); + Py_DECREF(v); + if (r == -1) goto error; + + for (i = 0; i < len; i++) { + CFStringRef aString = NULL; + + aString = CFArrayGetValueAtIndex(anArray, i); + if (aString == NULL) { + PyTuple_SetItem(v, i, Py_None); + Py_INCREF(Py_None); + } else { + PyObject* t = cfstring_to_pystring(aString); + if (!t) { + PyTuple_SetItem(v, i, Py_None); + Py_INCREF(Py_None); + } else { + PyTuple_SetItem(v, i, t); + } + } + } + } + + CFRelease(proxyDict); + return result; + +error: + if (proxyDict) CFRelease(proxyDict); + Py_XDECREF(result); + return NULL; +} + +static int +set_proxy(PyObject* proxies, char* proto, CFDictionaryRef proxyDict, + CFStringRef enabledKey, + CFStringRef hostKey, CFStringRef portKey) +{ + CFNumberRef aNum; + + aNum = CFDictionaryGetValue(proxyDict, enabledKey); + if (aNum && cfnum_to_int32(aNum)) { + CFStringRef hostString; + + hostString = CFDictionaryGetValue(proxyDict, hostKey); + aNum = CFDictionaryGetValue(proxyDict, portKey); + + if (hostString) { + int r; + PyObject* h = cfstring_to_pystring(hostString); + PyObject* v; + if (h) { + if (aNum) { + int32_t port = cfnum_to_int32(aNum); + v = PyString_FromFormat("http://%s:%ld", + PyString_AS_STRING(h), + (long)port); + } else { + v = PyString_FromFormat("http://%s", + PyString_AS_STRING(h)); + } + Py_DECREF(h); + if (!v) return -1; + r = PyDict_SetItemString(proxies, proto, + v); + Py_DECREF(v); + return r; + } + } + + } + return 0; +} + + + +static PyObject* +get_proxies(PyObject* mod __attribute__((__unused__))) +{ + PyObject* result = NULL; + int r; + CFDictionaryRef proxyDict = NULL; + + proxyDict = SCDynamicStoreCopyProxies(NULL); + if (proxyDict == NULL) { + return PyDict_New(); + } + + result = PyDict_New(); + if (result == NULL) goto error; + + r = set_proxy(result, "http", proxyDict, + kSCPropNetProxiesHTTPEnable, + kSCPropNetProxiesHTTPProxy, + kSCPropNetProxiesHTTPPort); + if (r == -1) goto error; + r = set_proxy(result, "https", proxyDict, + kSCPropNetProxiesHTTPSEnable, + kSCPropNetProxiesHTTPSProxy, + kSCPropNetProxiesHTTPSPort); + if (r == -1) goto error; + r = set_proxy(result, "ftp", proxyDict, + kSCPropNetProxiesFTPEnable, + kSCPropNetProxiesFTPProxy, + kSCPropNetProxiesFTPPort); + if (r == -1) goto error; + r = set_proxy(result, "gopher", proxyDict, + kSCPropNetProxiesGopherEnable, + kSCPropNetProxiesGopherProxy, + kSCPropNetProxiesGopherPort); + if (r == -1) goto error; + + CFRelease(proxyDict); + return result; +error: + if (proxyDict) CFRelease(proxyDict); + Py_XDECREF(result); + return NULL; +} + +static PyMethodDef mod_methods[] = { + { + "_get_proxy_settings", + (PyCFunction)get_proxy_settings, + METH_NOARGS, + NULL, + }, + { + "_get_proxies", + (PyCFunction)get_proxies, + METH_NOARGS, + NULL, + }, + { 0, 0, 0, 0 } +}; + +void init_scproxy(void) +{ + (void)Py_InitModule4("_scproxy", mod_methods, NULL, NULL, PYTHON_API_VERSION); +} From python-checkins at python.org Sun Sep 20 22:05:45 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 20:05:45 -0000 Subject: [Python-checkins] r74978 - in python/trunk: configure configure.in Message-ID: Author: ronald.oussoren Date: Sun Sep 20 22:05:44 2009 New Revision: 74978 Log: Fix typo in error message Modified: python/trunk/configure python/trunk/configure.in Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Sun Sep 20 22:05:44 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74701 . +# From configure.in Revision: 74715 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -4703,8 +4703,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;} + { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5 +echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;} { (exit 1); exit 1; }; } fi Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Sun Sep 20 22:05:44 2009 @@ -961,7 +961,7 @@ ARCH_RUN_32BIT="arch -i386 -ppc" else - AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all]) + AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way]) fi From python-checkins at python.org Sun Sep 20 22:09:27 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 20:09:27 -0000 Subject: [Python-checkins] r74979 - in python/branches/py3k: configure configure.in Message-ID: Author: ronald.oussoren Date: Sun Sep 20 22:09:26 2009 New Revision: 74979 Log: Merged revisions 74978 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74978 | ronald.oussoren | 2009-09-20 22:05:44 +0200 (Sun, 20 Sep 2009) | 2 lines Fix typo in error message ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/configure python/branches/py3k/configure.in Modified: python/branches/py3k/configure ============================================================================== --- python/branches/py3k/configure (original) +++ python/branches/py3k/configure Sun Sep 20 22:09:26 2009 @@ -1,12 +1,12 @@ #! /bin/sh -# From configure.in Revision: 74713 . +# From configure.in Revision: 74745 . # 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 @@ -2033,20 +1911,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 @@ -2168,8 +2046,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` @@ -2332,8 +2210,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 @@ -2343,11 +2221,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 @@ -2359,8 +2237,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 @@ -2382,15 +2260,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 @@ -2403,10 +2281,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. @@ -2419,7 +2297,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 @@ -2430,11 +2308,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 @@ -2443,10 +2321,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. @@ -2459,7 +2337,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 @@ -2470,11 +2348,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 @@ -2482,8 +2360,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 @@ -2496,10 +2378,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. @@ -2512,7 +2394,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 @@ -2523,11 +2405,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 @@ -2536,10 +2418,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. @@ -2557,7 +2439,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 @@ -2580,11 +2462,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 @@ -2595,10 +2477,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. @@ -2611,7 +2493,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 @@ -2622,11 +2504,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 @@ -2639,10 +2521,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. @@ -2655,7 +2537,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 @@ -2666,11 +2548,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 @@ -2682,8 +2564,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 @@ -2693,50 +2579,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 @@ -2755,22 +2635,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 @@ -2781,11 +2666,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' @@ -2796,7 +2680,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 @@ -2823,27 +2707,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 @@ -2852,53 +2734,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 @@ -2907,33 +2785,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. */ @@ -2956,43 +2832,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. */ @@ -3018,21 +2891,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 @@ -3042,19 +2914,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 @@ -3081,21 +2949,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="" @@ -3120,21 +2987,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 @@ -3160,21 +3026,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 @@ -3189,8 +3054,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 @@ -3206,10 +3071,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 @@ -3280,21 +3145,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 @@ -3310,15 +3174,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 @@ -3331,8 +3195,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 @@ -3357,8 +3221,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" @@ -3366,10 +3230,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 [\\/]* | ?:[\\/]*) @@ -3384,7 +3248,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 @@ -3397,20 +3261,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 [\\/]* | ?:[\\/]*) @@ -3425,7 +3289,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 @@ -3438,11 +3302,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 ;; @@ -3458,10 +3322,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. @@ -3474,7 +3338,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 @@ -3485,11 +3349,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 @@ -3504,12 +3368,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. @@ -3524,15 +3388,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" @@ -3564,21 +3428,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. @@ -3602,14 +3465,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 @@ -3617,7 +3479,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. @@ -3642,8 +3504,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 @@ -3671,21 +3533,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. @@ -3709,14 +3570,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 @@ -3724,7 +3584,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. @@ -3740,13 +3600,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 @@ -3756,37 +3614,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` @@ -3801,578 +3664,145 @@ 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" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - 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 -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; } - 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 -/* 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 - -# 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=`$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 - ;; + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -{ $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 + $ac_path_EGREP_found && break 3 + done +done - if test "$MINIX" = yes; then +done +IFS=$as_save_IFS -cat >>confdefs.h <<\_ACEOF -#define _POSIX_SOURCE 1 -_ACEOF +fi -cat >>confdefs.h <<\_ACEOF -#define _POSIX_1_SOURCE 2 -_ACEOF +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi +else + ac_cv_path_EGREP=$EGREP +fi -cat >>confdefs.h <<\_ACEOF -#define _MINIX 1 -_ACEOF - fi + fi +fi +{ 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 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 +{ 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. */ +#ifdef _AIX + yes +#endif -# 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 +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 _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 +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +rm -f -r conftest* @@ -4385,8 +3815,8 @@ esac -{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5 -$as_echo_n "checking for --with-suffix... " >&6; } +{ 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 @@ -4398,26 +3828,26 @@ esac fi -{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5 -$as_echo "$EXEEXT" >&6; } +{ 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 -{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 -$as_echo_n "checking for case-insensitive build directory... " >&6; } +{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 +echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; } if test ! -d CaseSensitiveTestDir; then mkdir CaseSensitiveTestDir fi if test -d casesensitivetestdir then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } BUILDEXEEXT=.exe 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; } BUILDEXEEXT=$EXEEXT fi rmdir CaseSensitiveTestDir @@ -4446,14 +3876,14 @@ -{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5 -$as_echo_n "checking LIBRARY... " >&6; } +{ echo "$as_me:$LINENO: checking LIBRARY" >&5 +echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; } if test -z "$LIBRARY" then LIBRARY='libpython$(VERSION).a' fi -{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5 -$as_echo "$LIBRARY" >&6; } +{ echo "$as_me:$LINENO: result: $LIBRARY" >&5 +echo "${ECHO_T}$LIBRARY" >&6; } # LDLIBRARY is the name of the library to link against (as opposed to the # name of the library into which to insert object files). BLDLIBRARY is also @@ -4488,8 +3918,8 @@ # This is altered for AIX in order to build the export list before # linking. -{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5 -$as_echo_n "checking LINKCC... " >&6; } +{ echo "$as_me:$LINENO: checking LINKCC" >&5 +echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; } if test -z "$LINKCC" then LINKCC='$(PURIFY) $(MAINCC)' @@ -4507,8 +3937,8 @@ LINKCC=qcc;; esac fi -{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5 -$as_echo "$LINKCC" >&6; } +{ echo "$as_me:$LINENO: result: $LINKCC" >&5 +echo "${ECHO_T}$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 @@ -4516,8 +3946,8 @@ # 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; } +{ 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` @@ -4528,11 +3958,11 @@ *) GNULD=no;; esac -{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5 -$as_echo "$GNULD" >&6; } +{ echo "$as_me:$LINENO: result: $GNULD" >&5 +echo "${ECHO_T}$GNULD" >&6; } -{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5 -$as_echo_n "checking for --enable-shared... " >&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; @@ -4548,11 +3978,11 @@ enable_shared="no";; esac fi -{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } -{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5 -$as_echo_n "checking for --enable-profiling... " >&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" @@ -4574,32 +4004,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_enable_profiling="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_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 @@ -4607,8 +4034,8 @@ CC="$ac_save_cc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 -$as_echo "$ac_enable_profiling" >&6; } +{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 +echo "${ECHO_T}$ac_enable_profiling" >&6; } case "$ac_enable_profiling" in "yes") @@ -4617,8 +4044,8 @@ ;; esac -{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5 -$as_echo_n "checking LDLIBRARY... " >&6; } +{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5 +echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; } # MacOSX framework builds need more magic. LDLIBRARY is the dynamic # library that we build, but we do not want to link against it (we @@ -4702,16 +4129,16 @@ esac fi -{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 -$as_echo "$LDLIBRARY" >&6; } +{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 +echo "${ECHO_T}$LDLIBRARY" >&6; } if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $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_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -4724,7 +4151,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" - $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 @@ -4735,11 +4162,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&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 @@ -4748,10 +4175,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 -{ $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_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 + 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. @@ -4764,7 +4191,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" - $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 @@ -4775,11 +4202,11 @@ 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; } + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&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_RANLIB" = x; then @@ -4787,8 +4214,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 RANLIB=$ac_ct_RANLIB @@ -4802,10 +4233,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_AR+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -4818,7 +4249,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" - $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 @@ -4829,11 +4260,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 -$as_echo "$AR" >&6; } + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&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 @@ -4852,10 +4283,10 @@ # 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$SVNVERSION"; then ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test. @@ -4868,7 +4299,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" - $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 @@ -4880,11 +4311,11 @@ fi SVNVERSION=$ac_cv_prog_SVNVERSION if test -n "$SVNVERSION"; then - { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5 -$as_echo "$SVNVERSION" >&6; } + { echo "$as_me:$LINENO: result: $SVNVERSION" >&5 +echo "${ECHO_T}$SVNVERSION" >&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 @@ -4920,8 +4351,8 @@ 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;} + { { 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 @@ -4947,12 +4378,11 @@ # 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -4981,29 +4411,17 @@ # 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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 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 @@ -5016,8 +4434,8 @@ INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -5039,8 +4457,8 @@ fi # Check for --with-pydebug -{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5 -$as_echo_n "checking for --with-pydebug... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5 +echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; } # Check whether --with-pydebug was given. if test "${with_pydebug+set}" = set; then @@ -5052,15 +4470,15 @@ #define Py_DEBUG 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; }; Py_DEBUG='true' -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; }; Py_DEBUG='false' +else { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; }; Py_DEBUG='false' 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 @@ -5129,12 +4547,12 @@ # 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; } + { 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 "${ac_cv_no_strict_aliasing_ok+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_no_strict_aliasing_ok=no @@ -5153,32 +4571,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_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 + 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_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 @@ -5186,8 +4601,8 @@ 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; } + { 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" @@ -5235,8 +4650,8 @@ 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;} + { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5 +echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;} { (exit 1); exit 1; }; } fi @@ -5329,10 +4744,10 @@ 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -OPT:Olimit=0" @@ -5353,32 +4768,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_opt_olimit_ok=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_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 @@ -5386,8 +4798,8 @@ 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; } +{ 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 @@ -5400,10 +4812,10 @@ ;; esac else - { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 -$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; } + { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 +echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; } if test "${ac_cv_olimit_ok+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -Olimit 1500" @@ -5424,32 +4836,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_olimit_ok=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_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 @@ -5457,8 +4866,8 @@ CC="$ac_save_cc" fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 -$as_echo "$ac_cv_olimit_ok" >&6; } + { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 +echo "${ECHO_T}$ac_cv_olimit_ok" >&6; } if test $ac_cv_olimit_ok = yes; then BASECFLAGS="$BASECFLAGS -Olimit 1500" fi @@ -5467,8 +4876,8 @@ # 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; } + { 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 @@ -5494,14 +4903,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 @@ -5511,14 +4919,14 @@ #define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 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 @@ -5531,10 +4939,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. -{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 -$as_echo_n "checking whether pthreads are available without options... " >&6; } +{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 +echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; } if test "${ac_cv_pthread_is_default+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_pthread_is_default=no @@ -5565,21 +4973,19 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_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_is_default=yes @@ -5587,14 +4993,13 @@ ac_cv_pthread=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_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 @@ -5602,8 +5007,8 @@ fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 -$as_echo "$ac_cv_pthread_is_default" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 +echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; } if test $ac_cv_pthread_is_default = yes @@ -5615,10 +5020,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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 -$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; } +{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 +echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; } if test "${ac_cv_kpthread+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -Kpthread" @@ -5651,32 +5056,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_kpthread=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_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 @@ -5684,8 +5086,8 @@ CC="$ac_save_cc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 -$as_echo "$ac_cv_kpthread" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 +echo "${ECHO_T}$ac_cv_kpthread" >&6; } fi if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no @@ -5695,10 +5097,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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 -$as_echo_n "checking whether $CC accepts -Kthread... " >&6; } +{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 +echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; } if test "${ac_cv_kthread+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -Kthread" @@ -5731,32 +5133,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_kthread=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_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 @@ -5764,8 +5163,8 @@ CC="$ac_save_cc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 -$as_echo "$ac_cv_kthread" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 +echo "${ECHO_T}$ac_cv_kthread" >&6; } fi if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no @@ -5775,10 +5174,10 @@ # 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -pthread" @@ -5811,32 +5210,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=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=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 @@ -5844,8 +5240,8 @@ CC="$ac_save_cc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 -$as_echo "$ac_cv_pthread" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 +echo "${ECHO_T}$ac_cv_pthread" >&6; } fi # If we have set a CC compiler flag for thread support then @@ -5853,8 +5249,8 @@ 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; } +{ 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" @@ -5884,17 +5280,17 @@ fi rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 -$as_echo "$ac_cv_cxx_thread" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 +echo "${ECHO_T}$ac_cv_cxx_thread" >&6; } fi CXX="$ac_save_cxx" # checks for header files -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5921,21 +5317,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_stdc=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_stdc=no @@ -5960,7 +5355,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -5981,7 +5376,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -6027,40 +5422,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 : 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_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; } +{ 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 @@ -6069,6 +5461,75 @@ 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + 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 + 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 + + @@ -6136,21 +5597,20 @@ 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` +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 - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6166,33 +5626,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 $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6206,52 +5665,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: $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;} + { 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:* ) - { $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;} + { 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/ ## @@ -6260,24 +5718,21 @@ ) | 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6291,11 +5746,11 @@ 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; } + 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6321,21 +5776,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 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 eval "$as_ac_Header=no" @@ -6343,15 +5797,12 @@ 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 +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 `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -6360,10 +5811,10 @@ 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; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -6401,30 +5852,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_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 -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 @@ -6439,8 +5886,8 @@ 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; } +{ 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" @@ -6448,10 +5895,10 @@ fi else - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -6489,30 +5936,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_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 -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 @@ -6527,8 +5970,8 @@ 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; } +{ 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" @@ -6537,10 +5980,10 @@ 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6563,50 +6006,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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_header_sys_types_h_makedev=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_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; } +{ 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 - { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -$as_echo_n "checking for sys/mkdev.h... " >&6; } + { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 -$as_echo_n "checking sys/mkdev.h usability... " >&6; } +{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 +echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6622,33 +6061,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 sys/mkdev.h presence" >&5 -$as_echo_n "checking sys/mkdev.h presence... " >&6; } +{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 +echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6662,52 +6100,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: 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;} + { 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:* ) - { $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;} + { 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/ ## @@ -6716,18 +6153,18 @@ ) | 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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; } +{ 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 "x$ac_cv_header_sys_mkdev_h" = x""yes; then +if test $ac_cv_header_sys_mkdev_h = yes; then cat >>confdefs.h <<\_ACEOF #define MAJOR_IN_MKDEV 1 @@ -6739,17 +6176,17 @@ 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; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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_header_sys_sysmacros_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&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; } +{ 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 @@ -6765,33 +6202,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 sys/sysmacros.h presence" >&5 -$as_echo_n "checking sys/sysmacros.h presence... " >&6; } +{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 +echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6805,52 +6241,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: 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;} + { 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:* ) - { $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;} + { 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/ ## @@ -6859,18 +6294,18 @@ ) | 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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; } +{ 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 "x$ac_cv_header_sys_sysmacros_h" = x""yes; then +if test $ac_cv_header_sys_sysmacros_h = yes; then cat >>confdefs.h <<\_ACEOF #define MAJOR_IN_SYSMACROS 1 @@ -6887,11 +6322,11 @@ 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; } +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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6913,21 +6348,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 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 eval "$as_ac_Header=no" @@ -6935,15 +6369,12 @@ 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 +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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6955,11 +6386,11 @@ 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; } +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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6984,21 +6415,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 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 eval "$as_ac_Header=no" @@ -7006,15 +6436,12 @@ 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 +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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7024,8 +6451,8 @@ # 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; } +{ 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 @@ -7047,14 +6474,14 @@ fi -rm -f conftest* +rm -f -r conftest* -{ $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; } # Check whether using makedev requires defining _OSF_SOURCE -{ $as_echo "$as_me:$LINENO: checking for makedev" >&5 -$as_echo_n "checking for makedev... " >&6; } +{ echo "$as_me:$LINENO: checking for makedev" >&5 +echo $ECHO_N "checking for makedev... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7076,30 +6503,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_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 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 conftest.$ac_ext if test "$ac_cv_has_makedev" = "no"; then @@ -7128,30 +6551,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_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 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 conftest.$ac_ext if test "$ac_cv_has_makedev" = "yes"; then @@ -7162,8 +6581,8 @@ fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 -$as_echo "$ac_cv_has_makedev" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 +echo "${ECHO_T}$ac_cv_has_makedev" >&6; } if test "$ac_cv_has_makedev" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -7180,8 +6599,8 @@ # 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; } +{ 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 @@ -7190,125 +6609,13 @@ /* end confdefs.h. */ #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - 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 - sol_lfs_bug=no -else - $as_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 -{ $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 - -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 -{ $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 - ac_cv_type_mode_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 (mode_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. */ -$ac_includes_default +#define _FILE_OFFSET_BITS 64 +#include + int main () { -if (sizeof ((mode_t))) - return 0; +struct rlimit foo; ; return 0; } @@ -7319,66 +6626,75 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_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 - $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 + sol_lfs_bug=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 +{ 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 -fi +cat >>confdefs.h <<\_ACEOF +#define _LARGEFILE_SOURCE 1 +_ACEOF -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 +cat >>confdefs.h <<\_ACEOF +#define _FILE_OFFSET_BITS 64 _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 +# 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 - ac_cv_type_off_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 +typedef mode_t ac__type_new_; int main () { -if (sizeof (off_t)) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -7389,18 +6705,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_cv_type_mode_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_mode_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +if test $ac_cv_type_mode_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +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 +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7408,11 +6750,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef off_t ac__type_new_; int main () { -if (sizeof ((off_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -7423,39 +6768,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_off_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_type_off_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_off_t=no 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 +{ 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 @@ -7465,46 +6801,11 @@ fi -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 -$as_echo_n "checking for pid_t... " >&6; } +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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 @@ -7512,11 +6813,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if (sizeof ((pid_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -7527,39 +6831,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_pid_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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 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 +{ 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 @@ -7569,10 +6864,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } if test "${ac_cv_type_signal+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7597,21 +6892,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_type_signal=int 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 @@ -7619,54 +6913,19 @@ 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; } +{ 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 -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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. */ -$ac_includes_default -int -main () -{ -if (sizeof (size_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 @@ -7674,11 +6933,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if (sizeof ((size_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -7689,39 +6951,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_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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 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 +{ 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 @@ -7731,10 +6984,10 @@ 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7751,11 +7004,11 @@ else ac_cv_type_uid_t=no fi -rm -f conftest* +rm -f -r conftest* fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -7770,10 +7023,10 @@ fi - { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 -$as_echo_n "checking for uint32_t... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + 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' \ @@ -7801,14 +7054,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 @@ -7819,7 +7071,7 @@ esac else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7829,8 +7081,8 @@ 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; } +{ 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) ;; #( *) @@ -7847,10 +7099,10 @@ esac - { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 -$as_echo_n "checking for uint64_t... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + 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' \ @@ -7878,14 +7130,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 @@ -7896,7 +7147,7 @@ esac else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7906,8 +7157,8 @@ 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; } +{ 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) ;; #( *) @@ -7924,10 +7175,10 @@ esac - { $as_echo "$as_me:$LINENO: checking for int32_t" >&5 -$as_echo_n "checking for int32_t... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_int32_t=no for ac_type in 'int32_t' 'int' 'long int' \ @@ -7955,14 +7206,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 @@ -7978,7 +7228,7 @@ 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))]; + < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -7991,21 +7241,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 case $ac_type in @@ -8017,7 +7266,7 @@ 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 @@ -8027,8 +7276,8 @@ 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; } +{ 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) ;; #( *) @@ -8040,10 +7289,10 @@ esac - { $as_echo "$as_me:$LINENO: checking for int64_t" >&5 -$as_echo_n "checking for int64_t... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_int64_t=no for ac_type in 'int64_t' 'int' 'long int' \ @@ -8071,14 +7320,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 @@ -8094,7 +7342,7 @@ 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))]; + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -8107,21 +7355,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 case $ac_type in @@ -8133,7 +7380,7 @@ 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 @@ -8143,8 +7390,8 @@ 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; } +{ 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) ;; #( *) @@ -8155,24 +7402,26 @@ ;; esac -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 -$as_echo_n "checking for ssize_t... " >&6; } +{ echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${ac_cv_type_ssize_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_ssize_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 +typedef ssize_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; } @@ -8183,18 +7432,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_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$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 +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 + +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. */ _ACEOF @@ -8202,11 +7478,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef int 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; } @@ -8217,57 +7496,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_ssize_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_type_int=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_int=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 -_ACEOF - -fi - +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&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; } +{ 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 - $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. @@ -8278,10 +7538,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 (int))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -8294,14 +7555,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 @@ -8315,10 +7575,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 (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8331,21 +7592,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` @@ -8359,7 +7619,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 @@ -8369,10 +7629,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 (int))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -8385,14 +7646,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 @@ -8406,10 +7666,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 (int))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8422,21 +7683,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` @@ -8450,7 +7710,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= @@ -8470,10 +7730,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 (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8486,21 +7747,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` @@ -8511,13 +7771,11 @@ 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) + { { 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) +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_int=0 fi ;; @@ -8530,8 +7788,9 @@ 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)); } + 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 @@ -8541,22 +7800,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (int))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (int)))) + 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 (int)))) + 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; ; @@ -8569,48 +7826,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_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: 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 - { { $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) + { { 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) +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_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 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_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } @@ -8619,14 +7871,68 @@ _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=$? + 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. -{ $as_echo "$as_me:$LINENO: checking size of long" >&5 -$as_echo_n "checking size of long... " >&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 - $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. @@ -8637,10 +7943,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 (long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -8653,14 +7960,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 @@ -8674,10 +7980,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 (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8690,21 +7997,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` @@ -8718,7 +8024,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 @@ -8728,10 +8034,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 (long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -8744,14 +8051,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 @@ -8765,10 +8071,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 (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8781,21 +8088,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` @@ -8809,7 +8115,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= @@ -8829,10 +8135,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 (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8845,21 +8152,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` @@ -8870,13 +8176,11 @@ 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) + { { 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) +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_long=0 fi ;; @@ -8889,8 +8193,9 @@ 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)); } + 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 @@ -8900,22 +8205,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (long))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (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)))) + 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; ; @@ -8928,64 +8231,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_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_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) + { { 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) +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_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_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF +{ echo "$as_me:$LINENO: checking for void *" >&5 +echo $ECHO_N "checking for void *... $ECHO_C" >&6; } +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 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF + 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 void *" >&5 -$as_echo_n "checking size of void *... " >&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 - $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. @@ -8996,10 +8348,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 (void *))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9012,14 +8365,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 @@ -9033,10 +8385,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 (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9049,21 +8402,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` @@ -9077,7 +8429,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 @@ -9087,10 +8439,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 (void *))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9103,14 +8456,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 @@ -9124,10 +8476,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 (void *))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9140,21 +8493,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` @@ -9168,7 +8520,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= @@ -9188,10 +8540,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 (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9204,21 +8557,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` @@ -9229,13 +8581,11 @@ 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 *) + { { 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 *) +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_void_p=0 fi ;; @@ -9248,8 +8598,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 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 @@ -9259,22 +8610,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; ; @@ -9287,48 +8636,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_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_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 *) + { { 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 *) +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_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_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } @@ -9337,14 +8681,68 @@ _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 short" >&5 -$as_echo_n "checking size of short... " >&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 - $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. @@ -9355,10 +8753,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 (short))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9371,14 +8770,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 @@ -9392,10 +8790,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 (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9408,21 +8807,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` @@ -9436,7 +8834,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 @@ -9446,10 +8844,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 (short))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9462,14 +8861,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 @@ -9483,10 +8881,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 (short))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9499,21 +8898,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` @@ -9527,7 +8925,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= @@ -9547,10 +8945,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 (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9563,21 +8962,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` @@ -9588,13 +8986,11 @@ 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) + { { 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) +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_short=0 fi ;; @@ -9607,8 +9003,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 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 @@ -9618,22 +9015,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; ; @@ -9646,48 +9041,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_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_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) + { { 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) +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_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_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } @@ -9696,14 +9086,68 @@ _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 float" >&5 -$as_echo_n "checking size of float... " >&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 - $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. @@ -9714,10 +9158,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 (float))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9730,14 +9175,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 @@ -9751,10 +9195,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 (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9767,21 +9212,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` @@ -9795,7 +9239,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 @@ -9805,10 +9249,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 (float))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9821,14 +9266,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 @@ -9842,10 +9286,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 (float))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9858,21 +9303,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` @@ -9886,7 +9330,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= @@ -9906,10 +9350,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 (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9922,21 +9367,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` @@ -9947,13 +9391,11 @@ 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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (float) +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_float=0 fi ;; @@ -9966,8 +9408,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 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 @@ -9977,22 +9420,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; ; @@ -10005,48 +9446,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_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_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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (float) +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_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_float" >&5 -$as_echo "$ac_cv_sizeof_float" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } @@ -10055,14 +9491,68 @@ _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 double" >&5 -$as_echo_n "checking size of double... " >&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 - $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. @@ -10073,10 +9563,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 (double))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10089,14 +9580,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 @@ -10110,10 +9600,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 (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10126,21 +9617,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` @@ -10154,7 +9644,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 @@ -10164,10 +9654,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 (double))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10180,14 +9671,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 @@ -10201,10 +9691,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 (double))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10217,21 +9708,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` @@ -10245,7 +9735,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= @@ -10265,10 +9755,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 (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10281,21 +9772,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` @@ -10306,13 +9796,11 @@ 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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (double) +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_double=0 fi ;; @@ -10325,8 +9813,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 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 @@ -10336,22 +9825,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; ; @@ -10364,48 +9851,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_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_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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (double) +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_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_double" >&5 -$as_echo "$ac_cv_sizeof_double" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 +echo "${ECHO_T}$ac_cv_sizeof_double" >&6; } @@ -10414,14 +9896,68 @@ _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 fpos_t" >&5 -$as_echo_n "checking size of fpos_t... " >&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 - $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. @@ -10432,10 +9968,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 (fpos_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10448,14 +9985,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 @@ -10469,10 +10005,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 (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10485,21 +10022,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` @@ -10513,7 +10049,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 @@ -10523,10 +10059,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 (fpos_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10539,14 +10076,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 @@ -10560,10 +10096,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 (fpos_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10576,21 +10113,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` @@ -10604,7 +10140,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= @@ -10624,10 +10160,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 (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10640,21 +10177,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` @@ -10665,13 +10201,11 @@ 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) + { { 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 (fpos_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_fpos_t=0 fi ;; @@ -10684,8 +10218,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 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 @@ -10695,22 +10230,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; ; @@ -10723,48 +10256,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_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_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) + { { 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 (fpos_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_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_fpos_t" >&5 -$as_echo "$ac_cv_sizeof_fpos_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; } @@ -10773,14 +10301,68 @@ _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 + *\"* | *\`* | *\\*) 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_size_t=yes +else + 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 +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 size_t" >&5 -$as_echo_n "checking size of size_t... " >&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 - $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. @@ -10791,10 +10373,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 (size_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10807,14 +10390,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 @@ -10828,10 +10410,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 (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10844,21 +10427,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` @@ -10872,7 +10454,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 @@ -10882,10 +10464,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 (size_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10898,14 +10481,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 @@ -10919,10 +10501,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 (size_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10935,21 +10518,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` @@ -10963,7 +10545,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= @@ -10983,10 +10565,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 (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10999,21 +10582,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` @@ -11024,13 +10606,11 @@ 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) + { { 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) +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_size_t=0 fi ;; @@ -11043,8 +10623,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 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 @@ -11054,22 +10635,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; ; @@ -11082,64 +10661,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` 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) + { { 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) +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_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_size_t" >&5 -$as_echo "$ac_cv_sizeof_size_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF +{ echo "$as_me:$LINENO: checking for 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 () +{ +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_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t -_ACEOF + 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; } # 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; } +{ 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 - $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. @@ -11150,10 +10778,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 (pid_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11166,14 +10795,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 @@ -11187,10 +10815,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 (pid_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11203,21 +10832,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` @@ -11231,7 +10859,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 @@ -11241,10 +10869,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 (pid_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -11257,14 +10886,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 @@ -11278,10 +10906,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 (pid_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11294,21 +10923,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` @@ -11322,7 +10950,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= @@ -11342,10 +10970,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 (pid_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11358,21 +10987,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` @@ -11383,13 +11011,11 @@ 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) + { { 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 (pid_t) +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_pid_t=0 fi ;; @@ -11402,8 +11028,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 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 @@ -11413,22 +11040,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; ; @@ -11441,48 +11066,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_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_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) + { { 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 (pid_t) +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_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_pid_t" >&5 -$as_echo "$ac_cv_sizeof_pid_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; } @@ -11492,8 +11112,8 @@ -{ $as_echo "$as_me:$LINENO: checking for long long support" >&5 -$as_echo_n "checking for long long support... " >&6; } +{ echo "$as_me:$LINENO: checking for long long support" >&5 +echo $ECHO_N "checking for long long support... $ECHO_C" >&6; } have_long_long=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -11516,14 +11136,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 @@ -11537,24 +11156,78 @@ 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_long_long" >&5 -$as_echo "$have_long_long" >&6; } +{ 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 long long" >&5 -$as_echo_n "checking size of long long... " >&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 - $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. @@ -11565,10 +11238,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 (long long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11581,14 +11255,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 @@ -11602,10 +11275,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 (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11618,21 +11292,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` @@ -11646,7 +11319,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 @@ -11656,10 +11329,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 (long long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -11672,14 +11346,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 @@ -11693,10 +11366,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 (long long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11709,21 +11383,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` @@ -11737,7 +11410,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= @@ -11757,10 +11430,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 (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11773,21 +11447,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` @@ -11798,13 +11471,11 @@ 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) + { { 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 (long long) +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_long_long=0 fi ;; @@ -11817,8 +11488,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 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 @@ -11828,22 +11500,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; ; @@ -11856,48 +11526,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_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_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) + { { 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 (long long) +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_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_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } @@ -11908,8 +11573,8 @@ fi -{ $as_echo "$as_me:$LINENO: checking for long double support" >&5 -$as_echo_n "checking for long double support... " >&6; } +{ 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. */ @@ -11932,14 +11597,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 @@ -11953,24 +11617,78 @@ have_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 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; } +{ 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; } + # 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; } +{ 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 - $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. @@ -11981,10 +11699,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 (long double))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11997,14 +11716,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 @@ -12018,10 +11736,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 (long double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12034,21 +11753,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` @@ -12062,7 +11780,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 @@ -12072,10 +11790,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 (long double))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12088,14 +11807,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 @@ -12109,10 +11827,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 (long double))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12125,21 +11844,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` @@ -12153,7 +11871,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= @@ -12173,10 +11891,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 (long double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12189,21 +11908,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` @@ -12214,13 +11932,11 @@ 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) + { { 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 (long double) +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_double=0 fi ;; @@ -12233,8 +11949,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 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 @@ -12244,22 +11961,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; ; @@ -12272,48 +11987,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_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_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) + { { 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 (long double) +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_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_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; } @@ -12325,8 +12035,8 @@ fi -{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5 -$as_echo_n "checking for _Bool support... " >&6; } +{ echo "$as_me:$LINENO: checking for _Bool support" >&5 +echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; } have_c99_bool=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -12349,14 +12059,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 @@ -12370,24 +12079,78 @@ have_c99_bool=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; } +{ 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 _Bool" >&5 -$as_echo_n "checking size of _Bool... " >&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 - $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. @@ -12398,10 +12161,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -12414,14 +12178,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 @@ -12435,10 +12198,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12451,21 +12215,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` @@ -12479,7 +12242,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 @@ -12489,10 +12252,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12505,14 +12269,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 @@ -12526,10 +12289,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12542,21 +12306,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` @@ -12570,7 +12333,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= @@ -12590,10 +12353,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12606,21 +12370,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` @@ -12631,13 +12394,11 @@ 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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (_Bool) +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__Bool=0 fi ;; @@ -12650,8 +12411,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 _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 @@ -12661,22 +12423,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; ; @@ -12689,48 +12449,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__Bool=`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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (_Bool) +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__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 -{ $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__Bool" >&5 +echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; } @@ -12741,13 +12496,12 @@ fi -{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5 -$as_echo_n "checking for uintptr_t... " >&6; } +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_uintptr_t=no -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12757,11 +12511,14 @@ #include #endif +typedef uintptr_t 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; } @@ -12772,33 +12529,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_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. */ -#ifdef HAVE_STDINT_H - #include - #endif - +$ac_includes_default +typedef uintptr_t 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; } @@ -12809,52 +12588,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_uintptr_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_uintptr_t=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_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 uintptr_t" >&5 -$as_echo_n "checking size of uintptr_t... " >&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 - $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. @@ -12865,10 +12630,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -12881,14 +12647,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 @@ -12902,10 +12667,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12918,21 +12684,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` @@ -12946,7 +12711,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 @@ -12956,10 +12721,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12972,14 +12738,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 @@ -12993,10 +12758,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13009,21 +12775,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` @@ -13037,7 +12802,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= @@ -13057,10 +12822,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13073,21 +12839,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` @@ -13098,13 +12863,11 @@ 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) + { { 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 (uintptr_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_uintptr_t=0 fi ;; @@ -13117,8 +12880,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 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 @@ -13128,22 +12892,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; ; @@ -13156,48 +12918,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_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_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) + { { 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 (uintptr_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_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_uintptr_t" >&5 -$as_echo "$ac_cv_sizeof_uintptr_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; } @@ -13209,14 +12966,73 @@ 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 +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_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_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; } + # 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; } +{ 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 - $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. @@ -13232,10 +13048,11 @@ #endif + typedef off_t 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 ; @@ -13248,14 +13065,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 @@ -13274,10 +13090,11 @@ #endif + typedef off_t 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 ; @@ -13290,21 +13107,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` @@ -13318,7 +13134,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 @@ -13333,10 +13149,11 @@ #endif + typedef off_t 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 ; @@ -13349,14 +13166,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 @@ -13375,10 +13191,11 @@ #endif + typedef off_t 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 ; @@ -13391,21 +13208,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` @@ -13419,7 +13235,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= @@ -13444,10 +13260,11 @@ #endif + typedef off_t 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 ; @@ -13460,21 +13277,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` @@ -13485,13 +13301,11 @@ 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) + { { 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) +echo "$as_me: error: cannot compute sizeof (off_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else ac_cv_sizeof_off_t=0 fi ;; @@ -13509,8 +13323,9 @@ #endif -static long int longval () { return (long int) (sizeof (off_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (off_t)); } + 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 @@ -13520,22 +13335,20 @@ 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; ; @@ -13548,48 +13361,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_off_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_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) + { { 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) +echo "$as_me: error: cannot compute sizeof (off_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (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; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; } @@ -13599,31 +13407,93 @@ -{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5 -$as_echo_n "checking whether to enable large file support... " >&6; } +{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5 +echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; } if test "$have_long_long" = yes -a \ "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LARGEFILE_SUPPORT 1 -_ACEOF +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 - { $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_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. -{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5 -$as_echo_n "checking size of time_t... " >&6; } +{ echo "$as_me:$LINENO: checking size of time_t" >&5 +echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_time_t+set}" = set; then - $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. @@ -13642,10 +13512,11 @@ #endif + typedef time_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 ; @@ -13658,14 +13529,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 @@ -13687,10 +13557,11 @@ #endif + typedef time_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 ; @@ -13703,21 +13574,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` @@ -13731,7 +13601,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 @@ -13749,10 +13619,11 @@ #endif + typedef time_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 ; @@ -13765,14 +13636,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 @@ -13794,10 +13664,11 @@ #endif + typedef time_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 ; @@ -13810,21 +13681,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` @@ -13838,7 +13708,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= @@ -13866,10 +13736,11 @@ #endif + typedef time_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 ; @@ -13882,21 +13753,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` @@ -13907,13 +13777,11 @@ 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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_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 (time_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else ac_cv_sizeof_time_t=0 fi ;; @@ -13934,8 +13802,9 @@ #endif -static long int longval () { return (long int) (sizeof (time_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (time_t)); } + 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 @@ -13945,22 +13814,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; ; @@ -13973,48 +13840,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_time_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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_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 (time_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else 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 -{ $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_time_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; } @@ -14034,8 +13896,8 @@ then CC="$CC -pthread" fi -{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5 -$as_echo_n "checking for pthread_t... " >&6; } +{ echo "$as_me:$LINENO: checking for pthread_t" >&5 +echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; } have_pthread_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -14058,38 +13920,96 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_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 + 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; } +{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5 +echo "${ECHO_T}$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 + { 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. -{ $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5 -$as_echo_n "checking size of pthread_t... " >&6; } +{ echo "$as_me:$LINENO: checking size of pthread_t" >&5 +echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_pthread_t+set}" = set; then - $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. @@ -14105,10 +14025,11 @@ #endif + typedef pthread_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -14121,14 +14042,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 @@ -14147,10 +14067,11 @@ #endif + typedef pthread_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -14163,21 +14084,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` @@ -14191,7 +14111,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 @@ -14206,10 +14126,11 @@ #endif + typedef pthread_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -14222,14 +14143,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 @@ -14248,10 +14168,11 @@ #endif + typedef pthread_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -14264,21 +14185,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` @@ -14292,7 +14212,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= @@ -14317,10 +14237,11 @@ #endif + typedef pthread_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -14333,21 +14254,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` @@ -14358,13 +14278,11 @@ 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) + { { 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) +echo "$as_me: error: cannot compute sizeof (pthread_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (exit 77); exit 77; }; } else ac_cv_sizeof_pthread_t=0 fi ;; @@ -14382,8 +14300,9 @@ #endif -static long int longval () { return (long int) (sizeof (pthread_t)); } -static unsigned long int ulongval () { return (long int) (sizeof (pthread_t)); } + 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 @@ -14393,22 +14312,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (pthread_t))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (pthread_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 (pthread_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; ; @@ -14421,48 +14338,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_pthread_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_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) + { { 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) +echo "$as_me: error: cannot compute sizeof (pthread_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } + { (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; } @@ -14532,32 +14444,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_osx_32bit=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_osx_32bit=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 @@ -14572,8 +14481,8 @@ MACOSX_DEFAULT_ARCH="ppc" ;; *) - { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 -$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -14586,8 +14495,8 @@ MACOSX_DEFAULT_ARCH="ppc64" ;; *) - { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 -$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -14600,8 +14509,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" @@ -14612,21 +14521,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/*) @@ -14634,12 +14543,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 @@ -14651,8 +14560,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 @@ -14677,8 +14586,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 @@ -14689,8 +14598,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 @@ -14791,13 +14700,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 @@ -14831,12 +14740,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 +14792,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 +14810,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 +14822,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 +14869,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 +14905,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 +14940,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 +14978,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 +15019,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 +15053,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 +15066,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 +15101,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 @@ -15246,8 +15139,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 @@ -15269,47 +15162,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" @@ -15341,44 +15230,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,60 +15295,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 @@ -15471,41 +15352,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 @@ -15516,8 +15397,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="" @@ -15531,22 +15412,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 @@ -15559,8 +15440,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 @@ -15579,8 +15460,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" @@ -15646,8 +15527,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 @@ -15667,27 +15548,27 @@ else unistd_defines_pthreads=no fi -rm -f conftest* +rm -f -r 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 @@ -15703,33 +15584,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 @@ -15743,52 +15623,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/ ## @@ -15797,18 +15676,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 @@ -15827,17 +15706,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 @@ -15853,33 +15732,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 @@ -15893,52 +15771,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/ ## @@ -15947,18 +15824,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 @@ -15975,13 +15852,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 @@ -15994,16 +15871,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 @@ -16028,24 +15905,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 @@ -16053,15 +15927,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. */ @@ -16114,36 +15988,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 @@ -16153,17 +16023,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 @@ -16179,33 +16049,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 @@ -16219,52 +16088,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/ ## @@ -16273,18 +16141,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 @@ -16297,10 +16165,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" @@ -16332,37 +16200,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 @@ -16372,10 +16236,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" @@ -16407,37 +16271,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 @@ -16447,10 +16307,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" @@ -16482,37 +16342,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 @@ -16522,10 +16378,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" @@ -16557,37 +16413,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 @@ -16614,7 +16466,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 @@ -16626,10 +16477,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" @@ -16661,37 +16512,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 @@ -16703,10 +16550,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" @@ -16738,37 +16585,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 @@ -16821,10 +16664,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 @@ -16854,32 +16697,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 @@ -16887,8 +16727,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 @@ -16899,11 +16739,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. */ @@ -16956,42 +16796,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*) @@ -17011,18 +16844,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 @@ -17033,8 +16866,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 @@ -17062,44 +16895,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 @@ -17123,27 +16953,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 @@ -17165,8 +16994,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 @@ -17187,7 +17016,7 @@ $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f conftest* +rm -f -r conftest* ;; kame) @@ -17210,7 +17039,7 @@ ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-glibc) @@ -17231,7 +17060,7 @@ ipv6type=$i; ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-inet6) @@ -17269,7 +17098,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; v6d) @@ -17292,7 +17121,7 @@ ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; zeta) @@ -17314,7 +17143,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; esac @@ -17322,8 +17151,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 @@ -17342,8 +17171,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 @@ -17365,14 +17194,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 @@ -17382,22 +17210,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 @@ -17416,12 +17244,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 @@ -17433,20 +17261,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 @@ -17465,12 +17293,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 @@ -17482,14 +17310,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 @@ -17502,11 +17330,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. */ @@ -17559,42 +17387,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 @@ -17604,8 +17425,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 @@ -17629,8 +17450,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 @@ -17643,16 +17464,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 @@ -17759,11 +17580,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. */ @@ -17816,42 +17637,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 @@ -17860,8 +17674,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 @@ -17883,14 +17697,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 @@ -17900,20 +17713,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 @@ -17935,14 +17748,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 @@ -17952,20 +17764,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 @@ -17987,14 +17799,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 @@ -18004,20 +17815,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 @@ -18039,14 +17850,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 @@ -18056,20 +17866,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 @@ -18091,14 +17901,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 @@ -18108,20 +17917,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 @@ -18143,14 +17952,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 @@ -18160,20 +17968,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 @@ -18195,14 +18003,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 @@ -18212,20 +18019,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 @@ -18250,14 +18057,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 @@ -18267,14 +18073,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 @@ -18285,8 +18091,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 @@ -18311,14 +18117,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 @@ -18328,21 +18133,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 @@ -18367,14 +18172,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 @@ -18384,21 +18188,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 @@ -18423,14 +18227,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 @@ -18440,14 +18243,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 @@ -18457,10 +18260,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. @@ -18473,7 +18276,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 @@ -18484,11 +18287,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 @@ -18497,10 +18300,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" @@ -18532,44 +18335,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" @@ -18601,37 +18400,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 @@ -18646,10 +18441,10 @@ # 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; } +{ echo "$as_me:$LINENO: checking for chflags" >&5 +echo $ECHO_N "checking for chflags... $ECHO_C" >&6; } if test "${ac_cv_have_chflags+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_have_chflags=no @@ -18677,32 +18472,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_have_chflags=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_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 @@ -18710,8 +18502,8 @@ fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5 -$as_echo "$ac_cv_have_chflags" >&6; } +{ 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 @@ -18721,10 +18513,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5 -$as_echo_n "checking for lchflags... " >&6; } +{ echo "$as_me:$LINENO: checking for lchflags" >&5 +echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; } if test "${ac_cv_have_lchflags+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_have_lchflags=no @@ -18752,32 +18544,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_have_lchflags=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_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 @@ -18785,8 +18574,8 @@ fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5 -$as_echo "$ac_cv_have_lchflags" >&6; } +{ 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 @@ -18805,10 +18594,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" @@ -18840,37 +18629,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 @@ -18886,8 +18671,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 @@ -18912,43 +18697,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 @@ -18976,43 +18757,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 @@ -19040,14 +18817,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 @@ -19057,22 +18833,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 @@ -19100,14 +18876,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 @@ -19117,14 +18892,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 @@ -19135,11 +18910,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. */ @@ -19192,49 +18967,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" @@ -19266,46 +19034,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" @@ -19337,37 +19101,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 @@ -19384,11 +19144,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. */ @@ -19441,49 +19201,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" @@ -19515,46 +19268,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" @@ -19586,37 +19335,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 @@ -19635,11 +19380,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. */ @@ -19692,42 +19437,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 @@ -19743,11 +19481,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. */ @@ -19800,42 +19538,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 @@ -19847,11 +19578,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. */ @@ -19904,42 +19635,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 @@ -19956,11 +19680,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. */ @@ -20013,42 +19737,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. */ @@ -20071,14 +19788,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 @@ -20090,7 +19806,7 @@ else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20104,11 +19820,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. */ @@ -20161,42 +19877,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. */ @@ -20219,14 +19928,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 @@ -20238,7 +19946,7 @@ else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20252,11 +19960,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. */ @@ -20309,42 +20017,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. */ @@ -20367,21 +20068,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 @@ -20398,8 +20098,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 @@ -20431,48 +20131,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 @@ -20499,40 +20195,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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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 have_getaddrinfo=yes else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; } +{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5 +echo "${ECHO_T}$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; } + { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 +echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; } if test "${ac_cv_buggy_getaddrinfo+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_buggy_getaddrinfo=yes @@ -20637,32 +20329,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_buggy_getaddrinfo=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 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 @@ -20689,11 +20378,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. */ @@ -20746,42 +20435,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 @@ -20789,10 +20471,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. */ @@ -20819,21 +20501,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 @@ -20841,8 +20522,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 @@ -20851,10 +20532,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. */ @@ -20870,7 +20551,7 @@ { struct tm tm; int *p = &tm.tm_sec; - return !p; + return !p; ; return 0; } @@ -20881,21 +20562,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 @@ -20903,8 +20583,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 @@ -20913,10 +20593,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. */ @@ -20944,21 +20624,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 @@ -20987,21 +20666,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 @@ -21012,9 +20690,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 @@ -21030,10 +20708,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. */ @@ -21060,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_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 @@ -21082,9 +20759,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 @@ -21100,10 +20777,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. */ @@ -21130,35 +20807,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 @@ -21168,10 +20841,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. */ @@ -21196,21 +20869,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 @@ -21236,21 +20908,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 @@ -21261,9 +20932,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 @@ -21272,10 +20943,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. */ @@ -21300,21 +20971,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 @@ -21340,21 +21010,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 @@ -21365,9 +21034,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 @@ -21376,10 +21045,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. */ @@ -21404,21 +21073,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 @@ -21444,21 +21112,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 @@ -21469,9 +21136,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 @@ -21480,10 +21147,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. */ @@ -21508,21 +21175,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 @@ -21548,21 +21214,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 @@ -21573,9 +21238,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 @@ -21584,10 +21249,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. */ @@ -21612,21 +21277,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 @@ -21652,21 +21316,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 @@ -21677,9 +21340,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 @@ -21688,10 +21351,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. */ @@ -21716,21 +21379,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 @@ -21756,21 +21418,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 @@ -21781,9 +21442,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 @@ -21805,10 +21466,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. */ @@ -21831,21 +21492,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 @@ -21854,8 +21514,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 @@ -21865,8 +21525,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 @@ -21892,14 +21552,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 @@ -21913,20 +21572,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. */ @@ -21950,21 +21609,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 @@ -21973,8 +21631,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 @@ -21983,10 +21641,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. */ @@ -22011,21 +21669,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 @@ -22034,8 +21691,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 @@ -22047,10 +21704,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. */ @@ -22075,21 +21732,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 @@ -22097,8 +21753,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 @@ -22106,10 +21762,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. */ @@ -22181,21 +21837,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 @@ -22203,20 +21858,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 @@ -22238,38 +21893,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 @@ -22291,38 +21945,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 @@ -22344,14 +21997,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 @@ -22365,19 +22017,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 @@ -22409,14 +22061,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 @@ -22430,19 +22081,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 @@ -22467,14 +22118,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 @@ -22484,22 +22134,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 @@ -22523,38 +22173,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 @@ -22582,21 +22231,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 @@ -22610,17 +22258,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. */ @@ -22673,43 +22321,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 @@ -22743,14 +22387,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 @@ -22765,18 +22408,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 @@ -22808,14 +22451,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 @@ -22830,18 +22472,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 @@ -22871,14 +22513,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 @@ -22893,16 +22534,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 @@ -22922,11 +22563,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. */ @@ -22979,42 +22620,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 @@ -23033,10 +22667,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. */ @@ -23089,43 +22723,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" @@ -23157,37 +22787,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 @@ -23201,8 +22827,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 @@ -23214,14 +22840,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 @@ -23231,53 +22857,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 @@ -23285,10 +22911,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 @@ -23317,40 +22943,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 @@ -23360,10 +22983,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 @@ -23392,40 +23015,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 @@ -23439,10 +23059,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 @@ -23471,40 +23091,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 @@ -23524,8 +23141,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 @@ -23551,29 +23168,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 @@ -23589,8 +23205,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" @@ -23630,39 +23246,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 @@ -23681,10 +23294,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 @@ -23715,40 +23328,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 @@ -23769,11 +23379,11 @@ for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma 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. */ @@ -23826,42 +23436,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 @@ -23874,11 +23477,11 @@ for ac_func in hypot lgamma log1p round tgamma 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. */ @@ -23931,51 +23534,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. */ @@ -24002,21 +23598,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 @@ -24024,9 +23619,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 @@ -24040,10 +23635,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. */ @@ -24070,21 +23665,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 @@ -24092,9 +23686,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 @@ -24108,10 +23702,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. */ @@ -24138,21 +23732,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 @@ -24160,9 +23753,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 @@ -24182,10 +23775,10 @@ 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; } +{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5 +echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; } if test "${ac_cv_broken_sem_getvalue+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_broken_sem_getvalue=yes @@ -24224,32 +23817,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_broken_sem_getvalue=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_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 @@ -24257,8 +23847,8 @@ fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5 -$as_echo "$ac_cv_broken_sem_getvalue" >&6; } +{ 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 @@ -24269,8 +23859,8 @@ 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 @@ -24281,12 +23871,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 @@ -24294,24 +23884,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 @@ -24327,33 +23917,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 @@ -24367,52 +23956,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/ ## @@ -24421,18 +24009,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 @@ -24451,14 +24039,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. @@ -24470,10 +24113,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 ; @@ -24486,14 +24130,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 @@ -24508,10 +24151,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 ; @@ -24524,21 +24168,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` @@ -24552,7 +24195,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 @@ -24563,10 +24206,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 ; @@ -24579,14 +24223,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 @@ -24601,10 +24244,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 ; @@ -24617,21 +24261,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` @@ -24645,7 +24288,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= @@ -24666,10 +24309,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 ; @@ -24682,21 +24326,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` @@ -24707,13 +24350,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 ;; @@ -24727,8 +24368,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 @@ -24738,22 +24380,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; ; @@ -24766,48 +24406,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; } @@ -24818,8 +24453,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. */ @@ -24846,14 +24481,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 @@ -24867,24 +24501,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 @@ -24911,44 +24545,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 @@ -24991,202 +24622,56 @@ PY_UNICODE_TYPE="wchar_t" cat >>confdefs.h <<\_ACEOF -#define HAVE_USABLE_WCHAR_T 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define PY_UNICODE_TYPE wchar_t -_ACEOF - -elif test "$ac_cv_sizeof_short" = "$unicode_size" -then - PY_UNICODE_TYPE="unsigned short" - cat >>confdefs.h <<\_ACEOF -#define PY_UNICODE_TYPE unsigned short -_ACEOF - -elif test "$ac_cv_sizeof_long" = "$unicode_size" -then - 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; } - -# 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; -} +#define HAVE_USABLE_WCHAR_T 1 _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 + cat >>confdefs.h <<\_ACEOF +#define PY_UNICODE_TYPE wchar_t +_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 +elif test "$ac_cv_sizeof_short" = "$unicode_size" +then + PY_UNICODE_TYPE="unsigned short" + cat >>confdefs.h <<\_ACEOF +#define PY_UNICODE_TYPE unsigned short +_ACEOF +elif test "$ac_cv_sizeof_long" = "$unicode_size" +then + PY_UNICODE_TYPE="unsigned long" + cat >>confdefs.h <<\_ACEOF +#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; } -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; @@ -25198,33 +24683,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; @@ -25236,21 +24721,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 @@ -25258,44 +24742,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; } @@ -25306,31 +24775,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 @@ -25349,14 +24817,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; @@ -25368,70 +24836,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 @@ -25456,40 +24917,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 @@ -25500,10 +24958,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 @@ -25532,36 +24990,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 @@ -25579,8 +25033,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" @@ -25616,30 +25070,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 @@ -25649,11 +25099,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 @@ -25662,10 +25112,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" @@ -25697,37 +25147,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 @@ -25750,21 +25196,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 @@ -25790,15 +25235,15 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* 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" @@ -25830,37 +25275,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 @@ -25870,10 +25311,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" @@ -25905,37 +25346,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 @@ -25945,10 +25382,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" @@ -25980,37 +25417,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 @@ -26033,21 +25466,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 @@ -26073,17 +25505,17 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi # 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 @@ -26111,40 +25543,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 @@ -26154,10 +25583,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5 -$as_echo_n "checking for broken poll()... " >&6; } +{ echo "$as_me:$LINENO: checking for broken poll()" >&5 +echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; } if test "${ac_cv_broken_poll+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_broken_poll=no @@ -26194,40 +25623,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_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 @@ -26240,10 +25666,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. */ @@ -26271,21 +25697,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 @@ -26314,21 +25739,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 @@ -26339,9 +25763,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 @@ -26357,10 +25781,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. */ @@ -26387,21 +25811,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 @@ -26409,9 +25832,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 @@ -26427,10 +25850,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. */ @@ -26457,35 +25880,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 @@ -26497,10 +25916,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 @@ -26583,40 +26002,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 @@ -26627,10 +26043,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. */ @@ -26656,21 +26072,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 @@ -26679,8 +26094,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 @@ -26691,10 +26106,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. */ @@ -26720,21 +26135,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 @@ -26743,8 +26157,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 @@ -26755,10 +26169,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. */ @@ -26784,21 +26198,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 @@ -26807,8 +26220,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 @@ -26819,10 +26232,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. */ @@ -26848,21 +26261,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 @@ -26871,8 +26283,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 @@ -26884,8 +26296,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 @@ -26907,14 +26319,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 @@ -26924,21 +26335,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 @@ -26960,14 +26371,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 @@ -26977,21 +26387,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 @@ -27013,14 +26423,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 @@ -27030,57 +26439,57 @@ #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; } +{ 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 "${ac_cv_have_size_t_format+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_have_size_t_format=no @@ -27134,32 +26543,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_have_size_t_format=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_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 @@ -27167,8 +26573,8 @@ fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5 -$as_echo "$ac_cv_have_size_t_format" >&6; } +{ 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 @@ -27178,54 +26584,11 @@ 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 @@ -27241,11 +26604,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; } @@ -27256,39 +26622,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 @@ -27299,10 +26656,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 -$as_echo_n "checking for broken mbstowcs... " >&6; } +{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 +echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; } if test "${ac_cv_broken_mbstowcs+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_broken_mbstowcs=no @@ -27329,40 +26686,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_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 @@ -27373,8 +26727,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 @@ -27386,14 +26740,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 @@ -27407,15 +26761,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" @@ -27447,12 +26801,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 @@ -27485,12 +26838,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 @@ -27506,7 +26859,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" @@ -27518,14 +26871,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. @@ -27538,7 +26889,7 @@ SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -27548,7 +26899,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 @@ -27570,45 +26921,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. @@ -27624,6 +26947,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. @@ -27646,7 +26971,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 @@ -27659,10 +26984,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 && @@ -27684,7 +27016,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 @@ -27735,7 +27067,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 @@ -27763,6 +27095,7 @@ *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -27775,22 +27108,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 @@ -27815,10 +27145,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 @@ -27841,7 +27171,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 @@ -27854,39 +27184,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 @@ -27897,24 +27217,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 @@ -27936,36 +27256,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; }; } ;; @@ -27984,32 +27298,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 @@ -28024,8 +27336,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 @@ -28065,145 +27377,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=' -' -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 @@ -28219,133 +27610,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;; @@ -28374,38 +27651,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 @@ -28415,7 +27680,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 @@ -28441,7 +27706,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" @@ -28450,7 +27715,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 @@ -28471,17 +27736,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/ ;; @@ -28521,13 +27786,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 } @@ -28536,14 +27800,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 @@ -28557,16 +27820,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 @@ -28576,58 +27838,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" ;; @@ -28641,11 +27964,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. @@ -28667,10 +27985,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/configure.in ============================================================================== --- python/branches/py3k/configure.in (original) +++ python/branches/py3k/configure.in Sun Sep 20 22:09:26 2009 @@ -916,7 +916,7 @@ ARCH_RUN_32BIT="arch -i386 -ppc" else - AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all]) + AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way]) fi From python-checkins at python.org Sun Sep 20 22:10:03 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 20:10:03 -0000 Subject: [Python-checkins] r74980 - in python/branches/release31-maint: configure configure.in Message-ID: Author: ronald.oussoren Date: Sun Sep 20 22:10:02 2009 New Revision: 74980 Log: Merged revisions 74979 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74979 | ronald.oussoren | 2009-09-20 22:09:26 +0200 (Sun, 20 Sep 2009) | 9 lines Merged revisions 74978 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74978 | ronald.oussoren | 2009-09-20 22:05:44 +0200 (Sun, 20 Sep 2009) | 2 lines Fix typo in error message ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/configure python/branches/release31-maint/configure.in Modified: python/branches/release31-maint/configure ============================================================================== --- python/branches/release31-maint/configure (original) +++ python/branches/release31-maint/configure Sun Sep 20 22:10:02 2009 @@ -1,12 +1,12 @@ #! /bin/sh -# From configure.in Revision: 74714 . +# From configure.in Revision: 74747 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for python 3.1. +# Generated by GNU Autoconf 2.61 for python 3.1. # # 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.1 -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.1, 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 @@ -2033,20 +1911,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 @@ -2168,8 +2046,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` @@ -2332,8 +2210,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 @@ -2343,11 +2221,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 @@ -2359,8 +2237,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 @@ -2382,15 +2260,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 @@ -2403,10 +2281,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. @@ -2419,7 +2297,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 @@ -2430,11 +2308,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 @@ -2443,10 +2321,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. @@ -2459,7 +2337,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 @@ -2470,11 +2348,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 @@ -2482,8 +2360,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 @@ -2496,10 +2378,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. @@ -2512,7 +2394,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 @@ -2523,11 +2405,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 @@ -2536,10 +2418,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. @@ -2557,7 +2439,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 @@ -2580,11 +2462,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 @@ -2595,10 +2477,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. @@ -2611,7 +2493,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 @@ -2622,11 +2504,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 @@ -2639,10 +2521,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. @@ -2655,7 +2537,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 @@ -2666,11 +2548,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 @@ -2682,8 +2564,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 @@ -2693,50 +2579,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 @@ -2755,22 +2635,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 @@ -2781,11 +2666,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' @@ -2796,7 +2680,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 @@ -2823,27 +2707,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 @@ -2852,53 +2734,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 @@ -2907,33 +2785,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. */ @@ -2956,43 +2832,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. */ @@ -3018,21 +2891,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 @@ -3042,19 +2914,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 @@ -3081,21 +2949,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="" @@ -3120,21 +2987,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 @@ -3160,21 +3026,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 @@ -3189,8 +3054,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 @@ -3206,10 +3071,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 @@ -3280,21 +3145,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 @@ -3310,15 +3174,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 @@ -3331,8 +3195,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 @@ -3357,8 +3221,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" @@ -3366,10 +3230,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 [\\/]* | ?:[\\/]*) @@ -3384,7 +3248,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 @@ -3397,20 +3261,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 [\\/]* | ?:[\\/]*) @@ -3425,7 +3289,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 @@ -3438,11 +3302,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 ;; @@ -3458,10 +3322,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. @@ -3474,7 +3338,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 @@ -3485,11 +3349,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 @@ -3504,12 +3368,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. @@ -3524,15 +3388,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" @@ -3564,21 +3428,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. @@ -3602,14 +3465,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 @@ -3617,7 +3479,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. @@ -3642,8 +3504,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 @@ -3671,21 +3533,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. @@ -3709,14 +3570,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 @@ -3724,7 +3584,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. @@ -3740,13 +3600,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 @@ -3756,37 +3614,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` @@ -3801,60 +3664,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` @@ -3869,510 +3746,63 @@ 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 -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;} - { (exit 1); exit 1; }; } - 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; } - 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 -/* 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 - -# 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=`$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 +IFS=$as_save_IFS - - 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 +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 -{ $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 +else + ac_cv_path_EGREP=$EGREP +fi - cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF - cat >>confdefs.h <<\_ACEOF -#define _POSIX_PTHREAD_SEMANTICS 1 + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +{ echo "$as_me:$LINENO: checking for AIX" >&5 +echo $ECHO_N "checking for AIX... $ECHO_C" >&6; } +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 - cat >>confdefs.h <<\_ACEOF -#define _TANDEM_SOURCE 1 _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 +_ACEOF + +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +rm -f -r conftest* @@ -4385,8 +3815,8 @@ esac -{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5 -$as_echo_n "checking for --with-suffix... " >&6; } +{ 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 @@ -4398,26 +3828,26 @@ esac fi -{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5 -$as_echo "$EXEEXT" >&6; } +{ 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 -{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 -$as_echo_n "checking for case-insensitive build directory... " >&6; } +{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 +echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; } if test ! -d CaseSensitiveTestDir; then mkdir CaseSensitiveTestDir fi if test -d casesensitivetestdir then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } BUILDEXEEXT=.exe 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; } BUILDEXEEXT=$EXEEXT fi rmdir CaseSensitiveTestDir @@ -4446,14 +3876,14 @@ -{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5 -$as_echo_n "checking LIBRARY... " >&6; } +{ echo "$as_me:$LINENO: checking LIBRARY" >&5 +echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; } if test -z "$LIBRARY" then LIBRARY='libpython$(VERSION).a' fi -{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5 -$as_echo "$LIBRARY" >&6; } +{ echo "$as_me:$LINENO: result: $LIBRARY" >&5 +echo "${ECHO_T}$LIBRARY" >&6; } # LDLIBRARY is the name of the library to link against (as opposed to the # name of the library into which to insert object files). BLDLIBRARY is also @@ -4488,8 +3918,8 @@ # This is altered for AIX in order to build the export list before # linking. -{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5 -$as_echo_n "checking LINKCC... " >&6; } +{ echo "$as_me:$LINENO: checking LINKCC" >&5 +echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; } if test -z "$LINKCC" then LINKCC='$(PURIFY) $(MAINCC)' @@ -4507,8 +3937,8 @@ LINKCC=qcc;; esac fi -{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5 -$as_echo "$LINKCC" >&6; } +{ echo "$as_me:$LINENO: result: $LINKCC" >&5 +echo "${ECHO_T}$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 @@ -4516,8 +3946,8 @@ # 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; } +{ 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` @@ -4528,11 +3958,11 @@ *) GNULD=no;; esac -{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5 -$as_echo "$GNULD" >&6; } +{ echo "$as_me:$LINENO: result: $GNULD" >&5 +echo "${ECHO_T}$GNULD" >&6; } -{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5 -$as_echo_n "checking for --enable-shared... " >&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; @@ -4548,11 +3978,11 @@ enable_shared="no";; esac fi -{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } -{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5 -$as_echo_n "checking for --enable-profiling... " >&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" @@ -4574,32 +4004,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_enable_profiling="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_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 @@ -4607,8 +4034,8 @@ CC="$ac_save_cc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 -$as_echo "$ac_enable_profiling" >&6; } +{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 +echo "${ECHO_T}$ac_enable_profiling" >&6; } case "$ac_enable_profiling" in "yes") @@ -4617,8 +4044,8 @@ ;; esac -{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5 -$as_echo_n "checking LDLIBRARY... " >&6; } +{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5 +echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; } # MacOSX framework builds need more magic. LDLIBRARY is the dynamic # library that we build, but we do not want to link against it (we @@ -4702,16 +4129,16 @@ esac fi -{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 -$as_echo "$LDLIBRARY" >&6; } +{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 +echo "${ECHO_T}$LDLIBRARY" >&6; } if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $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_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -4724,7 +4151,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" - $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 @@ -4735,11 +4162,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&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 @@ -4748,10 +4175,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 -{ $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_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 + 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. @@ -4764,7 +4191,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" - $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 @@ -4775,11 +4202,11 @@ 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; } + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&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_RANLIB" = x; then @@ -4787,8 +4214,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 RANLIB=$ac_ct_RANLIB @@ -4802,10 +4233,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_AR+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -4818,7 +4249,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" - $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 @@ -4829,11 +4260,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 -$as_echo "$AR" >&6; } + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&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 @@ -4852,10 +4283,10 @@ # 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$SVNVERSION"; then ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test. @@ -4868,7 +4299,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" - $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 @@ -4880,11 +4311,11 @@ fi SVNVERSION=$ac_cv_prog_SVNVERSION if test -n "$SVNVERSION"; then - { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5 -$as_echo "$SVNVERSION" >&6; } + { echo "$as_me:$LINENO: result: $SVNVERSION" >&5 +echo "${ECHO_T}$SVNVERSION" >&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 @@ -4920,8 +4351,8 @@ 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;} + { { 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 @@ -4947,12 +4378,11 @@ # 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -4981,29 +4411,17 @@ # 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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 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 @@ -5016,8 +4434,8 @@ INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -5039,8 +4457,8 @@ fi # Check for --with-pydebug -{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5 -$as_echo_n "checking for --with-pydebug... " >&6; } +{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5 +echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; } # Check whether --with-pydebug was given. if test "${with_pydebug+set}" = set; then @@ -5052,15 +4470,15 @@ #define Py_DEBUG 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; }; Py_DEBUG='true' -else { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; }; Py_DEBUG='false' +else { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; }; Py_DEBUG='false' 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 @@ -5129,8 +4547,8 @@ # Python violates C99 rules, by casting between incompatible # pointer types. GCC may generate bad code as a result of that, # so use -fno-strict-aliasing if supported. - { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5 -$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; } + { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5 +echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; } ac_save_cc="$CC" CC="$CC -fno-strict-aliasing" if test "$cross_compiling" = yes; then @@ -5150,39 +4568,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_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 + 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_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 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; } + { 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" @@ -5230,8 +4645,8 @@ 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;} + { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5 +echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;} { (exit 1); exit 1; }; } fi @@ -5324,10 +4739,10 @@ 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -OPT:Olimit=0" @@ -5348,32 +4763,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_opt_olimit_ok=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_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 @@ -5381,8 +4793,8 @@ 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; } +{ 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 @@ -5395,10 +4807,10 @@ ;; esac else - { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 -$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; } + { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 +echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; } if test "${ac_cv_olimit_ok+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -Olimit 1500" @@ -5419,32 +4831,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_olimit_ok=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_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 @@ -5452,8 +4861,8 @@ CC="$ac_save_cc" fi - { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 -$as_echo "$ac_cv_olimit_ok" >&6; } + { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 +echo "${ECHO_T}$ac_cv_olimit_ok" >&6; } if test $ac_cv_olimit_ok = yes; then BASECFLAGS="$BASECFLAGS -Olimit 1500" fi @@ -5462,8 +4871,8 @@ # 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; } + { 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 @@ -5489,14 +4898,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 @@ -5506,14 +4914,14 @@ #define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 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 @@ -5526,10 +4934,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. -{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 -$as_echo_n "checking whether pthreads are available without options... " >&6; } +{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 +echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; } if test "${ac_cv_pthread_is_default+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_pthread_is_default=no @@ -5560,21 +4968,19 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_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_is_default=yes @@ -5582,14 +4988,13 @@ ac_cv_pthread=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_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 @@ -5597,8 +5002,8 @@ fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 -$as_echo "$ac_cv_pthread_is_default" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 +echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; } if test $ac_cv_pthread_is_default = yes @@ -5610,10 +5015,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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 -$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; } +{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 +echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; } if test "${ac_cv_kpthread+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -Kpthread" @@ -5646,32 +5051,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_kpthread=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_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 @@ -5679,8 +5081,8 @@ CC="$ac_save_cc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 -$as_echo "$ac_cv_kpthread" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 +echo "${ECHO_T}$ac_cv_kpthread" >&6; } fi if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no @@ -5690,10 +5092,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. -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 -$as_echo_n "checking whether $CC accepts -Kthread... " >&6; } +{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 +echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; } if test "${ac_cv_kthread+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -Kthread" @@ -5726,32 +5128,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_kthread=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_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 @@ -5759,8 +5158,8 @@ CC="$ac_save_cc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 -$as_echo "$ac_cv_kthread" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 +echo "${ECHO_T}$ac_cv_kthread" >&6; } fi if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no @@ -5770,10 +5169,10 @@ # 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cc="$CC" CC="$CC -pthread" @@ -5806,32 +5205,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=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=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 @@ -5839,8 +5235,8 @@ CC="$ac_save_cc" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 -$as_echo "$ac_cv_pthread" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 +echo "${ECHO_T}$ac_cv_pthread" >&6; } fi # If we have set a CC compiler flag for thread support then @@ -5848,8 +5244,8 @@ 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; } +{ 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" @@ -5879,17 +5275,17 @@ fi rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 -$as_echo "$ac_cv_cxx_thread" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 +echo "${ECHO_T}$ac_cv_cxx_thread" >&6; } fi CXX="$ac_save_cxx" # checks for header files -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5916,21 +5312,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_stdc=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_stdc=no @@ -5955,7 +5350,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -5976,7 +5371,7 @@ else ac_cv_header_stdc=no fi -rm -f conftest* +rm -f -r conftest* fi @@ -6022,40 +5417,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 : 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_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; } +{ 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 @@ -6064,6 +5456,75 @@ 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 +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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + 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 + 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 + + @@ -6131,21 +5592,20 @@ 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` +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 - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6161,33 +5621,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 $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6201,52 +5660,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: $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;} + { 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:* ) - { $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;} + { 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/ ## @@ -6255,24 +5713,21 @@ ) | 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6286,11 +5741,11 @@ 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; } + 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6316,21 +5771,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 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 eval "$as_ac_Header=no" @@ -6338,15 +5792,12 @@ 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 +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 `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -6355,10 +5806,10 @@ 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; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -6396,30 +5847,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_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 -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 @@ -6434,8 +5881,8 @@ 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; } +{ 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" @@ -6443,10 +5890,10 @@ fi else - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF @@ -6484,30 +5931,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_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 -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 @@ -6522,8 +5965,8 @@ 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; } +{ 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" @@ -6532,10 +5975,10 @@ 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6558,50 +6001,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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + 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_header_sys_types_h_makedev=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_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; } +{ 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 - { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -$as_echo_n "checking for sys/mkdev.h... " >&6; } + { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 -$as_echo_n "checking sys/mkdev.h usability... " >&6; } +{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 +echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6617,33 +6056,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 sys/mkdev.h presence" >&5 -$as_echo_n "checking sys/mkdev.h presence... " >&6; } +{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 +echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6657,52 +6095,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: 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;} + { 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:* ) - { $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;} + { 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/ ## @@ -6711,18 +6148,18 @@ ) | 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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; } +{ 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 "x$ac_cv_header_sys_mkdev_h" = x""yes; then +if test $ac_cv_header_sys_mkdev_h = yes; then cat >>confdefs.h <<\_ACEOF #define MAJOR_IN_MKDEV 1 @@ -6734,17 +6171,17 @@ 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; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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_header_sys_sysmacros_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&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; } +{ 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 @@ -6760,33 +6197,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 sys/sysmacros.h presence" >&5 -$as_echo_n "checking sys/sysmacros.h presence... " >&6; } +{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 +echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6800,52 +6236,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: 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;} + { 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:* ) - { $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;} + { 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/ ## @@ -6854,18 +6289,18 @@ ) | 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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; } +{ 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 "x$ac_cv_header_sys_sysmacros_h" = x""yes; then +if test $ac_cv_header_sys_sysmacros_h = yes; then cat >>confdefs.h <<\_ACEOF #define MAJOR_IN_SYSMACROS 1 @@ -6882,11 +6317,11 @@ 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; } +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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6908,21 +6343,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 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 eval "$as_ac_Header=no" @@ -6930,15 +6364,12 @@ 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 +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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6950,11 +6381,11 @@ 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; } +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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6979,21 +6410,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 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 eval "$as_ac_Header=no" @@ -7001,15 +6431,12 @@ 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 +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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7019,8 +6446,8 @@ # 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; } +{ 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 @@ -7042,14 +6469,14 @@ fi -rm -f conftest* +rm -f -r conftest* -{ $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; } # Check whether using makedev requires defining _OSF_SOURCE -{ $as_echo "$as_me:$LINENO: checking for makedev" >&5 -$as_echo_n "checking for makedev... " >&6; } +{ echo "$as_me:$LINENO: checking for makedev" >&5 +echo $ECHO_N "checking for makedev... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7071,30 +6498,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_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 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 conftest.$ac_ext if test "$ac_cv_has_makedev" = "no"; then @@ -7123,30 +6546,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_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 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 conftest.$ac_ext if test "$ac_cv_has_makedev" = "yes"; then @@ -7157,8 +6576,8 @@ fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 -$as_echo "$ac_cv_has_makedev" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 +echo "${ECHO_T}$ac_cv_has_makedev" >&6; } if test "$ac_cv_has_makedev" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -7175,8 +6594,8 @@ # 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; } +{ 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 @@ -7202,29 +6621,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 sol_lfs_bug=no 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 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; } +{ 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 @@ -7252,46 +6670,11 @@ EOF # Type availability checks -{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 -$as_echo_n "checking for mode_t... " >&6; } +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_mode_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 (mode_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 @@ -7299,11 +6682,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if (sizeof ((mode_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -7314,39 +6700,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_mode_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_mode_t" >&5 -$as_echo "$ac_cv_type_mode_t" >&6; } -if test "x$ac_cv_type_mode_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 @@ -7356,46 +6733,11 @@ fi -{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 -$as_echo_n "checking for off_t... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_off_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 (off_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 @@ -7403,11 +6745,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef off_t ac__type_new_; int main () { -if (sizeof ((off_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -7418,39 +6763,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_off_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_type_off_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_off_t=no 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 +{ 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 @@ -7460,46 +6796,11 @@ fi -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 -$as_echo_n "checking for pid_t... " >&6; } +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&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 @@ -7507,11 +6808,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if (sizeof ((pid_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -7522,39 +6826,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_pid_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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 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 +{ 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 @@ -7564,10 +6859,10 @@ fi -{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } if test "${ac_cv_type_signal+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7592,76 +6887,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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$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 - $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 -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. */ -$ac_includes_default -int -main () -{ -if (sizeof (size_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 +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 @@ -7669,11 +6928,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if (sizeof ((size_t))) - return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -7684,39 +6946,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_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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 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 +{ 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 @@ -7726,10 +6979,10 @@ 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; } +{ 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7746,11 +6999,11 @@ else ac_cv_type_uid_t=no fi -rm -f conftest* +rm -f -r conftest* fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -7765,10 +7018,10 @@ fi - { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 -$as_echo_n "checking for uint32_t... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + 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' \ @@ -7796,14 +7049,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 @@ -7814,7 +7066,7 @@ esac else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7824,8 +7076,8 @@ 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; } +{ 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) ;; #( *) @@ -7842,10 +7094,10 @@ esac - { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 -$as_echo_n "checking for uint64_t... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + 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' \ @@ -7873,14 +7125,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 @@ -7891,7 +7142,7 @@ esac else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7901,8 +7152,8 @@ 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; } +{ 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) ;; #( *) @@ -7919,10 +7170,10 @@ esac - { $as_echo "$as_me:$LINENO: checking for int32_t" >&5 -$as_echo_n "checking for int32_t... " >&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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_int32_t=no for ac_type in 'int32_t' 'int' 'long int' \ @@ -7950,14 +7201,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 @@ -7973,7 +7223,7 @@ 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))]; + < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -7986,21 +7236,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 case $ac_type in @@ -8012,7 +7261,7 @@ 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 @@ -8022,8 +7271,8 @@ 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; } +{ 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) ;; #( *) @@ -8035,10 +7284,10 @@ esac - { $as_echo "$as_me:$LINENO: checking for int64_t" >&5 -$as_echo_n "checking for int64_t... " >&6; } + { 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 - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_int64_t=no for ac_type in 'int64_t' 'int' 'long int' \ @@ -8066,14 +7315,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 @@ -8089,7 +7337,7 @@ 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))]; + < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; test_array [0] = 0 ; @@ -8102,21 +7350,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 case $ac_type in @@ -8128,7 +7375,7 @@ 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 @@ -8138,8 +7385,8 @@ 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; } +{ 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) ;; #( *) @@ -8150,24 +7397,26 @@ ;; esac -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 -$as_echo_n "checking for ssize_t... " >&6; } +{ echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${ac_cv_type_ssize_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_ssize_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 +typedef ssize_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; } @@ -8178,18 +7427,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_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_me:$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 +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 + +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. */ _ACEOF @@ -8197,11 +7473,14 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef int 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; } @@ -8212,57 +7491,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_ssize_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_type_int=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_int=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 -_ACEOF - -fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&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; } +{ 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 - $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. @@ -8273,10 +7533,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 (int))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -8289,14 +7550,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 @@ -8310,10 +7570,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 (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8326,21 +7587,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` @@ -8354,7 +7614,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 @@ -8364,10 +7624,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 (int))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -8380,14 +7641,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 @@ -8401,10 +7661,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 (int))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8417,21 +7678,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` @@ -8445,7 +7705,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= @@ -8465,10 +7725,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 (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8481,21 +7742,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` @@ -8506,13 +7766,11 @@ 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) + { { 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) +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_int=0 fi ;; @@ -8525,8 +7783,9 @@ 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)); } + 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 @@ -8536,22 +7795,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (int))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (int)))) + 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 (int)))) + 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; ; @@ -8564,48 +7821,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_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: 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 - { { $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) + { { 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) +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_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 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_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } @@ -8614,14 +7866,68 @@ _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=$? + 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. -{ $as_echo "$as_me:$LINENO: checking size of long" >&5 -$as_echo_n "checking size of long... " >&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 - $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. @@ -8632,10 +7938,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 (long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -8648,14 +7955,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 @@ -8669,10 +7975,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 (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8685,21 +7992,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` @@ -8713,7 +8019,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 @@ -8723,10 +8029,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 (long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -8739,14 +8046,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 @@ -8760,10 +8066,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 (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8776,21 +8083,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` @@ -8804,7 +8110,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= @@ -8824,10 +8130,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 (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8840,21 +8147,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` @@ -8865,13 +8171,11 @@ 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) + { { 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) +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_long=0 fi ;; @@ -8884,8 +8188,9 @@ 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)); } + 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 @@ -8895,22 +8200,20 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (long))) < 0) + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (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)))) + 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; ; @@ -8923,48 +8226,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_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_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) + { { 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) +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_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_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } @@ -8973,14 +8271,68 @@ _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 void *" >&5 -$as_echo_n "checking size of void *... " >&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 - $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. @@ -8991,10 +8343,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 (void *))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9007,14 +8360,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 @@ -9028,10 +8380,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 (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9044,21 +8397,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` @@ -9072,7 +8424,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 @@ -9082,10 +8434,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 (void *))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9098,14 +8451,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 @@ -9119,10 +8471,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 (void *))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9135,21 +8488,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` @@ -9163,7 +8515,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= @@ -9183,10 +8535,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 (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9199,21 +8552,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` @@ -9224,13 +8576,11 @@ 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 *) + { { 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 *) +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_void_p=0 fi ;; @@ -9243,8 +8593,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 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 @@ -9254,22 +8605,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; ; @@ -9282,48 +8631,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_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_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 *) + { { 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 *) +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_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_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } @@ -9332,14 +8676,68 @@ _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 short" >&5 -$as_echo_n "checking size of short... " >&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 - $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. @@ -9350,10 +8748,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 (short))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9366,14 +8765,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 @@ -9387,10 +8785,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 (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9403,21 +8802,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` @@ -9431,7 +8829,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 @@ -9441,10 +8839,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 (short))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9457,14 +8856,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 @@ -9478,10 +8876,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 (short))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9494,21 +8893,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` @@ -9522,7 +8920,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= @@ -9542,10 +8940,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 (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9558,21 +8957,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` @@ -9583,13 +8981,11 @@ 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) + { { 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) +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_short=0 fi ;; @@ -9602,8 +8998,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 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 @@ -9613,22 +9010,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; ; @@ -9641,48 +9036,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_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_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) + { { 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) +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_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_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } @@ -9691,14 +9081,68 @@ _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 float" >&5 -$as_echo_n "checking size of float... " >&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 - $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. @@ -9709,10 +9153,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 (float))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9725,14 +9170,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 @@ -9746,10 +9190,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 (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9762,21 +9207,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` @@ -9790,7 +9234,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 @@ -9800,10 +9244,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 (float))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9816,14 +9261,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 @@ -9837,10 +9281,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 (float))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9853,21 +9298,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` @@ -9881,7 +9325,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= @@ -9901,10 +9345,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 (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9917,21 +9362,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` @@ -9942,13 +9386,11 @@ 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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (float) +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_float=0 fi ;; @@ -9961,8 +9403,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 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 @@ -9972,22 +9415,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; ; @@ -10000,64 +9441,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` 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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (float) +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_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_float" >&5 -$as_echo "$ac_cv_sizeof_float" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF +{ echo "$as_me:$LINENO: checking for double" >&5 +echo $ECHO_N "checking for double... $ECHO_C" >&6; } +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 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_FLOAT $ac_cv_sizeof_float -_ACEOF + 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 double" >&5 -$as_echo_n "checking size of double... " >&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 - $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. @@ -10068,10 +9558,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 (double))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10084,14 +9575,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 @@ -10105,10 +9595,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 (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10121,21 +9612,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` @@ -10149,7 +9639,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 @@ -10159,10 +9649,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 (double))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10175,14 +9666,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 @@ -10196,10 +9686,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 (double))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10212,21 +9703,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` @@ -10240,7 +9730,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= @@ -10260,10 +9750,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 (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10276,21 +9767,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` @@ -10301,13 +9791,11 @@ 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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (double) +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_double=0 fi ;; @@ -10320,8 +9808,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 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 @@ -10331,22 +9820,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; ; @@ -10359,48 +9846,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_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_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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (double) +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_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_double" >&5 -$as_echo "$ac_cv_sizeof_double" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 +echo "${ECHO_T}$ac_cv_sizeof_double" >&6; } @@ -10409,14 +9891,68 @@ _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 fpos_t" >&5 -$as_echo_n "checking size of fpos_t... " >&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 - $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. @@ -10427,10 +9963,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 (fpos_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10443,14 +9980,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 @@ -10464,10 +10000,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 (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10480,21 +10017,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` @@ -10508,7 +10044,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 @@ -10518,10 +10054,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 (fpos_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10534,14 +10071,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 @@ -10555,10 +10091,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 (fpos_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10571,21 +10108,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` @@ -10599,7 +10135,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= @@ -10619,10 +10155,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 (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10635,21 +10172,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` @@ -10660,13 +10196,11 @@ 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) + { { 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 (fpos_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_fpos_t=0 fi ;; @@ -10679,8 +10213,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 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 @@ -10690,22 +10225,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; ; @@ -10718,48 +10251,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_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_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) + { { 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 (fpos_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_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_fpos_t" >&5 -$as_echo "$ac_cv_sizeof_fpos_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; } @@ -10768,14 +10296,68 @@ _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 + *\"* | *\`* | *\\*) 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_size_t=yes +else + 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 +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 size_t" >&5 -$as_echo_n "checking size of size_t... " >&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 - $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. @@ -10786,10 +10368,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 (size_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10802,14 +10385,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 @@ -10823,10 +10405,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 (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10839,21 +10422,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` @@ -10867,7 +10449,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 @@ -10877,10 +10459,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 (size_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10893,14 +10476,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 @@ -10914,10 +10496,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 (size_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10930,21 +10513,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` @@ -10958,7 +10540,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= @@ -10978,10 +10560,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 (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10994,21 +10577,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` @@ -11019,13 +10601,11 @@ 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) + { { 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) +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_size_t=0 fi ;; @@ -11038,8 +10618,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 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 @@ -11049,22 +10630,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; ; @@ -11077,48 +10656,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_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_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) + { { 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) +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_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_size_t" >&5 -$as_echo "$ac_cv_sizeof_size_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } @@ -11127,14 +10701,68 @@ _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 () +{ +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_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; } + # 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; } +{ 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 - $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. @@ -11145,10 +10773,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 (pid_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11161,14 +10790,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 @@ -11182,10 +10810,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 (pid_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11198,21 +10827,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` @@ -11226,7 +10854,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 @@ -11236,10 +10864,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 (pid_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -11252,14 +10881,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 @@ -11273,10 +10901,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 (pid_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11289,21 +10918,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` @@ -11317,7 +10945,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= @@ -11337,10 +10965,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 (pid_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11353,21 +10982,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` @@ -11378,13 +11006,11 @@ 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) + { { 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 (pid_t) +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_pid_t=0 fi ;; @@ -11397,8 +11023,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 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 @@ -11408,22 +11035,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; ; @@ -11436,48 +11061,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_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_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) + { { 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 (pid_t) +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_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_pid_t" >&5 -$as_echo "$ac_cv_sizeof_pid_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; } @@ -11487,8 +11107,8 @@ -{ $as_echo "$as_me:$LINENO: checking for long long support" >&5 -$as_echo_n "checking for long long support... " >&6; } +{ echo "$as_me:$LINENO: checking for long long support" >&5 +echo $ECHO_N "checking for long long support... $ECHO_C" >&6; } have_long_long=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -11511,14 +11131,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 @@ -11532,24 +11151,78 @@ 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_long_long" >&5 -$as_echo "$have_long_long" >&6; } +{ 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 long long" >&5 -$as_echo_n "checking size of long long... " >&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 - $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. @@ -11560,10 +11233,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 (long long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11576,14 +11250,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 @@ -11597,10 +11270,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 (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11613,21 +11287,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` @@ -11641,7 +11314,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 @@ -11651,10 +11324,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 (long long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -11667,14 +11341,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 @@ -11688,10 +11361,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 (long long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -11704,21 +11378,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` @@ -11732,7 +11405,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= @@ -11752,10 +11425,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 (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -11768,21 +11442,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` @@ -11793,13 +11466,11 @@ 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) + { { 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 (long long) +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_long_long=0 fi ;; @@ -11812,8 +11483,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 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 @@ -11823,22 +11495,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; ; @@ -11851,48 +11521,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_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_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) + { { 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 (long long) +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_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_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } @@ -11903,8 +11568,8 @@ fi -{ $as_echo "$as_me:$LINENO: checking for long double support" >&5 -$as_echo_n "checking for long double support... " >&6; } +{ 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. */ @@ -11927,14 +11592,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 @@ -11948,24 +11612,78 @@ have_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 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; } +{ 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; } + # 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; } +{ 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 - $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. @@ -11976,10 +11694,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 (long double))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -11992,14 +11711,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 @@ -12013,10 +11731,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 (long double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12029,21 +11748,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` @@ -12057,7 +11775,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 @@ -12067,10 +11785,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 (long double))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12083,14 +11802,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 @@ -12104,10 +11822,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 (long double))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12120,21 +11839,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` @@ -12148,7 +11866,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= @@ -12168,10 +11886,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 (long double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12184,21 +11903,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` @@ -12209,13 +11927,11 @@ 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) + { { 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 (long double) +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_double=0 fi ;; @@ -12228,8 +11944,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 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 @@ -12239,22 +11956,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; ; @@ -12267,48 +11982,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_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_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) + { { 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 (long double) +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_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_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; } @@ -12317,23 +12027,83 @@ _ACEOF -fi +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 -{ $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 +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 () { -_Bool x; x = (_Bool)0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -12344,45 +12114,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_C99_BOOL 1 -_ACEOF - - have_c99_bool=yes - + ac_cv_type__Bool=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__Bool=no 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 +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 _Bool" >&5 -$as_echo_n "checking size of _Bool... " >&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 - $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. @@ -12393,10 +12156,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -12409,14 +12173,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 @@ -12430,10 +12193,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12446,21 +12210,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` @@ -12474,7 +12237,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 @@ -12484,10 +12247,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12500,14 +12264,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 @@ -12521,10 +12284,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -12537,21 +12301,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` @@ -12565,7 +12328,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= @@ -12585,10 +12348,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12601,21 +12365,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` @@ -12626,13 +12389,11 @@ 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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (_Bool) +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__Bool=0 fi ;; @@ -12645,8 +12406,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 _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 @@ -12656,22 +12418,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; ; @@ -12684,48 +12444,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__Bool=`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) + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (_Bool) +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__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 -{ $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__Bool" >&5 +echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; } @@ -12736,13 +12491,12 @@ fi -{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5 -$as_echo_n "checking for uintptr_t... " >&6; } +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_type_uintptr_t=no -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12752,11 +12506,14 @@ #include #endif +typedef uintptr_t 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; } @@ -12767,33 +12524,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_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. */ -#ifdef HAVE_STDINT_H - #include - #endif - +$ac_includes_default +typedef uintptr_t 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; } @@ -12804,52 +12583,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_uintptr_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_uintptr_t=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_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 uintptr_t" >&5 -$as_echo_n "checking size of uintptr_t... " >&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 - $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. @@ -12860,10 +12625,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -12876,14 +12642,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 @@ -12897,10 +12662,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -12913,21 +12679,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` @@ -12941,7 +12706,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 @@ -12951,10 +12716,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -12967,14 +12733,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 @@ -12988,10 +12753,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -13004,21 +12770,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` @@ -13032,7 +12797,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= @@ -13052,10 +12817,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -13068,21 +12834,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` @@ -13093,13 +12858,11 @@ 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) + { { 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 (uintptr_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_uintptr_t=0 fi ;; @@ -13112,8 +12875,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 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 @@ -13123,22 +12887,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; ; @@ -13151,48 +12913,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_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_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) + { { 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 (uintptr_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_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_uintptr_t" >&5 -$as_echo "$ac_cv_sizeof_uintptr_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; } @@ -13206,10 +12963,10 @@ # Hmph. AC_CHECK_SIZEOF() doesn't include . -{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5 -$as_echo_n "checking size of off_t... " >&6; } +{ echo "$as_me:$LINENO: checking size of off_t" >&5 +echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_off_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_sizeof_off_t=4 @@ -13236,32 +12993,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_sizeof_off_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 ) ac_cv_sizeof_off_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 @@ -13269,16 +13023,16 @@ fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 -$as_echo "$ac_cv_sizeof_off_t" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF -{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5 -$as_echo_n "checking whether to enable large file support... " >&6; } +{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5 +echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; } if test "$have_long_long" = yes -a \ "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then @@ -13287,18 +13041,18 @@ #define HAVE_LARGEFILE_SUPPORT 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:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # AC_CHECK_SIZEOF() doesn't include . -{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5 -$as_echo_n "checking size of time_t... " >&6; } +{ echo "$as_me:$LINENO: checking size of time_t" >&5 +echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_time_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_sizeof_time_t=4 @@ -13325,32 +13079,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_sizeof_time_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 ) ac_cv_sizeof_time_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 @@ -13358,8 +13109,8 @@ 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_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 @@ -13376,8 +13127,8 @@ 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; } +{ 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. */ @@ -13400,35 +13151,34 @@ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + echo "$as_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 + 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; } +{ 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 . - { $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5 -$as_echo_n "checking size of pthread_t... " >&6; } + { echo "$as_me:$LINENO: checking size of pthread_t" >&5 +echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_pthread_t+set}" = set; then - $as_echo_n "(cached) " >&6 + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_sizeof_pthread_t=4 @@ -13455,32 +13205,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_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 ) 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 @@ -13488,8 +13235,8 @@ 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 @@ -13558,32 +13305,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_osx_32bit=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_osx_32bit=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 @@ -13598,8 +13342,8 @@ MACOSX_DEFAULT_ARCH="ppc" ;; *) - { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 -$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -13612,8 +13356,8 @@ MACOSX_DEFAULT_ARCH="ppc64" ;; *) - { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 -$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} + { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5 +echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -13626,8 +13370,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" @@ -13638,21 +13382,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/*) @@ -13660,12 +13404,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 @@ -13677,8 +13421,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 @@ -13703,8 +13447,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 @@ -13715,8 +13459,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 @@ -13817,13 +13561,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 @@ -13857,12 +13601,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 @@ -13909,13 +13653,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 @@ -13927,8 +13671,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). @@ -13939,22 +13683,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" @@ -13986,37 +13730,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 @@ -14026,10 +13766,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" @@ -14061,37 +13801,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 @@ -14103,10 +13839,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 @@ -14144,30 +13880,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 @@ -14182,8 +13914,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" @@ -14195,10 +13927,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" @@ -14230,37 +13962,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 @@ -14272,8 +14000,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 @@ -14295,47 +14023,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" @@ -14367,44 +14091,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" @@ -14436,60 +14156,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 @@ -14497,41 +14213,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 @@ -14542,8 +14258,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="" @@ -14557,22 +14273,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 @@ -14585,8 +14301,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 @@ -14605,8 +14321,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" @@ -14672,8 +14388,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 @@ -14693,27 +14409,27 @@ else unistd_defines_pthreads=no fi -rm -f conftest* +rm -f -r 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 @@ -14729,33 +14445,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 @@ -14769,52 +14484,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/ ## @@ -14823,18 +14537,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 @@ -14853,17 +14567,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 @@ -14879,33 +14593,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 @@ -14919,52 +14632,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/ ## @@ -14973,18 +14685,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 @@ -15001,13 +14713,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 @@ -15020,16 +14732,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 @@ -15054,24 +14766,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 @@ -15079,15 +14788,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. */ @@ -15140,36 +14849,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 @@ -15179,17 +14884,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 @@ -15205,33 +14910,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 @@ -15245,52 +14949,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/ ## @@ -15299,18 +15002,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 @@ -15323,10 +15026,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" @@ -15358,37 +15061,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 @@ -15398,10 +15097,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" @@ -15433,37 +15132,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 @@ -15473,10 +15168,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" @@ -15508,37 +15203,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 @@ -15548,10 +15239,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" @@ -15583,37 +15274,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 @@ -15640,7 +15327,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 @@ -15652,10 +15338,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" @@ -15687,37 +15373,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 @@ -15729,10 +15411,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" @@ -15764,37 +15446,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 @@ -15847,10 +15525,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 @@ -15880,32 +15558,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 @@ -15913,8 +15588,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 @@ -15925,11 +15600,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. */ @@ -15982,42 +15657,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*) @@ -16037,18 +15705,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 @@ -16059,8 +15727,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 @@ -16088,44 +15756,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 @@ -16149,27 +15814,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 @@ -16191,8 +15855,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 @@ -16213,7 +15877,7 @@ $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f conftest* +rm -f -r conftest* ;; kame) @@ -16236,7 +15900,7 @@ ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-glibc) @@ -16257,7 +15921,7 @@ ipv6type=$i; ipv6trylibc=yes fi -rm -f conftest* +rm -f -r conftest* ;; linux-inet6) @@ -16295,7 +15959,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; v6d) @@ -16318,7 +15982,7 @@ ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f conftest* +rm -f -r conftest* ;; zeta) @@ -16340,7 +16004,7 @@ ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f conftest* +rm -f -r conftest* ;; esac @@ -16348,8 +16012,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 @@ -16368,8 +16032,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 @@ -16391,14 +16055,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 @@ -16408,22 +16071,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 @@ -16442,12 +16105,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 @@ -16459,20 +16122,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 @@ -16491,12 +16154,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 @@ -16508,14 +16171,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 @@ -16528,11 +16191,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. */ @@ -16585,42 +16248,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 @@ -16630,8 +16286,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 @@ -16655,8 +16311,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 @@ -16669,16 +16325,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 @@ -16785,11 +16441,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. */ @@ -16842,42 +16498,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 @@ -16886,8 +16535,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 @@ -16909,14 +16558,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 @@ -16926,20 +16574,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 @@ -16961,14 +16609,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 @@ -16978,20 +16625,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 @@ -17013,14 +16660,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 @@ -17030,20 +16676,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 @@ -17065,14 +16711,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 @@ -17082,20 +16727,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 @@ -17117,14 +16762,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 @@ -17134,20 +16778,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 @@ -17169,14 +16813,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 @@ -17186,20 +16829,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 @@ -17221,14 +16864,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 @@ -17238,20 +16880,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 @@ -17276,14 +16918,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 @@ -17293,14 +16934,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 @@ -17311,8 +16952,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 @@ -17337,14 +16978,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 @@ -17354,21 +16994,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 @@ -17393,14 +17033,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 @@ -17410,21 +17049,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 @@ -17449,14 +17088,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 @@ -17466,14 +17104,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 @@ -17483,10 +17121,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. @@ -17499,7 +17137,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 @@ -17510,11 +17148,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 @@ -17523,10 +17161,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" @@ -17558,44 +17196,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" @@ -17627,37 +17261,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 @@ -17672,16 +17302,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; } +{ echo "$as_me:$LINENO: checking for chflags" >&5 +echo $ECHO_N "checking for chflags... $ECHO_C" >&6; } if test "$cross_compiling" = 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 run test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17706,55 +17334,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 cat >>confdefs.h <<\_ACEOF #define HAVE_CHFLAGS 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: 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; } 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 -{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5 -$as_echo_n "checking for lchflags... " >&6; } +{ echo "$as_me:$LINENO: checking for lchflags" >&5 +echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; } if test "$cross_compiling" = 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 run test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -17779,40 +17402,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 cat >>confdefs.h <<\_ACEOF #define HAVE_LCHFLAGS 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: 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; } 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 @@ -17827,10 +17447,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" @@ -17862,37 +17482,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 @@ -17908,8 +17524,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 @@ -17934,43 +17550,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 @@ -17998,43 +17610,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 @@ -18062,14 +17670,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 @@ -18079,22 +17686,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 @@ -18122,14 +17729,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 @@ -18139,14 +17745,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 @@ -18157,11 +17763,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. */ @@ -18214,49 +17820,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" @@ -18288,46 +17887,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" @@ -18359,37 +17954,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 @@ -18406,11 +17997,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. */ @@ -18463,49 +18054,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" @@ -18537,46 +18121,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" @@ -18608,37 +18188,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 @@ -18657,11 +18233,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. */ @@ -18714,42 +18290,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 @@ -18765,11 +18334,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. */ @@ -18822,42 +18391,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 @@ -18869,11 +18431,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. */ @@ -18926,42 +18488,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 @@ -18978,11 +18533,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. */ @@ -19035,42 +18590,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. */ @@ -19093,14 +18641,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 @@ -19112,7 +18659,7 @@ else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -19126,11 +18673,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. */ @@ -19183,42 +18730,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. */ @@ -19241,14 +18781,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 @@ -19260,7 +18799,7 @@ else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -19274,11 +18813,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. */ @@ -19331,42 +18870,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. */ @@ -19389,21 +18921,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 @@ -19420,8 +18951,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 @@ -19453,48 +18984,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 @@ -19523,29 +19050,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 -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -{ $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 -$as_echo_n "checking getaddrinfo bug... " >&6; } +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 +echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; } if test "$cross_compiling" = yes; then - { $as_echo "$as_me:$LINENO: result: buggy" >&5 -$as_echo "buggy" >&6; } + { echo "$as_me:$LINENO: result: buggy" >&5 +echo "${ECHO_T}buggy" >&6; } buggygetaddrinfo=yes else cat >conftest.$ac_ext <<_ACEOF @@ -19648,52 +19172,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 - { $as_echo "$as_me:$LINENO: result: good" >&5 -$as_echo "good" >&6; } + { 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 ) -{ $as_echo "$as_me:$LINENO: result: buggy" >&5 -$as_echo "buggy" >&6; } +{ 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 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; } buggygetaddrinfo=yes fi -rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext @@ -19713,11 +19233,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. */ @@ -19770,42 +19290,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 @@ -19813,10 +19326,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. */ @@ -19843,21 +19356,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 @@ -19865,8 +19377,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 @@ -19875,10 +19387,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. */ @@ -19894,7 +19406,7 @@ { struct tm tm; int *p = &tm.tm_sec; - return !p; + return !p; ; return 0; } @@ -19905,21 +19417,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 @@ -19927,8 +19438,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 @@ -19937,10 +19448,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. */ @@ -19968,21 +19479,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 @@ -20011,21 +19521,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 @@ -20036,9 +19545,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 @@ -20054,10 +19563,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. */ @@ -20084,21 +19593,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 @@ -20106,9 +19614,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 @@ -20124,10 +19632,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. */ @@ -20154,35 +19662,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 @@ -20192,10 +19696,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. */ @@ -20220,21 +19724,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 @@ -20260,21 +19763,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 @@ -20285,9 +19787,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 @@ -20296,10 +19798,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. */ @@ -20324,21 +19826,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 @@ -20364,21 +19865,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 @@ -20389,9 +19889,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 @@ -20400,10 +19900,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. */ @@ -20428,21 +19928,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 @@ -20468,21 +19967,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 @@ -20493,9 +19991,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 @@ -20504,10 +20002,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. */ @@ -20532,21 +20030,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 @@ -20572,21 +20069,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 @@ -20597,9 +20093,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 @@ -20608,10 +20104,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. */ @@ -20636,21 +20132,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 @@ -20676,21 +20171,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 @@ -20701,9 +20195,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 @@ -20712,10 +20206,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. */ @@ -20740,21 +20234,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 @@ -20780,21 +20273,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 @@ -20805,9 +20297,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 @@ -20829,10 +20321,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. */ @@ -20855,21 +20347,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 @@ -20878,8 +20369,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 @@ -20889,8 +20380,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 @@ -20916,14 +20407,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 @@ -20937,20 +20427,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. */ @@ -20974,21 +20464,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 @@ -20997,8 +20486,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 @@ -21007,10 +20496,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. */ @@ -21035,21 +20524,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 @@ -21058,8 +20546,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 @@ -21071,10 +20559,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. */ @@ -21099,21 +20587,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 @@ -21121,8 +20608,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 @@ -21130,10 +20617,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. */ @@ -21205,21 +20692,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 @@ -21227,20 +20713,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 @@ -21262,38 +20748,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 @@ -21315,38 +20800,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 @@ -21368,14 +20852,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 @@ -21389,19 +20872,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 @@ -21433,14 +20916,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 @@ -21454,19 +20936,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 @@ -21491,14 +20973,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 @@ -21508,22 +20989,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 @@ -21547,38 +21028,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 @@ -21606,21 +21086,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 @@ -21634,17 +21113,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. */ @@ -21697,43 +21176,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 @@ -21767,14 +21242,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 @@ -21789,18 +21263,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 @@ -21832,14 +21306,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 @@ -21854,18 +21327,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 @@ -21895,14 +21368,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 @@ -21917,16 +21389,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 @@ -21946,11 +21418,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. */ @@ -22003,42 +21475,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 @@ -22057,10 +21522,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. */ @@ -22113,43 +21578,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" @@ -22181,37 +21642,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 @@ -22225,8 +21682,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 @@ -22238,14 +21695,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 @@ -22255,53 +21712,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 @@ -22309,10 +21766,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 @@ -22341,40 +21798,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 @@ -22384,10 +21838,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 @@ -22416,40 +21870,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 @@ -22463,10 +21914,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 @@ -22495,40 +21946,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 @@ -22548,8 +21996,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 @@ -22575,29 +22023,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 @@ -22613,8 +22060,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" @@ -22654,39 +22101,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 @@ -22705,10 +22149,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 @@ -22739,40 +22183,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 @@ -22793,11 +22234,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. */ @@ -22850,51 +22291,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. */ @@ -22921,21 +22355,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 @@ -22943,9 +22376,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 @@ -22959,10 +22392,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. */ @@ -22989,21 +22422,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 @@ -23011,9 +22443,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 @@ -23027,10 +22459,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. */ @@ -23057,21 +22489,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 @@ -23079,9 +22510,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 @@ -23101,16 +22532,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; } +{ 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 - { { $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 test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23147,32 +22576,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_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: no" >&5 -$as_echo "no" >&6; } + { 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 ) -{ $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_BROKEN_SEM_GETVALUE 1 @@ -23180,15 +22607,14 @@ 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 # 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 @@ -23199,12 +22625,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 @@ -23212,24 +22638,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 @@ -23245,33 +22671,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 @@ -23285,52 +22710,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/ ## @@ -23339,18 +22763,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 @@ -23369,14 +22793,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. @@ -23388,10 +22867,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 ; @@ -23404,14 +22884,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 @@ -23426,10 +22905,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 ; @@ -23442,21 +22922,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` @@ -23470,7 +22949,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 @@ -23481,10 +22960,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 ; @@ -23497,14 +22977,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 @@ -23519,10 +22998,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 ; @@ -23535,21 +23015,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` @@ -23563,7 +23042,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= @@ -23584,10 +23063,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 ; @@ -23600,21 +23080,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` @@ -23625,13 +23104,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 ;; @@ -23645,8 +23122,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 @@ -23656,22 +23134,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; ; @@ -23684,48 +23160,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; } @@ -23736,8 +23207,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. */ @@ -23764,14 +23235,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 @@ -23785,24 +23255,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 @@ -23829,44 +23299,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 @@ -23916,195 +23383,49 @@ #define PY_UNICODE_TYPE wchar_t _ACEOF -elif test "$ac_cv_sizeof_short" = "$unicode_size" -then - PY_UNICODE_TYPE="unsigned short" - cat >>confdefs.h <<\_ACEOF -#define PY_UNICODE_TYPE unsigned short -_ACEOF - -elif test "$ac_cv_sizeof_long" = "$unicode_size" -then - 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; } - -# 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; -} +elif test "$ac_cv_sizeof_short" = "$unicode_size" +then + PY_UNICODE_TYPE="unsigned short" + cat >>confdefs.h <<\_ACEOF +#define PY_UNICODE_TYPE unsigned short _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 +elif test "$ac_cv_sizeof_long" = "$unicode_size" +then + PY_UNICODE_TYPE="unsigned long" + cat >>confdefs.h <<\_ACEOF +#define PY_UNICODE_TYPE unsigned long +_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 - - + PY_UNICODE_TYPE="no type found" fi +{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 +echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; } -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; @@ -24116,33 +23437,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; @@ -24154,21 +23475,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 @@ -24176,44 +23496,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; } @@ -24224,31 +23529,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 @@ -24267,14 +23571,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; @@ -24286,70 +23590,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 @@ -24374,40 +23671,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 @@ -24418,10 +23712,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 @@ -24450,36 +23744,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 @@ -24497,8 +23787,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" @@ -24534,30 +23824,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 @@ -24567,11 +23853,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 @@ -24580,10 +23866,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" @@ -24615,37 +23901,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 @@ -24668,21 +23950,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 @@ -24708,15 +23989,15 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* 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" @@ -24748,37 +24029,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 @@ -24788,10 +24065,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" @@ -24823,37 +24100,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 @@ -24863,10 +24136,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" @@ -24898,37 +24171,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 @@ -24951,21 +24220,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 @@ -24991,17 +24259,17 @@ _ACEOF fi -rm -f conftest* +rm -f -r conftest* fi # 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 @@ -25029,40 +24297,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 @@ -25072,8 +24337,8 @@ fi -{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5 -$as_echo_n "checking for broken poll()... " >&6; } +{ echo "$as_me:$LINENO: checking for broken poll()" >&5 +echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; } if test "$cross_compiling" = yes; then ac_cv_broken_poll=no else @@ -25115,38 +24380,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 -{ $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 @@ -25159,10 +24421,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. */ @@ -25190,21 +24452,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 @@ -25233,21 +24494,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 @@ -25258,9 +24518,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 @@ -25276,10 +24536,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. */ @@ -25306,21 +24566,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 @@ -25328,9 +24587,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 @@ -25346,10 +24605,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. */ @@ -25376,35 +24635,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 @@ -25416,10 +24671,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 @@ -25502,40 +24757,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 @@ -25546,10 +24798,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. */ @@ -25575,21 +24827,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 @@ -25598,8 +24849,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 @@ -25610,10 +24861,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. */ @@ -25639,21 +24890,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 @@ -25662,8 +24912,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 @@ -25674,10 +24924,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. */ @@ -25703,21 +24953,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 @@ -25726,8 +24975,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 @@ -25738,10 +24987,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. */ @@ -25767,21 +25016,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 @@ -25790,8 +25038,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 @@ -25803,8 +25051,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 @@ -25826,14 +25074,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 @@ -25843,21 +25090,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 @@ -25879,14 +25126,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 @@ -25896,21 +25142,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 @@ -25932,14 +25178,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 @@ -25949,63 +25194,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; } +{ 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 - { { $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 test program while cross compiling + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling +echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26054,92 +25297,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 - { $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 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 ) -{ $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 *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 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 @@ -26155,11 +25352,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; } @@ -26170,39 +25370,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 @@ -26213,8 +25404,8 @@ fi -{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5 -$as_echo_n "checking for broken mbstowcs... " >&6; } +{ 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 @@ -26240,38 +25431,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 -{ $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 @@ -26282,8 +25470,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 @@ -26295,14 +25483,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 @@ -26316,15 +25504,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" @@ -26356,12 +25544,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 @@ -26394,12 +25581,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 @@ -26415,7 +25602,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" @@ -26427,14 +25614,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. @@ -26447,7 +25632,7 @@ SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -26457,7 +25642,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 @@ -26479,45 +25664,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. @@ -26533,6 +25690,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. @@ -26555,7 +25714,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 @@ -26568,10 +25727,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 && @@ -26593,7 +25759,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 @@ -26644,7 +25810,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 @@ -26672,6 +25838,7 @@ *) ECHO_N='-n';; esac + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -26684,22 +25851,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 @@ -26724,10 +25888,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 @@ -26750,7 +25914,7 @@ # values after options handling. ac_log=" This file was extended by python $as_me 3.1, 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 @@ -26763,39 +25927,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 @@ -26806,24 +25960,24 @@ Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ python config.status 3.1 -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 @@ -26845,36 +25999,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; }; } ;; @@ -26893,32 +26041,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 @@ -26933,8 +26079,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 @@ -26974,145 +26120,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=' -' -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 @@ -27128,133 +26353,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;; @@ -27283,38 +26394,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 @@ -27324,7 +26423,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 @@ -27350,7 +26449,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" @@ -27359,7 +26458,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 @@ -27380,17 +26479,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/ ;; @@ -27430,13 +26529,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 } @@ -27445,14 +26543,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 @@ -27466,16 +26563,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 @@ -27485,58 +26581,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" ;; @@ -27550,11 +26707,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. @@ -27576,10 +26728,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/release31-maint/configure.in ============================================================================== --- python/branches/release31-maint/configure.in (original) +++ python/branches/release31-maint/configure.in Sun Sep 20 22:10:02 2009 @@ -907,7 +907,7 @@ ARCH_RUN_32BIT="arch -i386 -ppc" else - AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all]) + AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way]) fi From python-checkins at python.org Sun Sep 20 22:16:11 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 20:16:11 -0000 Subject: [Python-checkins] r74981 - in python/trunk/Mac/BuildScript: build-installer.py scripts/postflight.framework Message-ID: Author: ronald.oussoren Date: Sun Sep 20 22:16:11 2009 New Revision: 74981 Log: * Make it easier to build custom installers (such as a 3-way universal build) * Upgrade bzip dependency to 1.0.5 Modified: python/trunk/Mac/BuildScript/build-installer.py python/trunk/Mac/BuildScript/scripts/postflight.framework Modified: python/trunk/Mac/BuildScript/build-installer.py ============================================================================== --- python/trunk/Mac/BuildScript/build-installer.py (original) +++ python/trunk/Mac/BuildScript/build-installer.py Sun Sep 20 22:16:11 2009 @@ -61,12 +61,25 @@ DEPSRC = os.path.expanduser('~/Universal/other-sources') # Location of the preferred SDK -SDKPATH = "/Developer/SDKs/MacOSX10.4u.sdk" -#SDKPATH = "/" +if int(os.uname()[2].split('.')[0]) == 8: + # Explicitly use the 10.4u (universal) SDK when + # building on 10.4, the system headers are not + # useable for a universal build + SDKPATH = "/Developer/SDKs/MacOSX10.4u.sdk" +else: + SDKPATH = "/" universal_opts_map = { '32-bit': ('i386', 'ppc',), '64-bit': ('x86_64', 'ppc64',), - 'all': ('i386', 'ppc', 'x86_64', 'ppc64',) } + 'intel': ('i386', 'x86_64'), + '3-way': ('ppc', 'i386', 'x86_64'), + 'all': ('i386', 'ppc', 'x86_64', 'ppc64',) } +default_target_map = { + '64-bit': '10.5', + '3-way': '10.5', + 'intel': '10.5', + 'all': '10.5', +} UNIVERSALOPTS = tuple(universal_opts_map.keys()) @@ -104,87 +117,91 @@ # [The recipes are defined here for convenience but instantiated later after # command line options have been processed.] def library_recipes(): - return [ - dict( - name="Bzip2 1.0.4", - url="http://www.bzip.org/1.0.4/bzip2-1.0.4.tar.gz", - checksum='fc310b254f6ba5fbb5da018f04533688', - configure=None, - install='make install PREFIX=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%( - shellQuote(os.path.join(WORKDIR, 'libraries')), - ' -arch '.join(ARCHLIST), - SDKPATH, + result = [] + + if DEPTARGET < '10.5': + result.extend([ + dict( + name="Bzip2 1.0.5", + url="http://www.bzip.org/1.0.5/bzip2-1.0.5.tar.gz", + checksum='3c15a0c8d1d3ee1c46a1634d00617b1a', + configure=None, + install='make install PREFIX=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%( + shellQuote(os.path.join(WORKDIR, 'libraries')), + ' -arch '.join(ARCHLIST), + SDKPATH, + ), ), - ), - dict( - name="ZLib 1.2.3", - url="http://www.gzip.org/zlib/zlib-1.2.3.tar.gz", - checksum='debc62758716a169df9f62e6ab2bc634', - configure=None, - install='make install prefix=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%( - shellQuote(os.path.join(WORKDIR, 'libraries')), - ' -arch '.join(ARCHLIST), - SDKPATH, + dict( + name="ZLib 1.2.3", + url="http://www.gzip.org/zlib/zlib-1.2.3.tar.gz", + checksum='debc62758716a169df9f62e6ab2bc634', + configure=None, + install='make install prefix=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%( + shellQuote(os.path.join(WORKDIR, 'libraries')), + ' -arch '.join(ARCHLIST), + SDKPATH, + ), ), - ), - dict( - # Note that GNU readline is GPL'd software - name="GNU Readline 5.1.4", - url="http://ftp.gnu.org/pub/gnu/readline/readline-5.1.tar.gz" , - checksum='7ee5a692db88b30ca48927a13fd60e46', - patchlevel='0', - patches=[ - # The readline maintainers don't do actual micro releases, but - # just ship a set of patches. - 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-001', - 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-002', - 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-003', - 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-004', - ] - ), - - dict( - name="SQLite 3.6.11", - url="http://www.sqlite.org/sqlite-3.6.11.tar.gz", - checksum='7ebb099696ab76cc6ff65dd496d17858', - configure_pre=[ - '--enable-threadsafe', - '--enable-tempstore', - '--enable-shared=no', - '--enable-static=yes', - '--disable-tcl', - ] - ), + dict( + # Note that GNU readline is GPL'd software + name="GNU Readline 5.1.4", + url="http://ftp.gnu.org/pub/gnu/readline/readline-5.1.tar.gz" , + checksum='7ee5a692db88b30ca48927a13fd60e46', + patchlevel='0', + patches=[ + # The readline maintainers don't do actual micro releases, but + # just ship a set of patches. + 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-001', + 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-002', + 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-003', + 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-004', + ] + ), + dict( + name="SQLite 3.6.11", + url="http://www.sqlite.org/sqlite-3.6.11.tar.gz", + checksum='7ebb099696ab76cc6ff65dd496d17858', + configure_pre=[ + '--enable-threadsafe', + '--enable-tempstore', + '--enable-shared=no', + '--enable-static=yes', + '--disable-tcl', + ] + ), + dict( + name="NCurses 5.5", + url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.5.tar.gz", + checksum='e73c1ac10b4bfc46db43b2ddfd6244ef', + configure_pre=[ + "--without-cxx", + "--without-ada", + "--without-progs", + "--without-curses-h", + "--enable-shared", + "--with-shared", + "--datadir=/usr/share", + "--sysconfdir=/etc", + "--sharedstatedir=/usr/com", + "--with-terminfo-dirs=/usr/share/terminfo", + "--with-default-terminfo-dir=/usr/share/terminfo", + "--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib"%(getVersion(),), + "--enable-termcap", + ], + patches=[ + "ncurses-5.5.patch", + ], + useLDFlags=False, + install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Frameworks/Python.framework/Versions/%s/lib/lib* .'%( + shellQuote(os.path.join(WORKDIR, 'libraries')), + shellQuote(os.path.join(WORKDIR, 'libraries')), + getVersion(), + ), + ), + ]) - dict( - name="NCurses 5.5", - url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.5.tar.gz", - checksum='e73c1ac10b4bfc46db43b2ddfd6244ef', - configure_pre=[ - "--without-cxx", - "--without-ada", - "--without-progs", - "--without-curses-h", - "--enable-shared", - "--with-shared", - "--datadir=/usr/share", - "--sysconfdir=/etc", - "--sharedstatedir=/usr/com", - "--with-terminfo-dirs=/usr/share/terminfo", - "--with-default-terminfo-dir=/usr/share/terminfo", - "--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib"%(getVersion(),), - "--enable-termcap", - ], - patches=[ - "ncurses-5.5.patch", - ], - useLDFlags=False, - install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Frameworks/Python.framework/Versions/%s/lib/lib* .'%( - shellQuote(os.path.join(WORKDIR, 'libraries')), - shellQuote(os.path.join(WORKDIR, 'libraries')), - getVersion(), - ), - ), + result.extend([ dict( name="Sleepycat DB 4.7.25", url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz", @@ -195,91 +212,99 @@ '--includedir=/usr/local/include/db4', ] ), - ] + ]) + return result -# Instructions for building packages inside the .mpkg. -PKG_RECIPES = [ - dict( - name="PythonFramework", - long_name="Python Framework", - source="/Library/Frameworks/Python.framework", - readme="""\ - This package installs Python.framework, that is the python - interpreter and the standard library. This also includes Python - wrappers for lots of Mac OS X API's. - """, - postflight="scripts/postflight.framework", - ), - dict( - name="PythonApplications", - long_name="GUI Applications", - source="/Applications/Python %(VER)s", - readme="""\ - This package installs IDLE (an interactive Python IDE), - Python Launcher and Build Applet (create application bundles - from python scripts). - It also installs a number of examples and demos. - """, - required=False, - ), - dict( - name="PythonUnixTools", - long_name="UNIX command-line tools", - source="/usr/local/bin", - readme="""\ - This package installs the unix tools in /usr/local/bin for - compatibility with older releases of Python. This package - is not necessary to use Python. - """, - required=False, - ), - dict( - name="PythonDocumentation", - long_name="Python Documentation", - topdir="/Library/Frameworks/Python.framework/Versions/%(VER)s/Resources/English.lproj/Documentation", - source="/pydocs", - readme="""\ - This package installs the python documentation at a location - that is useable for pydoc and IDLE. If you have installed Xcode - it will also install a link to the documentation in - /Developer/Documentation/Python - """, - postflight="scripts/postflight.documentation", - required=False, - ), - dict( - name="PythonProfileChanges", - long_name="Shell profile updater", - readme="""\ - This packages updates your shell profile to make sure that - the Python tools are found by your shell in preference of - the system provided Python tools. - - If you don't install this package you'll have to add - "/Library/Frameworks/Python.framework/Versions/%(VER)s/bin" - to your PATH by hand. - """, - postflight="scripts/postflight.patch-profile", - topdir="/Library/Frameworks/Python.framework", - source="/empty-dir", - required=False, - ), - dict( - name="PythonSystemFixes", - long_name="Fix system Python", - readme="""\ - This package updates the system python installation on - Mac OS X 10.3 to ensure that you can build new python extensions - using that copy of python after installing this version. +# Instructions for building packages inside the .mpkg. +def pkg_recipes(): + result = [ + dict( + name="PythonFramework", + long_name="Python Framework", + source="/Library/Frameworks/Python.framework", + readme="""\ + This package installs Python.framework, that is the python + interpreter and the standard library. This also includes Python + wrappers for lots of Mac OS X API's. """, - postflight="../Tools/fixapplepython23.py", - topdir="/Library/Frameworks/Python.framework", - source="/empty-dir", - required=False, - ) -] + postflight="scripts/postflight.framework", + ), + dict( + name="PythonApplications", + long_name="GUI Applications", + source="/Applications/Python %(VER)s", + readme="""\ + This package installs IDLE (an interactive Python IDE), + Python Launcher and Build Applet (create application bundles + from python scripts). + + It also installs a number of examples and demos. + """, + required=False, + ), + dict( + name="PythonUnixTools", + long_name="UNIX command-line tools", + source="/usr/local/bin", + readme="""\ + This package installs the unix tools in /usr/local/bin for + compatibility with older releases of Python. This package + is not necessary to use Python. + """, + required=False, + ), + dict( + name="PythonDocumentation", + long_name="Python Documentation", + topdir="/Library/Frameworks/Python.framework/Versions/%(VER)s/Resources/English.lproj/Documentation", + source="/pydocs", + readme="""\ + This package installs the python documentation at a location + that is useable for pydoc and IDLE. If you have installed Xcode + it will also install a link to the documentation in + /Developer/Documentation/Python + """, + postflight="scripts/postflight.documentation", + required=False, + ), + dict( + name="PythonProfileChanges", + long_name="Shell profile updater", + readme="""\ + This packages updates your shell profile to make sure that + the Python tools are found by your shell in preference of + the system provided Python tools. + + If you don't install this package you'll have to add + "/Library/Frameworks/Python.framework/Versions/%(VER)s/bin" + to your PATH by hand. + """, + postflight="scripts/postflight.patch-profile", + topdir="/Library/Frameworks/Python.framework", + source="/empty-dir", + required=False, + ), + ] + + if DEPTARGET < '10.4': + result.append( + dict( + name="PythonSystemFixes", + long_name="Fix system Python", + readme="""\ + This package updates the system python installation on + Mac OS X 10.3 to ensure that you can build new python extensions + using that copy of python after installing this version. + """, + postflight="../Tools/fixapplepython23.py", + topdir="/Library/Frameworks/Python.framework", + source="/empty-dir", + required=False, + ) + ) + return result def fatal(msg): """ @@ -327,10 +352,10 @@ """ if platform.system() != 'Darwin': - fatal("This script should be run on a Mac OS X 10.4 system") + fatal("This script should be run on a Mac OS X 10.4 (or later) system") - if platform.release() <= '8.': - fatal("This script should be run on a Mac OS X 10.4 system") + if int(platform.release().split('.')[0]) <= 8: + fatal("This script should be run on a Mac OS X 10.4 (or later) system") if not os.path.exists(SDKPATH): fatal("Please install the latest version of Xcode and the %s SDK"%( @@ -360,6 +385,7 @@ print "Additional arguments" sys.exit(1) + deptarget = None for k, v in options: if k in ('-h', '-?', '--help'): print USAGE @@ -379,11 +405,16 @@ elif k in ('--dep-target', ): DEPTARGET=v + deptarget=v elif k in ('--universal-archs', ): if v in UNIVERSALOPTS: UNIVERSALARCHS = v ARCHLIST = universal_opts_map[UNIVERSALARCHS] + if deptarget is None: + # Select alternate default deployment + # target + DEPTARGET = default_target_map.get(v, '10.3') else: raise NotImplementedError, v @@ -873,7 +904,7 @@ IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()), IFPkgFlagPackageSelection='selected' ) - for item in PKG_RECIPES + for item in pkg_recipes() ], IFPkgFormatVersion=0.10000000149011612, IFPkgFlagBackgroundScaling="proportional", @@ -900,7 +931,7 @@ pkgroot = os.path.join(outdir, 'Python.mpkg', 'Contents') pkgcontents = os.path.join(pkgroot, 'Packages') os.makedirs(pkgcontents) - for recipe in PKG_RECIPES: + for recipe in pkg_recipes(): packageFromRecipe(pkgcontents, recipe) rsrcDir = os.path.join(pkgroot, 'Resources') @@ -948,9 +979,9 @@ shutil.rmtree(outdir) imagepath = os.path.join(outdir, - 'python-%s-macosx'%(getFullVersion(),)) + 'python-%s-macosx%s'%(getFullVersion(),DEPTARGET)) if INCLUDE_TIMESTAMP: - imagepath = imagepath + '%04d-%02d-%02d'%(time.localtime()[:3]) + imagepath = imagepath + '-%04d-%02d-%02d'%(time.localtime()[:3]) imagepath = imagepath + '.dmg' os.mkdir(outdir) @@ -1054,11 +1085,8 @@ print >> fp, "# By:", pwd.getpwuid(os.getuid()).pw_gecos fp.close() - - # And copy it to a DMG buildDMG() - if __name__ == "__main__": main() Modified: python/trunk/Mac/BuildScript/scripts/postflight.framework ============================================================================== --- python/trunk/Mac/BuildScript/scripts/postflight.framework (original) +++ python/trunk/Mac/BuildScript/scripts/postflight.framework Sun Sep 20 22:16:11 2009 @@ -16,16 +16,6 @@ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python at PYVER@" -Wi -tt \ - "${FWK}/lib/python${PYVER}/compileall.py" \ - -x badsyntax -x site-packages \ - "${FWK}/Mac/Tools" - -"${FWK}/bin/python at PYVER@" -Wi -tt -O \ - "${FWK}/lib/python${PYVER}/compileall.py" \ - -x badsyntax -x site-packages \ - "${FWK}/Mac/Tools" - chgrp -R admin "${FWK}" chmod -R g+w "${FWK}" From python-checkins at python.org Sun Sep 20 22:16:39 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 20:16:39 -0000 Subject: [Python-checkins] r74982 - in python/branches/release26-maint: configure configure.in Message-ID: Author: ronald.oussoren Date: Sun Sep 20 22:16:38 2009 New Revision: 74982 Log: Merged revisions 74978 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74978 | ronald.oussoren | 2009-09-20 22:05:44 +0200 (Sun, 20 Sep 2009) | 2 lines Fix typo in error message ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/configure python/branches/release26-maint/configure.in Modified: python/branches/release26-maint/configure ============================================================================== --- python/branches/release26-maint/configure (original) +++ python/branches/release26-maint/configure Sun Sep 20 22:16:38 2009 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 74681 . +# From configure.in Revision: 74712 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.6. # @@ -4675,8 +4675,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;} + { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5 +echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;} { (exit 1); exit 1; }; } fi Modified: python/branches/release26-maint/configure.in ============================================================================== --- python/branches/release26-maint/configure.in (original) +++ python/branches/release26-maint/configure.in Sun Sep 20 22:16:38 2009 @@ -935,7 +935,7 @@ ARCH_RUN_32BIT="arch -i386 -ppc" else - AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all]) + AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way]) fi From python-checkins at python.org Sun Sep 20 22:17:15 2009 From: python-checkins at python.org (ronald.oussoren) Date: Sun, 20 Sep 2009 20:17:15 -0000 Subject: [Python-checkins] r74983 - in python/branches/release26-maint: Mac/BuildScript/build-installer.py Mac/BuildScript/scripts/postflight.framework Message-ID: Author: ronald.oussoren Date: Sun Sep 20 22:17:15 2009 New Revision: 74983 Log: Merged revisions 74981 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74981 | ronald.oussoren | 2009-09-20 22:16:11 +0200 (Sun, 20 Sep 2009) | 3 lines * Make it easier to build custom installers (such as a 3-way universal build) * Upgrade bzip dependency to 1.0.5 ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Mac/BuildScript/build-installer.py python/branches/release26-maint/Mac/BuildScript/scripts/postflight.framework Modified: python/branches/release26-maint/Mac/BuildScript/build-installer.py ============================================================================== --- python/branches/release26-maint/Mac/BuildScript/build-installer.py (original) +++ python/branches/release26-maint/Mac/BuildScript/build-installer.py Sun Sep 20 22:17:15 2009 @@ -61,12 +61,25 @@ DEPSRC = os.path.expanduser('~/Universal/other-sources') # Location of the preferred SDK -SDKPATH = "/Developer/SDKs/MacOSX10.4u.sdk" -#SDKPATH = "/" +if int(os.uname()[2].split('.')[0]) == 8: + # Explicitly use the 10.4u (universal) SDK when + # building on 10.4, the system headers are not + # useable for a universal build + SDKPATH = "/Developer/SDKs/MacOSX10.4u.sdk" +else: + SDKPATH = "/" universal_opts_map = { '32-bit': ('i386', 'ppc',), '64-bit': ('x86_64', 'ppc64',), - 'all': ('i386', 'ppc', 'x86_64', 'ppc64',) } + 'intel': ('i386', 'x86_64'), + '3-way': ('ppc', 'i386', 'x86_64'), + 'all': ('i386', 'ppc', 'x86_64', 'ppc64',) } +default_target_map = { + '64-bit': '10.5', + '3-way': '10.5', + 'intel': '10.5', + 'all': '10.5', +} UNIVERSALOPTS = tuple(universal_opts_map.keys()) @@ -104,87 +117,91 @@ # [The recipes are defined here for convenience but instantiated later after # command line options have been processed.] def library_recipes(): - return [ - dict( - name="Bzip2 1.0.4", - url="http://www.bzip.org/1.0.4/bzip2-1.0.4.tar.gz", - checksum='fc310b254f6ba5fbb5da018f04533688', - configure=None, - install='make install PREFIX=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%( - shellQuote(os.path.join(WORKDIR, 'libraries')), - ' -arch '.join(ARCHLIST), - SDKPATH, + result = [] + + if DEPTARGET < '10.5': + result.extend([ + dict( + name="Bzip2 1.0.5", + url="http://www.bzip.org/1.0.5/bzip2-1.0.5.tar.gz", + checksum='3c15a0c8d1d3ee1c46a1634d00617b1a', + configure=None, + install='make install PREFIX=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%( + shellQuote(os.path.join(WORKDIR, 'libraries')), + ' -arch '.join(ARCHLIST), + SDKPATH, + ), ), - ), - dict( - name="ZLib 1.2.3", - url="http://www.gzip.org/zlib/zlib-1.2.3.tar.gz", - checksum='debc62758716a169df9f62e6ab2bc634', - configure=None, - install='make install prefix=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%( - shellQuote(os.path.join(WORKDIR, 'libraries')), - ' -arch '.join(ARCHLIST), - SDKPATH, + dict( + name="ZLib 1.2.3", + url="http://www.gzip.org/zlib/zlib-1.2.3.tar.gz", + checksum='debc62758716a169df9f62e6ab2bc634', + configure=None, + install='make install prefix=%s/usr/local/ CFLAGS="-arch %s -isysroot %s"'%( + shellQuote(os.path.join(WORKDIR, 'libraries')), + ' -arch '.join(ARCHLIST), + SDKPATH, + ), ), - ), - dict( - # Note that GNU readline is GPL'd software - name="GNU Readline 5.1.4", - url="http://ftp.gnu.org/pub/gnu/readline/readline-5.1.tar.gz" , - checksum='7ee5a692db88b30ca48927a13fd60e46', - patchlevel='0', - patches=[ - # The readline maintainers don't do actual micro releases, but - # just ship a set of patches. - 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-001', - 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-002', - 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-003', - 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-004', - ] - ), - - dict( - name="SQLite 3.6.11", - url="http://www.sqlite.org/sqlite-3.6.11.tar.gz", - checksum='7ebb099696ab76cc6ff65dd496d17858', - configure_pre=[ - '--enable-threadsafe', - '--enable-tempstore', - '--enable-shared=no', - '--enable-static=yes', - '--disable-tcl', - ] - ), + dict( + # Note that GNU readline is GPL'd software + name="GNU Readline 5.1.4", + url="http://ftp.gnu.org/pub/gnu/readline/readline-5.1.tar.gz" , + checksum='7ee5a692db88b30ca48927a13fd60e46', + patchlevel='0', + patches=[ + # The readline maintainers don't do actual micro releases, but + # just ship a set of patches. + 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-001', + 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-002', + 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-003', + 'http://ftp.gnu.org/pub/gnu/readline/readline-5.1-patches/readline51-004', + ] + ), + dict( + name="SQLite 3.6.11", + url="http://www.sqlite.org/sqlite-3.6.11.tar.gz", + checksum='7ebb099696ab76cc6ff65dd496d17858', + configure_pre=[ + '--enable-threadsafe', + '--enable-tempstore', + '--enable-shared=no', + '--enable-static=yes', + '--disable-tcl', + ] + ), + dict( + name="NCurses 5.5", + url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.5.tar.gz", + checksum='e73c1ac10b4bfc46db43b2ddfd6244ef', + configure_pre=[ + "--without-cxx", + "--without-ada", + "--without-progs", + "--without-curses-h", + "--enable-shared", + "--with-shared", + "--datadir=/usr/share", + "--sysconfdir=/etc", + "--sharedstatedir=/usr/com", + "--with-terminfo-dirs=/usr/share/terminfo", + "--with-default-terminfo-dir=/usr/share/terminfo", + "--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib"%(getVersion(),), + "--enable-termcap", + ], + patches=[ + "ncurses-5.5.patch", + ], + useLDFlags=False, + install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Frameworks/Python.framework/Versions/%s/lib/lib* .'%( + shellQuote(os.path.join(WORKDIR, 'libraries')), + shellQuote(os.path.join(WORKDIR, 'libraries')), + getVersion(), + ), + ), + ]) - dict( - name="NCurses 5.5", - url="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.5.tar.gz", - checksum='e73c1ac10b4bfc46db43b2ddfd6244ef', - configure_pre=[ - "--without-cxx", - "--without-ada", - "--without-progs", - "--without-curses-h", - "--enable-shared", - "--with-shared", - "--datadir=/usr/share", - "--sysconfdir=/etc", - "--sharedstatedir=/usr/com", - "--with-terminfo-dirs=/usr/share/terminfo", - "--with-default-terminfo-dir=/usr/share/terminfo", - "--libdir=/Library/Frameworks/Python.framework/Versions/%s/lib"%(getVersion(),), - "--enable-termcap", - ], - patches=[ - "ncurses-5.5.patch", - ], - useLDFlags=False, - install='make && make install DESTDIR=%s && cd %s/usr/local/lib && ln -fs ../../../Library/Frameworks/Python.framework/Versions/%s/lib/lib* .'%( - shellQuote(os.path.join(WORKDIR, 'libraries')), - shellQuote(os.path.join(WORKDIR, 'libraries')), - getVersion(), - ), - ), + result.extend([ dict( name="Sleepycat DB 4.7.25", url="http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz", @@ -195,91 +212,99 @@ '--includedir=/usr/local/include/db4', ] ), - ] + ]) + return result -# Instructions for building packages inside the .mpkg. -PKG_RECIPES = [ - dict( - name="PythonFramework", - long_name="Python Framework", - source="/Library/Frameworks/Python.framework", - readme="""\ - This package installs Python.framework, that is the python - interpreter and the standard library. This also includes Python - wrappers for lots of Mac OS X API's. - """, - postflight="scripts/postflight.framework", - ), - dict( - name="PythonApplications", - long_name="GUI Applications", - source="/Applications/Python %(VER)s", - readme="""\ - This package installs IDLE (an interactive Python IDE), - Python Launcher and Build Applet (create application bundles - from python scripts). - It also installs a number of examples and demos. - """, - required=False, - ), - dict( - name="PythonUnixTools", - long_name="UNIX command-line tools", - source="/usr/local/bin", - readme="""\ - This package installs the unix tools in /usr/local/bin for - compatibility with older releases of Python. This package - is not necessary to use Python. - """, - required=False, - ), - dict( - name="PythonDocumentation", - long_name="Python Documentation", - topdir="/Library/Frameworks/Python.framework/Versions/%(VER)s/Resources/English.lproj/Documentation", - source="/pydocs", - readme="""\ - This package installs the python documentation at a location - that is useable for pydoc and IDLE. If you have installed Xcode - it will also install a link to the documentation in - /Developer/Documentation/Python - """, - postflight="scripts/postflight.documentation", - required=False, - ), - dict( - name="PythonProfileChanges", - long_name="Shell profile updater", - readme="""\ - This packages updates your shell profile to make sure that - the Python tools are found by your shell in preference of - the system provided Python tools. - - If you don't install this package you'll have to add - "/Library/Frameworks/Python.framework/Versions/%(VER)s/bin" - to your PATH by hand. - """, - postflight="scripts/postflight.patch-profile", - topdir="/Library/Frameworks/Python.framework", - source="/empty-dir", - required=False, - ), - dict( - name="PythonSystemFixes", - long_name="Fix system Python", - readme="""\ - This package updates the system python installation on - Mac OS X 10.3 to ensure that you can build new python extensions - using that copy of python after installing this version. +# Instructions for building packages inside the .mpkg. +def pkg_recipes(): + result = [ + dict( + name="PythonFramework", + long_name="Python Framework", + source="/Library/Frameworks/Python.framework", + readme="""\ + This package installs Python.framework, that is the python + interpreter and the standard library. This also includes Python + wrappers for lots of Mac OS X API's. """, - postflight="../Tools/fixapplepython23.py", - topdir="/Library/Frameworks/Python.framework", - source="/empty-dir", - required=False, - ) -] + postflight="scripts/postflight.framework", + ), + dict( + name="PythonApplications", + long_name="GUI Applications", + source="/Applications/Python %(VER)s", + readme="""\ + This package installs IDLE (an interactive Python IDE), + Python Launcher and Build Applet (create application bundles + from python scripts). + + It also installs a number of examples and demos. + """, + required=False, + ), + dict( + name="PythonUnixTools", + long_name="UNIX command-line tools", + source="/usr/local/bin", + readme="""\ + This package installs the unix tools in /usr/local/bin for + compatibility with older releases of Python. This package + is not necessary to use Python. + """, + required=False, + ), + dict( + name="PythonDocumentation", + long_name="Python Documentation", + topdir="/Library/Frameworks/Python.framework/Versions/%(VER)s/Resources/English.lproj/Documentation", + source="/pydocs", + readme="""\ + This package installs the python documentation at a location + that is useable for pydoc and IDLE. If you have installed Xcode + it will also install a link to the documentation in + /Developer/Documentation/Python + """, + postflight="scripts/postflight.documentation", + required=False, + ), + dict( + name="PythonProfileChanges", + long_name="Shell profile updater", + readme="""\ + This packages updates your shell profile to make sure that + the Python tools are found by your shell in preference of + the system provided Python tools. + + If you don't install this package you'll have to add + "/Library/Frameworks/Python.framework/Versions/%(VER)s/bin" + to your PATH by hand. + """, + postflight="scripts/postflight.patch-profile", + topdir="/Library/Frameworks/Python.framework", + source="/empty-dir", + required=False, + ), + ] + + if DEPTARGET < '10.4': + result.append( + dict( + name="PythonSystemFixes", + long_name="Fix system Python", + readme="""\ + This package updates the system python installation on + Mac OS X 10.3 to ensure that you can build new python extensions + using that copy of python after installing this version. + """, + postflight="../Tools/fixapplepython23.py", + topdir="/Library/Frameworks/Python.framework", + source="/empty-dir", + required=False, + ) + ) + return result def fatal(msg): """ @@ -327,10 +352,10 @@ """ if platform.system() != 'Darwin': - fatal("This script should be run on a Mac OS X 10.4 system") + fatal("This script should be run on a Mac OS X 10.4 (or later) system") - if platform.release() <= '8.': - fatal("This script should be run on a Mac OS X 10.4 system") + if int(platform.release().split('.')[0]) <= 8: + fatal("This script should be run on a Mac OS X 10.4 (or later) system") if not os.path.exists(SDKPATH): fatal("Please install the latest version of Xcode and the %s SDK"%( @@ -360,6 +385,7 @@ print "Additional arguments" sys.exit(1) + deptarget = None for k, v in options: if k in ('-h', '-?', '--help'): print USAGE @@ -379,11 +405,16 @@ elif k in ('--dep-target', ): DEPTARGET=v + deptarget=v elif k in ('--universal-archs', ): if v in UNIVERSALOPTS: UNIVERSALARCHS = v ARCHLIST = universal_opts_map[UNIVERSALARCHS] + if deptarget is None: + # Select alternate default deployment + # target + DEPTARGET = default_target_map.get(v, '10.3') else: raise NotImplementedError, v @@ -873,7 +904,7 @@ IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()), IFPkgFlagPackageSelection='selected' ) - for item in PKG_RECIPES + for item in pkg_recipes() ], IFPkgFormatVersion=0.10000000149011612, IFPkgFlagBackgroundScaling="proportional", @@ -900,7 +931,7 @@ pkgroot = os.path.join(outdir, 'Python.mpkg', 'Contents') pkgcontents = os.path.join(pkgroot, 'Packages') os.makedirs(pkgcontents) - for recipe in PKG_RECIPES: + for recipe in pkg_recipes(): packageFromRecipe(pkgcontents, recipe) rsrcDir = os.path.join(pkgroot, 'Resources') @@ -948,9 +979,9 @@ shutil.rmtree(outdir) imagepath = os.path.join(outdir, - 'python-%s-macosx'%(getFullVersion(),)) + 'python-%s-macosx%s'%(getFullVersion(),DEPTARGET)) if INCLUDE_TIMESTAMP: - imagepath = imagepath + '%04d-%02d-%02d'%(time.localtime()[:3]) + imagepath = imagepath + '-%04d-%02d-%02d'%(time.localtime()[:3]) imagepath = imagepath + '.dmg' os.mkdir(outdir) @@ -1054,11 +1085,8 @@ print >> fp, "# By:", pwd.getpwuid(os.getuid()).pw_gecos fp.close() - - # And copy it to a DMG buildDMG() - if __name__ == "__main__": main() Modified: python/branches/release26-maint/Mac/BuildScript/scripts/postflight.framework ============================================================================== --- python/branches/release26-maint/Mac/BuildScript/scripts/postflight.framework (original) +++ python/branches/release26-maint/Mac/BuildScript/scripts/postflight.framework Sun Sep 20 22:17:15 2009 @@ -16,16 +16,6 @@ -x badsyntax -x site-packages \ "${FWK}/lib/python${PYVER}" -"${FWK}/bin/python at PYVER@" -Wi -tt \ - "${FWK}/lib/python${PYVER}/compileall.py" \ - -x badsyntax -x site-packages \ - "${FWK}/Mac/Tools" - -"${FWK}/bin/python at PYVER@" -Wi -tt -O \ - "${FWK}/lib/python${PYVER}/compileall.py" \ - -x badsyntax -x site-packages \ - "${FWK}/Mac/Tools" - chgrp -R admin "${FWK}" chmod -R g+w "${FWK}" From python-checkins at python.org Sun Sep 20 22:44:18 2009 From: python-checkins at python.org (doug.hellmann) Date: Sun, 20 Sep 2009 20:44:18 -0000 Subject: [Python-checkins] r74984 - in python/trunk/Doc/library: os.rst plistlib.rst Message-ID: Author: doug.hellmann Date: Sun Sep 20 22:44:13 2009 New Revision: 74984 Log: Fix markup for external links. Modified: python/trunk/Doc/library/os.rst python/trunk/Doc/library/plistlib.rst Modified: python/trunk/Doc/library/os.rst ============================================================================== --- python/trunk/Doc/library/os.rst (original) +++ python/trunk/Doc/library/os.rst Sun Sep 20 22:44:13 2009 @@ -679,7 +679,7 @@ :func:`~os.open` function. They can be combined using the bitwise OR operator ``|``. Some of them are not available on all platforms. For descriptions of their availability and use, consult the :manpage:`open(2)` manual page on Unix -or `the MSDN ` on Windows. +or `the MSDN `_ on Windows. .. data:: O_RDONLY Modified: python/trunk/Doc/library/plistlib.rst ============================================================================== --- python/trunk/Doc/library/plistlib.rst (original) +++ python/trunk/Doc/library/plistlib.rst Sun Sep 20 22:44:13 2009 @@ -33,7 +33,7 @@ .. seealso:: - `PList manual page ` + `PList manual page `_ Apple's documentation of the file format. From python-checkins at python.org Sun Sep 20 22:55:04 2009 From: python-checkins at python.org (doug.hellmann) Date: Sun, 20 Sep 2009 20:55:04 -0000 Subject: [Python-checkins] r74985 - in python/branches/release26-maint: Doc/library/os.rst Doc/library/plistlib.rst Message-ID: Author: doug.hellmann Date: Sun Sep 20 22:55:04 2009 New Revision: 74985 Log: Merged revisions 74984 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74984 | doug.hellmann | 2009-09-20 16:44:13 -0400 (Sun, 20 Sep 2009) | 2 lines Fix markup for external links. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/os.rst python/branches/release26-maint/Doc/library/plistlib.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 Sun Sep 20 22:55:04 2009 @@ -676,7 +676,7 @@ :func:`~os.open` function. They can be combined using the bitwise OR operator ``|``. Some of them are not available on all platforms. For descriptions of their availability and use, consult the :manpage:`open(2)` manual page on Unix -or `the MSDN ` on Windows. +or `the MSDN `_ on Windows. .. data:: O_RDONLY Modified: python/branches/release26-maint/Doc/library/plistlib.rst ============================================================================== --- python/branches/release26-maint/Doc/library/plistlib.rst (original) +++ python/branches/release26-maint/Doc/library/plistlib.rst Sun Sep 20 22:55:04 2009 @@ -33,7 +33,7 @@ .. seealso:: - `PList manual page ` + `PList manual page `_ Apple's documentation of the file format. From python-checkins at python.org Sun Sep 20 22:56:57 2009 From: python-checkins at python.org (doug.hellmann) Date: Sun, 20 Sep 2009 20:56:57 -0000 Subject: [Python-checkins] r74986 - in python/branches/py3k: Doc/library/os.rst Message-ID: Author: doug.hellmann Date: Sun Sep 20 22:56:56 2009 New Revision: 74986 Log: Merged revisions 74984 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74984 | doug.hellmann | 2009-09-20 16:44:13 -0400 (Sun, 20 Sep 2009) | 2 lines Fix markup for external links. ........ Modified: python/branches/py3k/ (props changed) 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 Sun Sep 20 22:56:56 2009 @@ -588,7 +588,7 @@ :func:`~os.open` function. They can be combined using the bitwise OR operator ``|``. Some of them are not available on all platforms. For descriptions of their availability and use, consult the :manpage:`open(2)` manual page on Unix -or `the MSDN ` on Windows. +or `the MSDN `_ on Windows. .. data:: O_RDONLY From nnorwitz at gmail.com Mon Sep 21 00:54:01 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sun, 20 Sep 2009 18:54:01 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090920225401.GA23629@python.psfb.org> More important issues: ---------------------- test_distutils leaked [25, 0, 0] references, sum=25 test_ssl leaked [-26, 0, -81] references, sum=-107 Less important issues: ---------------------- test_asynchat leaked [0, 0, 130] references, sum=130 test_cmd_line leaked [-25, 0, 0] references, sum=-25 test_docxmlrpc leaked [186, -186, 0] references, sum=0 test_popen2 leaked [-25, 25, 29] references, sum=29 test_smtplib leaked [0, 0, 179] references, sum=179 test_threadedtempfile leaked [0, 0, 101] references, sum=101 test_threading leaked [48, 48, 48] references, sum=144 test_xmlrpc leaked [-4, 4, 0] references, sum=0 From nnorwitz at gmail.com Mon Sep 21 11:42:41 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Mon, 21 Sep 2009 05:42:41 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090921094241.GA16198@python.psfb.org> More important issues: ---------------------- test_urllib2_localnet leaked [0, 0, 282] references, sum=282 Less important issues: ---------------------- test_cmd_line leaked [25, 0, 0] references, sum=25 test_distutils leaked [0, 25, -25] references, sum=0 test_smtplib leaked [88, 0, 0] references, sum=88 test_socketserver leaked [0, 0, 80] references, sum=80 test_sys leaked [0, 42, -21] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 From python-checkins at python.org Mon Sep 21 14:16:43 2009 From: python-checkins at python.org (doug.hellmann) Date: Mon, 21 Sep 2009 12:16:43 -0000 Subject: [Python-checkins] r74987 - in python/branches/release31-maint: Doc/library/os.rst Message-ID: Author: doug.hellmann Date: Mon Sep 21 14:16:43 2009 New Revision: 74987 Log: Merged revisions 74986 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74986 | doug.hellmann | 2009-09-20 16:56:56 -0400 (Sun, 20 Sep 2009) | 9 lines Merged revisions 74984 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74984 | doug.hellmann | 2009-09-20 16:44:13 -0400 (Sun, 20 Sep 2009) | 2 lines Fix markup for external links. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/os.rst 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 Mon Sep 21 14:16:43 2009 @@ -589,7 +589,7 @@ :func:`~os.open` function. They can be combined using the bitwise OR operator ``|``. Some of them are not available on all platforms. For descriptions of their availability and use, consult the :manpage:`open(2)` manual page on Unix -or `the MSDN ` on Windows. +or `the MSDN `_ on Windows. .. data:: O_RDONLY From python-checkins at python.org Mon Sep 21 14:19:07 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 12:19:07 -0000 Subject: [Python-checkins] r74988 - in python/trunk/Lib/distutils/tests: test_ccompiler.py test_cmd.py test_core.py test_filelist.py test_install.py Message-ID: Author: tarek.ziade Date: Mon Sep 21 14:19:07 2009 New Revision: 74988 Log: improved distutils test coverage: now the DEBUG mode is covered too (will help fix the issue #6954 in py3k branch) Modified: python/trunk/Lib/distutils/tests/test_ccompiler.py python/trunk/Lib/distutils/tests/test_cmd.py python/trunk/Lib/distutils/tests/test_core.py python/trunk/Lib/distutils/tests/test_filelist.py python/trunk/Lib/distutils/tests/test_install.py Modified: python/trunk/Lib/distutils/tests/test_ccompiler.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_ccompiler.py (original) +++ python/trunk/Lib/distutils/tests/test_ccompiler.py Mon Sep 21 14:19:07 2009 @@ -1,8 +1,10 @@ """Tests for distutils.ccompiler.""" import os import unittest +from test.test_support import captured_stdout -from distutils.ccompiler import gen_lib_options +from distutils.ccompiler import gen_lib_options, CCompiler +from distutils import debug class FakeCompiler(object): def library_dir_option(self, dir): @@ -30,6 +32,26 @@ '-lname2'] self.assertEquals(opts, wanted) + def test_debug_print(self): + + class MyCCompiler(CCompiler): + executables = {} + + compiler = MyCCompiler() + with captured_stdout() as stdout: + compiler.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + compiler.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CCompilerTestCase) 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 Mon Sep 21 14:19:07 2009 @@ -1,10 +1,12 @@ """Tests for distutils.cmd.""" import unittest import os +from test.test_support import captured_stdout from distutils.cmd import Command from distutils.dist import Distribution from distutils.errors import DistutilsOptionError +from distutils import debug class MyCmd(Command): def initialize_options(self): @@ -102,6 +104,22 @@ cmd.option2 = 'xxx' self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') + def test_debug_print(self): + cmd = self.cmd + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CommandTestCase) Modified: python/trunk/Lib/distutils/tests/test_core.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_core.py (original) +++ python/trunk/Lib/distutils/tests/test_core.py Mon Sep 21 14:19:07 2009 @@ -6,6 +6,7 @@ import shutil import sys import test.test_support +from test.test_support import captured_stdout import unittest @@ -33,10 +34,12 @@ def setUp(self): self.old_stdout = sys.stdout self.cleanup_testfn() + self.old_argv = sys.argv[:] def tearDown(self): sys.stdout = self.old_stdout self.cleanup_testfn() + sys.argv = self.old_argv[:] def cleanup_testfn(self): path = test.test_support.TESTFN @@ -73,6 +76,23 @@ output = output[:-1] self.assertEqual(cwd, output) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + sys.argv = ['setup.py', '--name'] + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + stdout.seek(0) + self.assertEquals(stdout.read(), 'bar\n') + + distutils.core.DEBUG = True + try: + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + finally: + distutils.core.DEBUG = False + stdout.seek(0) + wanted = "options (after parsing config files):\n" + self.assertEquals(stdout.readlines()[0], wanted) def test_suite(): return unittest.makeSuite(CoreTestCase) Modified: python/trunk/Lib/distutils/tests/test_filelist.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_filelist.py (original) +++ python/trunk/Lib/distutils/tests/test_filelist.py Mon Sep 21 14:19:07 2009 @@ -1,7 +1,10 @@ """Tests for distutils.filelist.""" from os.path import join import unittest +from test.test_support import captured_stdout + from distutils.filelist import glob_to_re, FileList +from distutils import debug MANIFEST_IN = """\ include ok @@ -59,6 +62,22 @@ self.assertEquals(file_list.files, wanted) + def test_debug_print(self): + file_list = FileList() + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(FileListTestCase) 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 Mon Sep 21 14:19:07 2009 @@ -6,6 +6,8 @@ import unittest import site +from test.test_support import captured_stdout + from distutils.command.install import install from distutils.command import install as install_module from distutils.command.install import INSTALL_SCHEMES @@ -14,7 +16,6 @@ from distutils.tests import support - class InstallTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -183,6 +184,17 @@ with open(cmd.record) as f: self.assertEquals(len(f.readlines()), 1) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + old_logs_len = len(self.logs) + install_module.DEBUG = True + try: + with captured_stdout() as stdout: + self.test_record() + finally: + install_module.DEBUG = False + self.assertTrue(len(self.logs) > old_logs_len) + def test_suite(): return unittest.makeSuite(InstallTestCase) From python-checkins at python.org Mon Sep 21 14:20:01 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 12:20:01 -0000 Subject: [Python-checkins] r74989 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Mon Sep 21 14:20:01 2009 New Revision: 74989 Log: Blocked revisions 74988 via svnmerge ........ r74988 | tarek.ziade | 2009-09-21 14:19:07 +0200 (Mon, 21 Sep 2009) | 1 line improved distutils test coverage: now the DEBUG mode is covered too (will help fix the issue #6954 in py3k branch) ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Mon Sep 21 15:01:55 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:01:55 -0000 Subject: [Python-checkins] r74990 - in python/branches/py3k: Lib/distutils/cmd.py Lib/distutils/fancy_getopt.py Lib/distutils/tests/test_ccompiler.py Lib/distutils/tests/test_cmd.py Lib/distutils/tests/test_core.py Lib/distutils/tests/test_filelist.py Lib/distutils/tests/test_install.py Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:01:54 2009 New Revision: 74990 Log: Merged revisions 74988 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74988 | tarek.ziade | 2009-09-21 14:19:07 +0200 (Mon, 21 Sep 2009) | 1 line improved distutils test coverage: now the DEBUG mode is covered too (will help fix the issue #6954 in py3k branch) ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/cmd.py python/branches/py3k/Lib/distutils/fancy_getopt.py python/branches/py3k/Lib/distutils/tests/test_ccompiler.py python/branches/py3k/Lib/distutils/tests/test_cmd.py python/branches/py3k/Lib/distutils/tests/test_core.py python/branches/py3k/Lib/distutils/tests/test_filelist.py python/branches/py3k/Lib/distutils/tests/test_install.py Modified: python/branches/py3k/Lib/distutils/cmd.py ============================================================================== --- python/branches/py3k/Lib/distutils/cmd.py (original) +++ python/branches/py3k/Lib/distutils/cmd.py Mon Sep 21 15:01:54 2009 @@ -157,7 +157,7 @@ self.announce(indent + header, level=log.INFO) indent = indent + " " for (option, _, _) in self.user_options: - option = longopt_xlate(option) + option = option.translate(longopt_xlate) if option[-1] == "=": option = option[:-1] value = getattr(self, option) Modified: python/branches/py3k/Lib/distutils/fancy_getopt.py ============================================================================== --- python/branches/py3k/Lib/distutils/fancy_getopt.py (original) +++ python/branches/py3k/Lib/distutils/fancy_getopt.py Mon Sep 21 15:01:54 2009 @@ -26,7 +26,7 @@ # This is used to translate long options to legitimate Python identifiers # (for use as attributes of some object). -longopt_xlate = lambda s: s.replace('-', '_') +longopt_xlate = str.maketrans('-', '_') class FancyGetopt: """Wrapper around the standard 'getopt()' module that provides some @@ -107,7 +107,7 @@ """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" - return longopt_xlate(long_option) + return long_option.translate(longopt_xlate) def _check_alias_dict(self, aliases, what): assert isinstance(aliases, dict) @@ -432,7 +432,7 @@ """Convert a long option name to a valid Python identifier by changing "-" to "_". """ - return longopt_xlate(opt) + return opt.translate(longopt_xlate) class OptionDummy: Modified: python/branches/py3k/Lib/distutils/tests/test_ccompiler.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_ccompiler.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_ccompiler.py Mon Sep 21 15:01:54 2009 @@ -1,8 +1,10 @@ """Tests for distutils.ccompiler.""" import os import unittest +from test.support import captured_stdout -from distutils.ccompiler import gen_lib_options +from distutils.ccompiler import gen_lib_options, CCompiler +from distutils import debug class FakeCompiler(object): def library_dir_option(self, dir): @@ -30,6 +32,26 @@ '-lname2'] self.assertEquals(opts, wanted) + def test_debug_print(self): + + class MyCCompiler(CCompiler): + executables = {} + + compiler = MyCCompiler() + with captured_stdout() as stdout: + compiler.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + compiler.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CCompilerTestCase) 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 Mon Sep 21 15:01:54 2009 @@ -1,10 +1,12 @@ """Tests for distutils.cmd.""" import unittest import os +from test.support import captured_stdout from distutils.cmd import Command from distutils.dist import Distribution from distutils.errors import DistutilsOptionError +from distutils import debug class MyCmd(Command): def initialize_options(self): @@ -102,6 +104,22 @@ cmd.option2 = 'xxx' self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') + def test_debug_print(self): + cmd = self.cmd + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CommandTestCase) Modified: python/branches/py3k/Lib/distutils/tests/test_core.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_core.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_core.py Mon Sep 21 15:01:54 2009 @@ -6,6 +6,7 @@ import shutil import sys import test.support +from test.support import captured_stdout import unittest @@ -33,10 +34,12 @@ def setUp(self): self.old_stdout = sys.stdout self.cleanup_testfn() + self.old_argv = sys.argv[:] def tearDown(self): sys.stdout = self.old_stdout self.cleanup_testfn() + sys.argv = self.old_argv[:] def cleanup_testfn(self): path = test.support.TESTFN @@ -73,6 +76,23 @@ output = output[:-1] self.assertEqual(cwd, output) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + sys.argv = ['setup.py', '--name'] + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + stdout.seek(0) + self.assertEquals(stdout.read(), 'bar\n') + + distutils.core.DEBUG = True + try: + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + finally: + distutils.core.DEBUG = False + stdout.seek(0) + wanted = "options (after parsing config files):\n" + self.assertEquals(stdout.readlines()[0], wanted) def test_suite(): return unittest.makeSuite(CoreTestCase) Modified: python/branches/py3k/Lib/distutils/tests/test_filelist.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/test_filelist.py (original) +++ python/branches/py3k/Lib/distutils/tests/test_filelist.py Mon Sep 21 15:01:54 2009 @@ -1,7 +1,10 @@ """Tests for distutils.filelist.""" from os.path import join import unittest +from test.support import captured_stdout + from distutils.filelist import glob_to_re, FileList +from distutils import debug MANIFEST_IN = """\ include ok @@ -59,6 +62,22 @@ self.assertEquals(file_list.files, wanted) + def test_debug_print(self): + file_list = FileList() + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(FileListTestCase) 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 Mon Sep 21 15:01:54 2009 @@ -6,6 +6,8 @@ import unittest import site +from test.support import captured_stdout + from distutils.command.install import install from distutils.command import install as install_module from distutils.command.install import INSTALL_SCHEMES @@ -14,7 +16,6 @@ from distutils.tests import support - class InstallTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -183,6 +184,17 @@ with open(cmd.record) as f: self.assertEquals(len(f.readlines()), 1) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + old_logs_len = len(self.logs) + install_module.DEBUG = True + try: + with captured_stdout() as stdout: + self.test_record() + finally: + install_module.DEBUG = False + self.assertTrue(len(self.logs) > old_logs_len) + def test_suite(): return unittest.makeSuite(InstallTestCase) From python-checkins at python.org Mon Sep 21 15:10:06 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:10:06 -0000 Subject: [Python-checkins] r74991 - in python/branches/release31-maint: Lib/distutils/cmd.py Lib/distutils/fancy_getopt.py Lib/distutils/tests/test_cmd.py Lib/distutils/tests/test_core.py Lib/distutils/tests/test_filelist.py Lib/distutils/tests/test_install.py Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:10:05 2009 New Revision: 74991 Log: Merged revisions 74990 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74990 | tarek.ziade | 2009-09-21 15:01:54 +0200 (Mon, 21 Sep 2009) | 9 lines Merged revisions 74988 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74988 | tarek.ziade | 2009-09-21 14:19:07 +0200 (Mon, 21 Sep 2009) | 1 line improved distutils test coverage: now the DEBUG mode is covered too (will help fix the issue #6954 in py3k branch) ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/cmd.py python/branches/release31-maint/Lib/distutils/fancy_getopt.py python/branches/release31-maint/Lib/distutils/tests/test_cmd.py python/branches/release31-maint/Lib/distutils/tests/test_core.py python/branches/release31-maint/Lib/distutils/tests/test_filelist.py python/branches/release31-maint/Lib/distutils/tests/test_install.py Modified: python/branches/release31-maint/Lib/distutils/cmd.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/cmd.py (original) +++ python/branches/release31-maint/Lib/distutils/cmd.py Mon Sep 21 15:10:05 2009 @@ -157,7 +157,7 @@ self.announce(indent + header, level=log.INFO) indent = indent + " " for (option, _, _) in self.user_options: - option = longopt_xlate(option) + option = option.translate(longopt_xlate) if option[-1] == "=": option = option[:-1] value = getattr(self, option) Modified: python/branches/release31-maint/Lib/distutils/fancy_getopt.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/fancy_getopt.py (original) +++ python/branches/release31-maint/Lib/distutils/fancy_getopt.py Mon Sep 21 15:10:05 2009 @@ -26,7 +26,7 @@ # This is used to translate long options to legitimate Python identifiers # (for use as attributes of some object). -longopt_xlate = lambda s: s.replace('-', '_') +longopt_xlate = str.maketrans('-', '_') class FancyGetopt: """Wrapper around the standard 'getopt()' module that provides some @@ -107,7 +107,7 @@ """Translate long option name 'long_option' to the form it has as an attribute of some object: ie., translate hyphens to underscores.""" - return longopt_xlate(long_option) + return long_option.translate(longopt_xlate) def _check_alias_dict(self, aliases, what): assert isinstance(aliases, dict) @@ -432,7 +432,7 @@ """Convert a long option name to a valid Python identifier by changing "-" to "_". """ - return longopt_xlate(opt) + return opt.translate(longopt_xlate) class OptionDummy: Modified: python/branches/release31-maint/Lib/distutils/tests/test_cmd.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_cmd.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_cmd.py Mon Sep 21 15:10:05 2009 @@ -1,10 +1,12 @@ """Tests for distutils.cmd.""" import unittest import os +from test.support import captured_stdout from distutils.cmd import Command from distutils.dist import Distribution from distutils.errors import DistutilsOptionError +from distutils import debug class MyCmd(Command): def initialize_options(self): @@ -102,6 +104,22 @@ cmd.option2 = 'xxx' self.assertRaises(DistutilsOptionError, cmd.ensure_dirname, 'option2') + def test_debug_print(self): + cmd = self.cmd + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + cmd.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(CommandTestCase) Modified: python/branches/release31-maint/Lib/distutils/tests/test_core.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_core.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_core.py Mon Sep 21 15:10:05 2009 @@ -6,6 +6,7 @@ import shutil import sys import test.support +from test.support import captured_stdout import unittest @@ -33,10 +34,12 @@ def setUp(self): self.old_stdout = sys.stdout self.cleanup_testfn() + self.old_argv = sys.argv[:] def tearDown(self): sys.stdout = self.old_stdout self.cleanup_testfn() + sys.argv = self.old_argv[:] def cleanup_testfn(self): path = test.support.TESTFN @@ -73,6 +76,23 @@ output = output[:-1] self.assertEqual(cwd, output) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + sys.argv = ['setup.py', '--name'] + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + stdout.seek(0) + self.assertEquals(stdout.read(), 'bar\n') + + distutils.core.DEBUG = True + try: + with captured_stdout() as stdout: + distutils.core.setup(name='bar') + finally: + distutils.core.DEBUG = False + stdout.seek(0) + wanted = "options (after parsing config files):\n" + self.assertEquals(stdout.readlines()[0], wanted) def test_suite(): return unittest.makeSuite(CoreTestCase) Modified: python/branches/release31-maint/Lib/distutils/tests/test_filelist.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_filelist.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_filelist.py Mon Sep 21 15:10:05 2009 @@ -1,6 +1,9 @@ """Tests for distutils.filelist.""" import unittest -from distutils.filelist import glob_to_re + +from distutils.filelist import glob_to_re, FileList +from test.support import captured_stdout +from distutils import debug class FileListTestCase(unittest.TestCase): @@ -16,6 +19,22 @@ self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]$') self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]$') + def test_debug_print(self): + file_list = FileList() + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), '') + + debug.DEBUG = True + try: + with captured_stdout() as stdout: + file_list.debug_print('xxx') + stdout.seek(0) + self.assertEquals(stdout.read(), 'xxx\n') + finally: + debug.DEBUG = False + def test_suite(): return unittest.makeSuite(FileListTestCase) Modified: python/branches/release31-maint/Lib/distutils/tests/test_install.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_install.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_install.py Mon Sep 21 15:10:05 2009 @@ -6,6 +6,8 @@ import unittest import site +from test.support import captured_stdout + from distutils.command.install import install from distutils.command import install as install_module from distutils.command.install import INSTALL_SCHEMES @@ -14,7 +16,6 @@ from distutils.tests import support - class InstallTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): @@ -183,6 +184,17 @@ with open(cmd.record) as f: self.assertEquals(len(f.readlines()), 1) + def test_debug_mode(self): + # this covers the code called when DEBUG is set + old_logs_len = len(self.logs) + install_module.DEBUG = True + try: + with captured_stdout() as stdout: + self.test_record() + finally: + install_module.DEBUG = False + self.assertTrue(len(self.logs) > old_logs_len) + def test_suite(): return unittest.makeSuite(InstallTestCase) From python-checkins at python.org Mon Sep 21 15:23:36 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:23:36 -0000 Subject: [Python-checkins] r74992 - python/trunk/Lib/distutils/tests/test_dist.py Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:23:35 2009 New Revision: 74992 Log: improving distutils coverage Modified: python/trunk/Lib/distutils/tests/test_dist.py 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 Mon Sep 21 15:23:35 2009 @@ -9,6 +9,7 @@ from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command +import distutils.dist from test.test_support import TESTFN, captured_stdout from distutils.tests import support @@ -56,6 +57,27 @@ d.parse_command_line() return d + def test_debug_mode(self): + with open(TESTFN, "w") as f: + f.write("[global]") + f.write("command_packages = foo.bar, splat") + + files = [TESTFN] + sys.argv.append("build") + + with captured_stdout() as stdout: + self.create_distribution(files) + stdout.seek(0) + self.assertEquals(stdout.read(), '') + distutils.dist.DEBUG = True + try: + with captured_stdout() as stdout: + self.create_distribution(files) + stdout.seek(0) + self.assertEquals(stdout.read(), '') + finally: + distutils.dist.DEBUG = False + def test_command_packages_unspecified(self): sys.argv.append("build") d = self.create_distribution() From python-checkins at python.org Mon Sep 21 15:24:15 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:24:15 -0000 Subject: [Python-checkins] r74993 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:24:15 2009 New Revision: 74993 Log: Blocked revisions 74992 via svnmerge ........ r74992 | tarek.ziade | 2009-09-21 15:23:35 +0200 (Mon, 21 Sep 2009) | 1 line improving distutils coverage ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Mon Sep 21 15:41:09 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:41:09 -0000 Subject: [Python-checkins] r74994 - in python/trunk: Lib/distutils/dist.py Lib/distutils/log.py Lib/distutils/tests/test_dist.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:41:08 2009 New Revision: 74994 Log: #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. Modified: python/trunk/Lib/distutils/dist.py python/trunk/Lib/distutils/log.py python/trunk/Lib/distutils/tests/test_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 Mon Sep 21 15:41:08 2009 @@ -359,7 +359,7 @@ parser = ConfigParser() for filename in filenames: if DEBUG: - self.announce(" reading", filename) + self.announce(" reading %s" % filename) parser.read(filename) for section in parser.sections(): options = parser.options(section) Modified: python/trunk/Lib/distutils/log.py ============================================================================== --- python/trunk/Lib/distutils/log.py (original) +++ python/trunk/Lib/distutils/log.py Mon Sep 21 15:41:08 2009 @@ -17,6 +17,9 @@ self.threshold = threshold def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) + if level >= self.threshold: if args: msg = msg % args 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 Mon Sep 21 15:41:08 2009 @@ -200,6 +200,13 @@ self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + def test_announce(self): + # make sure the level is known + dist = Distribution() + args = ('ok',) + kwargs = {'level': 'ok2'} + self.assertRaises(ValueError, dist.announce, args, kwargs) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Sep 21 15:41:08 2009 @@ -379,6 +379,8 @@ Library ------- +- Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. + - Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) From python-checkins at python.org Mon Sep 21 15:41:43 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:41:43 -0000 Subject: [Python-checkins] r74995 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:41:43 2009 New Revision: 74995 Log: Blocked revisions 74994 via svnmerge ........ r74994 | tarek.ziade | 2009-09-21 15:41:08 +0200 (Mon, 21 Sep 2009) | 1 line #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Mon Sep 21 15:43:09 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:43:09 -0000 Subject: [Python-checkins] r74996 - in python/branches/py3k: Lib/distutils/tests/test_dist.py Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:43:09 2009 New Revision: 74996 Log: Merged revisions 74992 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74992 | tarek.ziade | 2009-09-21 15:23:35 +0200 (Mon, 21 Sep 2009) | 1 line improving distutils coverage ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/tests/test_dist.py 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 Mon Sep 21 15:43:09 2009 @@ -8,6 +8,7 @@ from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command +import distutils.dist from test.support import TESTFN, captured_stdout from distutils.tests import support @@ -55,6 +56,27 @@ d.parse_command_line() return d + def test_debug_mode(self): + with open(TESTFN, "w") as f: + f.write("[global]") + f.write("command_packages = foo.bar, splat") + + files = [TESTFN] + sys.argv.append("build") + + with captured_stdout() as stdout: + self.create_distribution(files) + stdout.seek(0) + self.assertEquals(stdout.read(), '') + distutils.dist.DEBUG = True + try: + with captured_stdout() as stdout: + self.create_distribution(files) + stdout.seek(0) + self.assertEquals(stdout.read(), '') + finally: + distutils.dist.DEBUG = False + def test_command_packages_unspecified(self): sys.argv.append("build") d = self.create_distribution() From python-checkins at python.org Mon Sep 21 15:49:57 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:49:57 -0000 Subject: [Python-checkins] r74997 - python/trunk/Lib/distutils/tests/support.py Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:49:57 2009 New Revision: 74997 Log: forgot to commit a file in previous commit (r74994, issue #6954) Modified: python/trunk/Lib/distutils/tests/support.py Modified: python/trunk/Lib/distutils/tests/support.py ============================================================================== --- python/trunk/Lib/distutils/tests/support.py (original) +++ python/trunk/Lib/distutils/tests/support.py Mon Sep 21 15:49:57 2009 @@ -4,6 +4,7 @@ import tempfile from distutils import log +from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution from test.test_support import EnvironmentVarGuard @@ -25,6 +26,8 @@ super(LoggingSilencer, self).tearDown() def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) self.logs.append((level, msg, args)) def get_logs(self, *levels): From python-checkins at python.org Mon Sep 21 15:52:15 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:52:15 -0000 Subject: [Python-checkins] r74998 - python/branches/release26-maint Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:52:15 2009 New Revision: 74998 Log: Blocked revisions 74997 via svnmerge ........ r74997 | tarek.ziade | 2009-09-21 15:49:57 +0200 (Mon, 21 Sep 2009) | 1 line forgot to commit a file in previous commit (r74994, issue #6954) ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Mon Sep 21 15:55:19 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:55:19 -0000 Subject: [Python-checkins] r74999 - in python/branches/py3k: Lib/distutils/dist.py Lib/distutils/log.py Lib/distutils/tests/support.py Lib/distutils/tests/test_dist.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:55:19 2009 New Revision: 74999 Log: Merged revisions 74994,74997 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74994 | tarek.ziade | 2009-09-21 15:41:08 +0200 (Mon, 21 Sep 2009) | 1 line #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. ........ r74997 | tarek.ziade | 2009-09-21 15:49:57 +0200 (Mon, 21 Sep 2009) | 1 line forgot to commit a file in previous commit (r74994, issue #6954) ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/dist.py python/branches/py3k/Lib/distutils/log.py python/branches/py3k/Lib/distutils/tests/support.py python/branches/py3k/Lib/distutils/tests/test_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 Mon Sep 21 15:55:19 2009 @@ -354,7 +354,7 @@ parser = ConfigParser() for filename in filenames: if DEBUG: - self.announce(" reading", filename) + self.announce(" reading %s" % filename) parser.read(filename) for section in parser.sections(): options = parser.options(section) Modified: python/branches/py3k/Lib/distutils/log.py ============================================================================== --- python/branches/py3k/Lib/distutils/log.py (original) +++ python/branches/py3k/Lib/distutils/log.py Mon Sep 21 15:55:19 2009 @@ -17,6 +17,9 @@ self.threshold = threshold def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) + if level >= self.threshold: if args: msg = msg % args Modified: python/branches/py3k/Lib/distutils/tests/support.py ============================================================================== --- python/branches/py3k/Lib/distutils/tests/support.py (original) +++ python/branches/py3k/Lib/distutils/tests/support.py Mon Sep 21 15:55:19 2009 @@ -4,6 +4,7 @@ import tempfile from distutils import log +from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution from test.support import EnvironmentVarGuard @@ -25,6 +26,8 @@ super().tearDown() def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) self.logs.append((level, msg, args)) def get_logs(self, *levels): 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 Mon Sep 21 15:55:19 2009 @@ -171,6 +171,13 @@ self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + def test_announce(self): + # make sure the level is known + dist = Distribution() + args = ('ok',) + kwargs = {'level': 'ok2'} + self.assertRaises(ValueError, dist.announce, args, kwargs) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Sep 21 15:55:19 2009 @@ -1064,6 +1064,8 @@ Library ------- +- Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. + - Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and Michael Haubenwallner. From python-checkins at python.org Mon Sep 21 15:59:08 2009 From: python-checkins at python.org (tarek.ziade) Date: Mon, 21 Sep 2009 13:59:08 -0000 Subject: [Python-checkins] r75000 - in python/branches/release31-maint: Lib/distutils/dist.py Lib/distutils/log.py Lib/distutils/tests/support.py Lib/distutils/tests/test_dist.py Misc/NEWS Message-ID: Author: tarek.ziade Date: Mon Sep 21 15:59:07 2009 New Revision: 75000 Log: Merged revisions 74999 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r74999 | tarek.ziade | 2009-09-21 15:55:19 +0200 (Mon, 21 Sep 2009) | 13 lines Merged revisions 74994,74997 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74994 | tarek.ziade | 2009-09-21 15:41:08 +0200 (Mon, 21 Sep 2009) | 1 line #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. ........ r74997 | tarek.ziade | 2009-09-21 15:49:57 +0200 (Mon, 21 Sep 2009) | 1 line forgot to commit a file in previous commit (r74994, issue #6954) ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/dist.py python/branches/release31-maint/Lib/distutils/log.py python/branches/release31-maint/Lib/distutils/tests/support.py python/branches/release31-maint/Lib/distutils/tests/test_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 Mon Sep 21 15:59:07 2009 @@ -354,7 +354,7 @@ parser = ConfigParser() for filename in filenames: if DEBUG: - self.announce(" reading", filename) + self.announce(" reading %s" % filename) parser.read(filename) for section in parser.sections(): options = parser.options(section) Modified: python/branches/release31-maint/Lib/distutils/log.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/log.py (original) +++ python/branches/release31-maint/Lib/distutils/log.py Mon Sep 21 15:59:07 2009 @@ -17,6 +17,9 @@ self.threshold = threshold def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) + if level >= self.threshold: if args: msg = msg % args Modified: python/branches/release31-maint/Lib/distutils/tests/support.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/support.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/support.py Mon Sep 21 15:59:07 2009 @@ -4,6 +4,7 @@ import tempfile from distutils import log +from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution from test.support import EnvironmentVarGuard @@ -25,6 +26,8 @@ super().tearDown() def _log(self, level, msg, args): + if level not in (DEBUG, INFO, WARN, ERROR, FATAL): + raise ValueError('%s wrong log level' % str(level)) self.logs.append((level, msg, args)) def get_logs(self, *levels): 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 Mon Sep 21 15:59:07 2009 @@ -149,6 +149,13 @@ self.assertEquals(cmds, ['distutils.command', 'one', 'two']) + def test_announce(self): + # make sure the level is known + dist = Distribution() + args = ('ok',) + kwargs = {'level': 'ok2'} + self.assertRaises(ValueError, dist.announce, args, kwargs) + class MetadataTestCase(support.TempdirManager, support.EnvironGuard, unittest.TestCase): Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Mon Sep 21 15:59:07 2009 @@ -21,6 +21,8 @@ Library ------- +- Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. + - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL. From python-checkins at python.org Mon Sep 21 16:12:45 2009 From: python-checkins at python.org (senthil.kumaran) Date: Mon, 21 Sep 2009 14:12:45 -0000 Subject: [Python-checkins] r75001 - python/branches/release31-maint/Doc/howto/unicode.rst Message-ID: Author: senthil.kumaran Date: Mon Sep 21 16:12:44 2009 New Revision: 75001 Log: I guess, someone overlooked this one in howto. (it is proper in trunk. That particular line is removed). Modified: python/branches/release31-maint/Doc/howto/unicode.rst Modified: python/branches/release31-maint/Doc/howto/unicode.rst ============================================================================== --- python/branches/release31-maint/Doc/howto/unicode.rst (original) +++ python/branches/release31-maint/Doc/howto/unicode.rst Mon Sep 21 16:12:44 2009 @@ -150,7 +150,7 @@ are more efficient and convenient. Encodings don't have to handle every possible Unicode character, and most -encodings don't. For example, Python's default encoding is the 'ascii' +encodings don't. For example, Python's default encoding is the 'UTF-8' encoding. The rules for converting a Unicode string into the ASCII encoding are simple; for each code point: From python-checkins at python.org Mon Sep 21 16:39:26 2009 From: python-checkins at python.org (r.david.murray) Date: Mon, 21 Sep 2009 14:39:26 -0000 Subject: [Python-checkins] r75002 - in python/branches/release31-maint: Doc/howto/unicode.rst Message-ID: Author: r.david.murray Date: Mon Sep 21 16:39:26 2009 New Revision: 75002 Log: Merged revisions 74740 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r74740 | benjamin.peterson | 2009-09-11 16:42:29 -0400 (Fri, 11 Sep 2009) | 1 line kill reference to default encoding #6889 ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/howto/unicode.rst Modified: python/branches/release31-maint/Doc/howto/unicode.rst ============================================================================== --- python/branches/release31-maint/Doc/howto/unicode.rst (original) +++ python/branches/release31-maint/Doc/howto/unicode.rst Mon Sep 21 16:39:26 2009 @@ -150,9 +150,8 @@ are more efficient and convenient. Encodings don't have to handle every possible Unicode character, and most -encodings don't. For example, Python's default encoding is the 'UTF-8' -encoding. The rules for converting a Unicode string into the ASCII encoding are -simple; for each code point: +encodings don't. The rules for converting a Unicode string into the ASCII +encoding, for example, are simple; for each code point: 1. If the code point is < 128, each byte is the same as the value of the code point. From rdmurray at bitdance.com Mon Sep 21 16:40:16 2009 From: rdmurray at bitdance.com (R. David Murray) Date: Mon, 21 Sep 2009 10:40:16 -0400 (EDT) Subject: [Python-checkins] r75001 - python/branches/release31-maint/Doc/howto/unicode.rst In-Reply-To: <20090921141251.C597A1BF565@kimball.webabinitio.net> References: <20090921141251.C597A1BF565@kimball.webabinitio.net> Message-ID: On Mon, 21 Sep 2009 at 10:12, senthil.kumaran wrote: > Author: senthil.kumaran > Date: Mon Sep 21 16:12:44 2009 > New Revision: 75001 > > Log: > I guess, someone overlooked this one in howto. (it is > proper in trunk. That particular line is removed). > > > > Modified: > python/branches/release31-maint/Doc/howto/unicode.rst > > Modified: python/branches/release31-maint/Doc/howto/unicode.rst > ============================================================================== > --- python/branches/release31-maint/Doc/howto/unicode.rst (original) > +++ python/branches/release31-maint/Doc/howto/unicode.rst Mon Sep 21 16:12:44 2009 > @@ -150,7 +150,7 @@ > are more efficient and convenient. > > Encodings don't have to handle every possible Unicode character, and most > -encodings don't. For example, Python's default encoding is the 'ascii' > +encodings don't. For example, Python's default encoding is the 'UTF-8' > encoding. The rules for converting a Unicode string into the ASCII encoding are > simple; for each code point: Actually, that fix just hadn't been backported yet (74740). I've done so now. --David From jimjjewett at gmail.com Mon Sep 21 17:10:25 2009 From: jimjjewett at gmail.com (Jim Jewett) Date: Mon, 21 Sep 2009 11:10:25 -0400 Subject: [Python-checkins] r75001 - python/branches/release31-maint/Doc/howto/unicode.rst In-Reply-To: <4ab789e1.1667f10a.03ce.3cd5SMTPIN_ADDED@mx.google.com> References: <4ab789e1.1667f10a.03ce.3cd5SMTPIN_ADDED@mx.google.com> Message-ID: I think this was the wrong fix; the point was to show that some encodings aren't "complete". ASCII wasn't, but I think UTF-8 actually is. Maybe change from > ?Encodings don't have to handle every possible Unicode character, and most > -encodings don't. ?For example, Python's default encoding is the 'ascii' > +encodings don't. ?For example, Python's default encoding is the 'UTF-8' > ?encoding. ?The rules for converting a Unicode string into the ASCII encoding are > ?simple; for each code point: to: Encodings don't have to handle every possible Unicode character, and most encodings don't. ?Most notably, the 'ASCII' encoding doesn't. (Python's default encoding has been changed to 'UTF-8', which does handle all valid Unicode characters.) On Mon, Sep 21, 2009 at 10:12 AM, senthil.kumaran wrote: > Author: senthil.kumaran > Date: Mon Sep 21 16:12:44 2009 > New Revision: 75001 > > Log: > I guess, someone overlooked this one in howto. (it is > proper in trunk. That particular line is removed). > > > > Modified: > ? python/branches/release31-maint/Doc/howto/unicode.rst > > Modified: python/branches/release31-maint/Doc/howto/unicode.rst > ============================================================================== > --- python/branches/release31-maint/Doc/howto/unicode.rst ? ? ? (original) > +++ python/branches/release31-maint/Doc/howto/unicode.rst ? ? ? Mon Sep 21 16:12:44 2009 > @@ -150,7 +150,7 @@ > ?are more efficient and convenient. > > ?Encodings don't have to handle every possible Unicode character, and most > -encodings don't. ?For example, Python's default encoding is the 'ascii' > +encodings don't. ?For example, Python's default encoding is the 'UTF-8' > ?encoding. ?The rules for converting a Unicode string into the ASCII encoding are > ?simple; for each code point: > > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > http://mail.python.org/mailman/listinfo/python-checkins > From python-checkins at python.org Mon Sep 21 18:16:44 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 21 Sep 2009 16:16:44 -0000 Subject: [Python-checkins] r75003 - python/trunk/Objects/longobject.c Message-ID: Author: mark.dickinson Date: Mon Sep 21 18:16:44 2009 New Revision: 75003 Log: Silence MSVC compiler warnings. Modified: python/trunk/Objects/longobject.c Modified: python/trunk/Objects/longobject.c ============================================================================== --- python/trunk/Objects/longobject.c (original) +++ python/trunk/Objects/longobject.c Mon Sep 21 18:16:44 2009 @@ -1413,8 +1413,9 @@ digit hi = pin[i]; for (j = 0; j < size; j++) { twodigits z = (twodigits)pout[j] << PyLong_SHIFT | hi; - hi = z / _PyLong_DECIMAL_BASE; - pout[j] = z - (twodigits)hi * _PyLong_DECIMAL_BASE; + hi = (digit)(z / _PyLong_DECIMAL_BASE); + pout[j] = (digit)(z - (twodigits)hi * + _PyLong_DECIMAL_BASE); } while (hi) { pout[size++] = hi % _PyLong_DECIMAL_BASE; From python-checkins at python.org Mon Sep 21 18:17:26 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 21 Sep 2009 16:17:26 -0000 Subject: [Python-checkins] r75004 - python/branches/release26-maint Message-ID: Author: mark.dickinson Date: Mon Sep 21 18:17:26 2009 New Revision: 75004 Log: Blocked revisions 75003 via svnmerge ........ r75003 | mark.dickinson | 2009-09-21 17:16:44 +0100 (Mon, 21 Sep 2009) | 1 line Silence MSVC compiler warnings. ........ Modified: python/branches/release26-maint/ (props changed) From python-checkins at python.org Mon Sep 21 18:18:27 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 21 Sep 2009 16:18:27 -0000 Subject: [Python-checkins] r75005 - in python/branches/py3k: Objects/longobject.c Message-ID: Author: mark.dickinson Date: Mon Sep 21 18:18:27 2009 New Revision: 75005 Log: Merged revisions 75003 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75003 | mark.dickinson | 2009-09-21 17:16:44 +0100 (Mon, 21 Sep 2009) | 1 line Silence MSVC compiler warnings. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Objects/longobject.c Modified: python/branches/py3k/Objects/longobject.c ============================================================================== --- python/branches/py3k/Objects/longobject.c (original) +++ python/branches/py3k/Objects/longobject.c Mon Sep 21 18:18:27 2009 @@ -1702,8 +1702,9 @@ digit hi = pin[i]; for (j = 0; j < size; j++) { twodigits z = (twodigits)pout[j] << PyLong_SHIFT | hi; - hi = z / _PyLong_DECIMAL_BASE; - pout[j] = z - (twodigits)hi * _PyLong_DECIMAL_BASE; + hi = (digit)(z / _PyLong_DECIMAL_BASE); + pout[j] = (digit)(z - (twodigits)hi * + _PyLong_DECIMAL_BASE); } while (hi) { pout[size++] = hi % _PyLong_DECIMAL_BASE; From python-checkins at python.org Mon Sep 21 18:19:23 2009 From: python-checkins at python.org (mark.dickinson) Date: Mon, 21 Sep 2009 16:19:23 -0000 Subject: [Python-checkins] r75006 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Mon Sep 21 18:19:23 2009 New Revision: 75006 Log: Blocked revisions 75005 via svnmerge ................ r75005 | mark.dickinson | 2009-09-21 17:18:27 +0100 (Mon, 21 Sep 2009) | 9 lines Merged revisions 75003 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75003 | mark.dickinson | 2009-09-21 17:16:44 +0100 (Mon, 21 Sep 2009) | 1 line Silence MSVC compiler warnings. ........ ................ Modified: python/branches/release31-maint/ (props changed) From orsenthil at gmail.com Mon Sep 21 18:42:06 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 21 Sep 2009 22:12:06 +0530 Subject: [Python-checkins] r75001 - python/branches/release31-maint/Doc/howto/unicode.rst Message-ID: <20090921164206.GA4429@ubuntu.ubuntu-domain> On Mon, Sep 21, 2009 at 11:10:25AM -0400, Jim Jewett wrote: > I think this was the wrong fix; the point was to show that some > encodings aren't "complete". ASCII wasn't, but I think UTF-8 actually > is. > > Maybe change from > > > ?Encodings don't have to handle every possible Unicode character, and most > to: > > Encodings don't have to handle every possible Unicode character, and > most encodings don't. ?Most notably, the 'ASCII' encoding doesn't. > (Python's default encoding has been changed to 'UTF-8', which does > handle all valid Unicode characters.) +1 on this change in wording. No need for ()s IMO. I was curious to know why it was previous sentence was removed than mentioning that the default encoding has changed from ascii to UTF-8. -- Senthil Dijkstra probably hates me. -- Linus Torvalds, in kernel/sched.c From python-checkins at python.org Mon Sep 21 23:17:53 2009 From: python-checkins at python.org (antoine.pitrou) Date: Mon, 21 Sep 2009 21:17:53 -0000 Subject: [Python-checkins] r75007 - in python/trunk: Misc/NEWS Modules/_io/fileio.c Modules/_io/textio.c Message-ID: Author: antoine.pitrou Date: Mon Sep 21 23:17:48 2009 New Revision: 75007 Log: Issue #6236, #6348: Fix various failures in the io module under AIX and other platforms, when using a non-gcc compiler. Patch by egreen. In addition, I made explicit the signedness of all bitfields in the IO library. Modified: python/trunk/Misc/NEWS python/trunk/Modules/_io/fileio.c python/trunk/Modules/_io/textio.c Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Sep 21 23:17:48 2009 @@ -379,6 +379,9 @@ Library ------- +- Issue #6236, #6348: Fix various failures in the `io` module under AIX + and other platforms, when using a non-gcc compiler. Patch by egreen. + - Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. - Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 Modified: python/trunk/Modules/_io/fileio.c ============================================================================== --- python/trunk/Modules/_io/fileio.c (original) +++ python/trunk/Modules/_io/fileio.c Mon Sep 21 23:17:48 2009 @@ -45,10 +45,10 @@ typedef struct { PyObject_HEAD int fd; - unsigned readable : 1; - unsigned writable : 1; - int seekable : 2; /* -1 means unknown */ - int closefd : 1; + unsigned int readable : 1; + unsigned int writable : 1; + signed int seekable : 2; /* -1 means unknown */ + unsigned int closefd : 1; PyObject *weakreflist; PyObject *dict; } fileio; Modified: python/trunk/Modules/_io/textio.c ============================================================================== --- python/trunk/Modules/_io/textio.c (original) +++ python/trunk/Modules/_io/textio.c Mon Sep 21 23:17:48 2009 @@ -190,9 +190,9 @@ PyObject_HEAD PyObject *decoder; PyObject *errors; - int pendingcr:1; - int translate:1; - unsigned int seennl:3; + signed int pendingcr: 1; + signed int translate: 1; + unsigned int seennl: 3; } nldecoder_object; static int From python-checkins at python.org Mon Sep 21 23:36:48 2009 From: python-checkins at python.org (antoine.pitrou) Date: Mon, 21 Sep 2009 21:36:48 -0000 Subject: [Python-checkins] r75008 - in python/branches/release26-maint: Misc/NEWS Modules/_fileio.c Message-ID: Author: antoine.pitrou Date: Mon Sep 21 23:36:48 2009 New Revision: 75008 Log: Merged revisions 75007 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75007 | antoine.pitrou | 2009-09-21 23:17:48 +0200 (lun., 21 sept. 2009) | 7 lines Issue #6236, #6348: Fix various failures in the io module under AIX and other platforms, when using a non-gcc compiler. Patch by egreen. In addition, I made explicit the signedness of all bitfields in the IO library. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Modules/_fileio.c Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Mon Sep 21 23:36:48 2009 @@ -82,6 +82,9 @@ Library ------- +- Issue #6236, #6348: Fix various failures in the `io` module under AIX + and other platforms, when using a non-gcc compiler. Patch by egreen. + - Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 - Issue #6947: Fix distutils test on windows. Patch by Hirokazu Yamamoto. Modified: python/branches/release26-maint/Modules/_fileio.c ============================================================================== --- python/branches/release26-maint/Modules/_fileio.c (original) +++ python/branches/release26-maint/Modules/_fileio.c Mon Sep 21 23:36:48 2009 @@ -30,10 +30,10 @@ typedef struct { PyObject_HEAD int fd; - unsigned readable : 1; - unsigned writable : 1; - int seekable : 2; /* -1 means unknown */ - int closefd : 1; + unsigned int readable : 1; + unsigned int writable : 1; + signed int seekable : 2; /* -1 means unknown */ + signed int closefd : 1; PyObject *weakreflist; } PyFileIOObject; From python-checkins at python.org Mon Sep 21 23:37:02 2009 From: python-checkins at python.org (antoine.pitrou) Date: Mon, 21 Sep 2009 21:37:02 -0000 Subject: [Python-checkins] r75009 - in python/branches/py3k: Misc/NEWS Modules/_io/fileio.c Modules/_io/textio.c Message-ID: Author: antoine.pitrou Date: Mon Sep 21 23:37:02 2009 New Revision: 75009 Log: Merged revisions 75007 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75007 | antoine.pitrou | 2009-09-21 23:17:48 +0200 (lun., 21 sept. 2009) | 7 lines Issue #6236, #6348: Fix various failures in the io module under AIX and other platforms, when using a non-gcc compiler. Patch by egreen. In addition, I made explicit the signedness of all bitfields in the IO library. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Misc/NEWS python/branches/py3k/Modules/_io/fileio.c python/branches/py3k/Modules/_io/textio.c Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Mon Sep 21 23:37:02 2009 @@ -72,6 +72,9 @@ Library ------- +- Issue #6236, #6348: Fix various failures in the I/O library under AIX + and other platforms, when using a non-gcc compiler. Patch by egreen. + - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL. Modified: python/branches/py3k/Modules/_io/fileio.c ============================================================================== --- python/branches/py3k/Modules/_io/fileio.c (original) +++ python/branches/py3k/Modules/_io/fileio.c Mon Sep 21 23:37:02 2009 @@ -45,10 +45,10 @@ typedef struct { PyObject_HEAD int fd; - unsigned readable : 1; - unsigned writable : 1; - int seekable : 2; /* -1 means unknown */ - int closefd : 1; + unsigned int readable : 1; + unsigned int writable : 1; + signed int seekable : 2; /* -1 means unknown */ + unsigned int closefd : 1; PyObject *weakreflist; PyObject *dict; } fileio; Modified: python/branches/py3k/Modules/_io/textio.c ============================================================================== --- python/branches/py3k/Modules/_io/textio.c (original) +++ python/branches/py3k/Modules/_io/textio.c Mon Sep 21 23:37:02 2009 @@ -190,9 +190,9 @@ PyObject_HEAD PyObject *decoder; PyObject *errors; - int pendingcr:1; - int translate:1; - unsigned int seennl:3; + signed int pendingcr: 1; + signed int translate: 1; + unsigned int seennl: 3; } nldecoder_object; static int From python-checkins at python.org Mon Sep 21 23:42:29 2009 From: python-checkins at python.org (antoine.pitrou) Date: Mon, 21 Sep 2009 21:42:29 -0000 Subject: [Python-checkins] r75010 - in python/branches/release31-maint: Misc/NEWS Modules/_io/fileio.c Modules/_io/textio.c Message-ID: Author: antoine.pitrou Date: Mon Sep 21 23:42:29 2009 New Revision: 75010 Log: Merged revisions 75009 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r75009 | antoine.pitrou | 2009-09-21 23:37:02 +0200 (lun., 21 sept. 2009) | 13 lines Merged revisions 75007 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75007 | antoine.pitrou | 2009-09-21 23:17:48 +0200 (lun., 21 sept. 2009) | 7 lines Issue #6236, #6348: Fix various failures in the io module under AIX and other platforms, when using a non-gcc compiler. Patch by egreen. In addition, I made explicit the signedness of all bitfields in the IO library. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Misc/NEWS python/branches/release31-maint/Modules/_io/fileio.c python/branches/release31-maint/Modules/_io/textio.c Modified: python/branches/release31-maint/Misc/NEWS ============================================================================== --- python/branches/release31-maint/Misc/NEWS (original) +++ python/branches/release31-maint/Misc/NEWS Mon Sep 21 23:42:29 2009 @@ -21,6 +21,9 @@ Library ------- +- Issue #6236, #6348: Fix various failures in the I/O library under AIX + and other platforms, when using a non-gcc compiler. Patch by egreen. + - Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) Modified: python/branches/release31-maint/Modules/_io/fileio.c ============================================================================== --- python/branches/release31-maint/Modules/_io/fileio.c (original) +++ python/branches/release31-maint/Modules/_io/fileio.c Mon Sep 21 23:42:29 2009 @@ -45,10 +45,10 @@ typedef struct { PyObject_HEAD int fd; - unsigned readable : 1; - unsigned writable : 1; - int seekable : 2; /* -1 means unknown */ - int closefd : 1; + unsigned int readable : 1; + unsigned int writable : 1; + signed int seekable : 2; /* -1 means unknown */ + unsigned int closefd : 1; PyObject *weakreflist; PyObject *dict; } fileio; Modified: python/branches/release31-maint/Modules/_io/textio.c ============================================================================== --- python/branches/release31-maint/Modules/_io/textio.c (original) +++ python/branches/release31-maint/Modules/_io/textio.c Mon Sep 21 23:42:29 2009 @@ -190,9 +190,9 @@ PyObject_HEAD PyObject *decoder; PyObject *errors; - int pendingcr:1; - int translate:1; - unsigned int seennl:3; + signed int pendingcr: 1; + signed int translate: 1; + unsigned int seennl: 3; } nldecoder_object; static int From rdmurray at bitdance.com Tue Sep 22 00:24:07 2009 From: rdmurray at bitdance.com (R. David Murray) Date: Mon, 21 Sep 2009 18:24:07 -0400 (EDT) Subject: [Python-checkins] r75001 - python/branches/release31-maint/Doc/howto/unicode.rst In-Reply-To: <20090921164206.GA4429@ubuntu.ubuntu-domain> References: <20090921164206.GA4429@ubuntu.ubuntu-domain> Message-ID: On Mon, 21 Sep 2009 at 22:12, Senthil Kumaran wrote: > On Mon, Sep 21, 2009 at 11:10:25AM -0400, Jim Jewett wrote: >> I think this was the wrong fix; the point was to show that some >> encodings aren't "complete". ASCII wasn't, but I think UTF-8 actually >> is. >> >> Maybe change from >> >>> ?Encodings don't have to handle every possible Unicode character, and most >> to: >> >> Encodings don't have to handle every possible Unicode character, and >> most encodings don't. ?Most notably, the 'ASCII' encoding doesn't. >> (Python's default encoding has been changed to 'UTF-8', which does >> handle all valid Unicode characters.) > > +1 on this change in wording. No need for ()s IMO. > > I was curious to know why it was previous sentence was removed than > mentioning that the default encoding has changed from ascii to UTF-8. UTF-8 isn't introduced until later in the section. At that point one could mention that Python uses that as its default encoding, but what exactly does that mean? In the context of a howto, that would seem to need explanation. One explanation is provided in the subsequent section: the "Unicode Literals in Python Source Code" subsection explains that the default source encoding is UTF-8 and what that means. Then there's getdefaultencoding, which returns 'utf-8' on my python3, but isn't mentioned in the howto. So I think deleting the sentence (as was done) is good, because its presence there was not particularly enlightening. But the explanation in the subsequent section may be incomplete. --David PS: I also notice that the section on filenames doesn't mention PEP 383 encoding...but perhaps that is beyond the scope of the howto? From python-checkins at python.org Tue Sep 22 02:29:48 2009 From: python-checkins at python.org (brett.cannon) Date: Tue, 22 Sep 2009 00:29:48 -0000 Subject: [Python-checkins] r75011 - in python/trunk: Lib/test/test_time.py Misc/ACKS Misc/NEWS Modules/timemodule.c Message-ID: Author: brett.cannon Date: Tue Sep 22 02:29:48 2009 New Revision: 75011 Log: When range checking was added to time.strftime() a check was placed on tm_isdst to make sure it fell within [-1, 1] just in case someone implementing strftime() in libc was stupid enough to assume this. Turns out, though, some OSs (e.g. zOS) are stupid enough to use values outside of this range for time structs created by the system itself. So instead of throwing a ValueError, tm_isdst is now normalized before being passed to strftime(). Fixes issue #6823. Thanks Robert Shapiro for diagnosing the problem and contributing an initial patch. Modified: python/trunk/Lib/test/test_time.py python/trunk/Misc/ACKS python/trunk/Misc/NEWS python/trunk/Modules/timemodule.c Modified: python/trunk/Lib/test/test_time.py ============================================================================== --- python/trunk/Lib/test/test_time.py (original) +++ python/trunk/Lib/test/test_time.py Tue Sep 22 02:29:48 2009 @@ -87,11 +87,6 @@ (1900, 1, 1, 0, 0, 0, 0, -1, -1)) self.assertRaises(ValueError, time.strftime, '', (1900, 1, 1, 0, 0, 0, 0, 367, -1)) - # Check daylight savings flag [-1, 1] - self.assertRaises(ValueError, time.strftime, '', - (1900, 1, 1, 0, 0, 0, 0, 1, -2)) - self.assertRaises(ValueError, time.strftime, '', - (1900, 1, 1, 0, 0, 0, 0, 1, 2)) def test_default_values_for_zero(self): # Make sure that using all zeros uses the proper default values. Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Tue Sep 22 02:29:48 2009 @@ -669,6 +669,7 @@ Denis Severson Ian Seyer Ha Shao +Richard Shapiro Bruce Sherwood Pete Shinners Michael Shiplett Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Tue Sep 22 02:29:48 2009 @@ -1340,6 +1340,10 @@ Extension Modules ----------------- +- Issue #6823: Allow time.strftime() to accept a tuple with a isdst field + outside of the range of [-1, 1] by normalizing the value to within that + range. + - Issue #6877: Make it possible to link the readline extension to libedit on OSX. Modified: python/trunk/Modules/timemodule.c ============================================================================== --- python/trunk/Modules/timemodule.c (original) +++ python/trunk/Modules/timemodule.c Tue Sep 22 02:29:48 2009 @@ -464,11 +464,13 @@ PyErr_SetString(PyExc_ValueError, "day of year out of range"); return NULL; } - if (buf.tm_isdst < -1 || buf.tm_isdst > 1) { - PyErr_SetString(PyExc_ValueError, - "daylight savings flag out of range"); - return NULL; - } + /* Normalize tm_isdst just in case someone foolishly implements %Z + based on the assumption that tm_isdst falls within the range of + [-1, 1] */ + if (buf.tm_isdst < -1) + buf.tm_isdst = -1; + else if (buf.tm_isdst > 1) + buf.tm_isdst = 1; #ifdef MS_WINDOWS /* check that the format string contains only valid directives */ From python-checkins at python.org Tue Sep 22 02:32:59 2009 From: python-checkins at python.org (brett.cannon) Date: Tue, 22 Sep 2009 00:32:59 -0000 Subject: [Python-checkins] r75012 - in python/branches/py3k: Lib/test/test_time.py Misc/ACKS Modules/timemodule.c Message-ID: Author: brett.cannon Date: Tue Sep 22 02:32:59 2009 New Revision: 75012 Log: Merged revisions 75011 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75011 | brett.cannon | 2009-09-21 17:29:48 -0700 (Mon, 21 Sep 2009) | 10 lines When range checking was added to time.strftime() a check was placed on tm_isdst to make sure it fell within [-1, 1] just in case someone implementing strftime() in libc was stupid enough to assume this. Turns out, though, some OSs (e.g. zOS) are stupid enough to use values outside of this range for time structs created by the system itself. So instead of throwing a ValueError, tm_isdst is now normalized before being passed to strftime(). Fixes issue #6823. Thanks Robert Shapiro for diagnosing the problem and contributing an initial patch. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/test/test_time.py python/branches/py3k/Misc/ACKS python/branches/py3k/Modules/timemodule.c 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 Tue Sep 22 02:32:59 2009 @@ -87,11 +87,6 @@ (1900, 1, 1, 0, 0, 0, 0, -1, -1)) self.assertRaises(ValueError, time.strftime, '', (1900, 1, 1, 0, 0, 0, 0, 367, -1)) - # Check daylight savings flag [-1, 1] - self.assertRaises(ValueError, time.strftime, '', - (1900, 1, 1, 0, 0, 0, 0, 1, -2)) - self.assertRaises(ValueError, time.strftime, '', - (1900, 1, 1, 0, 0, 0, 0, 1, 2)) def test_default_values_for_zero(self): # Make sure that using all zeros uses the proper default values. Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Tue Sep 22 02:32:59 2009 @@ -674,6 +674,7 @@ Denis Severson Ian Seyer Ha Shao +Richard Shapiro Bruce Sherwood Pete Shinners Michael Shiplett Modified: python/branches/py3k/Modules/timemodule.c ============================================================================== --- python/branches/py3k/Modules/timemodule.c (original) +++ python/branches/py3k/Modules/timemodule.c Tue Sep 22 02:32:59 2009 @@ -512,11 +512,13 @@ PyErr_SetString(PyExc_ValueError, "day of year out of range"); return NULL; } - if (buf.tm_isdst < -1 || buf.tm_isdst > 1) { - PyErr_SetString(PyExc_ValueError, - "daylight savings flag out of range"); - return NULL; - } + /* Normalize tm_isdst just in case someone foolishly implements %Z + based on the assumption that tm_isdst falls within the range of + [-1, 1] */ + if (buf.tm_isdst < -1) + buf.tm_isdst = -1; + else if (buf.tm_isdst > 1) + buf.tm_isdst = 1; #ifdef HAVE_WCSFTIME tmpfmt = PyBytes_FromStringAndSize(NULL, From orsenthil at gmail.com Tue Sep 22 06:45:57 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Tue, 22 Sep 2009 10:15:57 +0530 Subject: [Python-checkins] r75001 - python/branches/release31-maint/Doc/howto/unicode.rst In-Reply-To: References: <20090921164206.GA4429@ubuntu.ubuntu-domain> Message-ID: <20090922044557.GA6989@ubuntu.ubuntu-domain> On Mon, Sep 21, 2009 at 06:24:07PM -0400, R. David Murray wrote: > > UTF-8 isn't introduced until later in the section. At that point one > could mention that Python uses that as its default encoding, but what > exactly does that mean? In the context of a howto, that would seem to > need explanation. One explanation is provided in the subsequent section: Agreed. This makes a point. > PS: I also notice that the section on filenames doesn't mention PEP 383 > encoding...but perhaps that is beyond the scope of the howto? Yes, that would be beyond the scope of this howto. FWIW, I find Mark Pilgrim's dealing with the subject at www.diveintopython3.org very enlightening. He has referenced this howto in his chapter, we referencing back would lead to a recursion. :) -- Senthil In English, every word can be verbed. Would that it were so in our programming languages. From solipsis at pitrou.net Tue Sep 22 10:00:55 2009 From: solipsis at pitrou.net (Antoine Pitrou) Date: Tue, 22 Sep 2009 08:00:55 +0000 (UTC) Subject: [Python-checkins] =?utf-8?q?r75011_-_in_python/trunk=3A_Lib/test/?= =?utf-8?q?test=5Ftime=2Epy=09Misc/ACKS_Misc/NEWS_Modules/timemodul?= =?utf-8?b?ZS5j?= References: <7934.19103506512$1253579402@news.gmane.org> Message-ID: writes: > [snip] I think you got the indentation in timemodule.c a bit messed up (tabs vs. spaces). Regards Antoine. From nnorwitz at gmail.com Tue Sep 22 11:42:09 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 22 Sep 2009 05:42:09 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090922094209.GA8819@python.psfb.org> More important issues: ---------------------- test_ssl leaked [26, -26, -420] references, sum=-420 Less important issues: ---------------------- test_asynchat leaked [-126, 0, 0] references, sum=-126 test_file2k leaked [78, -78, 0] references, sum=0 test_smtplib leaked [157, -160, 0] references, sum=-3 test_socketserver leaked [0, 77, -77] references, sum=0 test_sys leaked [-21, 0, 42] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 test_urllib2_localnet leaked [0, 277, -277] references, sum=0 From python-checkins at python.org Tue Sep 22 12:08:14 2009 From: python-checkins at python.org (tarek.ziade) Date: Tue, 22 Sep 2009 10:08:14 -0000 Subject: [Python-checkins] r75013 - in python/branches/py3k: Lib/distutils/tests/test_util.py Message-ID: Author: tarek.ziade Date: Tue Sep 22 12:08:13 2009 New Revision: 75013 Log: Merged revisions 74812 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74812 | ronald.oussoren | 2009-09-15 23:24:07 +0200 (Tue, 15 Sep 2009) | 3 lines Update distutils.util tests after my changes to --with-universal-archs ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Lib/distutils/tests/test_util.py 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 Tue Sep 22 12:08:13 2009 @@ -142,15 +142,35 @@ '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-intel') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-fat3') + + get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-universal') - get_config_vars()['CFLAGS'] = ('-arch x86_64 -isysroot ' + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-fat64') + for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): + get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3'%(arch,)) + + self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From python-checkins at python.org Tue Sep 22 12:14:51 2009 From: python-checkins at python.org (tarek.ziade) Date: Tue, 22 Sep 2009 10:14:51 -0000 Subject: [Python-checkins] r75014 - in python/branches/release31-maint: Lib/distutils/tests/test_util.py Message-ID: Author: tarek.ziade Date: Tue Sep 22 12:14:51 2009 New Revision: 75014 Log: Merged revisions 75013 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r75013 | tarek.ziade | 2009-09-22 12:08:13 +0200 (Tue, 22 Sep 2009) | 10 lines Merged revisions 74812 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r74812 | ronald.oussoren | 2009-09-15 23:24:07 +0200 (Tue, 15 Sep 2009) | 3 lines Update distutils.util tests after my changes to --with-universal-archs ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Lib/distutils/tests/test_util.py Modified: python/branches/release31-maint/Lib/distutils/tests/test_util.py ============================================================================== --- python/branches/release31-maint/Lib/distutils/tests/test_util.py (original) +++ python/branches/release31-maint/Lib/distutils/tests/test_util.py Tue Sep 22 12:14:51 2009 @@ -115,15 +115,35 @@ '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-intel') + + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') + self.assertEquals(get_platform(), 'macosx-10.4-fat3') + + get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-universal') - get_config_vars()['CFLAGS'] = ('-arch x86_64 -isysroot ' + get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot ' '/Developer/SDKs/MacOSX10.4u.sdk ' '-fno-strict-aliasing -fno-common ' '-dynamic -DNDEBUG -g -O3') self.assertEquals(get_platform(), 'macosx-10.4-fat64') + for arch in ('ppc', 'i386', 'x86_64', 'ppc64'): + get_config_vars()['CFLAGS'] = ('-arch %s -isysroot ' + '/Developer/SDKs/MacOSX10.4u.sdk ' + '-fno-strict-aliasing -fno-common ' + '-dynamic -DNDEBUG -g -O3'%(arch,)) + + self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,)) + # linux debian sarge os.name = 'posix' sys.version = ('2.3.5 (#1, Jul 4 2007, 17:28:59) ' From python-checkins at python.org Tue Sep 22 12:55:08 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 22 Sep 2009 10:55:08 -0000 Subject: [Python-checkins] r75015 - python/trunk/Doc/library/codecs.rst Message-ID: Author: georg.brandl Date: Tue Sep 22 12:55:08 2009 New Revision: 75015 Log: Fix encoding name. 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 Sep 22 12:55:08 2009 @@ -960,7 +960,7 @@ +-----------------+--------------------------------+--------------------------------+ | cp1255 | windows-1255 | Hebrew | +-----------------+--------------------------------+--------------------------------+ -| cp1256 | windows1256 | Arabic | +| cp1256 | windows-1256 | Arabic | +-----------------+--------------------------------+--------------------------------+ | cp1257 | windows-1257 | Baltic languages | +-----------------+--------------------------------+--------------------------------+ From python-checkins at python.org Tue Sep 22 15:53:15 2009 From: python-checkins at python.org (georg.brandl) Date: Tue, 22 Sep 2009 13:53:15 -0000 Subject: [Python-checkins] r75016 - python/branches/py3k/Doc/library/configparser.rst Message-ID: Author: georg.brandl Date: Tue Sep 22 15:53:14 2009 New Revision: 75016 Log: #6969: make it explicit that configparser writes/reads text files, and fix the example. Modified: python/branches/py3k/Doc/library/configparser.rst Modified: python/branches/py3k/Doc/library/configparser.rst ============================================================================== --- python/branches/py3k/Doc/library/configparser.rst (original) +++ python/branches/py3k/Doc/library/configparser.rst Tue Sep 22 15:53:14 2009 @@ -231,9 +231,11 @@ .. method:: RawConfigParser.readfp(fp, filename=None) Read and parse configuration data from the file or file-like object in *fp* - (only the :meth:`readline` method is used). If *filename* is omitted and *fp* - has a :attr:`name` attribute, that is used for *filename*; the default is - ````. + (only the :meth:`readline` method is used). The file-like object must + operate in text mode, i.e. return strings from :meth:`readline`. + + If *filename* is omitted and *fp* has a :attr:`name` attribute, that is used + for *filename*; the default is ````. .. method:: RawConfigParser.get(section, option) @@ -279,8 +281,9 @@ .. method:: RawConfigParser.write(fileobject) - Write a representation of the configuration to the specified file object. This - representation can be parsed by a future :meth:`read` call. + Write a representation of the configuration to the specified file object, + which must be opened in text mode (accepting strings). This representation + can be parsed by a future :meth:`read` call. .. method:: RawConfigParser.remove_option(section, option) @@ -370,7 +373,7 @@ config.set('Section1', 'foo', '%(bar)s is %(baz)s!') # Writing our configuration file to 'example.cfg' - with open('example.cfg', 'wb') as configfile: + with open('example.cfg', 'w') as configfile: config.write(configfile) An example of reading the configuration file again:: From python-checkins at python.org Tue Sep 22 16:24:58 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 22 Sep 2009 14:24:58 -0000 Subject: [Python-checkins] r75017 - python/trunk/Mac/Modules/Nav.c Message-ID: Author: ronald.oussoren Date: Tue Sep 22 16:24:57 2009 New Revision: 75017 Log: The 'Navigation Toolbox' is not available at all for 64-bit code, make this explicit in the C code to avoid confusing error messages during the build. Modified: python/trunk/Mac/Modules/Nav.c Modified: python/trunk/Mac/Modules/Nav.c ============================================================================== --- python/trunk/Mac/Modules/Nav.c (original) +++ python/trunk/Mac/Modules/Nav.c Tue Sep 22 16:24:57 2009 @@ -33,6 +33,8 @@ #include "pymactoolbox.h" #include +#ifndef __LP64__ + static PyObject *ErrorObject; static NavEventUPP my_eventProcUPP; @@ -184,22 +186,18 @@ } else if( strcmp(keystr, "preferenceKey") == 0 ) { if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, &opt->preferenceKey) ) return 0; -#ifndef __LP64__ } else if( strcmp(keystr, "popupExtension") == 0 ) { if ( !PyArg_Parse(value, "O&", ResObj_Convert, &opt->popupExtension) ) return 0; -#endif /* !__LP64__ */ } else if( eventProcP && strcmp(keystr, "eventProc") == 0 ) { *eventProcP = my_eventProcUPP; } else if( previewProcP && strcmp(keystr, "previewProc") == 0 ) { *previewProcP = my_previewProcUPP; } else if( filterProcP && strcmp(keystr, "filterProc") == 0 ) { *filterProcP = my_filterProcUPP; -#ifndef __LP64__ } else if( typeListP && strcmp(keystr, "typeList") == 0 ) { if ( !PyArg_Parse(value, "O&", ResObj_Convert, typeListP) ) return 0; -#endif /* !__LP64__ */ } else if( fileTypeP && strcmp(keystr, "fileType") == 0 ) { if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, fileTypeP) ) return 0; @@ -306,22 +304,14 @@ navrr_getattr(navrrobject *self, char *name) { FSRef fsr; -#ifndef __LP64__ FSSpec fss; -#endif /* !__LP64__ */ if( strcmp(name, "__members__") == 0 ) return Py_BuildValue( -#ifndef __LP64__ - "ssssssssss", -#else /* __LP64__ */ "ssssssssss", -#endif /* __LP64__ */ "version", "validRecord", "replacing", "isStationery", "translationNeeded", -#ifndef __LP64__ "selection", -#endif /* !__LP64__ */ "selection_fsr", "fileTranslation", "keyScript", "saveFileName"); @@ -335,7 +325,6 @@ return Py_BuildValue("l", (long)self->itself.isStationery); if( strcmp(name, "translationNeeded") == 0 ) return Py_BuildValue("l", (long)self->itself.translationNeeded); -#ifndef __LP64__ if( strcmp(name, "selection") == 0 ) { SInt32 i; long count; @@ -367,7 +356,6 @@ } return rv; } -#endif /* !__LP64__ */ if( strcmp(name, "selection_fsr") == 0 ) { SInt32 i; long count; @@ -399,10 +387,8 @@ } return rv; } -#ifndef __LP64__ if( strcmp(name, "fileTranslation") == 0 ) return ResObj_New((Handle)self->itself.fileTranslation); -#endif if( strcmp(name, "keyScript") == 0 ) return Py_BuildValue("h", (short)self->itself.keyScript); if( strcmp(name, "saveFileName") == 0 ) @@ -885,11 +871,7 @@ return NULL; } return Py_BuildValue( -#ifndef __LP64__ "{s:h,s:l,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&}", -#else /* __LP64__ */ - "{s:h,s:l,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&}", -#endif /* __LP64__ */ "version", dialogOptions.version, "dialogOptionFlags", dialogOptions.dialogOptionFlags, "location", PyMac_BuildPoint, dialogOptions.location, @@ -900,9 +882,7 @@ "savedFileName", PyMac_BuildStr255, &dialogOptions.savedFileName, "message", PyMac_BuildStr255, &dialogOptions.message, "preferenceKey", PyMac_BuildOSType, dialogOptions.preferenceKey -#ifndef __LP64__ ,"popupExtension", OptResObj_New, dialogOptions.popupExtension -#endif /* __LP64__ */ ); } @@ -943,6 +923,10 @@ "Pass None as eventProc to get movable-modal dialogs that process updates through the standard Python mechanism." ; + +#endif /* !__LP64__ */ + + void initNav(void) { @@ -951,6 +935,12 @@ if (PyErr_WarnPy3k("In 3.x, Nav is removed.", 1)) return; +#ifdef __LP64__ + PyErr_SetString(PyExc_ImportError, "Navigation Services not available in 64-bit mode"); + return; + +#else /* !__LP64__ */ + /* Test that we have NavServices */ if ( !NavServicesAvailable() ) { PyErr_SetString(PyExc_ImportError, "Navigation Services not available"); @@ -972,6 +962,7 @@ my_eventProcUPP = NewNavEventUPP(my_eventProc); my_previewProcUPP = NewNavPreviewUPP(my_previewProc); my_filterProcUPP = NewNavObjectFilterUPP(my_filterProc); +#endif /* !__LP64__ */ } From python-checkins at python.org Tue Sep 22 16:26:55 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 22 Sep 2009 14:26:55 -0000 Subject: [Python-checkins] r75018 - in python/branches/release26-maint: Mac/Modules/Nav.c Message-ID: Author: ronald.oussoren Date: Tue Sep 22 16:26:55 2009 New Revision: 75018 Log: Merged revisions 75017 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75017 | ronald.oussoren | 2009-09-22 16:24:57 +0200 (Tue, 22 Sep 2009) | 4 lines The 'Navigation Toolbox' is not available at all for 64-bit code, make this explicit in the C code to avoid confusing error messages during the build. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Mac/Modules/Nav.c Modified: python/branches/release26-maint/Mac/Modules/Nav.c ============================================================================== --- python/branches/release26-maint/Mac/Modules/Nav.c (original) +++ python/branches/release26-maint/Mac/Modules/Nav.c Tue Sep 22 16:26:55 2009 @@ -33,6 +33,8 @@ #include "pymactoolbox.h" #include +#ifndef __LP64__ + static PyObject *ErrorObject; static NavEventUPP my_eventProcUPP; @@ -184,22 +186,18 @@ } else if( strcmp(keystr, "preferenceKey") == 0 ) { if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, &opt->preferenceKey) ) return 0; -#ifndef __LP64__ } else if( strcmp(keystr, "popupExtension") == 0 ) { if ( !PyArg_Parse(value, "O&", ResObj_Convert, &opt->popupExtension) ) return 0; -#endif /* !__LP64__ */ } else if( eventProcP && strcmp(keystr, "eventProc") == 0 ) { *eventProcP = my_eventProcUPP; } else if( previewProcP && strcmp(keystr, "previewProc") == 0 ) { *previewProcP = my_previewProcUPP; } else if( filterProcP && strcmp(keystr, "filterProc") == 0 ) { *filterProcP = my_filterProcUPP; -#ifndef __LP64__ } else if( typeListP && strcmp(keystr, "typeList") == 0 ) { if ( !PyArg_Parse(value, "O&", ResObj_Convert, typeListP) ) return 0; -#endif /* !__LP64__ */ } else if( fileTypeP && strcmp(keystr, "fileType") == 0 ) { if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, fileTypeP) ) return 0; @@ -306,22 +304,14 @@ navrr_getattr(navrrobject *self, char *name) { FSRef fsr; -#ifndef __LP64__ FSSpec fss; -#endif /* !__LP64__ */ if( strcmp(name, "__members__") == 0 ) return Py_BuildValue( -#ifndef __LP64__ - "ssssssssss", -#else /* __LP64__ */ "ssssssssss", -#endif /* __LP64__ */ "version", "validRecord", "replacing", "isStationery", "translationNeeded", -#ifndef __LP64__ "selection", -#endif /* !__LP64__ */ "selection_fsr", "fileTranslation", "keyScript", "saveFileName"); @@ -335,7 +325,6 @@ return Py_BuildValue("l", (long)self->itself.isStationery); if( strcmp(name, "translationNeeded") == 0 ) return Py_BuildValue("l", (long)self->itself.translationNeeded); -#ifndef __LP64__ if( strcmp(name, "selection") == 0 ) { SInt32 i; long count; @@ -367,7 +356,6 @@ } return rv; } -#endif /* !__LP64__ */ if( strcmp(name, "selection_fsr") == 0 ) { SInt32 i; long count; @@ -399,10 +387,8 @@ } return rv; } -#ifndef __LP64__ if( strcmp(name, "fileTranslation") == 0 ) return ResObj_New((Handle)self->itself.fileTranslation); -#endif if( strcmp(name, "keyScript") == 0 ) return Py_BuildValue("h", (short)self->itself.keyScript); if( strcmp(name, "saveFileName") == 0 ) @@ -885,11 +871,7 @@ return NULL; } return Py_BuildValue( -#ifndef __LP64__ "{s:h,s:l,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&}", -#else /* __LP64__ */ - "{s:h,s:l,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&}", -#endif /* __LP64__ */ "version", dialogOptions.version, "dialogOptionFlags", dialogOptions.dialogOptionFlags, "location", PyMac_BuildPoint, dialogOptions.location, @@ -900,9 +882,7 @@ "savedFileName", PyMac_BuildStr255, &dialogOptions.savedFileName, "message", PyMac_BuildStr255, &dialogOptions.message, "preferenceKey", PyMac_BuildOSType, dialogOptions.preferenceKey -#ifndef __LP64__ ,"popupExtension", OptResObj_New, dialogOptions.popupExtension -#endif /* __LP64__ */ ); } @@ -943,6 +923,10 @@ "Pass None as eventProc to get movable-modal dialogs that process updates through the standard Python mechanism." ; + +#endif /* !__LP64__ */ + + void initNav(void) { @@ -951,6 +935,12 @@ if (PyErr_WarnPy3k("In 3.x, Nav is removed.", 1)) return; +#ifdef __LP64__ + PyErr_SetString(PyExc_ImportError, "Navigation Services not available in 64-bit mode"); + return; + +#else /* !__LP64__ */ + /* Test that we have NavServices */ if ( !NavServicesAvailable() ) { PyErr_SetString(PyExc_ImportError, "Navigation Services not available"); @@ -972,6 +962,7 @@ my_eventProcUPP = NewNavEventUPP(my_eventProc); my_previewProcUPP = NewNavPreviewUPP(my_previewProc); my_filterProcUPP = NewNavObjectFilterUPP(my_filterProc); +#endif /* !__LP64__ */ } From python-checkins at python.org Tue Sep 22 19:23:42 2009 From: python-checkins at python.org (vinay.sajip) Date: Tue, 22 Sep 2009 17:23:42 -0000 Subject: [Python-checkins] r75019 - python/trunk/Doc/library/logging.rst Message-ID: Author: vinay.sajip Date: Tue Sep 22 19:23:41 2009 New Revision: 75019 Log: Fixed a typo, and added sections on optimization and using arbitrary objects as messages. Modified: python/trunk/Doc/library/logging.rst Modified: python/trunk/Doc/library/logging.rst ============================================================================== --- python/trunk/Doc/library/logging.rst (original) +++ python/trunk/Doc/library/logging.rst Tue Sep 22 19:23:41 2009 @@ -59,7 +59,7 @@ import logging LOG_FILENAME = '/tmp/logging_example.out' - logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG,) + logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG) logging.debug('This message should go to the log file') @@ -1515,6 +1515,53 @@ 69 myapp.area2 WARNING Jail zesty vixen who grabbed pay from quack. 69 myapp.area2 ERROR The five boxing wizards jump quickly. +Using arbitrary objects as messages +----------------------------------- + +In the preceding sections and examples, it has been assumed that the message +passed when logging the event is a string. However, this is not the only +possibility. You can pass an arbitrary object as a message, and its +:meth:`__str__` method will be called when the logging system needs to convert +it to a string representation. In fact, if you want to, you can avoid +computing a string representation altogether - for example, the +:class:`SocketHandler` emits an event by pickling it and sending it over the +wire. + +Optimization +------------ + +Formatting of message arguments is deferred until it cannot be avoided. +However, computing the arguments passed to the logging method can also be +expensive, and you may want to avoid doing it if the logger will just throw +away your event. To decide what to do, you can call the :meth:`isEnabledFor` +method which takes a level argument and returns true if the event would be +created by the Logger for that level of call. You can write code like this:: + + if logger.isEnabledFor(logging.DEBUG): + logger.debug("Message with %s, %s", expensive_func1(), + expensive_func2()) + +so that if the logger's threshold is set above ``DEBUG``, the calls to +:func:`expensive_func1` and :func:`expensive_func2` are never made. + +There are other optimizations which can be made for specific applications which +need more precise control over what logging information is collected. Here's a +list of things you can do to avoid processing during logging which you don't +need: + ++-----------------------------------------------+----------------------------------------+ +| What you don't want to collect | How to avoid collecting it | ++===============================================+========================================+ +| Information about where calls were made from. | Set ``logging._srcfile`` to ``None``. | ++-----------------------------------------------+----------------------------------------+ +| Threading information. | Set ``logging.logThreads`` to ``0``. | ++-----------------------------------------------+----------------------------------------+ +| Process information. | Set ``logging.logProcesses`` to ``0``. | ++-----------------------------------------------+----------------------------------------+ + +Also note that the core logging module only includes the basic handlers. If +you don't import :mod:`logging.handlers` and :mod:`logging.config`, they won't +take up any memory. .. _handler: From brett at python.org Tue Sep 22 21:07:59 2009 From: brett at python.org (Brett Cannon) Date: Tue, 22 Sep 2009 12:07:59 -0700 Subject: [Python-checkins] r75011 - in python/trunk: Lib/test/test_time.py Misc/ACKS Misc/NEWS Modules/timemodule.c In-Reply-To: References: <7934.19103506512$1253579402@news.gmane.org> Message-ID: On Tue, Sep 22, 2009 at 01:00, Antoine Pitrou wrote: > writes: >> > [snip] > > I think you got the indentation in timemodule.c a bit messed up (tabs vs. > spaces). I actually followed the lines directly above it which were already incorrect. I'll fix the whole file. -Brett From python-checkins at python.org Tue Sep 22 21:13:27 2009 From: python-checkins at python.org (brett.cannon) Date: Tue, 22 Sep 2009 19:13:27 -0000 Subject: [Python-checkins] r75020 - python/trunk/Modules/timemodule.c Message-ID: Author: brett.cannon Date: Tue Sep 22 21:13:27 2009 New Revision: 75020 Log: Fix whitespace. Modified: python/trunk/Modules/timemodule.c Modified: python/trunk/Modules/timemodule.c ============================================================================== --- python/trunk/Modules/timemodule.c (original) +++ python/trunk/Modules/timemodule.c Tue Sep 22 21:13:27 2009 @@ -404,9 +404,9 @@ } else if (!gettmarg(tup, &buf)) return NULL; - /* Checks added to make sure strftime() does not crash Python by - indexing blindly into some array for a textual representation - by some bad index (fixes bug #897625). + /* Checks added to make sure strftime() does not crash Python by + indexing blindly into some array for a textual representation + by some bad index (fixes bug #897625). Also support values of zero from Python code for arguments in which that is out of range by forcing that value to the lowest value that @@ -427,50 +427,50 @@ (1) gettmarg() handles bounds-checking. (2) Python's acceptable range is one greater than the range in C, thus need to check against automatic decrement by gettmarg(). - */ + */ if (buf.tm_mon == -1) buf.tm_mon = 0; else if (buf.tm_mon < 0 || buf.tm_mon > 11) { - PyErr_SetString(PyExc_ValueError, "month out of range"); - return NULL; - } + PyErr_SetString(PyExc_ValueError, "month out of range"); + return NULL; + } if (buf.tm_mday == 0) buf.tm_mday = 1; else if (buf.tm_mday < 0 || buf.tm_mday > 31) { - PyErr_SetString(PyExc_ValueError, "day of month out of range"); - return NULL; - } - if (buf.tm_hour < 0 || buf.tm_hour > 23) { - PyErr_SetString(PyExc_ValueError, "hour out of range"); - return NULL; - } - if (buf.tm_min < 0 || buf.tm_min > 59) { - PyErr_SetString(PyExc_ValueError, "minute out of range"); - return NULL; - } - if (buf.tm_sec < 0 || buf.tm_sec > 61) { - PyErr_SetString(PyExc_ValueError, "seconds out of range"); - return NULL; - } - /* tm_wday does not need checking of its upper-bound since taking - ``% 7`` in gettmarg() automatically restricts the range. */ - if (buf.tm_wday < 0) { - PyErr_SetString(PyExc_ValueError, "day of week out of range"); - return NULL; - } + PyErr_SetString(PyExc_ValueError, "day of month out of range"); + return NULL; + } + if (buf.tm_hour < 0 || buf.tm_hour > 23) { + PyErr_SetString(PyExc_ValueError, "hour out of range"); + return NULL; + } + if (buf.tm_min < 0 || buf.tm_min > 59) { + PyErr_SetString(PyExc_ValueError, "minute out of range"); + return NULL; + } + if (buf.tm_sec < 0 || buf.tm_sec > 61) { + PyErr_SetString(PyExc_ValueError, "seconds out of range"); + return NULL; + } + /* tm_wday does not need checking of its upper-bound since taking + ``% 7`` in gettmarg() automatically restricts the range. */ + if (buf.tm_wday < 0) { + PyErr_SetString(PyExc_ValueError, "day of week out of range"); + return NULL; + } if (buf.tm_yday == -1) buf.tm_yday = 0; else if (buf.tm_yday < 0 || buf.tm_yday > 365) { - PyErr_SetString(PyExc_ValueError, "day of year out of range"); - return NULL; - } + PyErr_SetString(PyExc_ValueError, "day of year out of range"); + return NULL; + } /* Normalize tm_isdst just in case someone foolishly implements %Z based on the assumption that tm_isdst falls within the range of [-1, 1] */ - if (buf.tm_isdst < -1) - buf.tm_isdst = -1; + if (buf.tm_isdst < -1) + buf.tm_isdst = -1; else if (buf.tm_isdst > 1) - buf.tm_isdst = 1; + buf.tm_isdst = 1; #ifdef MS_WINDOWS /* check that the format string contains only valid directives */ @@ -534,14 +534,15 @@ static PyObject * time_strptime(PyObject *self, PyObject *args) { - PyObject *strptime_module = PyImport_ImportModuleNoBlock("_strptime"); - PyObject *strptime_result; + PyObject *strptime_module = PyImport_ImportModuleNoBlock("_strptime"); + PyObject *strptime_result; - if (!strptime_module) - return NULL; - strptime_result = PyObject_CallMethod(strptime_module, "_strptime_time", "O", args); - Py_DECREF(strptime_module); - return strptime_result; + if (!strptime_module) + return NULL; + strptime_result = PyObject_CallMethod(strptime_module, + "_strptime_time", "O", args); + Py_DECREF(strptime_module); + return strptime_result; } PyDoc_STRVAR(strptime_doc, From python-checkins at python.org Tue Sep 22 21:15:35 2009 From: python-checkins at python.org (brett.cannon) Date: Tue, 22 Sep 2009 19:15:35 -0000 Subject: [Python-checkins] r75021 - in python/branches/py3k: Modules/timemodule.c Message-ID: Author: brett.cannon Date: Tue Sep 22 21:15:35 2009 New Revision: 75021 Log: Merged revisions 75020 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75020 | brett.cannon | 2009-09-22 12:13:27 -0700 (Tue, 22 Sep 2009) | 1 line Fix whitespace. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Modules/timemodule.c Modified: python/branches/py3k/Modules/timemodule.c ============================================================================== --- python/branches/py3k/Modules/timemodule.c (original) +++ python/branches/py3k/Modules/timemodule.c Tue Sep 22 21:15:35 2009 @@ -452,9 +452,9 @@ } else if (!gettmarg(tup, &buf)) return NULL; - /* Checks added to make sure strftime() does not crash Python by - indexing blindly into some array for a textual representation - by some bad index (fixes bug #897625). + /* Checks added to make sure strftime() does not crash Python by + indexing blindly into some array for a textual representation + by some bad index (fixes bug #897625). Also support values of zero from Python code for arguments in which that is out of range by forcing that value to the lowest value that @@ -475,50 +475,50 @@ (1) gettmarg() handles bounds-checking. (2) Python's acceptable range is one greater than the range in C, thus need to check against automatic decrement by gettmarg(). - */ + */ if (buf.tm_mon == -1) buf.tm_mon = 0; else if (buf.tm_mon < 0 || buf.tm_mon > 11) { - PyErr_SetString(PyExc_ValueError, "month out of range"); - return NULL; - } + PyErr_SetString(PyExc_ValueError, "month out of range"); + return NULL; + } if (buf.tm_mday == 0) buf.tm_mday = 1; else if (buf.tm_mday < 0 || buf.tm_mday > 31) { - PyErr_SetString(PyExc_ValueError, "day of month out of range"); - return NULL; - } - if (buf.tm_hour < 0 || buf.tm_hour > 23) { - PyErr_SetString(PyExc_ValueError, "hour out of range"); - return NULL; - } - if (buf.tm_min < 0 || buf.tm_min > 59) { - PyErr_SetString(PyExc_ValueError, "minute out of range"); - return NULL; - } - if (buf.tm_sec < 0 || buf.tm_sec > 61) { - PyErr_SetString(PyExc_ValueError, "seconds out of range"); - return NULL; - } - /* tm_wday does not need checking of its upper-bound since taking - ``% 7`` in gettmarg() automatically restricts the range. */ - if (buf.tm_wday < 0) { - PyErr_SetString(PyExc_ValueError, "day of week out of range"); - return NULL; - } + PyErr_SetString(PyExc_ValueError, "day of month out of range"); + return NULL; + } + if (buf.tm_hour < 0 || buf.tm_hour > 23) { + PyErr_SetString(PyExc_ValueError, "hour out of range"); + return NULL; + } + if (buf.tm_min < 0 || buf.tm_min > 59) { + PyErr_SetString(PyExc_ValueError, "minute out of range"); + return NULL; + } + if (buf.tm_sec < 0 || buf.tm_sec > 61) { + PyErr_SetString(PyExc_ValueError, "seconds out of range"); + return NULL; + } + /* tm_wday does not need checking of its upper-bound since taking + ``% 7`` in gettmarg() automatically restricts the range. */ + if (buf.tm_wday < 0) { + PyErr_SetString(PyExc_ValueError, "day of week out of range"); + return NULL; + } if (buf.tm_yday == -1) buf.tm_yday = 0; else if (buf.tm_yday < 0 || buf.tm_yday > 365) { - PyErr_SetString(PyExc_ValueError, "day of year out of range"); - return NULL; - } + PyErr_SetString(PyExc_ValueError, "day of year out of range"); + return NULL; + } /* Normalize tm_isdst just in case someone foolishly implements %Z based on the assumption that tm_isdst falls within the range of [-1, 1] */ - if (buf.tm_isdst < -1) - buf.tm_isdst = -1; + if (buf.tm_isdst < -1) + buf.tm_isdst = -1; else if (buf.tm_isdst > 1) - buf.tm_isdst = 1; + buf.tm_isdst = 1; #ifdef HAVE_WCSFTIME tmpfmt = PyBytes_FromStringAndSize(NULL, @@ -614,14 +614,15 @@ static PyObject * time_strptime(PyObject *self, PyObject *args) { - PyObject *strptime_module = PyImport_ImportModuleNoBlock("_strptime"); - PyObject *strptime_result; + PyObject *strptime_module = PyImport_ImportModuleNoBlock("_strptime"); + PyObject *strptime_result; - if (!strptime_module) - return NULL; - strptime_result = PyObject_CallMethod(strptime_module, "_strptime_time", "O", args); - Py_DECREF(strptime_module); - return strptime_result; + if (!strptime_module) + return NULL; + strptime_result = PyObject_CallMethod(strptime_module, + "_strptime_time", "O", args); + Py_DECREF(strptime_module); + return strptime_result; } PyDoc_STRVAR(strptime_doc, From python-checkins at python.org Tue Sep 22 21:27:45 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 22 Sep 2009 19:27:45 -0000 Subject: [Python-checkins] r75022 - python/trunk/Lib/distutils/sysconfig.py Message-ID: Author: ronald.oussoren Date: Tue Sep 22 21:27:44 2009 New Revision: 75022 Log: Half of the fix for issue 6957: ensure that distutils ignores the '-isysroot' option on OSX when the corresponding SDK is not installed. This ensures that the user can compile extensions on OSX 10.6 using the Python.org installer and a default installation of Xcode. Modified: python/trunk/Lib/distutils/sysconfig.py Modified: python/trunk/Lib/distutils/sysconfig.py ============================================================================== --- python/trunk/Lib/distutils/sysconfig.py (original) +++ python/trunk/Lib/distutils/sysconfig.py Tue Sep 22 21:27:44 2009 @@ -592,6 +592,29 @@ flags = flags + ' ' + arch _config_vars[key] = flags + # If we're on OSX 10.5 or later and the user tries to + # compiles an extension using an SDK that is not present + # on the current machine it is better to not use an SDK + # than to fail. + # + # The major usecase for this is users using a Python.org + # binary installer on OSX 10.6: that installer uses + # the 10.4u SDK, but that SDK is not installed by default + # when you install Xcode. + # + m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) + if m is not None: + sdk = m.group(1) + if not os.path.exists(sdk): + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) + _config_vars[key] = flags + if args: vals = [] for name in args: From python-checkins at python.org Tue Sep 22 21:31:34 2009 From: python-checkins at python.org (ronald.oussoren) Date: Tue, 22 Sep 2009 19:31:34 -0000 Subject: [Python-checkins] r75023 - in python/branches/release26-maint: Lib/distutils/sysconfig.py Message-ID: Author: ronald.oussoren Date: Tue Sep 22 21:31:34 2009 New Revision: 75023 Log: Merged revisions 75022 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75022 | ronald.oussoren | 2009-09-22 21:27:44 +0200 (Tue, 22 Sep 2009) | 8 lines Half of the fix for issue 6957: ensure that distutils ignores the '-isysroot' option on OSX when the corresponding SDK is not installed. This ensures that the user can compile extensions on OSX 10.6 using the Python.org installer and a default installation of Xcode. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Lib/distutils/sysconfig.py Modified: python/branches/release26-maint/Lib/distutils/sysconfig.py ============================================================================== --- python/branches/release26-maint/Lib/distutils/sysconfig.py (original) +++ python/branches/release26-maint/Lib/distutils/sysconfig.py Tue Sep 22 21:31:34 2009 @@ -566,6 +566,29 @@ flags = flags + ' ' + arch _config_vars[key] = flags + # If we're on OSX 10.5 or later and the user tries to + # compiles an extension using an SDK that is not present + # on the current machine it is better to not use an SDK + # than to fail. + # + # The major usecase for this is users using a Python.org + # binary installer on OSX 10.6: that installer uses + # the 10.4u SDK, but that SDK is not installed by default + # when you install Xcode. + # + m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) + if m is not None: + sdk = m.group(1) + if not os.path.exists(sdk): + for key in ('LDFLAGS', 'BASECFLAGS', + # a number of derived variables. These need to be + # patched up as well. + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): + + flags = _config_vars[key] + flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) + _config_vars[key] = flags + if args: vals = [] for name in args: From python-checkins at python.org Tue Sep 22 22:04:25 2009 From: python-checkins at python.org (brett.cannon) Date: Tue, 22 Sep 2009 20:04:25 -0000 Subject: [Python-checkins] r75024 - python/trunk/Doc/library/sys.rst Message-ID: Author: brett.cannon Date: Tue Sep 22 22:04:24 2009 New Revision: 75024 Log: Fix a minor doc syntax typo. Modified: python/trunk/Doc/library/sys.rst Modified: python/trunk/Doc/library/sys.rst ============================================================================== --- python/trunk/Doc/library/sys.rst (original) +++ python/trunk/Doc/library/sys.rst Tue Sep 22 22:04:24 2009 @@ -404,7 +404,7 @@ if the object type does not provide means to retrieve the size and would cause a `TypeError`. - func:`getsizeof` calls the object's __sizeof__ method and adds an additional + :func:`getsizeof` calls the object's __sizeof__ method and adds an additional garbage collector overhead if the object is managed by the garbage collector. .. versionadded:: 2.6 From python-checkins at python.org Tue Sep 22 22:06:53 2009 From: python-checkins at python.org (brett.cannon) Date: Tue, 22 Sep 2009 20:06:53 -0000 Subject: [Python-checkins] r75025 - in python/branches/release26-maint: Doc/library/sys.rst Message-ID: Author: brett.cannon Date: Tue Sep 22 22:06:53 2009 New Revision: 75025 Log: Merged revisions 75024 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75024 | brett.cannon | 2009-09-22 13:04:24 -0700 (Tue, 22 Sep 2009) | 1 line Fix a minor doc syntax typo. ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/sys.rst Modified: python/branches/release26-maint/Doc/library/sys.rst ============================================================================== --- python/branches/release26-maint/Doc/library/sys.rst (original) +++ python/branches/release26-maint/Doc/library/sys.rst Tue Sep 22 22:06:53 2009 @@ -404,7 +404,7 @@ if the object type does not provide means to retrieve the size and would cause a `TypeError`. - func:`getsizeof` calls the object's __sizeof__ method and adds an additional + :func:`getsizeof` calls the object's __sizeof__ method and adds an additional garbage collector overhead if the object is managed by the garbage collector. .. versionadded:: 2.6 From python-checkins at python.org Tue Sep 22 22:08:09 2009 From: python-checkins at python.org (brett.cannon) Date: Tue, 22 Sep 2009 20:08:09 -0000 Subject: [Python-checkins] r75026 - in python/branches/py3k: Doc/library/sys.rst Message-ID: Author: brett.cannon Date: Tue Sep 22 22:08:09 2009 New Revision: 75026 Log: Merged revisions 75024 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75024 | brett.cannon | 2009-09-22 13:04:24 -0700 (Tue, 22 Sep 2009) | 1 line Fix a minor doc syntax typo. ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/sys.rst Modified: python/branches/py3k/Doc/library/sys.rst ============================================================================== --- python/branches/py3k/Doc/library/sys.rst (original) +++ python/branches/py3k/Doc/library/sys.rst Tue Sep 22 22:08:09 2009 @@ -341,7 +341,7 @@ if the object type does not provide means to retrieve the size and would cause a `TypeError`. - func:`getsizeof` calls the object's __sizeof__ method and adds an additional + :func:`getsizeof` calls the object's __sizeof__ method and adds an additional garbage collector overhead if the object is managed by the garbage collector. From python-checkins at python.org Tue Sep 22 22:12:41 2009 From: python-checkins at python.org (brett.cannon) Date: Tue, 22 Sep 2009 20:12:41 -0000 Subject: [Python-checkins] r75027 - in python/branches/release31-maint: Doc/library/sys.rst Message-ID: Author: brett.cannon Date: Tue Sep 22 22:12:41 2009 New Revision: 75027 Log: Merged revisions 75026 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r75026 | brett.cannon | 2009-09-22 13:08:09 -0700 (Tue, 22 Sep 2009) | 9 lines Merged revisions 75024 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75024 | brett.cannon | 2009-09-22 13:04:24 -0700 (Tue, 22 Sep 2009) | 1 line Fix a minor doc syntax typo. ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/sys.rst Modified: python/branches/release31-maint/Doc/library/sys.rst ============================================================================== --- python/branches/release31-maint/Doc/library/sys.rst (original) +++ python/branches/release31-maint/Doc/library/sys.rst Tue Sep 22 22:12:41 2009 @@ -341,7 +341,7 @@ if the object type does not provide means to retrieve the size and would cause a `TypeError`. - func:`getsizeof` calls the object's __sizeof__ method and adds an additional + :func:`getsizeof` calls the object's __sizeof__ method and adds an additional garbage collector overhead if the object is managed by the garbage collector. From mal at egenix.com Tue Sep 22 23:22:10 2009 From: mal at egenix.com (M.-A. Lemburg) Date: Tue, 22 Sep 2009 23:22:10 +0200 Subject: [Python-checkins] r75022 - python/trunk/Lib/distutils/sysconfig.py In-Reply-To: <20090922192749.E406740508C@mail.egenix.com> References: <20090922192749.E406740508C@mail.egenix.com> Message-ID: <4AB94002.9040701@egenix.com> ronald.oussoren wrote: > Author: ronald.oussoren > Date: Tue Sep 22 21:27:44 2009 > New Revision: 75022 > > Log: > Half of the fix for issue 6957: ensure that distutils > ignores the '-isysroot' option on OSX when the > corresponding SDK is not installed. I think you should add a log output if this case triggers. Otherwise, it's difficult to find out just why some extension did not build e.g. as universal binary. > This ensures that the user can compile extensions > on OSX 10.6 using the Python.org installer and a > default installation of Xcode. > > > Modified: > python/trunk/Lib/distutils/sysconfig.py > > Modified: python/trunk/Lib/distutils/sysconfig.py > ============================================================================== > --- python/trunk/Lib/distutils/sysconfig.py (original) > +++ python/trunk/Lib/distutils/sysconfig.py Tue Sep 22 21:27:44 2009 > @@ -592,6 +592,29 @@ > flags = flags + ' ' + arch > _config_vars[key] = flags > > + # If we're on OSX 10.5 or later and the user tries to > + # compiles an extension using an SDK that is not present > + # on the current machine it is better to not use an SDK > + # than to fail. > + # > + # The major usecase for this is users using a Python.org > + # binary installer on OSX 10.6: that installer uses > + # the 10.4u SDK, but that SDK is not installed by default > + # when you install Xcode. > + # > + m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) > + if m is not None: > + sdk = m.group(1) > + if not os.path.exists(sdk): > + for key in ('LDFLAGS', 'BASECFLAGS', > + # a number of derived variables. These need to be > + # patched up as well. > + 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): > + > + flags = _config_vars[key] > + flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) > + _config_vars[key] = flags > + > if args: > vals = [] > for name in args: > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > http://mail.python.org/mailman/listinfo/python-checkins -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 21 2009) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From python-checkins at python.org Tue Sep 22 23:47:30 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 22 Sep 2009 21:47:30 -0000 Subject: [Python-checkins] r75028 - in python/branches/py3k: Doc/library/functions.rst Lib/test/test_range.py Misc/NEWS Objects/rangeobject.c Message-ID: Author: mark.dickinson Date: Tue Sep 22 23:47:24 2009 New Revision: 75028 Log: Issue #1766304: Optimize membership testing for ranges: 'n in range(...)' does an O(1) check, if n is an integer. Non-integers aren't affected. Thanks Robert Lehmann. Modified: python/branches/py3k/Doc/library/functions.rst python/branches/py3k/Lib/test/test_range.py python/branches/py3k/Misc/NEWS python/branches/py3k/Objects/rangeobject.c Modified: python/branches/py3k/Doc/library/functions.rst ============================================================================== --- python/branches/py3k/Doc/library/functions.rst (original) +++ python/branches/py3k/Doc/library/functions.rst Tue Sep 22 23:47:24 2009 @@ -925,6 +925,10 @@ >>> list(range(1, 0)) [] + .. versionchanged:: 3.2 + Testing integers for membership takes constant time instead of + iterating through all items. + .. function:: repr(object) 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 Tue Sep 22 23:47:24 2009 @@ -78,6 +78,56 @@ with self.assertRaises(TypeError): range([], 1, -1) + def test_types(self): + # Non-integer objects *equal* to any of the range's items are supposed + # to be contained in the range. + self.assertTrue(1.0 in range(3)) + self.assertTrue(True in range(3)) + self.assertTrue(1+0j in range(3)) + + class C1: + def __eq__(self, other): return True + self.assertTrue(C1() in range(3)) + + # Objects are never coerced into other types for comparison. + class C2: + def __int__(self): return 1 + def __index__(self): return 1 + self.assertFalse(C2() in range(3)) + # ..except if explicitly told so. + self.assertTrue(int(C2()) in range(3)) + + + def test_strided_limits(self): + r = range(0, 101, 2) + self.assertTrue(0 in r) + self.assertFalse(1 in r) + self.assertTrue(2 in r) + self.assertFalse(99 in r) + self.assertTrue(100 in r) + self.assertFalse(101 in r) + + r = range(0, -20, -1) + self.assertTrue(0 in r) + self.assertTrue(-1 in r) + self.assertTrue(-19 in r) + self.assertFalse(-20 in r) + + r = range(0, -20, -2) + self.assertTrue(-18 in r) + self.assertFalse(-19 in r) + self.assertFalse(-20 in r) + + def test_empty(self): + r = range(0) + self.assertFalse(0 in r) + self.assertFalse(1 in r) + + r = range(0, -10) + self.assertFalse(0 in r) + self.assertFalse(-1 in r) + self.assertFalse(1 in r) + def test_main(): test.support.run_unittest(RangeTest) Modified: python/branches/py3k/Misc/NEWS ============================================================================== --- python/branches/py3k/Misc/NEWS (original) +++ python/branches/py3k/Misc/NEWS Tue Sep 22 23:47:24 2009 @@ -12,6 +12,8 @@ Core and Builtins ----------------- +- Issue #1766304: Improve performance of membership tests on range objects. + - Issue #6713: Improve performance of integer -> string conversions. - Issue #6846: Fix bug where bytearray.pop() returns negative integers. Modified: python/branches/py3k/Objects/rangeobject.c ============================================================================== --- python/branches/py3k/Objects/rangeobject.c (original) +++ python/branches/py3k/Objects/rangeobject.c Tue Sep 22 23:47:24 2009 @@ -273,12 +273,69 @@ r->start, r->stop, r->step); } +static int +range_contains(rangeobject *r, PyObject *ob) { + if (PyLong_Check(ob)) { + int cmp1, cmp2, cmp3; + PyObject *tmp1 = NULL; + PyObject *tmp2 = NULL; + PyObject *zero = NULL; + int result = -1; + + zero = PyLong_FromLong(0); + if (zero == NULL) /* MemoryError in int(0) */ + goto end; + + /* Check if the value can possibly be in the range. */ + + cmp1 = PyObject_RichCompareBool(r->step, zero, Py_GT); + if (cmp1 == -1) + goto end; + if (cmp1 == 1) { /* positive steps: start <= ob < stop */ + cmp2 = PyObject_RichCompareBool(r->start, ob, Py_LE); + cmp3 = PyObject_RichCompareBool(ob, r->stop, Py_LT); + } + else { /* negative steps: stop < ob <= start */ + cmp2 = PyObject_RichCompareBool(ob, r->start, Py_LE); + cmp3 = PyObject_RichCompareBool(r->stop, ob, Py_LT); + } + + if (cmp2 == -1 || cmp3 == -1) /* TypeError */ + goto end; + if (cmp2 == 0 || cmp3 == 0) { /* ob outside of range */ + result = 0; + goto end; + } + + /* Check that the stride does not invalidate ob's membership. */ + tmp1 = PyNumber_Subtract(ob, r->start); + if (tmp1 == NULL) + goto end; + tmp2 = PyNumber_Remainder(tmp1, r->step); + if (tmp2 == NULL) + goto end; + /* result = (int(ob) - start % step) == 0 */ + result = PyObject_RichCompareBool(tmp2, zero, Py_EQ); + end: + Py_XDECREF(tmp1); + Py_XDECREF(tmp2); + Py_XDECREF(zero); + return result; + } + /* Fall back to iterative search. */ + return (int)_PySequence_IterSearch((PyObject*)r, ob, + PY_ITERSEARCH_CONTAINS); +} + static PySequenceMethods range_as_sequence = { (lenfunc)range_length, /* sq_length */ 0, /* sq_concat */ 0, /* sq_repeat */ (ssizeargfunc)range_item, /* sq_item */ 0, /* sq_slice */ + 0, /* sq_ass_item */ + 0, /* sq_ass_slice */ + (objobjproc)range_contains, /* sq_contains */ }; static PyObject * range_iter(PyObject *seq); From python-checkins at python.org Tue Sep 22 23:49:36 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 22 Sep 2009 21:49:36 -0000 Subject: [Python-checkins] r75029 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Tue Sep 22 23:49:35 2009 New Revision: 75029 Log: Blocked revisions 75028 via svnmerge ........ r75028 | mark.dickinson | 2009-09-22 22:47:24 +0100 (Tue, 22 Sep 2009) | 4 lines Issue #1766304: Optimize membership testing for ranges: 'n in range(...)' does an O(1) check, if n is an integer. Non-integers aren't affected. Thanks Robert Lehmann. ........ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Tue Sep 22 23:52:04 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 22 Sep 2009 21:52:04 -0000 Subject: [Python-checkins] r75030 - python/branches/py3k/Misc/ACKS Message-ID: Author: mark.dickinson Date: Tue Sep 22 23:52:03 2009 New Revision: 75030 Log: Add Robert Lehmann for issue #1766304 patch Modified: python/branches/py3k/Misc/ACKS Modified: python/branches/py3k/Misc/ACKS ============================================================================== --- python/branches/py3k/Misc/ACKS (original) +++ python/branches/py3k/Misc/ACKS Tue Sep 22 23:52:03 2009 @@ -433,6 +433,7 @@ Vincent Legoll Kip Lehman Joerg Lehmann +Robert Lehmann Luke Kenneth Casson Leighton Marc-Andre Lemburg John Lenton From python-checkins at python.org Tue Sep 22 23:53:10 2009 From: python-checkins at python.org (mark.dickinson) Date: Tue, 22 Sep 2009 21:53:10 -0000 Subject: [Python-checkins] r75031 - python/branches/release31-maint Message-ID: Author: mark.dickinson Date: Tue Sep 22 23:53:09 2009 New Revision: 75031 Log: Blocked revisions 75030 via svnmerge ........ r75030 | mark.dickinson | 2009-09-22 22:52:03 +0100 (Tue, 22 Sep 2009) | 1 line Add Robert Lehmann for issue #1766304 patch ........ Modified: python/branches/release31-maint/ (props changed) From python-checkins at python.org Wed Sep 23 00:15:29 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 22 Sep 2009 22:15:29 -0000 Subject: [Python-checkins] r75032 - python/trunk/Doc/library/sys.rst Message-ID: Author: benjamin.peterson Date: Wed Sep 23 00:15:28 2009 New Revision: 75032 Log: fix typos/rephrase Modified: python/trunk/Doc/library/sys.rst Modified: python/trunk/Doc/library/sys.rst ============================================================================== --- python/trunk/Doc/library/sys.rst (original) +++ python/trunk/Doc/library/sys.rst Wed Sep 23 00:15:28 2009 @@ -400,12 +400,12 @@ does not have to hold true for third-party extensions as it is implementation specific. - The *default* argument allows to define a value which will be returned - if the object type does not provide means to retrieve the size and would - cause a `TypeError`. + If given, *default* will be returned if the object does not provide means to + retrieve the size. Otherwise a `TypeError` will be raised. - :func:`getsizeof` calls the object's __sizeof__ method and adds an additional - garbage collector overhead if the object is managed by the garbage collector. + :func:`getsizeof` calls the object's ``__sizeof__`` method and adds an + additional garbage collector overhead if the object is managed by the garbage + collector. .. versionadded:: 2.6 From python-checkins at python.org Wed Sep 23 00:30:03 2009 From: python-checkins at python.org (benjamin.peterson) Date: Tue, 22 Sep 2009 22:30:03 -0000 Subject: [Python-checkins] r75033 - in python/branches/release26-maint: Doc/library/sys.rst Message-ID: Author: benjamin.peterson Date: Wed Sep 23 00:30:03 2009 New Revision: 75033 Log: Merged revisions 75032 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75032 | benjamin.peterson | 2009-09-22 17:15:28 -0500 (Tue, 22 Sep 2009) | 1 line fix typos/rephrase ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/sys.rst Modified: python/branches/release26-maint/Doc/library/sys.rst ============================================================================== --- python/branches/release26-maint/Doc/library/sys.rst (original) +++ python/branches/release26-maint/Doc/library/sys.rst Wed Sep 23 00:30:03 2009 @@ -400,12 +400,12 @@ does not have to hold true for third-party extensions as it is implementation specific. - The *default* argument allows to define a value which will be returned - if the object type does not provide means to retrieve the size and would - cause a `TypeError`. + If given, *default* will be returned if the object does not provide means to + retrieve the size. Otherwise a `TypeError` will be raised. - :func:`getsizeof` calls the object's __sizeof__ method and adds an additional - garbage collector overhead if the object is managed by the garbage collector. + :func:`getsizeof` calls the object's ``__sizeof__`` method and adds an + additional garbage collector overhead if the object is managed by the garbage + collector. .. versionadded:: 2.6 From nnorwitz at gmail.com Wed Sep 23 00:53:59 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 22 Sep 2009 18:53:59 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20090922225359.GA16828@python.psfb.org> More important issues: ---------------------- test_ssl leaked [420, 0, 0] references, sum=420 test_urllib2_localnet leaked [-277, 0, 0] references, sum=-277 Less important issues: ---------------------- test_asynchat leaked [0, 126, -126] references, sum=0 test_cmd_line leaked [-25, 25, -25] references, sum=-25 test_file2k leaked [0, 84, -84] references, sum=0 test_smtplib leaked [-90, 181, -179] references, sum=-88 test_sys leaked [0, -42, 21] references, sum=-21 test_threading leaked [48, 48, 48] references, sum=144 From python-checkins at python.org Wed Sep 23 02:56:34 2009 From: python-checkins at python.org (andrew.kuchling) Date: Wed, 23 Sep 2009 00:56:34 -0000 Subject: [Python-checkins] r75034 - in sandbox/trunk/faq: README extending.rst general.rst gui.rst index.rst installed.rst library.rst programming.rst windows.rst Message-ID: Author: andrew.kuchling Date: Wed Sep 23 02:56:33 2009 New Revision: 75034 Log: Initial commit of FAQ manual Added: sandbox/trunk/faq/ sandbox/trunk/faq/README sandbox/trunk/faq/extending.rst sandbox/trunk/faq/general.rst sandbox/trunk/faq/gui.rst sandbox/trunk/faq/index.rst sandbox/trunk/faq/installed.rst sandbox/trunk/faq/library.rst sandbox/trunk/faq/programming.rst sandbox/trunk/faq/windows.rst Added: sandbox/trunk/faq/README ============================================================================== --- (empty file) +++ sandbox/trunk/faq/README Wed Sep 23 02:56:33 2009 @@ -0,0 +1,36 @@ + +To add the FAQ to the Python documentation set: + +1) Create a symlink from Doc/faq to this directory. + +2) Make the following change to contents.rst: + +Index: contents.rst +=================================================================== +--- contents.rst (revision 75033) ++++ contents.rst (working copy) +@@ -15,6 +15,7 @@ + install/index.rst + documenting/index.rst + howto/index.rst ++ faq/index.rst + glossary.rst + + about.rst + +3) (optional) To add the FAQs to the top-level table of contents, + apply the following patch. + +Index: tools/sphinxext/indexcontent.html +=================================================================== +--- tools/sphinxext/indexcontent.html (revision 75033) ++++ tools/sphinxext/indexcontent.html (working copy) +@@ -26,6 +26,8 @@ + sharing modules with others

+ ++ + + + Added: sandbox/trunk/faq/extending.rst ============================================================================== --- (empty file) +++ sandbox/trunk/faq/extending.rst Wed Sep 23 02:56:33 2009 @@ -0,0 +1,462 @@ +==================================== +Extending/Embedding FAQ +==================================== + +.. contents:: + + +Can I create my own functions in C? +------------------------------------------ +Yes, you can create built-in modules containing functions, +variables, exceptions and even new types in C. This is explained in +the document "Extending and Embedding the Python Interpreter" (http://docs.python.org/ext/ext.html). + +Most intermediate or advanced Python books will also +cover this topic. + +Can I create my own functions in C++? +-------------------------------------------- +Yes, using the C compatibility features found in C++. +Place ``extern "C" { ... }`` around the Python include files and put +``extern "C"`` before each function that is going to be called by the +Python interpreter. Global or static C++ objects with constructors +are probably not a good idea. + +Writing C is hard; are there any alternatives? +--------------------------------------------------- + +There are a number of alternatives to writing your own C extensions, +depending on what you're trying to do. + +If you need more speed, `Psyco `_ generates x86 assembly code +from Python bytecode. You can use Psyco to compile the most +time-critical functions in your code, and gain a significant +improvement with very little effort, as long as you're running on a +machine with an x86-compatible processor. + +`Pyrex `_ is a compiler that accepts a slightly modified form of Python +and generates the corresponding C code. Pyrex makes it possible to write +an extension without having to learn Python's C API. + +If you need to interface to some C or C++ library for which no Python +extension currently exists, you can try wrapping the library's data types +and functions with a tool such as `SWIG `_. `SIP +`_, `CXX +`_ `Boost +`_, or `Weave +`_ are also alternatives for +wrapping C++ libraries. + + +How can I execute arbitrary Python statements from C? +------------------------------------------------------------ +The highest-level function to do this is ``PyRun_SimpleString()`` which takes +a single string argument to be executed in the context of the module +``__main__`` and returns 0 for success and -1 when an exception occurred +(including ``SyntaxError``). If you want more control, use ``PyRun_String()``; +see the source for ``PyRun_SimpleString()`` in Python/pythonrun.c. + + +How can I evaluate an arbitrary Python expression from C? +---------------------------------------------------------------- +Call the function ``PyRun_String()`` from the previous question with the +start symbol ``Py_eval_input``; it +parses an expression, evaluates it and returns its value. + +How do I extract C values from a Python object? +------------------------------------------------------ +That depends on the object's type. If it's a tuple, +``PyTupleSize(o)`` returns its length and ``PyTuple_GetItem(o, i)`` +returns its i'th item. Lists have similar functions, ``PyListSize(o)`` +and ``PyList_GetItem(o, i)``. + +For strings, ``PyString_Size(o)`` returns +its length and ``PyString_AsString(o)`` a pointer to its value. +Note that Python strings may contain null bytes so C's ``strlen()`` +should not be used. + +To test the type of an object, first make sure +it isn't NULL, and then use ``PyString_Check(o)``, ``PyTuple_Check(o)``, +``PyList_Check(o)``, etc. + +There is also a high-level API to Python objects which is +provided by the so-called 'abstract' interface -- read +``Include/abstract.h`` for further details. It allows +interfacing with any kind of Python sequence +using calls like ``PySequence_Length()``, ``PySequence_GetItem()``, etc.) +as well as many other useful protocols. + +How do I use Py_BuildValue() to create a tuple of arbitrary length? +-------------------------------------------------------------------------- +You can't. Use ``t = PyTuple_New(n)`` instead, and fill it with +objects using ``PyTuple_SetItem(t, i, o)`` -- note that this "eats" a +reference count of ``o``, so you have to ``Py_INCREF`` it. +Lists have similar functions ``PyList_New(n)`` and +``PyList_SetItem(l, i, o)``. Note that you *must* set all the tuple items to +some value before you pass the tuple to Python code -- +``PyTuple_New(n)`` initializes them to NULL, which isn't a valid Python +value. + +How do I call an object's method from C? +----------------------------------------------- +The ``PyObject_CallMethod()`` function can be used to call an arbitrary +method of an object. The parameters are the object, the name of the +method to call, a format string like that used with ``Py_BuildValue()``, and the argument values:: + + PyObject * + PyObject_CallMethod(PyObject *object, char *method_name, + char *arg_format, ...); + +This works for any object that has methods -- whether built-in or +user-defined. You are responsible for eventually ``Py_DECREF``'ing the +return value. + +To call, e.g., a file object's "seek" method with arguments 10, 0 +(assuming the file object pointer is "f"):: + + res = PyObject_CallMethod(f, "seek", "(ii)", 10, 0); + if (res == NULL) { + ... an exception occurred ... + } + else { + Py_DECREF(res); + } + +Note that since ``PyObject_CallObject()`` *always* wants a tuple for the +argument list, to call a function without arguments, pass "()" for the +format, and to call a function with one argument, surround the argument +in parentheses, e.g. "(i)". + + +How do I catch the output from PyErr_Print() (or anything that prints to stdout/stderr)? +----------------------------------------------------------------------------------------------- +In Python code, define an object that supports the ``write()`` method. +Assign this object to ``sys.stdout`` and ``sys.stderr``. +Call print_error, or just allow the standard traceback mechanism to +work. Then, the output will go wherever your ``write()`` method sends it. + +The easiest way to do this is to use the StringIO class in the standard +library. + +Sample code and use for catching stdout:: + + >>> class StdoutCatcher: + ... def __init__(self): + ... self.data = '' + ... def write(self, stuff): + ... self.data = self.data + stuff + ... + >>> import sys + >>> sys.stdout = StdoutCatcher() + >>> print 'foo' + >>> print 'hello world!' + >>> sys.stderr.write(sys.stdout.data) + foo + hello world! + + +How do I access a module written in Python from C? +--------------------------------------------------------- +You can get a pointer to the module object as follows:: + + module = PyImport_ImportModule(""); + +If the module hasn't been imported yet (i.e. it is not yet present in +``sys.modules``), this initializes the module; otherwise it simply returns +the value of ``sys.modules[""]``. Note that it doesn't enter +the module into any namespace -- it only ensures it has been +initialized and is stored in ``sys.modules``. + +You can then access the module's attributes (i.e. any name defined in +the module) as follows:: + + attr = PyObject_GetAttrString(module, ""); + +Calling ``PyObject_SetAttrString()`` to assign to variables in the module also works. + + +How do I interface to C++ objects from Python? +------------------------------------------------------ +Depending on your requirements, there are many approaches. To do +this manually, begin by reading `the "Extending and Embedding" document `_. Realize +that for the Python run-time system, there isn't a whole lot of +difference between C and C++ -- so the strategy of building a new Python +type around a C structure (pointer) type will also work for C++ +objects. + +For C++ libraries, you can look at `SIP `_, `CXX `_, `Boost +`_, `Weave `_ or +`SWIG `_ + + +I added a module using the Setup file and the make fails; why? +---------------------------------------------------------------------- + +Setup must end in a newline, if there is no newline there, the build +process fails. (Fixing this requires some ugly shell script hackery, +and this bug is so minor that it doesn't seem worth the effort.) + +How do I debug an extension? +------------------------------------ +When using GDB with dynamically loaded extensions, you can't set a +breakpoint in your extension until your extension is loaded. + +In your ``.gdbinit`` file (or interactively), add the command:: + + br _PyImport_LoadDynamicModule + +Then, when you run GDB:: + + $ gdb /local/bin/python + gdb) run myscript.py + gdb) continue # repeat until your extension is loaded + gdb) finish # so that your extension is loaded + gdb) br myfunction.c:50 + gdb) continue + +I want to compile a Python module on my Linux system, but some files are missing. Why? +------------------------------------------------------------------------------------------------- + +Most packaged versions of Python don't include the +/usr/lib/python2.x/config/ directory, which contains various files required +for compiling Python extensions. + +For Red Hat, install the python-devel RPM to get the necessary files. + +For Debian, run ``apt-get install python-dev``. + + +What does "SystemError: _PyImport_FixupExtension: module yourmodule not loaded" mean? +------------------------------------------------------------------------------------------------------- +This means that you have created an extension module named "yourmodule", but your module init function does not initialize with that name. + +Every module init function will have a line similar to:: + + module = Py_InitModule("yourmodule", yourmodule_functions); + +If the string passed to this function is not the same name as your +extension module, the ``SystemError`` exception will be raised. + + +How do I tell "incomplete input" from "invalid input"? +-------------------------------------------------------------------------------- +Sometimes you want to emulate the Python interactive interpreter's +behavior, where it gives you a continuation prompt when the input +is incomplete (e.g. you typed the start of an "if" statement +or you didn't close your parentheses or triple string quotes), +but it gives you a syntax error message immediately when the input +is invalid. + +In Python you can use the ``codeop`` module, which approximates the +parser's behavior sufficiently. IDLE uses this, for example. + +The easiest way to do it in C is to call ``PyRun_InteractiveLoop()`` +(perhaps in a separate thread) and let the Python interpreter handle +the input for you. You can also set the ``PyOS_ReadlineFunctionPointer`` +to point at your custom input function. See ``Modules/readline.c`` and +``Parser/myreadline.c`` for more hints. + +However sometimes you have to run the embedded Python interpreter in +the same thread as your rest application and you can't allow the +``PyRun_InteractiveLoop()`` to stop while waiting for user input. The +one solution then is to call ``PyParser_ParseString()`` and test for +``e.error`` equal to ``E_EOF``, which means the input is incomplete). +Here's a sample code fragment, untested, inspired by code from Alex Farber:: + + #include + #include + #include + #include + #include + #include + + int testcomplete(char *code) + /* code should end in \n */ + /* return -1 for error, 0 for incomplete, 1 for complete */ + { + node *n; + perrdetail e; + + n = PyParser_ParseString(code, &_PyParser_Grammar, + Py_file_input, &e); + if (n == NULL) { + if (e.error == E_EOF) + return 0; + return -1; + } + + PyNode_Free(n); + return 1; + } + +Another solution is trying to compile the received string with +``Py_CompileString()``. If it compiles without errors, try to execute the returned +code object by calling ``PyEval_EvalCode()``. Otherwise save the input for +later. If the compilation fails, find out if it's an error or just +more input is required - by extracting the message string from the +exception tuple and comparing it to the string "unexpected EOF while parsing". +Here is a complete example using the GNU readline library (you may +want to ignore SIGINT while calling readline()):: + + #include + #include + + #include + #include + #include + #include + + int main (int argc, char* argv[]) + { + int i, j, done = 0; /* lengths of line, code */ + char ps1[] = ">>> "; + char ps2[] = "... "; + char *prompt = ps1; + char *msg, *line, *code = NULL; + PyObject *src, *glb, *loc; + PyObject *exc, *val, *trb, *obj, *dum; + + Py_Initialize (); + loc = PyDict_New (); + glb = PyDict_New (); + PyDict_SetItemString (glb, "__builtins__", PyEval_GetBuiltins ()); + + while (!done) + { + line = readline (prompt); + + if (NULL == line) /* CTRL-D pressed */ + { + done = 1; + } + else + { + i = strlen (line); + + if (i > 0) + add_history (line); /* save non-empty lines */ + + if (NULL == code) /* nothing in code yet */ + j = 0; + else + j = strlen (code); + + code = realloc (code, i + j + 2); + if (NULL == code) /* out of memory */ + exit (1); + + if (0 == j) /* code was empty, so */ + code[0] = '\0'; /* keep strncat happy */ + + strncat (code, line, i); /* append line to code */ + code[i + j] = '\n'; /* append '\n' to code */ + code[i + j + 1] = '\0'; + + src = Py_CompileString (code, "", Py_single_input); + + if (NULL != src) /* compiled just fine - */ + { + if (ps1 == prompt || /* ">>> " or */ + '\n' == code[i + j - 1]) /* "... " and double '\n' */ + { /* so execute it */ + dum = PyEval_EvalCode ((PyCodeObject *)src, glb, loc); + Py_XDECREF (dum); + Py_XDECREF (src); + free (code); + code = NULL; + if (PyErr_Occurred ()) + PyErr_Print (); + prompt = ps1; + } + } /* syntax error or E_EOF? */ + else if (PyErr_ExceptionMatches (PyExc_SyntaxError)) + { + PyErr_Fetch (&exc, &val, &trb); /* clears exception! */ + + if (PyArg_ParseTuple (val, "sO", &msg, &obj) && + !strcmp (msg, "unexpected EOF while parsing")) /* E_EOF */ + { + Py_XDECREF (exc); + Py_XDECREF (val); + Py_XDECREF (trb); + prompt = ps2; + } + else /* some other syntax error */ + { + PyErr_Restore (exc, val, trb); + PyErr_Print (); + free (code); + code = NULL; + prompt = ps1; + } + } + else /* some non-syntax error */ + { + PyErr_Print (); + free (code); + code = NULL; + prompt = ps1; + } + + free (line); + } + } + + Py_XDECREF(glb); + Py_XDECREF(loc); + Py_Finalize(); + exit(0); + } + + + +How do I find undefined g++ symbols __builtin_new or __pure_virtual? +----------------------------------------------------------------------------------- + +To dynamically load g++ extension modules, you must recompile Python, relink it using g++ (change LINKCC in the python Modules Makefile), and link your extension module using g++ (e.g., "g++ -shared -o mymodule.so mymodule.o"). + + +Can I create an object class with some methods implemented in C and others in Python (e.g. through inheritance)? +----------------------------------------------------------------------------------------------------------------------------------------------------- + +In Python 2.2, you can inherit from builtin classes such as int, list, dict, etc. + +The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index.html) +provides a way of doing this from C++ (i.e. you can inherit from an +extension class written in C++ using the BPL). + +When importing module X, why do I get "undefined symbol: PyUnicodeUCS2*"? +-------------------------------------------------------------------------------------------------- + +You are using a version of Python that uses a 4-byte representation +for Unicode characters, but some C extension module you are importing +was compiled using a Python that uses a 2-byte representation for +Unicode characters (the default). + +If instead the name of the undefined symbol starts with +``PyUnicodeUCS4``, the problem is the reverse: Python was built using +2-byte Unicode characters, and the extension module was compiled using +a Python with 4-byte Unicode characters. + +This can easily occur when using pre-built extension packages. RedHat +Linux 7.x, in particular, provided a "python2" binary that is compiled +with 4-byte Unicode. This only causes the link failure if the extension +uses any of the ``PyUnicode_*()`` functions. It is also a problem if an +extension uses any of the Unicode-related format specifiers for +``Py_BuildValue`` (or similar) or parameter specifications for +``PyArg_ParseTuple()``. + +You can check the size of the Unicode character a Python interpreter is +using by checking the value of sys.maxunicode:: + + >>> import sys + >>> if sys.maxunicode > 65535: + ... print 'UCS4 build' + ... else: + ... print 'UCS2 build' + +The only way to solve this problem is to use extension modules compiled +with a Python binary built using the same size for Unicode characters. + + + Added: sandbox/trunk/faq/general.rst ============================================================================== --- (empty file) +++ sandbox/trunk/faq/general.rst Wed Sep 23 02:56:33 2009 @@ -0,0 +1,1490 @@ + +==================================== +General Python FAQ +==================================== + +.. contents:: + +General Information +===================== + +What is Python? +---------------------- + +Python is an interpreted, interactive, object-oriented programming +language. It incorporates modules, exceptions, dynamic typing, very +high level dynamic data types, and classes. Python combines +remarkable power with very clear syntax. It has interfaces to many +system calls and libraries, as well as to various window systems, and +is extensible in C or C++. It is also usable as an extension language +for applications that need a programmable interface. Finally, Python +is portable: it runs on many Unix variants, on the Mac, and on PCs +under MS-DOS, Windows, Windows NT, and OS/2. + +To find out more, start +with the `Beginner's Guide to Python `_. + + +Why was Python created in the first place? +-------------------------------------------------- +Here's a *very* brief summary of what started it all, written +by Guido van Rossum: + + I had extensive experience with implementing an interpreted language + in the ABC group at CWI, and from working with this group I had + learned a lot about language design. This is the origin of many + Python features, including the use of indentation for statement + grouping and the inclusion of very-high-level data types (although the + details are all different in Python). + + I had a number of gripes about the ABC language, but also liked many + of its features. It was impossible to extend the ABC language (or its + implementation) to remedy my complaints -- in fact its lack of + extensibility was one of its biggest problems. I had some experience + with using Modula-2+ and talked with the designers of Modula-3 and + read the Modula-3 report. Modula-3 is the origin of the syntax and + semantics used for exceptions, and some other Python features. + + I was working in the Amoeba distributed operating system group at + CWI. We needed a better way to do system administration than by + writing either C programs or Bourne shell scripts, since Amoeba had + its own system call interface which wasn't easily accessible from the + Bourne shell. My experience with error handling in Amoeba made me + acutely aware of the importance of exceptions as a programming + language feature. + + It occurred to me that a scripting language with a syntax like ABC + but with access to the Amoeba system calls would fill the need. I + realized that it would be foolish to write an Amoeba-specific + language, so I decided that I needed a language that was generally + extensible. + + During the 1989 Christmas holidays, I had a lot of time on my hand, + so I decided to give it a try. During the next year, while still + mostly working on it in my own time, Python was used in the Amoeba + project with increasing success, and the feedback from colleagues made + me add many early improvements. + + In February 1991, after just over a year of development, I decided + to post to USENET. The rest is in the Misc/HISTORY file. + + +What is Python good for? +-------------------------------- +Python is a high-level general-purpose programming language +that can be applied to many different classes of problems. + +The language comes with a large standard library that covers areas +such as string processing (regular expressions, Unicode, calculating +differences between files), Internet protocols (HTTP, FTP, SMTP, +XML-RPC, POP, IMAP, CGI programming), software engineering (unit testing, +logging, profiling, parsing Python code), and operating system +interfaces (system calls, filesystems, TCP/IP sockets). Look at the +table of contents for `the Library Reference +`_ to get an idea of what's available. +A wide variety of third-party extensions are also available. +Consult `the Python Package Index `_ to find +packages of interest to you. + + +How does the Python version numbering scheme work? +---------------------------------------------------------- +Python versions are numbered A.B.C or A.B. A is the major version +number -- it is only incremented for really major changes in +the language. B is the minor version number, incremented for less +earth-shattering changes. C is the micro-level -- it is incremented +for each bugfix release. See `PEP 6 `_ +for more information about bugfix releases. + +Not all releases are bugfix releases. In the run-up to a new major +release, a series of development releases are made, denoted as alpha, +beta, or release candidate. Alphas are early releases in which +interfaces aren't yet finalized; it's not unexpected to see an +interface change between two alpha releases. Betas are more stable, +preserving existing interfaces but possibly adding new modules, and +release candidates are frozen, making no changes except as needed to +fix critical bugs. + +Alpha, beta and release candidate versions have an additional +suffix. The suffix for an alpha version is "aN" for some small +number N, the suffix for a beta version is "bN" for some small number +N, and the suffix for a release candidate version is "cN" for some +small number N. In other words, all versions labeled 2.0aN precede +the versions labeled 2.0bN, which precede versions labeled 2.0cN, and +*those* precede 2.0. + +You may also find version numbers with a "+" suffix, e.g. "2.2+". +These are unreleased versions, built directly from the Subversion trunk. In +practice, after a final minor release is made, the Subversion trunk is +incremented to the next minor version, which becomes the "a0" version, +e.g. "2.4a0". + +See also the documentation for ``sys.version``, ``sys.hexversion``, and +``sys.version_info``. + + +Are there copyright restrictions on the use of Python? +-------------------------------------------------------------- + +Not really. You can do anything you want with the source, as long as +you leave the copyrights in and display those copyrights in any +documentation about Python that you produce. If you honor the +copyright rules, it's OK to use Python for commercial use, to sell +copies of Python in source or binary form (modified or unmodified), or +to sell products that incorporate Python in some form. We would still +like to know about all commercial use of Python, of course. + +See `the PSF license page `_ +to find further explanations and a link to the full text of the +license. + + +How do I obtain a copy of the Python source? +--------------------------------------------------- + +The latest Python source distribution is always available from +python.org, at http://www.python.org/download/. The latest +development sources can be obtained via anonymous Subversion +at http://svn.python.org/projects/python/trunk + +The source distribution is a gzipped tar file containing the complete +C source, LaTeX documentation, Python library modules, example +programs, and several useful pieces of freely distributable software. +This will compile and run out of the box on most UNIX platforms. + +Consult the `Developer FAQ `__ +for more information on getting the source code and compiling it. + +How do I get documentation on Python? +-------------------------------------------- + +All documentation is available on-line, starting at +http://www.python.org/doc/. + +The standard documentation for the current stable version of Python is +also available at http://docs.python.org/. PDF and downloadable HTML +versions are also available. + +The documentation is written using +`the Sphinx documentation tool `__. +The Sphinx source for the documentation is part of the Python source +distribution. + + +I've never programmed before. Is there a Python tutorial? +----------------------------------------------------------------- + +There are numerous tutorials and books available. Consult `the +Beginner's Guide `_ to find +information for beginning Python programmers, including lists of +tutorials. + +Are there other FTP sites that mirror the Python distribution? +--------------------------------------------------------------------- + +Mirroring has been discontinued as of March 15, 2007. Please +`download here `_. + +Is there a newsgroup or mailing list devoted to Python? +-------------------------------------------------------------- + +There is a newsgroup, comp.lang.python, and a mailing list, +`python-list `_. +The newsgroup and mailing list are gatewayed into each other -- if you +can read news it's unnecessary to subscribe to the mailing list. +comp.lang.python is high-traffic, receiving hundreds of postings every day, +and Usenet readers are often more able to cope with this volume. + +Announcements of new software releases and events can be found in +comp.lang.python.announce, a low-traffic moderated list that receives +about five postings per day. +It's available as +`the python-announce mailing list `_. + +More info about other mailing lists and newsgroups +can be found at http://www.python.org/community/lists/. + +How do I get a beta test version of Python? +--------------------------------------------------- + +Alpha and beta releases are available from +http://www.python.org/download/. All releases are announced on the +comp.lang.python and comp.lang.python.announce newsgroups and on the +Python home page, at http://www.python.org/; an RSS feed of news is +available. + +You can also access the development version of Python through Subversion. +See http://www.python.org/dev/devfaq.html#subversion-svn for details. + +How do I submit bug reports and patches for Python? +---------------------------------------------------------- + +To report a bug or submit a patch, please use the Roundup +installation at http://bugs.python.org/. + +You must have a Roundup account to report bugs; this makes it +possible for us to contact you if we have follow-up questions. It +will also enable Roundup to send you updates as we act on your +bug. If you had previously used SourceForge to report bugs to +Python, you can obtain your Roundup password through Roundup's +`password reset procedure `_. + +For more information on how Python is developed, consult +`the Python Developer's Guide `_. + +Are there any published articles about Python that I can reference? +--------------------------------------------------------------------------- +It's probably best to cite your favorite book about Python. + +The very first article about Python is this very old article +that's now quite outdated. + + Guido van Rossum and Jelke de Boer, "Interactively Testing Remote + Servers Using the Python Programming Language", CWI Quarterly, Volume + 4, Issue 4 (December 1991), Amsterdam, pp 283-303. + + + +Are there any books on Python? +------------------------------------- + +Yes, there are many, and more are being published. See +the python.org wiki at http://wiki.python.org/moin/PythonBooks for a list. + +You can also search online bookstores for "Python" +and filter out the Monty Python references; or +perhaps search for "Python" and "language". + + +Where in the world is www.python.org located? +----------------------------------------------------- + +It's currently in Amsterdam, graciously hosted by `XS4ALL +`_. Thanks to Thomas Wouters for his work in +arranging python.org's hosting. + +Why is it called Python? +------------------------------- + +At the time when he began implementing Python, Guido van Rossum was +also reading the published scripts from "Monty Python's Flying Circus" +(a BBC comedy series from the seventies, in the unlikely case you +didn't know). It occurred to him that he needed a name that was +short, unique, and slightly mysterious, so he decided to call the +language Python. + + + +Do I have to like "Monty Python's Flying Circus"? +------------------------------------------------------------------- + +No, but it helps. :) + + +Python in the real world +============================ + +How stable is Python? +---------------------------- + +Very stable. New, stable releases have been coming out roughly every +6 to 18 months since 1991, and this seems likely to continue. +Currently there are usually around 18 months between major releases. + +With the introduction of retrospective "bugfix" releases the stability +of existing releases is being improved. Bugfix releases, indicated by +a third component of the version number (e.g. 2.1.3, 2.2.2), are +managed for stability; only fixes for known problems are included in a +bugfix release, and it's guaranteed that interfaces will remain the +same throughout a series of bugfix releases. + +The `2.6.2 release `_ is recommended production-ready version at +this point in time. Python 3.1 is also considered production-ready, but may be +less useful, since currently there is more third party software available for +Python 2 than for Python 3. Python 2 code will generally not run unchanged in +Python 3. + + +How many people are using Python? +---------------------------------------- + +Probably tens of thousands of users, though it's difficult to obtain +an exact count. Python is available for free download, so there are +no sales figures, and it's available from many different sites and +packaged with many Linux distributions, so download statistics don't +tell the whole story either. The comp.lang.python newsgroup is very +active, but not all Python users post to the group or even read it. +Overall there is no accurate estimate of the number of subscribers or +Python users. + +Have any significant projects been done in Python? +--------------------------------------------------------- + +See http://python.org/about/success for a list of projects that +use Python. Consulting the proceedings for `past Python conferences +`_ will reveal contributions from +many different companies and organizations. + +High-profile Python projects include `the Mailman mailing list manager +`_ and `the Zope application server +`_. Several Linux distributions, most +notably `Red Hat `_, have written part or all +of their installer and system administration software in Python. Companies +that use Python internally include Google, +Yahoo, and Industrial Light & Magic. + + +What new developments are expected for Python in the future? +------------------------------------------------------------------- + +See http://www.python.org/dev/peps/ for the Python Enhancement Proposals +(PEPs). PEPs are design documents describing a suggested new feature +for Python, providing a concise technical specification and a +rationale. +`PEP 1 `_ +explains the PEP process and PEP format; read it +first if you want to submit a PEP. + +New developments are discussed on `the python-dev mailing list `_. + + +Is it reasonable to propose incompatible changes to Python? +------------------------------------------------------------------ + +In general, no. There are already millions of lines of Python code +around the world, so any change in the language that invalidates more +than a very small fraction of existing programs has to be frowned +upon. Even if you can provide a conversion program, there's still +the problem of updating all documentation; many books have been +written about Python, and we don't want to invalidate them all at a +single stroke. + +Providing a gradual upgrade path is necessary if a feature has to be +changed. `PEP 5 `_ +describes the procedure followed for introducing backward-incompatible +changes while minimizing disruption for users. + + +What is the Python Software Foundation? +----------------------------------------- + +The Python Software Foundation is an independent non-profit +organization that holds the copyright on Python versions 2.1 and +newer. The PSF's mission is to advance open source technology related +to the Python programming language and to publicize the use of +Python. The PSF's home page is at http://www.python.org/psf/. + +Donations to the PSF are tax-exempt in the US. If you use Python and +find it helpful, please contribute via `the PSF donation page +`_. + + + +Is Python Y2K (Year 2000) Compliant? +-------------------------------------------- +As of August, 2003 no major problems have been reported and Y2K +compliance seems to be a non-issue. + +Python does very few date calculations and for those it does perform relies +on the C library functions. Python generally represents times either +as seconds since 1970 or as a ``(year, month, day, ...)`` tuple where the +year is expressed with four digits, which makes Y2K bugs unlikely. So +as long as your C library is okay, Python should be okay. Of course, +it's possible that a particular application written in Python +makes assumptions about 2-digit years. + +Because Python is available free of charge, there are no absolute +guarantees. If there *are* unforeseen problems, liability is the +user's problem rather than the developers', and there is nobody you can sue +for damages. The Python copyright notice contains the following +disclaimer: + + 4. PSF is making Python 2.3 available to Licensee on an "AS IS" + basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR + IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND + DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS + FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.3 WILL NOT + INFRINGE ANY THIRD PARTY RIGHTS. + + 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON + 2.3 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS + A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.3, + OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +The good news is that *if* you encounter a problem, you have full +source available to track it down and fix it. This is one advantage of +an open source programming environment. + + +Is Python a good language for beginning programmers? +----------------------------------------------------------------------- + +Yes. + +It is still common to start students with a procedural (subset of a) +statically typed language such as Pascal, C, or a subset of C++ or +Java. Students may be better served by learning Python as their first +language. Python has a very simple and consistent syntax and a large +standard library and, most importantly, using Python in a beginning +programming course lets students concentrate on important +programming skills such as problem decomposition and data type design. +With Python, students can be quickly introduced to basic concepts such +as loops and procedures. They can probably even work with +user-defined objects in their very first course. + +For a student who has never programmed before, using a statically +typed language seems unnatural. It presents additional complexity +that the student must master and slows the pace of the course. The +students are trying to learn to think like a computer, decompose +problems, design consistent interfaces, and encapsulate data. While +learning to use a statically typed language is important in the long +term, it is not necessarily the best topic to address in the students' +first programming course. + +Many other aspects of Python make it a good first language. +Like Java, Python has a large standard library so that +students can be assigned programming projects very early in the +course that *do* something. Assignments aren't restricted to the +standard four-function calculator and check balancing programs. +By using the standard library, students can gain the satisfaction +of working on realistic applications as they learn the fundamentals +of programming. Using the standard library also teaches students +about code reuse. Third-party modules such as PyGame are also helpful in +extending the students' reach. + +Python's interactive interpreter enables students to +test language features while they're programming. They can keep +a window with the interpreter running while they enter their +program's source in another window. If they can't remember the +methods for a list, they can do something like this:: + + >>> L = [] + >>> dir(L) + ['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', + 'reverse', 'sort'] + >>> help(L.append) + Help on built-in function append: + + append(...) + L.append(object) -- append object to end + >>> L.append(1) + >>> L + [1] + +With the interpreter, documentation is never far from the +student as he's programming. + +There are also good IDEs for Python. IDLE is a cross-platform IDE for +Python that is written in Python using Tkinter. PythonWin is a +Windows-specific IDE. Emacs users will be happy to know that there is +a very good Python mode for Emacs. All of these programming +environments provide syntax highlighting, auto-indenting, and access +to the interactive interpreter while coding. Consult +http://www.python.org/editors/ for a full list of Python editing +environments. + +If you want to discuss Python's use in education, then you may +be interested in joining `the edu-sig mailing list `_. + +Upgrading Python +===================== + +What is this bsddb185 module my application keeps complaining about? +-------------------------------------------------------------------- + +Starting with Python2.3, the distribution includes the `PyBSDDB package +` as a replacement for the old bsddb module. It +includes functions which provide backward compatibility at the API level, +but requires a newer version of the underlying `Berkeley DB +`_ library. Files created with the older bsddb +module can't be opened directly using the new module. + +Using your old version of Python and a pair of scripts which are part of +Python 2.3 (db2pickle.py and pickle2db.py, in the Tools/scripts directory) +you can convert your old database files to the new format. Using your old +Python version, run the db2pickle.py script to convert it to a pickle, +e.g.:: + + python2.2 /db2pickley.py database.db database.pck + +Rename your database file:: + + mv database.db olddatabase.db + +Now convert the pickle file to a new format database:: + + python2.3 /pickle2db.py database.db database.pck + +The precise commands you use will vary depending on the particulars of your +installation. For full details about operation of these two scripts check +the doc string at the start of each one. + + +Python's Design +===================== + +Why does Python use indentation for grouping of statements? +----------------------------------------------------------- + +Guido van Rossum believes that using indentation for grouping is extremely elegant +and contributes a lot to the clarity of the average Python program. Most +people learn to love this feature after awhile. + +Since there are no begin/end brackets there cannot be a disagreement between +grouping perceived by the parser and the human reader. Occasionally C +programmers will encounter a fragment of code like this:: + + if (x <= y) + x++; + y--; + z++; + +Only the ``x++`` statement is executed if the condition is true, but +the indentation leads you to believe otherwise. +Even experienced C programmers will sometimes +stare at it a long time wondering why ``y`` is being decremented even for +``x > y``. + +Because there are no begin/end brackets, Python is much less prone to +coding-style conflicts. In C there are many different ways to place the +braces. If you're used to reading +and writing code that uses one style, you will feel at least slightly +uneasy when reading (or being required to write) another style. + +Many coding styles place begin/end brackets on a line by themself. This +makes programs considerably longer and wastes valuable screen space, making +it harder to get a good overview of a program. Ideally, a function should +fit on one screen (say, 20-30 lines). 20 lines of Python can do +a lot more work than 20 lines of C. This is not solely due to the lack of +begin/end brackets -- the lack of declarations and the high-level data types +are also responsible -- but the indentation-based syntax certainly helps. + +Why am I getting strange results with simple arithmetic operations? +------------------------------------------------------------------- + +See the next question. + +Why are floating point calculations so inaccurate? +-------------------------------------------------- + +People are often very surprised by results like this:: + + >>> 1.2-1.0 + 0.199999999999999996 + +and think it is a bug in Python. It's not. This has nothing to do +with Python, but with how the underlying C platform handles floating +point numbers, and ultimately with the inaccuracies introduced when +writing down numbers as a string of a fixed number of digits. + +The internal representation of floating point numbers uses a fixed +number of binary digits to represent a decimal number. Some decimal +numbers can't be represented exactly in binary, resulting in small +roundoff errors. + +In decimal math, there are many numbers that can't be represented with a +fixed number of decimal digits, e.g. 1/3 = 0.3333333333....... + +In base 2, 1/2 = 0.1, 1/4 = 0.01, 1/8 = 0.001, etc. +.2 equals 2/10 equals 1/5, resulting in the binary fractional number +0.001100110011001... + +Floating point numbers only have 32 or 64 bits of precision, so the digits are cut off at some point, +and the resulting number is 0.199999999999999996 in decimal, not 0.2. + +A floating point number's ``repr()`` function prints as many digits are +necessary to make ``eval(repr(f)) == f`` true for any float f. The +``str()`` function prints fewer digits and this often results in the +more sensible number that was probably intended:: + + >>> 0.2 + 0.20000000000000001 + >>> print 0.2 + 0.2 + +One of the consequences of this is that it is error-prone to compare +the result of some computation to a float with ``==``. Tiny +inaccuracies may mean that ``==`` fails. Instead, you have to check +that the difference between the two numbers is less than a certain +threshold:: + + epsilon = 0.0000000000001 # Tiny allowed error + expected_result = 0.4 + + if expected_result-epsilon <= computation() <= expected_result+epsilon: + ... + +Please see the chapter on +`floating point arithmetic `_ +in the Python tutorial for more information. + + +Why are Python strings immutable? +--------------------------------- + +There are several advantages. + +One is performance: knowing that a string is immutable means we can +allocate space for it at creation time, and the storage requirements +are fixed and unchanging. This is also one of the reasons for the +distinction between tuples and lists. + +Another advantage is that strings in Python are considered as +"elemental" as numbers. No amount of activity will change the value 8 +to anything else, and in Python, no amount of activity will change the +string "eight" to anything else. + + +Why must 'self' be used explicitly in method definitions and calls? +------------------------------------------------------------------- + +The idea was borrowed from Modula-3. It turns out to be very useful, +for a variety of reasons. + +First, it's more obvious that you are using a method or instance +attribute instead of a local variable. Reading ``self.x`` or ``self.meth()`` +makes it absolutely clear that an instance variable or method is used even +if you don't know the class definition by heart. In C++, you can sort of +tell by the lack of a local variable declaration (assuming globals are rare +or easily recognizable) -- but in Python, there are no local variable +declarations, so you'd have to look up the class definition to be sure. +Some C++ and Java coding standards call for instance attributes to have an +``m_`` prefix, so this explicitness is still useful in those languages, too. + +Second, it means that no special syntax is necessary if you want to +explicitly reference or call the method from a particular class. In C++, if +you want to use a method from a base class which is overridden in a derived +class, you have to use the :: operator -- in Python you can write +baseclass.methodname(self, ). This is particularly useful +for __init__() methods, and in general in cases where a derived class method +wants to extend the base class method of the same name and thus has to call +the base class method somehow. + +Finally, for instance variables it solves a syntactic problem with +assignment: since local variables in Python are (by definition!) those +variables to which a value assigned in a function body (and that aren't +explicitly declared global), there has to be some way to tell the +interpreter that an assignment was meant to assign to an instance variable +instead of to a local variable, and it should preferably be syntactic (for +efficiency reasons). C++ does this through declarations, but Python doesn't +have declarations and it would be a pity having to introduce them just for +this purpose. Using the explicit "self.var" solves this nicely. Similarly, +for using instance variables, having to write "self.var" means that +references to unqualified names inside a method don't have to search the +instance's directories. To put it another way, local variables and +instance variables live in two different namespaces, and you need to +tell Python which namespace to use. + + + +Why can't I use an assignment in an expression? +------------------------------------------------------- + +Many people used to C or Perl complain that they want to +use this C idiom:: + + while (line = readline(f)) { + ...do something with line... + } + +where in Python you're forced to write this:: + + while True: + line = f.readline() + if not line: + break + ...do something with line... + +The reason for not allowing assignment in Python expressions +is a common, hard-to-find bug in those other languages, +caused by this construct:: + + if (x = 0) { + ...error handling... + } + else { + ...code that only works for nonzero x... + } + +The error is a simple typo: ``x = 0``, which assigns 0 to the variable ``x``, +was written while the comparison ``x == 0`` is certainly what was intended. + +Many alternatives have been proposed. Most are hacks that save some +typing but use arbitrary or cryptic syntax or keywords, +and fail the simple criterion for language change proposals: +it should intuitively suggest the proper meaning to a human reader +who has not yet been introduced to the construct. + +An interesting phenomenon is that most experienced Python programmers +recognize the "while True" idiom and don't seem to be missing the +assignment in expression construct much; it's only newcomers +who express a strong desire to add this to the language. + +There's an alternative way of spelling this that seems +attractive but is generally less robust than the "while True" solution:: + + line = f.readline() + while line: + ...do something with line... + line = f.readline() + +The problem with this is that if you change your mind about exactly +how you get the next line (e.g. you want to change it into +``sys.stdin.readline()``) you have to remember to change two places in +your program -- the second occurrence is hidden at the bottom of the +loop. + +The best approach is to use iterators, making it possible to loop +through objects using the ``for`` statement. For example, in the +current version of Python file objects support the iterator protocol, so you +can now write simply:: + + for line in f: + ... do something with line... + + + +Why does Python use methods for some functionality (e.g. list.index()) but functions for other (e.g. len(list))? +---------------------------------------------------------------------------------------------------------------- + +The major reason is history. Functions were used for those operations +that were generic for a group of types and which were intended to work +even for objects that didn't have methods at all (e.g. tuples). It is +also convenient to have a function that can readily be applied to an +amorphous collection of objects when you use the functional features +of Python (``map()``, ``apply()`` et al). + +In fact, implementing ``len()``, ``max()``, ``min()`` as a built-in +function is actually less code than implementing them as methods for +each type. One can quibble about individual cases but it's a part of +Python, and it's too late to make such fundamental changes now. The +functions have to remain to avoid massive code breakage. + +Note that for string operations Python has moved from external functions +(the ``string`` module) to methods. However, ``len()`` is still a function. + +Why is join() a string method instead of a list or tuple method? +---------------------------------------------------------------- + +Strings became much more like other standard types starting in Python +1.6, when methods were added which give the same functionality that +has always been available using the functions of the string module. +Most of these new methods have been widely accepted, but the one which +appears to make some programmers feel uncomfortable is:: + + ", ".join(['1', '2', '4', '8', '16']) + +which gives the result:: + + "1, 2, 4, 8, 16" + +There are two common arguments against this usage. + +The first runs along the lines of: "It looks really ugly using a method of a +string literal (string constant)", to which the answer is that it might, but +a string literal is just a fixed value. If the methods are to be allowed on +names bound to strings there is no logical reason to make them unavailable +on literals. + +The second objection is typically cast as: "I am really telling a sequence +to join its members together with a string constant". Sadly, you aren't. For +some reason there seems to be much less difficulty with having split() as a +string method, since in that case it is easy to see that :: + + "1, 2, 4, 8, 16".split(", ") + +is an instruction to a string literal to return the substrings delimited by +the given separator (or, by default, arbitrary runs of white space). In this +case a Unicode string returns a list of Unicode strings, an ASCII string +returns a list of ASCII strings, and everyone is happy. + +join() is a string method because in using it you are telling the +separator string to iterate over a sequence of strings and insert +itself between adjacent elements. This method can be used with any +argument which obeys the rules for sequence objects, including any new +classes you might define yourself. + +Because this is a string method it can work for Unicode strings as well as +plain ASCII strings. If join() were a method of the sequence types then the +sequence types would have to decide which type of string to return depending +on the type of the separator. + +If none of these arguments persuade you, then for the moment you can +continue to use the join() function from the string module, which allows you +to write :: + + string.join(['1', '2', '4', '8', '16'], ", ") + + +How fast are exceptions? +------------------------ + +A try/except block is extremely efficient. Actually executing an exception +is expensive. In versions of Python prior to 2.0 it was common to use this +idiom:: + + try: + value = dict[key] + except KeyError: + dict[key] = getvalue(key) + value = dict[key] + +This only made sense when you expected the dict to have the key almost all +the time. If that wasn't the case, you coded it like this:: + + if dict.has_key(key): + value = dict[key] + else: + dict[key] = getvalue(key) + value = dict[key] + +(In Python 2.0 and higher, you can code this as +``value = dict.setdefault(key, getvalue(key))``.) + + +Why isn't there a switch or case statement in Python? +----------------------------------------------------- + +You can do this easily enough with a sequence of ``if... elif... elif... else``. +There have been some proposals for switch statement syntax, but there is no +consensus (yet) on whether and how to do range tests. See `PEP 275 +`_ for complete details and +the current status. + +For cases where you need to choose from a very large number of +possibilities, you can create a dictionary mapping case values to +functions to call. For example:: + + def function_1 (...): + ... + + functions = {'a': function_1, + 'b': function_2, + 'c': self.method_1, ...} + + func = functions[value] + func() + +For calling methods on objects, you can simplify yet further by using +the ``getattr()`` built-in to retrieve methods with a particular name:: + + def visit_a (self, ...): + ... + ... + + def dispatch (self, value): + method_name = 'visit_' + str(value) + method = getattr(self, method_name) + method() + +It's suggested that you use a prefix for the method names, such as +``visit_`` in this example. Without such a prefix, if values are coming +from an untrusted source, an attacker would be able to call any method +on your object. + + +Can't you emulate threads in the interpreter instead of relying on an OS-specific thread implementation? +-------------------------------------------------------------------------------------------------------- + +Answer 1: Unfortunately, the interpreter pushes at least one C stack frame +for each Python stack frame. Also, extensions can call back into Python at +almost random moments. Therefore, a complete threads implementation +requires thread support for C. + +Answer 2: Fortunately, there is `Stackless Python +`_, which has a completely redesigned interpreter +loop that avoids the C stack. It's still experimental but looks very +promising. Although it is binary compatible with standard Python, it's +still unclear whether Stackless will make it into the core -- maybe it's +just too revolutionary. + + +Why can't lambda forms contain statements? +------------------------------------------ + +Python lambda forms cannot contain statements because Python's syntactic +framework can't handle statements nested inside expressions. However, in +Python, this is not a serious problem. Unlike lambda forms in other +languages, where they add functionality, Python lambdas are only a shorthand +notation if you're too lazy to define a function. + +Functions are already first class objects in Python, and can be declared in +a local scope. Therefore the only advantage of using a lambda form instead +of a locally-defined function is that you don't need to invent a name for +the function -- but that's just a local variable to which the function +object (which is exactly the same type of object that a lambda form yields) +is assigned! + + +Can Python be compiled to machine code, C or some other language? +----------------------------------------------------------------- + +Not easily. Python's high level data types, dynamic typing of objects and +run-time invocation of the interpreter (using ``eval()`` or ``exec``) together mean +that a "compiled" Python program would probably consist mostly of calls into +the Python run-time system, even for seemingly simple operations like +``x+1``. + +Several projects described in the Python newsgroup or at past `Python +conferences `_ have shown that this +approach is feasible, although the speedups reached so far are only +modest (e.g. 2x). Jython uses the same strategy for compiling to Java +bytecode. (Jim Hugunin has demonstrated that in combination with +whole-program analysis, speedups of 1000x are feasible for small demo +programs. See the proceedings from the `1997 Python conference +`_ for more +information.) + +Internally, Python source code is always translated into a bytecode +representation, and this bytecode is then executed by the Python +virtual machine. In order to avoid the overhead of repeatedly parsing +and translating modules that rarely change, this byte code is written +into a file whose name ends in ".pyc" whenever a module is parsed. +When the corresponding .py file is changed, it is parsed and +translated again and the .pyc file is rewritten. + +There is no performance difference once the .pyc file has been loaded, +as the bytecode read from the .pyc file is exactly the same as the +bytecode created by direct translation. The only difference is that +loading code from a .pyc file is faster than parsing and translating a +.py file, so the presence of precompiled .pyc files improves the +start-up time of Python scripts. If desired, the Lib/compileall.py +module can be used to create valid .pyc files for a given set of +modules. + +Note that the main script executed by Python, even if its filename +ends in .py, is not compiled to a .pyc file. It is compiled to +bytecode, but the bytecode is not saved to a file. Usually main +scripts are quite short, so this doesn't cost much speed. + +There are also several programs which make it easier to intermingle +Python and C code in various ways to increase performance. See, for +example, `Psyco `_, +`Pyrex `_, `PyInline +`_, `Py2Cmod +`_, and `Weave +`_. + + +How does Python manage memory? +------------------------------ + +The details of Python memory management depend on the implementation. +The standard C implementation of Python uses reference counting to +detect inaccessible objects, and another mechanism to collect +reference cycles, periodically executing a cycle detection algorithm +which looks for inaccessible cycles and deletes the objects +involved. The ``gc`` module provides functions to perform a garbage +collection, obtain debugging statistics, and tune the collector's +parameters. + +Jython relies on the Java runtime so the JVM's garbage collector is +used. This difference can cause some subtle porting problems if your +Python code depends on the behavior of the reference counting +implementation. + +Sometimes objects get stuck in tracebacks temporarily and hence are not +deallocated when you might expect. Clear the tracebacks with:: + + import sys + sys.exc_clear() + sys.exc_traceback = sys.last_traceback = None + +Tracebacks are used for reporting errors, implementing debuggers and related +things. They contain a portion of the program state extracted during the +handling of an exception (usually the most recent exception). + +In the absence of circularities and tracebacks, Python programs need +not explicitly manage memory. + +Why doesn't Python use a more traditional garbage collection scheme? +For one thing, this is not a C standard feature and hence it's not +portable. (Yes, we know about the Boehm GC library. It has bits of +assembler code for *most* common platforms, not for all of them, and +although it is mostly transparent, it isn't completely transparent; +patches are required to get Python to work with it.) + +Traditional GC also becomes a problem when Python is embedded into other +applications. While in a standalone Python it's fine to replace the +standard malloc() and free() with versions provided by the GC library, an +application embedding Python may want to have its *own* substitute for +malloc() and free(), and may not want Python's. Right now, Python works +with anything that implements malloc() and free() properly. + +In Jython, the following code (which is fine in CPython) will probably run +out of file descriptors long before it runs out of memory:: + + for file in : + f = open(file) + c = f.read(1) + +Using the current reference counting and destructor scheme, each new +assignment to f closes the previous file. Using GC, this is not +guaranteed. If you want to write code that will work with any Python +implementation, you should explicitly close the file; this will work +regardless of GC:: + + for file in : + f = open(file) + c = f.read(1) + f.close() + + +Why isn't all memory freed when Python exits? +----------------------------------------------------- + +Objects referenced from the global namespaces of +Python modules are not always deallocated when Python exits. +This may happen if there are circular references. There are also +certain bits of memory that are allocated by the C library that are +impossible to free (e.g. a tool like Purify will complain about +these). Python is, however, aggressive about cleaning up memory on +exit and does try to destroy every single object. + +If you want to force Python to delete certain things on deallocation +use the ``sys.exitfunc()`` hook to run a function that will force +those deletions. + + +Why are there separate tuple and list data types? +------------------------------------------------- + +Lists and tuples, while similar in many respects, are generally used +in fundamentally different ways. Tuples can be thought of as being +similar to Pascal records or C structs; they're small collections of +related data which may be of different types which are operated on as +a group. For example, a Cartesian coordinate is appropriately +represented as a tuple of two or three numbers. + +Lists, on the other hand, are more like arrays in other languages. They +tend to hold a varying number of objects all of which have the same type and +which are operated on one-by-one. For example, ``os.listdir('.')`` returns +a list of strings representing the files in the current directory. +Functions which operate on this output would generally not break if you +added another file or two to the directory. + +Tuples are immutable, meaning that once a tuple has been created, you +can't replace any of its elements with a new value. Lists are +mutable, meaning that you can always change a list's elements. Only +immutable elements can be used as dictionary keys, and hence only +tuples and not lists can be used as keys. + + +How are lists implemented? +-------------------------- + +Python's lists are really variable-length arrays, not Lisp-style +linked lists. The implementation uses a contiguous array of +references to other objects, and keeps a pointer to this array and the +array's length in a list head structure. + +This makes indexing a list ``a[i]`` an operation whose cost is independent of +the size of the list or the value of the index. + +When items are appended or inserted, the array of references is resized. +Some cleverness is applied to improve the performance of appending items +repeatedly; when the array must be grown, some extra space is allocated so +the next few times don't require an actual resize. + + +How are dictionaries implemented? +----------------------------------------- +Python's dictionaries are implemented as resizable hash tables. +Compared to B-trees, this gives better performance for lookup +(the most common operation by far) under most circumstances, +and the implementation is simpler. + +Dictionaries work by computing a hash code for each key stored in the +dictionary using the ``hash()`` built-in function. The hash code +varies widely depending on the key; for example, "Python" hashes to +-539294296 while "python", a string that differs by a single bit, +hashes to 1142331976. The hash code is then used to calculate a +location in an internal array where the value will be stored. +Assuming that you're storing keys that all have different hash values, +this means that dictionaries take constant time -- O(1), in computer +science notation -- to retrieve a key. It also means that no sorted +order of the keys is maintained, and traversing the array as the +``.keys()`` and ``.items()`` do will output the dictionary's content +in some arbitrary jumbled order. + + +Why must dictionary keys be immutable? +---------------------------------------------- + +The hash table implementation of dictionaries uses a hash value +calculated from the key value to find the key. If the key were a +mutable object, its value could change, and thus its hash could also +change. But since whoever changes the key object can't tell that it +was being used as a dictionary key, it can't move the entry around in the +dictionary. Then, when you try to look up the same object in the +dictionary it won't be found because its hash value is different. +If you tried to look up the old value it wouldn't be found either, because +the value of the object found in that hash bin would be different. + +If you want a dictionary indexed with a list, simply convert the list +to a tuple first; the function ``tuple(L)`` creates a tuple with the +same entries as the list ``L``. Tuples are immutable and can +therefore be used as dictionary keys. + +Some unacceptable solutions that have been proposed: + +- Hash lists by their address (object ID). This doesn't work because + if you construct a new list with the same value it won't be found; + e.g.:: + + d = {[1,2]: '12'} + print d[[1,2]] + + would raise a KeyError exception because the id of the ``[1,2]`` used in + the second line differs from that in the first line. In other + words, dictionary keys should be compared using ``==``, not using + 'is'. + +- Make a copy when using a list as a key. This doesn't work because + the list, being a mutable object, could contain a reference to + itself, and then the copying code would run into an infinite loop. + +- Allow lists as keys but tell the user not to modify them. This + would allow a class of hard-to-track bugs in programs when you forgot + or modified a list by accident. It also + invalidates an important invariant of + dictionaries: every value in ``d.keys()`` is usable as a key of the + dictionary. + +- Mark lists as read-only once they are used as a dictionary key. The + problem is that it's not just the top-level object that could change + its value; you could use a tuple containing a list as a key. + Entering anything as a key into a dictionary would require marking + all objects reachable from there as read-only -- and again, + self-referential objects could cause an infinite loop. + +There is a trick to get around this if you need to, but +use it at your own risk: You +can wrap a mutable structure inside a class instance which +has both a __cmp__ and a __hash__ method. +You must then make sure that the hash value for all such wrapper objects +that reside in a dictionary (or other hash based structure), remain +fixed while the object is in the dictionary (or other structure).:: + + class ListWrapper: + def __init__(self, the_list): + self.the_list = the_list + def __cmp__(self, other): + return self.the_list == other.the_list + def __hash__(self): + l = self.the_list + result = 98767 - len(l)*555 + for i in range(len(l)): + try: + result = result + (hash(l[i]) % 9999999) * 1001 + i + except: + result = (result % 7777777) + i * 333 + return result + +Note that the hash computation is complicated by the +possibility that some members of the list may be unhashable +and also by the possibility of arithmetic overflow. + +Furthermore it must always be the case that if +``o1 == o2`` (ie ``o1.__cmp__(o2)==0``) then ``hash(o1)==hash(o2)`` +(ie, ``o1.__hash__() == o2.__hash__()``), regardless of whether +the object is in a dictionary or not. +If you fail to meet these restrictions dictionaries and other +hash based structures will misbehave. + +In the case of ListWrapper, whenever the wrapper +object is in a dictionary the wrapped list must not change +to avoid anomalies. Don't do this unless you are prepared +to think hard about the requirements and the consequences +of not meeting them correctly. Consider yourself warned. + + +Why doesn't list.sort() return the sorted list? +------------------------------------------------------- + +In situations where performance matters, making a copy +of the list just to sort it would be wasteful. Therefore, +list.sort() sorts the list in place. In order to remind you +of that fact, it does not return the sorted list. This way, +you won't be fooled into accidentally overwriting a list +when you need a sorted copy but also need to keep the +unsorted version around. + +In Python 2.4 a new builtin - sorted() - has been added. +This function creates a new list from a provided +iterable, sorts it and returns it. +For example, here's how to iterate over the keys of a +dictionary in sorted order:: + + for key in sorted(dict.iterkeys()): + ...do whatever with dict[key]... + +How do you specify and enforce an interface spec in Python? +------------------------------------------------------------------- + +An interface specification for a module as provided by languages such +as C++ and Java describes the prototypes for the methods and functions +of the module. Many feel that compile-time enforcement of interface +specifications helps in the construction of large programs. + +Python 2.6 adds an ``abc`` module that lets you define Abstract Base +Classes (ABCs). You can then use ``isinstance()`` +and ``issubclass`` to check whether an instance or a class +implements a particular ABC. The ``collections`` modules defines a set +of useful ABCs such as ``Iterable``, ``Container``, +and ``MutableMapping``. + +For Python, many of the advantages of interface specifications can be +obtained by an appropriate test discipline for components. There is +also a tool, PyChecker, which can be used to find problems due to +subclassing. + +A good test suite for a module can both provide a regression test +and serve as a module interface specification and a set of +examples. Many Python modules can be run as a script to provide a +simple "self test." Even modules which use complex external +interfaces can often be tested in isolation using trivial "stub" +emulations of the external interface. The ``doctest`` and +``unittest`` modules or third-party test frameworks can be used to construct +exhaustive test suites that exercise every line of code in a module. + +An appropriate testing discipline can help build large complex +applications in Python as well as having interface specifications +would. In fact, it can be better because an interface specification +cannot test certain properties of a program. For example, the +``append()`` method is expected to add new elements to the end of some +internal list; an interface specification cannot test that your +``append()`` implementation will actually do this correctly, but it's +trivial to check this property in a test suite. + +Writing test suites is very helpful, and you might want to design your +code with an eye to making it easily tested. One increasingly popular +technique, test-directed development, calls for writing parts of the +test suite first, before you write any of the actual code. Of course +Python allows you to be sloppy and not write test cases at all. + + +Why are default values shared between objects? +---------------------------------------------------------------- + +This type of bug commonly bites neophyte programmers. Consider this function:: + + def foo(D={}): # Danger: shared reference to one dict for all calls + ... compute something ... + D[key] = value + return D + +The first time you call this function, ``D`` contains a single item. +The second time, ``D`` contains two items because when ``foo()`` begins executing, +``D`` starts out with an item already in it. + +It is often expected that a function call creates new objects for +default values. This is not what happens. Default values are created +exactly once, when the function is defined. If that object is +changed, like the dictionary in this example, subsequent calls to the +function will refer to this changed object. + +By definition, immutable objects such as numbers, strings, tuples, and +``None``, are safe from change. Changes to mutable objects such as +dictionaries, lists, and class instances can lead to confusion. + +Because of this feature, it is good programming practice to not use mutable +objects as default values. Instead, use ``None`` as the default value +and inside the function, check if the parameter is ``None`` and create a new list/dictionary/whatever +if it is. For example, don't write:: + + def foo(dict={}): + ... + +but:: + + def foo(dict=None): + if dict is None: + dict = {} # create a new dict for local namespace + +This feature can be useful. When you have a function that's time-consuming to compute, +a common technique is to cache the parameters and the resulting value of each +call to the function, and return the cached value if the same value is requested again. +This is called "memoizing", and can be implemented like this:: + + # Callers will never provide a third parameter for this function. + def expensive (arg1, arg2, _cache={}): + if _cache.has_key((arg1, arg2)): + return _cache[(arg1, arg2)] + + # Calculate the value + result = ... expensive computation ... + _cache[(arg1, arg2)] = result # Store result in the cache + return result + +You could use a global variable containing a dictionary instead of +the default value; it's a matter of taste. + +Why is there no goto? +------------------------ + +You can use exceptions to provide a "structured goto" +that even works across function calls. Many feel that exceptions +can conveniently emulate all reasonable uses of the "go" or "goto" +constructs of C, Fortran, and other languages. For example:: + + class label: pass # declare a label + + try: + ... + if (condition): raise label() # goto label + ... + except label: # where to goto + pass + ... + +This doesn't allow you to jump into the middle of a loop, but +that's usually considered an abuse of goto anyway. Use sparingly. + + +Why can't raw strings (r-strings) end with a backslash? +--------------------------------------------------------------- +More precisely, they can't end with an odd number of backslashes: +the unpaired backslash at the end escapes the closing quote character, +leaving an unterminated string. + +Raw strings were designed to ease creating input for processors +(chiefly regular expression engines) that want to do their own +backslash escape processing. Such processors consider an unmatched +trailing backslash to be an error anyway, so raw strings disallow +that. In return, they allow you to pass on the string quote character +by escaping it with a backslash. These rules work well when r-strings +are used for their intended purpose. + +If you're trying to build Windows pathnames, note that all Windows +system calls accept forward slashes too:: + + f = open("/mydir/file.txt") # works fine! + +If you're trying to build a pathname for a DOS command, try e.g. one of :: + + dir = r"\this\is\my\dos\dir" "\\" + dir = r"\this\is\my\dos\dir\ "[:-1] + dir = "\\this\\is\\my\\dos\\dir\\" + + +Why doesn't Python have a "with" statement for attribute assignments? +--------------------------------------------------------------------------------------- + +Python has a 'with' statement that wraps the execution of a block, +calling code on the entrance and exit from the block. +Some language have a construct that looks like this:: + + with obj: + a = 1 # equivalent to obj.a = 1 + total = total + 1 # obj.total = obj.total + 1 + +In Python, such a construct would be ambiguous. + +Other languages, such as Object Pascal, Delphi, and C++, use static +types, so it's possible to know, in an unambiguous way, what member is +being assigned to. This is the main point of static typing -- the +compiler *always* knows the scope of every variable at compile time. + +Python uses dynamic types. It is impossible to know in advance which +attribute will be referenced at runtime. Member attributes may be +added or removed from objects on the fly. This makes it +impossible to know, from a simple reading, what attribute is being +referenced: a local one, a global one, or a member attribute? + +For instance, take the following incomplete snippet:: + + def foo(a): + with a: + print x + +The snippet assumes that "a" must have a member attribute called "x". +However, there is nothing in Python that tells the interpreter +this. What should happen if "a" is, let us say, an integer? If there is +a global variable named "x", will it be used inside the +with block? As you see, the dynamic nature of Python makes such +choices much harder. + +The primary benefit of "with" and similar language features (reduction +of code volume) can, however, easily be achieved in Python by +assignment. Instead of:: + + function(args).dict[index][index].a = 21 + function(args).dict[index][index].b = 42 + function(args).dict[index][index].c = 63 + +write this:: + + ref = function(args).dict[index][index] + ref.a = 21 + ref.b = 42 + ref.c = 63 + +This also has the side-effect of increasing execution speed because +name bindings are resolved at run-time in Python, and the second +version only needs to perform the resolution once. If the referenced +object does not have a, b and c attributes, of course, the end result +is still a run-time exception. + + +Why are colons required for the if/while/def/class statements? +-------------------------------------------------------------------- + +The colon is required primarily to enhance readability (one of the +results of the experimental ABC language). Consider this:: + + if a==b + print a + +versus :: + + if a==b: + print a + +Notice how the second one is slightly easier to read. Notice further how +a colon sets off the example in the second line of this FAQ answer; it's +a standard usage in English. + +Another minor reason is that the colon makes it easier for editors +with syntax highlighting; they can look for colons to decide when +indentation needs to be increased instead of having to do a more +elaborate parsing of the program text. + + +Why does Python allow commas at the end of lists and tuples? +------------------------------------------------------------------------------ + +Python lets you add a trailing comma at the end of lists, tuples, and +dictionaries:: + + [1, 2, 3,] + ('a', 'b', 'c',) + d = { + "A": [1, 5], + "B": [6, 7], # last trailing comma is optional but good style + } + + +There are several reasons to allow this. + +When you have a literal value for a list, tuple, or dictionary spread +across multiple lines, it's easier to add more elements because you +don't have to remember to add a comma to the previous line. The lines +can also be sorted in your editor without creating a syntax error. + +Accidentally omitting the comma can lead to errors that are hard to +diagnose. For example:: + + x = [ + "fee", + "fie" + "foo", + "fum" + ] + +This list looks like it has four elements, but it actually contains +three: "fee", "fiefoo" and "fum". Always adding the comma avoids this +source of error. + +Allowing the trailing comma may also make programmatic code generation +easier. Added: sandbox/trunk/faq/gui.rst ============================================================================== --- (empty file) +++ sandbox/trunk/faq/gui.rst Wed Sep 23 02:56:33 2009 @@ -0,0 +1,166 @@ + +==================================== +Graphic User Interface FAQ +==================================== + +.. contents:: + +General GUI Questions +============================ + +What platform-independent GUI toolkits exist for Python? +---------------------------------------------------------------- +Depending on what platform(s) you are aiming at, there are several. + +Tkinter +'''''''''''' + +Standard builds of Python include an object-oriented interface to the +Tcl/Tk widget set, called Tkinter. This is probably the easiest to +install and use. For more info about Tk, including pointers to the +source, see the Tcl/Tk home page at http://www.tcl.tk. Tcl/Tk is +fully portable to the MacOS, Windows, and Unix platforms. + +wxWindows +''''''''''''' + + +wxWindows is a portable GUI class library written in C++ that's a +portable interface to various platform-specific libraries; wxWidgets is +a Python interface to wxWindows. wxWindows supports Windows and MacOS; +on Unix variants, it supports both GTk+ and Motif toolkits. +wxWindows preserves the look and feel of the underlying graphics +toolkit, and there is quite a rich widget set and collection of GDI +classes. See `the wxWindows page `_ for more +details. + +`wxWidgets `_ is an extension module that +wraps many of the wxWindows C++ classes, and is quickly gaining +popularity amongst Python developers. You can get wxWidgets as part of +the source or CVS distribution of wxWindows, or directly from its home +page. + + +Qt +'''''' + +There are bindings available for the Qt toolkit (`PyQt +`_) and for KDE (PyKDE). +If you're writing open source software, you don't need to pay for +PyQt, but if you want to write proprietary applications, you must buy +a PyQt license from `Riverbank Computing +`_ and a Qt license from +`Trolltech `_. + +GTk+ +''''''''''' + +PyGTk bindings for the `GTk+ toolkit `_ have been +implemented by by James Henstridge; see +ftp://ftp.gtk.org/pub/gtk/python/. + +FLTK +''''''''''' + +Python bindings for `the FLTK toolkit `_, a simple yet powerful +and mature cross-platform windowing system, are available from `the +PyFLTK project `_. + + +FOX +''''''''''' + +A wrapper for `the FOX toolkit `_ +called `FXpy `_ is available. +FOX supports both Unix variants and Windows. + + +OpenGL +''''''''''''' + +For OpenGL bindings, see `PyOpenGL `_. + + +What platform-specific GUI toolkits exist for Python? +---------------------------------------------------------------- + +`The Mac port `_ by +Jack Jansen has a rich and ever-growing set of modules that support +the native Mac toolbox calls. The port includes support for MacOS9 +and MacOS X's Carbon libraries. By installing the `PyObjc Objective-C +bridge `_, Python programs can use +MacOS X's Cocoa libraries. See the documentation that comes with the +Mac port. + +`Pythonwin <../windows/>`_ by Mark Hammond +includes an interface to the Microsoft Foundation +Classes and a Python programming environment using it that's written +mostly in Python. + + +Tkinter questions +===================== + +How do I freeze Tkinter applications? +--------------------------------------------- + +Freeze is a tool to create stand-alone applications. When freezing +Tkinter applications, the applications will not be truly stand-alone, +as the application will still need the Tcl and Tk libraries. + +One solution is to ship the application with the tcl and tk libraries, +and point to them at run-time using the TCL_LIBRARY and TK_LIBRARY +environment variables. + +To get truly stand-alone applications, the Tcl scripts that form +the library have to be integrated into the application as well. One +tool supporting that is SAM (stand-alone modules), which is part +of the Tix distribution (http://tix.mne.com). Build Tix with SAM +enabled, perform the appropriate call to Tclsam_init etc inside +Python's Modules/tkappinit.c, and link with libtclsam +and libtksam (you might include the Tix libraries as well). + + +Can I have Tk events handled while waiting for I/O? +----------------------------------------------------------- +Yes, and you don't even need threads! But you'll have to +restructure your I/O code a bit. Tk has the equivalent of Xt's +XtAddInput() call, which allows you to register a callback function +which will be called from the Tk mainloop when I/O is possible on a +file descriptor. Here's what you need:: + + from Tkinter import tkinter + tkinter.createfilehandler(file, mask, callback) + +The file may be a Python file or socket object (actually, anything +with a fileno() method), or an integer file descriptor. The mask is +one of the constants tkinter.READABLE or tkinter.WRITABLE. The +callback is called as follows:: + + callback(file, mask) + +You must unregister the callback when you're done, using :: + + tkinter.deletefilehandler(file) + +Note: since you don't know *how many bytes* are available for reading, +you can't use the Python file object's read or readline methods, since +these will insist on reading a predefined number of bytes. For +sockets, the recv() or recvfrom() methods will work fine; for other +files, use os.read(file.fileno(), maxbytecount). + + +I can't get key bindings to work in Tkinter: why? +--------------------------------------------------- +An often-heard complaint is that event handlers bound to events +with the bind() method don't get handled even when the appropriate +key is pressed. + +The most common cause is that the widget to which the binding applies +doesn't have "keyboard focus". Check out the Tk documentation +for the focus command. Usually a widget is given the keyboard +focus by clicking in it (but not for labels; see the takefocus +option). + + + Added: sandbox/trunk/faq/index.rst ============================================================================== --- (empty file) +++ sandbox/trunk/faq/index.rst Wed Sep 23 02:56:33 2009 @@ -0,0 +1,18 @@ + +################################### + Python Frequently Asked Questions +################################### + +:Release: |version| +:Date: |today| + +.. toctree:: + :maxdepth: 1 + + general.rst + programming.rst + library.rst + extending.rst + windows.rst + gui.rst + installed.rst Added: sandbox/trunk/faq/installed.rst ============================================================================== --- (empty file) +++ sandbox/trunk/faq/installed.rst Wed Sep 23 02:56:33 2009 @@ -0,0 +1,59 @@ + +===================================================== +"Why is Python Installed on my Computer?" FAQ +===================================================== + +What is Python? +---------------------- + +Python is a programming language. It's used for many different +applications. It's used in some high schools and colleges as an +introductory programming language because Python is easy to learn, but +it's also used by professional software developers at places such as Google, +NASA, and Industrial Light & Magic. + +If you're curious about finding out more about Python, start with the +`Beginner's Guide to Python `_. + + +Why is Python installed on my machine? +-------------------------------------------------- + +If you find Python installed on your system but don't remember +installing it, there are several possible ways it could have gotten +there. + +* Perhaps another user on the computer wanted to learn programming + and installed it; you'll have to figure out who's been using the machine + and might have installed it. +* A third-party application installed on the machine might have been written + in Python and included a Python installation. For a home computer, + the most common such application is + `PySol `_, + a solitaire game that includes over 200 different games and variations. +* Some Windows machines also have Python installed. At this writing we're + aware of computers from Hewlett-Packard and Compaq that include Python. + Apparently some of HP/Compaq's administrative tools are written in Python. +* All Apple computers running Mac OS X have Python installed; it's included + in the base installation. + + +Can I delete Python? +---------------------------- + +That depends on where Python came from. + +If someone installed it deliberately, you can remove it without +hurting anything. On Windows, use the Add/Remove Programs icon in the +Control Panel. + +If Python was installed by a third-party application, you can also +remove it, but that application will no longer work. You should probably +use that application's uninstaller rather than removing Python directly. + +If Python came with your operating system, removing it is not +recommended. If you remove it, whatever tools were written in Python +will no longer run, and some of them might be important to you. +Reinstalling the whole system would then be required to fix things +again. + Added: sandbox/trunk/faq/library.rst ============================================================================== --- (empty file) +++ sandbox/trunk/faq/library.rst Wed Sep 23 02:56:33 2009 @@ -0,0 +1,901 @@ + +==================================== +Python Library and Extension FAQ +==================================== + +.. contents:: + +General Library Questions +=============================== + +How do I find a module or application to perform task X? +------------------------------------------------------------- + +Check `the Library Reference `_ to see +if there's a relevant standard library module. (Eventually you'll +learn what's in the standard library and will able to skip this step.) + +Search the `Python Package Index `_. + +Next, check the `Vaults of Parnassus `_, +an older index of packages. + +Finally, try `Google `_ or other Web search +engine. Searching for "Python" plus a keyword or two for your topic +of interest will usually find something helpful. + + +Where is the math.py (socket.py, regex.py, etc.) source file? +--------------------------------------------------------------------- +If you can't find a source file for a module it may be a builtin +or dynamically loaded module implemented in C, C++ or other +compiled language. In this case you may not have the source +file or it may be something like mathmodule.c, somewhere in +a C source directory (not on the Python Path). + +There are (at least) three kinds of modules in Python: + +1) modules written in Python (.py); +2) modules written in C and dynamically loaded (.dll, .pyd, .so, .sl, etc); +3) modules written in C and linked with the interpreter; to get a list + of these, type:: + + import sys + print sys.builtin_module_names + +How do I make a Python script executable on Unix? +--------------------------------------------------------- + +You need to do two things: the script file's mode must be executable +and the first line must begin with ``#!`` followed by the path of +the Python interpreter. + +The first is done by executing ``chmod +x scriptfile`` or perhaps +``chmod 755 scriptfile``. + +The second can be done in a number of ways. The most straightforward +way is to write :: + + #!/usr/local/bin/python + +as the very first line of your file, using the pathname for where the +Python interpreter is installed on your platform. + +If you would like the script to be independent of where the Python +interpreter lives, you can use the "env" program. Almost all +Unix variants support the following, assuming the python interpreter +is in a directory on the user's $PATH:: + + #! /usr/bin/env python + +*Don't* do this for CGI scripts. The $PATH variable for +CGI scripts is often very minimal, so you need to use the actual +absolute pathname of the interpreter. + +Occasionally, a user's environment is so full that the /usr/bin/env +program fails; or there's no env program at all. +In that case, you can try the following hack (due to Alex Rezinsky):: + + #! /bin/sh + """:" + exec python $0 ${1+"$@"} + """ + +The minor disadvantage is that this defines the script's __doc__ string. +However, you can fix that by adding :: + + __doc__ = """...Whatever...""" + + + +Is there a curses/termcap package for Python? +---------------------------------------------------- + +For Unix variants: The standard Python source distribution comes with +a curses module in the Modules/ subdirectory, though it's not compiled +by default (note that this is not available in the Windows +distribution -- there is no curses module for Windows). + +The curses module supports basic curses features as well as many +additional functions from ncurses and SYSV curses such as colour, +alternative character set support, pads, and mouse support. This means +the module isn't compatible with operating systems that only +have BSD curses, but there don't seem to be any currently maintained +OSes that fall into this category. + +For Windows: use `the consolelib module `_. + + +Is there an equivalent to C's onexit() in Python? +-------------------------------------------------------- + +`The atexit module +`_ provides a +register function that is similar to C's onexit. + +Why don't my signal handlers work? +-------------------------------------------- +The most common problem is that the signal handler is declared +with the wrong argument list. It is called as :: + + handler(signum, frame) + +so it should be declared with two arguments:: + + def handler(signum, frame): + ... + + + + + + +Common tasks +================= + +How do I test a Python program or component? +---------------------------------------------------- + +Python comes with two testing frameworks. The `doctest module +`_ finds examples +in the docstrings for a module and runs them, comparing the output +with the expected output given in the docstring. + +The `unittest module +`_ is a fancier +testing framework modelled on Java and Smalltalk testing frameworks. + +For testing, it helps to write the program so that it may be easily +tested by using good modular design. Your program should have almost +all functionality encapsulated in either functions or class methods -- +and this sometimes has the surprising and delightful effect of making +the program run faster (because local variable accesses are faster +than global accesses). Furthermore the program should avoid depending +on mutating global variables, since this makes testing much more +difficult to do. + +The "global main logic" of your program may be as simple +as :: + + if __name__=="__main__": + main_logic() + +at the bottom of the main module of your program. + +Once your program is organized as a tractable collection +of functions and class behaviours you should write test +functions that exercise the behaviours. A test suite +can be associated with each module which automates +a sequence of tests. This sounds like a lot of work, but +since Python is so terse and flexible it's surprisingly easy. +You can make coding much more pleasant and fun by +writing your test functions in parallel with the "production +code", since this makes it easy to find bugs and even +design flaws earlier. + +"Support modules" that are not intended to be the main module of a +program may include a self-test of the module. :: + + if __name__ == "__main__": + self_test() + +Even programs that interact with complex external interfaces may be +tested when the external interfaces are unavailable by using "fake" +interfaces implemented in Python. + +How do I create documentation from doc strings? +------------------------------------------------------- + +The `pydoc module `_ +can create HTML from the doc strings in your Python source code. An +alternative is `pythondoc +`_. + + +How do I get a single keypress at a time? +----------------------------------------------- + +For Unix variants:There are several solutions. +It's straightforward to do this using curses, but curses is a +fairly large module to learn. Here's a solution without curses:: + + import termios, fcntl, sys, os + fd = sys.stdin.fileno() + + oldterm = termios.tcgetattr(fd) + newattr = termios.tcgetattr(fd) + newattr[3] = newattr[3] & ~termios.ICANON & ~termios.ECHO + termios.tcsetattr(fd, termios.TCSANOW, newattr) + + oldflags = fcntl.fcntl(fd, fcntl.F_GETFL) + fcntl.fcntl(fd, fcntl.F_SETFL, oldflags | os.O_NONBLOCK) + + try: + while 1: + try: + c = sys.stdin.read(1) + print "Got character", `c` + except IOError: pass + finally: + termios.tcsetattr(fd, termios.TCSAFLUSH, oldterm) + fcntl.fcntl(fd, fcntl.F_SETFL, oldflags) + +You need the ``termios`` and the ``fcntl`` module for any of this to work, +and I've only tried it on Linux, though it should work elsewhere. +In this code, characters are read and printed one at a time. + +``termios.tcsetattr()`` turns off stdin's echoing and disables canonical +mode. ``fcntl.fnctl()`` is used to obtain stdin's file descriptor flags +and modify them for non-blocking mode. Since reading stdin when it is +empty results in an ``IOError``, this error is caught and ignored. + + +Threads +============= + +How do I program using threads? +--------------------------------- + +Be sure to use `the threading module +`_ and not the +``thread`` module. The ``threading`` module builds convenient +abstractions on top of the low-level primitives provided by the +``thread`` module. + +Aahz has a set of slides from his threading tutorial that are helpful; +see http://starship.python.net/crew/aahz/OSCON2001/. + + +None of my threads seem to run: why? +------------------------------------------- + +As soon as the main thread exits, all threads are killed. Your main +thread is running too quickly, giving the threads no time to do any work. + +A simple fix is to add a sleep to the end of the program +that's long enough for all the threads to finish:: + + import threading, time + + def thread_task(name, n): + for i in range(n): print name, i + + for i in range(10): + T = threading.Thread(target=thread_task, args=(str(i), i)) + T.start() + + time.sleep(10) # <----------------------------! + +But now (on many platforms) the threads don't run in parallel, +but appear to run sequentially, one at a time! The reason is +that the OS thread scheduler doesn't start a new thread until +the previous thread is blocked. + +A simple fix is to add a tiny sleep to the start of the run +function:: + + def thread_task(name, n): + time.sleep(0.001) # <---------------------! + for i in range(n): print name, i + + for i in range(10): + T = threading.Thread(target=thread_task, args=(str(i), i)) + T.start() + + time.sleep(10) + +Instead of trying to guess how long a ``time.sleep()`` delay will be +enough, it's better to use some kind of semaphore mechanism. One idea +is to use the `Queue module +`_ to create a queue +object, let each thread append a token to the queue when it finishes, +and let the main thread read as many tokens from the queue as there +are threads. + + + +How do I parcel out work among a bunch of worker threads? +---------------------------------------------------------------- + +Use the `Queue module +`_ to create a queue +containing a list of jobs. The ``Queue`` class maintains a list of +objects with ``.put(obj)`` to add an item to the queue and ``.get()`` +to return an item. The class will take care of the locking necessary +to ensure that each job is handed out exactly once. + +Here's a trivial example:: + + import threading, Queue, time + + # The worker thread gets jobs off the queue. When the queue is empty, it + # assumes there will be no more work and exits. + # (Realistically workers will run until terminated.) + def worker (): + print 'Running worker' + time.sleep(0.1) + while True: + try: + arg = q.get(block=False) + except Queue.Empty: + print 'Worker', threading.currentThread(), + print 'queue empty' + break + else: + print 'Worker', threading.currentThread(), + print 'running with argument', arg + time.sleep(0.5) + + # Create queue + q = Queue.Queue() + + # Start a pool of 5 workers + for i in range(5): + t = threading.Thread(target=worker, name='worker %i' % (i+1)) + t.start() + + # Begin adding work to the queue + for i in range(50): + q.put(i) + + # Give threads time to run + print 'Main thread sleeping' + time.sleep(5) + +When run, this will produce the following output: + + Running worker + Running worker + Running worker + Running worker + Running worker + Main thread sleeping + Worker running with argument 0 + Worker running with argument 1 + Worker running with argument 2 + Worker running with argument 3 + Worker running with argument 4 + Worker running with argument 5 + ... + +Consult the module's documentation for more details; the ``Queue`` +class provides a featureful interface. + + +What kinds of global value mutation are thread-safe? +------------------------------------------------------------ + +A global interpreter lock (GIL) is used internally to ensure that only +one thread runs in the Python VM at a time. In general, Python offers +to switch among threads only between bytecode instructions; how +frequently it switches can be set via ``sys.setcheckinterval()``. +Each bytecode instruction and therefore all the C implementation code +reached from each instruction is therefore atomic from the point of view of a Python program. + +In theory, this means an exact accounting requires an exact +understanding of the PVM bytecode implementation. In practice, it +means that operations on shared variables of builtin data types (ints, +lists, dicts, etc) that "look atomic" really are. + +For example, the following operations are all atomic (L, L1, L2 are lists, D, D1, D2 are dicts, x, y +are objects, i, j are ints):: + + L.append(x) + L1.extend(L2) + x = L[i] + x = L.pop() + L1[i:j] = L2 + L.sort() + x = y + x.field = y + D[x] = y + D1.update(D2) + D.keys() + +These aren't:: + + i = i+1 + L.append(L[-1]) + L[i] = L[j] + D[x] = D[x] + 1 + +Operations that replace other objects may invoke those other +objects' ``__del__`` method when their reference count reaches zero, and +that can affect things. This is especially true for the mass updates +to dictionaries and lists. When in doubt, use a mutex! + +Can't we get rid of the Global Interpreter Lock? +-------------------------------------------------------- + +The Global Interpreter Lock (GIL) is often seen as a hindrance to +Python's deployment on high-end multiprocessor server machines, +because a multi-threaded Python program effectively only uses one CPU, +due to the insistence that (almost) all Python code can only run while +the GIL is held. + +Back in the days of Python 1.5, Greg Stein actually implemented a +comprehensive patch set (the "free threading" patches) that removed +the GIL and replaced it with fine-grained locking. Unfortunately, even +on Windows (where locks are very efficient) this ran ordinary Python +code about twice as slow as the interpreter using the GIL. On Linux +the performance loss was even worse because pthread locks aren't as +efficient. + +Since then, the idea of getting rid of the GIL has occasionally come +up but nobody has found a way to deal with the expected slowdown, and +users who don't use threads would not be happy if their code ran at +half at the speed. Greg's free threading patch set has not been kept +up-to-date for later Python versions. + +This doesn't mean that you can't make good use of Python on multi-CPU +machines! You just have to be creative with dividing the work up +between multiple *processes* rather than multiple *threads*. +Judicious use of C extensions will also help; if you use a C extension +to perform a time-consuming task, the extension can release the GIL +while the thread of execution is in the C code and allow other threads +to get some work done. + +It has been suggested that the GIL should be a per-interpreter-state +lock rather than truly global; interpreters then wouldn't be able to +share objects. Unfortunately, this isn't likely to happen either. It +would be a tremendous amount of work, because many object +implementations currently have global state. For example, small +integers and short strings are cached; these caches would have to be +moved to the interpreter state. Other object types have their own +free list; these free lists would have to be moved to the interpreter +state. And so on. + +And I doubt that it can even be done in finite time, because the same +problem exists for 3rd party extensions. It is likely that 3rd party +extensions are being written at a faster rate than you can convert +them to store all their global state in the interpreter state. + +And finally, once you have multiple interpreters not sharing any +state, what have you gained over running each interpreter +in a separate process? + + +Input and Output +========================= + +How do I delete a file? (And other file questions...) +--------------------------------------------------------- + +Use ``os.remove(filename)`` or ``os.unlink(filename)``; for +documentation, see `the POSIX module +`_. The two +functions are identical; ``unlink()`` is simply the name of the Unix +system call for this function. + +To remove a directory, use ``os.rmdir()``; use ``os.mkdir()`` to +create one. ``os.makedirs(path)`` will create any intermediate +directories in ``path`` that don't exist. ``os.removedirs(path)`` will +remove intermediate directories as long as they're empty; if you want +to delete an entire directory tree and its contents, use +``shutil.rmtree()``. + +To rename a file, use ``os.rename(old_path, new_path)``. + +To truncate a file, open it using ``f = open(filename, "r+")``, and use +``f.truncate(offset)``; offset defaults to the current seek position. +There's also ```os.ftruncate(fd, offset)`` for files opened with ``os.open()``, +where ``fd`` is the file descriptor (a small integer). + +The ``shutil`` module also contains a number of functions to work on files +including ``copyfile``, ``copytree``, and ``rmtree``. + +How do I copy a file? +----------------------------- + +The ``shutil`` module contains a ``copyfile()`` function. Note that +on MacOS 9 it doesn't copy the resource fork and Finder info. + + +How do I read (or write) binary data? +--------------------------------------------- + +or complex data formats, it's best to use `the struct module +`_. It allows you +to take a string containing binary data (usually numbers) and convert +it to Python objects; and vice versa. + +For example, the following code reads two 2-byte integers +and one 4-byte integer in big-endian format from a file:: + + import struct + + f = open(filename, "rb") # Open in binary mode for portability + s = f.read(8) + x, y, z = struct.unpack(">hhl", s) + +The '>' in the format string forces big-endian data; the letter +'h' reads one "short integer" (2 bytes), and 'l' reads one +"long integer" (4 bytes) from the string. + +For data that is more regular (e.g. a homogeneous list of ints or +thefloats), you can also use `the array module `_. + +I can't seem to use os.read() on a pipe created with os.popen(); why? +------------------------------------------------------------------------ + +``os.read()`` is a low-level function which takes a file descriptor, a +small integer representing the opened file. ``os.popen()`` creates a +high-level file object, the same type returned by the builtin +``open()`` function. Thus, to read n bytes from a pipe p created with +``os.popen()``, you need to use ``p.read(n)``. + +How do I run a subprocess with pipes connected to both input and output? +-------------------------------------------------------------------------------- +Use `the popen2 module +`_. For example:: + + import popen2 + fromchild, tochild = popen2.popen2("command") + tochild.write("input\n") + tochild.flush() + output = fromchild.readline() + +Warning: in general it is unwise to do this because you can easily +cause a deadlock where your process is blocked waiting for output from +the child while the child is blocked waiting for input from you. This +can be caused because the parent expects the child to output more text +than it does, or it can be caused by data being stuck in stdio buffers +due to lack of flushing. The Python parent can of course explicitly +flush the data it sends to the child before it reads any output, but +if the child is a naive C program it may have been written to never +explicitly flush its output, even if it is interactive, since flushing +is normally automatic. + +Note that a deadlock is also possible if you use ``popen3`` to read +stdout and stderr. If one of the two is too large for the internal +buffer (increasing the buffer size does not help) and you ``read()`` +the other one first, there is a deadlock, too. + +Note on a bug in popen2: unless your program calls ``wait()`` +or ``waitpid()``, finished child processes are never removed, +and eventually calls to popen2 will fail because of a limit on +the number of child processes. Calling ``os.waitpid`` with the +``os.WNOHANG`` option can prevent this; a good place to insert such +a call would be before calling ``popen2`` again. + +In many cases, all you really need is to run some data through a +command and get the result back. Unless the amount of data is very +large, the easiest way to do this is to write it to a temporary file +and run the command with that temporary file as input. The `standard +module tempfile `_ +exports a ``mktemp()`` function to generate unique temporary file names. :: + + import tempfile + import os + class Popen3: + """ + This is a deadlock-safe version of popen that returns + an object with errorlevel, out (a string) and err (a string). + (capturestderr may not work under windows.) + Example: print Popen3('grep spam','\n\nhere spam\n\n').out + """ + def __init__(self,command,input=None,capturestderr=None): + outfile=tempfile.mktemp() + command="( %s ) > %s" % (command,outfile) + if input: + infile=tempfile.mktemp() + open(infile,"w").write(input) + command=command+" <"+infile + if capturestderr: + errfile=tempfile.mktemp() + command=command+" 2>"+errfile + self.errorlevel=os.system(command) >> 8 + self.out=open(outfile,"r").read() + os.remove(outfile) + if input: + os.remove(infile) + if capturestderr: + self.err=open(errfile,"r").read() + os.remove(errfile) + +Note that many interactive programs (e.g. vi) don't work well with +pipes substituted for standard input and output. You will have to use +pseudo ttys ("ptys") instead of pipes. Or you can use a Python +interface to Don Libes' "expect" library. A Python extension that +interfaces to expect is called "expy" and available from +http://expectpy.sourceforge.net. A pure Python solution that works +like expect is ` pexpect `_. + + +How do I access the serial (RS232) port? +------------------------------------------------ +For Win32, POSIX (Linux, BSD, etc.), Jython: + + http://pyserial.sourceforge.net + +For Unix, see a Usenet post by Mitch Chapman: + + http://groups.google.com/groups?selm=34A04430.CF9 at ohioee.com + + +Why doesn't closing sys.stdout (stdin, stderr) really close it? +----------------------------------------------------------------------- + +Python file objects are a high-level layer of abstraction on top of C +streams, which in turn are a medium-level layer of abstraction on top +of (among other things) low-level C file descriptors. + +For most file objects you create in Python via the builtin ``file`` +constructor, ``f.close()`` marks the Python file object as being closed +from Python's point of view, and also arranges to close the underlying +C stream. This also happens automatically in f's destructor, when f +becomes garbage. + +But stdin, stdout and stderr are treated specially by Python, because +of the special status also given to them by C. Running +``sys.stdout.close()`` marks the Python-level file object as being +closed, but does *not* close the associated C stream. + +To close the underlying C stream for one of these three, you should +first be sure that's what you really want to do (e.g., you may confuse +extension modules trying to do I/O). If it is, use +os.close:: + + os.close(0) # close C's stdin stream + os.close(1) # close C's stdout stream + os.close(2) # close C's stderr stream + + + +Network/Internet Programming +======================================= + +What WWW tools are there for Python? +-------------------------------------------- + +See the chapters titled `"Internet Protocols and Support" +`_ and `"Internet Data +Handling" `_ in the +Library Reference Manual. Python has many modules that will help you +build server-side and client-side web systems. + +A summary of available frameworks is maintained by Paul Boddie at +http://wiki.python.org/moin/WebProgramming . + +Cameron Laird maintains a useful set of pages about Python web technologies at +http://phaseit.net/claird/comp.lang.python/web_python. + + +How can I mimic CGI form submission (METHOD=POST)? +---------------------------------------------------------- +I would like to retrieve web pages that are the result of POSTing a +form. Is there existing code that would let me do this easily? + +Yes. Here's a simple example that uses httplib:: + + #!/usr/local/bin/python + + import httplib, sys, time + + ### build the query string + qs = "First=Josephine&MI=Q&Last=Public" + + ### connect and send the server a path + httpobj = httplib.HTTP('www.some-server.out-there', 80) + httpobj.putrequest('POST', '/cgi-bin/some-cgi-script') + ### now generate the rest of the HTTP headers... + httpobj.putheader('Accept', '*/*') + httpobj.putheader('Connection', 'Keep-Alive') + httpobj.putheader('Content-type', 'application/x-www-form-urlencoded') + httpobj.putheader('Content-length', '%d' % len(qs)) + httpobj.endheaders() + httpobj.send(qs) + ### find out what the server said in response... + reply, msg, hdrs = httpobj.getreply() + if reply != 200: + sys.stdout.write(httpobj.getfile().read()) + +Note that in general for URL-encoded POST operations, query +strings must be quoted by using ``urllib.quote()``. For example to send name="Guy +Steele, Jr.":: + + >>> from urllib import quote + >>> x = quote("Guy Steele, Jr.") + >>> x + 'Guy%20Steele,%20Jr.' + >>> query_string = "name="+x + >>> query_string + 'name=Guy%20Steele,%20Jr.' + + +What module should I use to help with generating HTML? +-------------------------------------------------------------- + +There are many different modules available: + +* HTMLgen is a class library of objects corresponding to all the HTML + 3.2 markup tags. It's used when you are writing in Python and wish + to synthesize HTML pages for generating a web or for CGI forms, etc. +* DocumentTemplate and Zope Page Templates are two different systems that are + part of Zope. +* Quixote's PTL uses Python syntax to assemble strings of text. + +Consult the `Web Programming wiki pages `_ for more links. + + +How do I send mail from a Python script? +------------------------------------------------ + +Use `the standard library module smtplib +`_. + +Here's a very simple interactive mail sender that uses it. This +method will work on any host that supports an SMTP listener. :: + + import sys, smtplib + + fromaddr = raw_input("From: ") + toaddrs = raw_input("To: ").split(',') + print "Enter message, end with ^D:" + msg = '' + while 1: + line = sys.stdin.readline() + if not line: + break + msg = msg + line + + # The actual mail send + server = smtplib.SMTP('localhost') + server.sendmail(fromaddr, toaddrs, msg) + server.quit() + +A Unix-only alternative uses sendmail. The location of the +sendmail program varies between systems; sometimes it is +``/usr/lib/sendmail``, sometime ``/usr/sbin/sendmail``. The sendmail +manual page will help you out. Here's some sample code:: + + SENDMAIL = "/usr/sbin/sendmail" # sendmail location + import os + p = os.popen("%s -t -i" % SENDMAIL, "w") + p.write("To: receiver at example.com\n") + p.write("Subject: test\n") + p.write("\n") # blank line separating headers from body + p.write("Some text\n") + p.write("some more text\n") + sts = p.close() + if sts != 0: + print "Sendmail exit status", sts + + +How do I avoid blocking in the connect() method of a socket? +-------------------------------------------------------------------------- +The select module is commonly used to help with asynchronous +I/O on sockets. + +To prevent the TCP connect from blocking, you can set the socket to +non-blocking mode. Then when you do the ``connect()``, you will +either connect immediately (unlikely) or get an exception that +contains the error number as ``.errno``. ``errno.EINPROGRESS`` +indicates that the connection is in progress, but hasn't finished yet. +Different OSes will return different values, so you're going to have +to check what's returned on your system. + +You can use the ``connect_ex()`` method to avoid creating an +exception. It will just return the errno value. To poll, you can +call ``connect_ex()`` again later -- 0 or ``errno.EISCONN`` indicate +that you're connected -- or you can pass this socket to select to +check if it's writable. + + +Databases +===================== + +Are there any interfaces to database packages in Python? +---------------------------------------------------------------- + +Yes. + +Python 2.3 includes the ``bsddb`` package which provides an interface +to the `BerkeleyDB +`_ library. +Interfaces to disk-based hashes such as `DBM +`_ and `GDBM +`_ are also included +with standard Python. + +Support for most relational databases is available. See the `DatabaseProgramming wiki page `_ for details. + + +How do you implement persistent objects in Python? +------------------------------------------------------------ + +The `pickle library module +`_ solves this in a +very general way (though you still can't store things like open files, +sockets or windows), and the `shelve library module +`_ uses pickle and +(g)dbm to create persistent mappings containing arbitrary Python +objects. For better performance, you can use +`the cPickle module `_. + +A more awkward way of doing things is to use pickle's little sister, +marshal. `The marshal module +`_ provides very +fast ways to store noncircular basic Python types to files and +strings, and back again. Although marshal does not do fancy things +like store instances or handle shared references properly, it does run +extremely fast. For example loading a half megabyte of data may take +less than a third of a second. This often beats doing something more +complex and general such as using gdbm with pickle/shelve. + + +Why is cPickle so slow? +-------------------------------- + +The default format used by the pickle module is a slow one that +results in readable pickles. Making it the default, but it would +break backward compatibility:: + + largeString = 'z' * (100 * 1024) + myPickle = cPickle.dumps(largeString, protocol=1) + + + + +If my program crashes with a bsddb (or anydbm) database open, it gets corrupted. How come? +-------------------------------------------------------------------------------------------------- + +Databases opened for write access with the bsddb module (and often by +the anydbm module, since it will preferentially use bsddb) must +explicitly be closed using the ``.close()`` method of the database. The +underlying library caches database contents which need to be +converted to on-disk form and written. + +If you have initialized a new bsddb database but not written anything to +it before the program crashes, you will often wind up with a zero-length +file and encounter an exception the next time the file is opened. + + +I tried to open Berkeley DB file, but bsddb produces bsddb.error: (22, 'Invalid argument'). Help! How can I restore my data? +------------------------------------------------------------------------------------------------------------------------------------ + +Don't panic! Your data is probably intact. The most frequent cause +for the error is that you tried to open an earlier Berkeley DB file +with a later version of the Berkeley DB library. + +Many Linux systems now have all three versions of Berkeley DB +available. If you are migrating from version 1 to a newer version use +db_dump185 to dump a plain text version of the database. +If you are migrating from version 2 to version 3 use db2_dump to create +a plain text version of the database. In either case, use db_load to +create a new native database for the latest version installed on your +computer. If you have version 3 of Berkeley DB installed, you should +be able to use db2_load to create a native version 2 database. + +You should move away from Berkeley DB version 1 files because +the hash file code contains known bugs that can corrupt your data. + + +Mathematics and Numerics +================================ + +How do I generate random numbers in Python? +--------------------------------------------------- +The `standard module random `_ implements a random number +generator. Usage is simple:: + + import random + random.random() + +This returns a random floating point number in the range [0, 1). + +There are also many other specialized generators in this module, such +as: + +* ``randrange(a, b)`` chooses an integer in the range [a, b). +* ``uniform(a, b)`` chooses a floating point number in the range [a, b). +* ``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution. + +Some higher-level functions operate on sequences directly, such as: + +* ``choice(S)`` chooses random element from a given sequence +* ``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly + +There's also a ``Random`` class you can instantiate +to create independent multiple random number generators. + Added: sandbox/trunk/faq/programming.rst ============================================================================== --- (empty file) +++ sandbox/trunk/faq/programming.rst Wed Sep 23 02:56:33 2009 @@ -0,0 +1,1782 @@ +==================================== +Programming FAQ +==================================== + +.. contents:: + +General Questions +=========================== + +Is there a source code level debugger with breakpoints, single-stepping, etc.? +------------------------------------------------------------------------------- +Yes. + +The pdb module is a simple but adequate console-mode debugger for +Python. It is part of the standard Python library, and is `documented +in the Library Reference Manual +`_. You can +also write your own debugger by using the code for pdb as an example. + +The IDLE interactive development environment, which is part of the +standard Python distribution (normally available as Tools/scripts/idle), +includes a graphical debugger. There is documentation for the IDLE +debugger at http://www.python.org/idle/doc/idle2.html#Debugger + +PythonWin is a Python IDE that includes a GUI debugger based on pdb. +The Pythonwin debugger colors breakpoints and has quite a few cool +features such as debugging non-Pythonwin programs. Pythonwin +is available as part of the `Python for Windows Extensions +`__ +project and as a part of the ActivePython distribution +(see http://www.activestate.com/Products/ActivePython/index.html). + +`Boa Constructor `_ is an IDE +and GUI builder that uses wxWidgets. It offers visual frame creation +and manipulation, an object +inspector, many views on the source like object browsers, inheritance +hierarchies, doc string generated html documentation, an advanced +debugger, integrated help, and Zope support. + +`Eric3 `_ is an IDE +built on PyQt and the Scintilla editing component. + +Pydb is a version of the standard Python debugger pdb, modified for +use with DDD (Data Display Debugger), a popular graphical debugger +front end. Pydb can be found at http://bashdb.sourceforge.net/pydb/ +and DDD can be found at http://www.gnu.org/software/ddd. + +There are a number of commercial Python IDEs that include graphical +debuggers. They include: + +* Wing IDE (http://wingware.com/) +* Komodo IDE (http://www.activestate.com/Products/Komodo) + + + +Is there a tool to help find bugs or perform static analysis? +---------------------------------------------------------------------- +Yes. + +PyChecker is a static analysis tool that finds bugs in Python source +code and warns about code complexity and style. You can get PyChecker +from http://pychecker.sf.net. + +`Pylint `_ is another tool +that checks if a module satisfies a coding standard, and also makes it +possible to write plug-ins to add a custom feature. In addition to +the bug checking that PyChecker performs, Pylint offers some +additional features such as checking line length, whether variable +names are well-formed according to your coding standard, whether +declared interfaces are fully implemented, and more. +http://www.logilab.org/projects/pylint/documentation provides a full +list of Pylint's features. + + +How can I create a stand-alone binary from a Python script? +------------------------------------------------------------------- +You don't need the ability to compile Python to C code if all you +want is a stand-alone program that users can download and run without +having to install the Python distribution first. There are a number +of tools that determine the set of modules required by a program and +bind these modules together with a Python binary to produce a single +executable. + +One is to use the freeze tool, which is included in the Python +source tree as ``Tools/freeze``. It converts Python byte +code to C arrays; a C compiler you can embed all +your modules into a new program, which is then linked +with the standard Python modules. + +It works by scanning your source recursively for import statements (in +both forms) and looking for the modules in the standard Python path as +well as in the source directory (for built-in modules). It then turns +the bytecode for modules written in Python into C code (array +initializers that can be turned into code objects using the marshal +module) and creates a custom-made config file that only contains those +built-in modules which are actually used in the program. It then +compiles the generated C code and links it with the rest of the Python +interpreter to form a self-contained binary which acts exactly like +your script. + +Obviously, freeze requires a C compiler. There are several other +utilities which don't. One is Thomas Heller's py2exe (Windows only) at + + http://www.py2exe.org/ + +Another is Christian Tismer's `SQFREEZE +`_ which appends the byte code +to a specially-prepared Python interpreter that can find the byte +code in the executable. + +Other tools include Fredrik Lundh's `Squeeze +`_ and Anthony +Tuininga's `cx_Freeze +`_. + + +Are there coding standards or a style guide for Python programs? +------------------------------------------------------------------------ +Yes. The coding style required for standard library modules +is documented as `PEP 8 `_. + + +My program is too slow. How do I speed it up? +---------------------------------------------------- + +That's a tough one, in general. There are many tricks to speed up +Python code; consider rewriting parts in C as a last resort. + +In some cases it's possible to automatically translate Python to C or +x86 assembly language, meaning that you don't have to modify your code +to gain increased speed. + +`Pyrex `_ can +compile a slightly modified version of Python code into a C extension, +and can be used on many different platforms. + +`Psyco `_ is a just-in-time compiler +that translates Python code into x86 assembly language. If you can +use it, Psyco can provide dramatic speedups for critical functions. + +The rest of this answer will discuss various tricks for squeezing a +bit more speed out of Python code. *Never* apply any optimization +tricks unless you know you need them, after profiling has indicated +that a particular function is the heavily executed hot spot in the +code. Optimizations almost always make the code less clear, and you +shouldn't pay the costs of reduced clarity (increased development +time, greater likelihood of bugs) unless the resulting performance +benefit is worth it. + +There is a page on the wiki devoted to `performance tips +`_. + +Guido van Rossum has written up an anecdote related to optimization at +http://www.python.org/doc/essays/list2str.html. + +One thing to notice is that function and (especially) method calls are +rather expensive; if you have designed a purely OO interface with lots +of tiny functions that don't do much more than get or set an instance +variable or call another method, you might consider using a more +direct way such as directly accessing instance variables. Also see the +standard module "profile" (`described in the Library Reference manual +`_) which +makes it possible to find out where your program is spending most of +its time (if you have some patience -- the profiling itself can slow +your program down by an order of magnitude). + +Remember that many standard optimization heuristics you +may know from other programming experience may well apply +to Python. For example it may be faster to send output to output +devices using larger writes rather than smaller ones in order to +reduce the overhead of kernel system calls. Thus CGI scripts +that write all output in "one shot" may be faster than +those that write lots of small pieces of output. + +Also, be sure to use Python's core features where appropriate. +For example, slicing allows programs to chop up +lists and other sequence objects in a single tick of the interpreter's +mainloop using highly optimized C implementations. Thus to +get the same effect as:: + + L2 = [] + for i in range[3]: + L2.append(L1[i]) + +it is much shorter and far faster to use :: + + L2 = list(L1[:3]) # "list" is redundant if L1 is a list. + +Note that the functionally-oriented builtins such as +``map()``, ``zip()``, and friends can be a convenient +accelerator for loops that perform a single task. For example to pair the elements of two +lists together:: + + >>> zip([1,2,3], [4,5,6]) + [(1, 4), (2, 5), (3, 6)] + +or to compute a number of sines:: + + >>> map( math.sin, (1,2,3,4)) + [0.841470984808, 0.909297426826, 0.14112000806, -0.756802495308] + +The operation completes very quickly in such cases. + +Other examples include the ``join()`` and ``split()`` +methods of string objects. For example if s1..s7 are large (10K+) strings then +``"".join([s1,s2,s3,s4,s5,s6,s7])` may be far faster than +the more obvious ``s1+s2+s3+s4+s5+s6+s7``, since the "summation" +will compute many subexpressions, whereas ``join()`` does all the +copying in one pass. For manipulating strings, use +the ``replace()`` method on string objects. Use +regular expressions only when you're not dealing with constant string patterns. +Consider using the string formatting operations +``string % tuple`` and ``string % dictionary``. + +Be sure to use the ``list.sort()`` builtin method to do sorting, and see +the `sorting mini-HOWTO `_ for examples of moderately advanced usage. +``list.sort()`` beats other techniques for sorting in all but the most +extreme circumstances. + +Another common trick is to "push loops into functions or methods." +For example suppose you have a program that runs slowly and you +use the profiler to determine that a Python function ``ff()`` +is being called lots of times. If you notice that ``ff ()``:: + + def ff(x): + ...do something with x computing result... + return result + +tends to be called in loops like:: + + list = map(ff, oldlist) + +or:: + + for x in sequence: + value = ff(x) + ...do something with value... + +then you can often eliminate function call overhead by rewriting +``ff()`` to:: + + def ffseq(seq): + resultseq = [] + for x in seq: + ...do something with x computing result... + resultseq.append(result) + return resultseq + +and rewrite the two examples to ``list = ffseq(oldlist)`` and to:: + + for value in ffseq(sequence): + ...do something with value... + +Single calls to ff(x) translate to ffseq([x])[0] with little +penalty. Of course this technique is not always appropriate +and there are other variants which you can figure out. + +You can gain some performance by explicitly storing the results of +a function or method lookup into a local variable. A loop like:: + + for key in token: + dict[key] = dict.get(key, 0) + 1 + +resolves dict.get every iteration. If the method isn't going to +change, a slightly faster implementation is:: + + dict_get = dict.get # look up the method once + for key in token: + dict[key] = dict_get(key, 0) + 1 + +Default arguments can be used to determine values once, at +compile time instead of at run time. This can only be done for +functions or objects which will not be changed during program +execution, such as replacing :: + + def degree_sin(deg): + return math.sin(deg * math.pi / 180.0) + +with :: + + def degree_sin(deg, factor=math.pi/180.0, sin=math.sin): + return sin(deg * factor) + +Because this trick uses default arguments for terms which should +not be changed, it should only be used when you are not concerned +with presenting a possibly confusing API to your users. + + +Core Language +================== + +How do you set a global variable in a function? +---------------------------------------------------------- +Did you do something like this? :: + + x = 1 # make a global + + def f(): + print x # try to print the global + ... + for j in range(100): + if q > 3: + x = 4 + +Any variable assigned in a function is local to that function. +unless it is specifically declared global. Since a value is bound +to ``x`` as the last statement of the function body, the compiler +assumes that ``x`` is local. Consequently the ``print x`` +attempts to print an uninitialized local variable and will +trigger a ``NameError``. + +The solution is to insert an explicit global declaration at the start +of the function:: + + def f(): + global x + print x # try to print the global + ... + for j in range(100): + if q > 3: + x = 4 + + +In this case, all references to ``x`` are interpreted as references +to the ``x`` from the module namespace. + +What are the rules for local and global variables in Python? +-------------------------------------------------------------------------- + +In Python, variables that are only referenced inside a function are +implicitly global. If a variable is assigned a new value anywhere +within the function's body, it's assumed to be a local. If a variable +is ever assigned a new value inside the function, the variable is +implicitly local, and you need to explicitly declare it as 'global'. + +Though a bit surprising at first, a moment's consideration explains +this. On one hand, requiring ``global`` for assigned variables provides +a bar against unintended side-effects. On the other hand, if ``global`` +was required for all global references, you'd be using ``global`` all the +time. You'd have to declare as global every reference to a +builtin function or to a component of an imported module. This +clutter would defeat the usefulness of the ``global`` declaration for +identifying side-effects. + + +How do I share global variables across modules? +------------------------------------------------ + +The canonical way to share information across modules within a single +program is to create a special module (often called config or cfg). +Just import the config module in all modules of your application; the +module then becomes available as a global name. Because there is only +one instance of each module, any changes made to the module object get +reflected everywhere. For example: + +config.py:: + + x = 0 # Default value of the 'x' configuration setting + +mod.py:: + + import config + config.x = 1 + +main.py:: + + import config + import mod + print config.x + +Note that using a module is also the basis for implementing the +Singleton design pattern, for the same reason. + + +What are the "best practices" for using import in a module? +------------------------------------------------------------------------------ + +In general, don't use ``from modulename import *``. +Doing so clutters the importer's namespace. Some people avoid this idiom +even with the few modules that were designed to be imported in this +manner. Modules designed in this manner include ``Tkinter``, +and ``threading``. + +Import modules at the top of a file. Doing so makes it clear what +other modules your code requires and avoids questions of whether the +module name is in scope. Using one import per line makes it easy to +add and delete module imports, but using multiple imports per line +uses less screen space. + +It's good practice if you import modules in the following order: + +1. standard library modules -- e.g. ``sys``, ``os``, ``getopt``, ``re``) +2. third-party library modules (anything installed in Python's + site-packages directory) -- e.g. mx.DateTime, ZODB, PIL.Image, etc. +3. locally-developed modules + +Never use relative package imports. If you're writing code that's +in the ``package.sub.m1`` module and want to import ``package.sub.m2``, +do not just write ``import m2``, even though it's legal. +Write ``from package.sub import m2`` instead. Relative imports can lead to a +module being initialized twice, leading to confusing bugs. + +It is sometimes necessary to move imports to a function or class to +avoid problems with circular imports. Gordon McMillan says: + + Circular imports are fine where both modules use the "import " + form of import. They fail when the 2nd module wants to grab a name + out of the first ("from module import name") and the import is at + the top level. That's because names in the 1st are not yet available, + because the first module is busy importing the 2nd. + +In this case, if the second module is only used in one function, then the +import can easily be moved into that function. By the time the import +is called, the first module will have finished initializing, and the +second module can do its import. + +It may also be necessary to move imports out of the top level of code +if some of the modules are platform-specific. In that case, it may +not even be possible to import all of the modules at the top of the +file. In this case, importing the correct modules in the +corresponding platform-specific code is a good option. + +Only move imports into a local scope, such as inside a function +definition, if it's necessary to solve a problem such as avoiding a +circular import or are trying to reduce the initialization time of a +module. This technique is especially helpful if many of the imports +are unnecessary depending on how the program executes. You may also +want to move imports into a function if the modules are only ever used +in that function. Note that loading a module the first time may be +expensive because of the one time initialization of the module, but +loading a module multiple times is virtually free, costing only a couple of +dictionary lookups. Even if the module name has gone out of scope, +the module is probably available in sys.modules. + +If only instances of a specific class use a module, then it is +reasonable to import the module in the class's ``__init__`` method and +then assign the module to an instance variable so that the module is +always available (via that instance variable) during the life of the +object. Note that to delay an import until the class is instantiated, +the import must be inside a method. Putting the import inside the +class but outside of any method still causes the import to occur when +the module is initialized. + +How can I pass optional or keyword parameters from one function to another? +------------------------------------------------------------------------------- + +Collect the arguments using the ``*`` and ``**`` specifiers in the function's +parameter list; this gives you the positional arguments as a tuple +and the keyword arguments as a dictionary. You can +then pass these arguments when calling another function by using +``*`` and ``**``:: + + + def f(x, *tup, **kwargs): + ... + kwargs['width'] = '14.3c' + ... + g(x, *tup, **kwargs) + +In the unlikely case that you care about Python +versions older than 2.0, use 'apply':: + + def f(x, *tup, **kwargs): + ... + kwargs['width'] = '14.3c' + ... + apply(g, (x,)+tup, kwargs) + + + +How do I write a function with output parameters (call by reference)? +----------------------------------------------------------------------------- + +Remember that arguments are passed by assignment in Python. Since +assignment just creates references to objects, there's no alias +between an argument name in the caller and callee, and so no +call-by-reference per se. You can achieve the desired effect in a +number of ways. + +1) By returning a tuple of the results:: + + def func2(a, b): + a = 'new-value' # a and b are local names + b = b + 1 # assigned to new objects + return a, b # return new values + + x, y = 'old-value', 99 + x, y = func2(x, y) + print x, y # output: new-value 100 + + This is almost always the clearest solution. + +2) By using global variables. This isn't thread-safe, and is not + recommended. + +3) By passing a mutable (changeable in-place) object:: + + def func1(a): + a[0] = 'new-value' # 'a' references a mutable list + a[1] = a[1] + 1 # changes a shared object + + args = ['old-value', 99] + func1(args) + print args[0], args[1] # output: new-value 100 + +4) By passing in a dictionary that gets mutated:: + + def func3(args): + args['a'] = 'new-value' # args is a mutable dictionary + args['b'] = args['b'] + 1 # change it in-place + + args = {'a':' old-value', 'b': 99} + func3(args) + print args['a'], args['b'] + +5) Or bundle up values in a class instance:: + + class callByRef: + def __init__(self, **args): + for (key, value) in args.items(): + setattr(self, key, value) + + def func4(args): + args.a = 'new-value' # args is a mutable callByRef + args.b = args.b + 1 # change object in-place + + args = callByRef(a='old-value', b=99) + func4(args) + print args.a, args.b + + + There's almost never a good reason to get this complicated. + +Your best choice is to return a tuple containing the multiple results. + + +How do you make a higher order function in Python? +---------------------------------------------------------- +You have two choices: you can use nested scopes +or you can use callable objects. For example, suppose you wanted to +define ``linear(a,b)`` which returns a function ``f(x)`` that computes the +value ``a*x+b``. Using nested scopes:: + + def linear(a, b): + def result(x): + return a * x + b + return result + +Or using a callable object:: + + class linear: + + def __init__(self, a, b): + self.a, self.b = a, b + + def __call__(self, x): + return self.a * x + self.b + +In both cases:: + + taxes = linear(0.3, 2) + +gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``. + +The callable object approach has the disadvantage that it is a bit +slower and results in slightly longer code. However, note that a +collection of callables can share their signature via inheritance:: + + class exponential(linear): + # __init__ inherited + def __call__(self, x): + return self.a * (x ** self.b) + +Object can encapsulate state for several methods:: + + class counter: + + value = 0 + + def set(self, x): + self.value = x + + def up(self): + self.value = self.value + 1 + + def down(self): + self.value = self.value - 1 + + count = counter() + inc, dec, reset = count.up, count.down, count.set + +Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the +same counting variable. + + +How do I copy an object in Python? +------------------------------------------ + +In general, try copy.copy() or copy.deepcopy() for the general case. Not all +objects can be copied, but most can. + +Some objects can be copied more easily. +Dictionaries have a ``copy()`` method:: + + newdict = olddict.copy() + +Sequences can be copied by slicing:: + + new_l = l[:] + + +How can I find the methods or attributes of an object? +-------------------------------------------------------------- +For an instance x of a user-defined class, ``dir(x)`` returns an +alphabetized list of the names containing the instance attributes and +methods and attributes defined by its class. + + +How can my code discover the name of an object? +------------------------------------------------------- + +Generally speaking, it can't, because objects don't really have +names. Essentially, assignment always binds a name to a value; The +same is true of ``def`` and ``class`` statements, but in that case the +value is a callable. Consider the following code:: + + class A: + pass + + B = A + + a = B() + b = a + print b + <__main__.A instance at 016D07CC> + print a + <__main__.A instance at 016D07CC> + + +Arguably the class has a name: even though it is bound to two names +and invoked through the name B the created instance is still reported +as an instance of class A. However, it is impossible to say whether +the instance's name is a or b, since both names are bound to the same +value. + +Generally speaking it should not be necessary for your code to "know +the names" of particular values. Unless you are deliberately writing +introspective programs, this is usually an indication that a change of +approach might be beneficial. + +In comp.lang.python, Fredrik Lundh once gave an excellent analogy in +answer to this question: + + The same way as you get the name of that cat you found on your + porch: the cat (object) itself cannot tell you its name, and it + doesn't really care -- so the only way to find out what it's called + is to ask all your neighbours (namespaces) if it's their cat + (object)... + + ....and don't be surprised if you'll find that it's known by many + names, or no name at all! + + +What's up with the comma operator's precedence? +---------------------------------------------------------------------- + +Comma is not an operator in Python. Consider this session:: + + >>> "a" in "b", "a" + (False, '1') + +Since the comma is not an operator, but a separator between expressions the +above is evaluated as if you had entered:: + + >>> ("a" in "b"), "a" + +not:: + + >>> "a" in ("5", "a") + +The same is true of the various assignment operators (``=``, ``+=`` etc). +They are not truly operators but syntactic delimiters in assignment +statements. + + +Is there an equivalent of C's "?:" ternary operator? +---------------------------------------------------------------------- +Yes, this feature was added in python 2.5. The syntax would be as follows:: + + [on_true] if [expression] else [on_false] + + x, y = 50,25 + + small = x if x < y else y + +For versions previous to 2.5 the answer would be 'No'. + +In many cases you can mimic a?b:c with "a and b or c", but there's a flaw: if b is zero +(or empty, or None -- anything that tests false) then c will be selected +instead. In many cases you can prove by looking at the code that this +can't happen (e.g. because b is a constant or has a type that can never be false), +but in general this can be a problem. + +Tim Peters (who wishes it was Steve Majewski) suggested the following +solution: (a and [b] or [c])[0]. Because [b] is a singleton list it +is never false, so the wrong path is never taken; then applying [0] to +the whole thing gets the b or c that you really wanted. Ugly, but it +gets you there in the rare cases where it is really inconvenient to +rewrite your code using 'if'. + +The best course is usually to write a simple ``if...else`` statement. +Another solution is to implement the "?:" operator as a function:: + + def q(cond, on_true, on_false): + if cond: + if not isfunction(on_true): + return on_true + else: + return apply(on_true) + else: + if not isfunction(on_false): + return on_false + else: + return apply(on_false) + +In most cases you'll pass b and c directly: ``q(a, b, c)``. To avoid +evaluating b or c when they shouldn't be, encapsulate them within a +lambda function, e.g.: ``q(a, lambda: b, lambda: c)``. + +It has been asked *why* Python has no if-then-else expression. +There are several answers: many languages do +just fine without one; it can easily lead to less readable code; +no sufficiently "Pythonic" syntax has been discovered; a search +of the standard library found remarkably few places where using an +if-then-else expression would make the code more understandable. + +In 2002, `PEP 308 `_ was +written proposing several possible syntaxes and the community was +asked to vote on the issue. The vote was inconclusive. Most people +liked one of the syntaxes, but also hated other syntaxes; many votes +implied that people preferred no ternary operator +rather than having a syntax they hated. + + +Is it possible to write obfuscated one-liners in Python? +---------------------------------------------------------------- +Yes. Usually this is done by nesting `lambda` within `lambda`. +See the following three examples, due to Ulf Bartelt:: + + # Primes < 1000 + print filter(None,map(lambda y:y*reduce(lambda x,y:x*y!=0, + map(lambda x,y=y:y%x,range(2,int(pow(y,0.5)+1))),1),range(2,1000))) + + # First 10 Fibonacci numbers + print map(lambda x,f=lambda x,f:(x<=1) or (f(x-1,f)+f(x-2,f)): f(x,f), + range(10)) + + # Mandelbrot set + print (lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y, + Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM, + Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro, + i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or (x*x+y*y + >=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr( + 64+F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i)),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy + ))))(-2.1, 0.7, -1.2, 1.2, 30, 80, 24) + # \___ ___/ \___ ___/ | | |__ lines on screen + # V V | |______ columns on screen + # | | |__________ maximum of "iterations" + # | |_________________ range on y axis + # |____________________________ range on x axis + +Don't try this at home, kids! + + +Numbers and strings +========================== + +How do I specify hexadecimal and octal integers? +-------------------------------------------------------- + +To specify an octal digit, precede the octal value with a zero. For +example, to set the variable "a" to the octal value "10" (8 in +decimal), type:: + + >>> a = 010 + >>> a + 8 + +Hexadecimal is just as easy. Simply precede the hexadecimal number with a +zero, and then a lower or uppercase "x". Hexadecimal digits can be specified +in lower or uppercase. For example, in the Python interpreter:: + + >>> a = 0xa5 + >>> a + 165 + >>> b = 0XB2 + >>> b + 178 + + +Why does -22 / 10 return -3? +---------------------------------- + +It's primarily driven by the desire that ``i % j`` have the same sign as +``j``. If you want that, and also want:: + + i == (i / j) * j + (i % j) + +then integer division has to return the floor. C also requires that identity +to hold, and then compilers that truncate ``i / j`` need to make ``i % j`` have +the same sign as ``i``. + +There are few real use cases for ``i % j`` when ``j`` is negative. When ``j`` +is positive, there are many, and in virtually all of them it's more useful +for ``i % j`` to be ``>= 0``. If the clock says 10 now, what did it say 200 +hours ago? ``-190 % 12 == 2`` is useful; ``-190 % 12 == -10`` is a bug +waiting to bite. + + +How do I convert a string to a number? +---------------------------------------------- + +For integers, use the built-in ``int()`` type constructor, +e.g. int('144') == 144. Similarly, ``float()`` converts to +floating-point, e.g. ``float('144') == 144.0``. + +By default, these interpret the number as decimal, so that +``int('0144') == 144`` and ``int('0x144')`` raises +``ValueError``. ``int(string, base)`` takes the base to convert from +as a second optional argument, so ``int('0x144', 16) == 324``. If the +base is specified as 0, the number is interpreted using Python's +rules: a leading '0' indicates octal, and '0x' indicates a hex number. + +Do not use the built-in function ``eval()`` if all you need is to +convert strings to numbers. ``eval()`` will be significantly slower +and it presents a security risk: someone could pass you a Python +expression that might have unwanted side effects. For example, +someone could pass ``__import__('os').system("rm -rf $HOME")`` which +would erase your home directory. + +``eval()`` also has the effect of interpreting numbers as Python +expressions, so that e.g. eval('09') gives a syntax error because Python +regards numbers starting with '0' as octal (base 8). + + +How do I convert a number to a string? +---------------------------------------------- + +To convert, e.g., the number 144 to the string '144', use the built-in function +``str()``. If you want a hexadecimal or octal representation, use the built-in +functions ``hex()`` or ``oct()``. For fancy formatting, use `the % operator +`_ on +strings, e.g. ``"%04d" % 144`` yields '0144' and ``"%.3f" % (1/3.0)`` yields +'0.333'. See the library reference manual for details. + +How do I modify a string in place? +------------------------------------------ + +You can't, because strings are immutable. If you need an object with +this ability, try converting the string to a list or use the array +module:: + + >>> s = "Hello, world" + >>> a = list(s) + >>> print a + ['H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd'] + >>> a[7:] = list("there!") + >>> ''.join(a) + 'Hello, there!' + + >>> import array + >>> a = array.array('c', s) + >>> print a + array('c', 'Hello, world') + >>> a[0] = 'y' ; print a + array('c', 'yello world') + >>> a.tostring() + 'yello, world' + + + +How do I use strings to call functions/methods? +---------------------------------------------------------- + +There are various techniques. + +* The best is to use a dictionary that maps strings to functions. The + primary advantage of this technique is that the strings do not need + to match the names of the functions. This is also the primary + technique used to emulate a case construct:: + + def a(): + pass + + def b(): + pass + + dispatch = {'go': a, 'stop': b} # Note lack of parens for funcs + + dispatch[get_input()]() # Note trailing parens to call function + +* Use the built-in function ``getattr()``:: + + import foo + getattr(foo, 'bar')() + + Note that getattr() works on any object, including classes, class + instances, modules, and so on. + + This is used in several places in the standard library, like + this:: + + class Foo: + def do_foo(self): + ... + + def do_bar(self): + ... + + f = getattr(foo_instance, 'do_' + opname) + f() + + +* Use ``locals()`` or ``eval()`` to resolve the function name:: + + def myFunc(): + print "hello" + + fname = "myFunc" + + f = locals()[fname] + f() + + f = eval(fname) + f() + + Note: Using ``eval()`` is slow and dangerous. If you don't have absolute control + over the contents of the string, someone could pass a string that + resulted in an arbitrary function being executed. + +Is there an equivalent to Perl's chomp() for removing trailing newlines from strings? +-------------------------------------------------------------------------------------------- + +Starting with Python 2.2, you can use ``S.rstrip("\r\n")`` to remove +all occurences of any line terminator from the end of the string ``S`` +without removing other trailing whitespace. If the string ``S`` +represents more than one line, with several empty lines at the end, +the line terminators for all the blank lines will be removed:: + + >>> lines = ("line 1 \r\n" + ... "\r\n" + ... "\r\n") + >>> lines.rstrip("\n\r") + "line 1 " + +Since this is typically only desired when reading text one line at a +time, using ``S.rstrip()`` this way works well. + +For older versions of Python, There are two partial substitutes: + +- If you want to remove all trailing whitespace, use the ``rstrip()`` + method of string objects. This removes all trailing whitespace, not + just a single newline. + +- Otherwise, if there is only one line in the string ``S``, use + ``S.splitlines()[0]``. + + +Is there a scanf() or sscanf() equivalent? +-------------------------------------------------- +Not as such. + +For simple input parsing, the easiest approach is usually to split the +line into whitespace-delimited words using the ``split()`` method of +string objects and then convert decimal strings to numeric values using +``int()`` or ``float()``. ``split()`` supports an optional "sep" +parameter which is useful if the line uses something other than +whitespace as a separator. + +For more complicated input parsing, regular expressions +more powerful than C's ``sscanf()`` and better suited for the task. + + +What does 'UnicodeError: ASCII [decoding,encoding] error: ordinal not in range(128)' mean? +----------------------------------------------------------------------------------------------------- +This error indicates that your Python installation can handle +only 7-bit ASCII strings. There are a couple ways to fix or +work around the problem. + +If your programs must handle data in arbitrary character set encodings, +the environment the application runs in will generally identify the +encoding of the data it is handing you. You need to convert the input +to Unicode data using that encoding. For example, a program that +handles email or web input will typically find character set encoding +information in Content-Type headers. This can then be used to +properly convert input data to Unicode. Assuming the string referred +to by ``value`` is encoded as UTF-8:: + + value = unicode(value, "utf-8") + +will return a Unicode object. If the data is not correctly encoded as +UTF-8, the above call will raise a ``UnicodeError`` exception. + +If you only want strings converted to Unicode which have non-ASCII +data, you can try converting them first assuming an ASCII encoding, +and then generate Unicode objects if that fails:: + + try: + x = unicode(value, "ascii") + except UnicodeError: + value = unicode(value, "utf-8") + else: + # value was valid ASCII data + pass + +It's possible to set a default encoding in a file called ``sitecustomize.py`` +that's part of the Python library. However, this isn't recommended because changing the Python-wide default encoding may cause third-party extension modules to fail. + +Note that on Windows, there is an encoding known as "mbcs", which uses +an encoding specific to your current locale. In many cases, and +particularly when working with COM, this may be an appropriate default +encoding to use. + + +Sequences (Tuples/Lists) +================================= + +How do I convert between tuples and lists? +------------------------------------------------ + +The function ``tuple(seq)`` converts any sequence (actually, any +iterable) into a tuple with the same items in the same order. + +For example, ``tuple([1, 2, 3])`` yields ``(1, 2, 3)`` and ``tuple('abc')`` +yields ``('a', 'b', 'c')``. If the argument is +a tuple, it does not make a copy but returns the same object, so +it is cheap to call ``tuple()`` when you aren't sure that an object +is already a tuple. + +The function ``list(seq)`` converts any sequence or iterable into a list with +the same items in the same order. +For example, ``list((1, 2, 3))`` yields ``[1, 2, 3]`` and ``list('abc')`` +yields ``['a', 'b', 'c']``. If the argument is a list, +it makes a copy just like ``seq[:]`` would. + +What's a negative index? +-------------------------------------------------------------------- +Python sequences are indexed with positive numbers and +negative numbers. For positive numbers 0 is the first index +1 is the second index and so forth. For negative indices -1 +is the last index and -2 is the penultimate (next to last) index +and so forth. Think of ``seq[-n]`` as the same as ``seq[len(seq)-n]``. + +Using negative indices can be very convenient. For example ``S[:-1]`` +is all of the string except for its last character, which is useful +for removing the trailing newline from a string. + + +How do I iterate over a sequence in reverse order? +--------------------------------------------------------- + +Use the ``reversed`` builtin function, which is new in Python 2.4:: + + for x in reversed(sequence): + ...do something with x... + +This won't touch your original sequence, but build a new copy with +reversed order to iterate over. + +With Python 2.3, you can use an extended slice syntax:: + + for x in sequence[::-1]: + ...do something with x... + + +How do you remove duplicates from a list? +------------------------------------------------- +See the Python Cookbook for a long discussion of many ways to do this: + + http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52560 + +If you don't mind reordering the list, sort it and then scan from the +end of the list, deleting duplicates as you go:: + + if List: + List.sort() + last = List[-1] + for i in range(len(List)-2, -1, -1): + if last == List[i]: + del List[i] + else: + last = List[i] + +If all elements of the list may be used as +dictionary keys (i.e. they are all hashable) +this is often faster :: + + d = {} + for x in List: + d[x] = x + List = d.values() + +In Python 2.5 and later, the following is possible instead:: + + List = list(set(List)) + +This converts the list into a set, thereby removing duplicates, and +then back into a list. + +How do you make an array in Python? +---------------------------------------------------- +Use a list:: + + ["this", 1, "is", "an", "array"] + +Lists are equivalent to C or Pascal arrays in their time complexity; +the primary difference is that a Python list can contain objects of +many different types. + +The ``array`` module also provides methods for creating arrays of +fixed types with compact representations, but they are slower to index +than lists. Also note that the Numeric extensions and others define +array-like structures with various characteristics as well. + +To get Lisp-style linked lists, you can emulate cons cells using tuples:: + + lisp_list = ("like", ("this", ("example", None) ) ) + +If mutability is desired, you could use lists instead of tuples. Here +the analogue of lisp car is ``lisp_list[0]`` and the analogue of cdr +is ``lisp_list[1]``. Only do this if you're sure you really need to, +because it's usually a lot slower than using Python lists. + +How do I create a multidimensional list? +--------------------------------------------------------------- +You probably tried to make a multidimensional array like this:: + + A = [[None] * 2] * 3 + +This looks correct if you print it:: + + >>> A + [[None, None], [None, None], [None, None]] + +But when you assign a value, it shows up in multiple places: + + >>> A[0][0] = 5 + >>> A + [[5, None], [5, None], [5, None]] + +The reason is that replicating a list with ``*`` doesn't create copies, it only creates references to the existing objects. The ``*3`` +creates a list containing 3 references to the same list of length +two. Changes to one row will show in all rows, which is almost certainly +not what you want. + +The suggested approach is to create a list of the desired length first +and then fill in each element with a newly created list:: + + A = [None] * 3 + for i in range(3): + A[i] = [None] * 2 + +This generates a list containing 3 different lists of length two. +You can also use a list comprehension:: + + w, h = 2, 3 + A = [[None] * w for i in range(h)] + +Or, you can use an extension that provides a matrix datatype; `Numeric +Python `_ is the best known. + + +How do I apply a method to a sequence of objects? +-------------------------------------------------------------------------- + +Use a list comprehension:: + + result = [obj.method() for obj in List] + +More generically, you can try the following function:: + + def method_map(objects, method, arguments): + """method_map([a,b], "meth", (1,2)) gives [a.meth(1,2), b.meth(1,2)]""" + nobjects = len(objects) + methods = map(getattr, objects, [method]*nobjects) + return map(apply, methods, [arguments]*nobjects) + + +Dictionaries +================== + +How can I get a dictionary to display its keys in a consistent order? +----------------------------------------------------------------------------- + +You can't. Dictionaries store their keys in an unpredictable order, +so the display order of a dictionary's elements will be similarly +unpredictable. + +This can be frustrating if you want to save a printable version to a +file, make some changes and then compare it with some other printed +dictionary. In this case, use the ``pprint`` module to pretty-print +the dictionary; the items will be presented in order sorted by the key. + +A more complicated solution is to subclass ``UserDict.UserDict`` +to create a ``SortedDict`` class that prints itself in a predictable order. +Here's one simpleminded implementation of such a class:: + + import UserDict, string + + class SortedDict(UserDict.UserDict): + def __repr__(self): + result = [] + append = result.append + keys = self.data.keys() + keys.sort() + for k in keys: + append("%s: %s" % (`k`, `self.data[k]`)) + return "{%s}" % string.join(result, ", ") + + ___str__ = __repr__ + + +This will work for many common situations you might encounter, though +it's far from a perfect solution. The largest flaw is that if some +values in the dictionary are also dictionaries, their values won't be +presented in any particular order. + +I want to do a complicated sort: can you do a Schwartzian Transform in Python? +-------------------------------------------------------------------------------------- + +The technique, attributed to Randal Schwartz of the Perl community, +sorts the elements of a list by a metric which maps each element to +its "sort value". In Python, just use the ``key`` argument for the +``sort()`` method:: + + Isorted = L[:] + Isorted.sort(key=lambda s: int(s[10:15])) + +The ``key`` argument is new in Python 2.4, for older versions this +kind of sorting is quite simple to do with list comprehensions. +To sort a list of strings by their uppercase values:: + + tmp1 = [(x.upper(), x) for x in L] # Schwartzian transform + tmp1.sort() + Usorted = [x[1] for x in tmp1] + +To sort by the integer value of a subfield extending from positions 10-15 +in each string:: + + tmp2 = [(int(s[10:15]), s) for s in L] # Schwartzian transform + tmp2.sort() + Isorted = [x[1] for x in tmp2] + +Note that Isorted may also be computed by :: + + def intfield(s): + return int(s[10:15]) + + def Icmp(s1, s2): + return cmp(intfield(s1), intfield(s2)) + + Isorted = L[:] + Isorted.sort(Icmp) + +but since this method calls ``intfield()`` many times for each element +of L, it is slower than the Schwartzian Transform. + + +How can I sort one list by values from another list? +------------------------------------------------------------ + +Merge them into a single list of tuples, sort the resulting list, +and then pick out the element you want. :: + + >>> list1 = ["what", "I'm", "sorting", "by"] + >>> list2 = ["something", "else", "to", "sort"] + >>> pairs = zip(list1, list2) + >>> pairs + [('what', 'something'), ("I'm", 'else'), ('sorting', 'to'), ('by', 'sort')] + >>> pairs.sort() + >>> result = [ x[1] for x in pairs ] + >>> result + ['else', 'sort', 'to', 'something'] + +An alternative for the last step is:: + + result = [] + for p in pairs: result.append(p[1]) + +If you find this more legible, you might prefer to use this instead of +the final list comprehension. However, it is almost twice as slow for +long lists. Why? First, the ``append()`` operation has to reallocate +memory, and while it uses some tricks to avoid doing that each time, +it still has to do it occasionally, and that costs quite a bit. +Second, the expression "result.append" requires an extra attribute +lookup, and third, there's a speed reduction from having to make +all those function calls. + + +Objects +============= + +What is a class? +------------------------ +A class is the particular object type created by executing +a class statement. Class objects are used as templates to create +instance objects, which embody both the data +(attributes) and code (methods) specific to a datatype. + +A class can be based on one or more other classes, called its base +class(es). It then inherits the attributes and methods of its base +classes. This allows an object model to be successively refined by +inheritance. You might have a generic ``Mailbox`` class that provides +basic accessor methods for a mailbox, and subclasses such as +``MboxMailbox``, ``MaildirMailbox``, ``OutlookMailbox`` that handle +various specific mailbox formats. + + +What is a method? +------------------------- + +A method is a function on some object ``x`` that you normally call as +``x.name(arguments...)``. Methods are defined as functions inside the +class definition:: + + class C: + def meth (self, arg): + return arg * 2 + self.attribute + +What is self? +--------------------- + +Self is merely a conventional name for the first argument of a method. +A method defined as ``meth(self, a, b, c)`` should be called as +``x.meth(a, b, c)`` for some instance ``x`` of the class in which the +definition occurs; the called method will think it is called as +``meth(x, a, b, c)``. + +See also +`Why must 'self' be used explicitly in method definitions and calls? +`_ + +How do I check if an object is an instance of a given class or of a subclass of it? +------------------------------------------------------------------------------------------- + +Use the built-in function ``isinstance(obj, cls)``. You can check if +an object is an instance of any of a number of classes by providing a tuple instead of a single class, e.g. ``isinstance(obj, (class1, class2, ...))``, +and can also check whether an object is one of Python's built-in types, e.g. +``isinstance(obj, str)`` or ``isinstance(obj, (int, long, float, complex))``. + +Note that most programs do not use ``isinstance()`` on user-defined +classes very often. If you are developing the classes yourself, a +more proper object-oriented style is to define methods on the classes +that encapsulate a particular behaviour, instead of checking the +object's class and doing a different thing based on what class it is. +For example, if you have a function that does something:: + + def search (obj): + if isinstance(obj, Mailbox): + # ... code to search a mailbox + elif isinstance(obj, Document): + # ... code to search a document + elif ... + +A better approach is to define a ``search()`` method on all the +classes and just call it:: + + class Mailbox: + def search(self): + # ... code to search a mailbox + + class Document: + def search(self): + # ... code to search a document + + obj.search() + + +What is delegation? +--------------------------- + +Delegation is an object oriented technique (also called a design +pattern). Let's say you have an object ``x`` and want to change the +behaviour of just one of its methods. You can create a new class that +provides a new implementation of the method you're interested in changing +and delegates all other methods to the corresponding method of ``x``. + +Python programmers can easily implement delegation. For example, the +following class implements a class that behaves like a file but +converts all written data to uppercase:: + + class UpperOut: + + def __init__(self, outfile): + self.__outfile = outfile + + def write(self, s): + self.__outfile.write(s.upper()) + + def __getattr__(self, name): + return getattr(self.__outfile, name) + +Here the ``UpperOut`` class redefines the ``write()`` method to convert the +argument string to uppercase before calling the underlying +``self.__outfile.write()`` method. All other methods are delegated to the +underlying ``self.__outfile`` object. The delegation is accomplished via the +``__getattr__`` method; consult `the language reference +`_ +for more information about controlling attribute access. + +Note that for more general cases delegation can get trickier. When +attributes must be set as well as retrieved, the class must define a +``__settattr__`` method too, and it must do so carefully. The basic +implementation of __setattr__ is roughly equivalent to the following:: + + class X: + ... + def __setattr__(self, name, value): + self.__dict__[name] = value + ... + +Most __setattr__ implementations must modify +self.__dict__ to store local state for self without +causing an infinite recursion. + +How do I call a method defined in a base class from a derived class that overrides it? +---------------------------------------------------------------------------------------------- + +If you're using new-style classes, use the built-in ``super()`` function:: + + class Derived(Base): + def meth (self): + super(Derived, self).meth() + +If you're using classic classes: For a class definition such as +``class Derived(Base): ...`` you can call method ``meth()`` defined in +``Base`` (or one of ``Base``'s base classes) as ``Base.meth(self, +arguments...)``. Here, ``Base.meth`` is an unbound method, so you +need to provide the ``self`` argument. + +How can I organize my code to make it easier to change the base class? +------------------------------------------------------------------------------ +You could define an alias for the base class, assign the real base +class to it before your class definition, and use the alias throughout +your class. Then all you have to change is the value assigned to the +alias. Incidentally, this trick is also handy if you want to decide +dynamically (e.g. depending on availability of resources) which base +class to use. Example:: + + BaseAlias = + + class Derived(BaseAlias): + def meth(self): + BaseAlias.meth(self) + ... + + +How do I create static class data and static class methods? +------------------------------------------------------------------- + +Static data (in the sense of C++ or Java) is easy; static methods +(again in the sense of C++ or Java) are not supported directly. + +For static data, simply define a class attribute. To assign a new +value to the attribute, you have to explicitly use the class name in +the assignment:: + + class C: + count = 0 # number of times C.__init__ called + + def __init__(self): + C.count = C.count + 1 + + def getcount(self): + return C.count # or return self.count + +``c.count`` also refers to ``C.count`` for any ``c`` such that +``isinstance(c, C)`` holds, unless overridden by ``c`` itself or by some +class on the base-class search path from ``c.__class__`` back to ``C``. + +Caution: within a method of C, an assignment like ``self.count = 42`` +creates a new and unrelated instance vrbl named "count" in ``self``'s own dict. +Rebinding of a class-static data name must always specify the class +whether inside a method or not:: + + C.count = 314 + + +Static methods are possible since Python 2.2:: + + class C: + def static(arg1, arg2, arg3): + # No 'self' parameter! + ... + static = staticmethod(static) + +With Python 2.4's decorators, this can also be written as :: + + class C: + @staticmethod + def static(arg1, arg2, arg3): + # No 'self' parameter! + ... + +However, a far more straightforward way to get the effect of a static +method is via a simple module-level function:: + + def getcount(): + return C.count + +If your code is structured so as to define one class (or tightly +related class hierarchy) per module, this supplies the desired +encapsulation. + + +How can I overload constructors (or methods) in Python? +--------------------------------------------------------------- +This answer actually applies to all methods, but the question +usually comes up first in the context of constructors. + +In C++ you'd write :: + + class C { + C() { cout << "No arguments\n"; } + C(int i) { cout << "Argument is " << i << "\n"; } + } + +in Python you have to write a single constructor that catches all +cases using default arguments. For example:: + + class C: + def __init__(self, i=None): + if i is None: + print "No arguments" + else: + print "Argument is", i + +This is not entirely equivalent, but close enough in practice. + +You could also try a variable-length argument list, e.g. :: + + def __init__(self, *args): + .... + +The same approach works for all method definitions. + + +I try to use __spam and I get an error about _SomeClassName__spam. +-------------------------------------------------------------------------- +Variables with double leading underscore are "mangled" to provide a +simple but effective way to define class private variables. 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 any leading underscores stripped. + +This doesn't guarantee privacy: an outside user can still deliberately +access the "_classname__spam" attribute, and private values are visible +in the object's ``__dict__``. Many Python programmers never bother to use +private variable names at all. + + +My class defines __del__ but it is not called when I delete the object. +------------------------------------------------------------------------------- +There are several possible reasons for this. + +The del statement does not necessarily call __del__ -- it simply +decrements the object's reference count, and if this reaches zero +__del__ is called. + +If your data structures contain circular links (e.g. a tree where each +child has a parent reference and each parent has a list of children) +the reference counts will never go back to zero. Once in a while +Python runs an algorithm to detect such cycles, but the garbage +collector might run some time after the last reference to your data +structure vanishes, so your __del__ method may be called at an +inconvenient and random time. This is inconvenient if you're trying to +reproduce a problem. Worse, the order in which object's __del__ +methods are executed is arbitrary. You can run ``gc.collect()`` to +force a collection, but there *are* pathological cases where objects will +never be collected. + +Despite the cycle collector, it's still a good idea to define an +explicit ``close()`` method on objects to be called whenever you're +done with them. The ``close()`` method can then remove attributes +that refer to subobjecs. Don't call ``__del__`` directly -- +``__del__`` should call ``close()`` and ``close()`` should make sure +that it can be called more than once for the same object. + +Another way to avoid cyclical references is to use the "weakref" +module, which allows you to point to objects without incrementing +their reference count. Tree data structures, for instance, should use +weak references for their parent and sibling references (if they need +them!). + +If the object has ever been a local variable in a function that caught +an expression in an except clause, chances are that a reference to the +object still exists in that function's stack frame as contained in the +stack trace. Normally, calling ``sys.exc_clear()`` will take care of +this by clearing the last recorded exception. + +Finally, if your __del__ method raises an exception, a warning message +is printed to sys.stderr. + + +How do I get a list of all instances of a given class? +-------------------------------------------------------------- + +Python does not keep track of all instances of a class (or of a +built-in type). You can program the class's constructor to keep track +of all instances by keeping a list of weak references to each +instance. + + +Modules +============= +How do I create a .pyc file? +------------------------------------- + +When a module is imported for the first time (or when the source is +more recent than the current compiled file) a ``.pyc`` file containing +the compiled code should be created in the same directory as the +``.py`` file. + +One reason that a ``.pyc`` file may not be created is permissions +problems with the directory. This can happen, for example, if you +develop as one user but run as another, such as if you are testing +with a web server. Creation of a .pyc file is automatic if you're +importing a module and Python has the ability (permissions, free +space, etc...) to write the compiled module back to the directory. + +Running Python on a top level script is not considered an import and +no ``.pyc`` will be created. For example, if you have a top-level +module ``abc.py`` that imports another module ``xyz.py``, when you run +abc, ``xyz.pyc`` will be created since xyz is imported, but no +``abc.pyc`` file will be created since ``abc.py`` isn't being +imported. + +If you need to create abc.pyc -- that is, to create a .pyc file for a +module that is not imported -- you can, using the py_compile and +compileall modules. + +The ``py_compile`` module can manually compile any module. One way is +to use the ``compile()`` function in that module interactively:: + + >>> import py_compile + >>> py_compile.compile('abc.py') + +This will write the ``.pyc`` to the same location as ``abc.py`` (or +you can override that with the optional parameter ``cfile``). + +You can also automatically compile all files in a directory or +directories using the ``compileall`` module. +You can do it from the shell prompt by running ``compileall.py`` +and providing the path of a directory containing Python files to compile:: + + python compileall.py . + + + +How do I find the current module name? +--------------------------------------------- + +A module can find out its own module name by looking at the predefined +global variable ``__name__``. If this has the value '__main__', the +program is running as a script. Many modules that are usually used by +importing them also provide a command-line interface or a self-test, +and only execute this code after checking ``__name__``:: + + def main(): + print 'Running test...' + ... + + if __name__ == '__main__': + main() + + +How can I have modules that mutually import each other? +--------------------------------------------------------------- +Suppose you have the following modules: + +foo.py:: + + from bar import bar_var + foo_var=1 + +bar.py:: + + from foo import foo_var + bar_var=2 + +The problem is that the interpreter will perform the following steps: + +* main imports foo +* Empty globals for foo are created +* foo is compiled and starts executing +* foo imports bar +* Empty globals for bar are created +* bar is compiled and starts executing +* bar imports foo (which is a no-op since there already is a module named foo) +* bar.foo_var = foo.foo_var + +The last step fails, because Python isn't done with interpreting ``foo`` +yet and the global symbol dictionary for ``foo`` is still empty. + +The same thing happens when you use ``import foo``, and then try to +access ``foo.foo_var`` in global code. + +There are (at least) three possible workarounds for this problem. + +Guido van Rossum recommends avoiding all uses of ``from +import ...``, and placing all code inside functions. Initializations +of global variables and class variables should use constants or +built-in functions only. This means everything from an imported +module is referenced as ``.``. + +Jim Roskind suggests performing steps in the following order in each +module: + +* exports (globals, functions, and classes that don't need imported base classes) +* ``import`` statements +* active code (including globals that are initialized from imported values). + +van Rossum doesn't like this approach much because the imports +appear in a strange place, but it does work. + +Matthias Urlichs recommends restructuring your code so that the +recursive import is not necessary in the first place. + +These solutions are not mutually exclusive. + + +__import__('x.y.z') returns ; how do I get z? +----------------------------------------------------------------------- +Try:: + + __import__('x.y.z').y.z + +For more realistic situations, you may have to do something like :: + + m = __import__(s) + for i in s.split(".")[1:]: + m = getattr(m, i) + + + +When I edit an imported module and reimport it, the changes don't show up. Why does this happen? +-------------------------------------------------------------------------------------------------------------------------------------------- + +For reasons of efficiency as well as consistency, Python only reads +the module file on the first time a module is imported. If it didn't, +in a program consisting of many modules where each one imports the +same basic module, the basic module would be parsed and re-parsed many +times. To force rereading of a changed module, do this:: + + import modname + reload(modname) + +Warning: this technique is not 100% fool-proof. In particular, +modules containing statements like :: + + from modname import some_objects + +will continue to work with the old version of the imported objects. +If the module contains class definitions, existing class instances +will *not* be updated to use the new class definition. This can +result in the following paradoxical behaviour:: + + >>> import cls + >>> c = cls.C() # Create an instance of C + >>> reload(cls) + + >>> isinstance(c, cls.C) # isinstance is false?!? + False + +The nature of the problem is made clear if you print out the class objects: + + >>> c.__class__ + + >>> cls.C + + Added: sandbox/trunk/faq/windows.rst ============================================================================== --- (empty file) +++ sandbox/trunk/faq/windows.rst Wed Sep 23 02:56:33 2009 @@ -0,0 +1,594 @@ + +==================================== +Python Windows FAQ +==================================== + +.. contents:: + +How do I run a Python program under Windows? +---------------------------------------------------- + +This is not necessarily a straightforward question. If you are already +familiar with running programs from the Windows command line then everything +will seem obvious; otherwise, you might need a little more guidance. There are +also differences between Windows 95, 98, NT, ME, 2000 and XP which can add to +the confusion. + + +.. sidebar:: |Python Development on XP|_ + :subtitle: `Python Development on XP`_ + + This series of screencasts aims to get you up and running with Python on + Windows XP. The knowledge is distilled into 1.5 hours and will get you up + and running with the right Python distribution, coding in your choice of + IDE, and debugging and writing solid code with unit-tests. + +.. |Python Development on XP| image:: /images/python-video-icon.png +.. _`Python Development on XP`: http://www.showmedo.com/videos/series?name=pythonOzsvaldPyNewbieSeries + + +Unless you use some sort of integrated development environment, you will end +up *typing* Windows commands into what is variously referred to as a "DOS +window" or "Command prompt window". Usually you can create such a window from +your Start menu; under Windows 2000 the menu selection is "Start | Programs | +Accessories | Command Prompt". You should be able to recognize when you have +started such a window because you will see a Windows "command prompt", which +usually looks like this:: + + C:\> + +The letter may be different, and there might be other things after it, so you +might just as easily see something like:: + + D:\Steve\Projects\Python> + +depending on how your computer has been set up and what else you have recently +done with it. Once you have started such a window, you are well on the way to +running Python programs. + +You need to realize that your Python scripts have to be processed by another +program called the Python interpreter. The interpreter reads your script, +compiles it into bytecodes, and then executes the bytecodes to run your +program. So, how do you arrange for the interpreter to handle your Python? + +First, you need to make sure that your command window recognises the word +"python" as an instruction to start the interpreter. If you have opened a +command window, you should try entering the command ``python`` and hitting +return. You should then see something like:: + + Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32 + Type "help", "copyright", "credits" or "license" for more information. + >>> + +You have started the interpreter in "interactive mode". That means you can +enter Python statements or expressions interactively and have them executed or +evaluated while you wait. This is one of Python's strongest features. Check it +by entering a few expressions of your choice and seeing the results:: + + >>> print "Hello" + Hello + >>> "Hello" * 3 + HelloHelloHello + +Many people use the interactive mode as a convenient yet highly programmable +calculator. When you want to end your interactive Python session, hold the +Ctrl key down while you enter a Z, then hit the "Enter" key to get back to +your Windows command prompt. + +You may also find that you have a Start-menu entry such as "Start | Programs | +Python 2.2 | Python (command line)" that results in you seeing the ``>>>`` +prompt in a new window. If so, the window will disappear after you enter the +Ctrl-Z character; Windows is running a single "python" command in the window, +and closes it when you terminate the interpreter. + +If the ``python`` command, instead of displaying the interpreter prompt +``>>>``, gives you a message like:: + + 'python' is not recognized as an internal or external command, + operable program or batch file. + + +.. sidebar:: |Adding Python to DOS Path|_ + :subtitle: `Adding Python to DOS Path`_ + + Python is not added to the DOS path by default. This screencast will walk + you through the steps to add the correct entry to the `System Path`, + allowing Python to be executed from the command-line by all users. + +.. |Adding Python to DOS Path| image:: /images/python-video-icon.png +.. _`Adding Python to DOS Path`: http://showmedo.com/videos/video?name=960000&fromSeriesID=96 + + +or:: + + Bad command or filename + +then you need to make sure that your computer knows where to find the Python +interpreter. To do this you will have to modify a setting called PATH, which +is a list of directories where Windows will look for programs. + +You should arrange for Python's installation directory to be added to the PATH +of every command window as it starts. If you installed Python fairly recently +then the command :: + + dir C:\py* + +will probably tell you where it is installed; the usual location is something +like ``C:\Python23``. Otherwise you will be reduced to a search of your whole +disk ... use "Tools | Find" or hit the "Search" button and look for +"python.exe". Supposing you discover that Python is installed in the +``C:\Python23`` directory (the default at the time of writing), you should +make sure that entering the command :: + + c:\Python23\python + +starts up the interpreter as above (and don't forget you'll need a "CTRL-Z" +and an "Enter" to get out of it). Once you have verified the directory, you +need to add it to the start-up routines your computer goes through. For older +versions of Windows the easiest way to do this is to edit the +``C:\AUTOEXEC.BAT`` file. You would want to add a line like the following to +``AUTOEXEC.BAT``:: + + PATH C:\Python23;%PATH% + +For Windows NT, 2000 and (I assume) XP, you will need to add a string such as +:: + + ;C:\Python23 + +to the current setting for the PATH environment variable, which you will find +in the properties window of "My Computer" under the "Advanced" tab. Note that +if you have sufficient privilege you might get a choice of installing the +settings either for the Current User or for System. The latter is preferred if +you want everybody to be able to run Python on the machine. + +If you aren't confident doing any of these manipulations yourself, ask for +help! At this stage you may want to reboot your system to make absolutely +sure the new setting has taken effect. You probably won't need to reboot for +Windows NT, XP or 2000. You can also avoid it in earlier versions by editing +the file ``C:\WINDOWS\COMMAND\CMDINIT.BAT`` instead of ``AUTOEXEC.BAT``. + +You should now be able to start a new command window, enter ``python`` at the +``C:>`` (or whatever) prompt, and see the ``>>>`` prompt that indicates the +Python interpreter is reading interactive commands. + +Let's suppose you have a program called ``pytest.py`` in directory +``C:\Steve\Projects\Python``. A session to run that program might look like +this:: + + C:\> cd \Steve\Projects\Python + C:\Steve\Projects\Python> python pytest.py + +Because you added a file name to the command to start the interpreter, when it +starts up it reads the Python script in the named file, compiles it, executes +it, and terminates, so you see another ``C:\>`` prompt. You might also have +entered :: + + C:\> python \Steve\Projects\Python\pytest.py + +if you hadn't wanted to change your current directory. + +Under NT, 2000 and XP you may well find that the installation process has also +arranged that the command ``pytest.py`` (or, if the file isn't in the current +directory, ``C:\Steve\Projects\Python\pytest.py``) will automatically +recognize the ".py" extension and run the Python interpreter on the named +file. Using this feature is fine, but *some* versions of Windows have bugs +which mean that this form isn't exactly equivalent to using the interpreter +explicitly, so be careful. + +The important things to remember are: + +1. Start Python from the Start Menu, or make sure the PATH is set correctly so + Windows can find the Python interpreter. :: + + python + + should give you a '>>>" prompt from the Python interpreter. Don't forget + the CTRL-Z and ENTER to terminate the interpreter (and, if you started the + window from the Start Menu, make the window disappear). + +2. Once this works, you run programs with commands:: + + python {program-file} + +3. When you know the commands to use you can build Windows shortcuts to run + the Python interpreter on any of your scripts, naming particular working + directories, and adding them to your menus. Take a look at :: + + python --help + + if your needs are complex. + +4. Interactive mode (where you see the ``>>>`` prompt) is best used for + checking that individual statements and expressions do what you think they + will, and for developing code by experiment. + + +How do I make python scripts executable? +---------------------------------------------- + +On Windows 2000, the standard Python installer already associates the .py +extension with a file type (Python.File) and gives that file type an open +command that runs the interpreter (D:\\Program Files\\Python\\python.exe "%1" +%*). This is enough to make scripts executable from the command prompt as +'foo.py'. If you'd rather be able to execute the script by simple typing +'foo' with no extension you need to add .py to the PATHEXT environment +variable. + +On Windows NT, the steps taken by the installer as described above allow you +to run a script with 'foo.py', but a longtime bug in the NT command processor +prevents you from redirecting the input or output of any script executed in +this way. This is often important. + +The incantation for making a Python script executable under WinNT is to give +the file an extension of .cmd and add the following as the first line:: + + @setlocal enableextensions & python -x %~f0 %* & goto :EOF + + +Why does Python sometimes take so long to start? +------------------------------------------------------- + +Usually Python starts very quickly on Windows, but occasionally there are bug +reports that Python suddenly begins to take a long time to start up. This is +made even more puzzling because Python will work fine on other Windows systems +which appear to be configured identically. + +The problem may be caused by a misconfiguration of virus checking software on +the problem machine. Some virus scanners have been known to introduce startup +overhead of two orders of magnitude when the scanner is configured to monitor +all reads from the filesystem. Try checking the configuration of virus +scanning software on your systems to ensure that they are indeed configured +identically. McAfee, when configured to scan all file system read activity, +is a particular offender. + + +Where is Freeze for Windows? +------------------------------------ + +"Freeze" is a program that allows you to ship a Python program as a single +stand-alone executable file. It is *not* a compiler; your programs don't run +any faster, but they are more easily distributable, at least to platforms with +the same OS and CPU. Read the README file of the freeze program for more +disclaimers. + +You can use freeze on Windows, but you must download the source tree (see +http://www.python.org/download/source). The freeze program is in the +``Tools\freeze`` subdirectory of the source tree. + +You need the Microsoft VC++ compiler, and you probably need to build Python. +The required project files are in the PCbuild directory. + + +Is a ``*.pyd`` file the same as a DLL? +------------------------------------------ + +Yes, .pyd files are dll's, but there are a few differences. If you have a DLL +named ``foo.pyd``, then it must have a function initfoo(). You can then write +Python "import foo", and Python will search for foo.pyd (as well as foo.py, +foo.pyc) and if it finds it, will attempt to call initfoo() to initialize it. +You do not link your .exe with foo.lib, as that would cause Windows to require +the DLL to be present. + +Note that the search path for foo.pyd is PYTHONPATH, not the same as the path +that Windows uses to search for foo.dll. Also, foo.pyd need not be present to +run your program, whereas if you linked your program with a dll, the dll is +required. Of course, foo.pyd is required if you want to say "import foo". In +a DLL, linkage is declared in the source code with __declspec(dllexport). In +a .pyd, linkage is defined in a list of available functions. + +How can I embed Python into a Windows application? +---------------------------------------------------------- + +Embedding the Python interpreter in a Windows app can be summarized as +follows: + +1. Do _not_ build Python into your .exe file directly. On Windows, Python + must be a DLL to handle importing modules that are themselves DLL's. (This + is the first key undocumented fact.) Instead, link to pythonNN.dll; it is + typically installed in ``C:\Windows\System``. NN is the Python version, a + number such as "23" for Python 2.3. + + You can link to Python statically or dynamically. Linking statically means + linking against pythonNN.lib, while dynamically linking means linking + against pythonNN.dll. The drawback to dynamic linking is that your app + won't run if pythonNN.dll does not exist on your system. (General note: + pythonNN.lib is the so-called "import lib" corresponding to python.dll. It + merely defines symbols for the linker.) + + Linking dynamically greatly simplifies link options; everything happens at + run time. Your code must load pythonNN.dll using the Windows + LoadLibraryEx() routine. The code must also use access routines and data + in pythonNN.dll (that is, Python's C API's) using pointers obtained by the + Windows GetProcAddress() routine. Macros can make using these pointers + transparent to any C code that calls routines in Python's C API. + + Borland note: convert pythonNN.lib to OMF format using Coff2Omf.exe first. + +2. If you use SWIG, it is easy to create a Python "extension module" that will + make the app's data and methods available to Python. SWIG will handle just + about all the grungy details for you. The result is C code that you link + *into* your .exe file (!) You do _not_ have to create a DLL file, and this + also simplifies linking. + +3. SWIG will create an init function (a C function) whose name depends on the + name of the extension module. For example, if the name of the module is + leo, the init function will be called initleo(). If you use SWIG shadow + classes, as you should, the init function will be called initleoc(). This + initializes a mostly hidden helper class used by the shadow class. + + The reason you can link the C code in step 2 into your .exe file is that + calling the initialization function is equivalent to importing the module + into Python! (This is the second key undocumented fact.) + +4. In short, you can use the following code to initialize the Python + interpreter with your extension module. :: + + #include "python.h" + ... + Py_Initialize(); // Initialize Python. + initmyAppc(); // Initialize (import) the helper class. + PyRun_SimpleString("import myApp") ; // Import the shadow class. + +5. There are two problems with Python's C API which will become apparent if + you use a compiler other than MSVC, the compiler used to build + pythonNN.dll. + + Problem 1: The so-called "Very High Level" functions that take FILE * + arguments will not work in a multi-compiler environment because each + compiler's notion of a struct FILE will be different. From an + implementation standpoint these are very _low_ level functions. + + Problem 2: SWIG generates the following code when generating wrappers to + void functions:: + + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; + + Alas, Py_None is a macro that expands to a reference to a complex data + structure called _Py_NoneStruct inside pythonNN.dll. Again, this code will + fail in a mult-compiler environment. Replace such code by:: + + return Py_BuildValue(""); + + It may be possible to use SWIG's %typemap command to make the change + automatically, though I have not been able to get this to work (I'm a + complete SWIG newbie). + +6. Using a Python shell script to put up a Python interpreter window from + inside your Windows app is not a good idea; the resulting window will be + independent of your app's windowing system. Rather, you (or the + wxPythonWindow class) should create a "native" interpreter window. It is + easy to connect that window to the Python interpreter. You can redirect + Python's i/o to _any_ object that supports read and write, so all you need + is a Python object (defined in your extension module) that contains read() + and write() methods. + +How do I use Python for CGI? +------------------------------------------------------- + +On the Microsoft IIS server or on the Win95 MS Personal Web Server you set up +Python in the same way that you would set up any other scripting engine. + +Run regedt32 and go to:: + + HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ScriptMap + +and enter the following line (making any specific changes that your system may need):: + + .py :REG_SZ: c:\\python.exe -u %s %s + +This line will allow you to call your script with a simple reference like: +http://yourserver/scripts/yourscript.py provided "scripts" is an "executable" +directory for your server (which it usually is by default). The "-u" flag +specifies unbuffered and binary mode for stdin - needed when working with +binary data. + +In addition, it is recommended that using ".py" may not be a good idea for the +file extensions when used in this context (you might want to reserve ``*.py`` +for support modules and use ``*.cgi`` or ``*.cgp`` for "main program" +scripts). + +In order to set up Internet Information Services 5 to use Python for CGI +processing, please see the following links: + + http://www.e-coli.net/pyiis_server.html (for Win2k Server) + http://www.e-coli.net/pyiis.html (for Win2k pro) + +Configuring Apache is much simpler. In the Apache configuration file +``httpd.conf``, add the following line at the end of the file:: + + ScriptInterpreterSource Registry + +Then, give your Python CGI-scripts the extension .py and put them in the +cgi-bin directory. + + +How do I keep editors from inserting tabs into my Python source? +------------------------------------------------------------------ + +The FAQ does not recommend using tabs, and `the Python style guide +`_ recommends 4 spaces for +distributed Python code; this is also the Emacs python-mode default. + +Under any editor, mixing tabs and spaces is a bad idea. MSVC is no different +in this respect, and is easily configured to use spaces: Take Tools -> Options +-> Tabs, and for file type "Default" set "Tab size" and "Indent size" to 4, +and select the "Insert spaces" radio button. + +If you suspect mixed tabs and spaces are causing problems in leading +whitespace, run Python with the -t switch or run ``Tools/Scripts/tabnanny.py`` +to check a directory tree in batch mode. + + +How do I check for a keypress without blocking? +---------------------------------------------------- + +Use the msvcrt module. This is a standard Windows-specific extension module. +It defines a function kbhit() which checks whether a keyboard hit is present, +and getch() which gets one character without echoing it. + + +How do I emulate os.kill() in Windows? +--------------------------------------------- + +Use win32api:: + + def kill(pid): + """kill function for Win32""" + import win32api + handle = win32api.OpenProcess(1, 0, pid) + return (0 != win32api.TerminateProcess(handle, 0)) + + +Why does os.path.isdir() fail on NT shared directories? +-------------------------------------------------------------- + +The solution appears to be always append the "\\" on the end of shared +drives. :: + + >>> import os + >>> os.path.isdir( '\\\\rorschach\\public') + 0 + >>> os.path.isdir( '\\\\rorschach\\public\\') + 1 + +It helps to think of share points as being like drive letters. Example:: + + k: is not a directory + k:\ is a directory + k:\media is a directory + k:\media\ is not a directory + +The same rules apply if you substitute "k:" with "\\conky\foo":: + + \\conky\foo is not a directory + \\conky\foo\ is a directory + \\conky\foo\media is a directory + \\conky\foo\media\ is not a directory + + +cgi.py (or other CGI programming) doesn't work sometimes on NT or win95! +----------------------------------------------------------------------------- + +Be sure you have the latest python.exe, that you are using python.exe rather +than a GUI version of Python and that you have configured the server to +execute :: + + "...\python.exe -u ..." + +for the CGI execution. The -u (unbuffered) option on NT and Win95 prevents +the interpreter from altering newlines in the standard input and output. +Without it post/multipart requests will seem to have the wrong length and +binary (e.g. GIF) responses may get garbled (resulting in broken images, PDF +files, and other binary downloads failing). + +Why doesn't os.popen() work in PythonWin on NT? +------------------------------------------------------- + +The reason that os.popen() doesn't work from within PythonWin is due to a bug +in Microsoft's C Runtime Library (CRT). The CRT assumes you have a Win32 +console attached to the process. + +You should use the win32pipe module's popen() instead which doesn't depend on +having an attached Win32 console. + +Example:: + + import win32pipe + f = win32pipe.popen('dir /c c:\\') + print f.readlines() + f.close() + + +Why doesn't os.popen()/win32pipe.popen() work on Win9x? +--------------------------------------------------------------- + +There is a bug in Win9x that prevents os.popen/win32pipe.popen* from +working. The good news is there is a way to work around this problem. The +Microsoft Knowledge Base article that you need to lookup is: Q150956. You will +find links to the knowledge base at: http://www.microsoft.com/kb. + + +PyRun_SimpleFile() crashes on Windows but not on Unix; why? +------------------------------------------------------------ + +This is very sensitive to the compiler vendor, version and (perhaps) even +options. If the FILE* structure in your embedding program isn't the same as +is assumed by the Python interpreter it won't work. + +The Python 1.5.* DLLs (``python15.dll``) are all compiled with MS VC++ 5.0 and +with multithreading-DLL options (``/MD``). + +If you can't change compilers or flags, try using Py_RunSimpleString(). A +trick to get it to run an arbitrary file is to construct a call to execfile() +with the name of your file as argument. + +Also note that you can not mix-and-match Debug and Release versions. If you +wish to use the Debug Multithreaded DLL, then your module _must_ have an "_d" +appended to the base name. + + +Importing _tkinter fails on Windows 95/98: why? +------------------------------------------------ + +Sometimes, the import of _tkinter fails on Windows 95 or 98, complaining with +a message like the following:: + + ImportError: DLL load failed: One of the library files needed + to run this application cannot be found. + +It could be that you haven't installed Tcl/Tk, but if you did install Tcl/Tk, +and the Wish application works correctly, the problem may be that its +installer didn't manage to edit the autoexec.bat file correctly. It tries to +add a statement that changes the PATH environment variable to include the +Tcl/Tk 'bin' subdirectory, but sometimes this edit doesn't quite work. +Opening it with notepad usually reveals what the problem is. + +(One additional hint, noted by David Szafranski: you can't use long filenames +here; e.g. use ``C:\PROGRA~1\Tcl\bin`` instead of ``C:\Program +Files\Tcl\bin``.) + +How do I extract the downloaded documentation on Windows? +------------------------------------------------------------ + +Sometimes, when you download the documentation package to a Windows machine +using a web browser, the file extension of the saved file ends up being .EXE. +This is a mistake; the extension should be .TGZ. + +Simply rename the downloaded file to have the .TGZ extension, and WinZip will +be able to handle it. (If your copy of WinZip doesn't, get a newer one from +http://www.winzip.com.) + +Missing cw3215mt.dll (or missing cw3215.dll) +---------------------------------------------------- + +Sometimes, when using Tkinter on Windows, you get an error that cw3215mt.dll +or cw3215.dll is missing. + +Cause: you have an old Tcl/Tk DLL built with cygwin in your path (probably +``C:\Windows``). You must use the Tcl/Tk DLLs from the standard Tcl/Tk +installation (Python 1.5.2 comes with one). + +Warning about CTL3D32 version from installer +---------------------------------------------------- + +The Python installer issues a warning like this:: + + This version uses ``CTL3D32.DLL`` which is not the correct version. + This version is used for windows NT applications only. + +[Tim Peters] This is a Microsoft DLL, and a notorious source of problems. The +message means what it says: you have the wrong version of this DLL for your +operating system. The Python installation did not cause this -- something +else you installed previous to this overwrote the DLL that came with your OS +(probably older shareware of some sort, but there's no way to tell now). If +you search for "CTL3D32" using any search engine (AltaVista, for example), +you'll find hundreds and hundreds of web pages complaining about the same +problem with all sorts of installation programs. They'll point you to ways to +get the correct version reinstalled on your system (since Python doesn't cause +this, we can't fix it). + +David A Burton has written a little program to fix this. Go to +http://www.burtonsys.com/download.html and click on "ctl3dfix.zip" From python-checkins at python.org Wed Sep 23 03:11:12 2009 From: python-checkins at python.org (andrew.kuchling) Date: Wed, 23 Sep 2009 01:11:12 -0000 Subject: [Python-checkins] r75035 - in sandbox/trunk/faq: design.rst general.rst index.rst Message-ID: Author: andrew.kuchling Date: Wed Sep 23 03:11:11 2009 New Revision: 75035 Log: Move design issues into a separate FAQ Added: sandbox/trunk/faq/design.rst Modified: sandbox/trunk/faq/general.rst sandbox/trunk/faq/index.rst Added: sandbox/trunk/faq/design.rst ============================================================================== --- (empty file) +++ sandbox/trunk/faq/design.rst Wed Sep 23 03:11:11 2009 @@ -0,0 +1,971 @@ + +==================================== +Design and History FAQ +==================================== + + +Why does Python use indentation for grouping of statements? +----------------------------------------------------------- + +Guido van Rossum believes that using indentation for grouping is extremely elegant +and contributes a lot to the clarity of the average Python program. Most +people learn to love this feature after awhile. + +Since there are no begin/end brackets there cannot be a disagreement between +grouping perceived by the parser and the human reader. Occasionally C +programmers will encounter a fragment of code like this:: + + if (x <= y) + x++; + y--; + z++; + +Only the ``x++`` statement is executed if the condition is true, but +the indentation leads you to believe otherwise. +Even experienced C programmers will sometimes +stare at it a long time wondering why ``y`` is being decremented even for +``x > y``. + +Because there are no begin/end brackets, Python is much less prone to +coding-style conflicts. In C there are many different ways to place the +braces. If you're used to reading +and writing code that uses one style, you will feel at least slightly +uneasy when reading (or being required to write) another style. + +Many coding styles place begin/end brackets on a line by themself. This +makes programs considerably longer and wastes valuable screen space, making +it harder to get a good overview of a program. Ideally, a function should +fit on one screen (say, 20-30 lines). 20 lines of Python can do +a lot more work than 20 lines of C. This is not solely due to the lack of +begin/end brackets -- the lack of declarations and the high-level data types +are also responsible -- but the indentation-based syntax certainly helps. + +Why am I getting strange results with simple arithmetic operations? +------------------------------------------------------------------- + +See the next question. + +Why are floating point calculations so inaccurate? +-------------------------------------------------- + +People are often very surprised by results like this:: + + >>> 1.2-1.0 + 0.199999999999999996 + +and think it is a bug in Python. It's not. This has nothing to do +with Python, but with how the underlying C platform handles floating +point numbers, and ultimately with the inaccuracies introduced when +writing down numbers as a string of a fixed number of digits. + +The internal representation of floating point numbers uses a fixed +number of binary digits to represent a decimal number. Some decimal +numbers can't be represented exactly in binary, resulting in small +roundoff errors. + +In decimal math, there are many numbers that can't be represented with a +fixed number of decimal digits, e.g. 1/3 = 0.3333333333....... + +In base 2, 1/2 = 0.1, 1/4 = 0.01, 1/8 = 0.001, etc. +.2 equals 2/10 equals 1/5, resulting in the binary fractional number +0.001100110011001... + +Floating point numbers only have 32 or 64 bits of precision, so the digits are cut off at some point, +and the resulting number is 0.199999999999999996 in decimal, not 0.2. + +A floating point number's ``repr()`` function prints as many digits are +necessary to make ``eval(repr(f)) == f`` true for any float f. The +``str()`` function prints fewer digits and this often results in the +more sensible number that was probably intended:: + + >>> 0.2 + 0.20000000000000001 + >>> print 0.2 + 0.2 + +One of the consequences of this is that it is error-prone to compare +the result of some computation to a float with ``==``. Tiny +inaccuracies may mean that ``==`` fails. Instead, you have to check +that the difference between the two numbers is less than a certain +threshold:: + + epsilon = 0.0000000000001 # Tiny allowed error + expected_result = 0.4 + + if expected_result-epsilon <= computation() <= expected_result+epsilon: + ... + +Please see the chapter on +`floating point arithmetic `_ +in the Python tutorial for more information. + + +Why are Python strings immutable? +--------------------------------- + +There are several advantages. + +One is performance: knowing that a string is immutable means we can +allocate space for it at creation time, and the storage requirements +are fixed and unchanging. This is also one of the reasons for the +distinction between tuples and lists. + +Another advantage is that strings in Python are considered as +"elemental" as numbers. No amount of activity will change the value 8 +to anything else, and in Python, no amount of activity will change the +string "eight" to anything else. + + +Why must 'self' be used explicitly in method definitions and calls? +------------------------------------------------------------------- + +The idea was borrowed from Modula-3. It turns out to be very useful, +for a variety of reasons. + +First, it's more obvious that you are using a method or instance +attribute instead of a local variable. Reading ``self.x`` or ``self.meth()`` +makes it absolutely clear that an instance variable or method is used even +if you don't know the class definition by heart. In C++, you can sort of +tell by the lack of a local variable declaration (assuming globals are rare +or easily recognizable) -- but in Python, there are no local variable +declarations, so you'd have to look up the class definition to be sure. +Some C++ and Java coding standards call for instance attributes to have an +``m_`` prefix, so this explicitness is still useful in those languages, too. + +Second, it means that no special syntax is necessary if you want to +explicitly reference or call the method from a particular class. In C++, if +you want to use a method from a base class which is overridden in a derived +class, you have to use the :: operator -- in Python you can write +baseclass.methodname(self, ). This is particularly useful +for __init__() methods, and in general in cases where a derived class method +wants to extend the base class method of the same name and thus has to call +the base class method somehow. + +Finally, for instance variables it solves a syntactic problem with +assignment: since local variables in Python are (by definition!) those +variables to which a value assigned in a function body (and that aren't +explicitly declared global), there has to be some way to tell the +interpreter that an assignment was meant to assign to an instance variable +instead of to a local variable, and it should preferably be syntactic (for +efficiency reasons). C++ does this through declarations, but Python doesn't +have declarations and it would be a pity having to introduce them just for +this purpose. Using the explicit "self.var" solves this nicely. Similarly, +for using instance variables, having to write "self.var" means that +references to unqualified names inside a method don't have to search the +instance's directories. To put it another way, local variables and +instance variables live in two different namespaces, and you need to +tell Python which namespace to use. + + + +Why can't I use an assignment in an expression? +------------------------------------------------------- + +Many people used to C or Perl complain that they want to +use this C idiom:: + + while (line = readline(f)) { + ...do something with line... + } + +where in Python you're forced to write this:: + + while True: + line = f.readline() + if not line: + break + ...do something with line... + +The reason for not allowing assignment in Python expressions +is a common, hard-to-find bug in those other languages, +caused by this construct:: + + if (x = 0) { + ...error handling... + } + else { + ...code that only works for nonzero x... + } + +The error is a simple typo: ``x = 0``, which assigns 0 to the variable ``x``, +was written while the comparison ``x == 0`` is certainly what was intended. + +Many alternatives have been proposed. Most are hacks that save some +typing but use arbitrary or cryptic syntax or keywords, +and fail the simple criterion for language change proposals: +it should intuitively suggest the proper meaning to a human reader +who has not yet been introduced to the construct. + +An interesting phenomenon is that most experienced Python programmers +recognize the "while True" idiom and don't seem to be missing the +assignment in expression construct much; it's only newcomers +who express a strong desire to add this to the language. + +There's an alternative way of spelling this that seems +attractive but is generally less robust than the "while True" solution:: + + line = f.readline() + while line: + ...do something with line... + line = f.readline() + +The problem with this is that if you change your mind about exactly +how you get the next line (e.g. you want to change it into +``sys.stdin.readline()``) you have to remember to change two places in +your program -- the second occurrence is hidden at the bottom of the +loop. + +The best approach is to use iterators, making it possible to loop +through objects using the ``for`` statement. For example, in the +current version of Python file objects support the iterator protocol, so you +can now write simply:: + + for line in f: + ... do something with line... + + + +Why does Python use methods for some functionality (e.g. list.index()) but functions for other (e.g. len(list))? +---------------------------------------------------------------------------------------------------------------- + +The major reason is history. Functions were used for those operations +that were generic for a group of types and which were intended to work +even for objects that didn't have methods at all (e.g. tuples). It is +also convenient to have a function that can readily be applied to an +amorphous collection of objects when you use the functional features +of Python (``map()``, ``apply()`` et al). + +In fact, implementing ``len()``, ``max()``, ``min()`` as a built-in +function is actually less code than implementing them as methods for +each type. One can quibble about individual cases but it's a part of +Python, and it's too late to make such fundamental changes now. The +functions have to remain to avoid massive code breakage. + +Note that for string operations Python has moved from external functions +(the ``string`` module) to methods. However, ``len()`` is still a function. + +Why is join() a string method instead of a list or tuple method? +---------------------------------------------------------------- + +Strings became much more like other standard types starting in Python +1.6, when methods were added which give the same functionality that +has always been available using the functions of the string module. +Most of these new methods have been widely accepted, but the one which +appears to make some programmers feel uncomfortable is:: + + ", ".join(['1', '2', '4', '8', '16']) + +which gives the result:: + + "1, 2, 4, 8, 16" + +There are two common arguments against this usage. + +The first runs along the lines of: "It looks really ugly using a method of a +string literal (string constant)", to which the answer is that it might, but +a string literal is just a fixed value. If the methods are to be allowed on +names bound to strings there is no logical reason to make them unavailable +on literals. + +The second objection is typically cast as: "I am really telling a sequence +to join its members together with a string constant". Sadly, you aren't. For +some reason there seems to be much less difficulty with having split() as a +string method, since in that case it is easy to see that :: + + "1, 2, 4, 8, 16".split(", ") + +is an instruction to a string literal to return the substrings delimited by +the given separator (or, by default, arbitrary runs of white space). In this +case a Unicode string returns a list of Unicode strings, an ASCII string +returns a list of ASCII strings, and everyone is happy. + +join() is a string method because in using it you are telling the +separator string to iterate over a sequence of strings and insert +itself between adjacent elements. This method can be used with any +argument which obeys the rules for sequence objects, including any new +classes you might define yourself. + +Because this is a string method it can work for Unicode strings as well as +plain ASCII strings. If join() were a method of the sequence types then the +sequence types would have to decide which type of string to return depending +on the type of the separator. + +If none of these arguments persuade you, then for the moment you can +continue to use the join() function from the string module, which allows you +to write :: + + string.join(['1', '2', '4', '8', '16'], ", ") + + +How fast are exceptions? +------------------------ + +A try/except block is extremely efficient. Actually executing an exception +is expensive. In versions of Python prior to 2.0 it was common to use this +idiom:: + + try: + value = dict[key] + except KeyError: + dict[key] = getvalue(key) + value = dict[key] + +This only made sense when you expected the dict to have the key almost all +the time. If that wasn't the case, you coded it like this:: + + if dict.has_key(key): + value = dict[key] + else: + dict[key] = getvalue(key) + value = dict[key] + +(In Python 2.0 and higher, you can code this as +``value = dict.setdefault(key, getvalue(key))``.) + + +Why isn't there a switch or case statement in Python? +----------------------------------------------------- + +You can do this easily enough with a sequence of ``if... elif... elif... else``. +There have been some proposals for switch statement syntax, but there is no +consensus (yet) on whether and how to do range tests. See `PEP 275 +`_ for complete details and +the current status. + +For cases where you need to choose from a very large number of +possibilities, you can create a dictionary mapping case values to +functions to call. For example:: + + def function_1 (...): + ... + + functions = {'a': function_1, + 'b': function_2, + 'c': self.method_1, ...} + + func = functions[value] + func() + +For calling methods on objects, you can simplify yet further by using +the ``getattr()`` built-in to retrieve methods with a particular name:: + + def visit_a (self, ...): + ... + ... + + def dispatch (self, value): + method_name = 'visit_' + str(value) + method = getattr(self, method_name) + method() + +It's suggested that you use a prefix for the method names, such as +``visit_`` in this example. Without such a prefix, if values are coming +from an untrusted source, an attacker would be able to call any method +on your object. + + +Can't you emulate threads in the interpreter instead of relying on an OS-specific thread implementation? +-------------------------------------------------------------------------------------------------------- + +Answer 1: Unfortunately, the interpreter pushes at least one C stack frame +for each Python stack frame. Also, extensions can call back into Python at +almost random moments. Therefore, a complete threads implementation +requires thread support for C. + +Answer 2: Fortunately, there is `Stackless Python +`_, which has a completely redesigned interpreter +loop that avoids the C stack. It's still experimental but looks very +promising. Although it is binary compatible with standard Python, it's +still unclear whether Stackless will make it into the core -- maybe it's +just too revolutionary. + + +Why can't lambda forms contain statements? +------------------------------------------ + +Python lambda forms cannot contain statements because Python's syntactic +framework can't handle statements nested inside expressions. However, in +Python, this is not a serious problem. Unlike lambda forms in other +languages, where they add functionality, Python lambdas are only a shorthand +notation if you're too lazy to define a function. + +Functions are already first class objects in Python, and can be declared in +a local scope. Therefore the only advantage of using a lambda form instead +of a locally-defined function is that you don't need to invent a name for +the function -- but that's just a local variable to which the function +object (which is exactly the same type of object that a lambda form yields) +is assigned! + + +Can Python be compiled to machine code, C or some other language? +----------------------------------------------------------------- + +Not easily. Python's high level data types, dynamic typing of objects and +run-time invocation of the interpreter (using ``eval()`` or ``exec``) together mean +that a "compiled" Python program would probably consist mostly of calls into +the Python run-time system, even for seemingly simple operations like +``x+1``. + +Several projects described in the Python newsgroup or at past `Python +conferences `_ have shown that this +approach is feasible, although the speedups reached so far are only +modest (e.g. 2x). Jython uses the same strategy for compiling to Java +bytecode. (Jim Hugunin has demonstrated that in combination with +whole-program analysis, speedups of 1000x are feasible for small demo +programs. See the proceedings from the `1997 Python conference +`_ for more +information.) + +Internally, Python source code is always translated into a bytecode +representation, and this bytecode is then executed by the Python +virtual machine. In order to avoid the overhead of repeatedly parsing +and translating modules that rarely change, this byte code is written +into a file whose name ends in ".pyc" whenever a module is parsed. +When the corresponding .py file is changed, it is parsed and +translated again and the .pyc file is rewritten. + +There is no performance difference once the .pyc file has been loaded, +as the bytecode read from the .pyc file is exactly the same as the +bytecode created by direct translation. The only difference is that +loading code from a .pyc file is faster than parsing and translating a +.py file, so the presence of precompiled .pyc files improves the +start-up time of Python scripts. If desired, the Lib/compileall.py +module can be used to create valid .pyc files for a given set of +modules. + +Note that the main script executed by Python, even if its filename +ends in .py, is not compiled to a .pyc file. It is compiled to +bytecode, but the bytecode is not saved to a file. Usually main +scripts are quite short, so this doesn't cost much speed. + +There are also several programs which make it easier to intermingle +Python and C code in various ways to increase performance. See, for +example, `Psyco `_, +`Pyrex `_, `PyInline +`_, `Py2Cmod +`_, and `Weave +`_. + + +How does Python manage memory? +------------------------------ + +The details of Python memory management depend on the implementation. +The standard C implementation of Python uses reference counting to +detect inaccessible objects, and another mechanism to collect +reference cycles, periodically executing a cycle detection algorithm +which looks for inaccessible cycles and deletes the objects +involved. The ``gc`` module provides functions to perform a garbage +collection, obtain debugging statistics, and tune the collector's +parameters. + +Jython relies on the Java runtime so the JVM's garbage collector is +used. This difference can cause some subtle porting problems if your +Python code depends on the behavior of the reference counting +implementation. + +Sometimes objects get stuck in tracebacks temporarily and hence are not +deallocated when you might expect. Clear the tracebacks with:: + + import sys + sys.exc_clear() + sys.exc_traceback = sys.last_traceback = None + +Tracebacks are used for reporting errors, implementing debuggers and related +things. They contain a portion of the program state extracted during the +handling of an exception (usually the most recent exception). + +In the absence of circularities and tracebacks, Python programs need +not explicitly manage memory. + +Why doesn't Python use a more traditional garbage collection scheme? +For one thing, this is not a C standard feature and hence it's not +portable. (Yes, we know about the Boehm GC library. It has bits of +assembler code for *most* common platforms, not for all of them, and +although it is mostly transparent, it isn't completely transparent; +patches are required to get Python to work with it.) + +Traditional GC also becomes a problem when Python is embedded into other +applications. While in a standalone Python it's fine to replace the +standard malloc() and free() with versions provided by the GC library, an +application embedding Python may want to have its *own* substitute for +malloc() and free(), and may not want Python's. Right now, Python works +with anything that implements malloc() and free() properly. + +In Jython, the following code (which is fine in CPython) will probably run +out of file descriptors long before it runs out of memory:: + + for file in : + f = open(file) + c = f.read(1) + +Using the current reference counting and destructor scheme, each new +assignment to f closes the previous file. Using GC, this is not +guaranteed. If you want to write code that will work with any Python +implementation, you should explicitly close the file; this will work +regardless of GC:: + + for file in : + f = open(file) + c = f.read(1) + f.close() + + +Why isn't all memory freed when Python exits? +----------------------------------------------------- + +Objects referenced from the global namespaces of +Python modules are not always deallocated when Python exits. +This may happen if there are circular references. There are also +certain bits of memory that are allocated by the C library that are +impossible to free (e.g. a tool like Purify will complain about +these). Python is, however, aggressive about cleaning up memory on +exit and does try to destroy every single object. + +If you want to force Python to delete certain things on deallocation +use the ``sys.exitfunc()`` hook to run a function that will force +those deletions. + + +Why are there separate tuple and list data types? +------------------------------------------------- + +Lists and tuples, while similar in many respects, are generally used +in fundamentally different ways. Tuples can be thought of as being +similar to Pascal records or C structs; they're small collections of +related data which may be of different types which are operated on as +a group. For example, a Cartesian coordinate is appropriately +represented as a tuple of two or three numbers. + +Lists, on the other hand, are more like arrays in other languages. They +tend to hold a varying number of objects all of which have the same type and +which are operated on one-by-one. For example, ``os.listdir('.')`` returns +a list of strings representing the files in the current directory. +Functions which operate on this output would generally not break if you +added another file or two to the directory. + +Tuples are immutable, meaning that once a tuple has been created, you +can't replace any of its elements with a new value. Lists are +mutable, meaning that you can always change a list's elements. Only +immutable elements can be used as dictionary keys, and hence only +tuples and not lists can be used as keys. + + +How are lists implemented? +-------------------------- + +Python's lists are really variable-length arrays, not Lisp-style +linked lists. The implementation uses a contiguous array of +references to other objects, and keeps a pointer to this array and the +array's length in a list head structure. + +This makes indexing a list ``a[i]`` an operation whose cost is independent of +the size of the list or the value of the index. + +When items are appended or inserted, the array of references is resized. +Some cleverness is applied to improve the performance of appending items +repeatedly; when the array must be grown, some extra space is allocated so +the next few times don't require an actual resize. + + +How are dictionaries implemented? +----------------------------------------- +Python's dictionaries are implemented as resizable hash tables. +Compared to B-trees, this gives better performance for lookup +(the most common operation by far) under most circumstances, +and the implementation is simpler. + +Dictionaries work by computing a hash code for each key stored in the +dictionary using the ``hash()`` built-in function. The hash code +varies widely depending on the key; for example, "Python" hashes to +-539294296 while "python", a string that differs by a single bit, +hashes to 1142331976. The hash code is then used to calculate a +location in an internal array where the value will be stored. +Assuming that you're storing keys that all have different hash values, +this means that dictionaries take constant time -- O(1), in computer +science notation -- to retrieve a key. It also means that no sorted +order of the keys is maintained, and traversing the array as the +``.keys()`` and ``.items()`` do will output the dictionary's content +in some arbitrary jumbled order. + + +Why must dictionary keys be immutable? +---------------------------------------------- + +The hash table implementation of dictionaries uses a hash value +calculated from the key value to find the key. If the key were a +mutable object, its value could change, and thus its hash could also +change. But since whoever changes the key object can't tell that it +was being used as a dictionary key, it can't move the entry around in the +dictionary. Then, when you try to look up the same object in the +dictionary it won't be found because its hash value is different. +If you tried to look up the old value it wouldn't be found either, because +the value of the object found in that hash bin would be different. + +If you want a dictionary indexed with a list, simply convert the list +to a tuple first; the function ``tuple(L)`` creates a tuple with the +same entries as the list ``L``. Tuples are immutable and can +therefore be used as dictionary keys. + +Some unacceptable solutions that have been proposed: + +- Hash lists by their address (object ID). This doesn't work because + if you construct a new list with the same value it won't be found; + e.g.:: + + d = {[1,2]: '12'} + print d[[1,2]] + + would raise a KeyError exception because the id of the ``[1,2]`` used in + the second line differs from that in the first line. In other + words, dictionary keys should be compared using ``==``, not using + 'is'. + +- Make a copy when using a list as a key. This doesn't work because + the list, being a mutable object, could contain a reference to + itself, and then the copying code would run into an infinite loop. + +- Allow lists as keys but tell the user not to modify them. This + would allow a class of hard-to-track bugs in programs when you forgot + or modified a list by accident. It also + invalidates an important invariant of + dictionaries: every value in ``d.keys()`` is usable as a key of the + dictionary. + +- Mark lists as read-only once they are used as a dictionary key. The + problem is that it's not just the top-level object that could change + its value; you could use a tuple containing a list as a key. + Entering anything as a key into a dictionary would require marking + all objects reachable from there as read-only -- and again, + self-referential objects could cause an infinite loop. + +There is a trick to get around this if you need to, but +use it at your own risk: You +can wrap a mutable structure inside a class instance which +has both a __cmp__ and a __hash__ method. +You must then make sure that the hash value for all such wrapper objects +that reside in a dictionary (or other hash based structure), remain +fixed while the object is in the dictionary (or other structure).:: + + class ListWrapper: + def __init__(self, the_list): + self.the_list = the_list + def __cmp__(self, other): + return self.the_list == other.the_list + def __hash__(self): + l = self.the_list + result = 98767 - len(l)*555 + for i in range(len(l)): + try: + result = result + (hash(l[i]) % 9999999) * 1001 + i + except: + result = (result % 7777777) + i * 333 + return result + +Note that the hash computation is complicated by the +possibility that some members of the list may be unhashable +and also by the possibility of arithmetic overflow. + +Furthermore it must always be the case that if +``o1 == o2`` (ie ``o1.__cmp__(o2)==0``) then ``hash(o1)==hash(o2)`` +(ie, ``o1.__hash__() == o2.__hash__()``), regardless of whether +the object is in a dictionary or not. +If you fail to meet these restrictions dictionaries and other +hash based structures will misbehave. + +In the case of ListWrapper, whenever the wrapper +object is in a dictionary the wrapped list must not change +to avoid anomalies. Don't do this unless you are prepared +to think hard about the requirements and the consequences +of not meeting them correctly. Consider yourself warned. + + +Why doesn't list.sort() return the sorted list? +------------------------------------------------------- + +In situations where performance matters, making a copy +of the list just to sort it would be wasteful. Therefore, +list.sort() sorts the list in place. In order to remind you +of that fact, it does not return the sorted list. This way, +you won't be fooled into accidentally overwriting a list +when you need a sorted copy but also need to keep the +unsorted version around. + +In Python 2.4 a new builtin - sorted() - has been added. +This function creates a new list from a provided +iterable, sorts it and returns it. +For example, here's how to iterate over the keys of a +dictionary in sorted order:: + + for key in sorted(dict.iterkeys()): + ...do whatever with dict[key]... + +How do you specify and enforce an interface spec in Python? +------------------------------------------------------------------- + +An interface specification for a module as provided by languages such +as C++ and Java describes the prototypes for the methods and functions +of the module. Many feel that compile-time enforcement of interface +specifications helps in the construction of large programs. + +Python 2.6 adds an ``abc`` module that lets you define Abstract Base +Classes (ABCs). You can then use ``isinstance()`` +and ``issubclass`` to check whether an instance or a class +implements a particular ABC. The ``collections`` modules defines a set +of useful ABCs such as ``Iterable``, ``Container``, +and ``MutableMapping``. + +For Python, many of the advantages of interface specifications can be +obtained by an appropriate test discipline for components. There is +also a tool, PyChecker, which can be used to find problems due to +subclassing. + +A good test suite for a module can both provide a regression test +and serve as a module interface specification and a set of +examples. Many Python modules can be run as a script to provide a +simple "self test." Even modules which use complex external +interfaces can often be tested in isolation using trivial "stub" +emulations of the external interface. The ``doctest`` and +``unittest`` modules or third-party test frameworks can be used to construct +exhaustive test suites that exercise every line of code in a module. + +An appropriate testing discipline can help build large complex +applications in Python as well as having interface specifications +would. In fact, it can be better because an interface specification +cannot test certain properties of a program. For example, the +``append()`` method is expected to add new elements to the end of some +internal list; an interface specification cannot test that your +``append()`` implementation will actually do this correctly, but it's +trivial to check this property in a test suite. + +Writing test suites is very helpful, and you might want to design your +code with an eye to making it easily tested. One increasingly popular +technique, test-directed development, calls for writing parts of the +test suite first, before you write any of the actual code. Of course +Python allows you to be sloppy and not write test cases at all. + + +Why are default values shared between objects? +---------------------------------------------------------------- + +This type of bug commonly bites neophyte programmers. Consider this function:: + + def foo(D={}): # Danger: shared reference to one dict for all calls + ... compute something ... + D[key] = value + return D + +The first time you call this function, ``D`` contains a single item. +The second time, ``D`` contains two items because when ``foo()`` begins executing, +``D`` starts out with an item already in it. + +It is often expected that a function call creates new objects for +default values. This is not what happens. Default values are created +exactly once, when the function is defined. If that object is +changed, like the dictionary in this example, subsequent calls to the +function will refer to this changed object. + +By definition, immutable objects such as numbers, strings, tuples, and +``None``, are safe from change. Changes to mutable objects such as +dictionaries, lists, and class instances can lead to confusion. + +Because of this feature, it is good programming practice to not use mutable +objects as default values. Instead, use ``None`` as the default value +and inside the function, check if the parameter is ``None`` and create a new list/dictionary/whatever +if it is. For example, don't write:: + + def foo(dict={}): + ... + +but:: + + def foo(dict=None): + if dict is None: + dict = {} # create a new dict for local namespace + +This feature can be useful. When you have a function that's time-consuming to compute, +a common technique is to cache the parameters and the resulting value of each +call to the function, and return the cached value if the same value is requested again. +This is called "memoizing", and can be implemented like this:: + + # Callers will never provide a third parameter for this function. + def expensive (arg1, arg2, _cache={}): + if _cache.has_key((arg1, arg2)): + return _cache[(arg1, arg2)] + + # Calculate the value + result = ... expensive computation ... + _cache[(arg1, arg2)] = result # Store result in the cache + return result + +You could use a global variable containing a dictionary instead of +the default value; it's a matter of taste. + +Why is there no goto? +------------------------ + +You can use exceptions to provide a "structured goto" +that even works across function calls. Many feel that exceptions +can conveniently emulate all reasonable uses of the "go" or "goto" +constructs of C, Fortran, and other languages. For example:: + + class label: pass # declare a label + + try: + ... + if (condition): raise label() # goto label + ... + except label: # where to goto + pass + ... + +This doesn't allow you to jump into the middle of a loop, but +that's usually considered an abuse of goto anyway. Use sparingly. + + +Why can't raw strings (r-strings) end with a backslash? +--------------------------------------------------------------- +More precisely, they can't end with an odd number of backslashes: +the unpaired backslash at the end escapes the closing quote character, +leaving an unterminated string. + +Raw strings were designed to ease creating input for processors +(chiefly regular expression engines) that want to do their own +backslash escape processing. Such processors consider an unmatched +trailing backslash to be an error anyway, so raw strings disallow +that. In return, they allow you to pass on the string quote character +by escaping it with a backslash. These rules work well when r-strings +are used for their intended purpose. + +If you're trying to build Windows pathnames, note that all Windows +system calls accept forward slashes too:: + + f = open("/mydir/file.txt") # works fine! + +If you're trying to build a pathname for a DOS command, try e.g. one of :: + + dir = r"\this\is\my\dos\dir" "\\" + dir = r"\this\is\my\dos\dir\ "[:-1] + dir = "\\this\\is\\my\\dos\\dir\\" + + +Why doesn't Python have a "with" statement for attribute assignments? +--------------------------------------------------------------------------------------- + +Python has a 'with' statement that wraps the execution of a block, +calling code on the entrance and exit from the block. +Some language have a construct that looks like this:: + + with obj: + a = 1 # equivalent to obj.a = 1 + total = total + 1 # obj.total = obj.total + 1 + +In Python, such a construct would be ambiguous. + +Other languages, such as Object Pascal, Delphi, and C++, use static +types, so it's possible to know, in an unambiguous way, what member is +being assigned to. This is the main point of static typing -- the +compiler *always* knows the scope of every variable at compile time. + +Python uses dynamic types. It is impossible to know in advance which +attribute will be referenced at runtime. Member attributes may be +added or removed from objects on the fly. This makes it +impossible to know, from a simple reading, what attribute is being +referenced: a local one, a global one, or a member attribute? + +For instance, take the following incomplete snippet:: + + def foo(a): + with a: + print x + +The snippet assumes that "a" must have a member attribute called "x". +However, there is nothing in Python that tells the interpreter +this. What should happen if "a" is, let us say, an integer? If there is +a global variable named "x", will it be used inside the +with block? As you see, the dynamic nature of Python makes such +choices much harder. + +The primary benefit of "with" and similar language features (reduction +of code volume) can, however, easily be achieved in Python by +assignment. Instead of:: + + function(args).dict[index][index].a = 21 + function(args).dict[index][index].b = 42 + function(args).dict[index][index].c = 63 + +write this:: + + ref = function(args).dict[index][index] + ref.a = 21 + ref.b = 42 + ref.c = 63 + +This also has the side-effect of increasing execution speed because +name bindings are resolved at run-time in Python, and the second +version only needs to perform the resolution once. If the referenced +object does not have a, b and c attributes, of course, the end result +is still a run-time exception. + + +Why are colons required for the if/while/def/class statements? +-------------------------------------------------------------------- + +The colon is required primarily to enhance readability (one of the +results of the experimental ABC language). Consider this:: + + if a==b + print a + +versus :: + + if a==b: + print a + +Notice how the second one is slightly easier to read. Notice further how +a colon sets off the example in the second line of this FAQ answer; it's +a standard usage in English. + +Another minor reason is that the colon makes it easier for editors +with syntax highlighting; they can look for colons to decide when +indentation needs to be increased instead of having to do a more +elaborate parsing of the program text. + + +Why does Python allow commas at the end of lists and tuples? +------------------------------------------------------------------------------ + +Python lets you add a trailing comma at the end of lists, tuples, and +dictionaries:: + + [1, 2, 3,] + ('a', 'b', 'c',) + d = { + "A": [1, 5], + "B": [6, 7], # last trailing comma is optional but good style + } + + +There are several reasons to allow this. + +When you have a literal value for a list, tuple, or dictionary spread +across multiple lines, it's easier to add more elements because you +don't have to remember to add a comma to the previous line. The lines +can also be sorted in your editor without creating a syntax error. + +Accidentally omitting the comma can lead to errors that are hard to +diagnose. For example:: + + x = [ + "fee", + "fie" + "foo", + "fum" + ] + +This list looks like it has four elements, but it actually contains +three: "fee", "fiefoo" and "fum". Always adding the comma avoids this +source of error. + +Allowing the trailing comma may also make programmatic code generation +easier. Modified: sandbox/trunk/faq/general.rst ============================================================================== --- sandbox/trunk/faq/general.rst (original) +++ sandbox/trunk/faq/general.rst Wed Sep 23 03:11:11 2009 @@ -518,973 +518,3 @@ The precise commands you use will vary depending on the particulars of your installation. For full details about operation of these two scripts check the doc string at the start of each one. - - -Python's Design -===================== - -Why does Python use indentation for grouping of statements? ------------------------------------------------------------ - -Guido van Rossum believes that using indentation for grouping is extremely elegant -and contributes a lot to the clarity of the average Python program. Most -people learn to love this feature after awhile. - -Since there are no begin/end brackets there cannot be a disagreement between -grouping perceived by the parser and the human reader. Occasionally C -programmers will encounter a fragment of code like this:: - - if (x <= y) - x++; - y--; - z++; - -Only the ``x++`` statement is executed if the condition is true, but -the indentation leads you to believe otherwise. -Even experienced C programmers will sometimes -stare at it a long time wondering why ``y`` is being decremented even for -``x > y``. - -Because there are no begin/end brackets, Python is much less prone to -coding-style conflicts. In C there are many different ways to place the -braces. If you're used to reading -and writing code that uses one style, you will feel at least slightly -uneasy when reading (or being required to write) another style. - -Many coding styles place begin/end brackets on a line by themself. This -makes programs considerably longer and wastes valuable screen space, making -it harder to get a good overview of a program. Ideally, a function should -fit on one screen (say, 20-30 lines). 20 lines of Python can do -a lot more work than 20 lines of C. This is not solely due to the lack of -begin/end brackets -- the lack of declarations and the high-level data types -are also responsible -- but the indentation-based syntax certainly helps. - -Why am I getting strange results with simple arithmetic operations? -------------------------------------------------------------------- - -See the next question. - -Why are floating point calculations so inaccurate? --------------------------------------------------- - -People are often very surprised by results like this:: - - >>> 1.2-1.0 - 0.199999999999999996 - -and think it is a bug in Python. It's not. This has nothing to do -with Python, but with how the underlying C platform handles floating -point numbers, and ultimately with the inaccuracies introduced when -writing down numbers as a string of a fixed number of digits. - -The internal representation of floating point numbers uses a fixed -number of binary digits to represent a decimal number. Some decimal -numbers can't be represented exactly in binary, resulting in small -roundoff errors. - -In decimal math, there are many numbers that can't be represented with a -fixed number of decimal digits, e.g. 1/3 = 0.3333333333....... - -In base 2, 1/2 = 0.1, 1/4 = 0.01, 1/8 = 0.001, etc. -.2 equals 2/10 equals 1/5, resulting in the binary fractional number -0.001100110011001... - -Floating point numbers only have 32 or 64 bits of precision, so the digits are cut off at some point, -and the resulting number is 0.199999999999999996 in decimal, not 0.2. - -A floating point number's ``repr()`` function prints as many digits are -necessary to make ``eval(repr(f)) == f`` true for any float f. The -``str()`` function prints fewer digits and this often results in the -more sensible number that was probably intended:: - - >>> 0.2 - 0.20000000000000001 - >>> print 0.2 - 0.2 - -One of the consequences of this is that it is error-prone to compare -the result of some computation to a float with ``==``. Tiny -inaccuracies may mean that ``==`` fails. Instead, you have to check -that the difference between the two numbers is less than a certain -threshold:: - - epsilon = 0.0000000000001 # Tiny allowed error - expected_result = 0.4 - - if expected_result-epsilon <= computation() <= expected_result+epsilon: - ... - -Please see the chapter on -`floating point arithmetic `_ -in the Python tutorial for more information. - - -Why are Python strings immutable? ---------------------------------- - -There are several advantages. - -One is performance: knowing that a string is immutable means we can -allocate space for it at creation time, and the storage requirements -are fixed and unchanging. This is also one of the reasons for the -distinction between tuples and lists. - -Another advantage is that strings in Python are considered as -"elemental" as numbers. No amount of activity will change the value 8 -to anything else, and in Python, no amount of activity will change the -string "eight" to anything else. - - -Why must 'self' be used explicitly in method definitions and calls? -------------------------------------------------------------------- - -The idea was borrowed from Modula-3. It turns out to be very useful, -for a variety of reasons. - -First, it's more obvious that you are using a method or instance -attribute instead of a local variable. Reading ``self.x`` or ``self.meth()`` -makes it absolutely clear that an instance variable or method is used even -if you don't know the class definition by heart. In C++, you can sort of -tell by the lack of a local variable declaration (assuming globals are rare -or easily recognizable) -- but in Python, there are no local variable -declarations, so you'd have to look up the class definition to be sure. -Some C++ and Java coding standards call for instance attributes to have an -``m_`` prefix, so this explicitness is still useful in those languages, too. - -Second, it means that no special syntax is necessary if you want to -explicitly reference or call the method from a particular class. In C++, if -you want to use a method from a base class which is overridden in a derived -class, you have to use the :: operator -- in Python you can write -baseclass.methodname(self, ). This is particularly useful -for __init__() methods, and in general in cases where a derived class method -wants to extend the base class method of the same name and thus has to call -the base class method somehow. - -Finally, for instance variables it solves a syntactic problem with -assignment: since local variables in Python are (by definition!) those -variables to which a value assigned in a function body (and that aren't -explicitly declared global), there has to be some way to tell the -interpreter that an assignment was meant to assign to an instance variable -instead of to a local variable, and it should preferably be syntactic (for -efficiency reasons). C++ does this through declarations, but Python doesn't -have declarations and it would be a pity having to introduce them just for -this purpose. Using the explicit "self.var" solves this nicely. Similarly, -for using instance variables, having to write "self.var" means that -references to unqualified names inside a method don't have to search the -instance's directories. To put it another way, local variables and -instance variables live in two different namespaces, and you need to -tell Python which namespace to use. - - - -Why can't I use an assignment in an expression? -------------------------------------------------------- - -Many people used to C or Perl complain that they want to -use this C idiom:: - - while (line = readline(f)) { - ...do something with line... - } - -where in Python you're forced to write this:: - - while True: - line = f.readline() - if not line: - break - ...do something with line... - -The reason for not allowing assignment in Python expressions -is a common, hard-to-find bug in those other languages, -caused by this construct:: - - if (x = 0) { - ...error handling... - } - else { - ...code that only works for nonzero x... - } - -The error is a simple typo: ``x = 0``, which assigns 0 to the variable ``x``, -was written while the comparison ``x == 0`` is certainly what was intended. - -Many alternatives have been proposed. Most are hacks that save some -typing but use arbitrary or cryptic syntax or keywords, -and fail the simple criterion for language change proposals: -it should intuitively suggest the proper meaning to a human reader -who has not yet been introduced to the construct. - -An interesting phenomenon is that most experienced Python programmers -recognize the "while True" idiom and don't seem to be missing the -assignment in expression construct much; it's only newcomers -who express a strong desire to add this to the language. - -There's an alternative way of spelling this that seems -attractive but is generally less robust than the "while True" solution:: - - line = f.readline() - while line: - ...do something with line... - line = f.readline() - -The problem with this is that if you change your mind about exactly -how you get the next line (e.g. you want to change it into -``sys.stdin.readline()``) you have to remember to change two places in -your program -- the second occurrence is hidden at the bottom of the -loop. - -The best approach is to use iterators, making it possible to loop -through objects using the ``for`` statement. For example, in the -current version of Python file objects support the iterator protocol, so you -can now write simply:: - - for line in f: - ... do something with line... - - - -Why does Python use methods for some functionality (e.g. list.index()) but functions for other (e.g. len(list))? ----------------------------------------------------------------------------------------------------------------- - -The major reason is history. Functions were used for those operations -that were generic for a group of types and which were intended to work -even for objects that didn't have methods at all (e.g. tuples). It is -also convenient to have a function that can readily be applied to an -amorphous collection of objects when you use the functional features -of Python (``map()``, ``apply()`` et al). - -In fact, implementing ``len()``, ``max()``, ``min()`` as a built-in -function is actually less code than implementing them as methods for -each type. One can quibble about individual cases but it's a part of -Python, and it's too late to make such fundamental changes now. The -functions have to remain to avoid massive code breakage. - -Note that for string operations Python has moved from external functions -(the ``string`` module) to methods. However, ``len()`` is still a function. - -Why is join() a string method instead of a list or tuple method? ----------------------------------------------------------------- - -Strings became much more like other standard types starting in Python -1.6, when methods were added which give the same functionality that -has always been available using the functions of the string module. -Most of these new methods have been widely accepted, but the one which -appears to make some programmers feel uncomfortable is:: - - ", ".join(['1', '2', '4', '8', '16']) - -which gives the result:: - - "1, 2, 4, 8, 16" - -There are two common arguments against this usage. - -The first runs along the lines of: "It looks really ugly using a method of a -string literal (string constant)", to which the answer is that it might, but -a string literal is just a fixed value. If the methods are to be allowed on -names bound to strings there is no logical reason to make them unavailable -on literals. - -The second objection is typically cast as: "I am really telling a sequence -to join its members together with a string constant". Sadly, you aren't. For -some reason there seems to be much less difficulty with having split() as a -string method, since in that case it is easy to see that :: - - "1, 2, 4, 8, 16".split(", ") - -is an instruction to a string literal to return the substrings delimited by -the given separator (or, by default, arbitrary runs of white space). In this -case a Unicode string returns a list of Unicode strings, an ASCII string -returns a list of ASCII strings, and everyone is happy. - -join() is a string method because in using it you are telling the -separator string to iterate over a sequence of strings and insert -itself between adjacent elements. This method can be used with any -argument which obeys the rules for sequence objects, including any new -classes you might define yourself. - -Because this is a string method it can work for Unicode strings as well as -plain ASCII strings. If join() were a method of the sequence types then the -sequence types would have to decide which type of string to return depending -on the type of the separator. - -If none of these arguments persuade you, then for the moment you can -continue to use the join() function from the string module, which allows you -to write :: - - string.join(['1', '2', '4', '8', '16'], ", ") - - -How fast are exceptions? ------------------------- - -A try/except block is extremely efficient. Actually executing an exception -is expensive. In versions of Python prior to 2.0 it was common to use this -idiom:: - - try: - value = dict[key] - except KeyError: - dict[key] = getvalue(key) - value = dict[key] - -This only made sense when you expected the dict to have the key almost all -the time. If that wasn't the case, you coded it like this:: - - if dict.has_key(key): - value = dict[key] - else: - dict[key] = getvalue(key) - value = dict[key] - -(In Python 2.0 and higher, you can code this as -``value = dict.setdefault(key, getvalue(key))``.) - - -Why isn't there a switch or case statement in Python? ------------------------------------------------------ - -You can do this easily enough with a sequence of ``if... elif... elif... else``. -There have been some proposals for switch statement syntax, but there is no -consensus (yet) on whether and how to do range tests. See `PEP 275 -`_ for complete details and -the current status. - -For cases where you need to choose from a very large number of -possibilities, you can create a dictionary mapping case values to -functions to call. For example:: - - def function_1 (...): - ... - - functions = {'a': function_1, - 'b': function_2, - 'c': self.method_1, ...} - - func = functions[value] - func() - -For calling methods on objects, you can simplify yet further by using -the ``getattr()`` built-in to retrieve methods with a particular name:: - - def visit_a (self, ...): - ... - ... - - def dispatch (self, value): - method_name = 'visit_' + str(value) - method = getattr(self, method_name) - method() - -It's suggested that you use a prefix for the method names, such as -``visit_`` in this example. Without such a prefix, if values are coming -from an untrusted source, an attacker would be able to call any method -on your object. - - -Can't you emulate threads in the interpreter instead of relying on an OS-specific thread implementation? --------------------------------------------------------------------------------------------------------- - -Answer 1: Unfortunately, the interpreter pushes at least one C stack frame -for each Python stack frame. Also, extensions can call back into Python at -almost random moments. Therefore, a complete threads implementation -requires thread support for C. - -Answer 2: Fortunately, there is `Stackless Python -`_, which has a completely redesigned interpreter -loop that avoids the C stack. It's still experimental but looks very -promising. Although it is binary compatible with standard Python, it's -still unclear whether Stackless will make it into the core -- maybe it's -just too revolutionary. - - -Why can't lambda forms contain statements? ------------------------------------------- - -Python lambda forms cannot contain statements because Python's syntactic -framework can't handle statements nested inside expressions. However, in -Python, this is not a serious problem. Unlike lambda forms in other -languages, where they add functionality, Python lambdas are only a shorthand -notation if you're too lazy to define a function. - -Functions are already first class objects in Python, and can be declared in -a local scope. Therefore the only advantage of using a lambda form instead -of a locally-defined function is that you don't need to invent a name for -the function -- but that's just a local variable to which the function -object (which is exactly the same type of object that a lambda form yields) -is assigned! - - -Can Python be compiled to machine code, C or some other language? ------------------------------------------------------------------ - -Not easily. Python's high level data types, dynamic typing of objects and -run-time invocation of the interpreter (using ``eval()`` or ``exec``) together mean -that a "compiled" Python program would probably consist mostly of calls into -the Python run-time system, even for seemingly simple operations like -``x+1``. - -Several projects described in the Python newsgroup or at past `Python -conferences `_ have shown that this -approach is feasible, although the speedups reached so far are only -modest (e.g. 2x). Jython uses the same strategy for compiling to Java -bytecode. (Jim Hugunin has demonstrated that in combination with -whole-program analysis, speedups of 1000x are feasible for small demo -programs. See the proceedings from the `1997 Python conference -`_ for more -information.) - -Internally, Python source code is always translated into a bytecode -representation, and this bytecode is then executed by the Python -virtual machine. In order to avoid the overhead of repeatedly parsing -and translating modules that rarely change, this byte code is written -into a file whose name ends in ".pyc" whenever a module is parsed. -When the corresponding .py file is changed, it is parsed and -translated again and the .pyc file is rewritten. - -There is no performance difference once the .pyc file has been loaded, -as the bytecode read from the .pyc file is exactly the same as the -bytecode created by direct translation. The only difference is that -loading code from a .pyc file is faster than parsing and translating a -.py file, so the presence of precompiled .pyc files improves the -start-up time of Python scripts. If desired, the Lib/compileall.py -module can be used to create valid .pyc files for a given set of -modules. - -Note that the main script executed by Python, even if its filename -ends in .py, is not compiled to a .pyc file. It is compiled to -bytecode, but the bytecode is not saved to a file. Usually main -scripts are quite short, so this doesn't cost much speed. - -There are also several programs which make it easier to intermingle -Python and C code in various ways to increase performance. See, for -example, `Psyco `_, -`Pyrex `_, `PyInline -`_, `Py2Cmod -`_, and `Weave -`_. - - -How does Python manage memory? ------------------------------- - -The details of Python memory management depend on the implementation. -The standard C implementation of Python uses reference counting to -detect inaccessible objects, and another mechanism to collect -reference cycles, periodically executing a cycle detection algorithm -which looks for inaccessible cycles and deletes the objects -involved. The ``gc`` module provides functions to perform a garbage -collection, obtain debugging statistics, and tune the collector's -parameters. - -Jython relies on the Java runtime so the JVM's garbage collector is -used. This difference can cause some subtle porting problems if your -Python code depends on the behavior of the reference counting -implementation. - -Sometimes objects get stuck in tracebacks temporarily and hence are not -deallocated when you might expect. Clear the tracebacks with:: - - import sys - sys.exc_clear() - sys.exc_traceback = sys.last_traceback = None - -Tracebacks are used for reporting errors, implementing debuggers and related -things. They contain a portion of the program state extracted during the -handling of an exception (usually the most recent exception). - -In the absence of circularities and tracebacks, Python programs need -not explicitly manage memory. - -Why doesn't Python use a more traditional garbage collection scheme? -For one thing, this is not a C standard feature and hence it's not -portable. (Yes, we know about the Boehm GC library. It has bits of -assembler code for *most* common platforms, not for all of them, and -although it is mostly transparent, it isn't completely transparent; -patches are required to get Python to work with it.) - -Traditional GC also becomes a problem when Python is embedded into other -applications. While in a standalone Python it's fine to replace the -standard malloc() and free() with versions provided by the GC library, an -application embedding Python may want to have its *own* substitute for -malloc() and free(), and may not want Python's. Right now, Python works -with anything that implements malloc() and free() properly. - -In Jython, the following code (which is fine in CPython) will probably run -out of file descriptors long before it runs out of memory:: - - for file in : - f = open(file) - c = f.read(1) - -Using the current reference counting and destructor scheme, each new -assignment to f closes the previous file. Using GC, this is not -guaranteed. If you want to write code that will work with any Python -implementation, you should explicitly close the file; this will work -regardless of GC:: - - for file in : - f = open(file) - c = f.read(1) - f.close() - - -Why isn't all memory freed when Python exits? ------------------------------------------------------ - -Objects referenced from the global namespaces of -Python modules are not always deallocated when Python exits. -This may happen if there are circular references. There are also -certain bits of memory that are allocated by the C library that are -impossible to free (e.g. a tool like Purify will complain about -these). Python is, however, aggressive about cleaning up memory on -exit and does try to destroy every single object. - -If you want to force Python to delete certain things on deallocation -use the ``sys.exitfunc()`` hook to run a function that will force -those deletions. - - -Why are there separate tuple and list data types? -------------------------------------------------- - -Lists and tuples, while similar in many respects, are generally used -in fundamentally different ways. Tuples can be thought of as being -similar to Pascal records or C structs; they're small collections of -related data which may be of different types which are operated on as -a group. For example, a Cartesian coordinate is appropriately -represented as a tuple of two or three numbers. - -Lists, on the other hand, are more like arrays in other languages. They -tend to hold a varying number of objects all of which have the same type and -which are operated on one-by-one. For example, ``os.listdir('.')`` returns -a list of strings representing the files in the current directory. -Functions which operate on this output would generally not break if you -added another file or two to the directory. - -Tuples are immutable, meaning that once a tuple has been created, you -can't replace any of its elements with a new value. Lists are -mutable, meaning that you can always change a list's elements. Only -immutable elements can be used as dictionary keys, and hence only -tuples and not lists can be used as keys. - - -How are lists implemented? --------------------------- - -Python's lists are really variable-length arrays, not Lisp-style -linked lists. The implementation uses a contiguous array of -references to other objects, and keeps a pointer to this array and the -array's length in a list head structure. - -This makes indexing a list ``a[i]`` an operation whose cost is independent of -the size of the list or the value of the index. - -When items are appended or inserted, the array of references is resized. -Some cleverness is applied to improve the performance of appending items -repeatedly; when the array must be grown, some extra space is allocated so -the next few times don't require an actual resize. - - -How are dictionaries implemented? ------------------------------------------ -Python's dictionaries are implemented as resizable hash tables. -Compared to B-trees, this gives better performance for lookup -(the most common operation by far) under most circumstances, -and the implementation is simpler. - -Dictionaries work by computing a hash code for each key stored in the -dictionary using the ``hash()`` built-in function. The hash code -varies widely depending on the key; for example, "Python" hashes to --539294296 while "python", a string that differs by a single bit, -hashes to 1142331976. The hash code is then used to calculate a -location in an internal array where the value will be stored. -Assuming that you're storing keys that all have different hash values, -this means that dictionaries take constant time -- O(1), in computer -science notation -- to retrieve a key. It also means that no sorted -order of the keys is maintained, and traversing the array as the -``.keys()`` and ``.items()`` do will output the dictionary's content -in some arbitrary jumbled order. - - -Why must dictionary keys be immutable? ----------------------------------------------- - -The hash table implementation of dictionaries uses a hash value -calculated from the key value to find the key. If the key were a -mutable object, its value could change, and thus its hash could also -change. But since whoever changes the key object can't tell that it -was being used as a dictionary key, it can't move the entry around in the -dictionary. Then, when you try to look up the same object in the -dictionary it won't be found because its hash value is different. -If you tried to look up the old value it wouldn't be found either, because -the value of the object found in that hash bin would be different. - -If you want a dictionary indexed with a list, simply convert the list -to a tuple first; the function ``tuple(L)`` creates a tuple with the -same entries as the list ``L``. Tuples are immutable and can -therefore be used as dictionary keys. - -Some unacceptable solutions that have been proposed: - -- Hash lists by their address (object ID). This doesn't work because - if you construct a new list with the same value it won't be found; - e.g.:: - - d = {[1,2]: '12'} - print d[[1,2]] - - would raise a KeyError exception because the id of the ``[1,2]`` used in - the second line differs from that in the first line. In other - words, dictionary keys should be compared using ``==``, not using - 'is'. - -- Make a copy when using a list as a key. This doesn't work because - the list, being a mutable object, could contain a reference to - itself, and then the copying code would run into an infinite loop. - -- Allow lists as keys but tell the user not to modify them. This - would allow a class of hard-to-track bugs in programs when you forgot - or modified a list by accident. It also - invalidates an important invariant of - dictionaries: every value in ``d.keys()`` is usable as a key of the - dictionary. - -- Mark lists as read-only once they are used as a dictionary key. The - problem is that it's not just the top-level object that could change - its value; you could use a tuple containing a list as a key. - Entering anything as a key into a dictionary would require marking - all objects reachable from there as read-only -- and again, - self-referential objects could cause an infinite loop. - -There is a trick to get around this if you need to, but -use it at your own risk: You -can wrap a mutable structure inside a class instance which -has both a __cmp__ and a __hash__ method. -You must then make sure that the hash value for all such wrapper objects -that reside in a dictionary (or other hash based structure), remain -fixed while the object is in the dictionary (or other structure).:: - - class ListWrapper: - def __init__(self, the_list): - self.the_list = the_list - def __cmp__(self, other): - return self.the_list == other.the_list - def __hash__(self): - l = self.the_list - result = 98767 - len(l)*555 - for i in range(len(l)): - try: - result = result + (hash(l[i]) % 9999999) * 1001 + i - except: - result = (result % 7777777) + i * 333 - return result - -Note that the hash computation is complicated by the -possibility that some members of the list may be unhashable -and also by the possibility of arithmetic overflow. - -Furthermore it must always be the case that if -``o1 == o2`` (ie ``o1.__cmp__(o2)==0``) then ``hash(o1)==hash(o2)`` -(ie, ``o1.__hash__() == o2.__hash__()``), regardless of whether -the object is in a dictionary or not. -If you fail to meet these restrictions dictionaries and other -hash based structures will misbehave. - -In the case of ListWrapper, whenever the wrapper -object is in a dictionary the wrapped list must not change -to avoid anomalies. Don't do this unless you are prepared -to think hard about the requirements and the consequences -of not meeting them correctly. Consider yourself warned. - - -Why doesn't list.sort() return the sorted list? -------------------------------------------------------- - -In situations where performance matters, making a copy -of the list just to sort it would be wasteful. Therefore, -list.sort() sorts the list in place. In order to remind you -of that fact, it does not return the sorted list. This way, -you won't be fooled into accidentally overwriting a list -when you need a sorted copy but also need to keep the -unsorted version around. - -In Python 2.4 a new builtin - sorted() - has been added. -This function creates a new list from a provided -iterable, sorts it and returns it. -For example, here's how to iterate over the keys of a -dictionary in sorted order:: - - for key in sorted(dict.iterkeys()): - ...do whatever with dict[key]... - -How do you specify and enforce an interface spec in Python? -------------------------------------------------------------------- - -An interface specification for a module as provided by languages such -as C++ and Java describes the prototypes for the methods and functions -of the module. Many feel that compile-time enforcement of interface -specifications helps in the construction of large programs. - -Python 2.6 adds an ``abc`` module that lets you define Abstract Base -Classes (ABCs). You can then use ``isinstance()`` -and ``issubclass`` to check whether an instance or a class -implements a particular ABC. The ``collections`` modules defines a set -of useful ABCs such as ``Iterable``, ``Container``, -and ``MutableMapping``. - -For Python, many of the advantages of interface specifications can be -obtained by an appropriate test discipline for components. There is -also a tool, PyChecker, which can be used to find problems due to -subclassing. - -A good test suite for a module can both provide a regression test -and serve as a module interface specification and a set of -examples. Many Python modules can be run as a script to provide a -simple "self test." Even modules which use complex external -interfaces can often be tested in isolation using trivial "stub" -emulations of the external interface. The ``doctest`` and -``unittest`` modules or third-party test frameworks can be used to construct -exhaustive test suites that exercise every line of code in a module. - -An appropriate testing discipline can help build large complex -applications in Python as well as having interface specifications -would. In fact, it can be better because an interface specification -cannot test certain properties of a program. For example, the -``append()`` method is expected to add new elements to the end of some -internal list; an interface specification cannot test that your -``append()`` implementation will actually do this correctly, but it's -trivial to check this property in a test suite. - -Writing test suites is very helpful, and you might want to design your -code with an eye to making it easily tested. One increasingly popular -technique, test-directed development, calls for writing parts of the -test suite first, before you write any of the actual code. Of course -Python allows you to be sloppy and not write test cases at all. - - -Why are default values shared between objects? ----------------------------------------------------------------- - -This type of bug commonly bites neophyte programmers. Consider this function:: - - def foo(D={}): # Danger: shared reference to one dict for all calls - ... compute something ... - D[key] = value - return D - -The first time you call this function, ``D`` contains a single item. -The second time, ``D`` contains two items because when ``foo()`` begins executing, -``D`` starts out with an item already in it. - -It is often expected that a function call creates new objects for -default values. This is not what happens. Default values are created -exactly once, when the function is defined. If that object is -changed, like the dictionary in this example, subsequent calls to the -function will refer to this changed object. - -By definition, immutable objects such as numbers, strings, tuples, and -``None``, are safe from change. Changes to mutable objects such as -dictionaries, lists, and class instances can lead to confusion. - -Because of this feature, it is good programming practice to not use mutable -objects as default values. Instead, use ``None`` as the default value -and inside the function, check if the parameter is ``None`` and create a new list/dictionary/whatever -if it is. For example, don't write:: - - def foo(dict={}): - ... - -but:: - - def foo(dict=None): - if dict is None: - dict = {} # create a new dict for local namespace - -This feature can be useful. When you have a function that's time-consuming to compute, -a common technique is to cache the parameters and the resulting value of each -call to the function, and return the cached value if the same value is requested again. -This is called "memoizing", and can be implemented like this:: - - # Callers will never provide a third parameter for this function. - def expensive (arg1, arg2, _cache={}): - if _cache.has_key((arg1, arg2)): - return _cache[(arg1, arg2)] - - # Calculate the value - result = ... expensive computation ... - _cache[(arg1, arg2)] = result # Store result in the cache - return result - -You could use a global variable containing a dictionary instead of -the default value; it's a matter of taste. - -Why is there no goto? ------------------------- - -You can use exceptions to provide a "structured goto" -that even works across function calls. Many feel that exceptions -can conveniently emulate all reasonable uses of the "go" or "goto" -constructs of C, Fortran, and other languages. For example:: - - class label: pass # declare a label - - try: - ... - if (condition): raise label() # goto label - ... - except label: # where to goto - pass - ... - -This doesn't allow you to jump into the middle of a loop, but -that's usually considered an abuse of goto anyway. Use sparingly. - - -Why can't raw strings (r-strings) end with a backslash? ---------------------------------------------------------------- -More precisely, they can't end with an odd number of backslashes: -the unpaired backslash at the end escapes the closing quote character, -leaving an unterminated string. - -Raw strings were designed to ease creating input for processors -(chiefly regular expression engines) that want to do their own -backslash escape processing. Such processors consider an unmatched -trailing backslash to be an error anyway, so raw strings disallow -that. In return, they allow you to pass on the string quote character -by escaping it with a backslash. These rules work well when r-strings -are used for their intended purpose. - -If you're trying to build Windows pathnames, note that all Windows -system calls accept forward slashes too:: - - f = open("/mydir/file.txt") # works fine! - -If you're trying to build a pathname for a DOS command, try e.g. one of :: - - dir = r"\this\is\my\dos\dir" "\\" - dir = r"\this\is\my\dos\dir\ "[:-1] - dir = "\\this\\is\\my\\dos\\dir\\" - - -Why doesn't Python have a "with" statement for attribute assignments? ---------------------------------------------------------------------------------------- - -Python has a 'with' statement that wraps the execution of a block, -calling code on the entrance and exit from the block. -Some language have a construct that looks like this:: - - with obj: - a = 1 # equivalent to obj.a = 1 - total = total + 1 # obj.total = obj.total + 1 - -In Python, such a construct would be ambiguous. - -Other languages, such as Object Pascal, Delphi, and C++, use static -types, so it's possible to know, in an unambiguous way, what member is -being assigned to. This is the main point of static typing -- the -compiler *always* knows the scope of every variable at compile time. - -Python uses dynamic types. It is impossible to know in advance which -attribute will be referenced at runtime. Member attributes may be -added or removed from objects on the fly. This makes it -impossible to know, from a simple reading, what attribute is being -referenced: a local one, a global one, or a member attribute? - -For instance, take the following incomplete snippet:: - - def foo(a): - with a: - print x - -The snippet assumes that "a" must have a member attribute called "x". -However, there is nothing in Python that tells the interpreter -this. What should happen if "a" is, let us say, an integer? If there is -a global variable named "x", will it be used inside the -with block? As you see, the dynamic nature of Python makes such -choices much harder. - -The primary benefit of "with" and similar language features (reduction -of code volume) can, however, easily be achieved in Python by -assignment. Instead of:: - - function(args).dict[index][index].a = 21 - function(args).dict[index][index].b = 42 - function(args).dict[index][index].c = 63 - -write this:: - - ref = function(args).dict[index][index] - ref.a = 21 - ref.b = 42 - ref.c = 63 - -This also has the side-effect of increasing execution speed because -name bindings are resolved at run-time in Python, and the second -version only needs to perform the resolution once. If the referenced -object does not have a, b and c attributes, of course, the end result -is still a run-time exception. - - -Why are colons required for the if/while/def/class statements? --------------------------------------------------------------------- - -The colon is required primarily to enhance readability (one of the -results of the experimental ABC language). Consider this:: - - if a==b - print a - -versus :: - - if a==b: - print a - -Notice how the second one is slightly easier to read. Notice further how -a colon sets off the example in the second line of this FAQ answer; it's -a standard usage in English. - -Another minor reason is that the colon makes it easier for editors -with syntax highlighting; they can look for colons to decide when -indentation needs to be increased instead of having to do a more -elaborate parsing of the program text. - - -Why does Python allow commas at the end of lists and tuples? ------------------------------------------------------------------------------- - -Python lets you add a trailing comma at the end of lists, tuples, and -dictionaries:: - - [1, 2, 3,] - ('a', 'b', 'c',) - d = { - "A": [1, 5], - "B": [6, 7], # last trailing comma is optional but good style - } - - -There are several reasons to allow this. - -When you have a literal value for a list, tuple, or dictionary spread -across multiple lines, it's easier to add more elements because you -don't have to remember to add a comma to the previous line. The lines -can also be sorted in your editor without creating a syntax error. - -Accidentally omitting the comma can lead to errors that are hard to -diagnose. For example:: - - x = [ - "fee", - "fie" - "foo", - "fum" - ] - -This list looks like it has four elements, but it actually contains -three: "fee", "fiefoo" and "fum". Always adding the comma avoids this -source of error. - -Allowing the trailing comma may also make programmatic code generation -easier. Modified: sandbox/trunk/faq/index.rst ============================================================================== --- sandbox/trunk/faq/index.rst (original) +++ sandbox/trunk/faq/index.rst Wed Sep 23 03:11:11 2009 @@ -11,6 +11,7 @@ general.rst programming.rst + design.rst library.rst extending.rst windows.rst From python-checkins at python.org Wed Sep 23 03:11:28 2009 From: python-checkins at python.org (andrew.kuchling) Date: Wed, 23 Sep 2009 01:11:28 -0000 Subject: [Python-checkins] r75036 - in sandbox/trunk/faq: library.rst windows.rst Message-ID: Author: andrew.kuchling Date: Wed Sep 23 03:11:28 2009 New Revision: 75036 Log: Re-title some sections Modified: sandbox/trunk/faq/library.rst sandbox/trunk/faq/windows.rst Modified: sandbox/trunk/faq/library.rst ============================================================================== --- sandbox/trunk/faq/library.rst (original) +++ sandbox/trunk/faq/library.rst Wed Sep 23 03:11:28 2009 @@ -1,6 +1,6 @@ ==================================== -Python Library and Extension FAQ +Library and Extension FAQ ==================================== .. contents:: Modified: sandbox/trunk/faq/windows.rst ============================================================================== --- sandbox/trunk/faq/windows.rst (original) +++ sandbox/trunk/faq/windows.rst Wed Sep 23 03:11:28 2009 @@ -1,6 +1,6 @@ ==================================== -Python Windows FAQ +Python on Windows FAQ ==================================== .. contents:: From python-checkins at python.org Wed Sep 23 03:35:56 2009 From: python-checkins at python.org (andrew.kuchling) Date: Wed, 23 Sep 2009 01:35:56 -0000 Subject: [Python-checkins] r75037 - in sandbox/trunk/faq: general.rst installed.rst Message-ID: Author: andrew.kuchling Date: Wed Sep 23 03:35:56 2009 New Revision: 75037 Log: Update various questions Modified: sandbox/trunk/faq/general.rst sandbox/trunk/faq/installed.rst Modified: sandbox/trunk/faq/general.rst ============================================================================== --- sandbox/trunk/faq/general.rst (original) +++ sandbox/trunk/faq/general.rst Wed Sep 23 03:35:56 2009 @@ -22,9 +22,44 @@ under MS-DOS, Windows, Windows NT, and OS/2. To find out more, start -with the `Beginner's Guide to Python `_. +with :ref:`tutorial-index`. The +`Beginner's Guide to Python `_ +links to other introductory tutorials and resources for learning Python. +What is the Python Software Foundation? +----------------------------------------- + +The Python Software Foundation is an independent non-profit +organization that holds the copyright on Python versions 2.1 and +newer. The PSF's mission is to advance open source technology related +to the Python programming language and to publicize the use of +Python. The PSF's home page is at http://www.python.org/psf/. + +Donations to the PSF are tax-exempt in the US. If you use Python and +find it helpful, please contribute via `the PSF donation page +`_. + +Are there copyright restrictions on the use of Python? +-------------------------------------------------------------- + +You can do anything you want with the source, as long as +you leave the copyrights in and display those copyrights in any +documentation about Python that you produce. If you honor the +copyright rules, it's OK to use Python for commercial use, to sell +copies of Python in source or binary form (modified or unmodified), or +to sell products that incorporate Python in some form. We would still +like to know about all commercial use of Python, of course. + +See `the PSF license page `_ +to find further explanations and a link to the full text of the +license. + +The Python logo is trademarked, and in certain cases permission +is required to use it. Consult +`the Trademark Usage Policy `__ +for more information. + Why was Python created in the first place? -------------------------------------------------- Here's a *very* brief summary of what started it all, written @@ -80,8 +115,7 @@ XML-RPC, POP, IMAP, CGI programming), software engineering (unit testing, logging, profiling, parsing Python code), and operating system interfaces (system calls, filesystems, TCP/IP sockets). Look at the -table of contents for `the Library Reference -`_ to get an idea of what's available. +table of contents for :ref:`library-index` to get an idea of what's available. A wide variety of third-party extensions are also available. Consult `the Python Package Index `_ to find packages of interest to you. @@ -123,34 +157,18 @@ ``sys.version_info``. -Are there copyright restrictions on the use of Python? --------------------------------------------------------------- - -Not really. You can do anything you want with the source, as long as -you leave the copyrights in and display those copyrights in any -documentation about Python that you produce. If you honor the -copyright rules, it's OK to use Python for commercial use, to sell -copies of Python in source or binary form (modified or unmodified), or -to sell products that incorporate Python in some form. We would still -like to know about all commercial use of Python, of course. - -See `the PSF license page `_ -to find further explanations and a link to the full text of the -license. - - How do I obtain a copy of the Python source? --------------------------------------------------- The latest Python source distribution is always available from python.org, at http://www.python.org/download/. The latest development sources can be obtained via anonymous Subversion -at http://svn.python.org/projects/python/trunk +at http://svn.python.org/projects/python/trunk. The source distribution is a gzipped tar file containing the complete -C source, LaTeX documentation, Python library modules, example +C source, Sphinx-formatted documentation, Python library modules, example programs, and several useful pieces of freely distributable software. -This will compile and run out of the box on most UNIX platforms. +The source will compile and run out of the box on most UNIX platforms. Consult the `Developer FAQ `__ for more information on getting the source code and compiling it. @@ -158,11 +176,8 @@ How do I get documentation on Python? -------------------------------------------- -All documentation is available on-line, starting at -http://www.python.org/doc/. - The standard documentation for the current stable version of Python is -also available at http://docs.python.org/. PDF and downloadable HTML +available at http://docs.python.org/. PDF, plain text, and downloadable HTML versions are also available. The documentation is written using @@ -174,16 +189,12 @@ I've never programmed before. Is there a Python tutorial? ----------------------------------------------------------------- -There are numerous tutorials and books available. Consult `the -Beginner's Guide `_ to find -information for beginning Python programmers, including lists of -tutorials. - -Are there other FTP sites that mirror the Python distribution? ---------------------------------------------------------------------- +There are numerous tutorials and books available. +The standard documentation includes +:ref:`tutorial-index`. -Mirroring has been discontinued as of March 15, 2007. Please -`download here `_. +Consult `the Beginner's Guide `_ to find information for +beginning Python programmers, including lists of tutorials. Is there a newsgroup or mailing list devoted to Python? -------------------------------------------------------------- @@ -210,7 +221,7 @@ Alpha and beta releases are available from http://www.python.org/download/. All releases are announced on the comp.lang.python and comp.lang.python.announce newsgroups and on the -Python home page, at http://www.python.org/; an RSS feed of news is +Python home page at http://www.python.org/; an RSS feed of news is available. You can also access the development version of Python through Subversion. @@ -236,8 +247,8 @@ --------------------------------------------------------------------------- It's probably best to cite your favorite book about Python. -The very first article about Python is this very old article -that's now quite outdated. +The very first article about Python was written in 1991 and is now +quite outdated. Guido van Rossum and Jelke de Boer, "Interactively Testing Remote Servers Using the Python Programming Language", CWI Quarterly, Volume @@ -266,12 +277,11 @@ Why is it called Python? ------------------------------- -At the time when he began implementing Python, Guido van Rossum was -also reading the published scripts from "Monty Python's Flying Circus" -(a BBC comedy series from the seventies, in the unlikely case you -didn't know). It occurred to him that he needed a name that was -short, unique, and slightly mysterious, so he decided to call the -language Python. +When he began implementing Python, Guido van Rossum was also reading +the published scripts from `"Monty Python's Flying Circus" +`__, a BBC comedy series from the 1970s. Van +Rossum thought he needed a name that was short, unique, and slightly +mysterious, so he decided to call the language Python. @@ -291,12 +301,12 @@ 6 to 18 months since 1991, and this seems likely to continue. Currently there are usually around 18 months between major releases. -With the introduction of retrospective "bugfix" releases the stability -of existing releases is being improved. Bugfix releases, indicated by -a third component of the version number (e.g. 2.1.3, 2.2.2), are -managed for stability; only fixes for known problems are included in a -bugfix release, and it's guaranteed that interfaces will remain the -same throughout a series of bugfix releases. +The developers issue "bugfix" releases of older versions, so the +stability of existing releases gradually improves. Bugfix releases, +indicated by a third component of the version number (e.g. 2.5.3, +2.6.2), are managed for stability; only fixes for known problems are +included in a bugfix release, and it's guaranteed that interfaces will +remain the same throughout a series of bugfix releases. The `2.6.2 release `_ is recommended production-ready version at this point in time. Python 3.1 is also considered production-ready, but may be @@ -308,14 +318,16 @@ How many people are using Python? ---------------------------------------- -Probably tens of thousands of users, though it's difficult to obtain -an exact count. Python is available for free download, so there are -no sales figures, and it's available from many different sites and -packaged with many Linux distributions, so download statistics don't -tell the whole story either. The comp.lang.python newsgroup is very -active, but not all Python users post to the group or even read it. -Overall there is no accurate estimate of the number of subscribers or -Python users. +There are probably tens of thousands of users, though it's difficult +to obtain an exact count. + +Python is available for free download, so there are no sales figures, +and it's available from many different sites and packaged with many +Linux distributions, so download statistics don't tell the whole story +either. + +The comp.lang.python newsgroup is very active, but not all Python +users post to the group or even read it. Have any significant projects been done in Python? --------------------------------------------------------- @@ -331,7 +343,7 @@ notably `Red Hat `_, have written part or all of their installer and system administration software in Python. Companies that use Python internally include Google, -Yahoo, and Industrial Light & Magic. +Yahoo, and Lucasfilm Ltd. What new developments are expected for Python in the future? @@ -340,12 +352,10 @@ See http://www.python.org/dev/peps/ for the Python Enhancement Proposals (PEPs). PEPs are design documents describing a suggested new feature for Python, providing a concise technical specification and a -rationale. -`PEP 1 `_ -explains the PEP process and PEP format; read it -first if you want to submit a PEP. +rationale. Look for a PEP titled "Python X.Y Release Schedule", +where X.Y is a version that hasn't been publicly released yet. -New developments are discussed on `the python-dev mailing list `_. +New development is discussed on `the python-dev mailing list `_. Is it reasonable to propose incompatible changes to Python? @@ -357,31 +367,18 @@ upon. Even if you can provide a conversion program, there's still the problem of updating all documentation; many books have been written about Python, and we don't want to invalidate them all at a -single stroke. +single stroke. Providing a gradual upgrade path is necessary if a feature has to be changed. `PEP 5 `_ describes the procedure followed for introducing backward-incompatible changes while minimizing disruption for users. - -What is the Python Software Foundation? ------------------------------------------ - -The Python Software Foundation is an independent non-profit -organization that holds the copyright on Python versions 2.1 and -newer. The PSF's mission is to advance open source technology related -to the Python programming language and to publicize the use of -Python. The PSF's home page is at http://www.python.org/psf/. - -Donations to the PSF are tax-exempt in the US. If you use Python and -find it helpful, please contribute via `the PSF donation page -`_. - - - Is Python Y2K (Year 2000) Compliant? -------------------------------------------- + +.. remove this question? + As of August, 2003 no major problems have been reported and Y2K compliance seems to be a non-issue. @@ -421,7 +418,7 @@ Yes. -It is still common to start students with a procedural (subset of a) +It is still common to start students with a procedural and statically typed language such as Pascal, C, or a subset of C++ or Java. Students may be better served by learning Python as their first language. Python has a very simple and consistent syntax and a large @@ -483,7 +480,7 @@ http://www.python.org/editors/ for a full list of Python editing environments. -If you want to discuss Python's use in education, then you may +If you want to discuss Python's use in education, you may be interested in joining `the edu-sig mailing list `_. Upgrading Python @@ -492,6 +489,8 @@ What is this bsddb185 module my application keeps complaining about? -------------------------------------------------------------------- +.. XXX remove this question? + Starting with Python2.3, the distribution includes the `PyBSDDB package ` as a replacement for the old bsddb module. It includes functions which provide backward compatibility at the API level, Modified: sandbox/trunk/faq/installed.rst ============================================================================== --- sandbox/trunk/faq/installed.rst (original) +++ sandbox/trunk/faq/installed.rst Wed Sep 23 03:35:56 2009 @@ -10,9 +10,9 @@ applications. It's used in some high schools and colleges as an introductory programming language because Python is easy to learn, but it's also used by professional software developers at places such as Google, -NASA, and Industrial Light & Magic. +NASA, and Lucasfilm Ltd. -If you're curious about finding out more about Python, start with the +If you wish to learn more about Python, start with the `Beginner's Guide to Python `_. @@ -29,8 +29,8 @@ * A third-party application installed on the machine might have been written in Python and included a Python installation. For a home computer, the most common such application is - `PySol `_, - a solitaire game that includes over 200 different games and variations. + `PySol `_, + a solitaire game that includes over 1000 different games and variations. * Some Windows machines also have Python installed. At this writing we're aware of computers from Hewlett-Packard and Compaq that include Python. Apparently some of HP/Compaq's administrative tools are written in Python. @@ -48,7 +48,7 @@ Control Panel. If Python was installed by a third-party application, you can also -remove it, but that application will no longer work. You should probably +remove it, but that application will no longer work. You should use that application's uninstaller rather than removing Python directly. If Python came with your operating system, removing it is not From ncoghlan at gmail.com Wed Sep 23 14:28:08 2009 From: ncoghlan at gmail.com (Nick Coghlan) Date: Wed, 23 Sep 2009 22:28:08 +1000 Subject: [Python-checkins] r75028 - in python/branches/py3k: Doc/library/functions.rst Lib/test/test_range.py Misc/NEWS Objects/rangeobject.c In-Reply-To: <4ab945f8.1b67f10a.02b5.ffffd432SMTPIN_ADDED@mx.google.com> References: <4ab945f8.1b67f10a.02b5.ffffd432SMTPIN_ADDED@mx.google.com> Message-ID: <4ABA1458.6090909@gmail.com> mark.dickinson wrote: > +static int > +range_contains(rangeobject *r, PyObject *ob) { > + if (PyLong_Check(ob)) { Could we be a little more generous here and use operator.index? Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- From dickinsm at gmail.com Wed Sep 23 15:00:07 2009 From: dickinsm at gmail.com (Mark Dickinson) Date: Wed, 23 Sep 2009 14:00:07 +0100 Subject: [Python-checkins] r75028 - in python/branches/py3k: Doc/library/functions.rst Lib/test/test_range.py Misc/NEWS Objects/rangeobject.c In-Reply-To: <4ABA1458.6090909@gmail.com> References: <4ab945f8.1b67f10a.02b5.ffffd432SMTPIN_ADDED@mx.google.com> <4ABA1458.6090909@gmail.com> Message-ID: <5c6f2a5d0909230600w55035aaal395b2940b0ea5031@mail.gmail.com> On Wed, Sep 23, 2009 at 1:28 PM, Nick Coghlan wrote: > mark.dickinson wrote: >> +static int >> +range_contains(rangeobject *r, PyObject *ob) { >> + ? ?if (PyLong_Check(ob)) { > > Could we be a little more generous here and use operator.index? But that would be a behaviour change; is that desirable? E.g., Python 3.2a0 (py3k:74790, Sep 23 2009, 13:57:45) [GCC 4.2.1 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class C: ... def __index__(self): return 3 ... def __eq__(self, other): return True ... >>> C() in range(0, 10, 2) True (Strictly speaking, I guess this patch is already a behaviour change for subclasses of int that override __eq__ in weird ways). Mark From dickinsm at gmail.com Wed Sep 23 15:04:14 2009 From: dickinsm at gmail.com (Mark Dickinson) Date: Wed, 23 Sep 2009 14:04:14 +0100 Subject: [Python-checkins] r75028 - in python/branches/py3k: Doc/library/functions.rst Lib/test/test_range.py Misc/NEWS Objects/rangeobject.c In-Reply-To: <5c6f2a5d0909230600w55035aaal395b2940b0ea5031@mail.gmail.com> References: <4ab945f8.1b67f10a.02b5.ffffd432SMTPIN_ADDED@mx.google.com> <4ABA1458.6090909@gmail.com> <5c6f2a5d0909230600w55035aaal395b2940b0ea5031@mail.gmail.com> Message-ID: <5c6f2a5d0909230604s683fec6fxf1857f8b8fc7ef5e@mail.gmail.com> On Wed, Sep 23, 2009 at 2:00 PM, Mark Dickinson wrote: > On Wed, Sep 23, 2009 at 1:28 PM, Nick Coghlan wrote: >> mark.dickinson wrote: >>> +static int >>> +range_contains(rangeobject *r, PyObject *ob) { >>> + ? ?if (PyLong_Check(ob)) { >> >> Could we be a little more generous here and use operator.index? > > But that would be a behaviour change; ?is that desirable? ?E.g., > [...] More to the point, would it be acceptable for x in range(0, 10, 2) and x in list(range(0, 10, 2)) to return different results? Mark From g.brandl at gmx.net Wed Sep 23 15:14:10 2009 From: g.brandl at gmx.net (Georg Brandl) Date: Wed, 23 Sep 2009 15:14:10 +0200 Subject: [Python-checkins] r75028 - in python/branches/py3k: Doc/library/functions.rst Lib/test/test_range.py Misc/NEWS Objects/rangeobject.c In-Reply-To: <5c6f2a5d0909230604s683fec6fxf1857f8b8fc7ef5e@mail.gmail.com> References: <4ab945f8.1b67f10a.02b5.ffffd432SMTPIN_ADDED@mx.google.com> <4ABA1458.6090909@gmail.com> <5c6f2a5d0909230600w55035aaal395b2940b0ea5031@mail.gmail.com> <5c6f2a5d0909230604s683fec6fxf1857f8b8fc7ef5e@mail.gmail.com> Message-ID: Mark Dickinson schrieb: > On Wed, Sep 23, 2009 at 2:00 PM, Mark Dickinson wrote: >> On Wed, Sep 23, 2009 at 1:28 PM, Nick Coghlan wrote: >>> mark.dickinson wrote: >>>> +static int >>>> +range_contains(rangeobject *r, PyObject *ob) { >>>> + if (PyLong_Check(ob)) { >>> >>> Could we be a little more generous here and use operator.index? >> >> But that would be a behaviour change; is that desirable? E.g., >> [...] > > More to the point, would it be acceptable for > > x in range(0, 10, 2) > > and > > x in list(range(0, 10, 2)) > > to return different results? IMO, that should not be acceptable. We cannot prevent __contains__ for user-defined types from doing something different from comparing to the items that are yielded when the object is iterated over, but core types should not introduce such confusing behavior. Georg From python-checkins at python.org Wed Sep 23 20:33:48 2009 From: python-checkins at python.org (matthias.klose) Date: Wed, 23 Sep 2009 18:33:48 -0000 Subject: [Python-checkins] r75038 - in python/branches/release26-maint: Misc/NEWS Modules/_ctypes/libffi/src/arm/sysv.S Message-ID: Author: matthias.klose Date: Wed Sep 23 20:33:48 2009 New Revision: 75038 Log: - Issue #6980: Fix ctypes build failure on armel-linux-gnueabi with -mfloat-abi=softfp. Modified: python/branches/release26-maint/Misc/NEWS python/branches/release26-maint/Modules/_ctypes/libffi/src/arm/sysv.S Modified: python/branches/release26-maint/Misc/NEWS ============================================================================== --- python/branches/release26-maint/Misc/NEWS (original) +++ python/branches/release26-maint/Misc/NEWS Wed Sep 23 20:33:48 2009 @@ -281,6 +281,9 @@ Build ----- +- Issue #6980: Fix ctypes build failure on armel-linux-gnueabi with + -mfloat-abi=softfp. + - Issue #6802: Fix build issues on MacOSX 10.6 - Issue 5390: Add uninstall icon independent of whether file Modified: python/branches/release26-maint/Modules/_ctypes/libffi/src/arm/sysv.S ============================================================================== --- python/branches/release26-maint/Modules/_ctypes/libffi/src/arm/sysv.S (original) +++ python/branches/release26-maint/Modules/_ctypes/libffi/src/arm/sysv.S Wed Sep 23 20:33:48 2009 @@ -67,11 +67,18 @@ #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \ - || defined(__ARM_ARCH_6ZK__) + || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) \ + || defined(__ARM_ARCH_6M__) # undef __ARM_ARCH__ # define __ARM_ARCH__ 6 #endif +#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ + || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) +# undef __ARM_ARCH__ +# define __ARM_ARCH__ 7 +#endif + #if __ARM_ARCH__ >= 5 # define call_reg(x) blx x #elif defined (__ARM_ARCH_4T__) @@ -189,7 +196,7 @@ @ return INT cmp r3, #FFI_TYPE_INT -#ifdef __SOFTFP__ +#if defined(__SOFTFP__) || defined(__ARM_EABI__) cmpne r3, #FFI_TYPE_FLOAT #endif streq r0, [r2] @@ -197,12 +204,12 @@ @ return INT64 cmp r3, #FFI_TYPE_SINT64 -#ifdef __SOFTFP__ +#if defined(__SOFTFP__) || defined(__ARM_EABI__) cmpne r3, #FFI_TYPE_DOUBLE #endif stmeqia r2, {r0, r1} -#ifndef __SOFTFP__ +#if !defined(__SOFTFP__) && !defined(__ARM_EABI__) beq LSYM(Lepilogue) @ return FLOAT @@ -245,21 +252,21 @@ beq .Lretint cmp r0, #FFI_TYPE_FLOAT -#ifdef __SOFTFP__ +#if defined(__SOFTFP__) || defined(__ARM_EABI__) beq .Lretint #else beq .Lretfloat #endif cmp r0, #FFI_TYPE_DOUBLE -#ifdef __SOFTFP__ +#if defined(__SOFTFP__) || defined(__ARM_EABI__) beq .Lretlonglong #else beq .Lretdouble #endif cmp r0, #FFI_TYPE_LONGDOUBLE -#ifdef __SOFTFP__ +#if defined(__SOFTFP__) || defined(__ARM_EABI__) beq .Lretlonglong #else beq .Lretlongdouble @@ -278,7 +285,7 @@ ldr r1, [sp, #4] b .Lclosure_epilogue -#ifndef __SOFTFP__ +#if !defined(__SOFTFP__) && !defined(__ARM_EABI__) .Lretfloat: ldfs f0, [sp] b .Lclosure_epilogue From python-checkins at python.org Wed Sep 23 23:36:39 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 23 Sep 2009 21:36:39 -0000 Subject: [Python-checkins] r75039 - python/trunk/Doc/library/fnmatch.rst Message-ID: Author: ezio.melotti Date: Wed Sep 23 23:36:39 2009 New Revision: 75039 Log: improved phrasing, markup and example Modified: python/trunk/Doc/library/fnmatch.rst Modified: python/trunk/Doc/library/fnmatch.rst ============================================================================== --- python/trunk/Doc/library/fnmatch.rst (original) +++ python/trunk/Doc/library/fnmatch.rst Wed Sep 23 23:36:39 2009 @@ -37,11 +37,12 @@ .. function:: fnmatch(filename, pattern) - Test whether the *filename* string matches the *pattern* string, returning true - or false. If the operating system is case-insensitive, then both parameters - will be normalized to all lower- or upper-case before the comparison is - performed. If you require a case-sensitive comparison regardless of whether - that's standard for your operating system, use :func:`fnmatchcase` instead. + Test whether the *filename* string matches the *pattern* string, returning + :const:`True` or :const:`False`. If the operating system is case-insensitive, + then both parameters will be normalized to all lower- or upper-case before + the comparison is performed. :func:`fnmatchcase` can be used to perform a + case-sensitive comparison, regardless of whether that's standard for the + operating system. This example will print all file names in the current directory with the extension ``.txt``:: @@ -56,8 +57,8 @@ .. function:: fnmatchcase(filename, pattern) - Test whether *filename* matches *pattern*, returning true or false; the - comparison is case-sensitive. + Test whether *filename* matches *pattern*, returning :const:`True` or + :const:`False`; the comparison is case-sensitive. .. function:: filter(names, pattern) @@ -80,7 +81,7 @@ >>> regex '.*\\.txt$' >>> reobj = re.compile(regex) - >>> print reobj.match('foobar.txt') + >>> reobj.match('foobar.txt') <_sre.SRE_Match object at 0x...> From python-checkins at python.org Wed Sep 23 23:39:50 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 23 Sep 2009 21:39:50 -0000 Subject: [Python-checkins] r75040 - in python/branches/release26-maint: Doc/library/fnmatch.rst Message-ID: Author: ezio.melotti Date: Wed Sep 23 23:39:50 2009 New Revision: 75040 Log: Merged revisions 75039 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75039 | ezio.melotti | 2009-09-24 00:36:39 +0300 (Thu, 24 Sep 2009) | 1 line improved phrasing, markup and example ........ Modified: python/branches/release26-maint/ (props changed) python/branches/release26-maint/Doc/library/fnmatch.rst Modified: python/branches/release26-maint/Doc/library/fnmatch.rst ============================================================================== --- python/branches/release26-maint/Doc/library/fnmatch.rst (original) +++ python/branches/release26-maint/Doc/library/fnmatch.rst Wed Sep 23 23:39:50 2009 @@ -37,11 +37,12 @@ .. function:: fnmatch(filename, pattern) - Test whether the *filename* string matches the *pattern* string, returning true - or false. If the operating system is case-insensitive, then both parameters - will be normalized to all lower- or upper-case before the comparison is - performed. If you require a case-sensitive comparison regardless of whether - that's standard for your operating system, use :func:`fnmatchcase` instead. + Test whether the *filename* string matches the *pattern* string, returning + :const:`True` or :const:`False`. If the operating system is case-insensitive, + then both parameters will be normalized to all lower- or upper-case before + the comparison is performed. :func:`fnmatchcase` can be used to perform a + case-sensitive comparison, regardless of whether that's standard for the + operating system. This example will print all file names in the current directory with the extension ``.txt``:: @@ -56,8 +57,8 @@ .. function:: fnmatchcase(filename, pattern) - Test whether *filename* matches *pattern*, returning true or false; the - comparison is case-sensitive. + Test whether *filename* matches *pattern*, returning :const:`True` or + :const:`False`; the comparison is case-sensitive. .. function:: filter(names, pattern) @@ -80,7 +81,7 @@ >>> regex '.*\\.txt$' >>> reobj = re.compile(regex) - >>> print reobj.match('foobar.txt') + >>> reobj.match('foobar.txt') <_sre.SRE_Match object at 0x...> From python-checkins at python.org Wed Sep 23 23:42:25 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 23 Sep 2009 21:42:25 -0000 Subject: [Python-checkins] r75041 - in python/branches/py3k: Doc/library/fnmatch.rst Message-ID: Author: ezio.melotti Date: Wed Sep 23 23:42:25 2009 New Revision: 75041 Log: Merged revisions 75039 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75039 | ezio.melotti | 2009-09-24 00:36:39 +0300 (Thu, 24 Sep 2009) | 1 line improved phrasing, markup and example ........ Modified: python/branches/py3k/ (props changed) python/branches/py3k/Doc/library/fnmatch.rst Modified: python/branches/py3k/Doc/library/fnmatch.rst ============================================================================== --- python/branches/py3k/Doc/library/fnmatch.rst (original) +++ python/branches/py3k/Doc/library/fnmatch.rst Wed Sep 23 23:42:25 2009 @@ -36,11 +36,12 @@ .. function:: fnmatch(filename, pattern) - Test whether the *filename* string matches the *pattern* string, returning true - or false. If the operating system is case-insensitive, then both parameters - will be normalized to all lower- or upper-case before the comparison is - performed. If you require a case-sensitive comparison regardless of whether - that's standard for your operating system, use :func:`fnmatchcase` instead. + Test whether the *filename* string matches the *pattern* string, returning + :const:`True` or :const:`False`. If the operating system is case-insensitive, + then both parameters will be normalized to all lower- or upper-case before + the comparison is performed. :func:`fnmatchcase` can be used to perform a + case-sensitive comparison, regardless of whether that's standard for the + operating system. This example will print all file names in the current directory with the extension ``.txt``:: @@ -55,8 +56,8 @@ .. function:: fnmatchcase(filename, pattern) - Test whether *filename* matches *pattern*, returning true or false; the - comparison is case-sensitive. + Test whether *filename* matches *pattern*, returning :const:`True` or + :const:`False`; the comparison is case-sensitive. .. function:: filter(names, pattern) @@ -77,7 +78,7 @@ >>> regex '.*\\.txt$' >>> reobj = re.compile(regex) - >>> print(reobj.match('foobar.txt')) + >>> reobj.match('foobar.txt') <_sre.SRE_Match object at 0x...> From python-checkins at python.org Wed Sep 23 23:44:27 2009 From: python-checkins at python.org (ezio.melotti) Date: Wed, 23 Sep 2009 21:44:27 -0000 Subject: [Python-checkins] r75042 - in python/branches/release31-maint: Doc/library/fnmatch.rst Message-ID: Author: ezio.melotti Date: Wed Sep 23 23:44:27 2009 New Revision: 75042 Log: Merged revisions 75041 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ................ r75041 | ezio.melotti | 2009-09-24 00:42:25 +0300 (Thu, 24 Sep 2009) | 9 lines Merged revisions 75039 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r75039 | ezio.melotti | 2009-09-24 00:36:39 +0300 (Thu, 24 Sep 2009) | 1 line improved phrasing, markup and example ........ ................ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/library/fnmatch.rst Modified: python/branches/release31-maint/Doc/library/fnmatch.rst ============================================================================== --- python/branches/release31-maint/Doc/library/fnmatch.rst (original) +++ python/branches/release31-maint/Doc/library/fnmatch.rst Wed Sep 23 23:44:27 2009 @@ -36,11 +36,12 @@ .. function:: fnmatch(filename, pattern) - Test whether the *filename* string matches the *pattern* string, returning true - or false. If the operating system is case-insensitive, then both parameters - will be normalized to all lower- or upper-case before the comparison is - performed. If you require a case-sensitive comparison regardless of whether - that's standard for your operating system, use :func:`fnmatchcase` instead. + Test whether the *filename* string matches the *pattern* string, returning + :const:`True` or :const:`False`. If the operating system is case-insensitive, + then both parameters will be normalized to all lower- or upper-case before + the comparison is performed. :func:`fnmatchcase` can be used to perform a + case-sensitive comparison, regardless of whether that's standard for the + operating system. This example will print all file names in the current directory with the extension ``.txt``:: @@ -55,8 +56,8 @@ .. function:: fnmatchcase(filename, pattern) - Test whether *filename* matches *pattern*, returning true or false; the - comparison is case-sensitive. + Test whether *filename* matches *pattern*, returning :const:`True` or + :const:`False`; the comparison is case-sensitive. .. function:: filter(names, pattern) @@ -77,7 +78,7 @@ >>> regex '.*\\.txt$' >>> reobj = re.compile(regex) - >>> print(reobj.match('foobar.txt')) + >>> reobj.match('foobar.txt') <_sre.SRE_Match object at 0x...> From python-checkins at python.org Thu Sep 24 07:53:25 2009 From: python-checkins at python.org (georg.brandl) Date: Thu, 24 Sep 2009 05:53:25 -0000 Subject: [Python-checkins] r75043 - in python/branches/release31-maint: Doc/howto/unicode.rst Message-ID: Author: georg.brandl Date: Thu Sep 24 07:53:19 2009 New Revision: 75043 Log: Merged revisions 74749 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r74749 | r.david.murray | 2009-09-12 05:09:02 +0200 (Sa, 12 Sep 2009) | 2 lines Fix typo. ........ Modified: python/branches/release31-maint/ (props changed) python/branches/release31-maint/Doc/howto/unicode.rst Modified: python/branches/release31-maint/Doc/howto/unicode.rst ============================================================================== --- python/branches/release31-maint/Doc/howto/unicode.rst (original) +++ python/branches/release31-maint/Doc/howto/unicode.rst Thu Sep 24 07:53:19 2009 @@ -544,7 +544,7 @@ The first list contains UTF-8-encoded filenames, and the second list contains the Unicode versions. -Note that in most occasions, the Uniode APIs should be used. The bytes APIs +Note that in most occasions, the Unicode APIs should be used. The bytes APIs should only be used on systems where undecodable file names can be present, i.e. Unix systems. From nnorwitz at gmail.com Thu Sep 24 11:42:04 2009 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 24 Sep 2009 05:42:04 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20090924094204.GA8917@python.psfb.org> More important issues: ---------------------- test_ssl leaked [420, 0, 0] references, sum=420 Less important issues: ---------------------- test_smtplib leaked [-190, 88, 3] references, sum=-99 test_sys leaked [-21, 0, 42] references, sum=21 test_threading leaked [48, 48, 48] references, sum=144 From python-checkins at python.org Thu Sep 24 13:43:13 2009 From: python-checkins at python.org (andrew.kuchling) Date: Thu, 24 Sep 2009 11:43:13 -0000 Subject: [Python-checkins] r75044 - in sandbox/trunk/dev: contributing.rst culture.rst faq.rst index.rst patches.rst process.rst setup.rst tools.rst why.rst workflow.rst Message-ID: Author: andrew.kuchling Date: Thu Sep 24 13:43:13 2009 New Revision: 75044 Log: Initial commit of dev. guide Added: sandbox/trunk/dev/ sandbox/trunk/dev/contributing.rst sandbox/trunk/dev/culture.rst sandbox/trunk/dev/faq.rst sandbox/trunk/dev/index.rst sandbox/trunk/dev/patches.rst sandbox/trunk/dev/process.rst sandbox/trunk/dev/setup.rst sandbox/trunk/dev/tools.rst sandbox/trunk/dev/why.rst sandbox/trunk/dev/workflow.rst Added: sandbox/trunk/dev/contributing.rst ============================================================================== --- (empty file) +++ sandbox/trunk/dev/contributing.rst Thu Sep 24 13:43:13 2009 @@ -0,0 +1,134 @@ + +============================== +How You Can Contribute +============================== + + +There are various ways one can contribute to Python and they do not all involve +knowing the internals of Python. Nor do they necessarily require writing +code! All it takes to contribute is a willing to learn and some free time. + +This document assumes you have already read how to get `set up`_ and how the +`issue workflow`_ works. + +.. _set up: /dev/setup/ +.. _issue workflow: /dev/workflow/ + + +Helping with the Documentation +============================== + +There is almost always something to help out with in terms of Python's +documentation_. If you have ever found something that was not completely clear +or wished there was an example to go along with some complex idea then you have +found something that could use improvement. Simply submit an issue with a patch +to fix the problem you had. + +If you want to help with a known issue with the documentation then look at the +`open documentation bugs +`_. +You can comment on documentation issues that have patches or write a patch to +fix an issue. See the `documentation guide +`_ on how Python's +documentation is written. + +.. _documentation: http://docs.python.org/dev/ + + +Writing Unit Tests +================== + +Python is far from having good coverage (roughly 90% and better) for all of its +code. It is always helpful to increase the coverage by writing more unit tests +to help raise the code coverage. An easy way to see what kind of coverage +exists for code is to look `here `_. + +Please realize, though, that your patch may not be reviewed immediately! Since +Python is run entirely by open source developers who volunteer their time they +only have so many hours a week to look at issues in the tracker. It might be +quite some time until someone manages to free up enough time to get to your +patch. But do know that your help is still appreciated no matter how long we +take to get to your work! + + +Fixing Bugs +=========== + +If you simply look at the `open bugs +`_ +on the `issue tracker`_ you will notice help is always needed. By writing a +solid patch for a bug you make it so that the core developers do not have to +spend what little time they have fixing a bug but instead doing patch reviews +which are almost always a better use of time. Just make sure to follow what is +outlined in the `issue workflow`_ for what is required of a good patch. + +And you do not need to know C or how Python's intepreter works to contribute! +Simply restrict your search in the issue tracker to only a specific *component* +that requires only a certain skill set. For instance, +if you are looking for an explicitly `easy issue +`_ that should take no more +than a day (about the length of a bug day) to work on they are +flagged in the issue tracker as such. If you are comfortable with working in +Python code you can look at issues pertaining to `Lib +`_ +or other components that are inherently only Python code. If you are +comfortable with `extension modules +`_ +you can find issues pertaining to those. +And when you are ready to learn the internal details of Python you can tackle +issues related to the `interpreter core +`_. +There are other components you can narrow your search on as well if you so +choose. Just play around with the search feature of the issue tracker to find a +list of issues you might be interested at looking into. + +Please realize that while your patch is greatly appreciated, it may be some +time before a core developer gets around to looking at your patch. It is simply +an issue of someone having the free time and expertise to look at your work in +order to review it and commit it. + + +Triaging Issues +=============== + +While Python is a very solid piece of software, bugs are found. Plus people are +always suggesting new features through patches, improving existing code, etc. +This leads to a lost of issues being created in the `issue tracker`_. Help is +always appreciated to go through issues and perform triage by following what is +discussed in the `issue workflow`_. This ranges from helping validate a bug +exists in Python's in-development version to reviewing patches. + +If you have helped out in the issue tracker for a little while or have been a +good participant on python-dev you may ask for Developer privileges on the +tracker which allow you to change any and all metadata on an issue. +Please don't be shy about asking for the privilege! We are more liberal with +giving out this ability than with commit privileges so don't feel like you have +to have been contributing for a year to gain this ability. And with Developer +privileges you can work more autonomously and be an even greater help by +narrowing down what issues on the tracker deserve the most attention at any one +time. + +.. _issue tracker: http://bugs.python.org/ + + +Become a Core Developer +======================= + +To become a core developer and gain commit privileges for Python you typically +need to have been an active developer on Python through the issue tracker and +shown the ability to develop top-quality patches that require little or no +input or changes from a core developer. Typically people take about a year to +reach this level; some people get there faster, others longer. It can +be short-circuited, though, if a core developer is willing to shepherd you +through the process, but this is typically reserved for special situations like +`GSoC/GHOP `_. Essentially if a core developer is +willing to vouch for you and initially take personal responsibility for your +actions as a developer you can gain commit privileges that way. + +When you think you have been submitting patches regularly that have not required +much feedback from a core developer you can email python-dev requesting commit +privileges. If it is decided you are ready then you mail your SSH 2 key (see +the `dev FAQ`_ on how to do this) to python-dev and you will receive your +commit privileges. + +.. _dev FAQ: /dev/faq/ Added: sandbox/trunk/dev/culture.rst ============================================================================== --- (empty file) +++ sandbox/trunk/dev/culture.rst Thu Sep 24 13:43:13 2009 @@ -0,0 +1,70 @@ +==================== +Python Culture +==================== + +Each software project has its own culture and style, its own +approach to solving problems. Python has its own distinctive style, +of course, and if you're a Python user, that style has probably rubbed +off on you to some extent. Python tries to keep things simple, to be +orthogonal but not too much so, and to assist the programmer as much +as possible. + +The first and most important thing is to be friendly, even (I +should say *especially*) with people who disagree with you. +Other people are not idiots just because they disagree with you, so +don't call them idiots. Rudeness and flaming, especially on +python-dev, is a fast way to get ignored. Have a sense of humour, and +don't take things too seriously. + +Another useful skill is to know when to give up. If a thread has +gone on for dozens or hundreds of posts with no clear consensus +emerging, one of two things will happen. Either Guido will make a +BDFL pronouncement, which consists of him saying "We'll do it this +way", or he's given up on the thread and isn't reading it at all any +more. In either case, there's little point in continuing the +discussion. + +Design Principles +================= + + +In June 1999, Tim Peters channeled Guido and listed 19 guiding +principles for Python's design in a `comp.lang.python `_ posting. The +principles shouldn't be taken too seriously, as they're not +hard-and-fast constraints and for each rule you can probably list +instances where it's been broken. Still, no one has had much +disagreement with this list of design criteria. + +* Beautiful is better than ugly. +* Explicit is better than implicit. +* Simple is better than complex. +* Complex is better than complicated. +* Flat is better than nested. +* Sparse is better than dense. +* Readability counts. +* Special cases aren't special enough to break the rules. +* Although practicality beats purity. +* Errors should never pass silently. +* Unless explicitly silenced. +* In the face of ambiguity, refuse the temptation to guess. +* There should be one -- and preferably only one -- obvious way to do it. +* Although that way may not be obvious at first unless you're Dutch. +* Now is better than never. +* Although never is often better than *right* now. +* If the implementation is hard to explain, it's a bad idea. +* If the implementation is easy to explain, it may be a good idea. +* Namespaces are one honking great idea -- let's do more of those! + +Don't take these 19 aphorisms too seriously -- tattooing them on your +body is probably a bad idea, for example -- but it's instructive to +contemplate them. Some parallels can be drawn to the guiding +principles of extreme programming, most notably the emphasis on "Do +the simplest thing that can possibly work". + +Another principle is "Correctness and clarity before speed." Most +of the code in the Python interpreter and standard library is written +in a very straightforward style. The developers aren't interested in +making the interpreter run faster at the expense of unreadable or +hard-to-follow tricky code. In the past working patches have been +rejected because they would have made the code too difficult to +maintain. Added: sandbox/trunk/dev/faq.rst ============================================================================== --- (empty file) +++ sandbox/trunk/dev/faq.rst Thu Sep 24 13:43:13 2009 @@ -0,0 +1,1021 @@ + +:Title: Frequently Asked Questions for Python Developers +:Date: $Date: 2009-07-23 06:21:27 -0400 (Thu, 23 Jul 2009) $ +:Version: $Revision: 10931 $ +:Web site: http://www.python.org/dev/faq/ + +.. contents:: :depth: 3 +.. sectnum:: + +General Information +===================================================================== + +Where do I start? +----------------- + +There are various links of the `dev page`_ to documents to help get you +started. + +.. _dev page: /dev/ + + +How can I become a developer? +--------------------------------------------------------------------------- + +One way to become a developer is through the +`School of Hard Knocks `_. + +Otherwise just contribute on a regular basis through patches and just ask for +commit privileges once you have helped out enough that other developers tire of +doing commits for you. + + +Version Control +================================== + +Where can I learn about the version control system used, Subversion (svn)? +------------------------------------------------------------------------------- + +`Subversion`_ has its official web site at http://subversion.tigris.org/ (it +is also known as ``svn`` thanks to that being the name of the executable of +Subversion itself). A book on Subversion published by `O'Reilly Media`_, +`Version Control with Subversion`_, is available for free online. + +With Subversion installed, you can run the help tool that comes with +Subversion to get help:: + + svn help + +This will give you the needed information to use the tool. The man page for +``svn`` is rather scant and thus not worth reading. + +.. _Subversion: http://subversion.tigris.org/ +.. _O'Reilly Media: http://www.oreilly.com/ +.. _Version Control with Subversion: http://svnbook.red-bean.com/ + + +What do I need to use Subversion? +------------------------------------------------------------------------------- + +.. _download Subversion: http://subversion.tigris.org/getting.html + +UNIX +''''''''''''''''''' + +First, you need to `download Subversion`_. Most UNIX-based operating systems +have binary packages available for Subversion. Also, most package systems also +have Subversion available. + +If you have checkin rights, you need OpenSSH_. This is needed to verify +your identity when performing commits. + +.. _OpenSSH: http://www.openssh.org/ + +Windows +''''''''''''''''''' + +You have several options on Windows. One is to `download Subversion`_ itself +which will give you a command-line version. Another option is to `download +TortoiseSVN`_ which integrates with Windows Explorer. + +If you have checkin rights, you will also need an SSH client. +`Download PuTTY and friends`_ (PuTTYgen, Pageant, and Plink) for this. All +other questions in this FAQ will assume you are using these tools. + +Once you have both Subversion and PuTTY installed you must tell Subversion +where to find an SSH client. Do this by editing +``%APPDATA%\Subversion\config`` (on Win9x, this might be +``c:\windows\Application Data\Subversionconfig``) to have the following +section:: + + [tunnels] + ssh="c:/path/to/putty/plink.exe" -T + +Obviously change the path to be the proper one for your system. The ``-T`` +option prevents a pseudo-terminal from being created. + +You can use Pageant to prevent from having to type in your password for your +SSH 2 key constantly. If you prefer not to have another program running, +you need to create a profile in PuTTY. + +Go to Session:Saved Sessions and create a new profile named +``svn.python.org``. In Session:Host Name, enter ``svn.python.org``. In +SSH/Auth:Private key file select your private key. In Connection:Auto-login +username enter ``pythondev``. + +With this set up, paths are slightly different than most other settings in that +the username is not required. Do take notice of this when choosing to check +out a project! + +.. _download TortoiseSVN: http://tortoisesvn.tigris.org/download.html +.. _PuTTY: http://www.chiark.greenend.org.uk/~sgtatham/putty/ +.. _download PuTTY and friends: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html + + +How do I get a checkout of the repository (read-only and read-write)? +------------------------------------------------------------------------------- + +Regardless of whether you are checking out a read-only or read-write version of +the repository, the basic command is the same:: + + svn checkout [PATH] + +```` is the specified location of the project within the repository that +you would like to check out (those paths are discussed later). The optional +``[PATH]`` argument specifies the local directory to put the checkout into. If +left out then the tail part of ```` is used for the directory name. + +For a read-only checkout, the format of ```` is:: + + http://svn.python.org/projects/ + +with `` representing the path to the project. A list of projects can be +viewed at http://svn.python.org/view/ . Do note that any subdirectory may also +be checked out individually. + +For a read-write checkout (with a caveat for Windows users using PuTTY without +Pageant), the format for ```` is:: + + svn+ssh://pythondev at svn.python.org/ + +There are three critical differences between a read-only URL and a read-write +URL. One is the protocol being specified as ``svn+ssh`` and not ``http``. +Next, notice the addition of the username ``pythondev`` (*note* that for +Windows users using PuTTY without Pageant should leave off ``pythondev@`` if +PuTTY was set up following the instructions in this FAQ). Lastly, note that +``projects`` was removed from the path entirely for a read-write checkout. + +The repositories most people will be interested in are: + +=========== ============================================================== ========================================================================== +Repository read-only read-write +----------- -------------------------------------------------------------- -------------------------------------------------------------------------- +PEPs http://svn.python.org/projects/peps/trunk svn+ssh://pythondev at svn.python.org/peps/trunk +2.6 http://svn.python.org/projects/python/branches/release26-maint svn+ssh://pythondev at svn.python.org/python/branches/release26-maint +2.7 (trunk) http://svn.python.org/projects/python/trunk svn+ssh://pythondev at svn.python.org/python/trunk +3.1 http://svn.python.org/projects/python/branches/release31-maint svn+ssh://pythondev at svn.python.org/python/branches/release31-maint +3.2 http://svn.python.org/projects/python/branches/py3k svn+ssh://pythondev at svn.python.org/python/branches/py3k +=========== ============================================================== ========================================================================== + + +How do I update my working copy to be in sync with the repository? +------------------------------------------------------------------------------- + +Run:: + + svn update + +from the directory you wish to update (and all subdirectories). + + +How do I browse the source code through a web browser? +------------------------------------------------------------------------------- + +Visit http://svn.python.org/view/ to browse the Subversion repository. + + +Where can I find a downloadable snapshot of the source code? +------------------------------------------------------------------------------- + +Visit http://svn.python.org/snapshots/ to download a tarball containing a daily +snapshot of the repository. + + +Who has commit privileges on the Subversion repository? +------------------------------------------------------------------------------- + +See http://www.python.org/dev/committers for a list of committers. + + +How do I get commit privileges on the svn repository if I had the same privileges on the CVS repository? +--------------------------------------------------------------------------------------------------------- + +If you have established commit privileges as listed at +http://sourceforge.net/project/memberlist.php?group_id=5470 but do not have +them yet for the Subversion repository, then there are a few steps you must +take: + +#. Generate an SSH 2 public key +#. Email key and name (first and last required, middle optional) +#. Wait for verification email that the key has been installed +#. Verify access + + +How do I verify that my commit privileges are working? +------------------------------------------------------------------------------- + +UNIX +''''''''''''''''''' + +If you are listed as a committer at http://www.python.org/dev/committers , then +you should be able to execute:: + + ssh pythondev at svn.python.org + +and have the following print out to your terminal:: + + ( success ( 1 2 ( ANONYMOUS EXTERNAL ) ( edit-pipeline ) ) ) + +If something else is printed, then there is a problem with your SSH 2 public +key and you should contact pydotorg at python.org . + +Windows +''''''''''''''''''' + +If you are using Pageant, you can verify that your SSH 2 key is set up properly +by running:: + + c:\path\to\putty\plink.exe pythondev at svn.python.org + +Using the proper path to your PuTTY installation, you should get a response +from the server that says:: + + ( success ( 1 2 ( ANONYMOUS EXTERNAL ) ( edit-pipeline ) ) ) + +If there is a failure, run ``plink`` with ``-v`` to analyse the problem. + +If you are using a profile in PuTTY, the best way to test is to try to log in +through Open. + + +What configuration settings should I use? +------------------------------------------------------------------------------- + +Make sure the following settings are in your Subversion config file +(``~/.subversion/config`` under UNIX):: + + [miscellany] + enable-auto-props = yes + + [auto-props] + * = svn:eol-style=native + *.c = svn:keywords=Id + *.h = svn:keywords=Id + *.py = svn:keywords=Id + *.txt = svn:keywords=Author Date Id Revision + +The ``[auto-props]`` line specifies the beginning of the section in the config +file. The ``svn:eol-style`` setting tells Subversion to check out files using +the native line endings on your OS. It will also automatically convert line +endings upon committal so that they are consistent across all platforms. The +``svn:keywords`` settings are to automatically substitute ``$keyword$`` +arguments in files that match the pattern. ``*.txt`` has more options so as to +cover all needed keywords for PEPs_. + +The ``[miscellany]`` section and its one option make Subversion apply the +various rules in the ``[auto-props]`` section automatically to all added or +imported files into the respository. + +.. _PEPs: http://www.python.org/dev/peps/ + + +How do I add a file or directory to the repository? +------------------------------------------------------------------------------- + +Simply specify the path to the file or directory to add and run:: + + svn add PATH + +Subversion will skip any directories it already knows about. But if +you want new files that exist in any directories specified in ``PATH``, specify +``--force`` and Subversion will check *all* directories for new files. + +You will then need to run ``svn commit`` (as discussed in +`How do I commit a change to a file?`_) to commit the file to the repository. + + +How do I commit a change to a file? +------------------------------------------------------------------------------- + +To have any changes to a file (which include adding a new file or deleting an +existing one), you use the command:: + + svn commit [PATH] + +Although ``[PATH]`` is optional, if PATH is omitted all changes +in your local copy will be committed to the repository. +**DO NOT USE THIS!!!** You should specify the specific files +to be committed unless you are *absolutely* positive that +*all outstanding modifications* are meant to go in this commit. + +To abort a commit that you are in the middle of, perform a commit with no +message (i.e., close the text editor without adding any text for the message). +Subversion will ask if you want to abort the commit or not at that point. + +If you do not like the default text editor Subversion uses for +entering commmit messages, you may specify a different editor +in your Subversion config file with the +``editor-cmd`` option in the ``[helpers]`` section. + + +How do I delete a file or directory in the repository? +------------------------------------------------------------------------------- + +Specify the path to be removed with:: + + svn delete PATH + +Any modified files or files that are not checked in will not be deleted +in the working copy on your machine. + + +What files are modified locally in my working copy? +------------------------------------------------------------------------------- + +Running:: + + svn status [PATH] + +will list any differences between your working copy and the repository. Some +key indicators that can appear in the first column of output are: + += =========================== +A Scheduled to be added + +D Scheduled to be deleted + +M Modified locally + +? Not under version control += =========================== + + +How do I find out what Subversions properties are set for a file or directory? +------------------------------------------------------------------------------- + +:: + + svn proplist PATH + + +How do I revert a file I have modified back to the version in the respository? +------------------------------------------------------------------------------- + +Running:: + + svn revert PATH + +will change ``PATH`` to match the version in the repository, throwing away any +changes you made locally. If you run:: + + svn revert -R . + +from the root of your local repository it will recursively restore everything +to match up with the main server. + + +How do I find out who edited or what revision changed a line last? +------------------------------------------------------------------------------- + +You want:: + + svn blame PATH + +This will output to stdout every line of the file along with what revision +number last touched that line and who committed that revision. Since it is +printed to stdout, you probably want to pipe the output to a pager:: + + svn blame PATH | less + + +How can I see a list of log messages for a file or specific revision? +--------------------------------------------------------------------- + +To see the log messages for a specific file, run:: + + svn log PATH + +That will list all messages that pertain to the file specified in ``PATH``. + +If you want to view the log message for a specific revision, run:: + + svn log --verbose -r REV + +With ``REV`` substituted with the revision number. The ``--verbose`` flag +should be used to get a listing of all files modified in that revision. + + +How can I edit the log message of a committed revision? +------------------------------------------------------------------------------- + +Use:: + + svn propedit -r --revprop svn:log + +Replace ```` with the revision number of the commit whose log message +you wish to change. + + +How do I get a diff between the repository and my working copy for a file? +------------------------------------------------------------------------------- + +The diff between your working copy and what is in the repository can be had +with:: + + svn diff PATH + +This will work off the current revision in the repository. To diff your +working copy with a specific revision, do:: + + svn diff -r REV PATH + +Finally, to generate a diff between two specific revisions, use:: + + svn diff -r REV1:REV2 PATH + +Notice the ``:`` between ``REV1`` and ``REV2``. + + +How do I undo the changes made in a recent committal? +------------------------------------------------------------------------------- + +Assuming your bad revision is ``NEW`` and ``OLD`` is the equivalent of ``NEW +- 1``, then run:: + + svn merge -r NEW:OLD PATH + +This will revert *all* files back to their state in revision ``OLD``. +The reason that ``OLD`` is just ``NEW - 1`` is you do not want files to be +accidentally reverted to a state older than your changes, just to the point +prior. + +Note: PATH here refers to the top of the checked out repository, +not the full pathname to a file. PATH can refer to a different +branch when merging from the head, but it must still be the top +and not an individual file or subdirectory. + + +How do I update to a specific release tag? +------------------------------------------------------------------------------- + +Run:: + + svn list svn+ssh://pythondev at svn.python.org/python/tags + +or visit:: + + http://svn.python.org/view/python/tags/ + +to get a list of tags. To switch your current sandbox to a specific tag, +run:: + + svn switch svn+ssh://pythondev at svn.python.org/python/tags/r242 + +To just update to the revision corresponding to that tag without changing +the metadata for the repository, note the revision number corresponding to +the tag of interest and update to it, e.g.:: + + svn update -r 39619 + +What you probably want though, is the switch that sandbox to the tag's url:: + + svn switch svn+ssh://pythondev at svn.python.org/python/tags/r242 + + +Why should I use ``svn switch``? +------------------------------------------------------------------------------- + +You might find this small treatise by Giovanni Bajo in python-dev on the +``svn switch`` command helpful: + +If you realize that each file/directory in Subversion is uniquely identified +by a 2-space coordinate system [URL, revision] (given a checkout, you can +use "svn info" to get its coordinates), then we can say that "svn up -r N" +(for some revision number N) keeps the url unchanged and changes the +revision to whatever number you specified. In other words, you get the +state of the working copy URL at the time revision N was created. For +instance, if you execute it with revision 39619 within the trunk working +copy, you will get the trunk at the moment 2.4.2 was released. + +On the other hand, "svn switch" moves the URL: it basically "moves" your +checkout from [old_URL, revision] to [new_URL, HEAD], downloading the +minimal set of diffs to do so. If the new_URL is a tag URL +(e.g. .../tags/r242), it means any revision is good, since nobody is going +to commit into that directory (it will stay unchanged forever). So +[/tags/r242, HEAD] is the same as any other [/tags/r242, revision] (assuming +of course that /tags/r242 was already created at the time the revision was +created). + +If you want to create a sandbox corresponding to a particular release tag, +use svn switch to switch to [/tags/some_tag, HEAD] if you don't plan on +doing modifications. On the other hand if you want to make modifications to +a particular release branch, use svn switch to change to +[/branches/some_branch, HEAD]. + + +How do I create a branch? +------------------------- + +The best way is to do a server-side copy by specifying the URL for the source +of the branch, and the eventual destination URL for the new branch:: + + svn copy SRC_URL DEST_URL + +You can then checkout your branch as normal. You will want to prepare your +branch for future merging from the source branch so as to keep them in sync. +To find out how to do that, read `How do I merge between branches?`_. + + +What tools do I need to merge between branches? +----------------------------------------------- + +You need `svnmerge.py +`__. + + +How do I prepare a new branch for merging? +------------------------------------------ + +You need to initialize a new branch by having ``svnmerge.py`` discover the +revision number that the branch was created with. Do this with the command:: + + svnmerge.py init + +Then check in the change to the root of the branch. This is a one-time +operation. + + +How do I merge between branches? +-------------------------------- + +In the current situation for Python there are four branches under development, +meaning that there are three branches to merge into. Assuming a change is +committed into ``trunk`` as revision 0001, you merge into the 2.x maintenance +by doing:: + + # In the 2.x maintenance branch checkout. + svnmerge.py merge -r 0001 + svn commit -F svnmerge-commit-message.txt # r0002 + +To pull into py3k:: + + # In a py3k checkout. + svnmerge.py merge -r 0001 + svn commit -F svnmerge-commit-message.txt # r0003 + +The 3.x maintenance branch is a special case as you must pull from the py3k +branch revision, *not* trunk:: + + # In a 3.x maintenance checkout. + svnmerge.py merge -r 0003 # Notice the rev is the one from py3k! + svn resolved . + svn commit -F svnmerge-commit-message.txt + + +How do I block a specific revision from being merged into a branch? +------------------------------------------------------------------- + +With the revision number that you want to block handy and ``svnmerge.py``, go +to your checkout of the branch where you want to block the revision and run:: + + svnmerge.py block -r + +This will modify the repository's top directory (which should be your current +directory) and create ``svnmerge-commit-message.txt`` which contains a +generated log message. + +If the command says "no available revisions to block", then it means someone +already merged the revision. + +To check in the new metadata, run:: + + svn ci -F svnmerge-commit-message.txt + + +How do I include an external svn repository (external definition) in the repository? +------------------------------------------------------------------------------------ + +Before attempting to include an external svn repository into Python's +repository, it is important to realize that you can only include directories, +not individual files. + +To include a directory of an external definition (external svn repository) as a +directory you need to edit the ``svn:externals`` property on the root of the +repository you are working with using the format of:: + + local_directory remote_repositories_http_address + +For instance, to include Python's sandbox repository in the 'sandbox' directory +of your repository, run ``svn propedit svn:externals .`` while in the root of +your repository and enter:: + + sandbox http://svn.python.org/projects/sandbox/trunk/ + +in your text editor. The next time you run ``svn update`` it will pull in the +external definition. + + +How can I create a directory in the sandbox? +------------------------------------------------------------------------------ + +Assuming you have commit privileges and you do not already have a complete +checkout of the sandbox itself, the easiest way is to use svn's ``mkdir`` +command:: + + svn mkdir svn+ssh://pythondev at svn.python.org/sandbox/trunk/ + +That command will create the new directory on the server. To gain access to +the new directory you then checkout it out (substitute ``mkdir`` in the command +above with ``checkout``). + +If you already have a complete checkout of the sandbox then you can just use +``svn mkdir`` on a local directory name and check in the new directory itself. + + +SSH +======= + +How do I generate an SSH 2 public key? +------------------------------------------------------------------------------- + +All generated SSH keys should be sent to pydotorg for adding to the list of +keys. + +UNIX +''''''''''''''''''' + +Run:: + + ssh-keygen -t rsa + +This will generate a two files; your public key and your private key. Your +public key is the file ending in ``.pub``. + +Windows +''''''''''''''''''' + +Use PuTTYgen to generate your public key. Choose the "SSH2 DSA" radio button, +have it create an OpenSSH formatted key, choose a password, and save the private +key to a file. Copy the section with the public key (using Alt-P) to a file; +that file now has your public key. + +Is there a way to prevent from having to enter my password for my SSH 2 public key constantly? +------------------------------------------------------------------------------------------------ + +UNIX +''''''''''''''''''' + +Use ``ssh-agent`` and ``ssh-add`` to register your private key with SSH for +your current session. The simplest solution, though, is to use KeyChain_, +which is a shell script that will handle ``ssh-agent`` and ``ssh-add`` for you +once per login instead of per session. + +.. _KeyChain: http://www.gentoo.org/proj/en/keychain/ + +Windows +''''''''''''''''''' + +Running Pageant will prevent you from having to type your password constantly. +If you add a shortcut to Pageant to your Autostart group and edit the shortcut +so that the command line includes an argument to your private key then Pageant +will load the key every time you log in. + +Can I make check-ins from machines other than the one I generated the keys on? +------------------------------------------------------------------------------ + +Yes, all you need is to make sure that the machine you want to check +in code from has both the public and private keys in the standard +place that ssh will look for them (i.e. ~/.ssh on Unix machines). +Please note that although the key file ending in .pub contains your +user name and machine name in it, that information is not used by the +verification process, therefore these key files can be moved to a +different computer and used for verification. Please guard your keys +and never share your private key with anyone. If you lose the media +on which your keys are stored or the machine on which your keys are +stored, be sure to report this to pydotorg at python.org at the same time +that you change your keys. + + +Compilation +===================================================================== + +How do I create a debug build of Python? +----------------------------------------- + +A debug build, sometimes called a "pydebug" build, has extra checks and bits of +information to help with developing Python. + +UNIX +''''''''''''''''''''''' + +The basic steps for building Python for development is to configuring it and +then compile it. + +Configuration is typically:: + + ./configure --prefix=/dev/null --with-pydebug + +More flags are available to ``configure``, but this is the minimum you should +do. This will give you a debug version of Python along with a safety measure +to prevent you from accidentally installing your development version over +your system install. If you are developing on OS X for Python 2.x and will not +be working with the OS X-specific modules from the standard library, then +consider using the ``--without-toolbox-glue`` flag to faster compilation time. + +Once ``configure`` is done, you then need to compile Python.:: + + make -s + +This will build Python with only warnings and errors being printed to +stderr. If you running on a multi-core machine you can use the ``-j`` flag +along with the number of cores your machine has to build Python faster +(e.g. with two cores, you would want ``make -s -j2``). + +Once Python is done building you will then have a working build of Python +that can be run in-place; ``./python`` on most machines, ``./python.exe`` +on OS X. + +Windows +''''''''''''''''''''''''' + +For VC 9 and newer, the ``PCbuild`` directory contains build files you will +care about. For older versions of VC, see the ``PC`` directory. For a free +compiler for Windows, go to http://www.microsoft.com/express/ . + +To build from the GUI, load the project files and press F7. Make sure to +choose the Debug build. If you want to build from the command line, run the +``build_env.bat`` file to get a terminal with proper environment variables. +From that terminal, run:: + + build.bat -c Debug + +Once built you will want to set Python as a startup project. F5 will +launch the interpreter as well as double-clicking the binary. + + +Editors and Tools +===================================================================== + +What support is included in Python's source code for Vim? +--------------------------------------------------------- + +Within the ``Misc/Vim`` directory you will find two files to help you when +editing Python code. One is ``python.vim``, which is a generated syntax +highlight file for Python code. This file is updated much more frequently as it +contains syntax highlighting for keywords as they are added to the source tree. +See the top of the file to find out how to use the file. + +The other file for Vim is a vimrc file that supports PEP 7 and 8 coding +standards. All settings are specific to Python and C code and thus will not +affect other settings. There are also some settings which are helpful but +turned off by default at the end of the file if one cares to use non-essential +settings. Once again, see the top of the file to learn how to take advantage of +the file. + + +What support is included in Python's source code for gdb? +---------------------------------------------------------- + +The ``Misc/gdbinit`` file contains several helpful commands that can be added +to your gdb session. You can either copy the commands into your own +``.gdbinit`` file or, if you don't have your own version of the file, simply +symlink ``~/.gdbinit`` to ``Misc/gdbinit``. + + +Can I run Valgrind against Python? +---------------------------------- + +Because of how Python uses memory, Valgrind requires setting some supression +rules to cut down on the false positives (which still come up, suggesting one +typically should know how Python uses memory before running Valgrind against +Python). See ``Misc/README.valgrind`` for more details. + + +Patches +===================================================================== + +How to make a patch? +------------------------- + + +If you are using subversion (anonymous or developer) you can use +subversion to make the patches for you. Just edit your local copy and +enter the following command:: + + svn diff | tee ~/name_of_the_patch.diff + +Else you can use the diff util which comes with most operating systems (a +Windows version is available as part of the cygwin tools). + + +How do I apply a patch? +------------------------- + +For the general case, to apply a patch go to the directory that the patch was +created from (usually /dist/src/) and run:: + + patch -p0 < name_of_the_patch.diff + +The ``-p`` option specifies the number of directory separators ("/" in the +case of UNIX) to remove from the paths of the files in the patch. ``-p0`` +leaves the paths alone. + + +How do I undo an applied patch? +------------------------------- + +Undoing a patch differs from applying one by only a command-line option:: + + patch -R -p0 < name_of_the_patch.diff + +Another option is to have 'patch' create backups of all files by using the +``-b`` command-line option. See the man page for 'patch' on the details of +use. + + +How to submit a patch? +--------------------------- + +Please consult the patch submission guidelines at +http://www.python.org/patches/ . + + +How to test a patch? +------------------------------ + +Firstly, you'll need to get a checkout of the source tree you wish to +test the patch against and then build python from this source tree. + +Once you've done that, you can use Python's extensive regression test +suite to check that the patch hasn't broken anything. + +In general, for thorough testing, use:: + + python -m test.regrtest -uall + +For typical testing use:: + + python -m test.regrtest + +For running specific test modules:: + + python -m test.regrtest test_mod1 test_mod2 + +NB: Enabling the relevant test resources via ``-uall`` or something more +specific is especially important when working on things like the +networking code or the audio support - many of the relevant tests are +skipped by default. + +For more thorough documentation, +read the documentation for the ``test`` package at +http://docs.python.org/library/test.html. + +If you suspect the patch may impact other operating systems, test as +many as you have easy access to. You can get help on alternate +platforms by contacting the people listed on +http://www.python.org/moin/PythonTesters, who have +volunteered to support a particular operating system. + + +How to change the status of a patch? +----------------------------------------- + + +To change the status of a patch or assign it to somebody else you have to +have the Developer role in the bug tracker. Contact one of the project +administrators if the following does not work for you. + +Click on the patch itself. In the screen that comes up, there is a drop-box +for "Assigned To:" and a drop-box for "Status:" where you can select a new +responsible developer or a new status respectively. After selecting the +appropriate victim and status, hit the "Submit Changes" button at the bottom +of the page. + +Note: If you are sure that you have the right permissions and a drop-box +does not appear, check that you are actually logged in to Roundup! + + +Bugs +===================================================================== + +Where can I submit/view bugs for Python? +--------------------------------------------- + + +The Python project uses Roundup for bug tracking. Go to +http://bugs.python.org/ for all bug management needs. You will need to +create a Roundup account for yourself before submitting the first bug +report; anonymous reports have been disabled since it was too +difficult to get in contact with submitters. If you previously +had used SourceForge to report Python bugs, you can use Roundup's +"Lost your login?" link to obtain your Roundup password. + +.. XXX this is heavily outdated + + Appendix A + ================ + + Issue Manager Guidelines + ------------------------------- + + In general, the Resolution and Status fields should be close to + self-explanatory, and the "Assigned to:" field should be the person + responsible for taking the next step in the patch process. Both fields + are expected to change value over the life of a patch; the normal + workflow is detailed below. + + When you've got the time and the ability, feel free to move any patch that + catches your eye along, whether or not it's been assigned to you. And if + you're assigned to a patch but aren't going to take reasonably quick action + (for whatever reason), please assign it to someone else ASAP: at those times + you can't actively help, actively get out of the way. + + If you're an expert in some area and know that a patch in that area is both + needed and non-controversial, just commit your changes directly -- no need + then to get the patch mechanism involved in it. + + You should add a comment to every patch assigned to you at least once a + week, if only to say that you realize it's still on your plate. This rule is + meant to force your attention periodically: patches get harder & harder to + deal with the longer they sit. + + + Status Open, Resolution None + ''''''''''''''''''''''''''''''''' + + The initial state of all patches. + The patch is under consideration, but has not been reviewed yet, or + s under review but not yet Accepted or Rejected. + + The Resolution will normally change to Accepted or Rejected next. + The person submitting the patch should (if they can) assign it to the person + they most want to review it. + + Else the patch will be assigned via [xxx a list of expertise areas should be + developed] [xxx but since this hasn't happened and volunteers are too few, + andom assignment is better than nothing: if you're a Python developer, + expect to get assigned out of the blue!] + + Discussion of major patches is carried out on the Python-Dev mailing list. + For simple patches, the SourceForge comment mechanism should be sufficient. + [xxx an email gateway would be great, ditto Ping's Roundup] + For the reviewer: If you're certain the patch should be applied, + change the Resolution to Accepted and assign it back to the submitter (if + possible) for checkin. If you're certain the patch should never be + accepted, change the Resolution to Rejected, Status to Closed, and assign it to None. + + If you have specific complaints that would cause you to change your mind, + explain them clearly in a comment, leave the status Open, and reassign + back to the submitter. If you're uncertain, leave the status Open, explain + your uncertainties in a comment, and reassign the patch to someone + you believe can address your remaining questions; or leave the status + Open and bring it up on Python-Dev. + + + Status Open, Resolution Accepted + ''''''''''''''''''''''''''''''''''''' + + The powers that be accepted the patch, but it hasn't been applied yet. [xxx + flesh out -- Guido Bottleneck avoidable here?] + + The Status will normally change to Closed next. + + The person changing the Resolution to Accepted should, at the same time, assign + the patch to whoever they believe is most likely to be able & willing to + apply it (the submitter if possible). + + + Status Closed, Resolution Accepted + ''''''''''''''''''''''''''''''''''''''''' + + The patch has been accepted and applied. + + The previous Resolution was Accepted, or possibly None if the submitter was + Guido (or moral equivalent in some particular area of expertise). + + Status Closed, Resolution Rejected + ''''''''''''''''''''''''''''''''''''''''' + + The patch has been reviewed and rejected. + + There are generally no transitions out of this state: the patch is dead. + + The person setting this state should also assign the patch to None. + + + Status Open, Resolution Out of date + '''''''''''''''''''''''''''''''''''''''''' + + Previous Resolution was Accepted or Postponed, but the patch no longer + works. + + Please enter a comment when changing the Resolution to "Out of date", to record + the nature of the problem and the previous state. + + Also assign it back to the submitter, as they need to upload a new version. + + + Status Open, Resolution Postponed + ''''''''''''''''''''''''''''''''''''''''' + + The previous Resolution was None or Accepted, but for some reason (e.g., pending + release) the patch should not be reviewed or applied until further + notice. + + The Resolution will normally change to None or Accepted next. + + Please enter a comment when changing the Resolution to Postponed, to record the + reason, the previous Resolution, and the conditions under which the patch should + revert to Resolution None or Accepted. Also assign the patch to whoever is most likely + able and willing to decide when the state should change again. + Added: sandbox/trunk/dev/index.rst ============================================================================== --- (empty file) +++ sandbox/trunk/dev/index.rst Thu Sep 24 13:43:13 2009 @@ -0,0 +1,21 @@ + +################################### + Developer's Guide +################################### + +:Release: |version| +:Date: |today| + +.. toctree:: + :maxdepth: 1 + + why.rst + tools.rst + setup.rst + contributing.rst + culture.rst + process.rst + workflow.rst + patches.rst + faq.rst + Added: sandbox/trunk/dev/patches.rst ============================================================================== --- (empty file) +++ sandbox/trunk/dev/patches.rst Thu Sep 24 13:43:13 2009 @@ -0,0 +1,52 @@ + +======================================== +Python Patch Submission Guidelines +======================================== + + +We're using the Roundup bug/issue tracker to track patches. Here are the +main guidelines: + +* Submit your patch to the `issue tracker `_ + interface. + You will need to `register with Roundup `_, and you will need to login + before submitting a patch, or else the 'Create New' + link will not appear. + +* Submit documentation patches the same way. When adding the + patch, be sure to set the "Category" field to + "Documentation". + +* We like unified diffs. We grudgingly accept contextual diffs. + Straight ("ed-style") diffs are right out! If you don't know + how to generate context diffs, you're probably not qualified to + produce high-quality patches anyway <0.5 wink>. + +* Please use forward diffs. That is, use "diff -u oldfile + newfile", and not the other way around. + +* If you send diffs for multiple files, concatenate all the diffs in + a single text file. Please don't produce a zip file with multiple + patches. + +* We appreciate it if you send patches relative to the `current svn tree + `_. These are our + latest sources. Even a patch relative to the latest alpha or beta + release may be way out of date. + +* Please add a succinct message to your Roundup entry that + explains what the patch is about that we can use directly as a checkin + message. Ideally, such a message explains the problem and describes + the fix in a few lines. + +* For patches that add or change functionality: please also update + the **documentation** and the **testcases** (the Lib/test + subdirectory). For new modules, we appreciate a new test module + (typically test/test_spam.py). In this case, there's no need to mail + the documentation to a different address (in fact, in order to verify + that the bundle is complete, it's easier to mail everything together). + +* There are a variety of additional `style requirements