Python-checkins
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
January 2025
- 1 participants
- 500 discussions
[3.13] gh-77214: Update outdated documentation for numeric PyArg_Parse formats (GH-128454) (GH-128538)
by serhiy-storchaka Jan. 6, 2025
by serhiy-storchaka Jan. 6, 2025
Jan. 6, 2025
https://github.com/python/cpython/commit/3678cf8fb91e2b08853ea235e63473ec93…
commit: 3678cf8fb91e2b08853ea235e63473ec93758ab1
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2025-01-06T10:56:14Z
summary:
[3.13] gh-77214: Update outdated documentation for numeric PyArg_Parse formats (GH-128454) (GH-128538)
(cherry picked from commit 8d15058d61681e98579cf3fbd3c6fd13b3df6a72)
Co-authored-by: Serhiy Storchaka <storchaka(a)gmail.com>
files:
M Doc/c-api/arg.rst
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index 3201bdc82691f4..41c0366d205086 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -229,12 +229,24 @@ There are three ways strings and buffers can be converted to C:
Numbers
-------
+These formats allow representing Python numbers or single characters as C numbers.
+Formats that require :class:`int`, :class:`float` or :class:`complex` can
+also use the corresponding special methods :meth:`~object.__index__`,
+:meth:`~object.__float__` or :meth:`~object.__complex__` to convert
+the Python object to the required type.
+
+For signed integer formats, :exc:`OverflowError` is raised if the value
+is out of range for the C type.
+For unsigned integer formats, no range checking is done --- the
+most significant bits are silently truncated when the receiving field is too
+small to receive the value.
+
``b`` (:class:`int`) [unsigned char]
- Convert a nonnegative Python integer to an unsigned tiny int, stored in a C
+ Convert a nonnegative Python integer to an unsigned tiny integer, stored in a C
:c:expr:`unsigned char`.
``B`` (:class:`int`) [unsigned char]
- Convert a Python integer to a tiny int without overflow checking, stored in a C
+ Convert a Python integer to a tiny integer without overflow checking, stored in a C
:c:expr:`unsigned char`.
``h`` (:class:`int`) [short int]
@@ -344,12 +356,6 @@ Other objects
in *items*. The C arguments must correspond to the individual format units in
*items*. Format units for sequences may be nested.
-It is possible to pass "long" integers (integers whose value exceeds the
-platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- the
-most significant bits are silently truncated when the receiving field is too
-small to receive the value (actually, the semantics are inherited from downcasts
-in C --- your mileage may vary).
-
A few other characters have a meaning in a format string. These may not occur
inside nested parentheses. They are:
1
0
gh-77214: Update outdated documentation for numeric PyArg_Parse formats (GH-128454)
by serhiy-storchaka Jan. 6, 2025
by serhiy-storchaka Jan. 6, 2025
Jan. 6, 2025
https://github.com/python/cpython/commit/8d15058d61681e98579cf3fbd3c6fd13b3…
commit: 8d15058d61681e98579cf3fbd3c6fd13b3df6a72
branch: main
author: Serhiy Storchaka <storchaka(a)gmail.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2025-01-06T12:50:28+02:00
summary:
gh-77214: Update outdated documentation for numeric PyArg_Parse formats (GH-128454)
files:
M Doc/c-api/arg.rst
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index 3201bdc82691f4..41c0366d205086 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -229,12 +229,24 @@ There are three ways strings and buffers can be converted to C:
Numbers
-------
+These formats allow representing Python numbers or single characters as C numbers.
+Formats that require :class:`int`, :class:`float` or :class:`complex` can
+also use the corresponding special methods :meth:`~object.__index__`,
+:meth:`~object.__float__` or :meth:`~object.__complex__` to convert
+the Python object to the required type.
+
+For signed integer formats, :exc:`OverflowError` is raised if the value
+is out of range for the C type.
+For unsigned integer formats, no range checking is done --- the
+most significant bits are silently truncated when the receiving field is too
+small to receive the value.
+
``b`` (:class:`int`) [unsigned char]
- Convert a nonnegative Python integer to an unsigned tiny int, stored in a C
+ Convert a nonnegative Python integer to an unsigned tiny integer, stored in a C
:c:expr:`unsigned char`.
``B`` (:class:`int`) [unsigned char]
- Convert a Python integer to a tiny int without overflow checking, stored in a C
+ Convert a Python integer to a tiny integer without overflow checking, stored in a C
:c:expr:`unsigned char`.
``h`` (:class:`int`) [short int]
@@ -344,12 +356,6 @@ Other objects
in *items*. The C arguments must correspond to the individual format units in
*items*. Format units for sequences may be nested.
-It is possible to pass "long" integers (integers whose value exceeds the
-platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- the
-most significant bits are silently truncated when the receiving field is too
-small to receive the value (actually, the semantics are inherited from downcasts
-in C --- your mileage may vary).
-
A few other characters have a meaning in a format string. These may not occur
inside nested parentheses. They are:
1
0
Jan. 6, 2025
https://github.com/python/cpython/commit/d50fa0541b6d4f458d7ab16d3a11b1117c…
commit: d50fa0541b6d4f458d7ab16d3a11b1117c607f85
branch: main
author: Jelle Zijlstra <jelle.zijlstra(a)gmail.com>
committer: vstinner <vstinner(a)python.org>
date: 2025-01-06T10:30:42Z
summary:
gh-128089: Add PYC magic number for VALUE_WITH_FAKE_GLOBALS (#128097)
Assign 3610 PYC magic number to VALUE_WITH_FAKE_GLOBALS
format of annotationlib.
files:
M Include/internal/pycore_magic_number.h
diff --git a/Include/internal/pycore_magic_number.h b/Include/internal/pycore_magic_number.h
index 4c3b9c4c71da1b..ec3685d2034560 100644
--- a/Include/internal/pycore_magic_number.h
+++ b/Include/internal/pycore_magic_number.h
@@ -262,7 +262,7 @@ Known values:
Python 3.14a1 3607 (Add pseudo instructions JUMP_IF_TRUE/FALSE)
Python 3.14a1 3608 (Add support for slices)
Python 3.14a2 3609 (Add LOAD_SMALL_INT and LOAD_CONST_IMMORTAL instructions, remove RETURN_CONST)
- (3610 accidentally omitted)
+ Python 3.14a4 3610 (Add VALUE_WITH_FAKE_GLOBALS format to annotationlib)
Python 3.14a4 3611 (Add NOT_TAKEN instruction)
Python 3.15 will start with 3650
1
0
gh-102471: convert decimal module to use PyLong_Export API (PEP 757) (#128267)
by vstinner Jan. 6, 2025
by vstinner Jan. 6, 2025
Jan. 6, 2025
https://github.com/python/cpython/commit/879d287f49edcd4fa68324265f8ba63758…
commit: 879d287f49edcd4fa68324265f8ba63758716540
branch: main
author: Sergey B Kirpichev <skirpichev(a)gmail.com>
committer: vstinner <vstinner(a)python.org>
date: 2025-01-06T11:29:18+01:00
summary:
gh-102471: convert decimal module to use PyLong_Export API (PEP 757) (#128267)
files:
M Modules/_decimal/_decimal.c
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index c564813036e504..0def463c7d8b9e 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -30,7 +30,6 @@
#endif
#include <Python.h>
-#include "pycore_long.h" // _PyLong_IsZero()
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_typeobject.h"
#include "complexobject.h"
@@ -2323,38 +2322,42 @@ static PyObject *
dec_from_long(decimal_state *state, PyTypeObject *type, PyObject *v,
const mpd_context_t *ctx, uint32_t *status)
{
- PyObject *dec;
- PyLongObject *l = (PyLongObject *)v;
+ PyObject *dec = PyDecType_New(state, type);
- dec = PyDecType_New(state, type);
if (dec == NULL) {
return NULL;
}
- if (_PyLong_IsZero(l)) {
- _dec_settriple(dec, MPD_POS, 0, 0);
- return dec;
- }
-
- uint8_t sign = _PyLong_IsNegative(l) ? MPD_NEG : MPD_POS;
+ PyLongExport export_long;
- if (_PyLong_IsCompact(l)) {
- _dec_settriple(dec, sign, l->long_value.ob_digit[0], 0);
- mpd_qfinalize(MPD(dec), ctx, status);
- return dec;
+ if (PyLong_Export(v, &export_long) == -1) {
+ Py_DECREF(dec);
+ return NULL;
}
- size_t len = _PyLong_DigitCount(l);
+ if (export_long.digits) {
+ const PyLongLayout *layout = PyLong_GetNativeLayout();
+ uint32_t base = (uint32_t)1 << layout->bits_per_digit;
+ uint8_t sign = export_long.negative ? MPD_NEG : MPD_POS;
+ Py_ssize_t len = export_long.ndigits;
-#if PYLONG_BITS_IN_DIGIT == 30
- mpd_qimport_u32(MPD(dec), l->long_value.ob_digit, len, sign, PyLong_BASE,
- ctx, status);
-#elif PYLONG_BITS_IN_DIGIT == 15
- mpd_qimport_u16(MPD(dec), l->long_value.ob_digit, len, sign, PyLong_BASE,
- ctx, status);
-#else
- #error "PYLONG_BITS_IN_DIGIT should be 15 or 30"
-#endif
+ assert(layout->bits_per_digit <= 32);
+ assert(layout->digits_order == -1);
+ assert(layout->digit_endianness == (PY_LITTLE_ENDIAN ? -1 : 1));
+ assert(layout->digit_size == 2 || layout->digit_size == 4);
+ if (layout->digit_size == 4) {
+ mpd_qimport_u32(MPD(dec), export_long.digits, len, sign,
+ base, ctx, status);
+ }
+ else {
+ mpd_qimport_u16(MPD(dec), export_long.digits, len, sign,
+ base, ctx, status);
+ }
+ PyLong_FreeExport(&export_long);
+ }
+ else {
+ mpd_qset_i64(MPD(dec), export_long.value, ctx, status);
+ }
return dec;
}
1
0
[3.12] gh-114990: Add missing mixin methods in collections.abc's document (GH-114991) (#128536)
by hugovk Jan. 6, 2025
by hugovk Jan. 6, 2025
Jan. 6, 2025
https://github.com/python/cpython/commit/8ba72caf2644f749ad92a419e24ba95ebf…
commit: 8ba72caf2644f749ad92a419e24ba95ebf8c9444
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: hugovk <1324225+hugovk(a)users.noreply.github.com>
date: 2025-01-06T10:04:57Z
summary:
[3.12] gh-114990: Add missing mixin methods in collections.abc's document (GH-114991) (#128536)
Co-authored-by: AN Long <aisk(a)users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode(a)willingconsulting.com>
files:
M Doc/library/collections.abc.rst
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst
index 0adbd305b468f4..850853346991b5 100644
--- a/Doc/library/collections.abc.rst
+++ b/Doc/library/collections.abc.rst
@@ -146,7 +146,8 @@ ABC Inherits from Abstract Methods Mi
:class:`Set` :class:`Collection` ``__contains__``, ``__le__``, ``__lt__``, ``__eq__``, ``__ne__``,
``__iter__``, ``__gt__``, ``__ge__``, ``__and__``, ``__or__``,
- ``__len__`` ``__sub__``, ``__xor__``, and ``isdisjoint``
+ ``__len__`` ``__sub__``, ``__rsub__``, ``__xor__``, ``__rxor__``
+ and ``isdisjoint``
:class:`MutableSet` :class:`Set` ``__contains__``, Inherited :class:`Set` methods and
``__iter__``, ``clear``, ``pop``, ``remove``, ``__ior__``,
@@ -165,7 +166,7 @@ ABC Inherits from Abstract Methods Mi
``__len__``
-:class:`MappingView` :class:`Sized` ``__len__``
+:class:`MappingView` :class:`Sized` ``__init__``, ``__len__`` and ``__repr__``
:class:`ItemsView` :class:`MappingView`, ``__contains__``,
:class:`Set` ``__iter__``
:class:`KeysView` :class:`MappingView`, ``__contains__``,
1
0
[3.13] gh-114990: Add missing mixin methods in collections.abc's document (GH-114991) (#128535)
by hugovk Jan. 6, 2025
by hugovk Jan. 6, 2025
Jan. 6, 2025
https://github.com/python/cpython/commit/aa519e4caeacd5fbfdb3fe2d48b337d2c2…
commit: aa519e4caeacd5fbfdb3fe2d48b337d2c252afc9
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: hugovk <1324225+hugovk(a)users.noreply.github.com>
date: 2025-01-06T10:03:05Z
summary:
[3.13] gh-114990: Add missing mixin methods in collections.abc's document (GH-114991) (#128535)
Co-authored-by: AN Long <aisk(a)users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode(a)willingconsulting.com>
files:
M Doc/library/collections.abc.rst
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst
index 0adbd305b468f4..850853346991b5 100644
--- a/Doc/library/collections.abc.rst
+++ b/Doc/library/collections.abc.rst
@@ -146,7 +146,8 @@ ABC Inherits from Abstract Methods Mi
:class:`Set` :class:`Collection` ``__contains__``, ``__le__``, ``__lt__``, ``__eq__``, ``__ne__``,
``__iter__``, ``__gt__``, ``__ge__``, ``__and__``, ``__or__``,
- ``__len__`` ``__sub__``, ``__xor__``, and ``isdisjoint``
+ ``__len__`` ``__sub__``, ``__rsub__``, ``__xor__``, ``__rxor__``
+ and ``isdisjoint``
:class:`MutableSet` :class:`Set` ``__contains__``, Inherited :class:`Set` methods and
``__iter__``, ``clear``, ``pop``, ``remove``, ``__ior__``,
@@ -165,7 +166,7 @@ ABC Inherits from Abstract Methods Mi
``__len__``
-:class:`MappingView` :class:`Sized` ``__len__``
+:class:`MappingView` :class:`Sized` ``__init__``, ``__len__`` and ``__repr__``
:class:`ItemsView` :class:`MappingView`, ``__contains__``,
:class:`Set` ``__iter__``
:class:`KeysView` :class:`MappingView`, ``__contains__``,
1
0
[3.13] gh-128519: Align the docstring of untokenize() to match the docs (GH-128521) (#128531)
by erlend-aasland Jan. 6, 2025
by erlend-aasland Jan. 6, 2025
Jan. 6, 2025
https://github.com/python/cpython/commit/9c5a86d23ad7d0df8611520dbf2c174652…
commit: 9c5a86d23ad7d0df8611520dbf2c1746523ac1be
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-06T09:05:54Z
summary:
[3.13] gh-128519: Align the docstring of untokenize() to match the docs (GH-128521) (#128531)
(cherry picked from commit aef52ca8b334ff90e8032da39f4d06e7b5130eb9)
Co-authored-by: Tomas R <tomas.roun8(a)gmail.com>
files:
M Lib/tokenize.py
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index 4b4c3cfe16999b..430447d35e1adf 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -318,16 +318,10 @@ def untokenize(iterable):
with at least two elements, a token number and token value. If
only two tokens are passed, the resulting output is poor.
- Round-trip invariant for full input:
- Untokenized source will match input source exactly
-
- Round-trip invariant for limited input:
- # Output bytes will tokenize back to the input
- t1 = [tok[:2] for tok in tokenize(f.readline)]
- newcode = untokenize(t1)
- readline = BytesIO(newcode).readline
- t2 = [tok[:2] for tok in tokenize(readline)]
- assert t1 == t2
+ The result is guaranteed to tokenize back to match the input so
+ that the conversion is lossless and round-trips are assured.
+ The guarantee applies only to the token type and token string as
+ the spacing between tokens (column positions) may change.
"""
ut = Untokenizer()
out = ut.untokenize(iterable)
1
0
[3.12] gh-128519: Align the docstring of untokenize() to match the docs (GH-128521) (#128532)
by erlend-aasland Jan. 6, 2025
by erlend-aasland Jan. 6, 2025
Jan. 6, 2025
https://github.com/python/cpython/commit/f9aac4a76d68c8eef78058b4da1252beaa…
commit: f9aac4a76d68c8eef78058b4da1252beaadd1570
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-06T08:59:24Z
summary:
[3.12] gh-128519: Align the docstring of untokenize() to match the docs (GH-128521) (#128532)
(cherry picked from commit aef52ca8b334ff90e8032da39f4d06e7b5130eb9)
Co-authored-by: Tomas R <tomas.roun8(a)gmail.com>
files:
M Lib/tokenize.py
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index b2dff8e6967094..553c1ca4388974 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -320,16 +320,10 @@ def untokenize(iterable):
with at least two elements, a token number and token value. If
only two tokens are passed, the resulting output is poor.
- Round-trip invariant for full input:
- Untokenized source will match input source exactly
-
- Round-trip invariant for limited input:
- # Output bytes will tokenize back to the input
- t1 = [tok[:2] for tok in tokenize(f.readline)]
- newcode = untokenize(t1)
- readline = BytesIO(newcode).readline
- t2 = [tok[:2] for tok in tokenize(readline)]
- assert t1 == t2
+ The result is guaranteed to tokenize back to match the input so
+ that the conversion is lossless and round-trips are assured.
+ The guarantee applies only to the token type and token string as
+ the spacing between tokens (column positions) may change.
"""
ut = Untokenizer()
out = ut.untokenize(iterable)
1
0
gh-128519: Align the docstring of untokenize() to match the docs (#128521)
by erlend-aasland Jan. 6, 2025
by erlend-aasland Jan. 6, 2025
Jan. 6, 2025
https://github.com/python/cpython/commit/aef52ca8b334ff90e8032da39f4d06e7b5…
commit: aef52ca8b334ff90e8032da39f4d06e7b5130eb9
branch: main
author: Tomas R. <tomas.roun8(a)gmail.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-06T08:42:26Z
summary:
gh-128519: Align the docstring of untokenize() to match the docs (#128521)
files:
M Lib/tokenize.py
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index 7ece4e9b70d31b..1a60fd32a77ea4 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -318,16 +318,10 @@ def untokenize(iterable):
with at least two elements, a token number and token value. If
only two tokens are passed, the resulting output is poor.
- Round-trip invariant for full input:
- Untokenized source will match input source exactly
-
- Round-trip invariant for limited input:
- # Output bytes will tokenize back to the input
- t1 = [tok[:2] for tok in tokenize(f.readline)]
- newcode = untokenize(t1)
- readline = BytesIO(newcode).readline
- t2 = [tok[:2] for tok in tokenize(readline)]
- assert t1 == t2
+ The result is guaranteed to tokenize back to match the input so
+ that the conversion is lossless and round-trips are assured.
+ The guarantee applies only to the token type and token string as
+ the spacing between tokens (column positions) may change.
"""
ut = Untokenizer()
out = ut.untokenize(iterable)
1
0
gh-98188: Fix EmailMessage.get_payload to decode data when CTE value has extra text (#127547)
by bitdancer Jan. 5, 2025
by bitdancer Jan. 5, 2025
Jan. 5, 2025
https://github.com/python/cpython/commit/a62ba52f1439c1f878a3ff9b8544caf9ae…
commit: a62ba52f1439c1f878a3ff9b8544caf9aeef9b90
branch: main
author: RanKKI <hliu86.me(a)gmail.com>
committer: bitdancer <rdmurray(a)bitdance.com>
date: 2025-01-05T20:32:16-05:00
summary:
gh-98188: Fix EmailMessage.get_payload to decode data when CTE value has extra text (#127547)
Up to this point message handling has been very strict with regards to content encoding values: mixed case was accepted, but trailing blanks or other text would cause decoding failure, even if the first token was a valid encoding. By Postel's Rule we should go ahead and decode as long as we can recognize that first token. We have not thought of any security or backward compatibility concerns with this fix.
This fix does introduce a new technique/pattern to the Message code: we look to see if the header has a 'cte' attribute, and if so we use that. This effectively promotes the header API exposed by HeaderRegistry to an API that any header parser "should" support. This seems like a reasonable thing to do. It is not, however, a requirement, as the string value of the header is still used if there is no cte attribute.
The full fix (ignore any trailing blanks or blank-separated trailing text) applies only to the non-compat32 API. compat32 is only fixed to the extent that it now ignores trailing spaces. Note that the HeaderRegistry parsing still records a HeaderDefect if there is extra text.
Co-authored-by: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
files:
A Misc/NEWS.d/next/Library/2024-12-03-14-45-16.gh-issue-98188.GX9i2b.rst
M Lib/email/message.py
M Lib/test/test_email/test_email.py
M Lib/test/test_email/test_headerregistry.py
M Misc/ACKS
diff --git a/Lib/email/message.py b/Lib/email/message.py
index a58afc5fe5f68e..87fcab68868d46 100644
--- a/Lib/email/message.py
+++ b/Lib/email/message.py
@@ -286,8 +286,12 @@ def get_payload(self, i=None, decode=False):
if i is not None and not isinstance(self._payload, list):
raise TypeError('Expected list, got %s' % type(self._payload))
payload = self._payload
- # cte might be a Header, so for now stringify it.
- cte = str(self.get('content-transfer-encoding', '')).lower()
+ cte = self.get('content-transfer-encoding', '')
+ if hasattr(cte, 'cte'):
+ cte = cte.cte
+ else:
+ # cte might be a Header, so for now stringify it.
+ cte = str(cte).strip().lower()
# payload may be bytes here.
if not decode:
if isinstance(payload, str) and utils._has_surrogates(payload):
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index abe9ef2e94409f..2deb35721576b8 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -810,6 +810,16 @@ def test_unicode_body_defaults_to_utf8_encoding(self):
w4kgdGVzdGFiYwo=
"""))
+ def test_string_payload_with_base64_cte(self):
+ msg = email.message_from_string(textwrap.dedent("""\
+ Content-Transfer-Encoding: base64
+
+ SGVsbG8uIFRlc3Rpbmc=
+ """), policy=email.policy.default)
+ self.assertEqual(msg.get_payload(decode=True), b"Hello. Testing")
+ self.assertDefectsEqual(msg['content-transfer-encoding'].defects, [])
+
+
# Test the email.encoders module
class TestEncoders(unittest.TestCase):
@@ -2352,6 +2362,40 @@ def test_missing_header_body_separator(self):
self.assertDefectsEqual(msg.defects,
[errors.MissingHeaderBodySeparatorDefect])
+ def test_string_payload_with_extra_space_after_cte(self):
+ # https://github.com/python/cpython/issues/98188
+ cte = "base64 "
+ msg = email.message_from_string(textwrap.dedent(f"""\
+ Content-Transfer-Encoding: {cte}
+
+ SGVsbG8uIFRlc3Rpbmc=
+ """), policy=email.policy.default)
+ self.assertEqual(msg.get_payload(decode=True), b"Hello. Testing")
+ self.assertDefectsEqual(msg['content-transfer-encoding'].defects, [])
+
+ def test_string_payload_with_extra_text_after_cte(self):
+ msg = email.message_from_string(textwrap.dedent("""\
+ Content-Transfer-Encoding: base64 some text
+
+ SGVsbG8uIFRlc3Rpbmc=
+ """), policy=email.policy.default)
+ self.assertEqual(msg.get_payload(decode=True), b"Hello. Testing")
+ cte = msg['content-transfer-encoding']
+ self.assertDefectsEqual(cte.defects, [email.errors.InvalidHeaderDefect])
+
+ def test_string_payload_with_extra_space_after_cte_compat32(self):
+ cte = "base64 "
+ msg = email.message_from_string(textwrap.dedent(f"""\
+ Content-Transfer-Encoding: {cte}
+
+ SGVsbG8uIFRlc3Rpbmc=
+ """), policy=email.policy.compat32)
+ pasted_cte = msg['content-transfer-encoding']
+ self.assertEqual(pasted_cte, cte)
+ self.assertEqual(msg.get_payload(decode=True), b"Hello. Testing")
+ self.assertDefectsEqual(msg.defects, [])
+
+
# Test RFC 2047 header encoding and decoding
class TestRFC2047(TestEmailBase):
diff --git a/Lib/test/test_email/test_headerregistry.py b/Lib/test/test_email/test_headerregistry.py
index 4c0523f410332f..ff7a6da644d572 100644
--- a/Lib/test/test_email/test_headerregistry.py
+++ b/Lib/test/test_email/test_headerregistry.py
@@ -837,6 +837,11 @@ def cte_as_value(self,
'7bit',
[errors.InvalidHeaderDefect]),
+ 'extra_space_after_cte': (
+ 'base64 ',
+ 'base64',
+ []),
+
}
diff --git a/Misc/ACKS b/Misc/ACKS
index c6e53317b37d78..d7585c16c8169c 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1129,6 +1129,7 @@ Gregor Lingl
Everett Lipman
Mirko Liss
Alexander Liu
+Hui Liu
Yuan Liu
Nick Lockwood
Stephanie Lockwood
diff --git a/Misc/NEWS.d/next/Library/2024-12-03-14-45-16.gh-issue-98188.GX9i2b.rst b/Misc/NEWS.d/next/Library/2024-12-03-14-45-16.gh-issue-98188.GX9i2b.rst
new file mode 100644
index 00000000000000..30ab8cfc3f0bc6
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-12-03-14-45-16.gh-issue-98188.GX9i2b.rst
@@ -0,0 +1,3 @@
+Fix an issue in :meth:`email.message.Message.get_payload` where data
+cannot be decoded if the Content Transfer Encoding mechanism contains
+trailing whitespaces or additional junk text. Patch by Hui Liu.
1
0
[3.12] Docs: fix `MessageDefect` references in email.policy docs (GH-128468) (#128527)
by erlend-aasland Jan. 5, 2025
by erlend-aasland Jan. 5, 2025
Jan. 5, 2025
https://github.com/python/cpython/commit/4016be27755ef6d0cb8cd11e0625b97faf…
commit: 4016be27755ef6d0cb8cd11e0625b97fafaccf0f
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-05T22:05:48Z
summary:
[3.12] Docs: fix `MessageDefect` references in email.policy docs (GH-128468) (#128527)
(cherry picked from commit 3b231be8f000ae59faa04d5a2f1af11beafee866)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar(a)gmail.com>
files:
M Doc/library/email.policy.rst
M Doc/tools/.nitignore
diff --git a/Doc/library/email.policy.rst b/Doc/library/email.policy.rst
index 51d65dc5ba94ee..152350b0b02659 100644
--- a/Doc/library/email.policy.rst
+++ b/Doc/library/email.policy.rst
@@ -267,7 +267,7 @@ added matters. To illustrate::
Handle a *defect* found on *obj*. When the email package calls this
method, *defect* will always be a subclass of
- :class:`~email.errors.Defect`.
+ :class:`~email.errors.MessageDefect`.
The default implementation checks the :attr:`raise_on_defect` flag. If
it is ``True``, *defect* is raised as an exception. If it is ``False``
@@ -277,7 +277,7 @@ added matters. To illustrate::
.. method:: register_defect(obj, defect)
Register a *defect* on *obj*. In the email package, *defect* will always
- be a subclass of :class:`~email.errors.Defect`.
+ be a subclass of :class:`~email.errors.MessageDefect`.
The default implementation calls the ``append`` method of the ``defects``
attribute of *obj*. When the email package calls :attr:`handle_defect`,
diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore
index e69e6100945672..a721b494d750eb 100644
--- a/Doc/tools/.nitignore
+++ b/Doc/tools/.nitignore
@@ -31,7 +31,6 @@ Doc/library/email.charset.rst
Doc/library/email.compat32-message.rst
Doc/library/email.errors.rst
Doc/library/email.parser.rst
-Doc/library/email.policy.rst
Doc/library/exceptions.rst
Doc/library/functools.rst
Doc/library/getopt.rst
1
0
[3.13] Docs: fix `MessageDefect` references in email.policy docs (GH-128468) (#128526)
by erlend-aasland Jan. 5, 2025
by erlend-aasland Jan. 5, 2025
Jan. 5, 2025
https://github.com/python/cpython/commit/838e8a2718c187199668e6b868c1c6844a…
commit: 838e8a2718c187199668e6b868c1c6844a419b3d
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-05T22:04:39Z
summary:
[3.13] Docs: fix `MessageDefect` references in email.policy docs (GH-128468) (#128526)
(cherry picked from commit 3b231be8f000ae59faa04d5a2f1af11beafee866)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar(a)gmail.com>
files:
M Doc/library/email.policy.rst
M Doc/tools/.nitignore
diff --git a/Doc/library/email.policy.rst b/Doc/library/email.policy.rst
index 314767d0802a08..6b997ee784f6e4 100644
--- a/Doc/library/email.policy.rst
+++ b/Doc/library/email.policy.rst
@@ -267,7 +267,7 @@ added matters. To illustrate::
Handle a *defect* found on *obj*. When the email package calls this
method, *defect* will always be a subclass of
- :class:`~email.errors.Defect`.
+ :class:`~email.errors.MessageDefect`.
The default implementation checks the :attr:`raise_on_defect` flag. If
it is ``True``, *defect* is raised as an exception. If it is ``False``
@@ -277,7 +277,7 @@ added matters. To illustrate::
.. method:: register_defect(obj, defect)
Register a *defect* on *obj*. In the email package, *defect* will always
- be a subclass of :class:`~email.errors.Defect`.
+ be a subclass of :class:`~email.errors.MessageDefect`.
The default implementation calls the ``append`` method of the ``defects``
attribute of *obj*. When the email package calls :attr:`handle_defect`,
diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore
index d827ea29a98d16..8485766034ca77 100644
--- a/Doc/tools/.nitignore
+++ b/Doc/tools/.nitignore
@@ -24,7 +24,6 @@ Doc/library/email.charset.rst
Doc/library/email.compat32-message.rst
Doc/library/email.errors.rst
Doc/library/email.parser.rst
-Doc/library/email.policy.rst
Doc/library/exceptions.rst
Doc/library/functools.rst
Doc/library/http.cookiejar.rst
1
0
Jan. 5, 2025
https://github.com/python/cpython/commit/3b231be8f000ae59faa04d5a2f1af11bea…
commit: 3b231be8f000ae59faa04d5a2f1af11beafee866
branch: main
author: Yuki Kobayashi <drsuaimqjgar(a)gmail.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-05T22:58:31+01:00
summary:
Docs: fix `MessageDefect` references in email.policy docs (#128468)
files:
M Doc/library/email.policy.rst
M Doc/tools/.nitignore
diff --git a/Doc/library/email.policy.rst b/Doc/library/email.policy.rst
index 314767d0802a08..6b997ee784f6e4 100644
--- a/Doc/library/email.policy.rst
+++ b/Doc/library/email.policy.rst
@@ -267,7 +267,7 @@ added matters. To illustrate::
Handle a *defect* found on *obj*. When the email package calls this
method, *defect* will always be a subclass of
- :class:`~email.errors.Defect`.
+ :class:`~email.errors.MessageDefect`.
The default implementation checks the :attr:`raise_on_defect` flag. If
it is ``True``, *defect* is raised as an exception. If it is ``False``
@@ -277,7 +277,7 @@ added matters. To illustrate::
.. method:: register_defect(obj, defect)
Register a *defect* on *obj*. In the email package, *defect* will always
- be a subclass of :class:`~email.errors.Defect`.
+ be a subclass of :class:`~email.errors.MessageDefect`.
The default implementation calls the ``append`` method of the ``defects``
attribute of *obj*. When the email package calls :attr:`handle_defect`,
diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore
index 7d50aec56a9bf7..6940c95ab2c9a1 100644
--- a/Doc/tools/.nitignore
+++ b/Doc/tools/.nitignore
@@ -23,7 +23,6 @@ Doc/library/email.charset.rst
Doc/library/email.compat32-message.rst
Doc/library/email.errors.rst
Doc/library/email.parser.rst
-Doc/library/email.policy.rst
Doc/library/exceptions.rst
Doc/library/functools.rst
Doc/library/http.cookiejar.rst
1
0
[3.12] gh-123085: Fix issue in inferred caller when resources package has no source (GH-123102) (#124021)
by jaraco Jan. 5, 2025
by jaraco Jan. 5, 2025
Jan. 5, 2025
https://github.com/python/cpython/commit/d712ece43feeed7f930954d40b046cdaee…
commit: d712ece43feeed7f930954d40b046cdaeed7c414
branch: 3.12
author: Jason R. Coombs <jaraco(a)jaraco.com>
committer: jaraco <jaraco(a)jaraco.com>
date: 2025-01-05T16:53:55-05:00
summary:
[3.12] gh-123085: Fix issue in inferred caller when resources package has no source (GH-123102) (#124021)
gh-123085: Fix issue in inferred caller when resources package has no source.
>From importlib_resources 6.4.3 (python/importlib_resourcesGH-314).
(cherry picked from commit a53812df126b99bca25187441a123c7785ee82a0)
files:
A Misc/NEWS.d/next/Library/2024-08-17-08-17-20.gh-issue-123085.7Io2yH.rst
M Lib/importlib/resources/_common.py
M Lib/test/test_importlib/resources/test_files.py
diff --git a/Lib/importlib/resources/_common.py b/Lib/importlib/resources/_common.py
index a3902535342612..a85df4b399fe61 100644
--- a/Lib/importlib/resources/_common.py
+++ b/Lib/importlib/resources/_common.py
@@ -93,12 +93,13 @@ def _infer_caller():
"""
def is_this_file(frame_info):
- return frame_info.filename == __file__
+ return frame_info.filename == stack[0].filename
def is_wrapper(frame_info):
return frame_info.function == 'wrapper'
- not_this_file = itertools.filterfalse(is_this_file, inspect.stack())
+ stack = inspect.stack()
+ not_this_file = itertools.filterfalse(is_this_file, stack)
# also exclude 'wrapper' due to singledispatch in the call stack
callers = itertools.filterfalse(is_wrapper, not_this_file)
return next(callers).frame
diff --git a/Lib/test/test_importlib/resources/test_files.py b/Lib/test/test_importlib/resources/test_files.py
index 038aac0a3fe773..d34ea51b150f1e 100644
--- a/Lib/test/test_importlib/resources/test_files.py
+++ b/Lib/test/test_importlib/resources/test_files.py
@@ -1,4 +1,8 @@
import typing
+import os
+import pathlib
+import py_compile
+import shutil
import textwrap
import unittest
import warnings
@@ -10,8 +14,7 @@
from . import data01
from . import util
from . import _path
-from test.support import os_helper
-from test.support import import_helper
+from test.support import os_helper, import_helper
@contextlib.contextmanager
@@ -144,6 +147,45 @@ def create_zip_from_directory(source_dir, zip_filename):
self.fixtures.enter_context(import_helper.DirsOnSysPath(zip_file))
assert importlib.import_module('somepkg.submod').val == 'resources are the best'
+ def _compile_importlib(self):
+ """
+ Make a compiled-only copy of the importlib resources package.
+ """
+ bin_site = self.fixtures.enter_context(os_helper.temp_dir())
+ c_resources = pathlib.Path(bin_site, 'c_resources')
+ sources = pathlib.Path(resources.__file__).parent
+ shutil.copytree(sources, c_resources, ignore=lambda *_: ['__pycache__'])
+
+ for dirpath, _, filenames in os.walk(c_resources):
+ for filename in filenames:
+ source_path = pathlib.Path(dirpath) / filename
+ cfile = source_path.with_suffix('.pyc')
+ py_compile.compile(source_path, cfile)
+ pathlib.Path.unlink(source_path)
+ self.fixtures.enter_context(import_helper.DirsOnSysPath(bin_site))
+
+ def test_implicit_files_with_compiled_importlib(self):
+ """
+ Caller detection works for compiled-only resources module.
+
+ python/cpython#123085
+ """
+ set_val = textwrap.dedent(
+ f"""
+ import {resources.__name__} as res
+ val = res.files().joinpath('res.txt').read_text(encoding='utf-8')
+ """
+ )
+ spec = {
+ 'frozenpkg': {
+ '__init__.py': set_val.replace(resources.__name__, 'c_resources'),
+ 'res.txt': 'resources are the best',
+ },
+ }
+ _path.build(spec, self.site_dir)
+ self._compile_importlib()
+ assert importlib.import_module('frozenpkg').val == 'resources are the best'
+
if __name__ == '__main__':
unittest.main()
diff --git a/Misc/NEWS.d/next/Library/2024-08-17-08-17-20.gh-issue-123085.7Io2yH.rst b/Misc/NEWS.d/next/Library/2024-08-17-08-17-20.gh-issue-123085.7Io2yH.rst
new file mode 100644
index 00000000000000..2e09401ceb5b56
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-08-17-08-17-20.gh-issue-123085.7Io2yH.rst
@@ -0,0 +1,3 @@
+In a bare call to :func:`importlib.resources.files`, ensure the caller's
+frame is properly detected when ``importlib.resources`` is itself available
+as a compiled module only (no source).
1
0
Jan. 5, 2025
https://github.com/python/cpython/commit/f6da93a627ed9f9d21d68bd0e93fc3bae9…
commit: f6da93a627ed9f9d21d68bd0e93fc3bae9f915d6
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: hugovk <1324225+hugovk(a)users.noreply.github.com>
date: 2025-01-05T15:58:26+02:00
summary:
[3.13] gh-128504: Upgrade doctest to ubuntu-24.04 (GH-128506) (#128517)
gh-128504: Upgrade doctest to ubuntu-24.04 (GH-128506)
(cherry picked from commit 2228e92da31ca7344a163498f848973a1b356597)
Co-authored-by: Damien <81557462+Damien-Chen(a)users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot](a)users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
files:
M .github/workflows/reusable-docs.yml
diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml
index 3962d12403919a..88da55bf08b8fe 100644
--- a/.github/workflows/reusable-docs.yml
+++ b/.github/workflows/reusable-docs.yml
@@ -99,7 +99,7 @@ jobs:
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
doctest:
name: 'Doctest'
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
1
0
Jan. 5, 2025
https://github.com/python/cpython/commit/09f7d88cadfa8e41238c86e79fa07a9988…
commit: 09f7d88cadfa8e41238c86e79fa07a99881ec99e
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: hugovk <1324225+hugovk(a)users.noreply.github.com>
date: 2025-01-05T15:58:02+02:00
summary:
[3.12] gh-128504: Upgrade doctest to ubuntu-24.04 (GH-128506) (#128518)
gh-128504: Upgrade doctest to ubuntu-24.04 (GH-128506)
(cherry picked from commit 2228e92da31ca7344a163498f848973a1b356597)
Co-authored-by: Damien <81557462+Damien-Chen(a)users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot](a)users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
files:
M .github/workflows/reusable-docs.yml
diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml
index 935b989426eb93..c5f71831a005fd 100644
--- a/.github/workflows/reusable-docs.yml
+++ b/.github/workflows/reusable-docs.yml
@@ -96,7 +96,7 @@ jobs:
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
doctest:
name: 'Doctest'
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
1
0
https://github.com/python/cpython/commit/2228e92da31ca7344a163498f848973a1b…
commit: 2228e92da31ca7344a163498f848973a1b356597
branch: main
author: Damien <81557462+Damien-Chen(a)users.noreply.github.com>
committer: hugovk <1324225+hugovk(a)users.noreply.github.com>
date: 2025-01-05T12:07:18Z
summary:
gh-128504: Upgrade doctest to ubuntu-24.04 (#128506)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot](a)users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
files:
M .github/workflows/reusable-docs.yml
diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml
index 3962d12403919a..88da55bf08b8fe 100644
--- a/.github/workflows/reusable-docs.yml
+++ b/.github/workflows/reusable-docs.yml
@@ -99,7 +99,7 @@ jobs:
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
doctest:
name: 'Doctest'
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
1
0
[3.12] gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455) (gh-128513)
by corona10 Jan. 5, 2025
by corona10 Jan. 5, 2025
Jan. 5, 2025
https://github.com/python/cpython/commit/90535fe021ae53ba9609b8df1513baee61…
commit: 90535fe021ae53ba9609b8df1513baee61c7bbb2
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: corona10 <donghee.na92(a)gmail.com>
date: 2025-01-05T18:23:04+09:00
summary:
[3.12] gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455) (gh-128513)
gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455)
Add `BOLT_COMMON_FLAGS` with `-update-debug-sections`
(cherry picked from commit b60044b838f3ea97395cd6f3adbd5330356fc273)
Co-authored-by: Zanie Blue <contact(a)zanie.dev>
Co-authored-by: Gregory Szorc <gregory.szorc(a)gmail.com>
files:
M configure
M configure.ac
diff --git a/configure b/configure
index be04b13700b4ea..c9de45a2331a7b 100755
--- a/configure
+++ b/configure
@@ -912,6 +912,7 @@ CFLAGS_ALIASING
OPT
BOLT_APPLY_FLAGS
BOLT_INSTRUMENT_FLAGS
+BOLT_COMMON_FLAGS
BOLT_BINARIES
MERGE_FDATA
LLVM_BOLT
@@ -1134,6 +1135,7 @@ CPPFLAGS
CPP
HOSTRUNNER
PROFILE_TASK
+BOLT_COMMON_FLAGS
BOLT_INSTRUMENT_FLAGS
BOLT_APPLY_FLAGS
LIBUUID_CFLAGS
@@ -1947,6 +1949,8 @@ Some influential environment variables:
HOSTRUNNER Program to run CPython for the host platform
PROFILE_TASK
Python args for PGO generation task
+ BOLT_COMMON_FLAGS
+ Common arguments to llvm-bolt when instrumenting and applying
BOLT_INSTRUMENT_FLAGS
Arguments to llvm-bolt when instrumenting binaries
BOLT_APPLY_FLAGS
@@ -9156,11 +9160,21 @@ then :
fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking BOLT_COMMON_FLAGS" >&5
+printf %s "checking BOLT_COMMON_FLAGS... " >&6; }
+if test -z "${BOLT_COMMON_FLAGS}"
+then
+ BOLT_COMMON_FLAGS=-update-debug-sections
+
+fi
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking BOLT_INSTRUMENT_FLAGS" >&5
printf %s "checking BOLT_INSTRUMENT_FLAGS... " >&6; }
if test -z "${BOLT_INSTRUMENT_FLAGS}"
then
- BOLT_INSTRUMENT_FLAGS=
+ BOLT_INSTRUMENT_FLAGS="${BOLT_COMMON_FLAGS}"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_INSTRUMENT_FLAGS" >&5
printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
@@ -9170,7 +9184,7 @@ printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
printf %s "checking BOLT_APPLY_FLAGS... " >&6; }
if test -z "${BOLT_APPLY_FLAGS}"
then
- BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
+ BOLT_APPLY_FLAGS=" ${BOLT_COMMON_FLAGS} -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5
diff --git a/configure.ac b/configure.ac
index 6c5649bffda6db..7325d00e3942ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2104,6 +2104,20 @@ AS_VAR_IF([enable_shared], [yes], [
BOLT_BINARIES="${BOLT_BINARIES} \$(INSTSONAME)"
])
+AC_ARG_VAR(
+ [BOLT_COMMON_FLAGS],
+ [Common arguments to llvm-bolt when instrumenting and applying]
+)
+
+AC_MSG_CHECKING([BOLT_COMMON_FLAGS])
+if test -z "${BOLT_COMMON_FLAGS}"
+then
+ AS_VAR_SET(
+ [BOLT_COMMON_FLAGS],
+ [-update-debug-sections]
+ )
+fi
+
AC_ARG_VAR(
[BOLT_INSTRUMENT_FLAGS],
[Arguments to llvm-bolt when instrumenting binaries]
@@ -2111,7 +2125,7 @@ AC_ARG_VAR(
AC_MSG_CHECKING([BOLT_INSTRUMENT_FLAGS])
if test -z "${BOLT_INSTRUMENT_FLAGS}"
then
- BOLT_INSTRUMENT_FLAGS=
+ BOLT_INSTRUMENT_FLAGS="${BOLT_COMMON_FLAGS}"
fi
AC_MSG_RESULT([$BOLT_INSTRUMENT_FLAGS])
@@ -2125,7 +2139,7 @@ then
AS_VAR_SET(
[BOLT_APPLY_FLAGS],
[m4_normalize("
- -update-debug-sections
+ ${BOLT_COMMON_FLAGS}
-reorder-blocks=ext-tsp
-reorder-functions=cdsort
-split-functions
1
0
[3.13] gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455) (gh-128512)
by corona10 Jan. 5, 2025
by corona10 Jan. 5, 2025
Jan. 5, 2025
https://github.com/python/cpython/commit/40fd466c97327cbe8014f9447c7ac61c41…
commit: 40fd466c97327cbe8014f9447c7ac61c414fdd26
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: corona10 <donghee.na92(a)gmail.com>
date: 2025-01-05T18:22:34+09:00
summary:
[3.13] gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455) (gh-128512)
gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455)
Add `BOLT_COMMON_FLAGS` with `-update-debug-sections`
(cherry picked from commit b60044b838f3ea97395cd6f3adbd5330356fc273)
Co-authored-by: Zanie Blue <contact(a)zanie.dev>
Co-authored-by: Gregory Szorc <gregory.szorc(a)gmail.com>
files:
M configure
M configure.ac
diff --git a/configure b/configure
index c66333c721d841..0d8a9ffa8a2605 100755
--- a/configure
+++ b/configure
@@ -912,6 +912,7 @@ CFLAGS_ALIASING
OPT
BOLT_APPLY_FLAGS
BOLT_INSTRUMENT_FLAGS
+BOLT_COMMON_FLAGS
BOLT_BINARIES
MERGE_FDATA
LLVM_BOLT
@@ -1146,6 +1147,7 @@ CPPFLAGS
CPP
HOSTRUNNER
PROFILE_TASK
+BOLT_COMMON_FLAGS
BOLT_INSTRUMENT_FLAGS
BOLT_APPLY_FLAGS
LIBUUID_CFLAGS
@@ -1969,6 +1971,8 @@ Some influential environment variables:
HOSTRUNNER Program to run CPython for the host platform
PROFILE_TASK
Python args for PGO generation task
+ BOLT_COMMON_FLAGS
+ Common arguments to llvm-bolt when instrumenting and applying
BOLT_INSTRUMENT_FLAGS
Arguments to llvm-bolt when instrumenting binaries
BOLT_APPLY_FLAGS
@@ -9326,11 +9330,21 @@ then :
fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking BOLT_COMMON_FLAGS" >&5
+printf %s "checking BOLT_COMMON_FLAGS... " >&6; }
+if test -z "${BOLT_COMMON_FLAGS}"
+then
+ BOLT_COMMON_FLAGS=-update-debug-sections
+
+fi
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking BOLT_INSTRUMENT_FLAGS" >&5
printf %s "checking BOLT_INSTRUMENT_FLAGS... " >&6; }
if test -z "${BOLT_INSTRUMENT_FLAGS}"
then
- BOLT_INSTRUMENT_FLAGS=
+ BOLT_INSTRUMENT_FLAGS="${BOLT_COMMON_FLAGS}"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_INSTRUMENT_FLAGS" >&5
printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
@@ -9340,7 +9354,7 @@ printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
printf %s "checking BOLT_APPLY_FLAGS... " >&6; }
if test -z "${BOLT_APPLY_FLAGS}"
then
- BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
+ BOLT_APPLY_FLAGS=" ${BOLT_COMMON_FLAGS} -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5
diff --git a/configure.ac b/configure.ac
index c53e55fbba2a5f..b3e112a0a181d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2214,6 +2214,20 @@ AS_VAR_IF([enable_shared], [yes], [
BOLT_BINARIES="${BOLT_BINARIES} \$(INSTSONAME)"
])
+AC_ARG_VAR(
+ [BOLT_COMMON_FLAGS],
+ [Common arguments to llvm-bolt when instrumenting and applying]
+)
+
+AC_MSG_CHECKING([BOLT_COMMON_FLAGS])
+if test -z "${BOLT_COMMON_FLAGS}"
+then
+ AS_VAR_SET(
+ [BOLT_COMMON_FLAGS],
+ [-update-debug-sections]
+ )
+fi
+
AC_ARG_VAR(
[BOLT_INSTRUMENT_FLAGS],
[Arguments to llvm-bolt when instrumenting binaries]
@@ -2221,7 +2235,7 @@ AC_ARG_VAR(
AC_MSG_CHECKING([BOLT_INSTRUMENT_FLAGS])
if test -z "${BOLT_INSTRUMENT_FLAGS}"
then
- BOLT_INSTRUMENT_FLAGS=
+ BOLT_INSTRUMENT_FLAGS="${BOLT_COMMON_FLAGS}"
fi
AC_MSG_RESULT([$BOLT_INSTRUMENT_FLAGS])
@@ -2235,7 +2249,7 @@ then
AS_VAR_SET(
[BOLT_APPLY_FLAGS],
[m4_normalize("
- -update-debug-sections
+ ${BOLT_COMMON_FLAGS}
-reorder-blocks=ext-tsp
-reorder-functions=cdsort
-split-functions
1
0
gh-128137: Update PyASCIIObject to handle interned field with the atomic operation (gh-128196)
by corona10 Jan. 5, 2025
by corona10 Jan. 5, 2025
Jan. 5, 2025
https://github.com/python/cpython/commit/ae23a012e6c8aadc4a588101cbe7bc86ed…
commit: ae23a012e6c8aadc4a588101cbe7bc86ede45627
branch: main
author: Donghee Na <donghee.na(a)python.org>
committer: corona10 <donghee.na92(a)gmail.com>
date: 2025-01-05T18:17:06+09:00
summary:
gh-128137: Update PyASCIIObject to handle interned field with the atomic operation (gh-128196)
files:
A Misc/NEWS.d/next/Core_and_Builtins/2024-12-24-01-40-12.gh-issue-128137.gsTwr_.rst
M Include/cpython/unicodeobject.h
M Objects/unicodeobject.c
diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h
index 91799137101280..46a01c8e591709 100644
--- a/Include/cpython/unicodeobject.h
+++ b/Include/cpython/unicodeobject.h
@@ -109,7 +109,7 @@ typedef struct {
3: Interned, Immortal, and Static
This categorization allows the runtime to determine the right
cleanup mechanism at runtime shutdown. */
- unsigned int interned:2;
+ uint16_t interned;
/* Character size:
- PyUnicode_1BYTE_KIND (1):
@@ -132,21 +132,23 @@ typedef struct {
* all characters are in the range U+0000-U+10FFFF
* at least one character is in the range U+10000-U+10FFFF
*/
- unsigned int kind:3;
+ unsigned short kind:3;
/* Compact is with respect to the allocation scheme. Compact unicode
objects only require one memory block while non-compact objects use
one block for the PyUnicodeObject struct and another for its data
buffer. */
- unsigned int compact:1;
+ unsigned short compact:1;
/* The string only contains characters in the range U+0000-U+007F (ASCII)
and the kind is PyUnicode_1BYTE_KIND. If ascii is set and compact is
set, use the PyASCIIObject structure. */
- unsigned int ascii:1;
+ unsigned short ascii:1;
/* The object is statically allocated. */
- unsigned int statically_allocated:1;
+ unsigned short statically_allocated:1;
/* Padding to ensure that PyUnicode_DATA() is always aligned to
- 4 bytes (see issue #19537 on m68k). */
- unsigned int :24;
+ 4 bytes (see issue #19537 on m68k) and we use unsigned short to avoid
+ the extra four bytes on 32-bit Windows. This is restricted features
+ for specific compilers including GCC, MSVC, Clang and IBM's XL compiler. */
+ unsigned short :10;
} state;
} PyASCIIObject;
@@ -195,7 +197,11 @@ typedef struct {
/* Use only if you know it's a string */
static inline unsigned int PyUnicode_CHECK_INTERNED(PyObject *op) {
+#ifdef Py_GIL_DISABLED
+ return _Py_atomic_load_uint16_relaxed(&_PyASCIIObject_CAST(op)->state.interned);
+#else
return _PyASCIIObject_CAST(op)->state.interned;
+#endif
}
#define PyUnicode_CHECK_INTERNED(op) PyUnicode_CHECK_INTERNED(_PyObject_CAST(op))
diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2024-12-24-01-40-12.gh-issue-128137.gsTwr_.rst b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-24-01-40-12.gh-issue-128137.gsTwr_.rst
new file mode 100644
index 00000000000000..a3b7cde7f67676
--- /dev/null
+++ b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-24-01-40-12.gh-issue-128137.gsTwr_.rst
@@ -0,0 +1,2 @@
+Update :c:type:`PyASCIIObject` layout to handle interned field with the
+atomic operation. Patch by Donghee Na.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 5e532ce0f348c4..3eafa2381c1a4d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -15729,7 +15729,7 @@ immortalize_interned(PyObject *s)
_Py_DecRefTotal(_PyThreadState_GET());
}
#endif
- _PyUnicode_STATE(s).interned = SSTATE_INTERNED_IMMORTAL;
+ FT_ATOMIC_STORE_UINT16_RELAXED(_PyUnicode_STATE(s).interned, SSTATE_INTERNED_IMMORTAL);
_Py_SetImmortal(s);
}
@@ -15848,7 +15848,7 @@ intern_common(PyInterpreterState *interp, PyObject *s /* stolen */,
_Py_DecRefTotal(_PyThreadState_GET());
#endif
}
- _PyUnicode_STATE(s).interned = SSTATE_INTERNED_MORTAL;
+ FT_ATOMIC_STORE_UINT16_RELAXED(_PyUnicode_STATE(s).interned, SSTATE_INTERNED_MORTAL);
/* INTERNED_MORTAL -> INTERNED_IMMORTAL (if needed) */
@@ -15984,7 +15984,7 @@ _PyUnicode_ClearInterned(PyInterpreterState *interp)
Py_UNREACHABLE();
}
if (!shared) {
- _PyUnicode_STATE(s).interned = SSTATE_NOT_INTERNED;
+ FT_ATOMIC_STORE_UINT16_RELAXED(_PyUnicode_STATE(s).interned, SSTATE_NOT_INTERNED);
}
}
#ifdef INTERNED_STATS
1
0
gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455)
by corona10 Jan. 4, 2025
by corona10 Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/b60044b838f3ea97395cd6f3adbd533035…
commit: b60044b838f3ea97395cd6f3adbd5330356fc273
branch: main
author: Zanie Blue <contact(a)zanie.dev>
committer: corona10 <donghee.na92(a)gmail.com>
date: 2025-01-05T13:16:30+09:00
summary:
gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455)
Add `BOLT_COMMON_FLAGS` with `-update-debug-sections`
Co-authored-by: Gregory Szorc <gregory.szorc(a)gmail.com>
files:
M configure
M configure.ac
diff --git a/configure b/configure
index aa88c74c61156c..61ee51c4b36473 100755
--- a/configure
+++ b/configure
@@ -907,6 +907,7 @@ CFLAGS_ALIASING
OPT
BOLT_APPLY_FLAGS
BOLT_INSTRUMENT_FLAGS
+BOLT_COMMON_FLAGS
BOLT_BINARIES
MERGE_FDATA
LLVM_BOLT
@@ -1142,6 +1143,7 @@ LIBS
CPPFLAGS
CPP
PROFILE_TASK
+BOLT_COMMON_FLAGS
BOLT_INSTRUMENT_FLAGS
BOLT_APPLY_FLAGS
LIBUUID_CFLAGS
@@ -1963,6 +1965,8 @@ Some influential environment variables:
CPP C preprocessor
PROFILE_TASK
Python args for PGO generation task
+ BOLT_COMMON_FLAGS
+ Common arguments to llvm-bolt when instrumenting and applying
BOLT_INSTRUMENT_FLAGS
Arguments to llvm-bolt when instrumenting binaries
BOLT_APPLY_FLAGS
@@ -9389,11 +9393,21 @@ then :
fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking BOLT_COMMON_FLAGS" >&5
+printf %s "checking BOLT_COMMON_FLAGS... " >&6; }
+if test -z "${BOLT_COMMON_FLAGS}"
+then
+ BOLT_COMMON_FLAGS=-update-debug-sections
+
+fi
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking BOLT_INSTRUMENT_FLAGS" >&5
printf %s "checking BOLT_INSTRUMENT_FLAGS... " >&6; }
if test -z "${BOLT_INSTRUMENT_FLAGS}"
then
- BOLT_INSTRUMENT_FLAGS=
+ BOLT_INSTRUMENT_FLAGS="${BOLT_COMMON_FLAGS}"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_INSTRUMENT_FLAGS" >&5
printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
@@ -9403,7 +9417,7 @@ printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
printf %s "checking BOLT_APPLY_FLAGS... " >&6; }
if test -z "${BOLT_APPLY_FLAGS}"
then
- BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
+ BOLT_APPLY_FLAGS=" ${BOLT_COMMON_FLAGS} -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5
diff --git a/configure.ac b/configure.ac
index 1def41176337e3..172e8a1a842010 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2160,6 +2160,20 @@ AS_VAR_IF([enable_shared], [yes], [
BOLT_BINARIES="${BOLT_BINARIES} \$(INSTSONAME)"
])
+AC_ARG_VAR(
+ [BOLT_COMMON_FLAGS],
+ [Common arguments to llvm-bolt when instrumenting and applying]
+)
+
+AC_MSG_CHECKING([BOLT_COMMON_FLAGS])
+if test -z "${BOLT_COMMON_FLAGS}"
+then
+ AS_VAR_SET(
+ [BOLT_COMMON_FLAGS],
+ [-update-debug-sections]
+ )
+fi
+
AC_ARG_VAR(
[BOLT_INSTRUMENT_FLAGS],
[Arguments to llvm-bolt when instrumenting binaries]
@@ -2167,7 +2181,7 @@ AC_ARG_VAR(
AC_MSG_CHECKING([BOLT_INSTRUMENT_FLAGS])
if test -z "${BOLT_INSTRUMENT_FLAGS}"
then
- BOLT_INSTRUMENT_FLAGS=
+ BOLT_INSTRUMENT_FLAGS="${BOLT_COMMON_FLAGS}"
fi
AC_MSG_RESULT([$BOLT_INSTRUMENT_FLAGS])
@@ -2181,7 +2195,7 @@ then
AS_VAR_SET(
[BOLT_APPLY_FLAGS],
[m4_normalize("
- -update-debug-sections
+ ${BOLT_COMMON_FLAGS}
-reorder-blocks=ext-tsp
-reorder-functions=cdsort
-split-functions
1
0
Jan. 4, 2025
https://github.com/python/cpython/commit/0cafa97932c6574734bbaa07180bbd5a76…
commit: 0cafa97932c6574734bbaa07180bbd5a762b01a6
branch: main
author: Erlend E. Aasland <erlend(a)python.org>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T23:38:46Z
summary:
gh-115765: Document and enforce Autoconf 2.72 requirement (#128502)
files:
M Doc/using/configure.rst
M configure.ac
diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst
index e7733a6dc11451..82df8dfc948ed2 100644
--- a/Doc/using/configure.rst
+++ b/Doc/using/configure.rst
@@ -29,7 +29,7 @@ Features and minimum versions required to build CPython:
* Tcl/Tk 8.5.12 for the :mod:`tkinter` module.
-* Autoconf 2.71 and aclocal 1.16.5 are required to regenerate the
+* Autoconf 2.72 and aclocal 1.16.5 are required to regenerate the
:file:`configure` script.
.. versionchanged:: 3.1
@@ -58,6 +58,9 @@ Features and minimum versions required to build CPython:
.. versionchanged:: 3.13
Autoconf 2.71, aclocal 1.16.5 and SQLite 3.15.2 are now required.
+.. versionchanged:: next
+ Autoconf 2.72 is now required.
+
See also :pep:`7` "Style Guide for C Code" and :pep:`11` "CPython platform
support".
diff --git a/configure.ac b/configure.ac
index 9e131ed1a2dc98..1def41176337e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl ************************************************************
dnl * Please run autoreconf -ivf -Werror to test your changes! *
dnl ************************************************************
dnl
-dnl Python's configure script requires autoconf 2.71, autoconf-archive,
+dnl Python's configure script requires autoconf 2.72, autoconf-archive,
dnl aclocal 1.16, and pkg-config.
dnl
dnl It is recommended to use the Tools/build/regen-configure.sh shell script
@@ -12,7 +12,7 @@ dnl
# Set VERSION so we only need to edit in one place (i.e., here)
m4_define([PYTHON_VERSION], [3.14])
-AC_PREREQ([2.71])
+AC_PREREQ([2.72])
AC_INIT([python],[PYTHON_VERSION],[https://github.com/python/cpython/issues…
1
0
[3.13] gh-127553: Remove outdated TODO comment in _pydatetime (GH-127564) (#128500)
by erlend-aasland Jan. 4, 2025
by erlend-aasland Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/b2bacbbea3e770b61ecedc058a63c7c97a…
commit: b2bacbbea3e770b61ecedc058a63c7c97a7f4851
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T23:01:03Z
summary:
[3.13] gh-127553: Remove outdated TODO comment in _pydatetime (GH-127564) (#128500)
(cherry picked from commit e8b6b39ff707378da654e15ccddde9c28cefdd30)
Co-authored-by: Beomsoo Kim <beoms424(a)gmail.com>
files:
M Lib/_pydatetime.py
diff --git a/Lib/_pydatetime.py b/Lib/_pydatetime.py
index 34ccb2da13d0f3..e001bd3bbba4b7 100644
--- a/Lib/_pydatetime.py
+++ b/Lib/_pydatetime.py
@@ -2306,7 +2306,6 @@ def __reduce__(self):
def _isoweek1monday(year):
# Helper to calculate the day number of the Monday starting week 1
- # XXX This could be done more efficiently
THURSDAY = 3
firstday = _ymd2ord(year, 1, 1)
firstweekday = (firstday + 6) % 7 # See weekday() above
1
0
[3.12] gh-127553: Remove outdated TODO comment in _pydatetime (GH-127564) (#128501)
by erlend-aasland Jan. 4, 2025
by erlend-aasland Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/06e4173393664904dc6e0d219837b2cb8a…
commit: 06e4173393664904dc6e0d219837b2cb8a0dadf7
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T22:55:24Z
summary:
[3.12] gh-127553: Remove outdated TODO comment in _pydatetime (GH-127564) (#128501)
(cherry picked from commit e8b6b39ff707378da654e15ccddde9c28cefdd30)
Co-authored-by: Beomsoo Kim <beoms424(a)gmail.com>
files:
M Lib/_pydatetime.py
diff --git a/Lib/_pydatetime.py b/Lib/_pydatetime.py
index ad6292e1e412c4..fc43cf0bba32da 100644
--- a/Lib/_pydatetime.py
+++ b/Lib/_pydatetime.py
@@ -2313,7 +2313,6 @@ def __reduce__(self):
def _isoweek1monday(year):
# Helper to calculate the day number of the Monday starting week 1
- # XXX This could be done more efficiently
THURSDAY = 3
firstday = _ymd2ord(year, 1, 1)
firstweekday = (firstday + 6) % 7 # See weekday() above
1
0
Jan. 4, 2025
https://github.com/python/cpython/commit/e8b6b39ff707378da654e15ccddde9c28c…
commit: e8b6b39ff707378da654e15ccddde9c28cefdd30
branch: main
author: Beomsoo Kim <beoms424(a)gmail.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T23:38:49+01:00
summary:
gh-127553: Remove outdated TODO comment in _pydatetime (#127564)
files:
M Lib/_pydatetime.py
diff --git a/Lib/_pydatetime.py b/Lib/_pydatetime.py
index ed01670cfece43..be90c9b1315d53 100644
--- a/Lib/_pydatetime.py
+++ b/Lib/_pydatetime.py
@@ -2392,7 +2392,6 @@ def __reduce__(self):
def _isoweek1monday(year):
# Helper to calculate the day number of the Monday starting week 1
- # XXX This could be done more efficiently
THURSDAY = 3
firstday = _ymd2ord(year, 1, 1)
firstweekday = (firstday + 6) % 7 # See weekday() above
1
0
[3.12] gh-127954: Document PyObject_DelItemString (GH-127986) (#128497)
by erlend-aasland Jan. 4, 2025
by erlend-aasland Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/e1a20910dc6857df558bb9fb7e49c75405…
commit: e1a20910dc6857df558bb9fb7e49c75405b09f06
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T20:54:56Z
summary:
[3.12] gh-127954: Document PyObject_DelItemString (GH-127986) (#128497)
(cherry picked from commit 8ade15343d5daec3bf79ff7c47f03726fb2bcadf)
Co-authored-by: RUANG (James Roy) <rruuaanng(a)outlook.com>
files:
M Doc/c-api/object.rst
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index cefd384fd35a1f..b7f1a54972e587 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -393,6 +393,13 @@ Object Protocol
on failure. This is equivalent to the Python statement ``del o[key]``.
+.. c:function:: int PyObject_DelItemString(PyObject *o, const char *key)
+
+ This is the same as :c:func:`PyObject_DelItem`, but *key* is
+ specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
+ rather than a :c:expr:`PyObject*`.
+
+
.. c:function:: PyObject* PyObject_Dir(PyObject *o)
This is equivalent to the Python expression ``dir(o)``, returning a (possibly
1
0
[3.13] gh-127954: Document PyObject_DelItemString (GH-127986) (#128496)
by erlend-aasland Jan. 4, 2025
by erlend-aasland Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/5ed2b7649e47a8a22bb161c5107d9de96c…
commit: 5ed2b7649e47a8a22bb161c5107d9de96c99b091
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T20:53:30Z
summary:
[3.13] gh-127954: Document PyObject_DelItemString (GH-127986) (#128496)
(cherry picked from commit 8ade15343d5daec3bf79ff7c47f03726fb2bcadf)
Co-authored-by: RUANG (James Roy) <rruuaanng(a)outlook.com>
files:
M Doc/c-api/object.rst
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index ce6cb0496139f7..8bb392af01fcd2 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -493,6 +493,13 @@ Object Protocol
on failure. This is equivalent to the Python statement ``del o[key]``.
+.. c:function:: int PyObject_DelItemString(PyObject *o, const char *key)
+
+ This is the same as :c:func:`PyObject_DelItem`, but *key* is
+ specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
+ rather than a :c:expr:`PyObject*`.
+
+
.. c:function:: PyObject* PyObject_Dir(PyObject *o)
This is equivalent to the Python expression ``dir(o)``, returning a (possibly
1
0
https://github.com/python/cpython/commit/8ade15343d5daec3bf79ff7c47f03726fb…
commit: 8ade15343d5daec3bf79ff7c47f03726fb2bcadf
branch: main
author: RUANG (James Roy) <rruuaanng(a)outlook.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T21:48:20+01:00
summary:
gh-127954: Document PyObject_DelItemString (#127986)
files:
M Doc/c-api/object.rst
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index a137688fe07545..3a434a4173eafa 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -493,6 +493,13 @@ Object Protocol
on failure. This is equivalent to the Python statement ``del o[key]``.
+.. c:function:: int PyObject_DelItemString(PyObject *o, const char *key)
+
+ This is the same as :c:func:`PyObject_DelItem`, but *key* is
+ specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
+ rather than a :c:expr:`PyObject*`.
+
+
.. c:function:: PyObject* PyObject_Dir(PyObject *o)
This is equivalent to the Python expression ``dir(o)``, returning a (possibly
1
0
Jan. 4, 2025
https://github.com/python/cpython/commit/e3e4852fe08a158b4e5ec7a98516fba825…
commit: e3e4852fe08a158b4e5ec7a98516fba82598d9dd
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T19:04:13Z
summary:
[3.12] Docs: amend json.dump() post gh-128482 (GH-128489) (#128494)
(cherry picked from commit 87ee76062a7eb9c0fa2b94e36cfed21d86ae90ac)
Co-authored-by: Erlend E. Aasland <erlend(a)python.org>
files:
M Doc/library/json.rst
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index aa33b175659b56..eff8808a440528 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -143,10 +143,6 @@ Basic Usage
:term:`file-like object`) using this :ref:`Python-to-JSON conversion table
<py-to-json-table>`.
- To use a custom :class:`JSONEncoder` subclass (for example, one that overrides the
- :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the
- *cls* keyword argument; otherwise :class:`JSONEncoder` is used.
-
.. note::
Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
@@ -186,6 +182,13 @@ Basic Usage
If ``True`` (the default), their JavaScript equivalents
(``NaN``, ``Infinity``, ``-Infinity``) are used.
+ :param cls:
+ If set, a custom JSON encoder with the
+ :meth:`~JSONEncoder.default` method overridden,
+ for serializing into custom datatypes.
+ If ``None`` (the default), :class:`!JSONEncoder` is used.
+ :type cls: a :class:`JSONEncoder` subclass
+
:param indent:
If a positive integer or string, JSON array elements and
object members will be pretty-printed with that indent level.
@@ -212,7 +215,7 @@ Basic Usage
If ``None`` (the default), :exc:`!TypeError` is raised.
:type default: :term:`callable` | None
- :param sort_keys:
+ :param bool sort_keys:
If ``True``, dictionaries will be outputted sorted by key.
Default ``False``.
1
0
Jan. 4, 2025
https://github.com/python/cpython/commit/62b4ca0d53f7b273e42b55c5307d46be33…
commit: 62b4ca0d53f7b273e42b55c5307d46be33596b35
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T19:03:01Z
summary:
[3.13] Docs: amend json.dump() post gh-128482 (GH-128489) (#128493)
(cherry picked from commit 87ee76062a7eb9c0fa2b94e36cfed21d86ae90ac)
Co-authored-by: Erlend E. Aasland <erlend(a)python.org>
files:
M Doc/library/json.rst
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index ce0e652ee58f7f..21f36cb38f1193 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -154,10 +154,6 @@ Basic Usage
:term:`file-like object`) using this :ref:`Python-to-JSON conversion table
<py-to-json-table>`.
- To use a custom :class:`JSONEncoder` subclass (for example, one that overrides the
- :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the
- *cls* keyword argument; otherwise :class:`JSONEncoder` is used.
-
.. note::
Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
@@ -197,6 +193,13 @@ Basic Usage
If ``True`` (the default), their JavaScript equivalents
(``NaN``, ``Infinity``, ``-Infinity``) are used.
+ :param cls:
+ If set, a custom JSON encoder with the
+ :meth:`~JSONEncoder.default` method overridden,
+ for serializing into custom datatypes.
+ If ``None`` (the default), :class:`!JSONEncoder` is used.
+ :type cls: a :class:`JSONEncoder` subclass
+
:param indent:
If a positive integer or string, JSON array elements and
object members will be pretty-printed with that indent level.
@@ -223,7 +226,7 @@ Basic Usage
If ``None`` (the default), :exc:`!TypeError` is raised.
:type default: :term:`callable` | None
- :param sort_keys:
+ :param bool sort_keys:
If ``True``, dictionaries will be outputted sorted by key.
Default ``False``.
1
0
https://github.com/python/cpython/commit/87ee76062a7eb9c0fa2b94e36cfed21d86…
commit: 87ee76062a7eb9c0fa2b94e36cfed21d86ae90ac
branch: main
author: Erlend E. Aasland <erlend(a)python.org>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T19:57:59+01:00
summary:
Docs: amend json.dump() post gh-128482 (#128489)
files:
M Doc/library/json.rst
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index f11109fb0ecfed..169291f74f44a5 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -154,10 +154,6 @@ Basic Usage
:term:`file-like object`) using this :ref:`Python-to-JSON conversion table
<py-to-json-table>`.
- To use a custom :class:`JSONEncoder` subclass (for example, one that overrides the
- :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the
- *cls* keyword argument; otherwise :class:`JSONEncoder` is used.
-
.. note::
Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
@@ -197,6 +193,13 @@ Basic Usage
If ``True`` (the default), their JavaScript equivalents
(``NaN``, ``Infinity``, ``-Infinity``) are used.
+ :param cls:
+ If set, a custom JSON encoder with the
+ :meth:`~JSONEncoder.default` method overridden,
+ for serializing into custom datatypes.
+ If ``None`` (the default), :class:`!JSONEncoder` is used.
+ :type cls: a :class:`JSONEncoder` subclass
+
:param indent:
If a positive integer or string, JSON array elements and
object members will be pretty-printed with that indent level.
@@ -223,7 +226,7 @@ Basic Usage
If ``None`` (the default), :exc:`!TypeError` is raised.
:type default: :term:`callable` | None
- :param sort_keys:
+ :param bool sort_keys:
If ``True``, dictionaries will be outputted sorted by key.
Default ``False``.
1
0
Jan. 4, 2025
https://github.com/python/cpython/commit/98d3f2bc6e2b944f5fba1e16b0ca7f6445…
commit: 98d3f2bc6e2b944f5fba1e16b0ca7f64459aa5e5
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T17:45:19Z
summary:
[3.12] gh-126719: Clarify math.fmod docs (GH-127741) (#128492)
(cherry picked from commit f28d471fbe99f9eaac05d60ed40da47b0b56fe86)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland(a)users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
files:
M Doc/library/math.rst
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index fb8527128a2555..0648293bfa7b89 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -84,7 +84,8 @@ Number-theoretic and representation functions
.. function:: fmod(x, y)
- Return ``fmod(x, y)``, as defined by the platform C library. Note that the
+ Return the floating-point remainder of ``x / y``,
+ as defined by the platform C library function ``fmod(x, y)``. Note that the
Python expression ``x % y`` may not return the same result. The intent of the C
standard is that ``fmod(x, y)`` be exactly (mathematically; to infinite
precision) equal to ``x - n*y`` for some integer *n* such that the result has
1
0
Jan. 4, 2025
https://github.com/python/cpython/commit/65fd75809873456664c0b14a0d147b6676…
commit: 65fd75809873456664c0b14a0d147b6676f1bbb0
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T17:44:36Z
summary:
[3.13] gh-126719: Clarify math.fmod docs (GH-127741) (#128491)
(cherry picked from commit f28d471fbe99f9eaac05d60ed40da47b0b56fe86)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland(a)users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
files:
M Doc/library/math.rst
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 68878806749f28..25886da908f9a2 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -248,7 +248,8 @@ Floating point arithmetic
.. function:: fmod(x, y)
- Return ``fmod(x, y)``, as defined by the platform C library. Note that the
+ Return the floating-point remainder of ``x / y``,
+ as defined by the platform C library function ``fmod(x, y)``. Note that the
Python expression ``x % y`` may not return the same result. The intent of the C
standard is that ``fmod(x, y)`` be exactly (mathematically; to infinite
precision) equal to ``x - n*y`` for some integer *n* such that the result has
1
0
https://github.com/python/cpython/commit/f28d471fbe99f9eaac05d60ed40da47b0b…
commit: f28d471fbe99f9eaac05d60ed40da47b0b56fe86
branch: main
author: Stan Ulbrych <89152624+StanFromIreland(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T18:38:57+01:00
summary:
gh-126719: Clarify math.fmod docs (#127741)
Co-authored-by: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
files:
M Doc/library/math.rst
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index bf79b23a72bbf9..c78b313db5152d 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -248,7 +248,8 @@ Floating point arithmetic
.. function:: fmod(x, y)
- Return ``fmod(x, y)``, as defined by the platform C library. Note that the
+ Return the floating-point remainder of ``x / y``,
+ as defined by the platform C library function ``fmod(x, y)``. Note that the
Python expression ``x % y`` may not return the same result. The intent of the C
standard is that ``fmod(x, y)`` be exactly (mathematically; to infinite
precision) equal to ``x - n*y`` for some integer *n* such that the result has
1
0
[3.12] Docs: mark up json.dump() using parameter list (GH-128482) (#128487)
by erlend-aasland Jan. 4, 2025
by erlend-aasland Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/731fc4052c1ecdaa2eb4a774eb8279b7c7…
commit: 731fc4052c1ecdaa2eb4a774eb8279b7c7e3d4e1
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T15:50:55Z
summary:
[3.12] Docs: mark up json.dump() using parameter list (GH-128482) (#128487)
(cherry picked from commit a0088b40bb212dc132e147d04f9287cabd72d163)
Co-authored-by: Erlend E. Aasland <erlend(a)python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
files:
M Doc/library/json.rst
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index 88882aee2b258e..aa33b175659b56 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -140,69 +140,91 @@ Basic Usage
sort_keys=False, **kw)
Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-supporting
- :term:`file-like object`) using this :ref:`conversion table
+ :term:`file-like object`) using this :ref:`Python-to-JSON conversion table
<py-to-json-table>`.
- If *skipkeys* is true (default: ``False``), then dict keys that are not
- of a basic type (:class:`str`, :class:`int`, :class:`float`, :class:`bool`,
- ``None``) will be skipped instead of raising a :exc:`TypeError`.
-
- The :mod:`json` module always produces :class:`str` objects, not
- :class:`bytes` objects. Therefore, ``fp.write()`` must support :class:`str`
- input.
-
- If *ensure_ascii* is true (the default), the output is guaranteed to
- have all incoming non-ASCII characters escaped. If *ensure_ascii* is
- false, these characters will be output as-is.
+ To use a custom :class:`JSONEncoder` subclass (for example, one that overrides the
+ :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the
+ *cls* keyword argument; otherwise :class:`JSONEncoder` is used.
- If *check_circular* is false (default: ``True``), then the circular
- reference check for container types will be skipped and a circular reference
- will result in a :exc:`RecursionError` (or worse).
+ .. note::
- If *allow_nan* is false (default: ``True``), then it will be a
- :exc:`ValueError` to serialize out of range :class:`float` values (``nan``,
- ``inf``, ``-inf``) in strict compliance of the JSON specification.
- If *allow_nan* is true, their JavaScript equivalents (``NaN``,
- ``Infinity``, ``-Infinity``) will be used.
+ Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
+ so trying to serialize multiple objects with repeated calls to
+ :func:`dump` using the same *fp* will result in an invalid JSON file.
- If *indent* is a non-negative integer or string, then JSON array elements and
- object members will be pretty-printed with that indent level. An indent level
- of 0, negative, or ``""`` will only insert newlines. ``None`` (the default)
- selects the most compact representation. Using a positive integer indent
- indents that many spaces per level. If *indent* is a string (such as ``"\t"``),
- that string is used to indent each level.
+ :param object obj:
+ The Python object to be serialized.
+
+ :param fp:
+ The file-like object *obj* will be serialized to.
+ The :mod:`!json` module always produces :class:`str` objects,
+ not :class:`bytes` objects,
+ therefore ``fp.write()`` must support :class:`str` input.
+ :type fp: :term:`file-like object`
+
+ :param bool skipkeys:
+ If ``True``, keys that are not of a basic type
+ (:class:`str`, :class:`int`, :class:`float`, :class:`bool`, ``None``)
+ will be skipped instead of raising a :exc:`TypeError`.
+ Default ``False``.
+
+ :param bool ensure_ascii:
+ If ``True`` (the default), the output is guaranteed to
+ have all incoming non-ASCII characters escaped.
+ If ``False``, these characters will be outputted as-is.
+
+ :param bool check_circular:
+ If ``False``, the circular reference check for container types is skipped
+ and a circular reference will result in a :exc:`RecursionError` (or worse).
+ Default ``True``.
+
+ :param bool allow_nan:
+ If ``False``, serialization of out-of-range :class:`float` values
+ (``nan``, ``inf``, ``-inf``) will result in a :exc:`ValueError`,
+ in strict compliance with the JSON specification.
+ If ``True`` (the default), their JavaScript equivalents
+ (``NaN``, ``Infinity``, ``-Infinity``) are used.
+
+ :param indent:
+ If a positive integer or string, JSON array elements and
+ object members will be pretty-printed with that indent level.
+ A positive integer indents that many spaces per level;
+ a string (such as ``"\t"``) is used to indent each level.
+ If zero, negative, or ``""`` (the empty string),
+ only newlines are inserted.
+ If ``None`` (the default), the most compact representation is used.
+ :type indent: int | str | None
+
+ :param separators:
+ A two-tuple: ``(item_separator, key_separator)``.
+ If ``None`` (the default), *separators* defaults to
+ ``(', ', ': ')`` if *indent* is ``None``,
+ and ``(',', ': ')`` otherwise.
+ For the most compact JSON,
+ specify ``(',', ':')`` to eliminate whitespace.
+ :type separators: tuple | None
+
+ :param default:
+ A function that is called for objects that can't otherwise be serialized.
+ It should return a JSON encodable version of the object
+ or raise a :exc:`TypeError`.
+ If ``None`` (the default), :exc:`!TypeError` is raised.
+ :type default: :term:`callable` | None
+
+ :param sort_keys:
+ If ``True``, dictionaries will be outputted sorted by key.
+ Default ``False``.
.. versionchanged:: 3.2
Allow strings for *indent* in addition to integers.
- If specified, *separators* should be an ``(item_separator, key_separator)``
- tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and
- ``(',', ': ')`` otherwise. To get the most compact JSON representation,
- you should specify ``(',', ':')`` to eliminate whitespace.
-
.. versionchanged:: 3.4
Use ``(',', ': ')`` as default if *indent* is not ``None``.
- If specified, *default* should be a function that gets called for objects that
- can't otherwise be serialized. It should return a JSON encodable version of
- the object or raise a :exc:`TypeError`. If not specified, :exc:`TypeError`
- is raised.
-
- If *sort_keys* is true (default: ``False``), then the output of
- dictionaries will be sorted by key.
-
- To use a custom :class:`JSONEncoder` subclass (e.g. one that overrides the
- :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the
- *cls* kwarg; otherwise :class:`JSONEncoder` is used.
-
.. versionchanged:: 3.6
All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`.
- .. note::
-
- Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
- so trying to serialize multiple objects with repeated calls to
- :func:`dump` using the same *fp* will result in an invalid JSON file.
.. function:: dumps(obj, *, skipkeys=False, ensure_ascii=True, \
check_circular=True, allow_nan=True, cls=None, \
1
0
[3.13] Docs: mark up json.dump() using parameter list (GH-128482) (#128486)
by erlend-aasland Jan. 4, 2025
by erlend-aasland Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/ff7ef94e6e31f132570f866338ad1ad8e7…
commit: ff7ef94e6e31f132570f866338ad1ad8e736d654
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T15:49:57Z
summary:
[3.13] Docs: mark up json.dump() using parameter list (GH-128482) (#128486)
(cherry picked from commit a0088b40bb212dc132e147d04f9287cabd72d163)
Co-authored-by: Erlend E. Aasland <erlend(a)python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
files:
M Doc/library/json.rst
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index bb7b1852e804a1..ce0e652ee58f7f 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -151,69 +151,91 @@ Basic Usage
sort_keys=False, **kw)
Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-supporting
- :term:`file-like object`) using this :ref:`conversion table
+ :term:`file-like object`) using this :ref:`Python-to-JSON conversion table
<py-to-json-table>`.
- If *skipkeys* is true (default: ``False``), then dict keys that are not
- of a basic type (:class:`str`, :class:`int`, :class:`float`, :class:`bool`,
- ``None``) will be skipped instead of raising a :exc:`TypeError`.
-
- The :mod:`json` module always produces :class:`str` objects, not
- :class:`bytes` objects. Therefore, ``fp.write()`` must support :class:`str`
- input.
-
- If *ensure_ascii* is true (the default), the output is guaranteed to
- have all incoming non-ASCII characters escaped. If *ensure_ascii* is
- false, these characters will be output as-is.
+ To use a custom :class:`JSONEncoder` subclass (for example, one that overrides the
+ :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the
+ *cls* keyword argument; otherwise :class:`JSONEncoder` is used.
- If *check_circular* is false (default: ``True``), then the circular
- reference check for container types will be skipped and a circular reference
- will result in a :exc:`RecursionError` (or worse).
+ .. note::
- If *allow_nan* is false (default: ``True``), then it will be a
- :exc:`ValueError` to serialize out of range :class:`float` values (``nan``,
- ``inf``, ``-inf``) in strict compliance of the JSON specification.
- If *allow_nan* is true, their JavaScript equivalents (``NaN``,
- ``Infinity``, ``-Infinity``) will be used.
+ Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
+ so trying to serialize multiple objects with repeated calls to
+ :func:`dump` using the same *fp* will result in an invalid JSON file.
- If *indent* is a non-negative integer or string, then JSON array elements and
- object members will be pretty-printed with that indent level. An indent level
- of 0, negative, or ``""`` will only insert newlines. ``None`` (the default)
- selects the most compact representation. Using a positive integer indent
- indents that many spaces per level. If *indent* is a string (such as ``"\t"``),
- that string is used to indent each level.
+ :param object obj:
+ The Python object to be serialized.
+
+ :param fp:
+ The file-like object *obj* will be serialized to.
+ The :mod:`!json` module always produces :class:`str` objects,
+ not :class:`bytes` objects,
+ therefore ``fp.write()`` must support :class:`str` input.
+ :type fp: :term:`file-like object`
+
+ :param bool skipkeys:
+ If ``True``, keys that are not of a basic type
+ (:class:`str`, :class:`int`, :class:`float`, :class:`bool`, ``None``)
+ will be skipped instead of raising a :exc:`TypeError`.
+ Default ``False``.
+
+ :param bool ensure_ascii:
+ If ``True`` (the default), the output is guaranteed to
+ have all incoming non-ASCII characters escaped.
+ If ``False``, these characters will be outputted as-is.
+
+ :param bool check_circular:
+ If ``False``, the circular reference check for container types is skipped
+ and a circular reference will result in a :exc:`RecursionError` (or worse).
+ Default ``True``.
+
+ :param bool allow_nan:
+ If ``False``, serialization of out-of-range :class:`float` values
+ (``nan``, ``inf``, ``-inf``) will result in a :exc:`ValueError`,
+ in strict compliance with the JSON specification.
+ If ``True`` (the default), their JavaScript equivalents
+ (``NaN``, ``Infinity``, ``-Infinity``) are used.
+
+ :param indent:
+ If a positive integer or string, JSON array elements and
+ object members will be pretty-printed with that indent level.
+ A positive integer indents that many spaces per level;
+ a string (such as ``"\t"``) is used to indent each level.
+ If zero, negative, or ``""`` (the empty string),
+ only newlines are inserted.
+ If ``None`` (the default), the most compact representation is used.
+ :type indent: int | str | None
+
+ :param separators:
+ A two-tuple: ``(item_separator, key_separator)``.
+ If ``None`` (the default), *separators* defaults to
+ ``(', ', ': ')`` if *indent* is ``None``,
+ and ``(',', ': ')`` otherwise.
+ For the most compact JSON,
+ specify ``(',', ':')`` to eliminate whitespace.
+ :type separators: tuple | None
+
+ :param default:
+ A function that is called for objects that can't otherwise be serialized.
+ It should return a JSON encodable version of the object
+ or raise a :exc:`TypeError`.
+ If ``None`` (the default), :exc:`!TypeError` is raised.
+ :type default: :term:`callable` | None
+
+ :param sort_keys:
+ If ``True``, dictionaries will be outputted sorted by key.
+ Default ``False``.
.. versionchanged:: 3.2
Allow strings for *indent* in addition to integers.
- If specified, *separators* should be an ``(item_separator, key_separator)``
- tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and
- ``(',', ': ')`` otherwise. To get the most compact JSON representation,
- you should specify ``(',', ':')`` to eliminate whitespace.
-
.. versionchanged:: 3.4
Use ``(',', ': ')`` as default if *indent* is not ``None``.
- If specified, *default* should be a function that gets called for objects that
- can't otherwise be serialized. It should return a JSON encodable version of
- the object or raise a :exc:`TypeError`. If not specified, :exc:`TypeError`
- is raised.
-
- If *sort_keys* is true (default: ``False``), then the output of
- dictionaries will be sorted by key.
-
- To use a custom :class:`JSONEncoder` subclass (e.g. one that overrides the
- :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the
- *cls* kwarg; otherwise :class:`JSONEncoder` is used.
-
.. versionchanged:: 3.6
All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`.
- .. note::
-
- Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
- so trying to serialize multiple objects with repeated calls to
- :func:`dump` using the same *fp* will result in an invalid JSON file.
.. function:: dumps(obj, *, skipkeys=False, ensure_ascii=True, \
check_circular=True, allow_nan=True, cls=None, \
1
0
pathlib tests: create `walk()` test hierarchy without using class under test (#128338)
by barneygale Jan. 4, 2025
by barneygale Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/fd94c6a8032676d0659aa9e38cdaa7c170…
commit: fd94c6a8032676d0659aa9e38cdaa7c17093119c
branch: main
author: Barney Gale <barney.gale(a)gmail.com>
committer: barneygale <barney.gale(a)gmail.com>
date: 2025-01-04T15:45:24Z
summary:
pathlib tests: create `walk()` test hierarchy without using class under test (#128338)
In the tests for `pathlib.Path.walk()`, avoid using the path class under
test (`self.cls`) in test setup. Instead we use `os` functions in
`test_pathlib`, and direct manipulation of `DummyPath` internal data in
`test_pathlib_abc`.
files:
M Lib/test/test_pathlib/test_pathlib.py
M Lib/test/test_pathlib/test_pathlib_abc.py
diff --git a/Lib/test/test_pathlib/test_pathlib.py b/Lib/test/test_pathlib/test_pathlib.py
index a67a1c531630a1..6548577f4de12c 100644
--- a/Lib/test/test_pathlib/test_pathlib.py
+++ b/Lib/test/test_pathlib/test_pathlib.py
@@ -3029,6 +3029,42 @@ def setUp(self):
if name in _tests_needing_symlinks and not self.can_symlink:
self.skipTest('requires symlinks')
super().setUp()
+
+ def createTestHierarchy(self):
+ # Build:
+ # TESTFN/
+ # TEST1/ a file kid and two directory kids
+ # tmp1
+ # SUB1/ a file kid and a directory kid
+ # tmp2
+ # SUB11/ no kids
+ # SUB2/ a file kid and a dirsymlink kid
+ # tmp3
+ # link/ a symlink to TEST2
+ # broken_link
+ # broken_link2
+ # TEST2/
+ # tmp4 a lone file
+ t2_path = self.cls(self.base, "TEST2")
+ os.makedirs(self.sub11_path)
+ os.makedirs(self.sub2_path)
+ os.makedirs(t2_path)
+
+ tmp1_path = self.walk_path / "tmp1"
+ tmp2_path = self.sub1_path / "tmp2"
+ tmp3_path = self.sub2_path / "tmp3"
+ tmp4_path = self.cls(self.base, "TEST2", "tmp4")
+ for path in tmp1_path, tmp2_path, tmp3_path, tmp4_path:
+ with open(path, "w", encoding='utf-8') as f:
+ f.write(f"I'm {path} and proud of it. Blame test_pathlib.\n")
+
+ if self.can_symlink:
+ broken_link_path = self.sub2_path / "broken_link"
+ broken_link2_path = self.sub2_path / "broken_link2"
+ os.symlink(t2_path, self.link_path, target_is_directory=True)
+ os.symlink('broken', broken_link_path)
+ os.symlink(os.path.join('tmp3', 'broken'), broken_link2_path)
+ self.sub2_tree = (self.sub2_path, [], ["broken_link", "broken_link2", "link", "tmp3"])
sub21_path= self.sub2_path / "SUB21"
tmp5_path = sub21_path / "tmp3"
broken_link3_path = self.sub2_path / "broken_link3"
@@ -3052,7 +3088,7 @@ def setUp(self):
def tearDown(self):
if 'SUB21' in self.sub2_tree[1]:
os.chmod(self.sub2_path / "SUB21", stat.S_IRWXU)
- super().tearDown()
+ os_helper.rmtree(self.base)
def test_walk_bad_dir(self):
errors = []
diff --git a/Lib/test/test_pathlib/test_pathlib_abc.py b/Lib/test/test_pathlib/test_pathlib_abc.py
index 0762f224fc9ac4..87aef0c130cf9e 100644
--- a/Lib/test/test_pathlib/test_pathlib_abc.py
+++ b/Lib/test/test_pathlib/test_pathlib_abc.py
@@ -1580,52 +1580,35 @@ class DummyPathWalkTest(unittest.TestCase):
can_symlink = False
def setUp(self):
- # Build:
- # TESTFN/
- # TEST1/ a file kid and two directory kids
- # tmp1
- # SUB1/ a file kid and a directory kid
- # tmp2
- # SUB11/ no kids
- # SUB2/ a file kid and a dirsymlink kid
- # tmp3
- # link/ a symlink to TEST2
- # broken_link
- # broken_link2
- # TEST2/
- # tmp4 a lone file
self.walk_path = self.cls(self.base, "TEST1")
self.sub1_path = self.walk_path / "SUB1"
self.sub11_path = self.sub1_path / "SUB11"
self.sub2_path = self.walk_path / "SUB2"
- tmp1_path = self.walk_path / "tmp1"
- tmp2_path = self.sub1_path / "tmp2"
- tmp3_path = self.sub2_path / "tmp3"
self.link_path = self.sub2_path / "link"
- t2_path = self.cls(self.base, "TEST2")
- tmp4_path = self.cls(self.base, "TEST2", "tmp4")
- broken_link_path = self.sub2_path / "broken_link"
- broken_link2_path = self.sub2_path / "broken_link2"
-
- self.sub11_path.mkdir(parents=True)
- self.sub2_path.mkdir(parents=True)
- t2_path.mkdir(parents=True)
-
- for path in tmp1_path, tmp2_path, tmp3_path, tmp4_path:
- with path.open("w", encoding='utf-8') as f:
- f.write(f"I'm {path} and proud of it. Blame test_pathlib.\n")
+ self.sub2_tree = (self.sub2_path, [], ["tmp3"])
+ self.createTestHierarchy()
- if self.can_symlink:
- self.link_path.symlink_to(t2_path, target_is_directory=True)
- broken_link_path.symlink_to('broken')
- broken_link2_path.symlink_to(self.cls('tmp3', 'broken'))
- self.sub2_tree = (self.sub2_path, [], ["broken_link", "broken_link2", "link", "tmp3"])
- else:
- self.sub2_tree = (self.sub2_path, [], ["tmp3"])
+ def createTestHierarchy(self):
+ cls = self.cls
+ cls._files = {
+ f'{self.base}/TEST1/tmp1': b'this is tmp1\n',
+ f'{self.base}/TEST1/SUB1/tmp2': b'this is tmp2\n',
+ f'{self.base}/TEST1/SUB2/tmp3': b'this is tmp3\n',
+ f'{self.base}/TEST2/tmp4': b'this is tmp4\n',
+ }
+ cls._directories = {
+ f'{self.base}': {'TEST1', 'TEST2'},
+ f'{self.base}/TEST1': {'SUB1', 'SUB2', 'tmp1'},
+ f'{self.base}/TEST1/SUB1': {'SUB11', 'tmp2'},
+ f'{self.base}/TEST1/SUB1/SUB11': set(),
+ f'{self.base}/TEST1/SUB2': {'tmp3'},
+ f'{self.base}/TEST2': {'tmp4'},
+ }
def tearDown(self):
- base = self.cls(self.base)
- base._delete()
+ cls = self.cls
+ cls._files.clear()
+ cls._directories.clear()
def test_walk_topdown(self):
walker = self.walk_path.walk()
1
0
Jan. 4, 2025
https://github.com/python/cpython/commit/a0088b40bb212dc132e147d04f9287cabd…
commit: a0088b40bb212dc132e147d04f9287cabd72d163
branch: main
author: Erlend E. Aasland <erlend(a)python.org>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T15:44:34Z
summary:
Docs: mark up json.dump() using parameter list (#128482)
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
files:
M Doc/library/json.rst
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index 758d47462b6e12..f11109fb0ecfed 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -151,69 +151,91 @@ Basic Usage
sort_keys=False, **kw)
Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-supporting
- :term:`file-like object`) using this :ref:`conversion table
+ :term:`file-like object`) using this :ref:`Python-to-JSON conversion table
<py-to-json-table>`.
- If *skipkeys* is true (default: ``False``), then dict keys that are not
- of a basic type (:class:`str`, :class:`int`, :class:`float`, :class:`bool`,
- ``None``) will be skipped instead of raising a :exc:`TypeError`.
-
- The :mod:`json` module always produces :class:`str` objects, not
- :class:`bytes` objects. Therefore, ``fp.write()`` must support :class:`str`
- input.
-
- If *ensure_ascii* is true (the default), the output is guaranteed to
- have all incoming non-ASCII characters escaped. If *ensure_ascii* is
- false, these characters will be output as-is.
+ To use a custom :class:`JSONEncoder` subclass (for example, one that overrides the
+ :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the
+ *cls* keyword argument; otherwise :class:`JSONEncoder` is used.
- If *check_circular* is false (default: ``True``), then the circular
- reference check for container types will be skipped and a circular reference
- will result in a :exc:`RecursionError` (or worse).
+ .. note::
- If *allow_nan* is false (default: ``True``), then it will be a
- :exc:`ValueError` to serialize out of range :class:`float` values (``nan``,
- ``inf``, ``-inf``) in strict compliance of the JSON specification.
- If *allow_nan* is true, their JavaScript equivalents (``NaN``,
- ``Infinity``, ``-Infinity``) will be used.
+ Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
+ so trying to serialize multiple objects with repeated calls to
+ :func:`dump` using the same *fp* will result in an invalid JSON file.
- If *indent* is a non-negative integer or string, then JSON array elements and
- object members will be pretty-printed with that indent level. An indent level
- of 0, negative, or ``""`` will only insert newlines. ``None`` (the default)
- selects the most compact representation. Using a positive integer indent
- indents that many spaces per level. If *indent* is a string (such as ``"\t"``),
- that string is used to indent each level.
+ :param object obj:
+ The Python object to be serialized.
+
+ :param fp:
+ The file-like object *obj* will be serialized to.
+ The :mod:`!json` module always produces :class:`str` objects,
+ not :class:`bytes` objects,
+ therefore ``fp.write()`` must support :class:`str` input.
+ :type fp: :term:`file-like object`
+
+ :param bool skipkeys:
+ If ``True``, keys that are not of a basic type
+ (:class:`str`, :class:`int`, :class:`float`, :class:`bool`, ``None``)
+ will be skipped instead of raising a :exc:`TypeError`.
+ Default ``False``.
+
+ :param bool ensure_ascii:
+ If ``True`` (the default), the output is guaranteed to
+ have all incoming non-ASCII characters escaped.
+ If ``False``, these characters will be outputted as-is.
+
+ :param bool check_circular:
+ If ``False``, the circular reference check for container types is skipped
+ and a circular reference will result in a :exc:`RecursionError` (or worse).
+ Default ``True``.
+
+ :param bool allow_nan:
+ If ``False``, serialization of out-of-range :class:`float` values
+ (``nan``, ``inf``, ``-inf``) will result in a :exc:`ValueError`,
+ in strict compliance with the JSON specification.
+ If ``True`` (the default), their JavaScript equivalents
+ (``NaN``, ``Infinity``, ``-Infinity``) are used.
+
+ :param indent:
+ If a positive integer or string, JSON array elements and
+ object members will be pretty-printed with that indent level.
+ A positive integer indents that many spaces per level;
+ a string (such as ``"\t"``) is used to indent each level.
+ If zero, negative, or ``""`` (the empty string),
+ only newlines are inserted.
+ If ``None`` (the default), the most compact representation is used.
+ :type indent: int | str | None
+
+ :param separators:
+ A two-tuple: ``(item_separator, key_separator)``.
+ If ``None`` (the default), *separators* defaults to
+ ``(', ', ': ')`` if *indent* is ``None``,
+ and ``(',', ': ')`` otherwise.
+ For the most compact JSON,
+ specify ``(',', ':')`` to eliminate whitespace.
+ :type separators: tuple | None
+
+ :param default:
+ A function that is called for objects that can't otherwise be serialized.
+ It should return a JSON encodable version of the object
+ or raise a :exc:`TypeError`.
+ If ``None`` (the default), :exc:`!TypeError` is raised.
+ :type default: :term:`callable` | None
+
+ :param sort_keys:
+ If ``True``, dictionaries will be outputted sorted by key.
+ Default ``False``.
.. versionchanged:: 3.2
Allow strings for *indent* in addition to integers.
- If specified, *separators* should be an ``(item_separator, key_separator)``
- tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and
- ``(',', ': ')`` otherwise. To get the most compact JSON representation,
- you should specify ``(',', ':')`` to eliminate whitespace.
-
.. versionchanged:: 3.4
Use ``(',', ': ')`` as default if *indent* is not ``None``.
- If specified, *default* should be a function that gets called for objects that
- can't otherwise be serialized. It should return a JSON encodable version of
- the object or raise a :exc:`TypeError`. If not specified, :exc:`TypeError`
- is raised.
-
- If *sort_keys* is true (default: ``False``), then the output of
- dictionaries will be sorted by key.
-
- To use a custom :class:`JSONEncoder` subclass (e.g. one that overrides the
- :meth:`~JSONEncoder.default` method to serialize additional types), specify it with the
- *cls* kwarg; otherwise :class:`JSONEncoder` is used.
-
.. versionchanged:: 3.6
All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`.
- .. note::
-
- Unlike :mod:`pickle` and :mod:`marshal`, JSON is not a framed protocol,
- so trying to serialize multiple objects with repeated calls to
- :func:`dump` using the same *fp* will result in an invalid JSON file.
.. function:: dumps(obj, *, skipkeys=False, ensure_ascii=True, \
check_circular=True, allow_nan=True, cls=None, \
1
0
GH-127381: pathlib ABCs: remove `PathBase.move()` and `move_into()` (#128337)
by barneygale Jan. 4, 2025
by barneygale Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/95352dcb9321423d0606ae0b01524ad61c…
commit: 95352dcb9321423d0606ae0b01524ad61c2c2ec1
branch: main
author: Barney Gale <barney.gale(a)gmail.com>
committer: barneygale <barney.gale(a)gmail.com>
date: 2025-01-04T12:53:51Z
summary:
GH-127381: pathlib ABCs: remove `PathBase.move()` and `move_into()` (#128337)
These methods combine `_delete()` and `copy()`, but `_delete()` isn't part
of the public interface, and it's unlikely to be added until the pathlib
ABCs are made official, or perhaps even later.
files:
M Lib/pathlib/_abc.py
M Lib/pathlib/_local.py
M Lib/test/test_pathlib/test_pathlib.py
M Lib/test/test_pathlib/test_pathlib_abc.py
diff --git a/Lib/pathlib/_abc.py b/Lib/pathlib/_abc.py
index e6ff3fe1187512..7de2bb066f8f99 100644
--- a/Lib/pathlib/_abc.py
+++ b/Lib/pathlib/_abc.py
@@ -573,30 +573,3 @@ def copy_into(self, target_dir, *, follow_symlinks=True,
return self.copy(target, follow_symlinks=follow_symlinks,
dirs_exist_ok=dirs_exist_ok,
preserve_metadata=preserve_metadata)
-
- def _delete(self):
- """
- Delete this file or directory (including all sub-directories).
- """
- raise NotImplementedError
-
- def move(self, target):
- """
- Recursively move this file or directory tree to the given destination.
- """
- target = self.copy(target, follow_symlinks=False, preserve_metadata=True)
- self._delete()
- return target
-
- def move_into(self, target_dir):
- """
- Move this file or directory tree into the given existing directory.
- """
- name = self.name
- if not name:
- raise ValueError(f"{self!r} has an empty name")
- elif isinstance(target_dir, PathBase):
- target = target_dir / name
- else:
- target = self.with_segments(target_dir, name)
- return self.move(target)
diff --git a/Lib/pathlib/_local.py b/Lib/pathlib/_local.py
index c5721a69d00470..1da85ddea24376 100644
--- a/Lib/pathlib/_local.py
+++ b/Lib/pathlib/_local.py
@@ -1128,16 +1128,38 @@ def move(self, target):
"""
Recursively move this file or directory tree to the given destination.
"""
- if not isinstance(target, PathBase):
- target = self.with_segments(target)
- target.copy._ensure_different_file(self)
+ # Use os.replace() if the target is os.PathLike and on the same FS.
try:
- return self.replace(target)
- except OSError as err:
- if err.errno != EXDEV:
- raise
+ target_str = os.fspath(target)
+ except TypeError:
+ pass
+ else:
+ if not isinstance(target, PathBase):
+ target = self.with_segments(target_str)
+ target.copy._ensure_different_file(self)
+ try:
+ os.replace(self, target_str)
+ return target
+ except OSError as err:
+ if err.errno != EXDEV:
+ raise
# Fall back to copy+delete.
- return PathBase.move(self, target)
+ target = self.copy(target, follow_symlinks=False, preserve_metadata=True)
+ self._delete()
+ return target
+
+ def move_into(self, target_dir):
+ """
+ Move this file or directory tree into the given existing directory.
+ """
+ name = self.name
+ if not name:
+ raise ValueError(f"{self!r} has an empty name")
+ elif isinstance(target_dir, PathBase):
+ target = target_dir / name
+ else:
+ target = self.with_segments(target_dir, name)
+ return self.move(target)
if hasattr(os, "symlink"):
def symlink_to(self, target, target_is_directory=False):
diff --git a/Lib/test/test_pathlib/test_pathlib.py b/Lib/test/test_pathlib/test_pathlib.py
index d13daf8ac8cb07..a67a1c531630a1 100644
--- a/Lib/test/test_pathlib/test_pathlib.py
+++ b/Lib/test/test_pathlib/test_pathlib.py
@@ -1423,26 +1423,97 @@ def test_move_dangling_symlink(self):
self.assertTrue(target.is_symlink())
self.assertEqual(source_readlink, target.readlink())
+ def test_move_file(self):
+ base = self.cls(self.base)
+ source = base / 'fileA'
+ source_text = source.read_text()
+ target = base / 'fileA_moved'
+ result = source.move(target)
+ self.assertEqual(result, target)
+ self.assertFalse(source.exists())
+ self.assertTrue(target.exists())
+ self.assertEqual(source_text, target.read_text())
+
@patch_replace
def test_move_file_other_fs(self):
self.test_move_file()
+ def test_move_file_to_file(self):
+ base = self.cls(self.base)
+ source = base / 'fileA'
+ source_text = source.read_text()
+ target = base / 'dirB' / 'fileB'
+ result = source.move(target)
+ self.assertEqual(result, target)
+ self.assertFalse(source.exists())
+ self.assertTrue(target.exists())
+ self.assertEqual(source_text, target.read_text())
+
@patch_replace
def test_move_file_to_file_other_fs(self):
self.test_move_file_to_file()
+ def test_move_file_to_dir(self):
+ base = self.cls(self.base)
+ source = base / 'fileA'
+ target = base / 'dirB'
+ self.assertRaises(OSError, source.move, target)
+
@patch_replace
def test_move_file_to_dir_other_fs(self):
self.test_move_file_to_dir()
+ def test_move_file_to_itself(self):
+ base = self.cls(self.base)
+ source = base / 'fileA'
+ self.assertRaises(OSError, source.move, source)
+
+ def test_move_dir(self):
+ base = self.cls(self.base)
+ source = base / 'dirC'
+ target = base / 'dirC_moved'
+ result = source.move(target)
+ self.assertEqual(result, target)
+ self.assertFalse(source.exists())
+ self.assertTrue(target.is_dir())
+ self.assertTrue(target.joinpath('dirD').is_dir())
+ self.assertTrue(target.joinpath('dirD', 'fileD').is_file())
+ self.assertEqual(target.joinpath('dirD', 'fileD').read_text(),
+ "this is file D\n")
+ self.assertTrue(target.joinpath('fileC').is_file())
+ self.assertTrue(target.joinpath('fileC').read_text(),
+ "this is file C\n")
+
@patch_replace
def test_move_dir_other_fs(self):
self.test_move_dir()
+ def test_move_dir_to_dir(self):
+ base = self.cls(self.base)
+ source = base / 'dirC'
+ target = base / 'dirB'
+ self.assertRaises(OSError, source.move, target)
+ self.assertTrue(source.exists())
+ self.assertTrue(target.exists())
+
@patch_replace
def test_move_dir_to_dir_other_fs(self):
self.test_move_dir_to_dir()
+ def test_move_dir_to_itself(self):
+ base = self.cls(self.base)
+ source = base / 'dirC'
+ self.assertRaises(OSError, source.move, source)
+ self.assertTrue(source.exists())
+
+ def test_move_dir_into_itself(self):
+ base = self.cls(self.base)
+ source = base / 'dirC'
+ target = base / 'dirC' / 'bar'
+ self.assertRaises(OSError, source.move, target)
+ self.assertTrue(source.exists())
+ self.assertFalse(target.exists())
+
@patch_replace
def test_move_dir_into_itself_other_fs(self):
self.test_move_dir_into_itself()
@@ -1472,10 +1543,26 @@ def test_move_dir_symlink_to_itself_other_fs(self):
def test_move_dangling_symlink_other_fs(self):
self.test_move_dangling_symlink()
+ def test_move_into(self):
+ base = self.cls(self.base)
+ source = base / 'fileA'
+ source_text = source.read_text()
+ target_dir = base / 'dirA'
+ result = source.move_into(target_dir)
+ self.assertEqual(result, target_dir / 'fileA')
+ self.assertFalse(source.exists())
+ self.assertTrue(result.exists())
+ self.assertEqual(source_text, result.read_text())
+
@patch_replace
def test_move_into_other_os(self):
self.test_move_into()
+ def test_move_into_empty_name(self):
+ source = self.cls('')
+ target_dir = self.base
+ self.assertRaises(ValueError, source.move_into, target_dir)
+
@patch_replace
def test_move_into_empty_name_other_os(self):
self.test_move_into_empty_name()
@@ -1794,6 +1881,37 @@ def test_rmdir(self):
self.assertFileNotFound(p.stat)
self.assertFileNotFound(p.unlink)
+ def test_delete_file(self):
+ p = self.cls(self.base) / 'fileA'
+ p._delete()
+ self.assertFalse(p.exists())
+ self.assertFileNotFound(p._delete)
+
+ def test_delete_dir(self):
+ base = self.cls(self.base)
+ base.joinpath('dirA')._delete()
+ self.assertFalse(base.joinpath('dirA').exists())
+ self.assertFalse(base.joinpath('dirA', 'linkC').exists(
+ follow_symlinks=False))
+ base.joinpath('dirB')._delete()
+ self.assertFalse(base.joinpath('dirB').exists())
+ self.assertFalse(base.joinpath('dirB', 'fileB').exists())
+ self.assertFalse(base.joinpath('dirB', 'linkD').exists(
+ follow_symlinks=False))
+ base.joinpath('dirC')._delete()
+ self.assertFalse(base.joinpath('dirC').exists())
+ self.assertFalse(base.joinpath('dirC', 'dirD').exists())
+ self.assertFalse(base.joinpath('dirC', 'dirD', 'fileD').exists())
+ self.assertFalse(base.joinpath('dirC', 'fileC').exists())
+ self.assertFalse(base.joinpath('dirC', 'novel.txt').exists())
+
+ def test_delete_missing(self):
+ tmp = self.cls(self.base, 'delete')
+ tmp.mkdir()
+ # filename is guaranteed not to exist
+ filename = tmp / 'foo'
+ self.assertRaises(FileNotFoundError, filename._delete)
+
@needs_symlinks
def test_delete_symlink(self):
tmp = self.cls(self.base, 'delete')
diff --git a/Lib/test/test_pathlib/test_pathlib_abc.py b/Lib/test/test_pathlib/test_pathlib_abc.py
index d588442bd11785..0762f224fc9ac4 100644
--- a/Lib/test/test_pathlib/test_pathlib_abc.py
+++ b/Lib/test/test_pathlib/test_pathlib_abc.py
@@ -1345,93 +1345,6 @@ def test_copy_into_empty_name(self):
target_dir = self.base
self.assertRaises(ValueError, source.copy_into, target_dir)
- def test_move_file(self):
- base = self.cls(self.base)
- source = base / 'fileA'
- source_text = source.read_text()
- target = base / 'fileA_moved'
- result = source.move(target)
- self.assertEqual(result, target)
- self.assertFalse(source.exists())
- self.assertTrue(target.exists())
- self.assertEqual(source_text, target.read_text())
-
- def test_move_file_to_file(self):
- base = self.cls(self.base)
- source = base / 'fileA'
- source_text = source.read_text()
- target = base / 'dirB' / 'fileB'
- result = source.move(target)
- self.assertEqual(result, target)
- self.assertFalse(source.exists())
- self.assertTrue(target.exists())
- self.assertEqual(source_text, target.read_text())
-
- def test_move_file_to_dir(self):
- base = self.cls(self.base)
- source = base / 'fileA'
- target = base / 'dirB'
- self.assertRaises(OSError, source.move, target)
-
- def test_move_file_to_itself(self):
- base = self.cls(self.base)
- source = base / 'fileA'
- self.assertRaises(OSError, source.move, source)
-
- def test_move_dir(self):
- base = self.cls(self.base)
- source = base / 'dirC'
- target = base / 'dirC_moved'
- result = source.move(target)
- self.assertEqual(result, target)
- self.assertFalse(source.exists())
- self.assertTrue(target.is_dir())
- self.assertTrue(target.joinpath('dirD').is_dir())
- self.assertTrue(target.joinpath('dirD', 'fileD').is_file())
- self.assertEqual(target.joinpath('dirD', 'fileD').read_text(),
- "this is file D\n")
- self.assertTrue(target.joinpath('fileC').is_file())
- self.assertTrue(target.joinpath('fileC').read_text(),
- "this is file C\n")
-
- def test_move_dir_to_dir(self):
- base = self.cls(self.base)
- source = base / 'dirC'
- target = base / 'dirB'
- self.assertRaises(OSError, source.move, target)
- self.assertTrue(source.exists())
- self.assertTrue(target.exists())
-
- def test_move_dir_to_itself(self):
- base = self.cls(self.base)
- source = base / 'dirC'
- self.assertRaises(OSError, source.move, source)
- self.assertTrue(source.exists())
-
- def test_move_dir_into_itself(self):
- base = self.cls(self.base)
- source = base / 'dirC'
- target = base / 'dirC' / 'bar'
- self.assertRaises(OSError, source.move, target)
- self.assertTrue(source.exists())
- self.assertFalse(target.exists())
-
- def test_move_into(self):
- base = self.cls(self.base)
- source = base / 'fileA'
- source_text = source.read_text()
- target_dir = base / 'dirA'
- result = source.move_into(target_dir)
- self.assertEqual(result, target_dir / 'fileA')
- self.assertFalse(source.exists())
- self.assertTrue(result.exists())
- self.assertEqual(source_text, result.read_text())
-
- def test_move_into_empty_name(self):
- source = self.cls('')
- target_dir = self.base
- self.assertRaises(ValueError, source.move_into, target_dir)
-
def test_iterdir(self):
P = self.cls
p = P(self.base)
@@ -1660,37 +1573,6 @@ def test_is_symlink(self):
self.assertIs((P / 'linkA\udfff').is_file(), False)
self.assertIs((P / 'linkA\x00').is_file(), False)
- def test_delete_file(self):
- p = self.cls(self.base) / 'fileA'
- p._delete()
- self.assertFalse(p.exists())
- self.assertFileNotFound(p._delete)
-
- def test_delete_dir(self):
- base = self.cls(self.base)
- base.joinpath('dirA')._delete()
- self.assertFalse(base.joinpath('dirA').exists())
- self.assertFalse(base.joinpath('dirA', 'linkC').exists(
- follow_symlinks=False))
- base.joinpath('dirB')._delete()
- self.assertFalse(base.joinpath('dirB').exists())
- self.assertFalse(base.joinpath('dirB', 'fileB').exists())
- self.assertFalse(base.joinpath('dirB', 'linkD').exists(
- follow_symlinks=False))
- base.joinpath('dirC')._delete()
- self.assertFalse(base.joinpath('dirC').exists())
- self.assertFalse(base.joinpath('dirC', 'dirD').exists())
- self.assertFalse(base.joinpath('dirC', 'dirD', 'fileD').exists())
- self.assertFalse(base.joinpath('dirC', 'fileC').exists())
- self.assertFalse(base.joinpath('dirC', 'novel.txt').exists())
-
- def test_delete_missing(self):
- tmp = self.cls(self.base, 'delete')
- tmp.mkdir()
- # filename is guaranteed not to exist
- filename = tmp / 'foo'
- self.assertRaises(FileNotFoundError, filename._delete)
-
class DummyPathWalkTest(unittest.TestCase):
cls = DummyPath
1
0
[3.13] gh-128152: Argument Clinic: ignore pre-processor directives inside C comments (GH-128464) (#128478)
by erlend-aasland Jan. 4, 2025
by erlend-aasland Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/883cb23dd14bcc60921a53cc51c30fda22…
commit: 883cb23dd14bcc60921a53cc51c30fda223b9ca6
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T11:09:25Z
summary:
[3.13] gh-128152: Argument Clinic: ignore pre-processor directives inside C comments (GH-128464) (#128478)
(cherry picked from commit a4e773c540cfd3a9c2bb3b5033d2f79ef50962c8)
Co-authored-by: Erlend E. Aasland <erlend(a)python.org>
files:
A Misc/NEWS.d/next/Tools-Demos/2025-01-03-23-51-07.gh-issue-128152.IhzElS.rst
M Lib/test/test_clinic.py
M Tools/clinic/libclinic/cpp.py
diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py
index a7ba7f3d99860e..e210103a80f399 100644
--- a/Lib/test/test_clinic.py
+++ b/Lib/test/test_clinic.py
@@ -731,6 +731,16 @@ def test_cloned_forced_text_signature_illegal(self):
err = "Cannot use @text_signature when cloning a function"
self.expect_failure(block, err, lineno=11)
+ def test_ignore_preprocessor_in_comments(self):
+ for dsl in "clinic", "python":
+ raw = dedent(f"""\
+ /*[{dsl} input]
+ # CPP directives, valid or not, should be ignored in C comments.
+ #
+ [{dsl} start generated code]*/
+ """)
+ self.clinic.parse(raw)
+
class ParseFileUnitTest(TestCase):
def expect_parsing_failure(
diff --git a/Misc/NEWS.d/next/Tools-Demos/2025-01-03-23-51-07.gh-issue-128152.IhzElS.rst b/Misc/NEWS.d/next/Tools-Demos/2025-01-03-23-51-07.gh-issue-128152.IhzElS.rst
new file mode 100644
index 00000000000000..9657e138e9911b
--- /dev/null
+++ b/Misc/NEWS.d/next/Tools-Demos/2025-01-03-23-51-07.gh-issue-128152.IhzElS.rst
@@ -0,0 +1,2 @@
+Fix a bug where Argument Clinic's C pre-processor parser tried to parse
+pre-processor directives inside C comments. Patch by Erlend Aasland.
diff --git a/Tools/clinic/libclinic/cpp.py b/Tools/clinic/libclinic/cpp.py
index e115d65a88e1b6..3cfe99b712641d 100644
--- a/Tools/clinic/libclinic/cpp.py
+++ b/Tools/clinic/libclinic/cpp.py
@@ -132,6 +132,9 @@ def pop_stack() -> TokenAndCondition:
if line_comment:
line = before.rstrip()
+ if self.in_comment:
+ return
+
if not line.startswith('#'):
return
1
0
gh-128152: Argument Clinic: ignore pre-processor directives inside C comments (#128464)
by erlend-aasland Jan. 4, 2025
by erlend-aasland Jan. 4, 2025
Jan. 4, 2025
https://github.com/python/cpython/commit/a4e773c540cfd3a9c2bb3b5033d2f79ef5…
commit: a4e773c540cfd3a9c2bb3b5033d2f79ef50962c8
branch: main
author: Erlend E. Aasland <erlend(a)python.org>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T11:46:04+01:00
summary:
gh-128152: Argument Clinic: ignore pre-processor directives inside C comments (#128464)
files:
A Misc/NEWS.d/next/Tools-Demos/2025-01-03-23-51-07.gh-issue-128152.IhzElS.rst
M Lib/test/test_clinic.py
M Tools/clinic/libclinic/cpp.py
diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py
index 11054963b6ff03..b45b9ee89ee3de 100644
--- a/Lib/test/test_clinic.py
+++ b/Lib/test/test_clinic.py
@@ -740,6 +740,16 @@ def test_cloned_forced_text_signature_illegal(self):
err = "Cannot use @text_signature when cloning a function"
self.expect_failure(block, err, lineno=11)
+ def test_ignore_preprocessor_in_comments(self):
+ for dsl in "clinic", "python":
+ raw = dedent(f"""\
+ /*[{dsl} input]
+ # CPP directives, valid or not, should be ignored in C comments.
+ #
+ [{dsl} start generated code]*/
+ """)
+ self.clinic.parse(raw)
+
class ParseFileUnitTest(TestCase):
def expect_parsing_failure(
diff --git a/Misc/NEWS.d/next/Tools-Demos/2025-01-03-23-51-07.gh-issue-128152.IhzElS.rst b/Misc/NEWS.d/next/Tools-Demos/2025-01-03-23-51-07.gh-issue-128152.IhzElS.rst
new file mode 100644
index 00000000000000..9657e138e9911b
--- /dev/null
+++ b/Misc/NEWS.d/next/Tools-Demos/2025-01-03-23-51-07.gh-issue-128152.IhzElS.rst
@@ -0,0 +1,2 @@
+Fix a bug where Argument Clinic's C pre-processor parser tried to parse
+pre-processor directives inside C comments. Patch by Erlend Aasland.
diff --git a/Tools/clinic/libclinic/cpp.py b/Tools/clinic/libclinic/cpp.py
index e115d65a88e1b6..3cfe99b712641d 100644
--- a/Tools/clinic/libclinic/cpp.py
+++ b/Tools/clinic/libclinic/cpp.py
@@ -132,6 +132,9 @@ def pop_stack() -> TokenAndCondition:
if line_comment:
line = before.rstrip()
+ if self.in_comment:
+ return
+
if not line.startswith('#'):
return
1
0
https://github.com/python/cpython/commit/03ede5afe2d10c04e05f159fd353ee5869…
commit: 03ede5afe2d10c04e05f159fd353ee5869ae2cdb
branch: main
author: sobolevn <mail(a)sobolevn.me>
committer: sobolevn <mail(a)sobolevn.me>
date: 2025-01-04T13:31:01+03:00
summary:
Add `check-readthedocs` pre-commit hook (#128453)
files:
M .pre-commit-config.yaml
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 107f3b255735f4..af6accd89b5bd4 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -55,6 +55,7 @@ repos:
hooks:
- id: check-dependabot
- id: check-github-workflows
+ - id: check-readthedocs
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
1
0
Jan. 4, 2025
https://github.com/python/cpython/commit/513a4efa75bf78c9d629ddabc9516fb058…
commit: 513a4efa75bf78c9d629ddabc9516fb058787289
branch: main
author: Kumar Aditya <kumaraditya(a)python.org>
committer: kumaraditya303 <kumaraditya(a)python.org>
date: 2025-01-04T14:18:22+05:30
summary:
gh-128002: fix many thread safety issues in asyncio (#128147)
* Makes `_asyncio.Task` and `_asyncio.Future` thread-safe by adding critical sections
* Add assertions to check for thread safety checking locking of object by critical sections in internal functions
* Make `_asyncio.all_tasks` thread safe when eager tasks are used
* Add a thread safety test
files:
A Lib/test/test_asyncio/test_free_threading.py
M Modules/_asynciomodule.c
M Modules/clinic/_asynciomodule.c.h
diff --git a/Lib/test/test_asyncio/test_free_threading.py b/Lib/test/test_asyncio/test_free_threading.py
new file mode 100644
index 00000000000000..90bddbf3a9dda1
--- /dev/null
+++ b/Lib/test/test_asyncio/test_free_threading.py
@@ -0,0 +1,82 @@
+import asyncio
+import unittest
+from threading import Thread
+from unittest import TestCase
+
+from test.support import threading_helper
+
+threading_helper.requires_working_threading(module=True)
+
+def tearDownModule():
+ asyncio._set_event_loop_policy(None)
+
+
+class TestFreeThreading:
+ def test_all_tasks_race(self) -> None:
+ async def main():
+ loop = asyncio.get_running_loop()
+ future = loop.create_future()
+
+ async def coro():
+ await future
+
+ tasks = set()
+
+ async with asyncio.TaskGroup() as tg:
+ for _ in range(100):
+ tasks.add(tg.create_task(coro()))
+
+ all_tasks = self.all_tasks(loop)
+ self.assertEqual(len(all_tasks), 101)
+
+ for task in all_tasks:
+ self.assertEqual(task.get_loop(), loop)
+ self.assertFalse(task.done())
+
+ current = self.current_task()
+ self.assertEqual(current.get_loop(), loop)
+ self.assertSetEqual(all_tasks, tasks | {current})
+ future.set_result(None)
+
+ def runner():
+ with asyncio.Runner() as runner:
+ loop = runner.get_loop()
+ loop.set_task_factory(self.factory)
+ runner.run(main())
+
+ threads = []
+
+ for _ in range(10):
+ thread = Thread(target=runner)
+ threads.append(thread)
+
+ with threading_helper.start_threads(threads):
+ pass
+
+
+class TestPyFreeThreading(TestFreeThreading, TestCase):
+ all_tasks = staticmethod(asyncio.tasks._py_all_tasks)
+ current_task = staticmethod(asyncio.tasks._py_current_task)
+
+ def factory(self, loop, coro, context=None):
+ return asyncio.tasks._PyTask(coro, loop=loop, context=context)
+
+
+(a)unittest.skipUnless(hasattr(asyncio.tasks, "_c_all_tasks"), "requires _asyncio")
+class TestCFreeThreading(TestFreeThreading, TestCase):
+ all_tasks = staticmethod(getattr(asyncio.tasks, "_c_all_tasks", None))
+ current_task = staticmethod(getattr(asyncio.tasks, "_c_current_task", None))
+
+ def factory(self, loop, coro, context=None):
+ return asyncio.tasks._CTask(coro, loop=loop, context=context)
+
+
+class TestEagerPyFreeThreading(TestPyFreeThreading):
+ def factory(self, loop, coro, context=None):
+ return asyncio.tasks._PyTask(coro, loop=loop, context=context, eager_start=True)
+
+
+(a)unittest.skipUnless(hasattr(asyncio.tasks, "_c_all_tasks"), "requires _asyncio")
+class TestEagerCFreeThreading(TestCFreeThreading, TestCase):
+ def factory(self, loop, coro, context=None):
+ return asyncio.tasks._CTask(coro, loop=loop, context=context, eager_start=True)
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index 74db4c74af905a..b8b184af04a7cb 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -364,6 +364,8 @@ future_ensure_alive(FutureObj *fut)
static int
future_schedule_callbacks(asyncio_state *state, FutureObj *fut)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(fut);
+
if (fut->fut_callback0 != NULL) {
/* There's a 1st callback */
@@ -481,6 +483,8 @@ future_init(FutureObj *fut, PyObject *loop)
static PyObject *
future_set_result(asyncio_state *state, FutureObj *fut, PyObject *res)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(fut);
+
if (future_ensure_alive(fut)) {
return NULL;
}
@@ -503,6 +507,8 @@ future_set_result(asyncio_state *state, FutureObj *fut, PyObject *res)
static PyObject *
future_set_exception(asyncio_state *state, FutureObj *fut, PyObject *exc)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(fut);
+
PyObject *exc_val = NULL;
if (fut->fut_state != STATE_PENDING) {
@@ -569,6 +575,8 @@ future_set_exception(asyncio_state *state, FutureObj *fut, PyObject *exc)
static PyObject *
create_cancelled_error(asyncio_state *state, FutureObj *fut)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(fut);
+
PyObject *exc;
if (fut->fut_cancelled_exc != NULL) {
/* transfer ownership */
@@ -588,6 +596,8 @@ create_cancelled_error(asyncio_state *state, FutureObj *fut)
static void
future_set_cancelled_error(asyncio_state *state, FutureObj *fut)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(fut);
+
PyObject *exc = create_cancelled_error(state, fut);
if (exc == NULL) {
return;
@@ -599,6 +609,8 @@ future_set_cancelled_error(asyncio_state *state, FutureObj *fut)
static int
future_get_result(asyncio_state *state, FutureObj *fut, PyObject **result)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(fut);
+
if (fut->fut_state == STATE_CANCELLED) {
future_set_cancelled_error(state, fut);
return -1;
@@ -632,6 +644,8 @@ static PyObject *
future_add_done_callback(asyncio_state *state, FutureObj *fut, PyObject *arg,
PyObject *ctx)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(fut);
+
if (!future_is_alive(fut)) {
PyErr_SetString(PyExc_RuntimeError, "uninitialized Future object");
return NULL;
@@ -706,6 +720,8 @@ future_add_done_callback(asyncio_state *state, FutureObj *fut, PyObject *arg,
static PyObject *
future_cancel(asyncio_state *state, FutureObj *fut, PyObject *msg)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(fut);
+
fut->fut_log_tb = 0;
if (fut->fut_state != STATE_PENDING) {
@@ -787,6 +803,7 @@ FutureObj_traverse(FutureObj *fut, visitproc visit, void *arg)
}
/*[clinic input]
+@critical_section
_asyncio.Future.result
Return the result this future represents.
@@ -798,7 +815,7 @@ the future is done and has an exception set, this exception is raised.
static PyObject *
_asyncio_Future_result_impl(FutureObj *self)
-/*[clinic end generated code: output=f35f940936a4b1e5 input=49ecf9cf5ec50dc5]*/
+/*[clinic end generated code: output=f35f940936a4b1e5 input=61d89f48e4c8b670]*/
{
asyncio_state *state = get_asyncio_state_by_def((PyObject *)self);
PyObject *result;
@@ -827,6 +844,7 @@ _asyncio_Future_result_impl(FutureObj *self)
}
/*[clinic input]
+@critical_section
_asyncio.Future.exception
cls: defining_class
@@ -842,7 +860,7 @@ InvalidStateError.
static PyObject *
_asyncio_Future_exception_impl(FutureObj *self, PyTypeObject *cls)
-/*[clinic end generated code: output=ce75576b187c905b input=3faf15c22acdb60d]*/
+/*[clinic end generated code: output=ce75576b187c905b input=647d1fd1fc403301]*/
{
if (!future_is_alive(self)) {
asyncio_state *state = get_asyncio_state_by_cls(cls);
@@ -873,6 +891,7 @@ _asyncio_Future_exception_impl(FutureObj *self, PyTypeObject *cls)
}
/*[clinic input]
+@critical_section
_asyncio.Future.set_result
cls: defining_class
@@ -888,7 +907,7 @@ InvalidStateError.
static PyObject *
_asyncio_Future_set_result_impl(FutureObj *self, PyTypeObject *cls,
PyObject *result)
-/*[clinic end generated code: output=99afbbe78f99c32d input=d5a41c1e353acc2e]*/
+/*[clinic end generated code: output=99afbbe78f99c32d input=4069306f03a3b6ee]*/
{
asyncio_state *state = get_asyncio_state_by_cls(cls);
ENSURE_FUTURE_ALIVE(state, self)
@@ -896,6 +915,7 @@ _asyncio_Future_set_result_impl(FutureObj *self, PyTypeObject *cls,
}
/*[clinic input]
+@critical_section
_asyncio.Future.set_exception
cls: defining_class
@@ -911,7 +931,7 @@ InvalidStateError.
static PyObject *
_asyncio_Future_set_exception_impl(FutureObj *self, PyTypeObject *cls,
PyObject *exception)
-/*[clinic end generated code: output=0a5e8b5a52f058d6 input=a245cd49d3df939b]*/
+/*[clinic end generated code: output=0a5e8b5a52f058d6 input=b6eab43a389bc966]*/
{
asyncio_state *state = get_asyncio_state_by_cls(cls);
ENSURE_FUTURE_ALIVE(state, self)
@@ -919,6 +939,7 @@ _asyncio_Future_set_exception_impl(FutureObj *self, PyTypeObject *cls,
}
/*[clinic input]
+@critical_section
_asyncio.Future.add_done_callback
cls: defining_class
@@ -937,7 +958,7 @@ scheduled with call_soon.
static PyObject *
_asyncio_Future_add_done_callback_impl(FutureObj *self, PyTypeObject *cls,
PyObject *fn, PyObject *context)
-/*[clinic end generated code: output=922e9a4cbd601167 input=599261c521458cc2]*/
+/*[clinic end generated code: output=922e9a4cbd601167 input=37d97f941beb7b3e]*/
{
asyncio_state *state = get_asyncio_state_by_cls(cls);
if (context == NULL) {
@@ -953,6 +974,7 @@ _asyncio_Future_add_done_callback_impl(FutureObj *self, PyTypeObject *cls,
}
/*[clinic input]
+@critical_section
_asyncio.Future.remove_done_callback
cls: defining_class
@@ -967,7 +989,7 @@ Returns the number of callbacks removed.
static PyObject *
_asyncio_Future_remove_done_callback_impl(FutureObj *self, PyTypeObject *cls,
PyObject *fn)
-/*[clinic end generated code: output=2da35ccabfe41b98 input=c7518709b86fc747]*/
+/*[clinic end generated code: output=2da35ccabfe41b98 input=3afbc9f6a673091b]*/
{
PyObject *newlist;
Py_ssize_t len, i, j=0;
@@ -1076,6 +1098,7 @@ _asyncio_Future_remove_done_callback_impl(FutureObj *self, PyTypeObject *cls,
}
/*[clinic input]
+@critical_section
_asyncio.Future.cancel
cls: defining_class
@@ -1092,7 +1115,7 @@ return True.
static PyObject *
_asyncio_Future_cancel_impl(FutureObj *self, PyTypeObject *cls,
PyObject *msg)
-/*[clinic end generated code: output=074956f35904b034 input=bba8f8b786941a94]*/
+/*[clinic end generated code: output=074956f35904b034 input=44ab4003da839970]*/
{
asyncio_state *state = get_asyncio_state_by_cls(cls);
ENSURE_FUTURE_ALIVE(state, self)
@@ -1100,6 +1123,7 @@ _asyncio_Future_cancel_impl(FutureObj *self, PyTypeObject *cls,
}
/*[clinic input]
+@critical_section
_asyncio.Future.cancelled
Return True if the future was cancelled.
@@ -1107,7 +1131,7 @@ Return True if the future was cancelled.
static PyObject *
_asyncio_Future_cancelled_impl(FutureObj *self)
-/*[clinic end generated code: output=145197ced586357d input=943ab8b7b7b17e45]*/
+/*[clinic end generated code: output=145197ced586357d input=9b8644819a675416]*/
{
if (future_is_alive(self) && self->fut_state == STATE_CANCELLED) {
Py_RETURN_TRUE;
@@ -1118,6 +1142,7 @@ _asyncio_Future_cancelled_impl(FutureObj *self)
}
/*[clinic input]
+@critical_section
_asyncio.Future.done
Return True if the future is done.
@@ -1128,7 +1153,7 @@ future was cancelled.
static PyObject *
_asyncio_Future_done_impl(FutureObj *self)
-/*[clinic end generated code: output=244c5ac351145096 input=28d7b23fdb65d2ac]*/
+/*[clinic end generated code: output=244c5ac351145096 input=7204d3cc63bef7f3]*/
{
if (!future_is_alive(self) || self->fut_state == STATE_PENDING) {
Py_RETURN_FALSE;
@@ -1139,6 +1164,7 @@ _asyncio_Future_done_impl(FutureObj *self)
}
/*[clinic input]
+@critical_section
_asyncio.Future.get_loop
cls: defining_class
@@ -1149,17 +1175,24 @@ Return the event loop the Future is bound to.
static PyObject *
_asyncio_Future_get_loop_impl(FutureObj *self, PyTypeObject *cls)
-/*[clinic end generated code: output=f50ea6c374d9ee97 input=163c2c498b45a1f0]*/
+/*[clinic end generated code: output=f50ea6c374d9ee97 input=f3ce629bfd9f45c1]*/
{
asyncio_state *state = get_asyncio_state_by_cls(cls);
ENSURE_FUTURE_ALIVE(state, self)
return Py_NewRef(self->fut_loop);
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Future._asyncio_future_blocking
+[clinic start generated code]*/
+
static PyObject *
-FutureObj_get_blocking(FutureObj *fut, void *Py_UNUSED(ignored))
+_asyncio_Future__asyncio_future_blocking_get_impl(FutureObj *self)
+/*[clinic end generated code: output=a558a2c51e38823b input=58da92efc03b617d]*/
{
- if (future_is_alive(fut) && fut->fut_blocking) {
+ if (future_is_alive(self) && self->fut_blocking) {
Py_RETURN_TRUE;
}
else {
@@ -1167,31 +1200,47 @@ FutureObj_get_blocking(FutureObj *fut, void *Py_UNUSED(ignored))
}
}
+/*[clinic input]
+@critical_section
+@setter
+_asyncio.Future._asyncio_future_blocking
+[clinic start generated code]*/
+
static int
-FutureObj_set_blocking(FutureObj *fut, PyObject *val, void *Py_UNUSED(ignored))
+_asyncio_Future__asyncio_future_blocking_set_impl(FutureObj *self,
+ PyObject *value)
+/*[clinic end generated code: output=0686d1cb024a7453 input=3fd4a5f95df788b7]*/
+
{
- if (future_ensure_alive(fut)) {
+ if (future_ensure_alive(self)) {
return -1;
}
- if (val == NULL) {
+ if (value == NULL) {
PyErr_SetString(PyExc_AttributeError, "cannot delete attribute");
return -1;
}
- int is_true = PyObject_IsTrue(val);
+ int is_true = PyObject_IsTrue(value);
if (is_true < 0) {
return -1;
}
- fut->fut_blocking = is_true;
+ self->fut_blocking = is_true;
return 0;
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Future._log_traceback
+[clinic start generated code]*/
+
static PyObject *
-FutureObj_get_log_traceback(FutureObj *fut, void *Py_UNUSED(ignored))
+_asyncio_Future__log_traceback_get_impl(FutureObj *self)
+/*[clinic end generated code: output=2724433b238593c7 input=91e5144ea4117d8e]*/
{
- asyncio_state *state = get_asyncio_state_by_def((PyObject *)fut);
- ENSURE_FUTURE_ALIVE(state, fut)
- if (fut->fut_log_tb) {
+ asyncio_state *state = get_asyncio_state_by_def((PyObject *)self);
+ ENSURE_FUTURE_ALIVE(state, self)
+ if (self->fut_log_tb) {
Py_RETURN_TRUE;
}
else {
@@ -1199,14 +1248,21 @@ FutureObj_get_log_traceback(FutureObj *fut, void *Py_UNUSED(ignored))
}
}
+/*[clinic input]
+@critical_section
+@setter
+_asyncio.Future._log_traceback
+[clinic start generated code]*/
+
static int
-FutureObj_set_log_traceback(FutureObj *fut, PyObject *val, void *Py_UNUSED(ignored))
+_asyncio_Future__log_traceback_set_impl(FutureObj *self, PyObject *value)
+/*[clinic end generated code: output=9ce8e19504f42f54 input=30ac8217754b08c2]*/
{
- if (val == NULL) {
+ if (value == NULL) {
PyErr_SetString(PyExc_AttributeError, "cannot delete attribute");
return -1;
}
- int is_true = PyObject_IsTrue(val);
+ int is_true = PyObject_IsTrue(value);
if (is_true < 0) {
return -1;
}
@@ -1215,31 +1271,44 @@ FutureObj_set_log_traceback(FutureObj *fut, PyObject *val, void *Py_UNUSED(ignor
"_log_traceback can only be set to False");
return -1;
}
- fut->fut_log_tb = is_true;
+ self->fut_log_tb = is_true;
return 0;
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Future._loop
+[clinic start generated code]*/
static PyObject *
-FutureObj_get_loop(FutureObj *fut, void *Py_UNUSED(ignored))
+_asyncio_Future__loop_get_impl(FutureObj *self)
+/*[clinic end generated code: output=5ba31563eecfeedf input=0337130bc5781670]*/
{
- if (!future_is_alive(fut)) {
+ if (!future_is_alive(self)) {
Py_RETURN_NONE;
}
- return Py_NewRef(fut->fut_loop);
+ return Py_NewRef(self->fut_loop);
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Future._callbacks
+[clinic start generated code]*/
+
static PyObject *
-FutureObj_get_callbacks(FutureObj *fut, void *Py_UNUSED(ignored))
+_asyncio_Future__callbacks_get_impl(FutureObj *self)
+/*[clinic end generated code: output=b40d360505fcc583 input=7a466649530c01bb]*/
{
- asyncio_state *state = get_asyncio_state_by_def((PyObject *)fut);
- ENSURE_FUTURE_ALIVE(state, fut)
+ asyncio_state *state = get_asyncio_state_by_def((PyObject *)self);
+ ENSURE_FUTURE_ALIVE(state, self)
Py_ssize_t len = 0;
- if (fut->fut_callback0 != NULL) {
+ if (self->fut_callback0 != NULL) {
len++;
}
- if (fut->fut_callbacks != NULL) {
- len += PyList_GET_SIZE(fut->fut_callbacks);
+ if (self->fut_callbacks != NULL) {
+ len += PyList_GET_SIZE(self->fut_callbacks);
}
if (len == 0) {
@@ -1252,22 +1321,22 @@ FutureObj_get_callbacks(FutureObj *fut, void *Py_UNUSED(ignored))
}
Py_ssize_t i = 0;
- if (fut->fut_callback0 != NULL) {
+ if (self->fut_callback0 != NULL) {
PyObject *tup0 = PyTuple_New(2);
if (tup0 == NULL) {
Py_DECREF(callbacks);
return NULL;
}
- PyTuple_SET_ITEM(tup0, 0, Py_NewRef(fut->fut_callback0));
- assert(fut->fut_context0 != NULL);
- PyTuple_SET_ITEM(tup0, 1, Py_NewRef(fut->fut_context0));
+ PyTuple_SET_ITEM(tup0, 0, Py_NewRef(self->fut_callback0));
+ assert(self->fut_context0 != NULL);
+ PyTuple_SET_ITEM(tup0, 1, Py_NewRef(self->fut_context0));
PyList_SET_ITEM(callbacks, i, tup0);
i++;
}
- if (fut->fut_callbacks != NULL) {
- for (Py_ssize_t j = 0; j < PyList_GET_SIZE(fut->fut_callbacks); j++) {
- PyObject *cb = PyList_GET_ITEM(fut->fut_callbacks, j);
+ if (self->fut_callbacks != NULL) {
+ for (Py_ssize_t j = 0; j < PyList_GET_SIZE(self->fut_callbacks); j++) {
+ PyObject *cb = PyList_GET_ITEM(self->fut_callbacks, j);
Py_INCREF(cb);
PyList_SET_ITEM(callbacks, i, cb);
i++;
@@ -1277,68 +1346,110 @@ FutureObj_get_callbacks(FutureObj *fut, void *Py_UNUSED(ignored))
return callbacks;
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Future._result
+[clinic start generated code]*/
+
static PyObject *
-FutureObj_get_result(FutureObj *fut, void *Py_UNUSED(ignored))
+_asyncio_Future__result_get_impl(FutureObj *self)
+/*[clinic end generated code: output=6877e8ce97333873 input=624f8e28e67f2636]*/
+
{
- asyncio_state *state = get_asyncio_state_by_def((PyObject *)fut);
- ENSURE_FUTURE_ALIVE(state, fut)
- if (fut->fut_result == NULL) {
+ asyncio_state *state = get_asyncio_state_by_def((PyObject *)self);
+ ENSURE_FUTURE_ALIVE(state, self)
+ if (self->fut_result == NULL) {
Py_RETURN_NONE;
}
- return Py_NewRef(fut->fut_result);
+ return Py_NewRef(self->fut_result);
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Future._exception
+[clinic start generated code]*/
+
static PyObject *
-FutureObj_get_exception(FutureObj *fut, void *Py_UNUSED(ignored))
+_asyncio_Future__exception_get_impl(FutureObj *self)
+/*[clinic end generated code: output=32f2c93b9e021a9b input=1828a1fcac929710]*/
{
- asyncio_state *state = get_asyncio_state_by_def((PyObject *)fut);
- ENSURE_FUTURE_ALIVE(state, fut)
- if (fut->fut_exception == NULL) {
+ asyncio_state *state = get_asyncio_state_by_def((PyObject *)self);
+ ENSURE_FUTURE_ALIVE(state, self)
+ if (self->fut_exception == NULL) {
Py_RETURN_NONE;
}
- return Py_NewRef(fut->fut_exception);
+ return Py_NewRef(self->fut_exception);
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Future._source_traceback
+[clinic start generated code]*/
+
static PyObject *
-FutureObj_get_source_traceback(FutureObj *fut, void *Py_UNUSED(ignored))
+_asyncio_Future__source_traceback_get_impl(FutureObj *self)
+/*[clinic end generated code: output=d4f12b09af22f61b input=3c831fbde5da90d0]*/
{
- if (!future_is_alive(fut) || fut->fut_source_tb == NULL) {
+ if (!future_is_alive(self) || self->fut_source_tb == NULL) {
Py_RETURN_NONE;
}
- return Py_NewRef(fut->fut_source_tb);
+ return Py_NewRef(self->fut_source_tb);
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Future._cancel_message
+[clinic start generated code]*/
+
static PyObject *
-FutureObj_get_cancel_message(FutureObj *fut, void *Py_UNUSED(ignored))
+_asyncio_Future__cancel_message_get_impl(FutureObj *self)
+/*[clinic end generated code: output=52ef6444f92cedac input=54c12c67082e4eea]*/
{
- if (fut->fut_cancel_msg == NULL) {
+ if (self->fut_cancel_msg == NULL) {
Py_RETURN_NONE;
}
- return Py_NewRef(fut->fut_cancel_msg);
+ return Py_NewRef(self->fut_cancel_msg);
}
+/*[clinic input]
+@critical_section
+@setter
+_asyncio.Future._cancel_message
+[clinic start generated code]*/
+
static int
-FutureObj_set_cancel_message(FutureObj *fut, PyObject *msg,
- void *Py_UNUSED(ignored))
+_asyncio_Future__cancel_message_set_impl(FutureObj *self, PyObject *value)
+/*[clinic end generated code: output=0854b2f77bff2209 input=f461d17f2d891fad]*/
{
- if (msg == NULL) {
+ if (value == NULL) {
PyErr_SetString(PyExc_AttributeError, "cannot delete attribute");
return -1;
}
- Py_INCREF(msg);
- Py_XSETREF(fut->fut_cancel_msg, msg);
+ Py_INCREF(value);
+ Py_XSETREF(self->fut_cancel_msg, value);
return 0;
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Future._state
+[clinic start generated code]*/
+
static PyObject *
-FutureObj_get_state(FutureObj *fut, void *Py_UNUSED(ignored))
+_asyncio_Future__state_get_impl(FutureObj *self)
+/*[clinic end generated code: output=622f560a3fa69c63 input=7c5ad023a93423ff]*/
{
- asyncio_state *state = get_asyncio_state_by_def((PyObject *)fut);
+ asyncio_state *state = get_asyncio_state_by_def((PyObject *)self);
PyObject *ret = NULL;
- ENSURE_FUTURE_ALIVE(state, fut)
+ ENSURE_FUTURE_ALIVE(state, self)
- switch (fut->fut_state) {
+ switch (self->fut_state) {
case STATE_PENDING:
ret = &_Py_ID(PENDING);
break;
@@ -1364,6 +1475,7 @@ FutureObj_repr(FutureObj *fut)
}
/*[clinic input]
+@critical_section
_asyncio.Future._make_cancelled_error
Create the CancelledError to raise if the Future is cancelled.
@@ -1374,7 +1486,7 @@ it erases the context exception value.
static PyObject *
_asyncio_Future__make_cancelled_error_impl(FutureObj *self)
-/*[clinic end generated code: output=a5df276f6c1213de input=ac6effe4ba795ecc]*/
+/*[clinic end generated code: output=a5df276f6c1213de input=ccb90df8c3c18bcd]*/
{
asyncio_state *state = get_asyncio_state_by_def((PyObject *)self);
return create_cancelled_error(state, self);
@@ -1455,23 +1567,16 @@ static PyMethodDef FutureType_methods[] = {
{NULL, NULL} /* Sentinel */
};
-#define FUTURE_COMMON_GETSETLIST \
- {"_state", (getter)FutureObj_get_state, NULL, NULL}, \
- {"_asyncio_future_blocking", (getter)FutureObj_get_blocking, \
- (setter)FutureObj_set_blocking, NULL}, \
- {"_loop", (getter)FutureObj_get_loop, NULL, NULL}, \
- {"_callbacks", (getter)FutureObj_get_callbacks, NULL, NULL}, \
- {"_result", (getter)FutureObj_get_result, NULL, NULL}, \
- {"_exception", (getter)FutureObj_get_exception, NULL, NULL}, \
- {"_log_traceback", (getter)FutureObj_get_log_traceback, \
- (setter)FutureObj_set_log_traceback, NULL}, \
- {"_source_traceback", (getter)FutureObj_get_source_traceback, \
- NULL, NULL}, \
- {"_cancel_message", (getter)FutureObj_get_cancel_message, \
- (setter)FutureObj_set_cancel_message, NULL},
-
static PyGetSetDef FutureType_getsetlist[] = {
- FUTURE_COMMON_GETSETLIST
+ _ASYNCIO_FUTURE__STATE_GETSETDEF
+ _ASYNCIO_FUTURE__ASYNCIO_FUTURE_BLOCKING_GETSETDEF
+ _ASYNCIO_FUTURE__LOOP_GETSETDEF
+ _ASYNCIO_FUTURE__CALLBACKS_GETSETDEF
+ _ASYNCIO_FUTURE__RESULT_GETSETDEF
+ _ASYNCIO_FUTURE__EXCEPTION_GETSETDEF
+ _ASYNCIO_FUTURE__LOG_TRACEBACK_GETSETDEF
+ _ASYNCIO_FUTURE__SOURCE_TRACEBACK_GETSETDEF
+ _ASYNCIO_FUTURE__CANCEL_MESSAGE_GETSETDEF
{NULL} /* Sentinel */
};
@@ -1550,19 +1655,13 @@ FutureIter_dealloc(futureiterobject *it)
}
static PySendResult
-FutureIter_am_send(futureiterobject *it,
- PyObject *Py_UNUSED(arg),
- PyObject **result)
+FutureIter_am_send_lock_held(futureiterobject *it, PyObject **result)
{
- /* arg is unused, see the comment on FutureIter_send for clarification */
-
PyObject *res;
FutureObj *fut = it->future;
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(fut);
*result = NULL;
- if (fut == NULL) {
- return PYGEN_ERROR;
- }
if (fut->fut_state == STATE_PENDING) {
if (!fut->fut_blocking) {
@@ -1575,18 +1674,29 @@ FutureIter_am_send(futureiterobject *it,
return PYGEN_ERROR;
}
- it->future = NULL;
res = _asyncio_Future_result_impl(fut);
if (res != NULL) {
- Py_DECREF(fut);
*result = res;
return PYGEN_RETURN;
}
- Py_DECREF(fut);
return PYGEN_ERROR;
}
+static PySendResult
+FutureIter_am_send(futureiterobject *it,
+ PyObject *Py_UNUSED(arg),
+ PyObject **result)
+{
+ /* arg is unused, see the comment on FutureIter_send for clarification */
+ PySendResult res;
+ Py_BEGIN_CRITICAL_SECTION(it->future);
+ res = FutureIter_am_send_lock_held(it, result);
+ Py_END_CRITICAL_SECTION();
+ return res;
+}
+
+
static PyObject *
FutureIter_iternext(futureiterobject *it)
{
@@ -1807,7 +1917,11 @@ TaskStepMethWrapper_call(TaskStepMethWrapper *o,
return NULL;
}
asyncio_state *state = get_asyncio_state_by_def((PyObject *)o);
- return task_step(state, o->sw_task, o->sw_arg);
+ PyObject *res;
+ Py_BEGIN_CRITICAL_SECTION(o->sw_task);
+ res = task_step(state, o->sw_task, o->sw_arg);
+ Py_END_CRITICAL_SECTION();
+ return res;
}
static int
@@ -2150,10 +2264,17 @@ TaskObj_traverse(TaskObj *task, visitproc visit, void *arg)
return 0;
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Task._log_destroy_pending
+[clinic start generated code]*/
+
static PyObject *
-TaskObj_get_log_destroy_pending(TaskObj *task, void *Py_UNUSED(ignored))
+_asyncio_Task__log_destroy_pending_get_impl(TaskObj *self)
+/*[clinic end generated code: output=e6c2a47d029ac93b input=17127298cd4c720b]*/
{
- if (task->task_log_destroy_pending) {
+ if (self->task_log_destroy_pending) {
Py_RETURN_TRUE;
}
else {
@@ -2161,25 +2282,40 @@ TaskObj_get_log_destroy_pending(TaskObj *task, void *Py_UNUSED(ignored))
}
}
+/*[clinic input]
+@critical_section
+@setter
+_asyncio.Task._log_destroy_pending
+[clinic start generated code]*/
+
static int
-TaskObj_set_log_destroy_pending(TaskObj *task, PyObject *val, void *Py_UNUSED(ignored))
+_asyncio_Task__log_destroy_pending_set_impl(TaskObj *self, PyObject *value)
+/*[clinic end generated code: output=7ebc030bb92ec5ce input=49b759c97d1216a4]*/
{
- if (val == NULL) {
+ if (value == NULL) {
PyErr_SetString(PyExc_AttributeError, "cannot delete attribute");
return -1;
}
- int is_true = PyObject_IsTrue(val);
+ int is_true = PyObject_IsTrue(value);
if (is_true < 0) {
return -1;
}
- task->task_log_destroy_pending = is_true;
+ self->task_log_destroy_pending = is_true;
return 0;
}
+
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Task._must_cancel
+[clinic start generated code]*/
+
static PyObject *
-TaskObj_get_must_cancel(TaskObj *task, void *Py_UNUSED(ignored))
+_asyncio_Task__must_cancel_get_impl(TaskObj *self)
+/*[clinic end generated code: output=70e79b900996c363 input=2d04529fb23feedf]*/
{
- if (task->task_must_cancel) {
+ if (self->task_must_cancel) {
Py_RETURN_TRUE;
}
else {
@@ -2187,21 +2323,36 @@ TaskObj_get_must_cancel(TaskObj *task, void *Py_UNUSED(ignored))
}
}
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Task._coro
+[clinic start generated code]*/
+
static PyObject *
-TaskObj_get_coro(TaskObj *task, void *Py_UNUSED(ignored))
+_asyncio_Task__coro_get_impl(TaskObj *self)
+/*[clinic end generated code: output=a2726012ab5fd531 input=323c31a272020624]*/
{
- if (task->task_coro) {
- return Py_NewRef(task->task_coro);
+ if (self->task_coro) {
+ return Py_NewRef(self->task_coro);
}
Py_RETURN_NONE;
}
+
+/*[clinic input]
+@critical_section
+@getter
+_asyncio.Task._fut_waiter
+[clinic start generated code]*/
+
static PyObject *
-TaskObj_get_fut_waiter(TaskObj *task, void *Py_UNUSED(ignored))
+_asyncio_Task__fut_waiter_get_impl(TaskObj *self)
+/*[clinic end generated code: output=c4f966b847fefcdf input=4d1005d725e72db7]*/
{
- if (task->task_fut_waiter) {
- return Py_NewRef(task->task_fut_waiter);
+ if (self->task_fut_waiter) {
+ return Py_NewRef(self->task_fut_waiter);
}
Py_RETURN_NONE;
@@ -2217,6 +2368,7 @@ TaskObj_repr(TaskObj *task)
/*[clinic input]
+@critical_section
_asyncio.Task._make_cancelled_error
Create the CancelledError to raise if the Task is cancelled.
@@ -2227,7 +2379,7 @@ it erases the context exception value.
static PyObject *
_asyncio_Task__make_cancelled_error_impl(TaskObj *self)
-/*[clinic end generated code: output=55a819e8b4276fab input=52c0e32de8e2f840]*/
+/*[clinic end generated code: output=55a819e8b4276fab input=2d3213be0cb02390]*/
{
FutureObj *fut = (FutureObj*)self;
return _asyncio_Future__make_cancelled_error_impl(fut);
@@ -2235,6 +2387,7 @@ _asyncio_Task__make_cancelled_error_impl(TaskObj *self)
/*[clinic input]
+@critical_section
_asyncio.Task.cancel
msg: object = None
@@ -2263,7 +2416,7 @@ This also increases the task's count of cancellation requests.
static PyObject *
_asyncio_Task_cancel_impl(TaskObj *self, PyObject *msg)
-/*[clinic end generated code: output=c66b60d41c74f9f1 input=7bb51bf25974c783]*/
+/*[clinic end generated code: output=c66b60d41c74f9f1 input=6125d45b9a6a5abd]*/
{
self->task_log_tb = 0;
@@ -2308,6 +2461,7 @@ _asyncio_Task_cancel_impl(TaskObj *self, PyObject *msg)
}
/*[clinic input]
+@critical_section
_asyncio.Task.cancelling
Return the count of the task's cancellation requests.
@@ -2318,13 +2472,14 @@ and may be decremented using .uncancel().
static PyObject *
_asyncio_Task_cancelling_impl(TaskObj *self)
-/*[clinic end generated code: output=803b3af96f917d7e input=b625224d310cbb17]*/
+/*[clinic end generated code: output=803b3af96f917d7e input=5ef89b1b38f080ee]*/
/*[clinic end generated code]*/
{
return PyLong_FromLong(self->task_num_cancels_requested);
}
/*[clinic input]
+@critical_section
_asyncio.Task.uncancel
Decrement the task's count of cancellation requests.
@@ -2337,7 +2492,7 @@ Returns the remaining number of cancellation requests.
static PyObject *
_asyncio_Task_uncancel_impl(TaskObj *self)
-/*[clinic end generated code: output=58184d236a817d3c input=68f81a4b90b46be2]*/
+/*[clinic end generated code: output=58184d236a817d3c input=cb3220b0e5afd61d]*/
/*[clinic end generated code]*/
{
if (self->task_num_cancels_requested > 0) {
@@ -2451,12 +2606,13 @@ _asyncio_Task_set_exception(TaskObj *self, PyObject *exception)
}
/*[clinic input]
+@critical_section
_asyncio.Task.get_coro
[clinic start generated code]*/
static PyObject *
_asyncio_Task_get_coro_impl(TaskObj *self)
-/*[clinic end generated code: output=bcac27c8cc6c8073 input=d2e8606c42a7b403]*/
+/*[clinic end generated code: output=bcac27c8cc6c8073 input=a47f81427e39fe0c]*/
{
if (self->task_coro) {
return Py_NewRef(self->task_coro);
@@ -2477,12 +2633,13 @@ _asyncio_Task_get_context_impl(TaskObj *self)
}
/*[clinic input]
+@critical_section
_asyncio.Task.get_name
[clinic start generated code]*/
static PyObject *
_asyncio_Task_get_name_impl(TaskObj *self)
-/*[clinic end generated code: output=0ecf1570c3b37a8f input=a4a6595d12f4f0f8]*/
+/*[clinic end generated code: output=0ecf1570c3b37a8f input=92a8f30c85034249]*/
{
if (self->task_name) {
if (PyLong_CheckExact(self->task_name)) {
@@ -2499,6 +2656,7 @@ _asyncio_Task_get_name_impl(TaskObj *self)
}
/*[clinic input]
+@critical_section
_asyncio.Task.set_name
value: object
@@ -2506,8 +2664,8 @@ _asyncio.Task.set_name
[clinic start generated code]*/
static PyObject *
-_asyncio_Task_set_name(TaskObj *self, PyObject *value)
-/*[clinic end generated code: output=138a8d51e32057d6 input=a8359b6e65f8fd31]*/
+_asyncio_Task_set_name_impl(TaskObj *self, PyObject *value)
+/*[clinic end generated code: output=f88ff4c0d64a9a6f input=e8d400ad64bad799]*/
{
if (!PyUnicode_CheckExact(value)) {
value = PyObject_Str(value);
@@ -2618,12 +2776,10 @@ static PyMethodDef TaskType_methods[] = {
};
static PyGetSetDef TaskType_getsetlist[] = {
- FUTURE_COMMON_GETSETLIST
- {"_log_destroy_pending", (getter)TaskObj_get_log_destroy_pending,
- (setter)TaskObj_set_log_destroy_pending, NULL},
- {"_must_cancel", (getter)TaskObj_get_must_cancel, NULL, NULL},
- {"_coro", (getter)TaskObj_get_coro, NULL, NULL},
- {"_fut_waiter", (getter)TaskObj_get_fut_waiter, NULL, NULL},
+ _ASYNCIO_TASK__LOG_DESTROY_PENDING_GETSETDEF
+ _ASYNCIO_TASK__MUST_CANCEL_GETSETDEF
+ _ASYNCIO_TASK__CORO_GETSETDEF
+ _ASYNCIO_TASK__FUT_WAITER_GETSETDEF
{NULL} /* Sentinel */
};
@@ -2738,6 +2894,8 @@ gen_status_from_result(PyObject **result)
static PyObject *
task_step_impl(asyncio_state *state, TaskObj *task, PyObject *exc)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(task);
+
int clear_exc = 0;
PyObject *result = NULL;
PyObject *coro;
@@ -2867,6 +3025,8 @@ task_step_impl(asyncio_state *state, TaskObj *task, PyObject *exc)
static PyObject *
task_step_handle_result_impl(asyncio_state *state, TaskObj *task, PyObject *result)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(task);
+
int res;
PyObject *o;
@@ -2897,8 +3057,10 @@ task_step_handle_result_impl(asyncio_state *state, TaskObj *task, PyObject *resu
if (wrapper == NULL) {
goto fail;
}
+ Py_BEGIN_CRITICAL_SECTION(result);
tmp = future_add_done_callback(state,
(FutureObj*)result, wrapper, task->task_context);
+ Py_END_CRITICAL_SECTION();
Py_DECREF(wrapper);
if (tmp == NULL) {
goto fail;
@@ -3140,7 +3302,10 @@ task_eager_start(asyncio_state *state, TaskObj *task)
int retval = 0;
- PyObject *stepres = task_step_impl(state, task, NULL);
+ PyObject *stepres;
+ Py_BEGIN_CRITICAL_SECTION(task);
+ stepres = task_step_impl(state, task, NULL);
+ Py_END_CRITICAL_SECTION();
if (stepres == NULL) {
PyObject *exc = PyErr_GetRaisedException();
_PyErr_ChainExceptions1(exc);
@@ -3177,16 +3342,20 @@ task_eager_start(asyncio_state *state, TaskObj *task)
}
static PyObject *
-task_wakeup(TaskObj *task, PyObject *o)
+task_wakeup_lock_held(TaskObj *task, PyObject *o)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(task);
+
PyObject *result;
assert(o);
asyncio_state *state = get_asyncio_state_by_def((PyObject *)task);
if (Future_CheckExact(state, o) || Task_CheckExact(state, o)) {
PyObject *fut_result = NULL;
- int res = future_get_result(state, (FutureObj*)o, &fut_result);
-
+ int res;
+ Py_BEGIN_CRITICAL_SECTION(o);
+ res = future_get_result(state, (FutureObj*)o, &fut_result);
+ Py_END_CRITICAL_SECTION();
switch(res) {
case -1:
assert(fut_result == NULL);
@@ -3220,6 +3389,16 @@ task_wakeup(TaskObj *task, PyObject *o)
return result;
}
+static PyObject *
+task_wakeup(TaskObj *task, PyObject *o)
+{
+ PyObject *res;
+ Py_BEGIN_CRITICAL_SECTION(task);
+ res = task_wakeup_lock_held(task, o);
+ Py_END_CRITICAL_SECTION();
+ return res;
+}
+
/*********************** Functions **************************/
@@ -3564,62 +3743,41 @@ static PyObject *
_asyncio_all_tasks_impl(PyObject *module, PyObject *loop)
/*[clinic end generated code: output=0e107cbb7f72aa7b input=43a1b423c2d95bfa]*/
{
-
asyncio_state *state = get_asyncio_state(module);
- PyObject *tasks = PySet_New(NULL);
- if (tasks == NULL) {
- return NULL;
- }
if (loop == Py_None) {
loop = _asyncio_get_running_loop_impl(module);
if (loop == NULL) {
- Py_DECREF(tasks);
return NULL;
}
} else {
Py_INCREF(loop);
}
- // First add eager tasks to the set so that we don't miss
+ // First add eager tasks to the list so that we don't miss
// any tasks which graduates from eager to non-eager
- PyObject *eager_iter = PyObject_GetIter(state->eager_tasks);
- if (eager_iter == NULL) {
- Py_DECREF(tasks);
+ // We first add all the tasks to `tasks` list and then filter
+ // out the tasks which are done and return it as a set.
+ PyObject *tasks = PyList_New(0);
+ if (tasks == NULL) {
Py_DECREF(loop);
return NULL;
}
- PyObject *item;
- while ((item = PyIter_Next(eager_iter)) != NULL) {
- if (add_one_task(state, tasks, item, loop) < 0) {
- Py_DECREF(tasks);
- Py_DECREF(loop);
- Py_DECREF(item);
- Py_DECREF(eager_iter);
- return NULL;
- }
- Py_DECREF(item);
- }
- Py_DECREF(eager_iter);
-
- if (PyErr_Occurred()) {
+ if (PyList_Extend(tasks, state->eager_tasks) < 0) {
Py_DECREF(tasks);
Py_DECREF(loop);
return NULL;
}
-
int err = 0;
ASYNCIO_STATE_LOCK(state);
struct llist_node *node;
+
llist_for_each_safe(node, &state->asyncio_tasks_head) {
TaskObj *task = llist_data(node, TaskObj, task_node);
- Py_INCREF(task);
- if (add_one_task(state, tasks, (PyObject *)task, loop) < 0) {
- Py_DECREF(task);
+ if (PyList_Append(tasks, (PyObject *)task) < 0) {
Py_DECREF(tasks);
Py_DECREF(loop);
err = 1;
break;
}
- Py_DECREF(task);
}
ASYNCIO_STATE_UNLOCK(state);
if (err) {
@@ -3631,8 +3789,9 @@ _asyncio_all_tasks_impl(PyObject *module, PyObject *loop)
Py_DECREF(loop);
return NULL;
}
+ PyObject *item;
while ((item = PyIter_Next(scheduled_iter)) != NULL) {
- if (add_one_task(state, tasks, item, loop) < 0) {
+ if (PyList_Append(tasks, item) < 0) {
Py_DECREF(tasks);
Py_DECREF(loop);
Py_DECREF(item);
@@ -3642,14 +3801,27 @@ _asyncio_all_tasks_impl(PyObject *module, PyObject *loop)
Py_DECREF(item);
}
Py_DECREF(scheduled_iter);
- Py_DECREF(loop);
-
- if (PyErr_Occurred()) {
+ // All the tasks are now in the list, now filter the tasks which are done
+ PyObject *res = PySet_New(NULL);
+ if (res == NULL) {
Py_DECREF(tasks);
+ Py_DECREF(loop);
return NULL;
}
- return tasks;
+ for (Py_ssize_t i = 0; i < PyList_GET_SIZE(tasks); i++) {
+ PyObject *task = PyList_GET_ITEM(tasks, i);
+ if (add_one_task(state, res, task, loop) < 0) {
+ Py_DECREF(res);
+ Py_DECREF(tasks);
+ Py_DECREF(loop);
+ return NULL;
+ }
+ }
+
+ Py_DECREF(tasks);
+ Py_DECREF(loop);
+ return res;
}
static int
diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h
index 32045804c35004..3a37cdd9b5fa83 100644
--- a/Modules/clinic/_asynciomodule.c.h
+++ b/Modules/clinic/_asynciomodule.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION()
#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(_asyncio_Future___init____doc__,
@@ -98,7 +99,13 @@ _asyncio_Future_result_impl(FutureObj *self);
static PyObject *
_asyncio_Future_result(FutureObj *self, PyObject *Py_UNUSED(ignored))
{
- return _asyncio_Future_result_impl(self);
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future_result_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Future_exception__doc__,
@@ -121,11 +128,18 @@ _asyncio_Future_exception_impl(FutureObj *self, PyTypeObject *cls);
static PyObject *
_asyncio_Future_exception(FutureObj *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
+ PyObject *return_value = NULL;
+
if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
PyErr_SetString(PyExc_TypeError, "exception() takes no arguments");
- return NULL;
+ goto exit;
}
- return _asyncio_Future_exception_impl(self, cls);
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future_exception_impl(self, cls);
+ Py_END_CRITICAL_SECTION();
+
+exit:
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Future_set_result__doc__,
@@ -170,7 +184,9 @@ _asyncio_Future_set_result(FutureObj *self, PyTypeObject *cls, PyObject *const *
goto exit;
}
result = args[0];
+ Py_BEGIN_CRITICAL_SECTION(self);
return_value = _asyncio_Future_set_result_impl(self, cls, result);
+ Py_END_CRITICAL_SECTION();
exit:
return return_value;
@@ -218,7 +234,9 @@ _asyncio_Future_set_exception(FutureObj *self, PyTypeObject *cls, PyObject *cons
goto exit;
}
exception = args[0];
+ Py_BEGIN_CRITICAL_SECTION(self);
return_value = _asyncio_Future_set_exception_impl(self, cls, exception);
+ Py_END_CRITICAL_SECTION();
exit:
return return_value;
@@ -286,7 +304,9 @@ _asyncio_Future_add_done_callback(FutureObj *self, PyTypeObject *cls, PyObject *
}
context = args[1];
skip_optional_kwonly:
+ Py_BEGIN_CRITICAL_SECTION(self);
return_value = _asyncio_Future_add_done_callback_impl(self, cls, fn, context);
+ Py_END_CRITICAL_SECTION();
exit:
return return_value;
@@ -333,7 +353,9 @@ _asyncio_Future_remove_done_callback(FutureObj *self, PyTypeObject *cls, PyObjec
goto exit;
}
fn = args[0];
+ Py_BEGIN_CRITICAL_SECTION(self);
return_value = _asyncio_Future_remove_done_callback_impl(self, cls, fn);
+ Py_END_CRITICAL_SECTION();
exit:
return return_value;
@@ -399,7 +421,9 @@ _asyncio_Future_cancel(FutureObj *self, PyTypeObject *cls, PyObject *const *args
}
msg = args[0];
skip_optional_pos:
+ Py_BEGIN_CRITICAL_SECTION(self);
return_value = _asyncio_Future_cancel_impl(self, cls, msg);
+ Py_END_CRITICAL_SECTION();
exit:
return return_value;
@@ -420,7 +444,13 @@ _asyncio_Future_cancelled_impl(FutureObj *self);
static PyObject *
_asyncio_Future_cancelled(FutureObj *self, PyObject *Py_UNUSED(ignored))
{
- return _asyncio_Future_cancelled_impl(self);
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future_cancelled_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Future_done__doc__,
@@ -441,7 +471,13 @@ _asyncio_Future_done_impl(FutureObj *self);
static PyObject *
_asyncio_Future_done(FutureObj *self, PyObject *Py_UNUSED(ignored))
{
- return _asyncio_Future_done_impl(self);
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future_done_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Future_get_loop__doc__,
@@ -459,11 +495,319 @@ _asyncio_Future_get_loop_impl(FutureObj *self, PyTypeObject *cls);
static PyObject *
_asyncio_Future_get_loop(FutureObj *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
+ PyObject *return_value = NULL;
+
if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
PyErr_SetString(PyExc_TypeError, "get_loop() takes no arguments");
- return NULL;
+ goto exit;
}
- return _asyncio_Future_get_loop_impl(self, cls);
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future_get_loop_impl(self, cls);
+ Py_END_CRITICAL_SECTION();
+
+exit:
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__asyncio_future_blocking_DOCSTR)
+# define _asyncio_Future__asyncio_future_blocking_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__ASYNCIO_FUTURE_BLOCKING_GETSETDEF)
+# undef _ASYNCIO_FUTURE__ASYNCIO_FUTURE_BLOCKING_GETSETDEF
+# define _ASYNCIO_FUTURE__ASYNCIO_FUTURE_BLOCKING_GETSETDEF {"_asyncio_future_blocking", (getter)_asyncio_Future__asyncio_future_blocking_get, (setter)_asyncio_Future__asyncio_future_blocking_set, _asyncio_Future__asyncio_future_blocking_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__ASYNCIO_FUTURE_BLOCKING_GETSETDEF {"_asyncio_future_blocking", (getter)_asyncio_Future__asyncio_future_blocking_get, NULL, _asyncio_Future__asyncio_future_blocking_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Future__asyncio_future_blocking_get_impl(FutureObj *self);
+
+static PyObject *
+_asyncio_Future__asyncio_future_blocking_get(FutureObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__asyncio_future_blocking_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__asyncio_future_blocking_DOCSTR)
+# define _asyncio_Future__asyncio_future_blocking_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__ASYNCIO_FUTURE_BLOCKING_GETSETDEF)
+# undef _ASYNCIO_FUTURE__ASYNCIO_FUTURE_BLOCKING_GETSETDEF
+# define _ASYNCIO_FUTURE__ASYNCIO_FUTURE_BLOCKING_GETSETDEF {"_asyncio_future_blocking", (getter)_asyncio_Future__asyncio_future_blocking_get, (setter)_asyncio_Future__asyncio_future_blocking_set, _asyncio_Future__asyncio_future_blocking_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__ASYNCIO_FUTURE_BLOCKING_GETSETDEF {"_asyncio_future_blocking", NULL, (setter)_asyncio_Future__asyncio_future_blocking_set, NULL},
+#endif
+
+static int
+_asyncio_Future__asyncio_future_blocking_set_impl(FutureObj *self,
+ PyObject *value);
+
+static int
+_asyncio_Future__asyncio_future_blocking_set(FutureObj *self, PyObject *value, void *Py_UNUSED(context))
+{
+ int return_value;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__asyncio_future_blocking_set_impl(self, value);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__log_traceback_DOCSTR)
+# define _asyncio_Future__log_traceback_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__LOG_TRACEBACK_GETSETDEF)
+# undef _ASYNCIO_FUTURE__LOG_TRACEBACK_GETSETDEF
+# define _ASYNCIO_FUTURE__LOG_TRACEBACK_GETSETDEF {"_log_traceback", (getter)_asyncio_Future__log_traceback_get, (setter)_asyncio_Future__log_traceback_set, _asyncio_Future__log_traceback_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__LOG_TRACEBACK_GETSETDEF {"_log_traceback", (getter)_asyncio_Future__log_traceback_get, NULL, _asyncio_Future__log_traceback_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Future__log_traceback_get_impl(FutureObj *self);
+
+static PyObject *
+_asyncio_Future__log_traceback_get(FutureObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__log_traceback_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__log_traceback_DOCSTR)
+# define _asyncio_Future__log_traceback_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__LOG_TRACEBACK_GETSETDEF)
+# undef _ASYNCIO_FUTURE__LOG_TRACEBACK_GETSETDEF
+# define _ASYNCIO_FUTURE__LOG_TRACEBACK_GETSETDEF {"_log_traceback", (getter)_asyncio_Future__log_traceback_get, (setter)_asyncio_Future__log_traceback_set, _asyncio_Future__log_traceback_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__LOG_TRACEBACK_GETSETDEF {"_log_traceback", NULL, (setter)_asyncio_Future__log_traceback_set, NULL},
+#endif
+
+static int
+_asyncio_Future__log_traceback_set_impl(FutureObj *self, PyObject *value);
+
+static int
+_asyncio_Future__log_traceback_set(FutureObj *self, PyObject *value, void *Py_UNUSED(context))
+{
+ int return_value;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__log_traceback_set_impl(self, value);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__loop_DOCSTR)
+# define _asyncio_Future__loop_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__LOOP_GETSETDEF)
+# undef _ASYNCIO_FUTURE__LOOP_GETSETDEF
+# define _ASYNCIO_FUTURE__LOOP_GETSETDEF {"_loop", (getter)_asyncio_Future__loop_get, (setter)_asyncio_Future__loop_set, _asyncio_Future__loop_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__LOOP_GETSETDEF {"_loop", (getter)_asyncio_Future__loop_get, NULL, _asyncio_Future__loop_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Future__loop_get_impl(FutureObj *self);
+
+static PyObject *
+_asyncio_Future__loop_get(FutureObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__loop_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__callbacks_DOCSTR)
+# define _asyncio_Future__callbacks_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__CALLBACKS_GETSETDEF)
+# undef _ASYNCIO_FUTURE__CALLBACKS_GETSETDEF
+# define _ASYNCIO_FUTURE__CALLBACKS_GETSETDEF {"_callbacks", (getter)_asyncio_Future__callbacks_get, (setter)_asyncio_Future__callbacks_set, _asyncio_Future__callbacks_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__CALLBACKS_GETSETDEF {"_callbacks", (getter)_asyncio_Future__callbacks_get, NULL, _asyncio_Future__callbacks_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Future__callbacks_get_impl(FutureObj *self);
+
+static PyObject *
+_asyncio_Future__callbacks_get(FutureObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__callbacks_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__result_DOCSTR)
+# define _asyncio_Future__result_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__RESULT_GETSETDEF)
+# undef _ASYNCIO_FUTURE__RESULT_GETSETDEF
+# define _ASYNCIO_FUTURE__RESULT_GETSETDEF {"_result", (getter)_asyncio_Future__result_get, (setter)_asyncio_Future__result_set, _asyncio_Future__result_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__RESULT_GETSETDEF {"_result", (getter)_asyncio_Future__result_get, NULL, _asyncio_Future__result_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Future__result_get_impl(FutureObj *self);
+
+static PyObject *
+_asyncio_Future__result_get(FutureObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__result_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__exception_DOCSTR)
+# define _asyncio_Future__exception_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__EXCEPTION_GETSETDEF)
+# undef _ASYNCIO_FUTURE__EXCEPTION_GETSETDEF
+# define _ASYNCIO_FUTURE__EXCEPTION_GETSETDEF {"_exception", (getter)_asyncio_Future__exception_get, (setter)_asyncio_Future__exception_set, _asyncio_Future__exception_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__EXCEPTION_GETSETDEF {"_exception", (getter)_asyncio_Future__exception_get, NULL, _asyncio_Future__exception_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Future__exception_get_impl(FutureObj *self);
+
+static PyObject *
+_asyncio_Future__exception_get(FutureObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__exception_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__source_traceback_DOCSTR)
+# define _asyncio_Future__source_traceback_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__SOURCE_TRACEBACK_GETSETDEF)
+# undef _ASYNCIO_FUTURE__SOURCE_TRACEBACK_GETSETDEF
+# define _ASYNCIO_FUTURE__SOURCE_TRACEBACK_GETSETDEF {"_source_traceback", (getter)_asyncio_Future__source_traceback_get, (setter)_asyncio_Future__source_traceback_set, _asyncio_Future__source_traceback_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__SOURCE_TRACEBACK_GETSETDEF {"_source_traceback", (getter)_asyncio_Future__source_traceback_get, NULL, _asyncio_Future__source_traceback_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Future__source_traceback_get_impl(FutureObj *self);
+
+static PyObject *
+_asyncio_Future__source_traceback_get(FutureObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__source_traceback_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__cancel_message_DOCSTR)
+# define _asyncio_Future__cancel_message_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__CANCEL_MESSAGE_GETSETDEF)
+# undef _ASYNCIO_FUTURE__CANCEL_MESSAGE_GETSETDEF
+# define _ASYNCIO_FUTURE__CANCEL_MESSAGE_GETSETDEF {"_cancel_message", (getter)_asyncio_Future__cancel_message_get, (setter)_asyncio_Future__cancel_message_set, _asyncio_Future__cancel_message_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__CANCEL_MESSAGE_GETSETDEF {"_cancel_message", (getter)_asyncio_Future__cancel_message_get, NULL, _asyncio_Future__cancel_message_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Future__cancel_message_get_impl(FutureObj *self);
+
+static PyObject *
+_asyncio_Future__cancel_message_get(FutureObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__cancel_message_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__cancel_message_DOCSTR)
+# define _asyncio_Future__cancel_message_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__CANCEL_MESSAGE_GETSETDEF)
+# undef _ASYNCIO_FUTURE__CANCEL_MESSAGE_GETSETDEF
+# define _ASYNCIO_FUTURE__CANCEL_MESSAGE_GETSETDEF {"_cancel_message", (getter)_asyncio_Future__cancel_message_get, (setter)_asyncio_Future__cancel_message_set, _asyncio_Future__cancel_message_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__CANCEL_MESSAGE_GETSETDEF {"_cancel_message", NULL, (setter)_asyncio_Future__cancel_message_set, NULL},
+#endif
+
+static int
+_asyncio_Future__cancel_message_set_impl(FutureObj *self, PyObject *value);
+
+static int
+_asyncio_Future__cancel_message_set(FutureObj *self, PyObject *value, void *Py_UNUSED(context))
+{
+ int return_value;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__cancel_message_set_impl(self, value);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Future__state_DOCSTR)
+# define _asyncio_Future__state_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_FUTURE__STATE_GETSETDEF)
+# undef _ASYNCIO_FUTURE__STATE_GETSETDEF
+# define _ASYNCIO_FUTURE__STATE_GETSETDEF {"_state", (getter)_asyncio_Future__state_get, (setter)_asyncio_Future__state_set, _asyncio_Future__state_DOCSTR},
+#else
+# define _ASYNCIO_FUTURE__STATE_GETSETDEF {"_state", (getter)_asyncio_Future__state_get, NULL, _asyncio_Future__state_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Future__state_get_impl(FutureObj *self);
+
+static PyObject *
+_asyncio_Future__state_get(FutureObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__state_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Future__make_cancelled_error__doc__,
@@ -484,7 +828,13 @@ _asyncio_Future__make_cancelled_error_impl(FutureObj *self);
static PyObject *
_asyncio_Future__make_cancelled_error(FutureObj *self, PyObject *Py_UNUSED(ignored))
{
- return _asyncio_Future__make_cancelled_error_impl(self);
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Future__make_cancelled_error_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Task___init____doc__,
@@ -575,6 +925,131 @@ _asyncio_Task___init__(PyObject *self, PyObject *args, PyObject *kwargs)
return return_value;
}
+#if !defined(_asyncio_Task__log_destroy_pending_DOCSTR)
+# define _asyncio_Task__log_destroy_pending_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_TASK__LOG_DESTROY_PENDING_GETSETDEF)
+# undef _ASYNCIO_TASK__LOG_DESTROY_PENDING_GETSETDEF
+# define _ASYNCIO_TASK__LOG_DESTROY_PENDING_GETSETDEF {"_log_destroy_pending", (getter)_asyncio_Task__log_destroy_pending_get, (setter)_asyncio_Task__log_destroy_pending_set, _asyncio_Task__log_destroy_pending_DOCSTR},
+#else
+# define _ASYNCIO_TASK__LOG_DESTROY_PENDING_GETSETDEF {"_log_destroy_pending", (getter)_asyncio_Task__log_destroy_pending_get, NULL, _asyncio_Task__log_destroy_pending_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Task__log_destroy_pending_get_impl(TaskObj *self);
+
+static PyObject *
+_asyncio_Task__log_destroy_pending_get(TaskObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task__log_destroy_pending_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Task__log_destroy_pending_DOCSTR)
+# define _asyncio_Task__log_destroy_pending_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_TASK__LOG_DESTROY_PENDING_GETSETDEF)
+# undef _ASYNCIO_TASK__LOG_DESTROY_PENDING_GETSETDEF
+# define _ASYNCIO_TASK__LOG_DESTROY_PENDING_GETSETDEF {"_log_destroy_pending", (getter)_asyncio_Task__log_destroy_pending_get, (setter)_asyncio_Task__log_destroy_pending_set, _asyncio_Task__log_destroy_pending_DOCSTR},
+#else
+# define _ASYNCIO_TASK__LOG_DESTROY_PENDING_GETSETDEF {"_log_destroy_pending", NULL, (setter)_asyncio_Task__log_destroy_pending_set, NULL},
+#endif
+
+static int
+_asyncio_Task__log_destroy_pending_set_impl(TaskObj *self, PyObject *value);
+
+static int
+_asyncio_Task__log_destroy_pending_set(TaskObj *self, PyObject *value, void *Py_UNUSED(context))
+{
+ int return_value;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task__log_destroy_pending_set_impl(self, value);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Task__must_cancel_DOCSTR)
+# define _asyncio_Task__must_cancel_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_TASK__MUST_CANCEL_GETSETDEF)
+# undef _ASYNCIO_TASK__MUST_CANCEL_GETSETDEF
+# define _ASYNCIO_TASK__MUST_CANCEL_GETSETDEF {"_must_cancel", (getter)_asyncio_Task__must_cancel_get, (setter)_asyncio_Task__must_cancel_set, _asyncio_Task__must_cancel_DOCSTR},
+#else
+# define _ASYNCIO_TASK__MUST_CANCEL_GETSETDEF {"_must_cancel", (getter)_asyncio_Task__must_cancel_get, NULL, _asyncio_Task__must_cancel_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Task__must_cancel_get_impl(TaskObj *self);
+
+static PyObject *
+_asyncio_Task__must_cancel_get(TaskObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task__must_cancel_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Task__coro_DOCSTR)
+# define _asyncio_Task__coro_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_TASK__CORO_GETSETDEF)
+# undef _ASYNCIO_TASK__CORO_GETSETDEF
+# define _ASYNCIO_TASK__CORO_GETSETDEF {"_coro", (getter)_asyncio_Task__coro_get, (setter)_asyncio_Task__coro_set, _asyncio_Task__coro_DOCSTR},
+#else
+# define _ASYNCIO_TASK__CORO_GETSETDEF {"_coro", (getter)_asyncio_Task__coro_get, NULL, _asyncio_Task__coro_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Task__coro_get_impl(TaskObj *self);
+
+static PyObject *
+_asyncio_Task__coro_get(TaskObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task__coro_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
+#if !defined(_asyncio_Task__fut_waiter_DOCSTR)
+# define _asyncio_Task__fut_waiter_DOCSTR NULL
+#endif
+#if defined(_ASYNCIO_TASK__FUT_WAITER_GETSETDEF)
+# undef _ASYNCIO_TASK__FUT_WAITER_GETSETDEF
+# define _ASYNCIO_TASK__FUT_WAITER_GETSETDEF {"_fut_waiter", (getter)_asyncio_Task__fut_waiter_get, (setter)_asyncio_Task__fut_waiter_set, _asyncio_Task__fut_waiter_DOCSTR},
+#else
+# define _ASYNCIO_TASK__FUT_WAITER_GETSETDEF {"_fut_waiter", (getter)_asyncio_Task__fut_waiter_get, NULL, _asyncio_Task__fut_waiter_DOCSTR},
+#endif
+
+static PyObject *
+_asyncio_Task__fut_waiter_get_impl(TaskObj *self);
+
+static PyObject *
+_asyncio_Task__fut_waiter_get(TaskObj *self, void *Py_UNUSED(context))
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task__fut_waiter_get_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
PyDoc_STRVAR(_asyncio_Task__make_cancelled_error__doc__,
"_make_cancelled_error($self, /)\n"
"--\n"
@@ -593,7 +1068,13 @@ _asyncio_Task__make_cancelled_error_impl(TaskObj *self);
static PyObject *
_asyncio_Task__make_cancelled_error(TaskObj *self, PyObject *Py_UNUSED(ignored))
{
- return _asyncio_Task__make_cancelled_error_impl(self);
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task__make_cancelled_error_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Task_cancel__doc__,
@@ -670,7 +1151,9 @@ _asyncio_Task_cancel(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyO
}
msg = args[0];
skip_optional_pos:
+ Py_BEGIN_CRITICAL_SECTION(self);
return_value = _asyncio_Task_cancel_impl(self, msg);
+ Py_END_CRITICAL_SECTION();
exit:
return return_value;
@@ -694,7 +1177,13 @@ _asyncio_Task_cancelling_impl(TaskObj *self);
static PyObject *
_asyncio_Task_cancelling(TaskObj *self, PyObject *Py_UNUSED(ignored))
{
- return _asyncio_Task_cancelling_impl(self);
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task_cancelling_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Task_uncancel__doc__,
@@ -717,7 +1206,13 @@ _asyncio_Task_uncancel_impl(TaskObj *self);
static PyObject *
_asyncio_Task_uncancel(TaskObj *self, PyObject *Py_UNUSED(ignored))
{
- return _asyncio_Task_uncancel_impl(self);
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task_uncancel_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Task_get_stack__doc__,
@@ -905,7 +1400,13 @@ _asyncio_Task_get_coro_impl(TaskObj *self);
static PyObject *
_asyncio_Task_get_coro(TaskObj *self, PyObject *Py_UNUSED(ignored))
{
- return _asyncio_Task_get_coro_impl(self);
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task_get_coro_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Task_get_context__doc__,
@@ -939,7 +1440,13 @@ _asyncio_Task_get_name_impl(TaskObj *self);
static PyObject *
_asyncio_Task_get_name(TaskObj *self, PyObject *Py_UNUSED(ignored))
{
- return _asyncio_Task_get_name_impl(self);
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task_get_name_impl(self);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
}
PyDoc_STRVAR(_asyncio_Task_set_name__doc__,
@@ -950,6 +1457,21 @@ PyDoc_STRVAR(_asyncio_Task_set_name__doc__,
#define _ASYNCIO_TASK_SET_NAME_METHODDEF \
{"set_name", (PyCFunction)_asyncio_Task_set_name, METH_O, _asyncio_Task_set_name__doc__},
+static PyObject *
+_asyncio_Task_set_name_impl(TaskObj *self, PyObject *value);
+
+static PyObject *
+_asyncio_Task_set_name(TaskObj *self, PyObject *value)
+{
+ PyObject *return_value = NULL;
+
+ Py_BEGIN_CRITICAL_SECTION(self);
+ return_value = _asyncio_Task_set_name_impl(self, value);
+ Py_END_CRITICAL_SECTION();
+
+ return return_value;
+}
+
PyDoc_STRVAR(_asyncio__get_running_loop__doc__,
"_get_running_loop($module, /)\n"
"--\n"
@@ -1566,4 +2088,4 @@ _asyncio_all_tasks(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py
exit:
return return_value;
}
-/*[clinic end generated code: output=e5d95a0ec229ffcd input=a9049054013a1b77]*/
+/*[clinic end generated code: output=408e156476ced07f input=a9049054013a1b77]*/
1
0
[3.13] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128465)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/855af3bbc62e89aeeb6af1e22061cf0635…
commit: 855af3bbc62e89aeeb6af1e22061cf06354ad99a
branch: 3.13
author: Zanie Blue <contact(a)zanie.dev>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T00:50:13Z
summary:
[3.13] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128465)
(cherry picked from commit b75ed951d4de8ba85349d80c8e7f097b3cd6052f)
files:
M configure
M configure.ac
diff --git a/configure b/configure
index b093689aeb1e4b..c66333c721d841 100755
--- a/configure
+++ b/configure
@@ -13467,7 +13467,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
@@ -13593,7 +13593,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
@@ -14363,7 +14363,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
ac_fn_c_check_header_compile "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes
then :
@@ -14436,7 +14436,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
ac_fn_c_check_header_compile "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes
then :
@@ -14547,8 +14547,8 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
@@ -14787,8 +14787,8 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$LIBMPDEC_CFLAGS $CPPFLAGS"
- LIBS="$LIBMPDEC_LIBS $LIBS"
+ CPPFLAGS="$CPPFLAGS $LIBMPDEC_CFLAGS"
+ LIBS="$LIBS $LIBMPDEC_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15055,7 +15055,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LIBS="$LIBSQLITE3_LIBS $LIBS"
+ LIBS="$LIBS $LIBSQLITE3_LIBS"
ac_fn_c_check_header_compile "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
if test "x$ac_cv_header_sqlite3_h" = xyes
@@ -15935,7 +15935,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
- LIBS="$TCLTK_LIBS $LDFLAGS"
+ LIBS="$LIBS $TCLTK_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16001,7 +16001,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
- LDFLAGS="$GDBM_LIBS $LDFLAGS"
+ LIBS="$LIBS $GDBM_LIBS"
for ac_header in gdbm.h
do :
ac_fn_c_check_header_compile "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
@@ -20278,7 +20278,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
for ac_header in zlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
@@ -20407,7 +20407,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
for ac_header in zlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
@@ -20626,7 +20626,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
@@ -20708,7 +20708,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
@@ -20854,7 +20854,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
@@ -20936,7 +20936,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
@@ -24862,7 +24862,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
@@ -24941,7 +24941,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
@@ -25093,7 +25093,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
@@ -25174,7 +25174,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
@@ -25282,7 +25282,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
- LIBS="$READLINE_LIBS $LIBS"
+ LIBS="$LIBS $READLINE_LIBS"
LIBS_SAVE=$LIBS
diff --git a/configure.ac b/configure.ac
index ea557fba25df96..c53e55fbba2a5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3744,7 +3744,7 @@ AS_VAR_IF([have_uuid], [missing], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
AC_CHECK_HEADERS([uuid/uuid.h], [
PY_CHECK_LIB([uuid], [uuid_generate_time], [have_uuid=yes])
PY_CHECK_LIB([uuid], [uuid_generate_time_safe],
@@ -3978,7 +3978,7 @@ AS_VAR_IF([have_libffi], [missing], [
PKG_CHECK_MODULES([LIBFFI], [libffi], [have_libffi=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
AC_CHECK_HEADER([ffi.h], [
AC_CHECK_LIB([ffi], [ffi_call], [
have_libffi=yes
@@ -4012,8 +4012,8 @@ AS_VAR_IF([have_libffi], [yes], [
AS_VAR_IF([ac_cv_lib_dl_dlopen], [yes], [AS_VAR_APPEND([LIBFFI_LIBS], [" -ldl"])])
WITH_SAVE_ENV([
- CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
PY_CHECK_FUNC([ffi_prep_cif_var], [@%:@include <ffi.h>])
PY_CHECK_FUNC([ffi_prep_closure_loc], [@%:@include <ffi.h>])
@@ -4051,8 +4051,8 @@ AS_VAR_IF(
AS_VAR_IF([with_system_libmpdec], [yes],
[WITH_SAVE_ENV([
- CPPFLAGS="$LIBMPDEC_CFLAGS $CPPFLAGS"
- LIBS="$LIBMPDEC_LIBS $LIBS"
+ CPPFLAGS="$CPPFLAGS $LIBMPDEC_CFLAGS"
+ LIBS="$LIBS $LIBMPDEC_LIBS"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
@@ -4185,7 +4185,7 @@ WITH_SAVE_ENV([
dnl bpo-45774/GH-29507: The CPP check in AC_CHECK_HEADER can fail on FreeBSD,
dnl hence CPPFLAGS instead of CFLAGS.
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LIBS="$LIBSQLITE3_LIBS $LIBS"
+ LIBS="$LIBS $LIBSQLITE3_LIBS"
AC_CHECK_HEADER([sqlite3.h], [
have_sqlite3=yes
@@ -4288,7 +4288,7 @@ AS_CASE([$ac_sys_system],
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
- LIBS="$TCLTK_LIBS $LDFLAGS"
+ LIBS="$LIBS $TCLTK_LIBS"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
@@ -4330,7 +4330,7 @@ AC_ARG_VAR([GDBM_CFLAGS], [C compiler flags for gdbm])
AC_ARG_VAR([GDBM_LIBS], [additional linker flags for gdbm])
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
- LDFLAGS="$GDBM_LIBS $LDFLAGS"
+ LIBS="$LIBS $GDBM_LIBS"
AC_CHECK_HEADERS([gdbm.h], [
AC_CHECK_LIB([gdbm], [gdbm_open], [
have_gdbm=yes
@@ -5288,7 +5288,7 @@ PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
AC_CHECK_HEADERS([zlib.h], [
PY_CHECK_LIB([z], [gzread], [have_zlib=yes], [have_zlib=no])
], [have_zlib=no])
@@ -5312,7 +5312,7 @@ PY_CHECK_EMSCRIPTEN_PORT([BZIP2], [-sUSE_BZIP2])
PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
AC_CHECK_HEADERS([bzlib.h], [
AC_CHECK_LIB([bz2], [BZ2_bzCompress], [have_bzip2=yes], [have_bzip2=no])
], [have_bzip2=no])
@@ -5326,7 +5326,7 @@ PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
AC_CHECK_HEADERS([lzma.h], [
AC_CHECK_LIB([lzma], [lzma_easy_encoder], [have_liblzma=yes], [have_liblzma=no])
], [have_liblzma=no])
@@ -6318,7 +6318,7 @@ AS_VAR_IF([with_readline], [readline], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
AC_CHECK_HEADERS([readline/readline.h], [
AC_CHECK_LIB([readline], [readline], [
LIBREADLINE=readline
@@ -6339,7 +6339,7 @@ AS_VAR_IF([with_readline], [edit], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
AC_CHECK_HEADERS([editline/readline.h], [
AC_CHECK_LIB([edit], [readline], [
LIBREADLINE=edit
@@ -6363,7 +6363,7 @@ AS_VAR_IF([with_readline], [no], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
- LIBS="$READLINE_LIBS $LIBS"
+ LIBS="$LIBS $READLINE_LIBS"
LIBS_SAVE=$LIBS
m4_define([readline_includes], [
1
0
[3.12] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128466)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/f2cc565b99b4371db7d6a9a4773baa1174…
commit: f2cc565b99b4371db7d6a9a4773baa1174fb3e69
branch: 3.12
author: Zanie Blue <contact(a)zanie.dev>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T00:47:08Z
summary:
[3.12] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128466)
(cherry picked from commit b75ed951d4de8ba85349d80c8e7f097b3cd6052f)
files:
M configure
M configure.ac
diff --git a/configure b/configure
index d6c6cde4165fb7..be04b13700b4ea 100755
--- a/configure
+++ b/configure
@@ -13296,7 +13296,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
@@ -13422,7 +13422,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
@@ -14185,7 +14185,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
ac_fn_c_check_header_compile "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes
then :
@@ -14258,7 +14258,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
ac_fn_c_check_header_compile "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes
then :
@@ -14365,8 +14365,8 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
@@ -15019,7 +15019,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LIBS="$LIBSQLITE3_LIBS $LIBS"
+ LIBS="$LIBS $LIBSQLITE3_LIBS"
ac_fn_c_check_header_compile "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
if test "x$ac_cv_header_sqlite3_h" = xyes
@@ -15899,7 +15899,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
- LIBS="$TCLTK_LIBS $LDFLAGS"
+ LIBS="$LIBS $TCLTK_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15965,7 +15965,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
- LDFLAGS="$GDBM_LIBS $LDFLAGS"
+ LIBS="$LIBS $GDBM_LIBS"
for ac_header in gdbm.h
do :
ac_fn_c_check_header_compile "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
@@ -19812,7 +19812,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
for ac_header in zlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
@@ -19941,7 +19941,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
for ac_header in zlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
@@ -20160,7 +20160,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
@@ -20242,7 +20242,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
@@ -20388,7 +20388,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
@@ -20470,7 +20470,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
@@ -24670,7 +24670,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
@@ -24749,7 +24749,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
@@ -24901,7 +24901,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
@@ -24982,7 +24982,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
@@ -25090,7 +25090,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
- LIBS="$READLINE_LIBS $LIBS"
+ LIBS="$LIBS $READLINE_LIBS"
LIBS_SAVE=$LIBS
diff --git a/configure.ac b/configure.ac
index 4dfce49e1585cb..6c5649bffda6db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3630,7 +3630,7 @@ AS_VAR_IF([have_uuid], [missing], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
AC_CHECK_HEADERS([uuid/uuid.h], [
PY_CHECK_LIB([uuid], [uuid_generate_time], [have_uuid=yes])
PY_CHECK_LIB([uuid], [uuid_generate_time_safe],
@@ -3857,7 +3857,7 @@ AS_VAR_IF([have_libffi], [missing], [
PKG_CHECK_MODULES([LIBFFI], [libffi], [have_libffi=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
AC_CHECK_HEADER([ffi.h], [
AC_CHECK_LIB([ffi], [ffi_call], [
have_libffi=yes
@@ -3888,8 +3888,8 @@ AS_VAR_IF([have_libffi], [yes], [
AS_VAR_IF([ac_cv_lib_dl_dlopen], [yes], [AS_VAR_APPEND([LIBFFI_LIBS], [" -ldl"])])
WITH_SAVE_ENV([
- CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
PY_CHECK_FUNC([ffi_prep_cif_var], [@%:@include <ffi.h>])
PY_CHECK_FUNC([ffi_prep_closure_loc], [@%:@include <ffi.h>])
@@ -4056,7 +4056,7 @@ WITH_SAVE_ENV([
dnl bpo-45774/GH-29507: The CPP check in AC_CHECK_HEADER can fail on FreeBSD,
dnl hence CPPFLAGS instead of CFLAGS.
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LIBS="$LIBSQLITE3_LIBS $LIBS"
+ LIBS="$LIBS $LIBSQLITE3_LIBS"
AC_CHECK_HEADER([sqlite3.h], [
have_sqlite3=yes
@@ -4159,7 +4159,7 @@ AS_CASE([$ac_sys_system],
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
- LIBS="$TCLTK_LIBS $LDFLAGS"
+ LIBS="$LIBS $TCLTK_LIBS"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
@@ -4201,7 +4201,7 @@ AC_ARG_VAR([GDBM_CFLAGS], [C compiler flags for gdbm])
AC_ARG_VAR([GDBM_LIBS], [additional linker flags for gdbm])
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
- LDFLAGS="$GDBM_LIBS $LDFLAGS"
+ LIBS="$LIBS $GDBM_LIBS"
AC_CHECK_HEADERS([gdbm.h], [
AC_CHECK_LIB([gdbm], [gdbm_open], [
have_gdbm=yes
@@ -5080,7 +5080,7 @@ PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
AC_CHECK_HEADERS([zlib.h], [
PY_CHECK_LIB([z], [gzread], [have_zlib=yes], [have_zlib=no])
], [have_zlib=no])
@@ -5104,7 +5104,7 @@ PY_CHECK_EMSCRIPTEN_PORT([BZIP2], [-sUSE_BZIP2])
PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
AC_CHECK_HEADERS([bzlib.h], [
AC_CHECK_LIB([bz2], [BZ2_bzCompress], [have_bzip2=yes], [have_bzip2=no])
], [have_bzip2=no])
@@ -5118,7 +5118,7 @@ PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
AC_CHECK_HEADERS([lzma.h], [
AC_CHECK_LIB([lzma], [lzma_easy_encoder], [have_liblzma=yes], [have_liblzma=no])
], [have_liblzma=no])
@@ -6127,7 +6127,7 @@ AS_VAR_IF([with_readline], [readline], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
AC_CHECK_HEADERS([readline/readline.h], [
AC_CHECK_LIB([readline], [readline], [
LIBREADLINE=readline
@@ -6148,7 +6148,7 @@ AS_VAR_IF([with_readline], [edit], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
AC_CHECK_HEADERS([editline/readline.h], [
AC_CHECK_LIB([edit], [readline], [
LIBREADLINE=edit
@@ -6172,7 +6172,7 @@ AS_VAR_IF([with_readline], [no], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
- LIBS="$READLINE_LIBS $LIBS"
+ LIBS="$LIBS $READLINE_LIBS"
LIBS_SAVE=$LIBS
m4_define([readline_includes], [
1
0
[3.13] gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (GH-128457) (#128461)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/b923f4879e5ed7e546e2d549f308969dde…
commit: b923f4879e5ed7e546e2d549f308969dde301eee
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T00:49:21+01:00
summary:
[3.13] gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (GH-128457) (#128461)
'hfsort+' is deprecated in favor of 'cdsort'.
(cherry picked from commit 4974bbdb290b61a2d8860de490fde1228c296753)
Co-authored-by: Zanie Blue <contact(a)zanie.dev>
files:
M configure
M configure.ac
diff --git a/configure b/configure
index 8401e07ba86c10..b093689aeb1e4b 100755
--- a/configure
+++ b/configure
@@ -9340,7 +9340,7 @@ printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
printf %s "checking BOLT_APPLY_FLAGS... " >&6; }
if test -z "${BOLT_APPLY_FLAGS}"
then
- BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
+ BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5
diff --git a/configure.ac b/configure.ac
index 4a341b2735c1ed..ea557fba25df96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2237,7 +2237,7 @@ then
[m4_normalize("
-update-debug-sections
-reorder-blocks=ext-tsp
- -reorder-functions=hfsort+
+ -reorder-functions=cdsort
-split-functions
-icf=1
-inline-all
1
0
[3.12] gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (GH-128457) (#128462)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/d56e50229e3499c8405dd9c7b1b26009e1…
commit: d56e50229e3499c8405dd9c7b1b26009e19ba4c2
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-04T00:49:05+01:00
summary:
[3.12] gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (GH-128457) (#128462)
'hfsort+' is deprecated in favor of 'cdsort'.
(cherry picked from commit 4974bbdb290b61a2d8860de490fde1228c296753)
Co-authored-by: Zanie Blue <contact(a)zanie.dev>
files:
M configure
M configure.ac
diff --git a/configure b/configure
index c14d27ede2b173..d6c6cde4165fb7 100755
--- a/configure
+++ b/configure
@@ -9170,7 +9170,7 @@ printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
printf %s "checking BOLT_APPLY_FLAGS... " >&6; }
if test -z "${BOLT_APPLY_FLAGS}"
then
- BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
+ BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5
diff --git a/configure.ac b/configure.ac
index bc8c357e99667e..4dfce49e1585cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2127,7 +2127,7 @@ then
[m4_normalize("
-update-debug-sections
-reorder-blocks=ext-tsp
- -reorder-functions=hfsort+
+ -reorder-functions=cdsort
-split-functions
-icf=1
-inline-all
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/f1574859d7d6cd259f867194762f04b72e…
commit: f1574859d7d6cd259f867194762f04b72ef2c340
branch: main
author: Sam Gross <colesbury(a)gmail.com>
committer: colesbury <colesbury(a)gmail.com>
date: 2025-01-03T21:48:47Z
summary:
gh-125985: Fix `cmodule_function()` scaling benchmark (#128460)
Add a separate benchmark that measures the effect of
`_PyObject_LookupSpecial()` on scaling.
In the process of cleaning up the scaling benchmarks for inclusion, I
unintentionally changed the "cmodule_function" benchmark to pass an
`int` to `math.floor()` instead of a `float`, which causes it to use the
`_PyObject_LookupSpecial()` code path. `_PyObject_LookupSpecial()` has
its own scaling issues that we want to measure separately from calling a
function on a C module.
files:
M Tools/ftscalingbench/ftscalingbench.py
diff --git a/Tools/ftscalingbench/ftscalingbench.py b/Tools/ftscalingbench/ftscalingbench.py
index 767aeae9349070..364c465bc91b0b 100644
--- a/Tools/ftscalingbench/ftscalingbench.py
+++ b/Tools/ftscalingbench/ftscalingbench.py
@@ -54,8 +54,16 @@ def object_cfunction():
@register_benchmark
def cmodule_function():
- for i in range(1000 * WORK_SCALE):
- math.floor(i * i)
+ N = 1000 * WORK_SCALE
+ for i in range(N):
+ math.cos(i / N)
+
+@register_benchmark
+def object_lookup_special():
+ # round() uses `_PyObject_LookupSpecial()` internally.
+ N = 1000 * WORK_SCALE
+ for i in range(N):
+ round(i / N)
@register_benchmark
def mult_constant():
@@ -206,7 +214,7 @@ def benchmark(func):
color = "\x1b[33m" # yellow
reset_color = "\x1b[0m"
- print(f"{color}{func.__name__:<18} {round(factor, 1):>4}x {direction}{reset_color}")
+ print(f"{color}{func.__name__:<25} {round(factor, 1):>4}x {direction}{reset_color}")
def determine_num_threads_and_affinity():
if sys.platform != "linux":
1
0
gh-128354: Consistently use LIBS over LDFLAGS in library build checks (#128359)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/b75ed951d4de8ba85349d80c8e7f097b3c…
commit: b75ed951d4de8ba85349d80c8e7f097b3cd6052f
branch: main
author: Zanie Blue <contact(a)zanie.dev>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-03T21:51:06+01:00
summary:
gh-128354: Consistently use LIBS over LDFLAGS in library build checks (#128359)
files:
M configure
M configure.ac
diff --git a/configure b/configure
index 08fec03bef42dc..aa88c74c61156c 100755
--- a/configure
+++ b/configure
@@ -14044,7 +14044,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
@@ -14186,7 +14186,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
for ac_header in uuid/uuid.h
do :
ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
@@ -15084,7 +15084,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
ac_fn_c_check_header_compile "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes
then :
@@ -15166,7 +15166,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
ac_fn_c_check_header_compile "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
if test "x$ac_cv_header_ffi_h" = xyes
then :
@@ -15286,8 +15286,8 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
@@ -15439,9 +15439,8 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$LIBFFI_CFLAGS $CPPFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
- LIBS="$LIBFFI_LIBS $LIBS"
+ CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
if test "$cross_compiling" = yes
then :
ac_cv_ffi_complex_double_supported=no
@@ -15614,8 +15613,8 @@ save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
- CPPFLAGS="$LIBMPDEC_CFLAGS $CPPFLAGS"
- LIBS="$LIBMPDEC_LIBS $LIBS"
+ CPPFLAGS="$CPPFLAGS $LIBMPDEC_CFLAGS"
+ LIBS="$LIBS $LIBMPDEC_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15885,7 +15884,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LIBS="$LIBSQLITE3_LIBS $LIBS"
+ LIBS="$LIBS $LIBSQLITE3_LIBS"
ac_fn_c_check_header_compile "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
if test "x$ac_cv_header_sqlite3_h" = xyes
@@ -16875,7 +16874,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
- LIBS="$TCLTK_LIBS $LDFLAGS"
+ LIBS="$LIBS $TCLTK_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16942,7 +16941,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
- LDFLAGS="$GDBM_LIBS $LDFLAGS"
+ LIBS="$LIBS $GDBM_LIBS"
for ac_header in gdbm.h
do :
ac_fn_c_check_header_compile "$LINENO" "gdbm.h" "ac_cv_header_gdbm_h" "$ac_includes_default"
@@ -21492,7 +21491,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
for ac_header in zlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
@@ -21639,7 +21638,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
for ac_header in zlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
@@ -21876,7 +21875,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
@@ -21968,7 +21967,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
for ac_header in bzlib.h
do :
ac_fn_c_check_header_compile "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
@@ -22124,7 +22123,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
@@ -22216,7 +22215,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
for ac_header in lzma.h
do :
ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
@@ -26370,7 +26369,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
@@ -26459,7 +26458,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
for ac_header in readline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
@@ -26621,7 +26620,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
@@ -26712,7 +26711,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
for ac_header in editline/readline.h
do :
ac_fn_c_check_header_compile "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
@@ -26830,7 +26829,7 @@ save_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
- LIBS="$READLINE_LIBS $LIBS"
+ LIBS="$LIBS $READLINE_LIBS"
LIBS_SAVE=$LIBS
diff --git a/configure.ac b/configure.ac
index ecaf0fa9c43d49..9e131ed1a2dc98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3701,7 +3701,7 @@ AS_VAR_IF([have_uuid], [missing], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBUUID_LIBS"
+ LIBS="$LIBS $LIBUUID_LIBS"
AC_CHECK_HEADERS([uuid/uuid.h], [
PY_CHECK_LIB([uuid], [uuid_generate_time], [have_uuid=yes])
PY_CHECK_LIB([uuid], [uuid_generate_time_safe],
@@ -3971,7 +3971,7 @@ AS_VAR_IF([have_libffi], [missing], [
PKG_CHECK_MODULES([LIBFFI], [libffi], [have_libffi=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBFFI_LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
AC_CHECK_HEADER([ffi.h], [
AC_CHECK_LIB([ffi], [ffi_call], [
have_libffi=yes
@@ -4005,8 +4005,8 @@ AS_VAR_IF([have_libffi], [yes], [
AS_VAR_IF([ac_cv_lib_dl_dlopen], [yes], [AS_VAR_APPEND([LIBFFI_LIBS], [" -ldl"])])
WITH_SAVE_ENV([
- CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
PY_CHECK_FUNC([ffi_prep_cif_var], [@%:@include <ffi.h>])
PY_CHECK_FUNC([ffi_prep_closure_loc], [@%:@include <ffi.h>])
@@ -4021,9 +4021,8 @@ AS_VAR_IF([have_libffi], [yes], [
#
AC_CACHE_CHECK([libffi has complex type support], [ac_cv_ffi_complex_double_supported],
[WITH_SAVE_ENV([
- CPPFLAGS="$LIBFFI_CFLAGS $CPPFLAGS"
- LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
- LIBS="$LIBFFI_LIBS $LIBS"
+ CPPFLAGS="$CPPFLAGS $LIBFFI_CFLAGS"
+ LIBS="$LIBS $LIBFFI_LIBS"
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <complex.h>
#include <ffi.h>
@@ -4086,8 +4085,8 @@ AS_VAR_IF(
AS_VAR_IF([with_system_libmpdec], [yes],
[WITH_SAVE_ENV([
- CPPFLAGS="$LIBMPDEC_CFLAGS $CPPFLAGS"
- LIBS="$LIBMPDEC_LIBS $LIBS"
+ CPPFLAGS="$CPPFLAGS $LIBMPDEC_CFLAGS"
+ LIBS="$LIBS $LIBMPDEC_LIBS"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
@@ -4220,7 +4219,7 @@ WITH_SAVE_ENV([
dnl bpo-45774/GH-29507: The CPP check in AC_CHECK_HEADER can fail on FreeBSD,
dnl hence CPPFLAGS instead of CFLAGS.
CPPFLAGS="$CPPFLAGS $LIBSQLITE3_CFLAGS"
- LIBS="$LIBSQLITE3_LIBS $LIBS"
+ LIBS="$LIBS $LIBSQLITE3_LIBS"
AC_CHECK_HEADER([sqlite3.h], [
have_sqlite3=yes
@@ -4323,7 +4322,7 @@ AS_CASE([$ac_sys_system],
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $TCLTK_CFLAGS"
- LIBS="$TCLTK_LIBS $LDFLAGS"
+ LIBS="$LIBS $TCLTK_LIBS"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
@@ -4365,7 +4364,7 @@ AC_ARG_VAR([GDBM_CFLAGS], [C compiler flags for gdbm])
AC_ARG_VAR([GDBM_LIBS], [additional linker flags for gdbm])
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $GDBM_CFLAGS"
- LDFLAGS="$GDBM_LIBS $LDFLAGS"
+ LIBS="$LIBS $GDBM_LIBS"
AC_CHECK_HEADERS([gdbm.h], [
AC_CHECK_LIB([gdbm], [gdbm_open], [
have_gdbm=yes
@@ -5310,7 +5309,7 @@ PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
- LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+ LIBS="$LIBS $ZLIB_LIBS"
AC_CHECK_HEADERS([zlib.h], [
PY_CHECK_LIB([z], [gzread], [have_zlib=yes], [have_zlib=no])
], [have_zlib=no])
@@ -5334,7 +5333,7 @@ PY_CHECK_EMSCRIPTEN_PORT([BZIP2], [-sUSE_BZIP2])
PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $BZIP2_CFLAGS"
- LDFLAGS="$LDFLAGS $BZIP2_LIBS"
+ LIBS="$LIBS $BZIP2_LIBS"
AC_CHECK_HEADERS([bzlib.h], [
AC_CHECK_LIB([bz2], [BZ2_bzCompress], [have_bzip2=yes], [have_bzip2=no])
], [have_bzip2=no])
@@ -5348,7 +5347,7 @@ PKG_CHECK_MODULES([BZIP2], [bzip2], [have_bzip2=yes], [
PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBLZMA_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBLZMA_LIBS"
+ LIBS="$LIBS $LIBLZMA_LIBS"
AC_CHECK_HEADERS([lzma.h], [
AC_CHECK_LIB([lzma], [lzma_easy_encoder], [have_liblzma=yes], [have_liblzma=no])
], [have_liblzma=no])
@@ -6342,7 +6341,7 @@ AS_VAR_IF([with_readline], [readline], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBREADLINE_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBREADLINE_LIBS"
+ LIBS="$LIBS $LIBREADLINE_LIBS"
AC_CHECK_HEADERS([readline/readline.h], [
AC_CHECK_LIB([readline], [readline], [
LIBREADLINE=readline
@@ -6363,7 +6362,7 @@ AS_VAR_IF([with_readline], [edit], [
], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $LIBEDIT_CFLAGS"
- LDFLAGS="$LDFLAGS $LIBEDIT_LIBS"
+ LIBS="$LIBS $LIBEDIT_LIBS"
AC_CHECK_HEADERS([editline/readline.h], [
AC_CHECK_LIB([edit], [readline], [
LIBREADLINE=edit
@@ -6387,7 +6386,7 @@ AS_VAR_IF([with_readline], [no], [
WITH_SAVE_ENV([
CPPFLAGS="$CPPFLAGS $READLINE_CFLAGS"
- LIBS="$READLINE_LIBS $LIBS"
+ LIBS="$LIBS $READLINE_LIBS"
LIBS_SAVE=$LIBS
m4_define([readline_includes], [
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/4974bbdb290b61a2d8860de490fde1228c…
commit: 4974bbdb290b61a2d8860de490fde1228c296753
branch: main
author: Zanie Blue <contact(a)zanie.dev>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-03T20:49:50Z
summary:
gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (#128457)
'hfsort+' is deprecated in favor of 'cdsort'.
files:
M configure
M configure.ac
diff --git a/configure b/configure
index 86b96d6208fe40..08fec03bef42dc 100755
--- a/configure
+++ b/configure
@@ -9403,7 +9403,7 @@ printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
printf %s "checking BOLT_APPLY_FLAGS... " >&6; }
if test -z "${BOLT_APPLY_FLAGS}"
then
- BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
+ BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot "
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5
diff --git a/configure.ac b/configure.ac
index 50b130f2c802b5..ecaf0fa9c43d49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2183,7 +2183,7 @@ then
[m4_normalize("
-update-debug-sections
-reorder-blocks=ext-tsp
- -reorder-functions=hfsort+
+ -reorder-functions=cdsort
-split-functions
-icf=1
-inline-all
1
0
[3.12] gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters` (GH-127876) (#128459)
by Eclips4 Jan. 3, 2025
by Eclips4 Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/e44045924da39169ee4ef38ae0211d5868…
commit: e44045924da39169ee4ef38ae0211d586836cad4
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-03T21:21:08+02:00
summary:
[3.12] gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters` (GH-127876) (#128459)
gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters`` (GH-127876)
(cherry picked from commit 46cb6340d7bad955edfc0a20f6a52dabc03b0932)
Co-authored-by: Alexander Shadchin <shadchin(a)yandex-team.com>
files:
A Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst
M Lib/test/test_unicode.py
M Objects/unicodeobject.c
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 19556eecc3c646..a24acb7af2ff96 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -7,6 +7,7 @@
"""
import _string
import codecs
+import datetime
import itertools
import operator
import pickle
@@ -1921,6 +1922,12 @@ def test_utf8_decode_invalid_sequences(self):
self.assertRaises(UnicodeDecodeError,
(b'\xF4'+cb+b'\xBF\xBF').decode, 'utf-8')
+ def test_issue127903(self):
+ # gh-127903: ``_copy_characters`` crashes on DEBUG builds when
+ # there is nothing to copy.
+ d = datetime.datetime(2013, 11, 10, 14, 20, 59)
+ self.assertEqual(d.strftime('%z'), '')
+
def test_issue8271(self):
# Issue #8271: during the decoding of an invalid UTF-8 byte sequence,
# only the start byte and the continuation byte(s) are now considered
diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst
new file mode 100644
index 00000000000000..ad479b52d1675c
--- /dev/null
+++ b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst
@@ -0,0 +1,2 @@
+``Objects/unicodeobject.c``: fix a crash on DEBUG builds in ``_copy_characters``
+when there is nothing to copy.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index c885be5b6682aa..3e5b5d03241ae0 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1472,11 +1472,14 @@ _copy_characters(PyObject *to, Py_ssize_t to_start,
assert(PyUnicode_Check(from));
assert(from_start + how_many <= PyUnicode_GET_LENGTH(from));
- assert(PyUnicode_Check(to));
- assert(to_start + how_many <= PyUnicode_GET_LENGTH(to));
+ assert(to == NULL || PyUnicode_Check(to));
- if (how_many == 0)
+ if (how_many == 0) {
return 0;
+ }
+
+ assert(to != NULL);
+ assert(to_start + how_many <= PyUnicode_GET_LENGTH(to));
from_kind = PyUnicode_KIND(from);
from_data = PyUnicode_DATA(from);
1
0
[3.13] gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters` (GH-127876) (#128458)
by Eclips4 Jan. 3, 2025
by Eclips4 Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/b875917e214208f022c6a8a84e4c694559…
commit: b875917e214208f022c6a8a84e4c6945593ea7e2
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-03T21:20:30+02:00
summary:
[3.13] gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters` (GH-127876) (#128458)
gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters`` (GH-127876)
(cherry picked from commit 46cb6340d7bad955edfc0a20f6a52dabc03b0932)
Co-authored-by: Alexander Shadchin <shadchin(a)yandex-team.com>
files:
A Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst
M Lib/test/test_str.py
M Objects/unicodeobject.c
diff --git a/Lib/test/test_str.py b/Lib/test/test_str.py
index a4c92a66aa1eb5..c4f59224a6fe6f 100644
--- a/Lib/test/test_str.py
+++ b/Lib/test/test_str.py
@@ -7,6 +7,7 @@
"""
import _string
import codecs
+import datetime
import itertools
import operator
import pickle
@@ -1908,6 +1909,12 @@ def test_utf8_decode_invalid_sequences(self):
self.assertRaises(UnicodeDecodeError,
(b'\xF4'+cb+b'\xBF\xBF').decode, 'utf-8')
+ def test_issue127903(self):
+ # gh-127903: ``_copy_characters`` crashes on DEBUG builds when
+ # there is nothing to copy.
+ d = datetime.datetime(2013, 11, 10, 14, 20, 59)
+ self.assertEqual(d.strftime('%z'), '')
+
def test_issue8271(self):
# Issue #8271: during the decoding of an invalid UTF-8 byte sequence,
# only the start byte and the continuation byte(s) are now considered
diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst
new file mode 100644
index 00000000000000..ad479b52d1675c
--- /dev/null
+++ b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst
@@ -0,0 +1,2 @@
+``Objects/unicodeobject.c``: fix a crash on DEBUG builds in ``_copy_characters``
+when there is nothing to copy.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 7e61d615418722..434cb5ffb61c0e 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1495,11 +1495,14 @@ _copy_characters(PyObject *to, Py_ssize_t to_start,
assert(PyUnicode_Check(from));
assert(from_start + how_many <= PyUnicode_GET_LENGTH(from));
- assert(PyUnicode_Check(to));
- assert(to_start + how_many <= PyUnicode_GET_LENGTH(to));
+ assert(to == NULL || PyUnicode_Check(to));
- if (how_many == 0)
+ if (how_many == 0) {
return 0;
+ }
+
+ assert(to != NULL);
+ assert(to_start + how_many <= PyUnicode_GET_LENGTH(to));
from_kind = PyUnicode_KIND(from);
from_data = PyUnicode_DATA(from);
1
0
gh-128400: Only show the current thread in `faulthandler` if the GIL is disabled (GH-128425)
by colesbury Jan. 3, 2025
by colesbury Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/befcfdfdaba15ecae38739ecabebd8046c…
commit: befcfdfdaba15ecae38739ecabebd8046c1b1977
branch: main
author: Peter Bierma <zintensitydev(a)gmail.com>
committer: colesbury <colesbury(a)gmail.com>
date: 2025-01-03T14:14:57-05:00
summary:
gh-128400: Only show the current thread in `faulthandler` if the GIL is disabled (GH-128425)
files:
A Misc/NEWS.d/next/Library/2025-01-02-15-20-17.gh-issue-128400.UMiG4f.rst
M Doc/library/faulthandler.rst
M Lib/test/test_faulthandler.py
M Modules/faulthandler.c
diff --git a/Doc/library/faulthandler.rst b/Doc/library/faulthandler.rst
index 4067d7912b88b2..b81da4af3cff58 100644
--- a/Doc/library/faulthandler.rst
+++ b/Doc/library/faulthandler.rst
@@ -91,6 +91,10 @@ Fault handler state
The dump now mentions if a garbage collector collection is running
if *all_threads* is true.
+ .. versionchanged:: next
+ Only the current thread is dumped if the :term:`GIL` is disabled to
+ prevent the risk of data races.
+
.. function:: disable()
Disable the fault handler: uninstall the signal handlers installed by
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index fd56dee5d842ac..2088793cbb9387 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -100,7 +100,12 @@ def check_error(self, code, lineno, fatal_error, *,
Raise an error if the output doesn't match the expected format.
"""
- if all_threads:
+ all_threads_disabled = (
+ (not py_fatal_error)
+ and all_threads
+ and (not sys._is_gil_enabled())
+ )
+ if all_threads and not all_threads_disabled:
if know_current_thread:
header = 'Current thread 0x[0-9a-f]+'
else:
@@ -111,8 +116,10 @@ def check_error(self, code, lineno, fatal_error, *,
if py_fatal_error:
regex.append("Python runtime state: initialized")
regex.append('')
+ if all_threads_disabled:
+ regex.append("<Cannot show all threads while the GIL is disabled>")
regex.append(fr'{header} \(most recent call first\):')
- if garbage_collecting:
+ if garbage_collecting and not all_threads_disabled:
regex.append(' Garbage-collecting')
regex.append(fr' File "<string>", line {lineno} in {function}')
regex = '\n'.join(regex)
diff --git a/Misc/NEWS.d/next/Library/2025-01-02-15-20-17.gh-issue-128400.UMiG4f.rst b/Misc/NEWS.d/next/Library/2025-01-02-15-20-17.gh-issue-128400.UMiG4f.rst
new file mode 100644
index 00000000000000..f9d5f84224c8dc
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-01-02-15-20-17.gh-issue-128400.UMiG4f.rst
@@ -0,0 +1,2 @@
+Only show the current thread in :mod:`faulthandler` on the :term:`free
+threaded <free threading>` build to prevent races.
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 2d16028a5232d0..b44b964b29484b 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1,4 +1,5 @@
#include "Python.h"
+#include "pycore_ceval.h" // _PyEval_IsGILEnabled
#include "pycore_initconfig.h" // _PyStatus_ERR
#include "pycore_pyerrors.h" // _Py_DumpExtensionModules
#include "pycore_pystate.h" // _PyThreadState_GET()
@@ -27,6 +28,8 @@
# include <sys/auxv.h> // getauxval()
#endif
+/* Sentinel to ignore all_threads on free-threading */
+#define FT_IGNORE_ALL_THREADS 2
/* Allocate at maximum 100 MiB of the stack to raise the stack overflow */
#define STACK_OVERFLOW_MAX_SIZE (100 * 1024 * 1024)
@@ -201,10 +204,13 @@ faulthandler_dump_traceback(int fd, int all_threads,
PyGILState_GetThisThreadState(). */
PyThreadState *tstate = PyGILState_GetThisThreadState();
- if (all_threads) {
+ if (all_threads == 1) {
(void)_Py_DumpTracebackThreads(fd, NULL, tstate);
}
else {
+ if (all_threads == FT_IGNORE_ALL_THREADS) {
+ PUTS(fd, "<Cannot show all threads while the GIL is disabled>\n");
+ }
if (tstate != NULL)
_Py_DumpTraceback(fd, tstate);
}
@@ -271,6 +277,27 @@ faulthandler_disable_fatal_handler(fault_handler_t *handler)
#endif
}
+static int
+deduce_all_threads(void)
+{
+#ifndef Py_GIL_DISABLED
+ return fatal_error.all_threads;
+#else
+ if (fatal_error.all_threads == 0) {
+ return 0;
+ }
+ // We can't use _PyThreadState_GET, so use the stored GILstate one
+ PyThreadState *tstate = PyGILState_GetThisThreadState();
+ if (tstate == NULL) {
+ return 0;
+ }
+
+ /* In theory, it's safe to dump all threads if the GIL is enabled */
+ return _PyEval_IsGILEnabled(tstate)
+ ? fatal_error.all_threads
+ : FT_IGNORE_ALL_THREADS;
+#endif
+}
/* Handler for SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL signals.
@@ -325,7 +352,7 @@ faulthandler_fatal_error(int signum)
PUTS(fd, "\n\n");
}
- faulthandler_dump_traceback(fd, fatal_error.all_threads,
+ faulthandler_dump_traceback(fd, deduce_all_threads(),
fatal_error.interp);
_Py_DumpExtensionModules(fd, fatal_error.interp);
@@ -401,7 +428,7 @@ faulthandler_exc_handler(struct _EXCEPTION_POINTERS *exc_info)
}
}
- faulthandler_dump_traceback(fd, fatal_error.all_threads,
+ faulthandler_dump_traceback(fd, deduce_all_threads(),
fatal_error.interp);
/* call the next exception handler */
1
0
gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters`` (#127876)
by Eclips4 Jan. 3, 2025
by Eclips4 Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/46cb6340d7bad955edfc0a20f6a52dabc0…
commit: 46cb6340d7bad955edfc0a20f6a52dabc03b0932
branch: main
author: Alexander Shadchin <shadchin(a)yandex-team.com>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-03T18:47:58Z
summary:
gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters`` (#127876)
files:
A Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst
M Lib/test/test_str.py
M Objects/unicodeobject.c
diff --git a/Lib/test/test_str.py b/Lib/test/test_str.py
index 4de6c1cba152bd..d1c9542c7d1317 100644
--- a/Lib/test/test_str.py
+++ b/Lib/test/test_str.py
@@ -7,6 +7,7 @@
"""
import _string
import codecs
+import datetime
import itertools
import operator
import pickle
@@ -1908,6 +1909,12 @@ def test_utf8_decode_invalid_sequences(self):
self.assertRaises(UnicodeDecodeError,
(b'\xF4'+cb+b'\xBF\xBF').decode, 'utf-8')
+ def test_issue127903(self):
+ # gh-127903: ``_copy_characters`` crashes on DEBUG builds when
+ # there is nothing to copy.
+ d = datetime.datetime(2013, 11, 10, 14, 20, 59)
+ self.assertEqual(d.strftime('%z'), '')
+
def test_issue8271(self):
# Issue #8271: during the decoding of an invalid UTF-8 byte sequence,
# only the start byte and the continuation byte(s) are now considered
diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst
new file mode 100644
index 00000000000000..ad479b52d1675c
--- /dev/null
+++ b/Misc/NEWS.d/next/Core_and_Builtins/2024-12-13-14-17-24.gh-issue-127903.vemHSl.rst
@@ -0,0 +1,2 @@
+``Objects/unicodeobject.c``: fix a crash on DEBUG builds in ``_copy_characters``
+when there is nothing to copy.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 9f0a4d4785eda6..5e532ce0f348c4 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1463,11 +1463,14 @@ _copy_characters(PyObject *to, Py_ssize_t to_start,
assert(PyUnicode_Check(from));
assert(from_start + how_many <= PyUnicode_GET_LENGTH(from));
- assert(PyUnicode_Check(to));
- assert(to_start + how_many <= PyUnicode_GET_LENGTH(to));
+ assert(to == NULL || PyUnicode_Check(to));
- if (how_many == 0)
+ if (how_many == 0) {
return 0;
+ }
+
+ assert(to != NULL);
+ assert(to_start + how_many <= PyUnicode_GET_LENGTH(to));
from_kind = PyUnicode_KIND(from);
from_data = PyUnicode_DATA(from);
1
0
https://github.com/python/cpython/commit/4c14f03495724f2c52de2d34f1bfa35dd9…
commit: 4c14f03495724f2c52de2d34f1bfa35dd94757c0
branch: main
author: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
committer: encukou <encukou(a)gmail.com>
date: 2025-01-03T15:51:22+01:00
summary:
gh-89083: improve UUIDv8 uniqueness tests (GH-128149)
improve UUIDv8 uniqueness tests
files:
M Lib/test/test_uuid.py
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py
index 7bd26a8ca34b62..8f40dd97f42fdc 100755
--- a/Lib/test/test_uuid.py
+++ b/Lib/test/test_uuid.py
@@ -707,12 +707,16 @@ def test_uuid8(self):
equal(u.int & 0x3fffffffffffffff, lo)
def test_uuid8_uniqueness(self):
- # Test that UUIDv8-generated values are unique
- # (up to a negligible probability of failure).
- u1 = self.uuid.uuid8()
- u2 = self.uuid.uuid8()
- self.assertNotEqual(u1.int, u2.int)
- self.assertEqual(u1.version, u2.version)
+ # Test that UUIDv8-generated values are unique (up to a negligible
+ # probability of failure). There are 122 bits of entropy and assuming
+ # that the underlying mt-19937-based random generator is sufficiently
+ # good, it is unlikely to have a collision of two UUIDs.
+ N = 1000
+ uuids = {self.uuid.uuid8() for _ in range(N)}
+ self.assertEqual(len(uuids), N)
+
+ versions = {u.version for u in uuids}
+ self.assertSetEqual(versions, {8})
@support.requires_fork()
def testIssue8621(self):
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/1c9b0204796ddeaee710646871a4404b4c…
commit: 1c9b0204796ddeaee710646871a4404b4cda1f1b
branch: main
author: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
committer: encukou <encukou(a)gmail.com>
date: 2025-01-03T15:36:41+01:00
summary:
gh-111178: fix UBSan failures in `Modules/zlibmodule.c` (GH-128252)
files:
M Modules/zlibmodule.c
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index 78dcce73cdaade..b90665ae7ef64a 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -221,6 +221,8 @@ typedef struct
PyThread_type_lock lock;
} compobject;
+#define _compobject_CAST(op) ((compobject *)op)
+
static void
zlib_error(zlibstate *state, z_stream zst, int err, const char *msg)
{
@@ -706,7 +708,7 @@ zlib_decompressobj_impl(PyObject *module, int wbits, PyObject *zdict)
static void
Dealloc(compobject *self)
{
- PyObject *type = (PyObject *)Py_TYPE(self);
+ PyTypeObject *type = Py_TYPE(self);
PyThread_free_lock(self->lock);
Py_XDECREF(self->unused_data);
Py_XDECREF(self->unconsumed_tail);
@@ -716,18 +718,20 @@ Dealloc(compobject *self)
}
static void
-Comp_dealloc(compobject *self)
+Comp_dealloc(PyObject *op)
{
+ compobject *self = _compobject_CAST(op);
if (self->is_initialised)
- deflateEnd(&self->zst);
+ (void)deflateEnd(&self->zst);
Dealloc(self);
}
static void
-Decomp_dealloc(compobject *self)
+Decomp_dealloc(PyObject *op)
{
+ compobject *self = _compobject_CAST(op);
if (self->is_initialised)
- inflateEnd(&self->zst);
+ (void)inflateEnd(&self->zst);
Dealloc(self);
}
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/56430320536a753236aadde59984c3c8f8…
commit: 56430320536a753236aadde59984c3c8f8777aa2
branch: main
author: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
committer: encukou <encukou(a)gmail.com>
date: 2025-01-03T15:35:05+01:00
summary:
gh-111178: fix UBSan failures in `Objects/tupleobject.c` (GH-128251)
fix UBSan failures for `_PyTupleIterObject`
files:
M Objects/tupleobject.c
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 49977726eadca9..002002eb455556 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -988,26 +988,29 @@ _PyTuple_Resize(PyObject **pv, Py_ssize_t newsize)
/*********************** Tuple Iterator **************************/
+#define _PyTupleIterObject_CAST(op) ((_PyTupleIterObject *)(op))
static void
-tupleiter_dealloc(_PyTupleIterObject *it)
+tupleiter_dealloc(PyObject *self)
{
+ _PyTupleIterObject *it = _PyTupleIterObject_CAST(self);
_PyObject_GC_UNTRACK(it);
Py_XDECREF(it->it_seq);
PyObject_GC_Del(it);
}
static int
-tupleiter_traverse(_PyTupleIterObject *it, visitproc visit, void *arg)
+tupleiter_traverse(PyObject *self, visitproc visit, void *arg)
{
+ _PyTupleIterObject *it = _PyTupleIterObject_CAST(self);
Py_VISIT(it->it_seq);
return 0;
}
static PyObject *
-tupleiter_next(PyObject *obj)
+tupleiter_next(PyObject *self)
{
- _PyTupleIterObject *it = (_PyTupleIterObject *)obj;
+ _PyTupleIterObject *it = _PyTupleIterObject_CAST(self);
PyTupleObject *seq;
PyObject *item;
@@ -1029,8 +1032,9 @@ tupleiter_next(PyObject *obj)
}
static PyObject *
-tupleiter_len(_PyTupleIterObject *it, PyObject *Py_UNUSED(ignored))
+tupleiter_len(PyObject *self, PyObject *Py_UNUSED(ignored))
{
+ _PyTupleIterObject *it = _PyTupleIterObject_CAST(self);
Py_ssize_t len = 0;
if (it->it_seq)
len = PyTuple_GET_SIZE(it->it_seq) - it->it_index;
@@ -1040,13 +1044,14 @@ tupleiter_len(_PyTupleIterObject *it, PyObject *Py_UNUSED(ignored))
PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
static PyObject *
-tupleiter_reduce(_PyTupleIterObject *it, PyObject *Py_UNUSED(ignored))
+tupleiter_reduce(PyObject *self, PyObject *Py_UNUSED(ignored))
{
PyObject *iter = _PyEval_GetBuiltin(&_Py_ID(iter));
/* _PyEval_GetBuiltin can invoke arbitrary code,
* call must be before access of iterator pointers.
* see issue #101765 */
+ _PyTupleIterObject *it = _PyTupleIterObject_CAST(self);
if (it->it_seq)
return Py_BuildValue("N(O)n", iter, it->it_seq, it->it_index);
@@ -1055,8 +1060,9 @@ tupleiter_reduce(_PyTupleIterObject *it, PyObject *Py_UNUSED(ignored))
}
static PyObject *
-tupleiter_setstate(_PyTupleIterObject *it, PyObject *state)
+tupleiter_setstate(PyObject *self, PyObject *state)
{
+ _PyTupleIterObject *it = _PyTupleIterObject_CAST(self);
Py_ssize_t index = PyLong_AsSsize_t(state);
if (index == -1 && PyErr_Occurred())
return NULL;
@@ -1074,19 +1080,19 @@ PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
PyDoc_STRVAR(setstate_doc, "Set state information for unpickling.");
static PyMethodDef tupleiter_methods[] = {
- {"__length_hint__", (PyCFunction)tupleiter_len, METH_NOARGS, length_hint_doc},
- {"__reduce__", (PyCFunction)tupleiter_reduce, METH_NOARGS, reduce_doc},
- {"__setstate__", (PyCFunction)tupleiter_setstate, METH_O, setstate_doc},
- {NULL, NULL} /* sentinel */
+ {"__length_hint__", tupleiter_len, METH_NOARGS, length_hint_doc},
+ {"__reduce__", tupleiter_reduce, METH_NOARGS, reduce_doc},
+ {"__setstate__", tupleiter_setstate, METH_O, setstate_doc},
+ {NULL, NULL, 0, NULL} /* sentinel */
};
PyTypeObject PyTupleIter_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"tuple_iterator", /* tp_name */
- sizeof(_PyTupleIterObject), /* tp_basicsize */
+ sizeof(_PyTupleIterObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
- (destructor)tupleiter_dealloc, /* tp_dealloc */
+ tupleiter_dealloc, /* tp_dealloc */
0, /* tp_vectorcall_offset */
0, /* tp_getattr */
0, /* tp_setattr */
@@ -1103,7 +1109,7 @@ PyTypeObject PyTupleIter_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
0, /* tp_doc */
- (traverseproc)tupleiter_traverse, /* tp_traverse */
+ tupleiter_traverse, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/aad5ba4b6aafd3599d1737c3040b171916…
commit: aad5ba4b6aafd3599d1737c3040b1719165e6e52
branch: main
author: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
committer: encukou <encukou(a)gmail.com>
date: 2025-01-03T15:29:41+01:00
summary:
gh-111178: fix UBSan failures in `Objects/enumobject.c` (GH-128246)
* fix UBSan failures for `enumobject`
* fix UBSan failures for `reversedobject`
files:
M Objects/enumobject.c
diff --git a/Objects/enumobject.c b/Objects/enumobject.c
index 556666779d8522..eb8952675269a2 100644
--- a/Objects/enumobject.c
+++ b/Objects/enumobject.c
@@ -23,6 +23,7 @@ typedef struct {
PyObject* one; /* borrowed reference */
} enumobject;
+#define _enumobject_CAST(op) ((enumobject *)(op))
/*[clinic input]
@classmethod
@@ -150,8 +151,9 @@ enumerate_vectorcall(PyObject *type, PyObject *const *args,
}
static void
-enum_dealloc(enumobject *en)
+enum_dealloc(PyObject *op)
{
+ enumobject *en = _enumobject_CAST(op);
PyObject_GC_UnTrack(en);
Py_XDECREF(en->en_sit);
Py_XDECREF(en->en_result);
@@ -160,8 +162,9 @@ enum_dealloc(enumobject *en)
}
static int
-enum_traverse(enumobject *en, visitproc visit, void *arg)
+enum_traverse(PyObject *op, visitproc visit, void *arg)
{
+ enumobject *en = _enumobject_CAST(op);
Py_VISIT(en->en_sit);
Py_VISIT(en->en_result);
Py_VISIT(en->en_longindex);
@@ -220,8 +223,9 @@ enum_next_long(enumobject *en, PyObject* next_item)
}
static PyObject *
-enum_next(enumobject *en)
+enum_next(PyObject *op)
{
+ enumobject *en = _enumobject_CAST(op);
PyObject *next_index;
PyObject *next_item;
PyObject *result = en->en_result;
@@ -270,8 +274,9 @@ enum_next(enumobject *en)
}
static PyObject *
-enum_reduce(enumobject *en, PyObject *Py_UNUSED(ignored))
+enum_reduce(PyObject *op, PyObject *Py_UNUSED(ignored))
{
+ enumobject *en = _enumobject_CAST(op);
if (en->en_longindex != NULL)
return Py_BuildValue("O(OO)", Py_TYPE(en), en->en_sit, en->en_longindex);
else
@@ -281,7 +286,7 @@ enum_reduce(enumobject *en, PyObject *Py_UNUSED(ignored))
PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
static PyMethodDef enum_methods[] = {
- {"__reduce__", (PyCFunction)enum_reduce, METH_NOARGS, reduce_doc},
+ {"__reduce__", enum_reduce, METH_NOARGS, reduce_doc},
{"__class_getitem__", Py_GenericAlias,
METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
{NULL, NULL} /* sentinel */
@@ -293,7 +298,7 @@ PyTypeObject PyEnum_Type = {
sizeof(enumobject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
- (destructor)enum_dealloc, /* tp_dealloc */
+ enum_dealloc, /* tp_dealloc */
0, /* tp_vectorcall_offset */
0, /* tp_getattr */
0, /* tp_setattr */
@@ -311,12 +316,12 @@ PyTypeObject PyEnum_Type = {
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
Py_TPFLAGS_BASETYPE, /* tp_flags */
enum_new__doc__, /* tp_doc */
- (traverseproc)enum_traverse, /* tp_traverse */
+ enum_traverse, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
PyObject_SelfIter, /* tp_iter */
- (iternextfunc)enum_next, /* tp_iternext */
+ enum_next, /* tp_iternext */
enum_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
@@ -329,7 +334,7 @@ PyTypeObject PyEnum_Type = {
PyType_GenericAlloc, /* tp_alloc */
enum_new, /* tp_new */
PyObject_GC_Del, /* tp_free */
- .tp_vectorcall = (vectorcallfunc)enumerate_vectorcall
+ .tp_vectorcall = enumerate_vectorcall
};
/* Reversed Object ***************************************************************/
@@ -340,6 +345,8 @@ typedef struct {
PyObject* seq;
} reversedobject;
+#define _reversedobject_CAST(op) ((reversedobject *)(op))
+
/*[clinic input]
@classmethod
reversed.__new__ as reversed_new
@@ -411,23 +418,26 @@ reversed_vectorcall(PyObject *type, PyObject * const*args,
}
static void
-reversed_dealloc(reversedobject *ro)
+reversed_dealloc(PyObject *op)
{
+ reversedobject *ro = _reversedobject_CAST(op);
PyObject_GC_UnTrack(ro);
Py_XDECREF(ro->seq);
Py_TYPE(ro)->tp_free(ro);
}
static int
-reversed_traverse(reversedobject *ro, visitproc visit, void *arg)
+reversed_traverse(PyObject *op, visitproc visit, void *arg)
{
+ reversedobject *ro = _reversedobject_CAST(op);
Py_VISIT(ro->seq);
return 0;
}
static PyObject *
-reversed_next(reversedobject *ro)
+reversed_next(PyObject *op)
{
+ reversedobject *ro = _reversedobject_CAST(op);
PyObject *item;
Py_ssize_t index = ro->index;
@@ -447,8 +457,9 @@ reversed_next(reversedobject *ro)
}
static PyObject *
-reversed_len(reversedobject *ro, PyObject *Py_UNUSED(ignored))
+reversed_len(PyObject *op, PyObject *Py_UNUSED(ignored))
{
+ reversedobject *ro = _reversedobject_CAST(op);
Py_ssize_t position, seqsize;
if (ro->seq == NULL)
@@ -463,8 +474,9 @@ reversed_len(reversedobject *ro, PyObject *Py_UNUSED(ignored))
PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");
static PyObject *
-reversed_reduce(reversedobject *ro, PyObject *Py_UNUSED(ignored))
+reversed_reduce(PyObject *op, PyObject *Py_UNUSED(ignored))
{
+ reversedobject *ro = _reversedobject_CAST(op);
if (ro->seq)
return Py_BuildValue("O(O)n", Py_TYPE(ro), ro->seq, ro->index);
else
@@ -472,8 +484,9 @@ reversed_reduce(reversedobject *ro, PyObject *Py_UNUSED(ignored))
}
static PyObject *
-reversed_setstate(reversedobject *ro, PyObject *state)
+reversed_setstate(PyObject *op, PyObject *state)
{
+ reversedobject *ro = _reversedobject_CAST(op);
Py_ssize_t index = PyLong_AsSsize_t(state);
if (index == -1 && PyErr_Occurred())
return NULL;
@@ -493,9 +506,9 @@ reversed_setstate(reversedobject *ro, PyObject *state)
PyDoc_STRVAR(setstate_doc, "Set state information for unpickling.");
static PyMethodDef reversediter_methods[] = {
- {"__length_hint__", (PyCFunction)reversed_len, METH_NOARGS, length_hint_doc},
- {"__reduce__", (PyCFunction)reversed_reduce, METH_NOARGS, reduce_doc},
- {"__setstate__", (PyCFunction)reversed_setstate, METH_O, setstate_doc},
+ {"__length_hint__", reversed_len, METH_NOARGS, length_hint_doc},
+ {"__reduce__", reversed_reduce, METH_NOARGS, reduce_doc},
+ {"__setstate__", reversed_setstate, METH_O, setstate_doc},
{NULL, NULL} /* sentinel */
};
@@ -505,7 +518,7 @@ PyTypeObject PyReversed_Type = {
sizeof(reversedobject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
- (destructor)reversed_dealloc, /* tp_dealloc */
+ reversed_dealloc, /* tp_dealloc */
0, /* tp_vectorcall_offset */
0, /* tp_getattr */
0, /* tp_setattr */
@@ -523,12 +536,12 @@ PyTypeObject PyReversed_Type = {
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
Py_TPFLAGS_BASETYPE, /* tp_flags */
reversed_new__doc__, /* tp_doc */
- (traverseproc)reversed_traverse,/* tp_traverse */
+ reversed_traverse, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
PyObject_SelfIter, /* tp_iter */
- (iternextfunc)reversed_next, /* tp_iternext */
+ reversed_next, /* tp_iternext */
reversediter_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
@@ -541,5 +554,5 @@ PyTypeObject PyReversed_Type = {
PyType_GenericAlloc, /* tp_alloc */
reversed_new, /* tp_new */
PyObject_GC_Del, /* tp_free */
- .tp_vectorcall = (vectorcallfunc)reversed_vectorcall,
+ .tp_vectorcall = reversed_vectorcall,
};
1
0
[3.12] gh-125674: Doc: Fix type of newfunc first parameter (GH-125675) (#128448)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/d9e199b491a01bfefab3fd61f6de18f4d2…
commit: d9e199b491a01bfefab3fd61f6de18f4d2fcaeb8
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-03T14:13:18Z
summary:
[3.12] gh-125674: Doc: Fix type of newfunc first parameter (GH-125675) (#128448)
(cherry picked from commit 616468b87bc5bcf5a4db688637ef748e1243db8a)
Co-authored-by: Richard Hansen <rhansen(a)rhansen.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra(a)gmail.com>
files:
M Doc/c-api/typeobj.rst
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index 9fc3d358371b17..3d27784d4fe21b 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -355,7 +355,7 @@ slot typedefs
+-----------------------------+-----------------------------+----------------------+
| :c:type:`newfunc` | .. line-block:: | :c:type:`PyObject` * |
| | | |
-| | :c:type:`PyObject` * | |
+| | :c:type:`PyTypeObject` * | |
| | :c:type:`PyObject` * | |
| | :c:type:`PyObject` * | |
+-----------------------------+-----------------------------+----------------------+
@@ -2610,7 +2610,7 @@ Slot Type typedefs
See :c:member:`~PyTypeObject.tp_free`.
-.. c:type:: PyObject *(*newfunc)(PyObject *, PyObject *, PyObject *)
+.. c:type:: PyObject *(*newfunc)(PyTypeObject *, PyObject *, PyObject *)
See :c:member:`~PyTypeObject.tp_new`.
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/621d4ff35ec099c1626f77955318c0bc1f…
commit: 621d4ff35ec099c1626f77955318c0bc1febc33d
branch: main
author: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
committer: encukou <encukou(a)gmail.com>
date: 2025-01-03T15:12:40+01:00
summary:
gh-111178: fix UBSan failures in `Modules/curses*.c` (GH-128244)
* fix UBSan failures in `_cursesmodule.c`
* fix UBSan failures in `_curses_panel.c`
* suppress an unused return value
files:
M Modules/_curses_panel.c
M Modules/_cursesmodule.c
diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c
index bbbb62c9066df0..eecf7a1c8a1e56 100644
--- a/Modules/_curses_panel.c
+++ b/Modules/_curses_panel.c
@@ -62,7 +62,7 @@ _curses_panel_traverse(PyObject *mod, visitproc visit, void *arg)
static void
_curses_panel_free(void *mod)
{
- _curses_panel_clear((PyObject *) mod);
+ (void)_curses_panel_clear((PyObject *)mod);
}
/* Utility Functions */
@@ -101,6 +101,8 @@ typedef struct {
PyCursesWindowObject *wo; /* for reference counts */
} PyCursesPanelObject;
+#define _PyCursesPanelObject_CAST(op) ((PyCursesPanelObject *)(op))
+
/* Some helper functions. The problem is that there's always a window
associated with a panel. To ensure that Python's GC doesn't pull
this window from under our feet we need to keep track of references
@@ -277,9 +279,10 @@ PyCursesPanel_New(_curses_panel_state *state, PANEL *pan,
}
static void
-PyCursesPanel_Dealloc(PyCursesPanelObject *po)
+PyCursesPanel_Dealloc(PyObject *self)
{
PyObject *tp, *obj;
+ PyCursesPanelObject *po = _PyCursesPanelObject_CAST(self);
tp = (PyObject *) Py_TYPE(po);
obj = (PyObject *) panel_userptr(po->pan);
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 92961af381b9cb..c6835738348ff9 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -187,6 +187,8 @@ get_cursesmodule_state_by_win(PyCursesWindowObject *win)
return get_cursesmodule_state_by_cls(Py_TYPE(win));
}
+#define _PyCursesWindowObject_CAST(op) ((PyCursesWindowObject *)(op))
+
/*[clinic input]
module _curses
class _curses.window "PyCursesWindowObject *" "clinic_state()->window_type"
@@ -654,53 +656,80 @@ class component_converter(CConverter):
PARSESTR - format string for argument parsing
*/
-#define Window_NoArgNoReturnFunction(X) \
- static PyObject *PyCursesWindow_ ## X \
- (PyCursesWindowObject *self, PyObject *Py_UNUSED(ignored)) \
- { return PyCursesCheckERR_ForWin(self, X(self->win), # X); }
+#define Window_NoArgNoReturnFunction(X) \
+ static PyObject *PyCursesWindow_ ## X \
+ (PyObject *op, PyObject *Py_UNUSED(ignored)) \
+ { \
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op); \
+ int code = X(self->win); \
+ return PyCursesCheckERR_ForWin(self, code, # X); \
+ }
#define Window_NoArgTrueFalseFunction(X) \
static PyObject * PyCursesWindow_ ## X \
- (PyCursesWindowObject *self, PyObject *Py_UNUSED(ignored)) \
+ (PyObject *op, PyObject *Py_UNUSED(ignored)) \
{ \
- return PyBool_FromLong(X(self->win)); }
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op); \
+ return PyBool_FromLong(X(self->win)); \
+ }
-#define Window_NoArgNoReturnVoidFunction(X) \
- static PyObject * PyCursesWindow_ ## X \
- (PyCursesWindowObject *self, PyObject *Py_UNUSED(ignored)) \
- { \
- X(self->win); Py_RETURN_NONE; }
+#define Window_NoArgNoReturnVoidFunction(X) \
+ static PyObject * PyCursesWindow_ ## X \
+ (PyObject *op, PyObject *Py_UNUSED(ignored)) \
+ { \
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op); \
+ X(self->win); \
+ Py_RETURN_NONE; \
+ }
#define Window_NoArg2TupleReturnFunction(X, TYPE, ERGSTR) \
static PyObject * PyCursesWindow_ ## X \
- (PyCursesWindowObject *self, PyObject *Py_UNUSED(ignored)) \
+ (PyObject *op, PyObject *Py_UNUSED(ignored)) \
{ \
TYPE arg1, arg2; \
- X(self->win,arg1,arg2); return Py_BuildValue(ERGSTR, arg1, arg2); }
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op); \
+ X(self->win, arg1, arg2); \
+ return Py_BuildValue(ERGSTR, arg1, arg2); \
+ }
#define Window_OneArgNoReturnVoidFunction(X, TYPE, PARSESTR) \
static PyObject * PyCursesWindow_ ## X \
- (PyCursesWindowObject *self, PyObject *args) \
+ (PyObject *op, PyObject *args) \
{ \
TYPE arg1; \
- if (!PyArg_ParseTuple(args, PARSESTR, &arg1)) return NULL; \
- X(self->win,arg1); Py_RETURN_NONE; }
+ if (!PyArg_ParseTuple(args, PARSESTR, &arg1)) { \
+ return NULL; \
+ } \
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op); \
+ X(self->win, arg1); \
+ Py_RETURN_NONE; \
+ }
#define Window_OneArgNoReturnFunction(X, TYPE, PARSESTR) \
static PyObject * PyCursesWindow_ ## X \
- (PyCursesWindowObject *self, PyObject *args) \
+ (PyObject *op, PyObject *args) \
{ \
TYPE arg1; \
- if (!PyArg_ParseTuple(args,PARSESTR, &arg1)) return NULL; \
- return PyCursesCheckERR_ForWin(self, X(self->win, arg1), # X); }
+ if (!PyArg_ParseTuple(args, PARSESTR, &arg1)) { \
+ return NULL; \
+ } \
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op); \
+ int code = X(self->win, arg1); \
+ return PyCursesCheckERR_ForWin(self, code, # X); \
+ }
#define Window_TwoArgNoReturnFunction(X, TYPE, PARSESTR) \
static PyObject * PyCursesWindow_ ## X \
- (PyCursesWindowObject *self, PyObject *args) \
+ (PyObject *op, PyObject *args) \
{ \
TYPE arg1, arg2; \
- if (!PyArg_ParseTuple(args,PARSESTR, &arg1, &arg2)) return NULL; \
- return PyCursesCheckERR_ForWin(self, X(self->win, arg1, arg2), # X); }
+ if (!PyArg_ParseTuple(args,PARSESTR, &arg1, &arg2)) { \
+ return NULL; \
+ } \
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op); \
+ int code = X(self->win, arg1, arg2); \
+ return PyCursesCheckERR_ForWin(self, code, # X); \
+ }
/* ------------- WINDOW routines --------------- */
@@ -1302,8 +1331,10 @@ the touchline() method so that the contents will be redisplayed by the next
window refresh.
[-clinic start generated code]*/
static PyObject *
-PyCursesWindow_ChgAt(PyCursesWindowObject *self, PyObject *args)
+PyCursesWindow_ChgAt(PyObject *op, PyObject *args)
{
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op);
+
int rtn;
int x, y;
int num = -1;
@@ -1656,8 +1687,10 @@ Read a string from the user, with primitive line editing capacity.
[-clinic start generated code]*/
static PyObject *
-PyCursesWindow_GetStr(PyCursesWindowObject *self, PyObject *args)
+PyCursesWindow_GetStr(PyObject *op, PyObject *args)
{
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op);
+
int x, y, n;
char rtn[1024]; /* This should be big enough.. I hope */
int rtn2;
@@ -1860,8 +1893,10 @@ from the characters. If n is specified, instr() returns a string at most
n characters long (exclusive of the trailing NUL).
[-clinic start generated code]*/
static PyObject *
-PyCursesWindow_InStr(PyCursesWindowObject *self, PyObject *args)
+PyCursesWindow_InStr(PyObject *op, PyObject *args)
{
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op);
+
int x, y, n;
char rtn[1024]; /* This should be big enough.. I hope */
int rtn2;
@@ -2557,14 +2592,17 @@ _curses_window_vline_impl(PyCursesWindowObject *self, int group_left_1,
}
static PyObject *
-PyCursesWindow_get_encoding(PyCursesWindowObject *self, void *closure)
+PyCursesWindow_get_encoding(PyObject *op, void *closure)
{
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op);
return PyUnicode_FromString(self->encoding);
}
static int
-PyCursesWindow_set_encoding(PyCursesWindowObject *self, PyObject *value, void *Py_UNUSED(ignored))
+PyCursesWindow_set_encoding(PyObject *op, PyObject *value, void *Py_UNUSED(ignored))
{
+ PyCursesWindowObject *self = _PyCursesWindowObject_CAST(op);
+
PyObject *ascii;
char *encoding;
@@ -2607,88 +2645,90 @@ static PyMethodDef PyCursesWindow_methods[] = {
_CURSES_WINDOW_ATTRSET_METHODDEF
_CURSES_WINDOW_BKGD_METHODDEF
#ifdef HAVE_CURSES_WCHGAT
- {"chgat", (PyCFunction)PyCursesWindow_ChgAt, METH_VARARGS},
+ {"chgat", PyCursesWindow_ChgAt, METH_VARARGS},
#endif
_CURSES_WINDOW_BKGDSET_METHODDEF
_CURSES_WINDOW_BORDER_METHODDEF
_CURSES_WINDOW_BOX_METHODDEF
- {"clear", (PyCFunction)PyCursesWindow_wclear, METH_NOARGS},
- {"clearok", (PyCFunction)PyCursesWindow_clearok, METH_VARARGS},
- {"clrtobot", (PyCFunction)PyCursesWindow_wclrtobot, METH_NOARGS},
- {"clrtoeol", (PyCFunction)PyCursesWindow_wclrtoeol, METH_NOARGS},
- {"cursyncup", (PyCFunction)PyCursesWindow_wcursyncup, METH_NOARGS},
+ {"clear", PyCursesWindow_wclear, METH_NOARGS},
+ {"clearok", PyCursesWindow_clearok, METH_VARARGS},
+ {"clrtobot", PyCursesWindow_wclrtobot, METH_NOARGS},
+ {"clrtoeol", PyCursesWindow_wclrtoeol, METH_NOARGS},
+ {"cursyncup", PyCursesWindow_wcursyncup, METH_NOARGS},
_CURSES_WINDOW_DELCH_METHODDEF
- {"deleteln", (PyCFunction)PyCursesWindow_wdeleteln, METH_NOARGS},
+ {"deleteln", PyCursesWindow_wdeleteln, METH_NOARGS},
_CURSES_WINDOW_DERWIN_METHODDEF
_CURSES_WINDOW_ECHOCHAR_METHODDEF
_CURSES_WINDOW_ENCLOSE_METHODDEF
- {"erase", (PyCFunction)PyCursesWindow_werase, METH_NOARGS},
- {"getbegyx", (PyCFunction)PyCursesWindow_getbegyx, METH_NOARGS},
+ {"erase", PyCursesWindow_werase, METH_NOARGS},
+ {"getbegyx", PyCursesWindow_getbegyx, METH_NOARGS},
_CURSES_WINDOW_GETBKGD_METHODDEF
_CURSES_WINDOW_GETCH_METHODDEF
_CURSES_WINDOW_GETKEY_METHODDEF
_CURSES_WINDOW_GET_WCH_METHODDEF
- {"getmaxyx", (PyCFunction)PyCursesWindow_getmaxyx, METH_NOARGS},
- {"getparyx", (PyCFunction)PyCursesWindow_getparyx, METH_NOARGS},
- {"getstr", (PyCFunction)PyCursesWindow_GetStr, METH_VARARGS},
- {"getyx", (PyCFunction)PyCursesWindow_getyx, METH_NOARGS},
+ {"getmaxyx", PyCursesWindow_getmaxyx, METH_NOARGS},
+ {"getparyx", PyCursesWindow_getparyx, METH_NOARGS},
+ {"getstr", PyCursesWindow_GetStr, METH_VARARGS},
+ {"getyx", PyCursesWindow_getyx, METH_NOARGS},
_CURSES_WINDOW_HLINE_METHODDEF
- {"idcok", (PyCFunction)PyCursesWindow_idcok, METH_VARARGS},
- {"idlok", (PyCFunction)PyCursesWindow_idlok, METH_VARARGS},
+ {"idcok", PyCursesWindow_idcok, METH_VARARGS},
+ {"idlok", PyCursesWindow_idlok, METH_VARARGS},
#ifdef HAVE_CURSES_IMMEDOK
- {"immedok", (PyCFunction)PyCursesWindow_immedok, METH_VARARGS},
+ {"immedok", PyCursesWindow_immedok, METH_VARARGS},
#endif
_CURSES_WINDOW_INCH_METHODDEF
_CURSES_WINDOW_INSCH_METHODDEF
- {"insdelln", (PyCFunction)PyCursesWindow_winsdelln, METH_VARARGS},
- {"insertln", (PyCFunction)PyCursesWindow_winsertln, METH_NOARGS},
+ {"insdelln", PyCursesWindow_winsdelln, METH_VARARGS},
+ {"insertln", PyCursesWindow_winsertln, METH_NOARGS},
_CURSES_WINDOW_INSNSTR_METHODDEF
_CURSES_WINDOW_INSSTR_METHODDEF
- {"instr", (PyCFunction)PyCursesWindow_InStr, METH_VARARGS},
+ {"instr", PyCursesWindow_InStr, METH_VARARGS},
_CURSES_WINDOW_IS_LINETOUCHED_METHODDEF
- {"is_wintouched", (PyCFunction)PyCursesWindow_is_wintouched, METH_NOARGS},
- {"keypad", (PyCFunction)PyCursesWindow_keypad, METH_VARARGS},
- {"leaveok", (PyCFunction)PyCursesWindow_leaveok, METH_VARARGS},
- {"move", (PyCFunction)PyCursesWindow_wmove, METH_VARARGS},
- {"mvderwin", (PyCFunction)PyCursesWindow_mvderwin, METH_VARARGS},
- {"mvwin", (PyCFunction)PyCursesWindow_mvwin, METH_VARARGS},
- {"nodelay", (PyCFunction)PyCursesWindow_nodelay, METH_VARARGS},
- {"notimeout", (PyCFunction)PyCursesWindow_notimeout, METH_VARARGS},
+ {"is_wintouched", PyCursesWindow_is_wintouched, METH_NOARGS},
+ {"keypad", PyCursesWindow_keypad, METH_VARARGS},
+ {"leaveok", PyCursesWindow_leaveok, METH_VARARGS},
+ {"move", PyCursesWindow_wmove, METH_VARARGS},
+ {"mvderwin", PyCursesWindow_mvderwin, METH_VARARGS},
+ {"mvwin", PyCursesWindow_mvwin, METH_VARARGS},
+ {"nodelay", PyCursesWindow_nodelay, METH_VARARGS},
+ {"notimeout", PyCursesWindow_notimeout, METH_VARARGS},
_CURSES_WINDOW_NOUTREFRESH_METHODDEF
_CURSES_WINDOW_OVERLAY_METHODDEF
_CURSES_WINDOW_OVERWRITE_METHODDEF
_CURSES_WINDOW_PUTWIN_METHODDEF
_CURSES_WINDOW_REDRAWLN_METHODDEF
- {"redrawwin", (PyCFunction)PyCursesWindow_redrawwin, METH_NOARGS},
+ {"redrawwin", PyCursesWindow_redrawwin, METH_NOARGS},
_CURSES_WINDOW_REFRESH_METHODDEF
#ifndef STRICT_SYSV_CURSES
- {"resize", (PyCFunction)PyCursesWindow_wresize, METH_VARARGS},
+ {"resize", PyCursesWindow_wresize, METH_VARARGS},
#endif
_CURSES_WINDOW_SCROLL_METHODDEF
- {"scrollok", (PyCFunction)PyCursesWindow_scrollok, METH_VARARGS},
+ {"scrollok", PyCursesWindow_scrollok, METH_VARARGS},
_CURSES_WINDOW_SETSCRREG_METHODDEF
- {"standend", (PyCFunction)PyCursesWindow_wstandend, METH_NOARGS},
- {"standout", (PyCFunction)PyCursesWindow_wstandout, METH_NOARGS},
+ {"standend", PyCursesWindow_wstandend, METH_NOARGS},
+ {"standout", PyCursesWindow_wstandout, METH_NOARGS},
{"subpad", (PyCFunction)_curses_window_subwin, METH_VARARGS, _curses_window_subwin__doc__},
_CURSES_WINDOW_SUBWIN_METHODDEF
- {"syncdown", (PyCFunction)PyCursesWindow_wsyncdown, METH_NOARGS},
+ {"syncdown", PyCursesWindow_wsyncdown, METH_NOARGS},
#ifdef HAVE_CURSES_SYNCOK
- {"syncok", (PyCFunction)PyCursesWindow_syncok, METH_VARARGS},
+ {"syncok", PyCursesWindow_syncok, METH_VARARGS},
#endif
- {"syncup", (PyCFunction)PyCursesWindow_wsyncup, METH_NOARGS},
- {"timeout", (PyCFunction)PyCursesWindow_wtimeout, METH_VARARGS},
+ {"syncup", PyCursesWindow_wsyncup, METH_NOARGS},
+ {"timeout", PyCursesWindow_wtimeout, METH_VARARGS},
_CURSES_WINDOW_TOUCHLINE_METHODDEF
- {"touchwin", (PyCFunction)PyCursesWindow_touchwin, METH_NOARGS},
- {"untouchwin", (PyCFunction)PyCursesWindow_untouchwin, METH_NOARGS},
+ {"touchwin", PyCursesWindow_touchwin, METH_NOARGS},
+ {"untouchwin", PyCursesWindow_untouchwin, METH_NOARGS},
_CURSES_WINDOW_VLINE_METHODDEF
{NULL, NULL} /* sentinel */
};
static PyGetSetDef PyCursesWindow_getsets[] = {
- {"encoding",
- (getter)PyCursesWindow_get_encoding,
- (setter)PyCursesWindow_set_encoding,
- "the typecode character used to create the array"},
+ {
+ "encoding",
+ PyCursesWindow_get_encoding,
+ PyCursesWindow_set_encoding,
+ "the typecode character used to create the array"
+ },
{NULL, NULL, NULL, NULL } /* sentinel */
};
1
0
[3.13] gh-125674: Doc: Fix type of newfunc first parameter (GH-125675) (#128449)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/f8b24cdbb91b1905725ea58271519772c6…
commit: f8b24cdbb91b1905725ea58271519772c6a41d86
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-03T14:12:24Z
summary:
[3.13] gh-125674: Doc: Fix type of newfunc first parameter (GH-125675) (#128449)
(cherry picked from commit 616468b87bc5bcf5a4db688637ef748e1243db8a)
Co-authored-by: Richard Hansen <rhansen(a)rhansen.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra(a)gmail.com>
files:
M Doc/c-api/typeobj.rst
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index e5a718912e3cef..34dbc699fa1c20 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -355,7 +355,7 @@ slot typedefs
+-----------------------------+-----------------------------+----------------------+
| :c:type:`newfunc` | .. line-block:: | :c:type:`PyObject` * |
| | | |
-| | :c:type:`PyObject` * | |
+| | :c:type:`PyTypeObject` * | |
| | :c:type:`PyObject` * | |
| | :c:type:`PyObject` * | |
+-----------------------------+-----------------------------+----------------------+
@@ -2618,7 +2618,7 @@ Slot Type typedefs
See :c:member:`~PyTypeObject.tp_free`.
-.. c:type:: PyObject *(*newfunc)(PyObject *, PyObject *, PyObject *)
+.. c:type:: PyObject *(*newfunc)(PyTypeObject *, PyObject *, PyObject *)
See :c:member:`~PyTypeObject.tp_new`.
1
0
https://github.com/python/cpython/commit/8522f8bacb4e2db4b901472c254efad605…
commit: 8522f8bacb4e2db4b901472c254efad6057e9fd1
branch: main
author: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
committer: encukou <encukou(a)gmail.com>
date: 2025-01-03T15:04:33+01:00
summary:
gh-111178: fix UBSan failures in `Modules/_csv.c` (GH-128243)
Also: suppress unused return values
files:
M Modules/_csv.c
diff --git a/Modules/_csv.c b/Modules/_csv.c
index 1a4dc3f1f55ace..7ca30e39e00c0c 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -77,7 +77,7 @@ _csv_traverse(PyObject *module, visitproc visit, void *arg)
static void
_csv_free(void *module)
{
- _csv_clear((PyObject *)module);
+ (void)_csv_clear((PyObject *)module);
}
typedef enum {
@@ -151,6 +151,10 @@ typedef struct {
PyObject *error_obj; /* cached error object */
} WriterObj;
+#define _DialectObj_CAST(op) ((DialectObj *)(op))
+#define _ReaderObj_CAST(op) ((ReaderObj *)(op))
+#define _WriterObj_CAST(op) ((WriterObj *)(op))
+
/*
* DIALECT class
*/
@@ -176,32 +180,37 @@ get_char_or_None(Py_UCS4 c)
}
static PyObject *
-Dialect_get_lineterminator(DialectObj *self, void *Py_UNUSED(ignored))
+Dialect_get_lineterminator(PyObject *op, void *Py_UNUSED(ignored))
{
+ DialectObj *self = _DialectObj_CAST(op);
return Py_XNewRef(self->lineterminator);
}
static PyObject *
-Dialect_get_delimiter(DialectObj *self, void *Py_UNUSED(ignored))
+Dialect_get_delimiter(PyObject *op, void *Py_UNUSED(ignored))
{
+ DialectObj *self = _DialectObj_CAST(op);
return get_char_or_None(self->delimiter);
}
static PyObject *
-Dialect_get_escapechar(DialectObj *self, void *Py_UNUSED(ignored))
+Dialect_get_escapechar(PyObject *op, void *Py_UNUSED(ignored))
{
+ DialectObj *self = _DialectObj_CAST(op);
return get_char_or_None(self->escapechar);
}
static PyObject *
-Dialect_get_quotechar(DialectObj *self, void *Py_UNUSED(ignored))
+Dialect_get_quotechar(PyObject *op, void *Py_UNUSED(ignored))
{
+ DialectObj *self = _DialectObj_CAST(op);
return get_char_or_None(self->quotechar);
}
static PyObject *
-Dialect_get_quoting(DialectObj *self, void *Py_UNUSED(ignored))
+Dialect_get_quoting(PyObject *op, void *Py_UNUSED(ignored))
{
+ DialectObj *self = _DialectObj_CAST(op);
return PyLong_FromLong(self->quoting);
}
@@ -371,16 +380,16 @@ static struct PyMemberDef Dialect_memberlist[] = {
#undef D_OFF
static PyGetSetDef Dialect_getsetlist[] = {
- { "delimiter", (getter)Dialect_get_delimiter},
- { "escapechar", (getter)Dialect_get_escapechar},
- { "lineterminator", (getter)Dialect_get_lineterminator},
- { "quotechar", (getter)Dialect_get_quotechar},
- { "quoting", (getter)Dialect_get_quoting},
+ {"delimiter", Dialect_get_delimiter},
+ {"escapechar", Dialect_get_escapechar},
+ {"lineterminator", Dialect_get_lineterminator},
+ {"quotechar", Dialect_get_quotechar},
+ {"quoting", Dialect_get_quoting},
{NULL},
};
static void
-Dialect_dealloc(DialectObj *self)
+Dialect_dealloc(PyObject *self)
{
PyTypeObject *tp = Py_TYPE(self);
PyObject_GC_UnTrack(self);
@@ -594,15 +603,17 @@ PyDoc_STRVAR(Dialect_Type_doc,
"The Dialect type records CSV parsing and generation options.\n");
static int
-Dialect_clear(DialectObj *self)
+Dialect_clear(PyObject *op)
{
+ DialectObj *self = _DialectObj_CAST(op);
Py_CLEAR(self->lineterminator);
return 0;
}
static int
-Dialect_traverse(DialectObj *self, visitproc visit, void *arg)
+Dialect_traverse(PyObject *op, visitproc visit, void *arg)
{
+ DialectObj *self = _DialectObj_CAST(op);
Py_VISIT(self->lineterminator);
Py_VISIT(Py_TYPE(self));
return 0;
@@ -916,8 +927,10 @@ parse_reset(ReaderObj *self)
}
static PyObject *
-Reader_iternext(ReaderObj *self)
+Reader_iternext(PyObject *op)
{
+ ReaderObj *self = _ReaderObj_CAST(op);
+
PyObject *fields = NULL;
Py_UCS4 c;
Py_ssize_t pos, linelen;
@@ -982,11 +995,12 @@ Reader_iternext(ReaderObj *self)
}
static void
-Reader_dealloc(ReaderObj *self)
+Reader_dealloc(PyObject *op)
{
+ ReaderObj *self = _ReaderObj_CAST(op);
PyTypeObject *tp = Py_TYPE(self);
PyObject_GC_UnTrack(self);
- tp->tp_clear((PyObject *)self);
+ (void)tp->tp_clear(op);
if (self->field != NULL) {
PyMem_Free(self->field);
self->field = NULL;
@@ -996,8 +1010,9 @@ Reader_dealloc(ReaderObj *self)
}
static int
-Reader_traverse(ReaderObj *self, visitproc visit, void *arg)
+Reader_traverse(PyObject *op, visitproc visit, void *arg)
{
+ ReaderObj *self = _ReaderObj_CAST(op);
Py_VISIT(self->dialect);
Py_VISIT(self->input_iter);
Py_VISIT(self->fields);
@@ -1006,8 +1021,9 @@ Reader_traverse(ReaderObj *self, visitproc visit, void *arg)
}
static int
-Reader_clear(ReaderObj *self)
+Reader_clear(PyObject *op)
{
+ ReaderObj *self = _ReaderObj_CAST(op);
Py_CLEAR(self->dialect);
Py_CLEAR(self->input_iter);
Py_CLEAR(self->fields);
@@ -1303,8 +1319,9 @@ PyDoc_STRVAR(csv_writerow_doc,
"elements will be converted to string.");
static PyObject *
-csv_writerow(WriterObj *self, PyObject *seq)
+csv_writerow(PyObject *op, PyObject *seq)
{
+ WriterObj *self = _WriterObj_CAST(op);
DialectObj *dialect = self->dialect;
PyObject *iter, *field, *line, *result;
bool null_field = false;
@@ -1412,7 +1429,7 @@ PyDoc_STRVAR(csv_writerows_doc,
"elements will be converted to string.");
static PyObject *
-csv_writerows(WriterObj *self, PyObject *seqseq)
+csv_writerows(PyObject *self, PyObject *seqseq)
{
PyObject *row_iter, *row_obj, *result;
@@ -1437,9 +1454,9 @@ csv_writerows(WriterObj *self, PyObject *seqseq)
}
static struct PyMethodDef Writer_methods[] = {
- { "writerow", (PyCFunction)csv_writerow, METH_O, csv_writerow_doc},
- { "writerows", (PyCFunction)csv_writerows, METH_O, csv_writerows_doc},
- { NULL, NULL }
+ {"writerow", csv_writerow, METH_O, csv_writerow_doc},
+ {"writerows", csv_writerows, METH_O, csv_writerows_doc},
+ {NULL, NULL, 0, NULL} /* sentinel */
};
#define W_OFF(x) offsetof(WriterObj, x)
@@ -1452,8 +1469,9 @@ static struct PyMemberDef Writer_memberlist[] = {
#undef W_OFF
static int
-Writer_traverse(WriterObj *self, visitproc visit, void *arg)
+Writer_traverse(PyObject *op, visitproc visit, void *arg)
{
+ WriterObj *self = _WriterObj_CAST(op);
Py_VISIT(self->dialect);
Py_VISIT(self->write);
Py_VISIT(self->error_obj);
@@ -1462,8 +1480,9 @@ Writer_traverse(WriterObj *self, visitproc visit, void *arg)
}
static int
-Writer_clear(WriterObj *self)
+Writer_clear(PyObject *op)
{
+ WriterObj *self = _WriterObj_CAST(op);
Py_CLEAR(self->dialect);
Py_CLEAR(self->write);
Py_CLEAR(self->error_obj);
@@ -1471,11 +1490,12 @@ Writer_clear(WriterObj *self)
}
static void
-Writer_dealloc(WriterObj *self)
+Writer_dealloc(PyObject *op)
{
+ WriterObj *self = _WriterObj_CAST(op);
PyTypeObject *tp = Py_TYPE(self);
PyObject_GC_UnTrack(self);
- tp->tp_clear((PyObject *)self);
+ tp->tp_clear(op);
if (self->rec != NULL) {
PyMem_Free(self->rec);
}
1
0
https://github.com/python/cpython/commit/b4f799b1e78ede17b41de9a2bc51b437a7…
commit: b4f799b1e78ede17b41de9a2bc51b437a7e6dd74
branch: main
author: Rian Hunter <rianhunter(a)users.noreply.github.com>
committer: encukou <encukou(a)gmail.com>
date: 2025-01-03T14:07:07+01:00
summary:
gh-112015: Implement `ctypes.memoryview_at()` (GH-112018)
Co-authored-by: Serhiy Storchaka <storchaka(a)gmail.com>
Co-authored-by: Petr Viktorin <encukou(a)gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
files:
A Misc/NEWS.d/next/Library/2023-11-12-21-53-40.gh-issue-112015.2WPRxE.rst
M Doc/library/ctypes.rst
M Doc/whatsnew/3.14.rst
M Lib/ctypes/__init__.py
M Lib/test/test_ctypes/test_memfunctions.py
M Modules/_ctypes/_ctypes.c
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 09692e56d29a39..398cb92bac809a 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -2182,6 +2182,28 @@ Utility functions
.. audit-event:: ctypes.wstring_at ptr,size ctypes.wstring_at
+.. function:: memoryview_at(ptr, size, readonly=False)
+
+ Return a :class:`memoryview` object of length *size* that references memory
+ starting at *void \*ptr*.
+
+ If *readonly* is true, the returned :class:`!memoryview` object can
+ not be used to modify the underlying memory.
+ (Changes made by other means will still be reflected in the returned
+ object.)
+
+ This function is similar to :func:`string_at` with the key
+ difference of not making a copy of the specified memory.
+ It is a semantically equivalent (but more efficient) alternative to
+ ``memoryview((c_byte * size).from_address(ptr))``.
+ (While :meth:`~_CData.from_address` only takes integers, *ptr* can also
+ be given as a :class:`ctypes.POINTER` or a :func:`~ctypes.byref` object.)
+
+ .. audit-event:: ctypes.memoryview_at address,size,readonly
+
+ .. versionadded:: next
+
+
.. _ctypes-data-types:
Data types
diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst
index cb9167300260cb..f365db37217e95 100644
--- a/Doc/whatsnew/3.14.rst
+++ b/Doc/whatsnew/3.14.rst
@@ -343,6 +343,14 @@ ctypes
* On Windows, the :func:`~ctypes.CopyComPointer` function is now public.
(Contributed by Jun Komoda in :gh:`127275`.)
+* :func:`ctypes.memoryview_at` now exists to create a
+ :class:`memoryview` object that refers to the supplied pointer and
+ length. This works like :func:`ctypes.string_at` except it avoids a
+ buffer copy, and is typically useful when implementing pure Python
+ callback functions that are passed dynamically-sized buffers.
+ (Contributed by Rian Hunter in :gh:`112018`.)
+
+
datetime
--------
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index 2f2b0ca9f38633..8e2a2926f7a853 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -524,6 +524,7 @@ def WinError(code=None, descr=None):
# functions
from _ctypes import _memmove_addr, _memset_addr, _string_at_addr, _cast_addr
+from _ctypes import _memoryview_at_addr
## void *memmove(void *, const void *, size_t);
memmove = CFUNCTYPE(c_void_p, c_void_p, c_void_p, c_size_t)(_memmove_addr)
@@ -549,6 +550,14 @@ def string_at(ptr, size=-1):
Return the byte string at void *ptr."""
return _string_at(ptr, size)
+_memoryview_at = PYFUNCTYPE(
+ py_object, c_void_p, c_ssize_t, c_int)(_memoryview_at_addr)
+def memoryview_at(ptr, size, readonly=False):
+ """memoryview_at(ptr, size[, readonly]) -> memoryview
+
+ Return a memoryview representing the memory at void *ptr."""
+ return _memoryview_at(ptr, size, bool(readonly))
+
try:
from _ctypes import _wstring_at_addr
except ImportError:
diff --git a/Lib/test/test_ctypes/test_memfunctions.py b/Lib/test/test_ctypes/test_memfunctions.py
index 112b27ba48e07e..325487618137f6 100644
--- a/Lib/test/test_ctypes/test_memfunctions.py
+++ b/Lib/test/test_ctypes/test_memfunctions.py
@@ -5,7 +5,9 @@
create_string_buffer, string_at,
create_unicode_buffer, wstring_at,
memmove, memset,
- c_char_p, c_byte, c_ubyte, c_wchar)
+ memoryview_at, c_void_p,
+ c_char_p, c_byte, c_ubyte, c_wchar,
+ addressof, byref)
class MemFunctionsTest(unittest.TestCase):
@@ -77,6 +79,62 @@ def test_wstring_at(self):
self.assertEqual(wstring_at(a, 16), "Hello, World\0\0\0\0")
self.assertEqual(wstring_at(a, 0), "")
+ def test_memoryview_at(self):
+ b = (c_byte * 10)()
+
+ size = len(b)
+ for foreign_ptr in (
+ b,
+ cast(b, c_void_p),
+ byref(b),
+ addressof(b),
+ ):
+ with self.subTest(foreign_ptr=type(foreign_ptr).__name__):
+ b[:] = b"initialval"
+ v = memoryview_at(foreign_ptr, size)
+ self.assertIsInstance(v, memoryview)
+ self.assertEqual(bytes(v), b"initialval")
+
+ # test that writes to source buffer get reflected in memoryview
+ b[:] = b"0123456789"
+ self.assertEqual(bytes(v), b"0123456789")
+
+ # test that writes to memoryview get reflected in source buffer
+ v[:] = b"9876543210"
+ self.assertEqual(bytes(b), b"9876543210")
+
+ with self.assertRaises(ValueError):
+ memoryview_at(foreign_ptr, -1)
+
+ with self.assertRaises(ValueError):
+ memoryview_at(foreign_ptr, sys.maxsize + 1)
+
+ v0 = memoryview_at(foreign_ptr, 0)
+ self.assertEqual(bytes(v0), b'')
+
+ def test_memoryview_at_readonly(self):
+ b = (c_byte * 10)()
+
+ size = len(b)
+ for foreign_ptr in (
+ b,
+ cast(b, c_void_p),
+ byref(b),
+ addressof(b),
+ ):
+ with self.subTest(foreign_ptr=type(foreign_ptr).__name__):
+ b[:] = b"initialval"
+ v = memoryview_at(foreign_ptr, size, readonly=True)
+ self.assertIsInstance(v, memoryview)
+ self.assertEqual(bytes(v), b"initialval")
+
+ # test that writes to source buffer get reflected in memoryview
+ b[:] = b"0123456789"
+ self.assertEqual(bytes(v), b"0123456789")
+
+ # test that writes to the memoryview are blocked
+ with self.assertRaises(TypeError):
+ v[:] = b"9876543210"
if __name__ == "__main__":
unittest.main()
diff --git a/Misc/NEWS.d/next/Library/2023-11-12-21-53-40.gh-issue-112015.2WPRxE.rst b/Misc/NEWS.d/next/Library/2023-11-12-21-53-40.gh-issue-112015.2WPRxE.rst
new file mode 100644
index 00000000000000..4b58ec9d219eff
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2023-11-12-21-53-40.gh-issue-112015.2WPRxE.rst
@@ -0,0 +1,5 @@
+:func:`ctypes.memoryview_at` now exists to create a
+:class:`memoryview` object that refers to the supplied pointer and
+length. This works like :func:`ctypes.string_at` except it avoids a
+buffer copy, and is typically useful when implementing pure Python
+callback functions that are passed dynamically-sized buffers.
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index ac520ffaad6c90..ede95bdf98bf76 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -5791,6 +5791,22 @@ wstring_at(const wchar_t *ptr, int size)
return PyUnicode_FromWideChar(ptr, ssize);
}
+static PyObject *
+memoryview_at(void *ptr, Py_ssize_t size, int readonly)
+{
+ if (PySys_Audit("ctypes.memoryview_at", "nni",
+ (Py_ssize_t)ptr, size, readonly) < 0) {
+ return NULL;
+ }
+ if (size < 0) {
+ PyErr_Format(PyExc_ValueError,
+ "memoryview_at: size is negative (or overflowed): %zd",
+ size);
+ return NULL;
+ }
+ return PyMemoryView_FromMemory(ptr, size,
+ readonly ? PyBUF_READ : PyBUF_WRITE);
+}
static int
_ctypes_add_types(PyObject *mod)
@@ -5919,6 +5935,7 @@ _ctypes_add_objects(PyObject *mod)
MOD_ADD("_string_at_addr", PyLong_FromVoidPtr(string_at));
MOD_ADD("_cast_addr", PyLong_FromVoidPtr(cast));
MOD_ADD("_wstring_at_addr", PyLong_FromVoidPtr(wstring_at));
+ MOD_ADD("_memoryview_at_addr", PyLong_FromVoidPtr(memoryview_at));
/* If RTLD_LOCAL is not defined (Windows!), set it to zero. */
#if !HAVE_DECL_RTLD_LOCAL
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/f21af186bf21c1c554209ac67d78d3cf99…
commit: f21af186bf21c1c554209ac67d78d3cf99f7d7c0
branch: main
author: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
committer: hugovk <1324225+hugovk(a)users.noreply.github.com>
date: 2025-01-03T14:56:24+02:00
summary:
gh-128317: Highlight today in colour in calendar CLI output (#128318)
Co-authored-by: Peter Bierma <zintensitydev(a)gmail.com>
files:
A Misc/NEWS.d/next/Library/2024-12-29-00-33-34.gh-issue-128317.WgFina.rst
M Doc/library/calendar.rst
M Doc/whatsnew/3.14.rst
M Lib/_colorize.py
M Lib/calendar.py
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index 97ca34b6c6184c..ace8529d6e7e0c 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -146,26 +146,34 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
the specified width, representing an empty day. The *weekday* parameter
is unused.
- .. method:: formatweek(theweek, w=0)
+ .. method:: formatweek(theweek, w=0, highlight_day=None)
Return a single week in a string with no newline. If *w* is provided, it
specifies the width of the date columns, which are centered. Depends
on the first weekday as specified in the constructor or set by the
:meth:`setfirstweekday` method.
+ .. versionchanged:: next
+ If *highlight_day* is given, this date is highlighted in color.
+ This can be :ref:`controlled using environment variables
+ <using-on-controlling-color>`.
+
+
.. method:: formatweekday(weekday, width)
Return a string representing the name of a single weekday formatted to
the specified *width*. The *weekday* parameter is an integer representing
the day of the week, where ``0`` is Monday and ``6`` is Sunday.
+
.. method:: formatweekheader(width)
Return a string containing the header row of weekday names, formatted
with the given *width* for each column. The names depend on the locale
settings and are padded to the specified width.
- .. method:: formatmonth(theyear, themonth, w=0, l=0)
+
+ .. method:: formatmonth(theyear, themonth, w=0, l=0, highlight_day=None)
Return a month's calendar in a multi-line string. If *w* is provided, it
specifies the width of the date columns, which are centered. If *l* is
@@ -173,6 +181,12 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
on the first weekday as specified in the constructor or set by the
:meth:`setfirstweekday` method.
+ .. versionchanged:: next
+ If *highlight_day* is given, this date is highlighted in color.
+ This can be :ref:`controlled using environment variables
+ <using-on-controlling-color>`.
+
+
.. method:: formatmonthname(theyear, themonth, width=0, withyear=True)
Return a string representing the month's name centered within the
@@ -180,12 +194,13 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
output. The *theyear* and *themonth* parameters specify the year
and month for the name to be formatted respectively.
+
.. method:: prmonth(theyear, themonth, w=0, l=0)
Print a month's calendar as returned by :meth:`formatmonth`.
- .. method:: formatyear(theyear, w=2, l=1, c=6, m=3)
+ .. method:: formatyear(theyear, w=2, l=1, c=6, m=3, highlight_day=None)
Return a *m*-column calendar for an entire year as a multi-line string.
Optional parameters *w*, *l*, and *c* are for date column width, lines per
@@ -194,6 +209,11 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
:meth:`setfirstweekday` method. The earliest year for which a calendar
can be generated is platform-dependent.
+ .. versionchanged:: next
+ If *highlight_day* is given, this date is highlighted in color.
+ This can be :ref:`controlled using environment variables
+ <using-on-controlling-color>`.
+
.. method:: pryear(theyear, w=2, l=1, c=6, m=3)
@@ -549,7 +569,7 @@ The :mod:`calendar` module defines the following exceptions:
.. _calendar-cli:
-Command-Line Usage
+Command-line usage
------------------
.. versionadded:: 2.5
@@ -687,6 +707,9 @@ The following options are accepted:
The number of months printed per row.
Defaults to 3.
+.. versionchanged:: next
+ By default, today's date is highlighted in color and can be
+ :ref:`controlled using environment variables <using-on-controlling-color>`.
*HTML-mode options:*
diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst
index 69c356ba60e6d4..cb9167300260cb 100644
--- a/Doc/whatsnew/3.14.rst
+++ b/Doc/whatsnew/3.14.rst
@@ -296,6 +296,19 @@ ast
* The ``repr()`` output for AST nodes now includes more information.
(Contributed by Tomas R in :gh:`116022`.)
+
+calendar
+--------
+
+* By default, today's date is highlighted in color in :mod:`calendar`'s
+ :ref:`command-line <calendar-cli>` text output.
+ This can be controlled via the :envvar:`PYTHON_COLORS` environment
+ variable as well as the canonical |NO_COLOR|_
+ and |FORCE_COLOR|_ environment variables.
+ See also :ref:`using-on-controlling-color`.
+ (Contributed by Hugo van Kemenade in :gh:`128317`.)
+
+
concurrent.futures
------------------
diff --git a/Lib/_colorize.py b/Lib/_colorize.py
index 709081e25ec59b..f609901887a26b 100644
--- a/Lib/_colorize.py
+++ b/Lib/_colorize.py
@@ -6,9 +6,11 @@
class ANSIColors:
+ BACKGROUND_YELLOW = "\x1b[43m"
BOLD_GREEN = "\x1b[1;32m"
BOLD_MAGENTA = "\x1b[1;35m"
BOLD_RED = "\x1b[1;31m"
+ BLACK = "\x1b[30m"
GREEN = "\x1b[32m"
GREY = "\x1b[90m"
MAGENTA = "\x1b[35m"
diff --git a/Lib/calendar.py b/Lib/calendar.py
index 8c1c646da46a98..d2e5e08d02dbb9 100644
--- a/Lib/calendar.py
+++ b/Lib/calendar.py
@@ -349,11 +349,27 @@ def formatday(self, day, weekday, width):
s = '%2i' % day # right-align single-digit days
return s.center(width)
- def formatweek(self, theweek, width):
+ def formatweek(self, theweek, width, *, highlight_day=None):
"""
Returns a single week in a string (no newline).
"""
- return ' '.join(self.formatday(d, wd, width) for (d, wd) in theweek)
+ if highlight_day:
+ from _colorize import get_colors
+
+ ansi = get_colors()
+ highlight = f"{ansi.BLACK}{ansi.BACKGROUND_YELLOW}"
+ reset = ansi.RESET
+ else:
+ highlight = reset = ""
+
+ return ' '.join(
+ (
+ f"{highlight}{self.formatday(d, wd, width)}{reset}"
+ if d == highlight_day
+ else self.formatday(d, wd, width)
+ )
+ for (d, wd) in theweek
+ )
def formatweekday(self, day, width):
"""
@@ -388,10 +404,11 @@ def prmonth(self, theyear, themonth, w=0, l=0):
"""
print(self.formatmonth(theyear, themonth, w, l), end='')
- def formatmonth(self, theyear, themonth, w=0, l=0):
+ def formatmonth(self, theyear, themonth, w=0, l=0, *, highlight_day=None):
"""
Return a month's calendar string (multi-line).
"""
+ highlight_day = highlight_day.day if highlight_day else None
w = max(2, w)
l = max(1, l)
s = self.formatmonthname(theyear, themonth, 7 * (w + 1) - 1)
@@ -400,11 +417,11 @@ def formatmonth(self, theyear, themonth, w=0, l=0):
s += self.formatweekheader(w).rstrip()
s += '\n' * l
for week in self.monthdays2calendar(theyear, themonth):
- s += self.formatweek(week, w).rstrip()
+ s += self.formatweek(week, w, highlight_day=highlight_day).rstrip()
s += '\n' * l
return s
- def formatyear(self, theyear, w=2, l=1, c=6, m=3):
+ def formatyear(self, theyear, w=2, l=1, c=6, m=3, *, highlight_day=None):
"""
Returns a year's calendar as a multi-line string.
"""
@@ -428,15 +445,24 @@ def formatyear(self, theyear, w=2, l=1, c=6, m=3):
headers = (header for k in months)
a(formatstring(headers, colwidth, c).rstrip())
a('\n'*l)
+
+ if highlight_day and highlight_day.month in months:
+ month_pos = months.index(highlight_day.month)
+ else:
+ month_pos = None
+
# max number of weeks for this row
height = max(len(cal) for cal in row)
for j in range(height):
weeks = []
- for cal in row:
+ for k, cal in enumerate(row):
if j >= len(cal):
weeks.append('')
else:
- weeks.append(self.formatweek(cal[j], w))
+ day = highlight_day.day if k == month_pos else None
+ weeks.append(
+ self.formatweek(cal[j], w, highlight_day=day)
+ )
a(formatstring(weeks, colwidth, c).rstrip())
a('\n' * l)
return ''.join(v)
@@ -765,6 +791,7 @@ def main(args=None):
sys.exit(1)
locale = options.locale, options.encoding
+ today = datetime.date.today()
if options.type == "html":
if options.month:
@@ -781,7 +808,7 @@ def main(args=None):
optdict = dict(encoding=encoding, css=options.css)
write = sys.stdout.buffer.write
if options.year is None:
- write(cal.formatyearpage(datetime.date.today().year, **optdict))
+ write(cal.formatyearpage(today.year, **optdict))
else:
write(cal.formatyearpage(options.year, **optdict))
else:
@@ -797,10 +824,15 @@ def main(args=None):
if options.month is not None:
_validate_month(options.month)
if options.year is None:
- result = cal.formatyear(datetime.date.today().year, **optdict)
+ optdict["highlight_day"] = today
+ result = cal.formatyear(today.year, **optdict)
elif options.month is None:
+ if options.year == today.year:
+ optdict["highlight_day"] = today
result = cal.formatyear(options.year, **optdict)
else:
+ if options.year == today.year and options.month == today.month:
+ optdict["highlight_day"] = today
result = cal.formatmonth(options.year, options.month, **optdict)
write = sys.stdout.write
if options.encoding:
diff --git a/Misc/NEWS.d/next/Library/2024-12-29-00-33-34.gh-issue-128317.WgFina.rst b/Misc/NEWS.d/next/Library/2024-12-29-00-33-34.gh-issue-128317.WgFina.rst
new file mode 100644
index 00000000000000..4441108014569e
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-12-29-00-33-34.gh-issue-128317.WgFina.rst
@@ -0,0 +1,2 @@
+Highlight today in colour in :mod:`calendar`'s CLI output. Patch by Hugo van
+Kemenade.
1
0
gh-127787: refactor helpers for `PyUnicodeErrorObject` internal interface (GH-127789)
by encukou Jan. 3, 2025
by encukou Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/fa985bee6189aabac1c329f2de32aa9a4e…
commit: fa985bee6189aabac1c329f2de32aa9a4e88e550
branch: main
author: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
committer: encukou <encukou(a)gmail.com>
date: 2025-01-03T13:37:02+01:00
summary:
gh-127787: refactor helpers for `PyUnicodeErrorObject` internal interface (GH-127789)
- Unify `get_unicode` and `get_string` in a single function.
- Allow to retrieve the underlying `object` attribute, its
size, and the adjusted 'start' and 'end', all at once.
Add a new `_PyUnicodeError_GetParams` internal function for this.
(In `exceptions.c`, it's somewhat common to not need all the attributes,
but the compiler has opportunity to inline the function and optimize
unneeded work away. Outside that file, we'll usually need all or
most of them at once.)
- Use a common implementation for the following functions:
- `PyUnicode{Decode,Encode}Error_GetEncoding`
- `PyUnicode{Decode,Encode,Translate}Error_GetObject`
- `PyUnicode{Decode,Encode,Translate}Error_{Get,Set}Reason`
- `PyUnicode{Decode,Encode,Translate}Error_{Get,Set}{Start,End}`
files:
M Include/cpython/pyerrors.h
M Objects/exceptions.c
diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h
index b36b4681f5dddb..49a6265e5eb02f 100644
--- a/Include/cpython/pyerrors.h
+++ b/Include/cpython/pyerrors.h
@@ -94,6 +94,12 @@ PyAPI_FUNC(void) _PyErr_ChainExceptions1(PyObject *);
/* In exceptions.c */
+PyAPI_FUNC(int) _PyUnicodeError_GetParams(
+ PyObject *self,
+ PyObject **obj, Py_ssize_t *objlen,
+ Py_ssize_t *start, Py_ssize_t *end,
+ int as_bytes);
+
PyAPI_FUNC(PyObject*) PyUnstable_Exc_PrepReraiseStar(
PyObject *orig,
PyObject *excs);
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 6880c24196cbb8..714f8c828afbc1 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -2667,47 +2667,167 @@ SimpleExtendsException(PyExc_Exception, ValueError,
SimpleExtendsException(PyExc_ValueError, UnicodeError,
"Unicode related error.");
+
+/*
+ * Check the validity of 'attr' as a unicode or bytes object depending
+ * on 'as_bytes' and return a new reference on it if it is the case.
+ *
+ * The 'name' is the attribute name and is only used for error reporting.
+ *
+ * On success, this returns a strong reference on 'attr'.
+ * On failure, this sets a TypeError and returns NULL.
+ */
static PyObject *
-get_bytes(PyObject *attr, const char *name)
+as_unicode_error_attribute(PyObject *attr, const char *name, int as_bytes)
{
- if (!attr) {
- PyErr_Format(PyExc_TypeError, "%.200s attribute not set", name);
+ assert(as_bytes == 0 || as_bytes == 1);
+ if (attr == NULL) {
+ PyErr_Format(PyExc_TypeError, "%s attribute not set", name);
return NULL;
}
-
- if (!PyBytes_Check(attr)) {
- PyErr_Format(PyExc_TypeError, "%.200s attribute must be bytes", name);
+ if (!(as_bytes ? PyBytes_Check(attr) : PyUnicode_Check(attr))) {
+ PyErr_Format(PyExc_TypeError,
+ "%s attribute must be %s",
+ name,
+ as_bytes ? "bytes" : "unicode");
return NULL;
}
return Py_NewRef(attr);
}
-static PyObject *
-get_unicode(PyObject *attr, const char *name)
-{
- if (!attr) {
- PyErr_Format(PyExc_TypeError, "%.200s attribute not set", name);
- return NULL;
- }
- if (!PyUnicode_Check(attr)) {
+#define PyUnicodeError_Check(PTR) \
+ PyObject_TypeCheck((PTR), (PyTypeObject *)PyExc_UnicodeError)
+#define PyUnicodeError_CAST(PTR) \
+ (assert(PyUnicodeError_Check(PTR)), ((PyUnicodeErrorObject *)(PTR)))
+
+
+/* class names to use when reporting errors */
+#define Py_UNICODE_ENCODE_ERROR_NAME "UnicodeEncodeError"
+#define Py_UNICODE_DECODE_ERROR_NAME "UnicodeDecodeError"
+#define Py_UNICODE_TRANSLATE_ERROR_NAME "UnicodeTranslateError"
+
+
+/*
+ * Check that 'self' is a UnicodeError object.
+ *
+ * On success, this returns 0.
+ * On failure, this sets a TypeError exception and returns -1.
+ *
+ * The 'expect_type' is the name of the expected type, which is
+ * only used for error reporting.
+ *
+ * As an implementation detail, the `PyUnicode*Error_*` functions
+ * currently allow *any* subclass of UnicodeError as 'self'.
+ *
+ * Use one of the `Py_UNICODE_*_ERROR_NAME` macros to avoid typos.
+ */
+static inline int
+check_unicode_error_type(PyObject *self, const char *expect_type)
+{
+ assert(self != NULL);
+ if (!PyUnicodeError_Check(self)) {
PyErr_Format(PyExc_TypeError,
- "%.200s attribute must be unicode", name);
- return NULL;
+ "expecting a %s object, got %T", expect_type, self);
+ return -1;
}
- return Py_NewRef(attr);
+ return 0;
}
-static int
-set_unicodefromstring(PyObject **attr, const char *value)
+
+// --- PyUnicodeEncodeObject: internal helpers --------------------------------
+//
+// In the helpers below, the caller is responsible to ensure that 'self'
+// is a PyUnicodeErrorObject, although this is verified on DEBUG builds
+// through PyUnicodeError_CAST().
+
+/*
+ * Return the underlying (str) 'encoding' attribute of a UnicodeError object.
+ */
+static inline PyObject *
+unicode_error_get_encoding_impl(PyObject *self)
+{
+ assert(self != NULL);
+ PyUnicodeErrorObject *exc = PyUnicodeError_CAST(self);
+ return as_unicode_error_attribute(exc->encoding, "encoding", false);
+}
+
+
+/*
+ * Return the underlying 'object' attribute of a UnicodeError object
+ * as a bytes or a string instance, depending on the 'as_bytes' flag.
+ */
+static inline PyObject *
+unicode_error_get_object_impl(PyObject *self, int as_bytes)
{
- PyObject *obj = PyUnicode_FromString(value);
- if (!obj)
+ assert(self != NULL);
+ PyUnicodeErrorObject *exc = PyUnicodeError_CAST(self);
+ return as_unicode_error_attribute(exc->object, "object", as_bytes);
+}
+
+
+/*
+ * Return the underlying (str) 'reason' attribute of a UnicodeError object.
+ */
+static inline PyObject *
+unicode_error_get_reason_impl(PyObject *self)
+{
+ assert(self != NULL);
+ PyUnicodeErrorObject *exc = PyUnicodeError_CAST(self);
+ return as_unicode_error_attribute(exc->reason, "reason", false);
+}
+
+
+/*
+ * Set the underlying (str) 'reason' attribute of a UnicodeError object.
+ *
+ * Return 0 on success and -1 on failure.
+ */
+static inline int
+unicode_error_set_reason_impl(PyObject *self, const char *reason)
+{
+ assert(self != NULL);
+ PyObject *value = PyUnicode_FromString(reason);
+ if (value == NULL) {
return -1;
- Py_XSETREF(*attr, obj);
+ }
+ PyUnicodeErrorObject *exc = PyUnicodeError_CAST(self);
+ Py_XSETREF(exc->reason, value);
return 0;
}
+
+/*
+ * Set the 'start' attribute of a UnicodeError object.
+ *
+ * Return 0 on success and -1 on failure.
+ */
+static inline int
+unicode_error_set_start_impl(PyObject *self, Py_ssize_t start)
+{
+ assert(self != NULL);
+ PyUnicodeErrorObject *exc = PyUnicodeError_CAST(self);
+ exc->start = start;
+ return 0;
+}
+
+
+/*
+ * Set the 'end' attribute of a UnicodeError object.
+ *
+ * Return 0 on success and -1 on failure.
+ */
+static inline int
+unicode_error_set_end_impl(PyObject *self, Py_ssize_t end)
+{
+ assert(self != NULL);
+ PyUnicodeErrorObject *exc = PyUnicodeError_CAST(self);
+ exc->end = end;
+ return 0;
+}
+
+// --- PyUnicodeEncodeObject: internal getters --------------------------------
+
/*
* Adjust the (inclusive) 'start' value of a UnicodeError object.
*
@@ -2728,6 +2848,7 @@ unicode_error_adjust_start(Py_ssize_t start, Py_ssize_t objlen)
return start;
}
+
/*
* Adjust the (exclusive) 'end' value of a UnicodeError object.
*
@@ -2748,134 +2869,162 @@ unicode_error_adjust_end(Py_ssize_t end, Py_ssize_t objlen)
return end;
}
-#define _PyUnicodeError_CAST(PTR) ((PyUnicodeErrorObject *)(PTR))
-#define PyUnicodeError_Check(PTR) \
- PyObject_TypeCheck((PTR), (PyTypeObject *)PyExc_UnicodeError)
-#define PyUnicodeError_CAST(PTR) \
- (assert(PyUnicodeError_Check(PTR)), _PyUnicodeError_CAST(PTR))
-
-static inline int
-check_unicode_error_type(PyObject *self, const char *expect_type)
+/*
+ * Get various common parameters of a UnicodeError object.
+ *
+ * The caller is responsible to ensure that 'self' is a PyUnicodeErrorObject,
+ * although this condition is verified by this function on DEBUG builds.
+ *
+ * Return 0 on success and -1 on failure.
+ *
+ * Output parameters:
+ *
+ * obj A strong reference to the 'object' attribute.
+ * objlen The 'object' length.
+ * start The clipped 'start' attribute.
+ * end The clipped 'end' attribute.
+ *
+ * An output parameter can be NULL to indicate that
+ * the corresponding value does not need to be stored.
+ *
+ * Input parameter:
+ *
+ * as_bytes If 1, the error's 'object' attribute must be a bytes object,
+ * i.e. the call is for a `UnicodeDecodeError`. Otherwise, the
+ * 'object' attribute must be a string.
+ *
+ * A TypeError is raised if the 'object' type is incompatible.
+ */
+int
+_PyUnicodeError_GetParams(PyObject *self,
+ PyObject **obj, Py_ssize_t *objlen,
+ Py_ssize_t *start, Py_ssize_t *end,
+ int as_bytes)
{
- if (!PyUnicodeError_Check(self)) {
- PyErr_Format(PyExc_TypeError,
- "expecting a %s object, got %T", expect_type, self);
+ assert(self != NULL);
+ assert(as_bytes == 0 || as_bytes == 1);
+ PyUnicodeErrorObject *exc = PyUnicodeError_CAST(self);
+ PyObject *r = as_unicode_error_attribute(exc->object, "object", as_bytes);
+ if (r == NULL) {
return -1;
}
+
+ Py_ssize_t n = as_bytes ? PyBytes_GET_SIZE(r) : PyUnicode_GET_LENGTH(r);
+ if (objlen != NULL) {
+ *objlen = n;
+ }
+ if (start != NULL) {
+ *start = unicode_error_adjust_start(exc->start, n);
+ assert(*start >= 0);
+ assert(*start <= n);
+ }
+ if (end != NULL) {
+ *end = unicode_error_adjust_end(exc->end, n);
+ assert(*end >= 0);
+ assert(*end <= n);
+ }
+ if (obj != NULL) {
+ *obj = r;
+ }
+ else {
+ Py_DECREF(r);
+ }
return 0;
}
-static inline PyUnicodeErrorObject *
-as_unicode_error(PyObject *self, const char *expect_type)
-{
- int rc = check_unicode_error_type(self, expect_type);
- return rc < 0 ? NULL : _PyUnicodeError_CAST(self);
-}
+// --- PyUnicodeEncodeObject: 'encoding' getters ------------------------------
+// Note: PyUnicodeTranslateError does not have an 'encoding' attribute.
PyObject *
PyUnicodeEncodeError_GetEncoding(PyObject *self)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeEncodeError");
- return exc == NULL ? NULL : get_unicode(exc->encoding, "encoding");
+ int rc = check_unicode_error_type(self, Py_UNICODE_ENCODE_ERROR_NAME);
+ return rc < 0 ? NULL : unicode_error_get_encoding_impl(self);
}
+
PyObject *
PyUnicodeDecodeError_GetEncoding(PyObject *self)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeDecodeError");
- return exc == NULL ? NULL : get_unicode(exc->encoding, "encoding");
+ int rc = check_unicode_error_type(self, Py_UNICODE_DECODE_ERROR_NAME);
+ return rc < 0 ? NULL : unicode_error_get_encoding_impl(self);
}
+
+// --- PyUnicodeEncodeObject: 'object' getters --------------------------------
+
PyObject *
PyUnicodeEncodeError_GetObject(PyObject *self)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeEncodeError");
- return exc == NULL ? NULL : get_unicode(exc->object, "object");
+ int rc = check_unicode_error_type(self, Py_UNICODE_ENCODE_ERROR_NAME);
+ return rc < 0 ? NULL : unicode_error_get_object_impl(self, false);
}
+
PyObject *
PyUnicodeDecodeError_GetObject(PyObject *self)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeDecodeError");
- return exc == NULL ? NULL : get_bytes(exc->object, "object");
+ int rc = check_unicode_error_type(self, Py_UNICODE_DECODE_ERROR_NAME);
+ return rc < 0 ? NULL : unicode_error_get_object_impl(self, true);
}
+
PyObject *
PyUnicodeTranslateError_GetObject(PyObject *self)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeTranslateError");
- return exc == NULL ? NULL : get_unicode(exc->object, "object");
+ int rc = check_unicode_error_type(self, Py_UNICODE_TRANSLATE_ERROR_NAME);
+ return rc < 0 ? NULL : unicode_error_get_object_impl(self, false);
}
+
+// --- PyUnicodeEncodeObject: 'start' getters ---------------------------------
+
+/*
+ * Specialization of _PyUnicodeError_GetParams() for the 'start' attribute.
+ *
+ * The caller is responsible to ensure that 'self' is a PyUnicodeErrorObject,
+ * although this condition is verified by this function on DEBUG builds.
+ */
+static inline int
+unicode_error_get_start_impl(PyObject *self, Py_ssize_t *start, int as_bytes)
+{
+ assert(self != NULL);
+ return _PyUnicodeError_GetParams(self, NULL, NULL, start, NULL, as_bytes);
+}
+
+
int
PyUnicodeEncodeError_GetStart(PyObject *self, Py_ssize_t *start)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeEncodeError");
- if (exc == NULL) {
- return -1;
- }
- PyObject *obj = get_unicode(exc->object, "object");
- if (obj == NULL) {
- return -1;
- }
- Py_ssize_t size = PyUnicode_GET_LENGTH(obj);
- Py_DECREF(obj);
- *start = unicode_error_adjust_start(exc->start, size);
- return 0;
+ int rc = check_unicode_error_type(self, Py_UNICODE_ENCODE_ERROR_NAME);
+ return rc < 0 ? -1 : unicode_error_get_start_impl(self, start, false);
}
int
PyUnicodeDecodeError_GetStart(PyObject *self, Py_ssize_t *start)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeDecodeError");
- if (exc == NULL) {
- return -1;
- }
- PyObject *obj = get_bytes(exc->object, "object");
- if (obj == NULL) {
- return -1;
- }
- Py_ssize_t size = PyBytes_GET_SIZE(obj);
- Py_DECREF(obj);
- *start = unicode_error_adjust_start(exc->start, size);
- return 0;
+ int rc = check_unicode_error_type(self, Py_UNICODE_DECODE_ERROR_NAME);
+ return rc < 0 ? -1 : unicode_error_get_start_impl(self, start, true);
}
int
PyUnicodeTranslateError_GetStart(PyObject *self, Py_ssize_t *start)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeTranslateError");
- if (exc == NULL) {
- return -1;
- }
- PyObject *obj = get_unicode(exc->object, "object");
- if (obj == NULL) {
- return -1;
- }
- Py_ssize_t size = PyUnicode_GET_LENGTH(obj);
- Py_DECREF(obj);
- *start = unicode_error_adjust_start(exc->start, size);
- return 0;
+ int rc = check_unicode_error_type(self, Py_UNICODE_TRANSLATE_ERROR_NAME);
+ return rc < 0 ? -1 : unicode_error_get_start_impl(self, start, false);
}
-static inline int
-unicode_error_set_start_impl(PyObject *self, Py_ssize_t start)
-{
- PyUnicodeErrorObject *exc = _PyUnicodeError_CAST(self);
- exc->start = start;
- return 0;
-}
-
+// --- PyUnicodeEncodeObject: 'start' setters ---------------------------------
int
PyUnicodeEncodeError_SetStart(PyObject *self, Py_ssize_t start)
{
- int rc = check_unicode_error_type(self, "UnicodeEncodeError");
+ int rc = check_unicode_error_type(self, Py_UNICODE_ENCODE_ERROR_NAME);
return rc < 0 ? -1 : unicode_error_set_start_impl(self, start);
}
@@ -2883,7 +3032,7 @@ PyUnicodeEncodeError_SetStart(PyObject *self, Py_ssize_t start)
int
PyUnicodeDecodeError_SetStart(PyObject *self, Py_ssize_t start)
{
- int rc = check_unicode_error_type(self, "UnicodeDecodeError");
+ int rc = check_unicode_error_type(self, Py_UNICODE_DECODE_ERROR_NAME);
return rc < 0 ? -1 : unicode_error_set_start_impl(self, start);
}
@@ -2891,78 +3040,57 @@ PyUnicodeDecodeError_SetStart(PyObject *self, Py_ssize_t start)
int
PyUnicodeTranslateError_SetStart(PyObject *self, Py_ssize_t start)
{
- int rc = check_unicode_error_type(self, "UnicodeTranslateError");
+ int rc = check_unicode_error_type(self, Py_UNICODE_TRANSLATE_ERROR_NAME);
return rc < 0 ? -1 : unicode_error_set_start_impl(self, start);
}
+// --- PyUnicodeEncodeObject: 'end' getters -----------------------------------
+
+/*
+ * Specialization of _PyUnicodeError_GetParams() for the 'end' attribute.
+ *
+ * The caller is responsible to ensure that 'self' is a PyUnicodeErrorObject,
+ * although this condition is verified by this function on DEBUG builds.
+ */
+static inline int
+unicode_error_get_end_impl(PyObject *self, Py_ssize_t *end, int as_bytes)
+{
+ assert(self != NULL);
+ return _PyUnicodeError_GetParams(self, NULL, NULL, NULL, end, as_bytes);
+}
+
+
int
PyUnicodeEncodeError_GetEnd(PyObject *self, Py_ssize_t *end)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeEncodeError");
- if (exc == NULL) {
- return -1;
- }
- PyObject *obj = get_unicode(exc->object, "object");
- if (obj == NULL) {
- return -1;
- }
- Py_ssize_t size = PyUnicode_GET_LENGTH(obj);
- Py_DECREF(obj);
- *end = unicode_error_adjust_end(exc->end, size);
- return 0;
+ int rc = check_unicode_error_type(self, Py_UNICODE_ENCODE_ERROR_NAME);
+ return rc < 0 ? -1 : unicode_error_get_end_impl(self, end, false);
}
int
PyUnicodeDecodeError_GetEnd(PyObject *self, Py_ssize_t *end)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeDecodeError");
- if (exc == NULL) {
- return -1;
- }
- PyObject *obj = get_bytes(exc->object, "object");
- if (obj == NULL) {
- return -1;
- }
- Py_ssize_t size = PyBytes_GET_SIZE(obj);
- Py_DECREF(obj);
- *end = unicode_error_adjust_end(exc->end, size);
- return 0;
+ int rc = check_unicode_error_type(self, Py_UNICODE_DECODE_ERROR_NAME);
+ return rc < 0 ? -1 : unicode_error_get_end_impl(self, end, true);
}
int
PyUnicodeTranslateError_GetEnd(PyObject *self, Py_ssize_t *end)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeTranslateError");
- if (exc == NULL) {
- return -1;
- }
- PyObject *obj = get_unicode(exc->object, "object");
- if (obj == NULL) {
- return -1;
- }
- Py_ssize_t size = PyUnicode_GET_LENGTH(obj);
- Py_DECREF(obj);
- *end = unicode_error_adjust_end(exc->end, size);
- return 0;
+ int rc = check_unicode_error_type(self, Py_UNICODE_TRANSLATE_ERROR_NAME);
+ return rc < 0 ? -1 : unicode_error_get_end_impl(self, end, false);
}
-static inline int
-unicode_error_set_end_impl(PyObject *self, Py_ssize_t end)
-{
- PyUnicodeErrorObject *exc = _PyUnicodeError_CAST(self);
- exc->end = end;
- return 0;
-}
-
+// --- PyUnicodeEncodeObject: 'end' setters -----------------------------------
int
PyUnicodeEncodeError_SetEnd(PyObject *self, Py_ssize_t end)
{
- int rc = check_unicode_error_type(self, "UnicodeEncodeError");
+ int rc = check_unicode_error_type(self, Py_UNICODE_ENCODE_ERROR_NAME);
return rc < 0 ? -1 : unicode_error_set_end_impl(self, end);
}
@@ -2970,7 +3098,7 @@ PyUnicodeEncodeError_SetEnd(PyObject *self, Py_ssize_t end)
int
PyUnicodeDecodeError_SetEnd(PyObject *self, Py_ssize_t end)
{
- int rc = check_unicode_error_type(self, "UnicodeDecodeError");
+ int rc = check_unicode_error_type(self, Py_UNICODE_DECODE_ERROR_NAME);
return rc < 0 ? -1 : unicode_error_set_end_impl(self, end);
}
@@ -2978,56 +3106,60 @@ PyUnicodeDecodeError_SetEnd(PyObject *self, Py_ssize_t end)
int
PyUnicodeTranslateError_SetEnd(PyObject *self, Py_ssize_t end)
{
- int rc = check_unicode_error_type(self, "UnicodeTranslateError");
+ int rc = check_unicode_error_type(self, Py_UNICODE_TRANSLATE_ERROR_NAME);
return rc < 0 ? -1 : unicode_error_set_end_impl(self, end);
}
+// --- PyUnicodeEncodeObject: 'reason' getters --------------------------------
+
PyObject *
PyUnicodeEncodeError_GetReason(PyObject *self)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeEncodeError");
- return exc == NULL ? NULL : get_unicode(exc->reason, "reason");
+ int rc = check_unicode_error_type(self, Py_UNICODE_ENCODE_ERROR_NAME);
+ return rc < 0 ? NULL : unicode_error_get_reason_impl(self);
}
PyObject *
PyUnicodeDecodeError_GetReason(PyObject *self)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeDecodeError");
- return exc == NULL ? NULL : get_unicode(exc->reason, "reason");
+ int rc = check_unicode_error_type(self, Py_UNICODE_DECODE_ERROR_NAME);
+ return rc < 0 ? NULL : unicode_error_get_reason_impl(self);
}
PyObject *
PyUnicodeTranslateError_GetReason(PyObject *self)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeTranslateError");
- return exc == NULL ? NULL : get_unicode(exc->reason, "reason");
+ int rc = check_unicode_error_type(self, Py_UNICODE_TRANSLATE_ERROR_NAME);
+ return rc < 0 ? NULL : unicode_error_get_reason_impl(self);
}
+// --- PyUnicodeEncodeObject: 'reason' setters --------------------------------
+
int
PyUnicodeEncodeError_SetReason(PyObject *self, const char *reason)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeEncodeError");
- return exc == NULL ? -1 : set_unicodefromstring(&exc->reason, reason);
+ int rc = check_unicode_error_type(self, Py_UNICODE_ENCODE_ERROR_NAME);
+ return rc < 0 ? -1 : unicode_error_set_reason_impl(self, reason);
}
int
PyUnicodeDecodeError_SetReason(PyObject *self, const char *reason)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeDecodeError");
- return exc == NULL ? -1 : set_unicodefromstring(&exc->reason, reason);
+ int rc = check_unicode_error_type(self, Py_UNICODE_DECODE_ERROR_NAME);
+ return rc < 0 ? -1 : unicode_error_set_reason_impl(self, reason);
}
int
PyUnicodeTranslateError_SetReason(PyObject *self, const char *reason)
{
- PyUnicodeErrorObject *exc = as_unicode_error(self, "UnicodeTranslateError");
- return exc == NULL ? -1 : set_unicodefromstring(&exc->reason, reason);
+ int rc = check_unicode_error_type(self, Py_UNICODE_TRANSLATE_ERROR_NAME);
+ return rc < 0 ? -1 : unicode_error_set_reason_impl(self, reason);
}
1
0
https://github.com/python/cpython/commit/8abd6cef68a0582a4d912be76caddd9da5…
commit: 8abd6cef68a0582a4d912be76caddd9da5d55ccd
branch: main
author: Erlend E. Aasland <erlend(a)python.org>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-03T11:37:54Z
summary:
gh-115765: Upgrade to GNU Autoconf 2.72 (#128411)
files:
A Misc/NEWS.d/next/Build/2025-01-02-12-50-46.gh-issue-115765.jko7Fg.rst
M .github/workflows/build.yml
M Doc/whatsnew/3.14.rst
M Tools/build/regen-configure.sh
M config.guess
M configure
M install-sh
M pyconfig.h.in
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8787402ccc4423..9adf860632e8a2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -46,7 +46,7 @@ jobs:
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
runs-on: ubuntu-24.04
container:
- image: ghcr.io/python/autoconf:2024.11.11.11786316759
+ image: ghcr.io/python/autoconf:2025.01.02.12581854023
timeout-minutes: 60
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
@@ -63,7 +63,7 @@ jobs:
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
- name: Check Autoconf and aclocal versions
run: |
- grep "Generated by GNU Autoconf 2.71" configure
+ grep "Generated by GNU Autoconf 2.72" configure
grep "aclocal 1.16.5" aclocal.m4
grep -q "runstatedir" configure
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst
index 61f5ffdb6c89d1..69c356ba60e6d4 100644
--- a/Doc/whatsnew/3.14.rst
+++ b/Doc/whatsnew/3.14.rst
@@ -1069,6 +1069,9 @@ Changes in the Python API
Build changes
=============
+* GNU Autoconf 2.72 is now required to generate :file:`!configure`.
+ (Contributed by Erlend Aasland in :gh:`115765`.)
+
PEP 761: Discontinuation of PGP signatures
------------------------------------------
diff --git a/Misc/NEWS.d/next/Build/2025-01-02-12-50-46.gh-issue-115765.jko7Fg.rst b/Misc/NEWS.d/next/Build/2025-01-02-12-50-46.gh-issue-115765.jko7Fg.rst
new file mode 100644
index 00000000000000..34618c2c1288bc
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2025-01-02-12-50-46.gh-issue-115765.jko7Fg.rst
@@ -0,0 +1,2 @@
+GNU Autoconf 2.72 is now required to generate :file:`!configure`.
+Patch by Erlend Aasland.
diff --git a/Tools/build/regen-configure.sh b/Tools/build/regen-configure.sh
index d2a613b1e40dc1..c7683eb36763af 100755
--- a/Tools/build/regen-configure.sh
+++ b/Tools/build/regen-configure.sh
@@ -5,7 +5,7 @@ set -e -x
# The check_autoconf_regen job of .github/workflows/build.yml must kept in
# sync with this script. Use the same container image than the job so the job
# doesn't need to run autoreconf in a container.
-IMAGE="ghcr.io/python/autoconf:2024.11.11.11786316759"
+IMAGE="ghcr.io/python/autoconf:2025.01.02.12581854023"
AUTORECONF="autoreconf -ivf -Werror"
WORK_DIR="/src"
diff --git a/config.guess b/config.guess
index e81d3ae7c210ba..cdfc4392047ce3 100755
--- a/config.guess
+++ b/config.guess
@@ -1,14 +1,14 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2021 Free Software Foundation, Inc.
+# Copyright 1992-2023 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268 # see below for rationale
-timestamp='2021-06-03'
+timestamp='2023-08-22'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
-Output the configuration name of the system \`$me' is run on.
+Output the configuration name of the system '$me' is run on.
Options:
-h, --help print this help, then exit
@@ -60,13 +60,13 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2021 Free Software Foundation, Inc.
+Copyright 1992-2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
-Try \`$me --help' for more information."
+Try '$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
@@ -102,8 +102,8 @@ GUESS=
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
+# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
+# use 'HOST_CC' if defined, but it is deprecated.
# Portable tmp directory creation inspired by the Autoconf team.
@@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
set_cc_for_build
cat <<-EOF > "$dummy.c"
+ #if defined(__ANDROID__)
+ LIBC=android
+ #else
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -169,6 +172,7 @@ Linux|GNU|GNU/*)
LIBC=musl
#endif
#endif
+ #endif
EOF
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
eval "$cc_set_libc"
@@ -437,7 +441,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
# This test works for both compilers.
if test "$CC_FOR_BUILD" != no_compiler_found; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH=x86_64
@@ -459,7 +463,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
UNAME_RELEASE=`uname -v`
;;
esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
+ # Japanese Language versions have a version number like '4.1.3-JL'.
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
GUESS=sparc-sun-sunos$SUN_REL
;;
@@ -904,7 +908,7 @@ EOF
fi
;;
*:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ UNAME_PROCESSOR=`uname -p`
case $UNAME_PROCESSOR in
amd64)
UNAME_PROCESSOR=x86_64 ;;
@@ -929,6 +933,9 @@ EOF
i*:PW*:*)
GUESS=$UNAME_MACHINE-pc-pw32
;;
+ *:SerenityOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-serenity
+ ;;
*:Interix*:*)
case $UNAME_MACHINE in
x86)
@@ -963,11 +970,37 @@ EOF
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
;;
+ x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
+ GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
+ ;;
+ *:[Mm]anagarm:*:*)
+ GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
+ ;;
*:Minix:*:*)
GUESS=$UNAME_MACHINE-unknown-minix
;;
aarch64:Linux:*:*)
- GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ set_cc_for_build
+ CPU=$UNAME_MACHINE
+ LIBCABI=$LIBC
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ ABI=64
+ sed 's/^ //' << EOF > "$dummy.c"
+ #ifdef __ARM_EABI__
+ #ifdef __ARM_PCS_VFP
+ ABI=eabihf
+ #else
+ ABI=eabi
+ #endif
+ #endif
+EOF
+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
+ eval "$cc_set_abi"
+ case $ABI in
+ eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
+ esac
+ fi
+ GUESS=$CPU-unknown-linux-$LIBCABI
;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
@@ -1033,7 +1066,16 @@ EOF
k1om:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
- loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+ kvx:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ kvx:cos:*:*)
+ GUESS=$UNAME_MACHINE-unknown-cos
+ ;;
+ kvx:mbr:*:*)
+ GUESS=$UNAME_MACHINE-unknown-mbr
+ ;;
+ loongarch32:Linux:*:* | loongarch64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
m32r*:Linux:*:*)
@@ -1148,16 +1190,27 @@ EOF
;;
x86_64:Linux:*:*)
set_cc_for_build
+ CPU=$UNAME_MACHINE
LIBCABI=$LIBC
if test "$CC_FOR_BUILD" != no_compiler_found; then
- if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_X32 >/dev/null
- then
- LIBCABI=${LIBC}x32
- fi
+ ABI=64
+ sed 's/^ //' << EOF > "$dummy.c"
+ #ifdef __i386__
+ ABI=x86
+ #else
+ #ifdef __ILP32__
+ ABI=x32
+ #endif
+ #endif
+EOF
+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
+ eval "$cc_set_abi"
+ case $ABI in
+ x86) CPU=i686 ;;
+ x32) LIBCABI=${LIBC}x32 ;;
+ esac
fi
- GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+ GUESS=$CPU-pc-linux-$LIBCABI
;;
xtensa*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
@@ -1177,7 +1230,7 @@ EOF
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
;;
i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
+ # If we were able to find 'uname', then EMX Unix compatibility
# is probably installed.
GUESS=$UNAME_MACHINE-pc-os2-emx
;;
@@ -1318,7 +1371,7 @@ EOF
GUESS=ns32k-sni-sysv
fi
;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel(a)ccMail.Census.GOV>
GUESS=i586-unisys-sysv4
;;
@@ -1364,8 +1417,11 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
GUESS=i586-pc-haiku
;;
- x86_64:Haiku:*:*)
- GUESS=x86_64-unknown-haiku
+ ppc:Haiku:*:*) # Haiku running on Apple PowerPC
+ GUESS=powerpc-apple-haiku
+ ;;
+ *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
+ GUESS=$UNAME_MACHINE-unknown-haiku
;;
SX-4:SUPER-UX:*:*)
GUESS=sx4-nec-superux$UNAME_RELEASE
@@ -1522,6 +1578,9 @@ EOF
i*86:rdos:*:*)
GUESS=$UNAME_MACHINE-pc-rdos
;;
+ i*86:Fiwix:*:*)
+ GUESS=$UNAME_MACHINE-pc-fiwix
+ ;;
*:AROS:*:*)
GUESS=$UNAME_MACHINE-unknown-aros
;;
diff --git a/configure b/configure
index 2c3046e89bcb65..86b96d6208fe40 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for python 3.14.
+# Generated by GNU Autoconf 2.72 for python 3.14.
#
# Report bugs to <https://github.com/python/cpython/issues/>.
#
#
-# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
# Inc.
#
#
@@ -17,7 +17,6 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-as_nop=:
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
emulate sh
@@ -26,12 +25,13 @@ then :
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else $as_nop
- case `(set -o) 2>/dev/null` in #(
+else case e in #(
+ e) case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
+esac ;;
esac
fi
@@ -103,7 +103,7 @@ IFS=$as_save_IFS
;;
esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
+# We did not find ourselves, most probably we were run as 'sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
@@ -133,15 +133,14 @@ case $- in # ((((
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="as_nop=:
-if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+ as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
emulate sh
NULLCMD=:
@@ -149,12 +148,13 @@ then :
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else \$as_nop
- case \`(set -o) 2>/dev/null\` in #(
+else case e in #(
+ e) case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
+esac ;;
esac
fi
"
@@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" )
then :
-else \$as_nop
- exitcode=1; echo positional parameters were not saved.
+else case e in #(
+ e) exitcode=1; echo positional parameters were not saved. ;;
+esac
fi
test x\$exitcode = x0 || exit 1
blah=\$(echo \$(echo blah))
@@ -187,14 +188,15 @@ test \$(( 1 + 1 )) = 2 || exit 1"
if (eval "$as_required") 2>/dev/null
then :
as_have_required=yes
-else $as_nop
- as_have_required=no
+else case e in #(
+ e) as_have_required=no ;;
+esac
fi
if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
then :
-else $as_nop
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
@@ -227,12 +229,13 @@ IFS=$as_save_IFS
if $as_found
then :
-else $as_nop
- if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+else case e in #(
+ e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
then :
CONFIG_SHELL=$SHELL as_have_required=yes
-fi
+fi ;;
+esac
fi
@@ -254,7 +257,7 @@ case $- in # ((((
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
@@ -274,7 +277,8 @@ $0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
fi
exit 1
-fi
+fi ;;
+esac
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
@@ -313,14 +317,6 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
- return $?
-}
-as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -389,11 +385,12 @@ then :
{
eval $1+=\$2
}'
-else $as_nop
- as_fn_append ()
+else case e in #(
+ e) as_fn_append ()
{
eval $1=\$$1\$2
- }
+ } ;;
+esac
fi # as_fn_append
# as_fn_arith ARG...
@@ -407,21 +404,14 @@ then :
{
as_val=$(( $* ))
}'
-else $as_nop
- as_fn_arith ()
+else case e in #(
+ e) as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
- }
+ } ;;
+esac
fi # as_fn_arith
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
- return $?
-}
-as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -495,6 +485,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
/[$]LINENO/=
' <$as_myself |
sed '
+ t clear
+ :clear
s/[$]LINENO.*/&-/
t lineno
b
@@ -543,7 +535,6 @@ esac
as_echo='printf %s\n'
as_echo_n='printf %s'
-
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -555,9 +546,9 @@ 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 -pR'.
+ # 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 -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
@@ -582,10 +573,12 @@ as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed '$as_sed_sh'" # deprecated
test -n "$DJDIR" || exec 7<&0 </dev/null
@@ -1287,7 +1280,7 @@ do
ac_useropt=`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_fn_error $? "invalid feature name: \`$ac_useropt'"
+ as_fn_error $? "invalid feature name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1313,7 +1306,7 @@ do
ac_useropt=`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_fn_error $? "invalid feature name: \`$ac_useropt'"
+ as_fn_error $? "invalid feature name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1526,7 +1519,7 @@ do
ac_useropt=`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_fn_error $? "invalid package name: \`$ac_useropt'"
+ as_fn_error $? "invalid package name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1542,7 +1535,7 @@ do
ac_useropt=`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_fn_error $? "invalid package name: \`$ac_useropt'"
+ as_fn_error $? "invalid package name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1572,8 +1565,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+ -*) as_fn_error $? "unrecognized option: '$ac_option'
+Try '$0 --help' for more information"
;;
*=*)
@@ -1581,7 +1574,7 @@ Try \`$0 --help' for more information"
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1631,7 +1624,7 @@ do
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
-# There might be people who depend on the old broken behavior: `$host'
+# There might be people who depend on the old broken behavior: '$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
@@ -1699,7 +1692,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
ac_abs_confdir=`(
cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
@@ -1727,7 +1720,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures python 3.14 to adapt to many kinds of systems.
+'configure' configures python 3.14 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1741,11 +1734,11 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
+ -q, --quiet, --silent do not print 'checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
+ -C, --config-cache alias for '--cache-file=config.cache'
-n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
+ --srcdir=DIR find the sources in DIR [configure dir or '..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -1753,10 +1746,10 @@ Installation directories:
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
+By default, 'make install' will install all the files in
+'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than '$ac_default_prefix' using '--prefix',
+for instance '--prefix=\$HOME'.
For better control, use the options below.
@@ -2020,7 +2013,7 @@ Some influential environment variables:
C compiler flags for PANEL, overriding pkg-config
PANEL_LIBS linker flags for PANEL, overriding pkg-config
-Use these variables to override the choices made by `configure' or to help
+Use these variables to override the choices made by 'configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <https://github.com/python/cpython/issues/>.
@@ -2088,9 +2081,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
python configure 3.14
-generated by GNU Autoconf 2.71
+generated by GNU Autoconf 2.72
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -2129,11 +2122,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
} && test -s conftest.$ac_objext
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
@@ -2167,11 +2161,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
}
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
@@ -2190,8 +2185,8 @@ printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
@@ -2199,10 +2194,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$3=yes"
-else $as_nop
- eval "$3=no"
+else case e in #(
+ e) eval "$3=no" ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2242,11 +2239,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
}
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
@@ -2288,12 +2286,13 @@ printf "%s\n" "$ac_try_echo"; } >&5
test $ac_status = 0; }; }
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=$ac_status
+ ac_retval=$ac_status ;;
+esac
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
@@ -2313,8 +2312,8 @@ printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- eval "$3=no"
+else case e in #(
+ e) eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
@@ -2344,12 +2343,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
-else $as_nop
- eval "$3=yes"
+else case e in #(
+ e) eval "$3=yes" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2403,18 +2404,19 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_hi=$ac_mid; break
-else $as_nop
- as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+else case e in #(
+ e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
break
fi
- as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
@@ -2449,20 +2451,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_lo=$ac_mid; break
-else $as_nop
- as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+else case e in #(
+ e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
break
fi
- as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else $as_nop
- ac_lo= ac_hi=
+else case e in #(
+ e) ac_lo= ac_hi= ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
@@ -2485,8 +2490,9 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_hi=$ac_mid
-else $as_nop
- as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+else case e in #(
+ e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
@@ -2534,8 +2540,9 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else $as_nop
- ac_retval=1
+else case e in #(
+ e) ac_retval=1 ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -2558,15 +2565,15 @@ printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below. */
+ which can conflict with char $2 (void); below. */
#include <limits.h>
#undef $2
@@ -2577,7 +2584,7 @@ else $as_nop
#ifdef __cplusplus
extern "C"
#endif
-char $2 ();
+char $2 (void);
/* 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. */
@@ -2596,11 +2603,13 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
eval "$3=yes"
-else $as_nop
- eval "$3=no"
+else case e in #(
+ e) eval "$3=no" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
+ conftest$ac_exeext conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2622,8 +2631,8 @@ printf %s "checking whether $as_decl_name is declared... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+else case e in #(
+ e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
eval ac_save_FLAGS=\$$6
as_fn_append $6 " $5"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2647,12 +2656,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$3=yes"
-else $as_nop
- eval "$3=no"
+else case e in #(
+ e) eval "$3=no" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
eval $6=\$ac_save_FLAGS
-
+ ;;
+esac
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2673,8 +2684,8 @@ printf %s "checking for $2.$3... " >&6; }
if eval test \${$4+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
@@ -2690,8 +2701,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$4=yes"
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
@@ -2707,12 +2718,15 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$4=yes"
-else $as_nop
- eval "$4=no"
+else case e in #(
+ e) eval "$4=no" ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$4
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2745,7 +2759,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by python $as_me 3.14, which was
-generated by GNU Autoconf 2.71. Invocation command line was
+generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2991,10 +3005,10 @@ esac
printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
fi
done
@@ -3030,9 +3044,7 @@ struct stat;
/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
struct buf { int x; };
struct buf * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
+static char *e (char **p, int i)
{
return p[i];
}
@@ -3046,6 +3058,21 @@ static char *f (char * (*g) (char **, int), char **p, ...)
return s;
}
+/* C89 style stringification. */
+#define noexpand_stringify(a) #a
+const char *stringified = noexpand_stringify(arbitrary+token=sequence);
+
+/* C89 style token pasting. Exercises some of the corner cases that
+ e.g. old MSVC gets wrong, but not very hard. */
+#define noexpand_concat(a,b) a##b
+#define expand_concat(a,b) noexpand_concat(a,b)
+extern int vA;
+extern int vbee;
+#define aye A
+#define bee B
+int *pvA = &expand_concat(v,aye);
+int *pvbee = &noexpand_concat(v,bee);
+
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not \xHH hex character constants.
These do not provoke an error unfortunately, instead are silently treated
@@ -3073,16 +3100,19 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
# Test code for whether the C compiler supports C99 (global declarations)
ac_c_conftest_c99_globals='
-// Does the compiler advertise C99 conformance?
+/* Does the compiler advertise C99 conformance? */
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
# error "Compiler does not advertise C99 conformance"
#endif
+// See if C++-style comments work.
+
#include <stdbool.h>
extern int puts (const char *);
extern int printf (const char *, ...);
extern int dprintf (int, const char *, ...);
extern void *malloc (size_t);
+extern void free (void *);
// Check varargs macros. These examples are taken from C99 6.10.3.5.
// dprintf is used instead of fprintf to avoid needing to declare
@@ -3132,7 +3162,6 @@ typedef const char *ccp;
static inline int
test_restrict (ccp restrict text)
{
- // See if C++-style comments work.
// Iterate through items via the restricted pointer.
// Also check for declarations in for loops.
for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
@@ -3198,6 +3227,8 @@ ac_c_conftest_c99_main='
ia->datasize = 10;
for (int i = 0; i < ia->datasize; ++i)
ia->data[i] = i * 1.234;
+ // Work around memory leak warnings.
+ free (ia);
// Check named initializers.
struct named_init ni = {
@@ -3219,7 +3250,7 @@ ac_c_conftest_c99_main='
# Test code for whether the C compiler supports C11 (global declarations)
ac_c_conftest_c11_globals='
-// Does the compiler advertise C11 conformance?
+/* Does the compiler advertise C11 conformance? */
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
# error "Compiler does not advertise C11 conformance"
#endif
@@ -3413,8 +3444,9 @@ IFS=$as_save_IFS
if $as_found
then :
-else $as_nop
- as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+else case e in #(
+ e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
+esac
fi
@@ -3442,12 +3474,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -3456,18 +3488,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
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
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
@@ -3483,11 +3515,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
and start over" "$LINENO" 5
fi
## -------------------- ##
@@ -3538,8 +3570,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_HAS_GIT+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$HAS_GIT"; then
+else case e in #(
+ e) if test -n "$HAS_GIT"; then
ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3562,7 +3594,8 @@ done
IFS=$as_save_IFS
test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
-fi
+fi ;;
+esac
fi
HAS_GIT=$ac_cv_prog_HAS_GIT
if test -n "$HAS_GIT"; then
@@ -3604,15 +3637,16 @@ printf %s "checking build system type... " >&6; }
if test ${ac_cv_build+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_build_alias=$build_alias
+else case e in #(
+ e) ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
printf "%s\n" "$ac_cv_build" >&6; }
@@ -3639,14 +3673,15 @@ printf %s "checking host system type... " >&6; }
if test ${ac_cv_host+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "x$host_alias" = x; then
+else case e in #(
+ e) if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
printf "%s\n" "$ac_cv_host" >&6; }
@@ -3710,8 +3745,8 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_build_python" >&5
printf "%s\n" "$with_build_python" >&6; }
-else $as_nop
-
+else case e in #(
+ e)
if test "x$cross_compiling" = xyes
then :
as_fn_error $? "Cross compiling requires --with-build-python" "$LINENO" 5
@@ -3720,7 +3755,8 @@ fi
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
PYTHON_FOR_FREEZE="./_bootstrap_python"
-
+ ;;
+esac
fi
@@ -3740,15 +3776,16 @@ then :
FREEZE_MODULE_DEPS='$(FREEZE_MODULE_BOOTSTRAP_DEPS)'
PYTHON_FOR_BUILD_DEPS=''
-else $as_nop
-
+else case e in #(
+ e)
FREEZE_MODULE_BOOTSTRAP='./Programs/_freeze_module'
FREEZE_MODULE_BOOTSTRAP_DEPS="Programs/_freeze_module"
FREEZE_MODULE='$(PYTHON_FOR_FREEZE) $(srcdir)/Programs/_freeze_module.py'
FREEZE_MODULE_DEPS="_bootstrap_python \$(srcdir)/Programs/_freeze_module.py"
PYTHON_FOR_BUILD_DEPS='$(BUILDPYTHON)'
-
+ ;;
+esac
fi
@@ -3765,8 +3802,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_PYTHON_FOR_REGEN+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$PYTHON_FOR_REGEN"; then
+else case e in #(
+ e) if test -n "$PYTHON_FOR_REGEN"; then
ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3788,7 +3825,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
if test -n "$PYTHON_FOR_REGEN"; then
@@ -3870,9 +3908,10 @@ CONFIG_ARGS="$ac_configure_args"
if test ${with_pkg_config+y}
then :
withval=$with_pkg_config;
-else $as_nop
- with_pkg_config=check
-
+else case e in #(
+ e) with_pkg_config=check
+ ;;
+esac
fi
case $with_pkg_config in #(
@@ -3899,8 +3938,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_PKG_CONFIG+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $PKG_CONFIG in
+else case e in #(
+ e) case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
@@ -3925,6 +3964,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
@@ -3947,8 +3987,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_PKG_CONFIG in
+else case e in #(
+ e) case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
;;
@@ -3973,6 +4013,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
@@ -4208,11 +4249,12 @@ then :
esac
-else $as_nop
-
+else case e in #(
+ e)
UNIVERSALSDK=
enable_universalsdk=
-
+ ;;
+esac
fi
if test -n "${UNIVERSALSDK}"
@@ -4273,12 +4315,13 @@ then :
PYTHONFRAMEWORKDIR=${withval}.framework
PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
-else $as_nop
-
+else case e in #(
+ e)
PYTHONFRAMEWORK=Python
PYTHONFRAMEWORKDIR=Python.framework
PYTHONFRAMEWORKIDENTIFIER=org.python.python
-
+ ;;
+esac
fi
# Check whether --enable-framework was given.
@@ -4411,8 +4454,8 @@ then :
esac
esac
-else $as_nop
-
+else case e in #(
+ e)
case $ac_sys_system in
iOS) as_fn_error $? "iOS builds must use --enable-framework" "$LINENO" 5 ;;
*)
@@ -4435,7 +4478,8 @@ else $as_nop
fi
enable_framework=
esac
-
+ ;;
+esac
fi
@@ -4484,8 +4528,8 @@ printf "%s\n" "applying custom app store compliance patch" >&6; }
;;
esac
-else $as_nop
-
+else case e in #(
+ e)
case $ac_sys_system in
iOS)
# Always apply the compliance patch on iOS; we can use the macOS patch
@@ -4500,7 +4544,8 @@ printf "%s\n" "applying default app store compliance patch" >&6; }
printf "%s\n" "not patching for app store compliance" >&6; }
;;
esac
-
+ ;;
+esac
fi
@@ -4742,8 +4787,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_HAS_XCRUN+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$HAS_XCRUN"; then
+else case e in #(
+ e) if test -n "$HAS_XCRUN"; then
ac_cv_prog_HAS_XCRUN="$HAS_XCRUN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4766,7 +4811,8 @@ done
IFS=$as_save_IFS
test -z "$ac_cv_prog_HAS_XCRUN" && ac_cv_prog_HAS_XCRUN="missing"
-fi
+fi ;;
+esac
fi
HAS_XCRUN=$ac_cv_prog_HAS_XCRUN
if test -n "$HAS_XCRUN"; then
@@ -4869,8 +4915,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4892,7 +4938,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4914,8 +4961,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CC"; then
+else case e in #(
+ e) if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4937,7 +4984,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
@@ -4972,8 +5020,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4995,7 +5043,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -5017,8 +5066,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
@@ -5057,7 +5106,8 @@ if test $ac_prog_rejected = yes; then
ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -5081,8 +5131,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5104,7 +5154,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -5130,8 +5181,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CC"; then
+else case e in #(
+ e) if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5153,7 +5204,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
@@ -5191,8 +5243,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5214,7 +5266,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -5236,8 +5289,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CC"; then
+else case e in #(
+ e) if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5259,7 +5312,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
@@ -5288,10 +5342,10 @@ fi
fi
-test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -5363,8 +5417,8 @@ printf "%s\n" "$ac_try_echo"; } >&5
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
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'
+ # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
+# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
@@ -5384,7 +5438,7 @@ do
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
# We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
+ # safe: cross compilers may not add the suffix if given an '-o'
# argument, so we may need to know it at that point already.
# Even if this section looks crufty: it has the advantage of
# actually working.
@@ -5395,8 +5449,9 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else $as_nop
- ac_file=''
+else case e in #(
+ e) ac_file='' ;;
+esac
fi
if test -z "$ac_file"
then :
@@ -5405,13 +5460,14 @@ printf "%s\n" "no" >&6; }
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+See 'config.log' for more details" "$LINENO" 5; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; } ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
printf %s "checking for C compiler default output file name... " >&6; }
@@ -5435,10 +5491,10 @@ printf "%s\n" "$ac_try_echo"; } >&5
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
+ # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
+# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will
+# work properly (i.e., refer to 'conftest.exe'), while it won't with
+# 'rm'.
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
@@ -5448,11 +5504,12 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else $as_nop
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
fi
rm -f conftest conftest$ac_cv_exeext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -5468,6 +5525,8 @@ int
main (void)
{
FILE *f = fopen ("conftest.out", "w");
+ if (!f)
+ return 1;
return ferror (f) || fclose (f) != 0;
;
@@ -5507,26 +5566,27 @@ printf "%s\n" "$ac_try_echo"; } >&5
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
+If you meant to cross compile, use '--host'.
+See 'config.log' for more details" "$LINENO" 5; }
fi
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
printf "%s\n" "$cross_compiling" >&6; }
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+rm -f conftest.$ac_ext conftest$ac_cv_exeext \
+ conftest.o conftest.obj conftest.out
ac_clean_files=$ac_clean_files_save
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
printf %s "checking for suffix of object files... " >&6; }
if test ${ac_cv_objext+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5558,16 +5618,18 @@ then :
break;;
esac
done
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
+rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
printf "%s\n" "$ac_cv_objext" >&6; }
@@ -5578,8 +5640,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; }
if test ${ac_cv_c_compiler_gnu+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5596,12 +5658,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_compiler_gnu=yes
-else $as_nop
- ac_compiler_gnu=no
+else case e in #(
+ e) ac_compiler_gnu=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
@@ -5619,8 +5683,8 @@ printf %s "checking whether $CC accepts -g... " >&6; }
if test ${ac_cv_prog_cc_g+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_c_werror_flag=$ac_c_werror_flag
+else case e in #(
+ e) ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
@@ -5638,8 +5702,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_prog_cc_g=yes
-else $as_nop
- CFLAGS=""
+else case e in #(
+ e) CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5654,8 +5718,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
-else $as_nop
- ac_c_werror_flag=$ac_save_c_werror_flag
+else case e in #(
+ e) ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5672,12 +5736,15 @@ if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
+ ac_c_werror_flag=$ac_save_c_werror_flag ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
@@ -5704,8 +5771,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; }
if test ${ac_cv_prog_cc_c11+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cc_c11=no
+else case e in #(
+ e) ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5722,25 +5789,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c11" != "xno" && break
done
rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
fi
if test "x$ac_cv_prog_cc_c11" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cc_c11" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cc_c11" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
- CC="$CC $ac_cv_prog_cc_c11"
+ CC="$CC $ac_cv_prog_cc_c11" ;;
+esac
fi
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
- ac_prog_cc_stdc=c11
+ ac_prog_cc_stdc=c11 ;;
+esac
fi
fi
if test x$ac_prog_cc_stdc = xno
@@ -5750,8 +5820,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; }
if test ${ac_cv_prog_cc_c99+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cc_c99=no
+else case e in #(
+ e) ac_cv_prog_cc_c99=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5768,25 +5838,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c99" != "xno" && break
done
rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
fi
if test "x$ac_cv_prog_cc_c99" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cc_c99" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cc_c99" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
- CC="$CC $ac_cv_prog_cc_c99"
+ CC="$CC $ac_cv_prog_cc_c99" ;;
+esac
fi
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
- ac_prog_cc_stdc=c99
+ ac_prog_cc_stdc=c99 ;;
+esac
fi
fi
if test x$ac_prog_cc_stdc = xno
@@ -5796,8 +5869,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; }
if test ${ac_cv_prog_cc_c89+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cc_c89=no
+else case e in #(
+ e) ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5814,25 +5887,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
fi
if test "x$ac_cv_prog_cc_c89" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cc_c89" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cc_c89" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
- CC="$CC $ac_cv_prog_cc_c89"
+ CC="$CC $ac_cv_prog_cc_c89" ;;
+esac
fi
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
- ac_prog_cc_stdc=c89
+ ac_prog_cc_stdc=c89 ;;
+esac
fi
fi
@@ -5857,8 +5933,8 @@ if test -z "$CPP"; then
if test ${ac_cv_prog_CPP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- # Double quotes because $CC needs to be expanded
+else case e in #(
+ e) # Double quotes because $CC needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
do
ac_preproc_ok=false
@@ -5876,9 +5952,10 @@ _ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
-else $as_nop
- # Broken: fails on valid input.
-continue
+else case e in #(
+ e) # Broken: fails on valid input.
+continue ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
@@ -5892,15 +5969,16 @@ if ac_fn_c_try_cpp "$LINENO"
then :
# Broken: success on invalid input.
continue
-else $as_nop
- # Passes both tests.
+else case e in #(
+ e) # Passes both tests.
ac_preproc_ok=:
-break
+break ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
@@ -5909,7 +5987,8 @@ fi
done
ac_cv_prog_CPP=$CPP
-
+ ;;
+esac
fi
CPP=$ac_cv_prog_CPP
else
@@ -5932,9 +6011,10 @@ _ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
-else $as_nop
- # Broken: fails on valid input.
-continue
+else case e in #(
+ e) # Broken: fails on valid input.
+continue ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
@@ -5948,24 +6028,26 @@ if ac_fn_c_try_cpp "$LINENO"
then :
# Broken: success on invalid input.
continue
-else $as_nop
- # Passes both tests.
+else case e in #(
+ e) # Passes both tests.
ac_preproc_ok=:
-break
+break ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
-else $as_nop
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
fi
ac_ext=c
@@ -5979,8 +6061,8 @@ printf %s "checking for grep that handles long lines and -e... " >&6; }
if test ${ac_cv_path_GREP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$GREP"; then
+else case e in #(
+ e) 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
@@ -5999,9 +6081,10 @@ do
as_fn_executable_p "$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
+case `"$ac_path_GREP" --version 2>&1` in #(
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6036,7 +6119,8 @@ IFS=$as_save_IFS
else
ac_cv_path_GREP=$GREP
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
printf "%s\n" "$ac_cv_path_GREP" >&6; }
@@ -6048,8 +6132,8 @@ printf %s "checking for a sed that does not truncate output... " >&6; }
if test ${ac_cv_path_SED+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+else case e in #(
+ e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
for ac_i in 1 2 3 4 5 6 7; do
ac_script="$ac_script$as_nl$ac_script"
done
@@ -6074,9 +6158,10 @@ do
as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
+case `"$ac_path_SED" --version 2>&1` in #(
*GNU*)
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6111,7 +6196,8 @@ IFS=$as_save_IFS
else
ac_cv_path_SED=$SED
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
printf "%s\n" "$ac_cv_path_SED" >&6; }
@@ -6123,8 +6209,8 @@ printf %s "checking for egrep... " >&6; }
if test ${ac_cv_path_EGREP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+else case e in #(
+ e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
if test -z "$EGREP"; then
@@ -6146,9 +6232,10 @@ do
as_fn_executable_p "$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
+case `"$ac_path_EGREP" --version 2>&1` in #(
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6184,12 +6271,15 @@ else
ac_cv_path_EGREP=$EGREP
fi
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
printf "%s\n" "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
+ EGREP_TRADITIONAL=$EGREP
+ ac_cv_path_EGREP_TRADITIONAL=$EGREP
CC_BASENAME=$(expr "//$CC" : '.*/\(.*\)')
@@ -6199,8 +6289,8 @@ printf %s "checking for CC compiler name... " >&6; }
if test ${ac_cv_cc_name+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat > conftest.c <<EOF
#if defined(__EMSCRIPTEN__)
emcc
@@ -6229,7 +6319,8 @@ else
ac_cv_cc_name="unknown"
fi
rm -f conftest.c conftest.out
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_name" >&5
printf "%s\n" "$ac_cv_cc_name" >&6; }
@@ -6278,8 +6369,8 @@ printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
if test ${ac_cv_safe_to_define___extensions__+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
# define __EXTENSIONS__ 1
@@ -6295,10 +6386,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_safe_to_define___extensions__=yes
-else $as_nop
- ac_cv_safe_to_define___extensions__=no
+else case e in #(
+ e) ac_cv_safe_to_define___extensions__=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
@@ -6308,8 +6401,8 @@ printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
if test ${ac_cv_should_define__xopen_source+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_should_define__xopen_source=no
+else case e in #(
+ e) ac_cv_should_define__xopen_source=no
if test $ac_cv_header_wchar_h = yes
then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6328,8 +6421,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _XOPEN_SOURCE 500
@@ -6347,10 +6440,12 @@ if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_should_define__xopen_source=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
@@ -6375,6 +6470,8 @@ printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h
+
printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
@@ -6394,8 +6491,9 @@ then :
printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
-else $as_nop
- MINIX=
+else case e in #(
+ e) MINIX= ;;
+esac
fi
if test $ac_cv_safe_to_define___extensions__ = yes
then :
@@ -6415,8 +6513,8 @@ printf %s "checking for GCC compatible compiler... " >&6; }
if test ${ac_cv_gcc_compat+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if !defined(__GNUC__)
@@ -6429,10 +6527,12 @@ _ACEOF
if ac_fn_c_try_cpp "$LINENO"
then :
ac_cv_gcc_compat=yes
-else $as_nop
- ac_cv_gcc_compat=no
+else case e in #(
+ e) ac_cv_gcc_compat=no ;;
+esac
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_compat" >&5
printf "%s\n" "$ac_cv_gcc_compat" >&6; }
@@ -6451,8 +6551,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $CXX in
+else case e in #(
+ e) case $CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
;;
@@ -6477,6 +6577,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
CXX=$ac_cv_path_CXX
@@ -6499,8 +6600,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_CXX in
+else case e in #(
+ e) case $ac_pt_CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
;;
@@ -6525,6 +6626,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_CXX=$ac_cv_path_ac_pt_CXX
@@ -6559,8 +6661,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $CXX in
+else case e in #(
+ e) case $CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
;;
@@ -6585,6 +6687,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
CXX=$ac_cv_path_CXX
@@ -6607,8 +6710,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_CXX in
+else case e in #(
+ e) case $ac_pt_CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
;;
@@ -6633,6 +6736,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_CXX=$ac_cv_path_ac_pt_CXX
@@ -6667,8 +6771,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $CXX in
+else case e in #(
+ e) case $CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
;;
@@ -6693,6 +6797,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
CXX=$ac_cv_path_CXX
@@ -6715,8 +6820,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_CXX in
+else case e in #(
+ e) case $ac_pt_CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
;;
@@ -6741,6 +6846,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_CXX=$ac_cv_path_ac_pt_CXX
@@ -6775,8 +6881,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $CXX in
+else case e in #(
+ e) case $CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
;;
@@ -6801,6 +6907,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
CXX=$ac_cv_path_CXX
@@ -6823,8 +6930,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_CXX in
+else case e in #(
+ e) case $ac_pt_CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
;;
@@ -6849,6 +6956,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_CXX=$ac_cv_path_ac_pt_CXX
@@ -6893,8 +7001,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CXX"; then
+else case e in #(
+ e) if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -6916,7 +7024,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
@@ -6942,8 +7051,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CXX"; then
+else case e in #(
+ e) if test -n "$ac_ct_CXX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -6965,7 +7074,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
@@ -7139,8 +7249,8 @@ printf %s "checking for -Wl,--no-as-needed... " >&6; }
if test ${ac_cv_wl_no_as_needed+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
save_LDFLAGS="$LDFLAGS"
as_fn_append LDFLAGS " -Wl,--no-as-needed"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7158,14 +7268,16 @@ if ac_fn_c_try_link "$LINENO"
then :
NO_AS_NEEDED="-Wl,--no-as-needed"
ac_cv_wl_no_as_needed=yes
-else $as_nop
- NO_AS_NEEDED=""
- ac_cv_wl_no_as_needed=no
+else case e in #(
+ e) NO_AS_NEEDED=""
+ ac_cv_wl_no_as_needed=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS="$save_LDFLAGS"
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wl_no_as_needed" >&5
printf "%s\n" "$ac_cv_wl_no_as_needed" >&6; }
@@ -7238,10 +7350,11 @@ then :
;;
esac
-else $as_nop
-
+else case e in #(
+ e)
enable_wasm_dynamic_linking=missing
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_wasm_dynamic_linking" >&5
@@ -7263,10 +7376,11 @@ then :
;;
esac
-else $as_nop
-
+else case e in #(
+ e)
enable_wasm_pthreads=missing
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_wasm_pthreads" >&5
@@ -7289,8 +7403,8 @@ then :
;;
esac
-else $as_nop
-
+else case e in #(
+ e)
case $ac_sys_system in #(
Emscripten) :
EXEEXT=.mjs ;; #(
@@ -7300,7 +7414,8 @@ else $as_nop
EXEEXT=
;;
esac
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
@@ -7476,9 +7591,10 @@ else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; };
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; } ;;
+esac
fi
@@ -7501,8 +7617,9 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
-else $as_nop
- enable_profiling=no
+else case e in #(
+ e) enable_profiling=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -7640,8 +7757,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_NODE+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $NODE in
+else case e in #(
+ e) case $NODE in
[\\/]* | ?:[\\/]*)
ac_cv_path_NODE="$NODE" # Let the user override the test with a path.
;;
@@ -7666,6 +7783,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
NODE=$ac_cv_path_NODE
@@ -7688,8 +7806,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_NODE+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_NODE in
+else case e in #(
+ e) case $ac_pt_NODE in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_NODE="$ac_pt_NODE" # Let the user override the test with a path.
;;
@@ -7714,6 +7832,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_NODE=$ac_cv_path_ac_pt_NODE
@@ -7798,8 +7917,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$AR"; then
+else case e in #(
+ e) if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7821,7 +7940,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
@@ -7847,8 +7967,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_AR"; then
+else case e in #(
+ e) if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7870,7 +7990,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
@@ -7935,8 +8056,8 @@ if test -z "$INSTALL"; then
if test ${ac_cv_path_install+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
@@ -7990,7 +8111,8 @@ esac
IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
-
+ ;;
+esac
fi
if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
@@ -8020,8 +8142,8 @@ if test -z "$MKDIR_P"; then
if test ${ac_cv_path_mkdir+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
@@ -8035,7 +8157,7 @@ do
as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir ('*'coreutils) '* | \
- 'BusyBox '* | \
+ *'BusyBox '* | \
'mkdir (fileutils) '4.1*)
ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
@@ -8044,18 +8166,17 @@ do
done
done
IFS=$as_save_IFS
-
+ ;;
+esac
fi
test -d ./--version && rmdir ./--version
if test ${ac_cv_path_mkdir+y}; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
- # As a last resort, use the slow shell script. Don't cache a
- # value for MKDIR_P within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- MKDIR_P="$ac_install_sh -d"
+ # As a last resort, use plain mkdir -p,
+ # in the hope it doesn't have the bugs of ancient mkdir.
+ MKDIR_P='mkdir -p'
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
@@ -8087,12 +8208,14 @@ then :
enableval=$enable_gil; if test "x$enable_gil" = xyes
then :
disable_gil=no
-else $as_nop
- disable_gil=yes
+else case e in #(
+ e) disable_gil=yes ;;
+esac
fi
-else $as_nop
- disable_gil=no
-
+else case e in #(
+ e) disable_gil=no
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $disable_gil" >&5
@@ -8128,9 +8251,10 @@ printf "%s\n" "yes" >&6; };
else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }; Py_DEBUG='false'
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
@@ -8143,9 +8267,10 @@ printf %s "checking for --with-trace-refs... " >&6; }
if test ${with_trace_refs+y}
then :
withval=$with_trace_refs;
-else $as_nop
- with_trace_refs=no
-
+else case e in #(
+ e) with_trace_refs=no
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
@@ -8170,9 +8295,10 @@ printf %s "checking for --enable-pystats... " >&6; }
if test ${enable_pystats+y}
then :
enableval=$enable_pystats;
-else $as_nop
- enable_pystats=no
-
+else case e in #(
+ e) enable_pystats=no
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pystats" >&5
@@ -8222,8 +8348,9 @@ printf %s "checking for --enable-experimental-jit... " >&6; }
if test ${enable_experimental_jit+y}
then :
enableval=$enable_experimental_jit;
-else $as_nop
- enable_experimental_jit=no
+else case e in #(
+ e) enable_experimental_jit=no ;;
+esac
fi
case $enable_experimental_jit in
@@ -8237,20 +8364,22 @@ esac
if ${tier2_flags:+false} :
then :
-else $as_nop
- as_fn_append CFLAGS_NODIST " $tier2_flags"
+else case e in #(
+ e) as_fn_append CFLAGS_NODIST " $tier2_flags" ;;
+esac
fi
if ${jit_flags:+false} :
then :
-else $as_nop
- as_fn_append CFLAGS_NODIST " $jit_flags"
+else case e in #(
+ e) as_fn_append CFLAGS_NODIST " $jit_flags"
REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py $host"
JIT_STENCILS_H="jit_stencils.h"
if test "x$Py_DEBUG" = xtrue
then :
as_fn_append REGEN_JIT_COMMAND " --debug"
-fi
+fi ;;
+esac
fi
@@ -8277,9 +8406,10 @@ else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; };
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
@@ -8299,8 +8429,8 @@ printf %s "checking whether C compiler accepts -fno-semantic-interposition... "
if test ${ax_cv_check_cflags__Werror__fno_semantic_interposition+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -fno-semantic-interposition"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8317,11 +8447,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__fno_semantic_interposition=yes
-else $as_nop
- ax_cv_check_cflags__Werror__fno_semantic_interposition=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__fno_semantic_interposition=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__fno_semantic_interposition" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__fno_semantic_interposition" >&6; }
@@ -8331,8 +8463,9 @@ then :
CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
@@ -8419,9 +8552,10 @@ printf "%s\n" "no" >&6; }
;;
esac
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
if test "$Py_LTO" = 'true' ; then
@@ -8433,8 +8567,8 @@ printf %s "checking whether C compiler accepts -flto=thin... " >&6; }
if test ${ax_cv_check_cflags___flto_thin+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -flto=thin"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8451,19 +8585,22 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___flto_thin=yes
-else $as_nop
- ax_cv_check_cflags___flto_thin=no
+else case e in #(
+ e) ax_cv_check_cflags___flto_thin=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___flto_thin" >&5
printf "%s\n" "$ax_cv_check_cflags___flto_thin" >&6; }
if test "x$ax_cv_check_cflags___flto_thin" = xyes
then :
LDFLAGS_NOLTO="-flto=thin"
-else $as_nop
- LDFLAGS_NOLTO="-flto"
+else case e in #(
+ e) LDFLAGS_NOLTO="-flto" ;;
+esac
fi
@@ -8475,8 +8612,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_LLVM_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $LLVM_AR in
+else case e in #(
+ e) case $LLVM_AR in
[\\/]* | ?:[\\/]*)
ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
;;
@@ -8501,6 +8638,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
LLVM_AR=$ac_cv_path_LLVM_AR
@@ -8523,8 +8661,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_LLVM_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_LLVM_AR in
+else case e in #(
+ e) case $ac_pt_LLVM_AR in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
;;
@@ -8549,6 +8687,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
@@ -8613,8 +8752,8 @@ printf %s "checking whether C compiler accepts -flto=thin... " >&6; }
if test ${ax_cv_check_cflags___flto_thin+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -flto=thin"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8631,11 +8770,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___flto_thin=yes
-else $as_nop
- ax_cv_check_cflags___flto_thin=no
+else case e in #(
+ e) ax_cv_check_cflags___flto_thin=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___flto_thin" >&5
printf "%s\n" "$ax_cv_check_cflags___flto_thin" >&6; }
@@ -8645,12 +8786,13 @@ then :
LTOFLAGS="-flto=thin -Wl,-export_dynamic -Wl,-object_path_lto,\"\$@\".lto"
LTOCFLAGS="-flto=thin"
-else $as_nop
-
+else case e in #(
+ e)
LTOFLAGS="-flto -Wl,-export_dynamic -Wl,-object_path_lto,\"\$@\".lto"
LTOCFLAGS="-flto"
-
+ ;;
+esac
fi
else
@@ -8667,8 +8809,8 @@ printf %s "checking whether C compiler accepts -flto=thin... " >&6; }
if test ${ax_cv_check_cflags___flto_thin+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -flto=thin"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8685,19 +8827,22 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___flto_thin=yes
-else $as_nop
- ax_cv_check_cflags___flto_thin=no
+else case e in #(
+ e) ax_cv_check_cflags___flto_thin=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___flto_thin" >&5
printf "%s\n" "$ax_cv_check_cflags___flto_thin" >&6; }
if test "x$ax_cv_check_cflags___flto_thin" = xyes
then :
LTOFLAGS="-flto=thin"
-else $as_nop
- LTOFLAGS="-flto"
+else case e in #(
+ e) LTOFLAGS="-flto" ;;
+esac
fi
else
@@ -8757,8 +8902,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_LLVM_PROFDATA+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $LLVM_PROFDATA in
+else case e in #(
+ e) case $LLVM_PROFDATA in
[\\/]* | ?:[\\/]*)
ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
;;
@@ -8783,6 +8928,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
@@ -8805,8 +8951,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_LLVM_PROFDATA+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_LLVM_PROFDATA in
+else case e in #(
+ e) case $ac_pt_LLVM_PROFDATA in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
;;
@@ -8831,6 +8977,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
@@ -8927,9 +9074,10 @@ else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; };
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
@@ -8946,8 +9094,8 @@ printf %s "checking whether C compiler accepts -fno-reorder-blocks-and-partition
if test ${ax_cv_check_cflags___fno_reorder_blocks_and_partition+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -fno-reorder-blocks-and-partition"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8964,11 +9112,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___fno_reorder_blocks_and_partition=yes
-else $as_nop
- ax_cv_check_cflags___fno_reorder_blocks_and_partition=no
+else case e in #(
+ e) ax_cv_check_cflags___fno_reorder_blocks_and_partition=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_reorder_blocks_and_partition" >&5
printf "%s\n" "$ax_cv_check_cflags___fno_reorder_blocks_and_partition" >&6; }
@@ -8977,8 +9127,9 @@ then :
CFLAGS_NODIST="$CFLAGS_NODIST -fno-reorder-blocks-and-partition"
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
@@ -8998,8 +9149,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_LLVM_BOLT+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $LLVM_BOLT in
+else case e in #(
+ e) case $LLVM_BOLT in
[\\/]* | ?:[\\/]*)
ac_cv_path_LLVM_BOLT="$LLVM_BOLT" # Let the user override the test with a path.
;;
@@ -9024,6 +9175,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
LLVM_BOLT=$ac_cv_path_LLVM_BOLT
@@ -9046,8 +9198,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_LLVM_BOLT+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_LLVM_BOLT in
+else case e in #(
+ e) case $ac_pt_LLVM_BOLT in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_LLVM_BOLT="$ac_pt_LLVM_BOLT" # Let the user override the test with a path.
;;
@@ -9072,6 +9224,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_LLVM_BOLT=$ac_cv_path_ac_pt_LLVM_BOLT
@@ -9115,8 +9268,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MERGE_FDATA+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $MERGE_FDATA in
+else case e in #(
+ e) case $MERGE_FDATA in
[\\/]* | ?:[\\/]*)
ac_cv_path_MERGE_FDATA="$MERGE_FDATA" # Let the user override the test with a path.
;;
@@ -9141,6 +9294,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
MERGE_FDATA=$ac_cv_path_MERGE_FDATA
@@ -9163,8 +9317,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_ac_pt_MERGE_FDATA+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $ac_pt_MERGE_FDATA in
+else case e in #(
+ e) case $ac_pt_MERGE_FDATA in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_MERGE_FDATA="$ac_pt_MERGE_FDATA" # Let the user override the test with a path.
;;
@@ -9189,6 +9343,7 @@ done
IFS=$as_save_IFS
;;
+esac ;;
esac
fi
ac_pt_MERGE_FDATA=$ac_cv_path_ac_pt_MERGE_FDATA
@@ -9274,8 +9429,8 @@ printf %s "checking if $CC supports -fstrict-overflow and -fno-strict-overflow..
if test ${ac_cv_cc_supports_fstrict_overflow+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -9289,12 +9444,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_cc_supports_fstrict_overflow=yes
-else $as_nop
- ac_cv_cc_supports_fstrict_overflow=no
-
+else case e in #(
+ e) ac_cv_cc_supports_fstrict_overflow=no
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_fstrict_overflow" >&5
printf "%s\n" "$ac_cv_cc_supports_fstrict_overflow" >&6; }
@@ -9304,9 +9461,10 @@ if test "x$ac_cv_cc_supports_fstrict_overflow" = xyes
then :
STRICT_OVERFLOW_CFLAGS="-fstrict-overflow"
NO_STRICT_OVERFLOW_CFLAGS="-fno-strict-overflow"
-else $as_nop
- STRICT_OVERFLOW_CFLAGS=""
- NO_STRICT_OVERFLOW_CFLAGS=""
+else case e in #(
+ e) STRICT_OVERFLOW_CFLAGS=""
+ NO_STRICT_OVERFLOW_CFLAGS="" ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-strict-overflow" >&5
@@ -9322,9 +9480,10 @@ then :
printf "%s\n" "$as_me: WARNING: --with-strict-overflow=yes requires a compiler that supports -fstrict-overflow" >&2;}
fi
-else $as_nop
- with_strict_overflow=no
-
+else case e in #(
+ e) with_strict_overflow=no
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_strict_overflow" >&5
@@ -9338,8 +9497,8 @@ printf %s "checking if $CC supports -Og optimization level... " >&6; }
if test ${ac_cv_cc_supports_og+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9357,13 +9516,15 @@ then :
ac_cv_cc_supports_og=yes
-else $as_nop
-
+else case e in #(
+ e)
ac_cv_cc_supports_og=no
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_og" >&5
printf "%s\n" "$ac_cv_cc_supports_og" >&6; }
@@ -9429,8 +9590,9 @@ case $ac_sys_system in #(
if test "x$Py_DEBUG" = xyes
then :
wasm_debug=yes
-else $as_nop
- wasm_debug=no
+else case e in #(
+ e) wasm_debug=no ;;
+esac
fi
as_fn_append LINKFORSHARED " -sALLOW_MEMORY_GROWTH -sINITIAL_MEMORY=20971520"
@@ -9466,10 +9628,11 @@ then :
as_fn_append LDFLAGS_NODIST " -sASSERTIONS"
as_fn_append LINKFORSHARED " $WASM_LINKFORSHARED_DEBUG"
-else $as_nop
-
+else case e in #(
+ e)
as_fn_append LINKFORSHARED " -O2 -g0"
-
+ ;;
+esac
fi
;; #(
WASI) :
@@ -9542,8 +9705,9 @@ UNIVERSAL_ARCH_FLAGS=
if test "x$with_strict_overflow" = xyes
then :
BASECFLAGS="$BASECFLAGS $STRICT_OVERFLOW_CFLAGS"
-else $as_nop
- BASECFLAGS="$BASECFLAGS $NO_STRICT_OVERFLOW_CFLAGS"
+else case e in #(
+ e) BASECFLAGS="$BASECFLAGS $NO_STRICT_OVERFLOW_CFLAGS" ;;
+esac
fi
# Enable flags that warn and protect for potential security vulnerabilities.
@@ -9557,11 +9721,13 @@ then :
enableval=$enable_safety; if test "x$disable_safety" = xyes
then :
enable_safety=no
-else $as_nop
- enable_safety=yes
+else case e in #(
+ e) enable_safety=yes ;;
+esac
fi
-else $as_nop
- enable_safety=no
+else case e in #(
+ e) enable_safety=no ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_safety" >&5
@@ -9574,8 +9740,8 @@ printf %s "checking whether C compiler accepts -fstack-protector-strong... " >&6
if test ${ax_cv_check_cflags__Werror__fstack_protector_strong+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -fstack-protector-strong"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9592,20 +9758,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__fstack_protector_strong=yes
-else $as_nop
- ax_cv_check_cflags__Werror__fstack_protector_strong=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__fstack_protector_strong=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__fstack_protector_strong" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__fstack_protector_strong" >&6; }
if test "x$ax_cv_check_cflags__Werror__fstack_protector_strong" = xyes
then :
CFLAGS_NODIST="$CFLAGS_NODIST -fstack-protector-strong"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -fstack-protector-strong not supported" >&5
-printf "%s\n" "$as_me: WARNING: -fstack-protector-strong not supported" >&2;}
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -fstack-protector-strong not supported" >&5
+printf "%s\n" "$as_me: WARNING: -fstack-protector-strong not supported" >&2;} ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wtrampolines" >&5
@@ -9613,8 +9782,8 @@ printf %s "checking whether C compiler accepts -Wtrampolines... " >&6; }
if test ${ax_cv_check_cflags__Werror__Wtrampolines+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -Wtrampolines"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9631,20 +9800,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__Wtrampolines=yes
-else $as_nop
- ax_cv_check_cflags__Werror__Wtrampolines=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__Wtrampolines=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__Wtrampolines" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__Wtrampolines" >&6; }
if test "x$ax_cv_check_cflags__Werror__Wtrampolines" = xyes
then :
CFLAGS_NODIST="$CFLAGS_NODIST -Wtrampolines"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Wtrampolines not supported" >&5
-printf "%s\n" "$as_me: WARNING: -Wtrampolines not supported" >&2;}
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Wtrampolines not supported" >&5
+printf "%s\n" "$as_me: WARNING: -Wtrampolines not supported" >&2;} ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wimplicit-fallthrough" >&5
@@ -9652,8 +9824,8 @@ printf %s "checking whether C compiler accepts -Wimplicit-fallthrough... " >&6;
if test ${ax_cv_check_cflags__Werror__Wimplicit_fallthrough+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9670,20 +9842,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__Wimplicit_fallthrough=yes
-else $as_nop
- ax_cv_check_cflags__Werror__Wimplicit_fallthrough=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__Wimplicit_fallthrough=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__Wimplicit_fallthrough" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__Wimplicit_fallthrough" >&6; }
if test "x$ax_cv_check_cflags__Werror__Wimplicit_fallthrough" = xyes
then :
CFLAGS_NODIST="$CFLAGS_NODIST -Wimplicit-fallthrough"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Wimplicit-fallthrough not supported" >&5
-printf "%s\n" "$as_me: WARNING: -Wimplicit-fallthrough not supported" >&2;}
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Wimplicit-fallthrough not supported" >&5
+printf "%s\n" "$as_me: WARNING: -Wimplicit-fallthrough not supported" >&2;} ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror=format-security" >&5
@@ -9691,8 +9866,8 @@ printf %s "checking whether C compiler accepts -Werror=format-security... " >&6;
if test ${ax_cv_check_cflags__Werror__Werror_format_security+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -Werror=format-security"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9709,20 +9884,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__Werror_format_security=yes
-else $as_nop
- ax_cv_check_cflags__Werror__Werror_format_security=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__Werror_format_security=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__Werror_format_security" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__Werror_format_security" >&6; }
if test "x$ax_cv_check_cflags__Werror__Werror_format_security" = xyes
then :
CFLAGS_NODIST="$CFLAGS_NODIST -Werror=format-security"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Werror=format-security not supported" >&5
-printf "%s\n" "$as_me: WARNING: -Werror=format-security not supported" >&2;}
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Werror=format-security not supported" >&5
+printf "%s\n" "$as_me: WARNING: -Werror=format-security not supported" >&2;} ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wbidi-chars=any" >&5
@@ -9730,8 +9908,8 @@ printf %s "checking whether C compiler accepts -Wbidi-chars=any... " >&6; }
if test ${ax_cv_check_cflags__Werror__Wbidi_chars_any+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -Wbidi-chars=any"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9748,20 +9926,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__Wbidi_chars_any=yes
-else $as_nop
- ax_cv_check_cflags__Werror__Wbidi_chars_any=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__Wbidi_chars_any=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__Wbidi_chars_any" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__Wbidi_chars_any" >&6; }
if test "x$ax_cv_check_cflags__Werror__Wbidi_chars_any" = xyes
then :
CFLAGS_NODIST="$CFLAGS_NODIST -Wbidi-chars=any"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Wbidi-chars=any not supported" >&5
-printf "%s\n" "$as_me: WARNING: -Wbidi-chars=any not supported" >&2;}
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Wbidi-chars=any not supported" >&5
+printf "%s\n" "$as_me: WARNING: -Wbidi-chars=any not supported" >&2;} ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wall" >&5
@@ -9769,8 +9950,8 @@ printf %s "checking whether C compiler accepts -Wall... " >&6; }
if test ${ax_cv_check_cflags__Werror__Wall+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -Wall"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9787,20 +9968,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__Wall=yes
-else $as_nop
- ax_cv_check_cflags__Werror__Wall=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__Wall=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__Wall" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__Wall" >&6; }
if test "x$ax_cv_check_cflags__Werror__Wall" = xyes
then :
CFLAGS_NODIST="$CFLAGS_NODIST -Wall"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Wall not supported" >&5
-printf "%s\n" "$as_me: WARNING: -Wall not supported" >&2;}
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -Wall not supported" >&5
+printf "%s\n" "$as_me: WARNING: -Wall not supported" >&2;} ;;
+esac
fi
fi
@@ -9813,11 +9997,13 @@ then :
enableval=$enable_slower_safety; if test "x$disable_slower_safety" = xyes
then :
enable_slower_safety=no
-else $as_nop
- enable_slower_safety=yes
+else case e in #(
+ e) enable_slower_safety=yes ;;
+esac
fi
-else $as_nop
- enable_slower_safety=no
+else case e in #(
+ e) enable_slower_safety=no ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_slower_safety" >&5
@@ -9830,8 +10016,8 @@ printf %s "checking whether C compiler accepts -D_FORTIFY_SOURCE=3... " >&6; }
if test ${ax_cv_check_cflags__Werror__D_FORTIFY_SOURCE_3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -D_FORTIFY_SOURCE=3"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9848,20 +10034,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__D_FORTIFY_SOURCE_3=yes
-else $as_nop
- ax_cv_check_cflags__Werror__D_FORTIFY_SOURCE_3=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__D_FORTIFY_SOURCE_3=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__D_FORTIFY_SOURCE_3" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__D_FORTIFY_SOURCE_3" >&6; }
if test "x$ax_cv_check_cflags__Werror__D_FORTIFY_SOURCE_3" = xyes
then :
CFLAGS_NODIST="$CFLAGS_NODIST -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -D_FORTIFY_SOURCE=3 not supported" >&5
-printf "%s\n" "$as_me: WARNING: -D_FORTIFY_SOURCE=3 not supported" >&2;}
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: -D_FORTIFY_SOURCE=3 not supported" >&5
+printf "%s\n" "$as_me: WARNING: -D_FORTIFY_SOURCE=3 not supported" >&2;} ;;
+esac
fi
fi
@@ -9878,8 +10067,8 @@ printf %s "checking if we can add -Wextra... " >&6; }
if test ${ac_cv_enable_extra_warning+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
py_cflags=$CFLAGS
as_fn_append CFLAGS " -Wextra -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9896,12 +10085,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_enable_extra_warning=yes
-else $as_nop
- ac_cv_enable_extra_warning=no
+else case e in #(
+ e) ac_cv_enable_extra_warning=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$py_cflags
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_extra_warning" >&5
printf "%s\n" "$ac_cv_enable_extra_warning" >&6; }
@@ -9924,8 +10115,8 @@ printf %s "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6;
if test ${ac_cv_no_strict_aliasing+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9961,19 +10152,22 @@ then :
ac_cv_no_strict_aliasing=no
-else $as_nop
-
+else case e in #(
+ e)
ac_cv_no_strict_aliasing=yes
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-else $as_nop
-
+else case e in #(
+ e)
ac_cv_no_strict_aliasing=no
-
+ ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
printf "%s\n" "$ac_cv_no_strict_aliasing" >&6; }
@@ -9996,8 +10190,8 @@ printf %s "checking if we can disable $CC unused-result warning... " >&6; }
if test ${ac_cv_disable_unused_result_warning+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
py_cflags=$CFLAGS
as_fn_append CFLAGS " -Wunused-result -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10014,12 +10208,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_disable_unused_result_warning=yes
-else $as_nop
- ac_cv_disable_unused_result_warning=no
+else case e in #(
+ e) ac_cv_disable_unused_result_warning=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$py_cflags
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
printf "%s\n" "$ac_cv_disable_unused_result_warning" >&6; }
@@ -10041,8 +10237,8 @@ printf %s "checking if we can disable $CC unused-parameter warning... " >&6; }
if test ${ac_cv_disable_unused_parameter_warning+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
py_cflags=$CFLAGS
as_fn_append CFLAGS " -Wunused-parameter -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10059,12 +10255,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_disable_unused_parameter_warning=yes
-else $as_nop
- ac_cv_disable_unused_parameter_warning=no
+else case e in #(
+ e) ac_cv_disable_unused_parameter_warning=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$py_cflags
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
printf "%s\n" "$ac_cv_disable_unused_parameter_warning" >&6; }
@@ -10082,8 +10280,8 @@ printf %s "checking if we can disable $CC int-conversion warning... " >&6; }
if test ${ac_cv_disable_int_conversion_warning+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
py_cflags=$CFLAGS
as_fn_append CFLAGS " -Wint-conversion -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10100,12 +10298,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_disable_int_conversion_warning=yes
-else $as_nop
- ac_cv_disable_int_conversion_warning=no
+else case e in #(
+ e) ac_cv_disable_int_conversion_warning=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$py_cflags
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_int_conversion_warning" >&5
printf "%s\n" "$ac_cv_disable_int_conversion_warning" >&6; }
@@ -10123,8 +10323,8 @@ printf %s "checking if we can disable $CC missing-field-initializers warning...
if test ${ac_cv_disable_missing_field_initializers_warning+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
py_cflags=$CFLAGS
as_fn_append CFLAGS " -Wmissing-field-initializers -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10141,12 +10341,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_disable_missing_field_initializers_warning=yes
-else $as_nop
- ac_cv_disable_missing_field_initializers_warning=no
+else case e in #(
+ e) ac_cv_disable_missing_field_initializers_warning=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$py_cflags
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers_warning" >&5
printf "%s\n" "$ac_cv_disable_missing_field_initializers_warning" >&6; }
@@ -10164,8 +10366,8 @@ printf %s "checking if we can enable $CC sign-compare warning... " >&6; }
if test ${ac_cv_enable_sign_compare_warning+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
py_cflags=$CFLAGS
as_fn_append CFLAGS " -Wsign-compare -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10182,12 +10384,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_enable_sign_compare_warning=yes
-else $as_nop
- ac_cv_enable_sign_compare_warning=no
+else case e in #(
+ e) ac_cv_enable_sign_compare_warning=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$py_cflags
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
printf "%s\n" "$ac_cv_enable_sign_compare_warning" >&6; }
@@ -10205,8 +10409,8 @@ printf %s "checking if we can enable $CC unreachable-code warning... " >&6; }
if test ${ac_cv_enable_unreachable_code_warning+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
py_cflags=$CFLAGS
as_fn_append CFLAGS " -Wunreachable-code -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10223,12 +10427,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_enable_unreachable_code_warning=yes
-else $as_nop
- ac_cv_enable_unreachable_code_warning=no
+else case e in #(
+ e) ac_cv_enable_unreachable_code_warning=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$py_cflags
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
printf "%s\n" "$ac_cv_enable_unreachable_code_warning" >&6; }
@@ -10257,8 +10463,8 @@ printf %s "checking if we can enable $CC strict-prototypes warning... " >&6; }
if test ${ac_cv_enable_strict_prototypes_warning+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
py_cflags=$CFLAGS
as_fn_append CFLAGS " -Wstrict-prototypes -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10275,12 +10481,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_enable_strict_prototypes_warning=yes
-else $as_nop
- ac_cv_enable_strict_prototypes_warning=no
+else case e in #(
+ e) ac_cv_enable_strict_prototypes_warning=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$py_cflags
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
printf "%s\n" "$ac_cv_enable_strict_prototypes_warning" >&6; }
@@ -10298,8 +10506,8 @@ printf %s "checking if we can make implicit function declaration an error in $CC
if test ${ac_cv_enable_implicit_function_declaration_error+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10317,12 +10525,14 @@ then :
ac_cv_enable_implicit_function_declaration_error=yes
-else $as_nop
-
+else case e in #(
+ e)
ac_cv_enable_implicit_function_declaration_error=no
-
+ ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
printf "%s\n" "$ac_cv_enable_implicit_function_declaration_error" >&6; }
@@ -10340,8 +10550,8 @@ printf %s "checking if we can use visibility in $CC... " >&6; }
if test ${ac_cv_enable_visibility+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10359,12 +10569,14 @@ then :
ac_cv_enable_visibility=yes
-else $as_nop
-
+else case e in #(
+ e)
ac_cv_enable_visibility=no
-
+ ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
printf "%s\n" "$ac_cv_enable_visibility" >&6; }
@@ -10413,8 +10625,8 @@ printf %s "checking whether C compiler accepts -Wunguarded-availability... " >&6
if test ${ax_cv_check_cflags__Werror__Wunguarded_availability+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -Wunguarded-availability"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10431,19 +10643,22 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__Wunguarded_availability=yes
-else $as_nop
- ax_cv_check_cflags__Werror__Wunguarded_availability=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__Wunguarded_availability=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__Wunguarded_availability" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__Wunguarded_availability" >&6; }
if test "x$ax_cv_check_cflags__Werror__Wunguarded_availability" = xyes
then :
as_fn_append CFLAGS_NODIST " -Werror=unguarded-availability"
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
@@ -10579,11 +10794,12 @@ if ac_fn_c_try_link "$LINENO"
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -10592,8 +10808,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
;;
esac
-else $as_nop
-
+else case e in #(
+ e)
case $ac_sys_system in
OpenUNIX*|UnixWare*)
BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
@@ -10602,7 +10818,8 @@ else $as_nop
BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
;;
esac
-
+ ;;
+esac
fi
case "$ac_cv_cc_name" in
@@ -10639,12 +10856,12 @@ printf %s "checking whether pthreads are available without options... " >&6; }
if test ${ac_cv_pthread_is_default+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ac_cv_pthread_is_default=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -10668,14 +10885,17 @@ then :
ac_cv_kthread=no
ac_cv_pthread=no
-else $as_nop
- ac_cv_pthread_is_default=no
+else case e in #(
+ e) ac_cv_pthread_is_default=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
printf "%s\n" "$ac_cv_pthread_is_default" >&6; }
@@ -10695,14 +10915,14 @@ printf %s "checking whether $CC accepts -Kpthread... " >&6; }
if test ${ac_cv_kpthread+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_cc="$CC"
+else case e in #(
+ e) ac_save_cc="$CC"
CC="$CC -Kpthread"
if test "$cross_compiling" = yes
then :
ac_cv_kpthread=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -10722,14 +10942,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_kpthread=yes
-else $as_nop
- ac_cv_kpthread=no
+else case e in #(
+ e) ac_cv_kpthread=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-CC="$ac_save_cc"
+CC="$ac_save_cc" ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
printf "%s\n" "$ac_cv_kpthread" >&6; }
@@ -10747,14 +10970,14 @@ printf %s "checking whether $CC accepts -Kthread... " >&6; }
if test ${ac_cv_kthread+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_cc="$CC"
+else case e in #(
+ e) ac_save_cc="$CC"
CC="$CC -Kthread"
if test "$cross_compiling" = yes
then :
ac_cv_kthread=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -10774,14 +10997,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_kthread=yes
-else $as_nop
- ac_cv_kthread=no
+else case e in #(
+ e) ac_cv_kthread=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-CC="$ac_save_cc"
+CC="$ac_save_cc" ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
printf "%s\n" "$ac_cv_kthread" >&6; }
@@ -10799,14 +11025,14 @@ printf %s "checking whether $CC accepts -pthread... " >&6; }
if test ${ac_cv_pthread+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_cc="$CC"
+else case e in #(
+ e) ac_save_cc="$CC"
CC="$CC -pthread"
if test "$cross_compiling" = yes
then :
ac_cv_pthread=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -10826,14 +11052,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_pthread=yes
-else $as_nop
- ac_cv_pthread=no
+else case e in #(
+ e) ac_cv_pthread=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-CC="$ac_save_cc"
+CC="$ac_save_cc" ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
printf "%s\n" "$ac_cv_pthread" >&6; }
@@ -10848,8 +11077,8 @@ printf %s "checking whether $CXX also accepts flags for thread support... " >&6;
if test ${ac_cv_cxx_thread+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_cxx="$CXX"
+else case e in #(
+ e) ac_save_cxx="$CXX"
if test "$ac_cv_kpthread" = "yes"
then
@@ -10880,7 +11109,8 @@ then
fi
rm -fr conftest*
fi
-CXX="$ac_save_cxx"
+CXX="$ac_save_cxx" ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
printf "%s\n" "$ac_cv_cxx_thread" >&6; }
@@ -11407,14 +11637,14 @@ fi
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+ as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
printf %s "checking for $ac_hdr that defines DIR... " >&6; }
if eval test \${$as_ac_Header+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <$ac_hdr>
@@ -11431,10 +11661,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$as_ac_Header=yes"
-else $as_nop
- eval "$as_ac_Header=no"
+else case e in #(
+ e) eval "$as_ac_Header=no" ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$as_ac_Header
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -11442,7 +11674,7 @@ printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Header"\" = x"yes"
then :
cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1
_ACEOF
ac_header_dirent=$ac_hdr; break
@@ -11456,15 +11688,21 @@ printf %s "checking for library containing opendir... " >&6; }
if test ${ac_cv_search_opendir+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char opendir ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir (void);
int
main (void)
{
@@ -11495,11 +11733,13 @@ done
if test ${ac_cv_search_opendir+y}
then :
-else $as_nop
- ac_cv_search_opendir=no
+else case e in #(
+ e) ac_cv_search_opendir=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
printf "%s\n" "$ac_cv_search_opendir" >&6; }
@@ -11516,15 +11756,21 @@ printf %s "checking for library containing opendir... " >&6; }
if test ${ac_cv_search_opendir+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char opendir ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir (void);
int
main (void)
{
@@ -11555,11 +11801,13 @@ done
if test ${ac_cv_search_opendir+y}
then :
-else $as_nop
- ac_cv_search_opendir=no
+else case e in #(
+ e) ac_cv_search_opendir=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
printf "%s\n" "$ac_cv_search_opendir" >&6; }
@@ -11752,10 +12000,11 @@ then :
printf "%s\n" "#define HAVE_CLOCK_T 1" >>confdefs.h
-else $as_nop
-
+else case e in #(
+ e)
printf "%s\n" "#define clock_t long" >>confdefs.h
-
+ ;;
+esac
fi
@@ -11764,8 +12013,8 @@ printf %s "checking for makedev... " >&6; }
if test ${ac_cv_func_makedev+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11790,12 +12039,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_func_makedev=yes
-else $as_nop
- ac_cv_func_makedev=no
+else case e in #(
+ e) ac_cv_func_makedev=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_makedev" >&5
printf "%s\n" "$ac_cv_func_makedev" >&6; }
@@ -11815,8 +12066,8 @@ printf %s "checking for le64toh... " >&6; }
if test ${ac_cv_func_le64toh+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11839,12 +12090,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_func_le64toh=yes
-else $as_nop
- ac_cv_func_le64toh=no
+else case e in #(
+ e) ac_cv_func_le64toh=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_le64toh" >&5
printf "%s\n" "$ac_cv_func_le64toh" >&6; }
@@ -11894,20 +12147,22 @@ ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
if test "x$ac_cv_type_mode_t" = xyes
then :
-else $as_nop
-
+else case e in #(
+ e)
printf "%s\n" "#define mode_t int" >>confdefs.h
-
+ ;;
+esac
fi
ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
if test "x$ac_cv_type_off_t" = xyes
then :
-else $as_nop
-
+else case e in #(
+ e)
printf "%s\n" "#define off_t long int" >>confdefs.h
-
+ ;;
+esac
fi
@@ -11916,8 +12171,8 @@ fi
if test "x$ac_cv_type_pid_t" = xyes
then :
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined _WIN64 && !defined __CYGWIN__
@@ -11936,14 +12191,16 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_pid_type='int'
-else $as_nop
- ac_pid_type='__int64'
+else case e in #(
+ e) ac_pid_type='__int64' ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
-
+ ;;
+esac
fi
@@ -11954,42 +12211,33 @@ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
if test "x$ac_cv_type_size_t" = xyes
then :
-else $as_nop
-
+else case e in #(
+ e)
printf "%s\n" "#define size_t unsigned int" >>confdefs.h
-
+ ;;
+esac
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-printf %s "checking for uid_t in sys/types.h... " >&6; }
-if test ${ac_cv_type_uid_t+y}
+ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
+if test "x$ac_cv_type_uid_t" = xyes
then :
- printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1
-then :
- ac_cv_type_uid_t=yes
-else $as_nop
- ac_cv_type_uid_t=no
+else case e in #(
+ e)
+printf "%s\n" "#define uid_t int" >>confdefs.h
+ ;;
+esac
fi
-rm -rf conftest*
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-printf "%s\n" "$ac_cv_type_uid_t" >&6; }
-if test $ac_cv_type_uid_t = no; then
-
-printf "%s\n" "#define uid_t int" >>confdefs.h
+ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
+if test "x$ac_cv_type_gid_t" = xyes
+then :
+else case e in #(
+ e)
printf "%s\n" "#define gid_t int" >>confdefs.h
-
+ ;;
+esac
fi
@@ -12018,28 +12266,30 @@ fi
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
printf %s "checking size of int... " >&6; }
if test ${ac_cv_sizeof_int+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_int" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_int" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_int=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
printf "%s\n" "$ac_cv_sizeof_int" >&6; }
@@ -12051,28 +12301,30 @@ printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
printf %s "checking size of long... " >&6; }
if test ${ac_cv_sizeof_long+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_long" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_long" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
printf "%s\n" "$ac_cv_sizeof_long" >&6; }
@@ -12089,22 +12341,24 @@ printf %s "checking alignment of long... " >&6; }
if test ${ac_cv_alignof_long+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
typedef struct { char x; long y; } ac__type_alignof_;"
then :
-else $as_nop
- if test "$ac_cv_type_long" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_long" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute alignment of long
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_alignof_long=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
printf "%s\n" "$ac_cv_alignof_long" >&6; }
@@ -12116,28 +12370,30 @@ printf "%s\n" "#define ALIGNOF_LONG $ac_cv_alignof_long" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
printf %s "checking size of long long... " >&6; }
if test ${ac_cv_sizeof_long_long+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_long_long" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_long_long" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long long)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_long=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
@@ -12149,28 +12405,30 @@ printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
printf %s "checking size of void *... " >&6; }
if test ${ac_cv_sizeof_void_p+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_void_p" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_void_p" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (void *)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_void_p=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
@@ -12182,28 +12440,30 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
printf %s "checking size of short... " >&6; }
if test ${ac_cv_sizeof_short+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_short" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_short" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (short)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_short=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
printf "%s\n" "$ac_cv_sizeof_short" >&6; }
@@ -12215,28 +12475,30 @@ printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
printf %s "checking size of float... " >&6; }
if test ${ac_cv_sizeof_float+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_float" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_float" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (float)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_float=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
printf "%s\n" "$ac_cv_sizeof_float" >&6; }
@@ -12248,28 +12510,30 @@ printf "%s\n" "#define SIZEOF_FLOAT $ac_cv_sizeof_float" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
printf %s "checking size of double... " >&6; }
if test ${ac_cv_sizeof_double+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_double" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_double" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (double)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_double=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
printf "%s\n" "$ac_cv_sizeof_double" >&6; }
@@ -12281,28 +12545,30 @@ printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
printf %s "checking size of fpos_t... " >&6; }
if test ${ac_cv_sizeof_fpos_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_fpos_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_fpos_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (fpos_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_fpos_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
printf "%s\n" "$ac_cv_sizeof_fpos_t" >&6; }
@@ -12314,28 +12580,30 @@ printf "%s\n" "#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
printf %s "checking size of size_t... " >&6; }
if test ${ac_cv_sizeof_size_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_size_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_size_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (size_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_size_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
@@ -12352,22 +12620,24 @@ printf %s "checking alignment of size_t... " >&6; }
if test ${ac_cv_alignof_size_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default
typedef struct { char x; size_t y; } ac__type_alignof_;"
then :
-else $as_nop
- if test "$ac_cv_type_size_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_size_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute alignment of size_t
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_alignof_size_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5
printf "%s\n" "$ac_cv_alignof_size_t" >&6; }
@@ -12379,28 +12649,30 @@ printf "%s\n" "#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
printf %s "checking size of pid_t... " >&6; }
if test ${ac_cv_sizeof_pid_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_pid_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_pid_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (pid_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_pid_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
printf "%s\n" "$ac_cv_sizeof_pid_t" >&6; }
@@ -12412,28 +12684,30 @@ printf "%s\n" "#define SIZEOF_PID_T $ac_cv_sizeof_pid_t" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
printf %s "checking size of uintptr_t... " >&6; }
if test ${ac_cv_sizeof_uintptr_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_uintptr_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_uintptr_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (uintptr_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_uintptr_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
printf "%s\n" "$ac_cv_sizeof_uintptr_t" >&6; }
@@ -12450,22 +12724,24 @@ printf %s "checking alignment of max_align_t... " >&6; }
if test ${ac_cv_alignof_max_align_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_max_align_t" "$ac_includes_default
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_max_align_t" "$ac_includes_default
typedef struct { char x; max_align_t y; } ac__type_alignof_;"
then :
-else $as_nop
- if test "$ac_cv_type_max_align_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_max_align_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute alignment of max_align_t
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_alignof_max_align_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_max_align_t" >&5
printf "%s\n" "$ac_cv_alignof_max_align_t" >&6; }
@@ -12482,8 +12758,8 @@ printf %s "checking for long double... " >&6; }
if test ${ac_cv_type_long_double+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$GCC" = yes; then
+else case e in #(
+ e) if test "$GCC" = yes; then
ac_cv_type_long_double=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12506,11 +12782,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_type_long_double=yes
-else $as_nop
- ac_cv_type_long_double=no
+else case e in #(
+ e) ac_cv_type_long_double=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
printf "%s\n" "$ac_cv_type_long_double" >&6; }
@@ -12522,28 +12800,30 @@ printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
printf %s "checking size of long double... " >&6; }
if test ${ac_cv_sizeof_long_double+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_long_double" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_long_double" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (long double)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_long_double=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
printf "%s\n" "$ac_cv_sizeof_long_double" >&6; }
@@ -12556,28 +12836,30 @@ printf "%s\n" "#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double" >>confdefs.
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
printf %s "checking size of _Bool... " >&6; }
if test ${ac_cv_sizeof__Bool+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type__Bool" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type__Bool" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (_Bool)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof__Bool=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
printf "%s\n" "$ac_cv_sizeof__Bool" >&6; }
@@ -12590,15 +12872,15 @@ printf "%s\n" "#define SIZEOF__BOOL $ac_cv_sizeof__Bool" >>confdefs.h
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
printf %s "checking size of off_t... " >&6; }
if test ${ac_cv_sizeof_off_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -12606,17 +12888,19 @@ else $as_nop
"
then :
-else $as_nop
- if test "$ac_cv_type_off_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_off_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (off_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_off_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
@@ -12651,24 +12935,25 @@ printf "%s\n" "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
-
+ ;;
+esac
fi
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
printf %s "checking size of time_t... " >&6; }
if test ${ac_cv_sizeof_time_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -12679,17 +12964,19 @@ else $as_nop
"
then :
-else $as_nop
- if test "$ac_cv_type_time_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_time_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (time_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_time_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
@@ -12715,8 +13002,8 @@ printf %s "checking for pthread_t... " >&6; }
if test ${ac_cv_have_pthread_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12733,11 +13020,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_have_pthread_t=yes
-else $as_nop
- ac_cv_have_pthread_t=no
+else case e in #(
+ e) ac_cv_have_pthread_t=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pthread_t" >&5
printf "%s\n" "$ac_cv_have_pthread_t" >&6; }
@@ -12746,15 +13035,15 @@ 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
printf %s "checking size of pthread_t... " >&6; }
if test ${ac_cv_sizeof_pthread_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
@@ -12762,17 +13051,19 @@ else $as_nop
"
then :
-else $as_nop
- if test "$ac_cv_type_pthread_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_pthread_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (pthread_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_pthread_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
@@ -12789,29 +13080,31 @@ fi
# This checking will be unnecessary after removing deprecated TLS API.
# 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
printf %s "checking size of pthread_key_t... " >&6; }
if test ${ac_cv_sizeof_pthread_key_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
"
then :
-else $as_nop
- if test "$ac_cv_type_pthread_key_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_pthread_key_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (pthread_key_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_pthread_key_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
printf "%s\n" "$ac_cv_sizeof_pthread_key_t" >&6; }
@@ -12826,8 +13119,8 @@ printf %s "checking whether pthread_key_t is compatible with int... " >&6; }
if test ${ac_cv_pthread_key_t_is_arithmetic_type+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12843,15 +13136,17 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_pthread_key_t_is_arithmetic_type=yes
-else $as_nop
- ac_cv_pthread_key_t_is_arithmetic_type=no
-
+else case e in #(
+ e) ac_cv_pthread_key_t_is_arithmetic_type=no
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
else
ac_cv_pthread_key_t_is_arithmetic_type=no
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_key_t_is_arithmetic_type" >&5
printf "%s\n" "$ac_cv_pthread_key_t_is_arithmetic_type" >&6; }
@@ -12910,9 +13205,10 @@ printf "%s\n" "yes" >&6; };
else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }; DSYMUTIL=
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
@@ -12924,8 +13220,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_DSYMUTIL_PATH+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $DSYMUTIL_PATH in
+else case e in #(
+ e) case $DSYMUTIL_PATH in
[\\/]* | ?:[\\/]*)
ac_cv_path_DSYMUTIL_PATH="$DSYMUTIL_PATH" # Let the user override the test with a path.
;;
@@ -12951,6 +13247,7 @@ IFS=$as_save_IFS
test -z "$ac_cv_path_DSYMUTIL_PATH" && ac_cv_path_DSYMUTIL_PATH="not found"
;;
+esac ;;
esac
fi
DSYMUTIL_PATH=$ac_cv_path_DSYMUTIL_PATH
@@ -12998,9 +13295,10 @@ LDFLAGS="-fsanitize=address $LDFLAGS"
# ASan works by controlling memory allocation, our own malloc interferes.
with_pymalloc="no"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
@@ -13018,8 +13316,8 @@ printf %s "checking whether C compiler accepts -fsanitize=memory... " >&6; }
if test ${ax_cv_check_cflags___fsanitize_memory+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -fsanitize=memory"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13036,11 +13334,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___fsanitize_memory=yes
-else $as_nop
- ax_cv_check_cflags___fsanitize_memory=no
+else case e in #(
+ e) ax_cv_check_cflags___fsanitize_memory=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fsanitize_memory" >&5
printf "%s\n" "$ax_cv_check_cflags___fsanitize_memory" >&6; }
@@ -13050,16 +13350,18 @@ then :
BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
-else $as_nop
- as_fn_error $? "The selected compiler doesn't support memory sanitizer" "$LINENO" 5
+else case e in #(
+ e) as_fn_error $? "The selected compiler doesn't support memory sanitizer" "$LINENO" 5 ;;
+esac
fi
# MSan works by controlling memory allocation, our own malloc interferes.
with_pymalloc="no"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
@@ -13076,12 +13378,13 @@ BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
LDFLAGS="-fsanitize=undefined $LDFLAGS"
with_ubsan="yes"
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
with_ubsan="no"
-
+ ;;
+esac
fi
@@ -13098,12 +13401,13 @@ BASECFLAGS="-fsanitize=thread $BASECFLAGS"
LDFLAGS="-fsanitize=thread $LDFLAGS"
with_tsan="yes"
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
with_tsan="no"
-
+ ;;
+esac
fi
@@ -13487,16 +13791,22 @@ printf %s "checking for sendfile in -lsendfile... " >&6; }
if test ${ac_cv_lib_sendfile_sendfile+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsendfile $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sendfile ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sendfile (void);
int
main (void)
{
@@ -13508,12 +13818,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sendfile_sendfile=yes
-else $as_nop
- ac_cv_lib_sendfile_sendfile=no
+else case e in #(
+ e) ac_cv_lib_sendfile_sendfile=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
printf "%s\n" "$ac_cv_lib_sendfile_sendfile" >&6; }
@@ -13530,16 +13842,22 @@ printf %s "checking for dlopen in -ldl... " >&6; }
if test ${ac_cv_lib_dl_dlopen+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dlopen ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen (void);
int
main (void)
{
@@ -13551,12 +13869,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dl_dlopen=yes
-else $as_nop
- ac_cv_lib_dl_dlopen=no
+else case e in #(
+ e) ac_cv_lib_dl_dlopen=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
@@ -13573,16 +13893,22 @@ printf %s "checking for shl_load in -ldld... " >&6; }
if test ${ac_cv_lib_dld_shl_load+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char shl_load ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load (void);
int
main (void)
{
@@ -13594,12 +13920,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dld_shl_load=yes
-else $as_nop
- ac_cv_lib_dld_shl_load=no
+else case e in #(
+ e) ac_cv_lib_dld_shl_load=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
@@ -13627,12 +13955,12 @@ then :
for ac_func in uuid_create uuid_enc_be
do :
- as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
+ as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1
_ACEOF
have_uuid=yes
LIBUUID_CFLAGS=${LIBUUID_CFLAGS-""}
@@ -13730,16 +14058,22 @@ printf %s "checking for uuid_generate_time in -luuid... " >&6; }
if test ${ac_cv_lib_uuid_uuid_generate_time+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-luuid $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char uuid_generate_time ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate_time (void);
int
main (void)
{
@@ -13751,12 +14085,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_uuid_uuid_generate_time=yes
-else $as_nop
- ac_cv_lib_uuid_uuid_generate_time=no
+else case e in #(
+ e) ac_cv_lib_uuid_uuid_generate_time=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate_time" >&5
printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time" >&6; }
@@ -13773,16 +14109,22 @@ printf %s "checking for uuid_generate_time_safe in -luuid... " >&6; }
if test ${ac_cv_lib_uuid_uuid_generate_time_safe+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-luuid $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char uuid_generate_time_safe ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate_time_safe (void);
int
main (void)
{
@@ -13794,12 +14136,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_uuid_uuid_generate_time_safe=yes
-else $as_nop
- ac_cv_lib_uuid_uuid_generate_time_safe=no
+else case e in #(
+ e) ac_cv_lib_uuid_uuid_generate_time_safe=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate_time_safe" >&5
printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time_safe" >&6; }
@@ -13856,16 +14200,22 @@ printf %s "checking for uuid_generate_time in -luuid... " >&6; }
if test ${ac_cv_lib_uuid_uuid_generate_time+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-luuid $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char uuid_generate_time ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate_time (void);
int
main (void)
{
@@ -13877,12 +14227,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_uuid_uuid_generate_time=yes
-else $as_nop
- ac_cv_lib_uuid_uuid_generate_time=no
+else case e in #(
+ e) ac_cv_lib_uuid_uuid_generate_time=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate_time" >&5
printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time" >&6; }
@@ -13899,16 +14251,22 @@ printf %s "checking for uuid_generate_time_safe in -luuid... " >&6; }
if test ${ac_cv_lib_uuid_uuid_generate_time_safe+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-luuid $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char uuid_generate_time_safe ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate_time_safe (void);
int
main (void)
{
@@ -13920,12 +14278,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_uuid_uuid_generate_time_safe=yes
-else $as_nop
- ac_cv_lib_uuid_uuid_generate_time_safe=no
+else case e in #(
+ e) ac_cv_lib_uuid_uuid_generate_time_safe=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate_time_safe" >&5
printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time_safe" >&6; }
@@ -14020,15 +14380,21 @@ printf %s "checking for library containing sem_init... " >&6; }
if test ${ac_cv_search_sem_init+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sem_init ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_init (void);
int
main (void)
{
@@ -14059,11 +14425,13 @@ done
if test ${ac_cv_search_sem_init+y}
then :
-else $as_nop
- ac_cv_search_sem_init=no
+else case e in #(
+ e) ac_cv_search_sem_init=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
printf "%s\n" "$ac_cv_search_sem_init" >&6; }
@@ -14081,16 +14449,22 @@ printf %s "checking for textdomain in -lintl... " >&6; }
if test ${ac_cv_lib_intl_textdomain+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char textdomain ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char textdomain (void);
int
main (void)
{
@@ -14102,12 +14476,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_intl_textdomain=yes
-else $as_nop
- ac_cv_lib_intl_textdomain=no
+else case e in #(
+ e) ac_cv_lib_intl_textdomain=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
printf "%s\n" "$ac_cv_lib_intl_textdomain" >&6; }
@@ -14146,11 +14522,12 @@ printf "%s\n" "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -14179,8 +14556,8 @@ esac
if test "$cross_compiling" = yes
then :
ac_cv_c_complex_supported=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <complex.h>
@@ -14201,11 +14578,13 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_c_complex_supported=yes
-else $as_nop
- ac_cv_c_complex_supported=no
+else case e in #(
+ e) ac_cv_c_complex_supported=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
if test "$ac_cv_c_complex_supported" = "yes"; then
@@ -14220,8 +14599,8 @@ printf %s "checking aligned memory access is required... " >&6; }
if test ${ac_cv_aligned_required+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
# "yes" changes the hash function to FNV, which causes problems with Numba
@@ -14231,8 +14610,8 @@ if test "$ac_sys_system" = "Linux-android"; then
else
ac_cv_aligned_required=yes
fi
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(void)
@@ -14251,14 +14630,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_aligned_required=no
-else $as_nop
- ac_cv_aligned_required=yes
+else case e in #(
+ e) ac_cv_aligned_required=yes ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
printf "%s\n" "$ac_cv_aligned_required" >&6; }
@@ -14298,9 +14680,10 @@ case "$withval" in
;;
esac
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default" >&5
-printf "%s\n" "default" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default" >&5
+printf "%s\n" "default" >&6; } ;;
+esac
fi
@@ -14338,10 +14721,11 @@ printf "%s\n" "\"$withval\"" >&6; }
;;
esac
-else $as_nop
- validate_tzpath "$TZPATH"
+else case e in #(
+ e) validate_tzpath "$TZPATH"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
-printf "%s\n" "\"$TZPATH\"" >&6; }
+printf "%s\n" "\"$TZPATH\"" >&6; } ;;
+esac
fi
@@ -14352,16 +14736,22 @@ printf %s "checking for t_open in -lnsl... " >&6; }
if test ${ac_cv_lib_nsl_t_open+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char t_open ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char t_open (void);
int
main (void)
{
@@ -14373,12 +14763,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_nsl_t_open=yes
-else $as_nop
- ac_cv_lib_nsl_t_open=no
+else case e in #(
+ e) ac_cv_lib_nsl_t_open=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; }
@@ -14392,16 +14784,22 @@ printf %s "checking for socket in -lsocket... " >&6; }
if test ${ac_cv_lib_socket_socket+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char socket ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socket (void);
int
main (void)
{
@@ -14413,12 +14811,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_socket_socket=yes
-else $as_nop
- ac_cv_lib_socket_socket=no
+else case e in #(
+ e) ac_cv_lib_socket_socket=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
@@ -14435,16 +14835,22 @@ printf %s "checking for socket in -lnetwork... " >&6; }
if test ${ac_cv_lib_network_socket+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lnetwork $LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char socket ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socket (void);
int
main (void)
{
@@ -14456,12 +14862,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_network_socket=yes
-else $as_nop
- ac_cv_lib_network_socket=no
+else case e in #(
+ e) ac_cv_lib_network_socket=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
@@ -14484,9 +14892,10 @@ then :
printf "%s\n" "$withval" >&6; }
LIBS="$withval $LIBS"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
@@ -14498,8 +14907,9 @@ printf %s "checking for --with-system-expat... " >&6; }
if test ${with_system_expat+y}
then :
withval=$with_system_expat;
-else $as_nop
- with_system_expat="no"
+else case e in #(
+ e) with_system_expat="no" ;;
+esac
fi
@@ -14513,12 +14923,13 @@ then :
LIBEXPAT_LDFLAGS=${LIBEXPAT_LDFLAGS-"-lexpat"}
LIBEXPAT_INTERNAL=
-else $as_nop
-
+else case e in #(
+ e)
LIBEXPAT_CFLAGS="-I\$(srcdir)/Modules/expat"
LIBEXPAT_LDFLAGS="-lm \$(LIBEXPAT_A)"
LIBEXPAT_INTERNAL="\$(LIBEXPAT_HEADERS) \$(LIBEXPAT_A)"
-
+ ;;
+esac
fi
@@ -14544,16 +14955,22 @@ printf %s "checking for ffi_call in -lffi... " >&6; }
if test ${ac_cv_lib_ffi_ffi_call+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lffi $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char ffi_call ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ffi_call (void);
int
main (void)
{
@@ -14565,12 +14982,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_ffi_ffi_call=yes
-else $as_nop
- ac_cv_lib_ffi_ffi_call=no
+else case e in #(
+ e) ac_cv_lib_ffi_ffi_call=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_call" >&5
printf "%s\n" "$ac_cv_lib_ffi_ffi_call" >&6; }
@@ -14675,17 +15094,23 @@ printf %s "checking for ffi_call in -lffi... " >&6; }
if test ${ac_cv_lib_ffi_ffi_call+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lffi $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char ffi_call ();
-int
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ffi_call (void);
+int
main (void)
{
return ffi_call ();
@@ -14696,12 +15121,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_ffi_ffi_call=yes
-else $as_nop
- ac_cv_lib_ffi_ffi_call=no
+else case e in #(
+ e) ac_cv_lib_ffi_ffi_call=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_call" >&5
printf "%s\n" "$ac_cv_lib_ffi_ffi_call" >&6; }
@@ -14712,8 +15139,9 @@ then :
LIBFFI_CFLAGS=${LIBFFI_CFLAGS-""}
LIBFFI_LIBS=${LIBFFI_LIBS-"-lffi"}
-else $as_nop
- have_libffi=no
+else case e in #(
+ e) have_libffi=no ;;
+esac
fi
@@ -14748,16 +15176,22 @@ printf %s "checking for ffi_call in -lffi... " >&6; }
if test ${ac_cv_lib_ffi_ffi_call+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lffi $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char ffi_call ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ffi_call (void);
int
main (void)
{
@@ -14769,12 +15203,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_ffi_ffi_call=yes
-else $as_nop
- ac_cv_lib_ffi_ffi_call=no
+else case e in #(
+ e) ac_cv_lib_ffi_ffi_call=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_call" >&5
printf "%s\n" "$ac_cv_lib_ffi_ffi_call" >&6; }
@@ -14785,8 +15221,9 @@ then :
LIBFFI_CFLAGS=${LIBFFI_CFLAGS-""}
LIBFFI_LIBS=${LIBFFI_LIBS-"-lffi"}
-else $as_nop
- have_libffi=no
+else case e in #(
+ e) have_libffi=no ;;
+esac
fi
@@ -14859,8 +15296,8 @@ printf %s "checking for ffi_prep_cif_var... " >&6; }
if test ${ac_cv_func_ffi_prep_cif_var+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ffi.h>
int
@@ -14874,11 +15311,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_ffi_prep_cif_var=yes
-else $as_nop
- ac_cv_func_ffi_prep_cif_var=no
+else case e in #(
+ e) ac_cv_func_ffi_prep_cif_var=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ffi_prep_cif_var" >&5
printf "%s\n" "$ac_cv_func_ffi_prep_cif_var" >&6; }
@@ -14898,8 +15337,8 @@ printf %s "checking for ffi_prep_closure_loc... " >&6; }
if test ${ac_cv_func_ffi_prep_closure_loc+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ffi.h>
int
@@ -14913,11 +15352,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_ffi_prep_closure_loc=yes
-else $as_nop
- ac_cv_func_ffi_prep_closure_loc=no
+else case e in #(
+ e) ac_cv_func_ffi_prep_closure_loc=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ffi_prep_closure_loc" >&5
printf "%s\n" "$ac_cv_func_ffi_prep_closure_loc" >&6; }
@@ -14937,8 +15378,8 @@ printf %s "checking for ffi_closure_alloc... " >&6; }
if test ${ac_cv_func_ffi_closure_alloc+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ffi.h>
int
@@ -14952,11 +15393,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_ffi_closure_alloc=yes
-else $as_nop
- ac_cv_func_ffi_closure_alloc=no
+else case e in #(
+ e) ac_cv_func_ffi_closure_alloc=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ffi_closure_alloc" >&5
printf "%s\n" "$ac_cv_func_ffi_closure_alloc" >&6; }
@@ -14989,8 +15432,8 @@ printf %s "checking libffi has complex type support... " >&6; }
if test ${ac_cv_ffi_complex_double_supported+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- save_CFLAGS=$CFLAGS
+else case e in #(
+ e) save_CFLAGS=$CFLAGS
save_CPPFLAGS=$CPPFLAGS
save_LDFLAGS=$LDFLAGS
save_LIBS=$LIBS
@@ -15002,8 +15445,8 @@ save_LIBS=$LIBS
if test "$cross_compiling" = yes
then :
ac_cv_ffi_complex_double_supported=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <complex.h>
@@ -15033,11 +15476,13 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_ffi_complex_double_supported=yes
-else $as_nop
- ac_cv_ffi_complex_double_supported=no
+else case e in #(
+ e) ac_cv_ffi_complex_double_supported=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
@@ -15046,7 +15491,8 @@ CPPFLAGS=$save_CPPFLAGS
LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ffi_complex_double_supported" >&5
printf "%s\n" "$ac_cv_ffi_complex_double_supported" >&6; }
@@ -15064,8 +15510,9 @@ printf %s "checking for --with-system-libmpdec... " >&6; }
if test ${with_system_libmpdec+y}
then :
withval=$with_system_libmpdec;
-else $as_nop
- with_system_libmpdec="yes"
+else case e in #(
+ e) with_system_libmpdec="yes" ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
@@ -15150,12 +15597,13 @@ else
printf "%s\n" "yes" >&6; }
fi
-else $as_nop
- LIBMPDEC_CFLAGS="-I\$(srcdir)/Modules/_decimal/libmpdec"
+else case e in #(
+ e) LIBMPDEC_CFLAGS="-I\$(srcdir)/Modules/_decimal/libmpdec"
LIBMPDEC_LIBS="-lm \$(LIBMPDEC_A)"
LIBMPDEC_INTERNAL="\$(LIBMPDEC_HEADERS) \$(LIBMPDEC_A)"
have_mpdec=yes
- with_system_libmpdec=no
+ with_system_libmpdec=no ;;
+esac
fi
if test "x$with_system_libmpdec" = xyes
@@ -15189,8 +15637,9 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
have_mpdec=yes
-else $as_nop
- have_mpdec=no
+else case e in #(
+ e) have_mpdec=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -15201,9 +15650,10 @@ LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: the bundled copy of libmpdecimal is scheduled for removal in Python 3.15; consider using a system installed mpdecimal library." >&5
-printf "%s\n" "$as_me: WARNING: the bundled copy of libmpdecimal is scheduled for removal in Python 3.15; consider using a system installed mpdecimal library." >&2;}
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: the bundled copy of libmpdecimal is scheduled for removal in Python 3.15; consider using a system installed mpdecimal library." >&5
+printf "%s\n" "$as_me: WARNING: the bundled copy of libmpdecimal is scheduled for removal in Python 3.15; consider using a system installed mpdecimal library." >&2;} ;;
+esac
fi
if test "$with_system_libmpdec" = "yes" && test "$have_mpdec" = "no"
@@ -15231,8 +15681,9 @@ printf %s "checking for --with-decimal-contextvar... " >&6; }
if test ${with_decimal_contextvar+y}
then :
withval=$with_decimal_contextvar;
-else $as_nop
- with_decimal_contextvar="yes"
+else case e in #(
+ e) with_decimal_contextvar="yes" ;;
+esac
fi
@@ -15470,16 +15921,22 @@ printf %s "checking for sqlite3_bind_double in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_bind_double+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_bind_double ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_bind_double (void);
int
main (void)
{
@@ -15491,12 +15948,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_bind_double=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_bind_double=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_bind_double=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_bind_double" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_bind_double" >&6; }
@@ -15506,10 +15965,11 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
@@ -15519,16 +15979,22 @@ printf %s "checking for sqlite3_column_decltype in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_column_decltype+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_column_decltype ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_column_decltype (void);
int
main (void)
{
@@ -15540,12 +16006,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_column_decltype=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_column_decltype=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_column_decltype=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_column_decltype" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_column_decltype" >&6; }
@@ -15555,10 +16023,11 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
@@ -15568,16 +16037,22 @@ printf %s "checking for sqlite3_column_double in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_column_double+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_column_double ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_column_double (void);
int
main (void)
{
@@ -15589,12 +16064,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_column_double=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_column_double=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_column_double=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_column_double" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_column_double" >&6; }
@@ -15604,10 +16081,11 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
@@ -15617,16 +16095,22 @@ printf %s "checking for sqlite3_complete in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_complete+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_complete ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_complete (void);
int
main (void)
{
@@ -15638,12 +16122,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_complete=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_complete=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_complete=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_complete" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_complete" >&6; }
@@ -15653,10 +16139,11 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
@@ -15666,16 +16153,22 @@ printf %s "checking for sqlite3_progress_handler in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_progress_handler+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_progress_handler ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_progress_handler (void);
int
main (void)
{
@@ -15687,12 +16180,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_progress_handler=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_progress_handler=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_progress_handler=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_progress_handler" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_progress_handler" >&6; }
@@ -15702,10 +16197,11 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
@@ -15715,16 +16211,22 @@ printf %s "checking for sqlite3_result_double in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_result_double+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_result_double ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_result_double (void);
int
main (void)
{
@@ -15736,12 +16238,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_result_double=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_result_double=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_result_double=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_result_double" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_result_double" >&6; }
@@ -15751,10 +16255,11 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
@@ -15764,16 +16269,22 @@ printf %s "checking for sqlite3_set_authorizer in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_set_authorizer+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_set_authorizer ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_set_authorizer (void);
int
main (void)
{
@@ -15785,12 +16296,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_set_authorizer=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_set_authorizer=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_set_authorizer=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_set_authorizer" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_set_authorizer" >&6; }
@@ -15800,10 +16313,11 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
@@ -15813,16 +16327,22 @@ printf %s "checking for sqlite3_trace_v2 in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_trace_v2+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_trace_v2 ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_trace_v2 (void);
int
main (void)
{
@@ -15834,12 +16354,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_trace_v2=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_trace_v2=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_trace_v2=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_trace_v2" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_trace_v2" >&6; }
@@ -15849,8 +16371,8 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_trace in -lsqlite3" >&5
@@ -15858,16 +16380,22 @@ printf %s "checking for sqlite3_trace in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_trace+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_trace ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_trace (void);
int
main (void)
{
@@ -15879,12 +16407,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_trace=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_trace=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_trace=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_trace" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_trace" >&6; }
@@ -15894,15 +16424,17 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
@@ -15912,16 +16444,22 @@ printf %s "checking for sqlite3_value_double in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_value_double+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_value_double ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_value_double (void);
int
main (void)
{
@@ -15933,12 +16471,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_value_double=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_value_double=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_value_double=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_value_double" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_value_double" >&6; }
@@ -15948,10 +16488,11 @@ then :
LIBS="-lsqlite3 $LIBS"
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
@@ -15960,16 +16501,22 @@ printf %s "checking for sqlite3_load_extension in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_load_extension+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_load_extension ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_load_extension (void);
int
main (void)
{
@@ -15981,21 +16528,24 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_load_extension=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_load_extension=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_load_extension=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_load_extension" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_load_extension" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_load_extension" = xyes
then :
have_sqlite3_load_extension=yes
-else $as_nop
- have_sqlite3_load_extension=no
-
+else case e in #(
+ e) have_sqlite3_load_extension=no
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_serialize in -lsqlite3" >&5
@@ -16003,16 +16553,22 @@ printf %s "checking for sqlite3_serialize in -lsqlite3... " >&6; }
if test ${ac_cv_lib_sqlite3_sqlite3_serialize+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char sqlite3_serialize ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sqlite3_serialize (void);
int
main (void)
{
@@ -16024,12 +16580,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_sqlite3_sqlite3_serialize=yes
-else $as_nop
- ac_cv_lib_sqlite3_sqlite3_serialize=no
+else case e in #(
+ e) ac_cv_lib_sqlite3_sqlite3_serialize=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_serialize" >&5
printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_serialize" >&6; }
@@ -16043,10 +16601,11 @@ printf "%s\n" "#define PY_SQLITE_HAVE_SERIALIZE 1" >>confdefs.h
fi
-else $as_nop
-
+else case e in #(
+ e)
have_supported_sqlite3=no
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -16074,22 +16633,24 @@ printf "%s\n" "n/a" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your version of SQLite does not support loadable extensions" >&5
printf "%s\n" "$as_me: WARNING: Your version of SQLite does not support loadable extensions" >&2;}
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
printf "%s\n" "#define PY_SQLITE_ENABLE_LOAD_EXTENSION 1" >>confdefs.h
-
+ ;;
+esac
fi
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
-
+ ;;
+esac
fi
@@ -16277,8 +16838,8 @@ See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
@@ -16288,7 +16849,7 @@ and X11_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
X11_CFLAGS=$pkg_cv_X11_CFLAGS
X11_LIBS=$pkg_cv_X11_LIBS
@@ -16356,10 +16917,11 @@ then :
have_tcltk=yes
as_fn_append TCLTK_CFLAGS " -Wno-strict-prototypes -DWITH_APPINIT=1"
-else $as_nop
-
+else case e in #(
+ e)
have_tcltk=no
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -16393,16 +16955,22 @@ printf %s "checking for gdbm_open in -lgdbm... " >&6; }
if test ${ac_cv_lib_gdbm_gdbm_open+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lgdbm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char gdbm_open ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gdbm_open (void);
int
main (void)
{
@@ -16414,12 +16982,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_gdbm_gdbm_open=yes
-else $as_nop
- ac_cv_lib_gdbm_gdbm_open=no
+else case e in #(
+ e) ac_cv_lib_gdbm_gdbm_open=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5
printf "%s\n" "$ac_cv_lib_gdbm_gdbm_open" >&6; }
@@ -16429,13 +16999,15 @@ then :
have_gdbm=yes
GDBM_LIBS=${GDBM_LIBS-"-lgdbm"}
-else $as_nop
- have_gdbm=no
+else case e in #(
+ e) have_gdbm=no ;;
+esac
fi
-else $as_nop
- have_gdbm=no
+else case e in #(
+ e) have_gdbm=no ;;
+esac
fi
done
@@ -16465,15 +17037,21 @@ printf %s "checking for library containing dbm_open... " >&6; }
if test ${ac_cv_search_dbm_open+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dbm_open ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dbm_open (void);
int
main (void)
{
@@ -16504,11 +17082,13 @@ done
if test ${ac_cv_search_dbm_open+y}
then :
-else $as_nop
- ac_cv_search_dbm_open=no
+else case e in #(
+ e) ac_cv_search_dbm_open=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dbm_open" >&5
printf "%s\n" "$ac_cv_search_dbm_open" >&6; }
@@ -16557,18 +17137,20 @@ printf "%s\n" "$have_ndbm ($dbm_ndbm)" >&6; }
if test ${ac_cv_header_gdbm_slash_ndbm_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ac_fn_c_check_header_compile "$LINENO" "gdbm/ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default"
if test "x$ac_cv_header_gdbm_ndbm_h" = xyes
then :
ac_cv_header_gdbm_slash_ndbm_h=yes
-else $as_nop
- ac_cv_header_gdbm_slash_ndbm_h=no
-
+else case e in #(
+ e) ac_cv_header_gdbm_slash_ndbm_h=no
+ ;;
+esac
fi
-
+ ;;
+esac
fi
if test "x$ac_cv_header_gdbm_slash_ndbm_h" = xyes
@@ -16584,18 +17166,20 @@ fi
if test ${ac_cv_header_gdbm_dash_ndbm_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ac_fn_c_check_header_compile "$LINENO" "gdbm-ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default"
if test "x$ac_cv_header_gdbm_ndbm_h" = xyes
then :
ac_cv_header_gdbm_dash_ndbm_h=yes
-else $as_nop
- ac_cv_header_gdbm_dash_ndbm_h=no
-
+else case e in #(
+ e) ac_cv_header_gdbm_dash_ndbm_h=no
+ ;;
+esac
fi
-
+ ;;
+esac
fi
if test "x$ac_cv_header_gdbm_dash_ndbm_h" = xyes
@@ -16621,15 +17205,21 @@ printf %s "checking for library containing dbm_open... " >&6; }
if test ${ac_cv_search_dbm_open+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dbm_open ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dbm_open (void);
int
main (void)
{
@@ -16660,11 +17250,13 @@ done
if test ${ac_cv_search_dbm_open+y}
then :
-else $as_nop
- ac_cv_search_dbm_open=no
+else case e in #(
+ e) ac_cv_search_dbm_open=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dbm_open" >&5
printf "%s\n" "$ac_cv_search_dbm_open" >&6; }
@@ -16673,8 +17265,9 @@ if test "$ac_res" != no
then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
have_gdbm_compat=yes
-else $as_nop
- have_gdbm_compat=no
+else case e in #(
+ e) have_gdbm_compat=no ;;
+esac
fi
@@ -16700,8 +17293,8 @@ printf %s "checking for libdb... " >&6; }
if test ${ac_cv_have_libdb+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
save_CFLAGS=$CFLAGS
save_CPPFLAGS=$CPPFLAGS
save_LDFLAGS=$LDFLAGS
@@ -16730,8 +17323,9 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_have_libdb=yes
-else $as_nop
- ac_cv_have_libdb=no
+else case e in #(
+ e) ac_cv_have_libdb=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -16742,7 +17336,8 @@ LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_libdb" >&5
printf "%s\n" "$ac_cv_have_libdb" >&6; }
@@ -16767,8 +17362,9 @@ printf %s "checking for --with-dbmliborder... " >&6; }
if test ${with_dbmliborder+y}
then :
withval=$with_dbmliborder;
-else $as_nop
- with_dbmliborder=gdbm:ndbm:bdb
+else case e in #(
+ e) with_dbmliborder=gdbm:ndbm:bdb ;;
+esac
fi
@@ -16885,8 +17481,8 @@ printf %s "checking for _POSIX_THREADS defined in unistd.h... " >&6; }
if test ${ac_cv_defined__POSIX_THREADS_unistd_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
@@ -16907,18 +17503,21 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_defined__POSIX_THREADS_unistd_h=yes
-else $as_nop
- ac_cv_defined__POSIX_THREADS_unistd_h=no
+else case e in #(
+ e) ac_cv_defined__POSIX_THREADS_unistd_h=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined__POSIX_THREADS_unistd_h" >&5
printf "%s\n" "$ac_cv_defined__POSIX_THREADS_unistd_h" >&6; }
if test $ac_cv_defined__POSIX_THREADS_unistd_h != "no"
then :
unistd_defines_pthreads=yes
-else $as_nop
- unistd_defines_pthreads=no
+else case e in #(
+ e) unistd_defines_pthreads=no ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
printf "%s\n" "$unistd_defines_pthreads" >&6; }
@@ -16956,8 +17555,8 @@ then :
printf "%s\n" "yes" >&6; }
posix_threads=yes
-else $as_nop
-
+else case e in #(
+ e)
LIBS=$_libs
ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
if test "x$ac_cv_func_pthread_detach" = xyes
@@ -16965,23 +17564,29 @@ then :
posix_threads=yes
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
printf %s "checking for pthread_create in -lpthreads... " >&6; }
if test ${ac_cv_lib_pthreads_pthread_create+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthreads $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char pthread_create ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create (void);
int
main (void)
{
@@ -16993,12 +17598,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_pthreads_pthread_create=yes
-else $as_nop
- ac_cv_lib_pthreads_pthread_create=no
+else case e in #(
+ e) ac_cv_lib_pthreads_pthread_create=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
printf "%s\n" "$ac_cv_lib_pthreads_pthread_create" >&6; }
@@ -17008,23 +17615,29 @@ then :
posix_threads=yes
LIBS="$LIBS -lpthreads"
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
printf %s "checking for pthread_create in -lc_r... " >&6; }
if test ${ac_cv_lib_c_r_pthread_create+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lc_r $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char pthread_create ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create (void);
int
main (void)
{
@@ -17036,12 +17649,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_c_r_pthread_create=yes
-else $as_nop
- ac_cv_lib_c_r_pthread_create=no
+else case e in #(
+ e) ac_cv_lib_c_r_pthread_create=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; }
@@ -17051,23 +17666,29 @@ then :
posix_threads=yes
LIBS="$LIBS -lc_r"
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
printf %s "checking for __pthread_create_system in -lpthread... " >&6; }
if test ${ac_cv_lib_pthread___pthread_create_system+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char __pthread_create_system ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __pthread_create_system (void);
int
main (void)
{
@@ -17079,12 +17700,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_pthread___pthread_create_system=yes
-else $as_nop
- ac_cv_lib_pthread___pthread_create_system=no
+else case e in #(
+ e) ac_cv_lib_pthread___pthread_create_system=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
printf "%s\n" "$ac_cv_lib_pthread___pthread_create_system" >&6; }
@@ -17094,23 +17717,29 @@ then :
posix_threads=yes
LIBS="$LIBS -lpthread"
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
printf %s "checking for pthread_create in -lcma... " >&6; }
if test ${ac_cv_lib_cma_pthread_create+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lcma $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char pthread_create ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create (void);
int
main (void)
{
@@ -17122,12 +17751,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_cma_pthread_create=yes
-else $as_nop
- ac_cv_lib_cma_pthread_create=no
+else case e in #(
+ e) ac_cv_lib_cma_pthread_create=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
printf "%s\n" "$ac_cv_lib_cma_pthread_create" >&6; }
@@ -17137,8 +17768,8 @@ then :
posix_threads=yes
LIBS="$LIBS -lcma"
-else $as_nop
-
+else case e in #(
+ e)
case $ac_sys_system in #(
WASI) :
posix_threads=stub ;; #(
@@ -17146,17 +17777,23 @@ else $as_nop
as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
;;
esac
-
-fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
+fi
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -17166,16 +17803,22 @@ printf %s "checking for usconfig in -lmpc... " >&6; }
if test ${ac_cv_lib_mpc_usconfig+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lmpc $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char usconfig ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char usconfig (void);
int
main (void)
{
@@ -17187,12 +17830,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_mpc_usconfig=yes
-else $as_nop
- ac_cv_lib_mpc_usconfig=no
+else case e in #(
+ e) ac_cv_lib_mpc_usconfig=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
printf "%s\n" "$ac_cv_lib_mpc_usconfig" >&6; }
@@ -17238,12 +17883,12 @@ printf %s "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
if test ${ac_cv_pthread_system_supported+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ac_cv_pthread_system_supported=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -17263,14 +17908,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_pthread_system_supported=yes
-else $as_nop
- ac_cv_pthread_system_supported=no
+else case e in #(
+ e) ac_cv_pthread_system_supported=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
printf "%s\n" "$ac_cv_pthread_system_supported" >&6; }
@@ -17334,8 +17982,8 @@ printf "%s\n" "yes" >&6; }
ipv6=yes
;;
esac
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* AF_INET6 available check */
@@ -17354,10 +18002,11 @@ then :
ipv6=yes
-else $as_nop
-
+else case e in #(
+ e)
ipv6=no
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -17397,12 +18046,13 @@ then :
printf "%s\n" "yes" >&6; }
ipv6=yes
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
ipv6=no
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
@@ -17411,7 +18061,8 @@ if test "$ipv6" = "yes"; then
printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h
fi
-
+ ;;
+esac
fi
@@ -17430,8 +18081,8 @@ printf %s "checking for IPV6_INRIA_VERSION defined in netinet/in.h... " >&6; }
if test ${ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netinet/in.h>
int
@@ -17452,10 +18103,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h=yes
-else $as_nop
- ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h=no
+else case e in #(
+ e) ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h" >&5
printf "%s\n" "$ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h" >&6; }
@@ -17471,8 +18124,8 @@ printf %s "checking for __KAME__ defined in netinet/in.h... " >&6; }
if test ${ac_cv_defined___KAME___netinet_in_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netinet/in.h>
int
@@ -17493,10 +18146,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_defined___KAME___netinet_in_h=yes
-else $as_nop
- ac_cv_defined___KAME___netinet_in_h=no
+else case e in #(
+ e) ac_cv_defined___KAME___netinet_in_h=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined___KAME___netinet_in_h" >&5
printf "%s\n" "$ac_cv_defined___KAME___netinet_in_h" >&6; }
@@ -17515,8 +18170,8 @@ printf %s "checking for __GLIBC__ defined in features.h... " >&6; }
if test ${ac_cv_defined___GLIBC___features_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <features.h>
int
@@ -17537,10 +18192,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_defined___GLIBC___features_h=yes
-else $as_nop
- ac_cv_defined___GLIBC___features_h=no
+else case e in #(
+ e) ac_cv_defined___GLIBC___features_h=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined___GLIBC___features_h" >&5
printf "%s\n" "$ac_cv_defined___GLIBC___features_h" >&6; }
@@ -17573,8 +18230,8 @@ printf %s "checking for _TOSHIBA_INET6 defined in sys/param.h... " >&6; }
if test ${ac_cv_defined__TOSHIBA_INET6_sys_param_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/param.h>
int
@@ -17595,10 +18252,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_defined__TOSHIBA_INET6_sys_param_h=yes
-else $as_nop
- ac_cv_defined__TOSHIBA_INET6_sys_param_h=no
+else case e in #(
+ e) ac_cv_defined__TOSHIBA_INET6_sys_param_h=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined__TOSHIBA_INET6_sys_param_h" >&5
printf "%s\n" "$ac_cv_defined__TOSHIBA_INET6_sys_param_h" >&6; }
@@ -17616,8 +18275,8 @@ printf %s "checking for __V6D__ defined in /usr/local/v6/include/sys/v6config.h.
if test ${ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include </usr/local/v6/include/sys/v6config.h>
int
@@ -17638,10 +18297,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h=yes
-else $as_nop
- ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h=no
+else case e in #(
+ e) ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h" >&5
printf "%s\n" "$ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h" >&6; }
@@ -17660,8 +18321,8 @@ printf %s "checking for _ZETA_MINAMI_INET6 defined in sys/param.h... " >&6; }
if test ${ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/param.h>
int
@@ -17682,10 +18343,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h=yes
-else $as_nop
- ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h=no
+else case e in #(
+ e) ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h" >&5
printf "%s\n" "$ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h" >&6; }
@@ -17721,10 +18384,11 @@ then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libc" >&5
printf "%s\n" "libc" >&6; }
-else $as_nop
-
+else case e in #(
+ e)
as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5
-
+ ;;
+esac
fi
fi
fi
@@ -17735,8 +18399,8 @@ printf %s "checking CAN_RAW_FD_FRAMES... " >&6; }
if test ${ac_cv_can_raw_fd_frames+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* CAN_RAW_FD_FRAMES available check */
@@ -17752,11 +18416,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_can_raw_fd_frames=yes
-else $as_nop
- ac_cv_can_raw_fd_frames=no
+else case e in #(
+ e) ac_cv_can_raw_fd_frames=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_fd_frames" >&5
printf "%s\n" "$ac_cv_can_raw_fd_frames" >&6; }
@@ -17774,8 +18440,8 @@ printf %s "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
if test ${ac_cv_can_raw_join_filters+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17791,11 +18457,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_can_raw_join_filters=yes
-else $as_nop
- ac_cv_can_raw_join_filters=no
+else case e in #(
+ e) ac_cv_can_raw_join_filters=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_join_filters" >&5
printf "%s\n" "$ac_cv_can_raw_join_filters" >&6; }
@@ -17837,8 +18505,8 @@ printf %s "checking for stdatomic.h... " >&6; }
if test ${ac_cv_header_stdatomic_h+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17858,12 +18526,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_header_stdatomic_h=yes
-else $as_nop
- ac_cv_header_stdatomic_h=no
+else case e in #(
+ e) ac_cv_header_stdatomic_h=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdatomic_h" >&5
printf "%s\n" "$ac_cv_header_stdatomic_h" >&6; }
@@ -17883,8 +18553,8 @@ printf %s "checking for builtin __atomic_load_n and __atomic_store_n functions..
if test ${ac_cv_builtin_atomic+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17901,12 +18571,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_builtin_atomic=yes
-else $as_nop
- ac_cv_builtin_atomic=no
+else case e in #(
+ e) ac_cv_builtin_atomic=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_builtin_atomic" >&5
printf "%s\n" "$ac_cv_builtin_atomic" >&6; }
@@ -17928,9 +18600,10 @@ printf %s "checking for --with-mimalloc... " >&6; }
if test ${with_mimalloc+y}
then :
withval=$with_mimalloc;
-else $as_nop
- with_mimalloc="$ac_cv_header_stdatomic_h"
-
+else case e in #(
+ e) with_mimalloc="$ac_cv_header_stdatomic_h"
+ ;;
+esac
fi
@@ -18019,9 +18692,10 @@ printf %s "checking for --with-valgrind... " >&6; }
if test ${with_valgrind+y}
then :
withval=$with_valgrind;
-else $as_nop
- with_valgrind=no
-
+else case e in #(
+ e) with_valgrind=no
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
@@ -18033,9 +18707,10 @@ then :
printf "%s\n" "#define WITH_VALGRIND 1" >>confdefs.h
-else $as_nop
- as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
-
+else case e in #(
+ e) as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
+ ;;
+esac
fi
OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
@@ -18049,8 +18724,9 @@ printf %s "checking for --with-dtrace... " >&6; }
if test ${with_dtrace+y}
then :
withval=$with_dtrace;
-else $as_nop
- with_dtrace=no
+else case e in #(
+ e) with_dtrace=no ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
@@ -18073,8 +18749,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_DTRACE+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $DTRACE in
+else case e in #(
+ e) case $DTRACE in
[\\/]* | ?:[\\/]*)
ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
;;
@@ -18100,6 +18776,7 @@ IFS=$as_save_IFS
test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
;;
+esac ;;
esac
fi
DTRACE=$ac_cv_path_DTRACE
@@ -18129,12 +18806,13 @@ printf %s "checking whether DTrace probes require linking... " >&6; }
if test ${ac_cv_dtrace_link+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_dtrace_link=no
+else case e in #(
+ e) ac_cv_dtrace_link=no
echo 'BEGIN{}' > conftest.d
"$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
ac_cv_dtrace_link=yes
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
printf "%s\n" "$ac_cv_dtrace_link" >&6; }
@@ -18237,7 +18915,7 @@ if test "$ac_sys_system" = "Linux-android"; then
fi
for name in $blocked_funcs; do
- as_func_var=`printf "%s\n" "ac_cv_func_$name" | $as_tr_sh`
+ as_func_var=`printf "%s\n" "ac_cv_func_$name" | sed "$as_sed_sh"`
eval "$as_func_var=no"
@@ -19449,8 +20127,8 @@ printf %s "checking for $CC options needed to detect all undeclared functions...
if test ${ac_cv_c_undeclared_builtin_options+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_CFLAGS=$CFLAGS
+else case e in #(
+ e) ac_save_CFLAGS=$CFLAGS
ac_cv_c_undeclared_builtin_options='cannot detect'
for ac_arg in '' -fno-builtin; do
CFLAGS="$ac_save_CFLAGS $ac_arg"
@@ -19469,8 +20147,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
-else $as_nop
- # This test program should compile successfully.
+else case e in #(
+ e) # This test program should compile successfully.
# No library function is consistently available on
# freestanding implementations, so test against a dummy
# declaration. Include always-available headers on the
@@ -19498,26 +20176,29 @@ then :
if test x"$ac_arg" = x
then :
ac_cv_c_undeclared_builtin_options='none needed'
-else $as_nop
- ac_cv_c_undeclared_builtin_options=$ac_arg
+else case e in #(
+ e) ac_cv_c_undeclared_builtin_options=$ac_arg ;;
+esac
fi
break
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
CFLAGS=$ac_save_CFLAGS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
case $ac_cv_c_undeclared_builtin_options in #(
'cannot detect') :
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot make $CC report undeclared builtins
-See \`config.log' for more details" "$LINENO" 5; } ;; #(
+See 'config.log' for more details" "$LINENO" 5; } ;; #(
'none needed') :
ac_c_undeclared_builtin_options='' ;; #(
*) :
@@ -19543,8 +20224,8 @@ printf %s "checking for chroot... " >&6; }
if test ${ac_cv_func_chroot+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
@@ -19558,11 +20239,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_chroot=yes
-else $as_nop
- ac_cv_func_chroot=no
+else case e in #(
+ e) ac_cv_func_chroot=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chroot" >&5
printf "%s\n" "$ac_cv_func_chroot" >&6; }
@@ -19582,8 +20265,8 @@ printf %s "checking for link... " >&6; }
if test ${ac_cv_func_link+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
@@ -19597,11 +20280,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_link=yes
-else $as_nop
- ac_cv_func_link=no
+else case e in #(
+ e) ac_cv_func_link=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_link" >&5
printf "%s\n" "$ac_cv_func_link" >&6; }
@@ -19621,8 +20306,8 @@ printf %s "checking for symlink... " >&6; }
if test ${ac_cv_func_symlink+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
@@ -19636,11 +20321,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_symlink=yes
-else $as_nop
- ac_cv_func_symlink=no
+else case e in #(
+ e) ac_cv_func_symlink=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_symlink" >&5
printf "%s\n" "$ac_cv_func_symlink" >&6; }
@@ -19660,8 +20347,8 @@ printf %s "checking for fchdir... " >&6; }
if test ${ac_cv_func_fchdir+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
@@ -19675,11 +20362,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_fchdir=yes
-else $as_nop
- ac_cv_func_fchdir=no
+else case e in #(
+ e) ac_cv_func_fchdir=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fchdir" >&5
printf "%s\n" "$ac_cv_func_fchdir" >&6; }
@@ -19699,8 +20388,8 @@ printf %s "checking for fsync... " >&6; }
if test ${ac_cv_func_fsync+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
@@ -19714,11 +20403,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_fsync=yes
-else $as_nop
- ac_cv_func_fsync=no
+else case e in #(
+ e) ac_cv_func_fsync=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fsync" >&5
printf "%s\n" "$ac_cv_func_fsync" >&6; }
@@ -19738,8 +20429,8 @@ printf %s "checking for fdatasync... " >&6; }
if test ${ac_cv_func_fdatasync+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
@@ -19753,11 +20444,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_fdatasync=yes
-else $as_nop
- ac_cv_func_fdatasync=no
+else case e in #(
+ e) ac_cv_func_fdatasync=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fdatasync" >&5
printf "%s\n" "$ac_cv_func_fdatasync" >&6; }
@@ -19777,8 +20470,8 @@ printf %s "checking for epoll_create... " >&6; }
if test ${ac_cv_func_epoll_create+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/epoll.h>
int
@@ -19792,11 +20485,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_epoll_create=yes
-else $as_nop
- ac_cv_func_epoll_create=no
+else case e in #(
+ e) ac_cv_func_epoll_create=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create" >&5
printf "%s\n" "$ac_cv_func_epoll_create" >&6; }
@@ -19816,8 +20511,8 @@ printf %s "checking for epoll_create1... " >&6; }
if test ${ac_cv_func_epoll_create1+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/epoll.h>
int
@@ -19831,11 +20526,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_epoll_create1=yes
-else $as_nop
- ac_cv_func_epoll_create1=no
+else case e in #(
+ e) ac_cv_func_epoll_create1=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create1" >&5
printf "%s\n" "$ac_cv_func_epoll_create1" >&6; }
@@ -19855,8 +20552,8 @@ printf %s "checking for kqueue... " >&6; }
if test ${ac_cv_func_kqueue+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -19873,11 +20570,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_kqueue=yes
-else $as_nop
- ac_cv_func_kqueue=no
+else case e in #(
+ e) ac_cv_func_kqueue=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_kqueue" >&5
printf "%s\n" "$ac_cv_func_kqueue" >&6; }
@@ -19897,8 +20596,8 @@ printf %s "checking for prlimit... " >&6; }
if test ${ac_cv_func_prlimit+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/time.h>
@@ -19915,11 +20614,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_prlimit=yes
-else $as_nop
- ac_cv_func_prlimit=no
+else case e in #(
+ e) ac_cv_func_prlimit=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_prlimit" >&5
printf "%s\n" "$ac_cv_func_prlimit" >&6; }
@@ -19940,8 +20641,8 @@ printf %s "checking for _dyld_shared_cache_contains_path... " >&6; }
if test ${ac_cv_func__dyld_shared_cache_contains_path+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <mach-o/dyld.h>
int
@@ -19955,11 +20656,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func__dyld_shared_cache_contains_path=yes
-else $as_nop
- ac_cv_func__dyld_shared_cache_contains_path=no
+else case e in #(
+ e) ac_cv_func__dyld_shared_cache_contains_path=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func__dyld_shared_cache_contains_path" >&5
printf "%s\n" "$ac_cv_func__dyld_shared_cache_contains_path" >&6; }
@@ -19980,8 +20683,8 @@ printf %s "checking for memfd_create... " >&6; }
if test ${ac_cv_func_memfd_create+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef HAVE_SYS_MMAN_H
@@ -20002,11 +20705,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_memfd_create=yes
-else $as_nop
- ac_cv_func_memfd_create=no
+else case e in #(
+ e) ac_cv_func_memfd_create=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memfd_create" >&5
printf "%s\n" "$ac_cv_func_memfd_create" >&6; }
@@ -20027,8 +20732,8 @@ printf %s "checking for eventfd... " >&6; }
if test ${ac_cv_func_eventfd+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef HAVE_SYS_EVENTFD_H
@@ -20046,11 +20751,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_eventfd=yes
-else $as_nop
- ac_cv_func_eventfd=no
+else case e in #(
+ e) ac_cv_func_eventfd=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_eventfd" >&5
printf "%s\n" "$ac_cv_func_eventfd" >&6; }
@@ -20071,8 +20778,8 @@ printf %s "checking for timerfd_create... " >&6; }
if test ${ac_cv_func_timerfd_create+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef HAVE_SYS_TIMERFD_H
@@ -20090,11 +20797,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_timerfd_create=yes
-else $as_nop
- ac_cv_func_timerfd_create=no
+else case e in #(
+ e) ac_cv_func_timerfd_create=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_timerfd_create" >&5
printf "%s\n" "$ac_cv_func_timerfd_create" >&6; }
@@ -20121,8 +20830,8 @@ printf %s "checking for ctermid_r... " >&6; }
if test ${ac_cv_func_ctermid_r+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
@@ -20136,11 +20845,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_ctermid_r=yes
-else $as_nop
- ac_cv_func_ctermid_r=no
+else case e in #(
+ e) ac_cv_func_ctermid_r=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ctermid_r" >&5
printf "%s\n" "$ac_cv_func_ctermid_r" >&6; }
@@ -20159,8 +20870,8 @@ printf %s "checking for flock declaration... " >&6; }
if test ${ac_cv_flock_decl+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/file.h>
int
@@ -20175,12 +20886,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_flock_decl=yes
-else $as_nop
- ac_cv_flock_decl=no
-
+else case e in #(
+ e) ac_cv_flock_decl=no
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
printf "%s\n" "$ac_cv_flock_decl" >&6; }
@@ -20194,22 +20907,28 @@ if test "x$ac_cv_func_flock" = xyes
then :
printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
printf %s "checking for flock in -lbsd... " >&6; }
if test ${ac_cv_lib_bsd_flock+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char flock ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char flock (void);
int
main (void)
{
@@ -20221,12 +20940,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_bsd_flock=yes
-else $as_nop
- ac_cv_lib_bsd_flock=no
+else case e in #(
+ e) ac_cv_lib_bsd_flock=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
printf "%s\n" "$ac_cv_lib_bsd_flock" >&6; }
@@ -20234,7 +20955,8 @@ if test "x$ac_cv_lib_bsd_flock" = xyes
then :
FCNTL_LIBS="-lbsd"
fi
-
+ ;;
+esac
fi
done
@@ -20247,8 +20969,8 @@ printf %s "checking for getpagesize... " >&6; }
if test ${ac_cv_func_getpagesize+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
@@ -20262,11 +20984,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_getpagesize=yes
-else $as_nop
- ac_cv_func_getpagesize=no
+else case e in #(
+ e) ac_cv_func_getpagesize=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpagesize" >&5
printf "%s\n" "$ac_cv_func_getpagesize" >&6; }
@@ -20285,8 +21009,8 @@ printf %s "checking for broken unsetenv... " >&6; }
if test ${ac_cv_broken_unsetenv+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
int
@@ -20300,12 +21024,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_broken_unsetenv=no
-else $as_nop
- ac_cv_broken_unsetenv=yes
-
+else case e in #(
+ e) ac_cv_broken_unsetenv=yes
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_unsetenv" >&5
printf "%s\n" "$ac_cv_broken_unsetenv" >&6; }
@@ -20327,8 +21053,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_TRUE+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$TRUE"; then
+else case e in #(
+ e) if test -n "$TRUE"; then
ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -20350,7 +21076,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
TRUE=$ac_cv_prog_TRUE
if test -n "$TRUE"; then
@@ -20372,16 +21099,22 @@ printf %s "checking for inet_aton in -lc... " >&6; }
if test ${ac_cv_lib_c_inet_aton+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lc $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char inet_aton ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_aton (void);
int
main (void)
{
@@ -20393,34 +21126,42 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_c_inet_aton=yes
-else $as_nop
- ac_cv_lib_c_inet_aton=no
+else case e in #(
+ e) ac_cv_lib_c_inet_aton=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
printf "%s\n" "$ac_cv_lib_c_inet_aton" >&6; }
if test "x$ac_cv_lib_c_inet_aton" = xyes
then :
$ac_cv_prog_TRUE
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
printf %s "checking for inet_aton in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv_inet_aton+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char inet_aton ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_aton (void);
int
main (void)
{
@@ -20432,12 +21173,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_resolv_inet_aton=yes
-else $as_nop
- ac_cv_lib_resolv_inet_aton=no
+else case e in #(
+ e) ac_cv_lib_resolv_inet_aton=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
printf "%s\n" "$ac_cv_lib_resolv_inet_aton" >&6; }
@@ -20446,7 +21189,8 @@ then :
SOCKET_LIBS="-lresolv"
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror in -lc" >&5
@@ -20454,16 +21198,22 @@ printf %s "checking for hstrerror in -lc... " >&6; }
if test ${ac_cv_lib_c_hstrerror+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lc $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char hstrerror ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char hstrerror (void);
int
main (void)
{
@@ -20475,34 +21225,42 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_c_hstrerror=yes
-else $as_nop
- ac_cv_lib_c_hstrerror=no
+else case e in #(
+ e) ac_cv_lib_c_hstrerror=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_hstrerror" >&5
printf "%s\n" "$ac_cv_lib_c_hstrerror" >&6; }
if test "x$ac_cv_lib_c_hstrerror" = xyes
then :
$ac_cv_prog_TRUE
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror in -lresolv" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror in -lresolv" >&5
printf %s "checking for hstrerror in -lresolv... " >&6; }
if test ${ac_cv_lib_resolv_hstrerror+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lresolv $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char hstrerror ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char hstrerror (void);
int
main (void)
{
@@ -20514,12 +21272,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_resolv_hstrerror=yes
-else $as_nop
- ac_cv_lib_resolv_hstrerror=no
+else case e in #(
+ e) ac_cv_lib_resolv_hstrerror=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_hstrerror" >&5
printf "%s\n" "$ac_cv_lib_resolv_hstrerror" >&6; }
@@ -20528,7 +21288,8 @@ then :
SOCKET_LIBS="-lresolv"
fi
-
+ ;;
+esac
fi
@@ -20539,12 +21300,12 @@ printf %s "checking for chflags... " >&6; }
if test ${ac_cv_have_chflags+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ac_cv_have_chflags=cross
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
@@ -20560,14 +21321,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_have_chflags=yes
-else $as_nop
- ac_cv_have_chflags=no
+else case e in #(
+ e) ac_cv_have_chflags=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
printf "%s\n" "$ac_cv_have_chflags" >&6; }
@@ -20576,8 +21340,9 @@ if test "$ac_cv_have_chflags" = cross ; then
if test "x$ac_cv_func_chflags" = xyes
then :
ac_cv_have_chflags="yes"
-else $as_nop
- ac_cv_have_chflags="no"
+else case e in #(
+ e) ac_cv_have_chflags="no" ;;
+esac
fi
fi
@@ -20592,12 +21357,12 @@ printf %s "checking for lchflags... " >&6; }
if test ${ac_cv_have_lchflags+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ac_cv_have_lchflags=cross
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
@@ -20613,14 +21378,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_have_lchflags=yes
-else $as_nop
- ac_cv_have_lchflags=no
+else case e in #(
+ e) ac_cv_have_lchflags=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
printf "%s\n" "$ac_cv_have_lchflags" >&6; }
@@ -20629,8 +21397,9 @@ if test "$ac_cv_have_lchflags" = cross ; then
if test "x$ac_cv_func_lchflags" = xyes
then :
ac_cv_have_lchflags="yes"
-else $as_nop
- ac_cv_have_lchflags="no"
+else case e in #(
+ e) ac_cv_have_lchflags="no" ;;
+esac
fi
fi
@@ -20737,16 +21506,22 @@ printf %s "checking for gzread in -lz... " >&6; }
if test ${ac_cv_lib_z_gzread+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char gzread ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gzread (void);
int
main (void)
{
@@ -20758,27 +21533,31 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_z_gzread=yes
-else $as_nop
- ac_cv_lib_z_gzread=no
+else case e in #(
+ e) ac_cv_lib_z_gzread=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5
printf "%s\n" "$ac_cv_lib_z_gzread" >&6; }
if test "x$ac_cv_lib_z_gzread" = xyes
then :
have_zlib=yes
-else $as_nop
- have_zlib=no
+else case e in #(
+ e) have_zlib=no ;;
+esac
fi
LIBS=$py_check_lib_save_LIBS
-else $as_nop
- have_zlib=no
+else case e in #(
+ e) have_zlib=no ;;
+esac
fi
done
@@ -20793,16 +21572,22 @@ printf %s "checking for inflateCopy in -lz... " >&6; }
if test ${ac_cv_lib_z_inflateCopy+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char inflateCopy ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflateCopy (void);
int
main (void)
{
@@ -20814,12 +21599,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_z_inflateCopy=yes
-else $as_nop
- ac_cv_lib_z_inflateCopy=no
+else case e in #(
+ e) ac_cv_lib_z_inflateCopy=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
printf "%s\n" "$ac_cv_lib_z_inflateCopy" >&6; }
@@ -20866,16 +21653,22 @@ printf %s "checking for gzread in -lz... " >&6; }
if test ${ac_cv_lib_z_gzread+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char gzread ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gzread (void);
int
main (void)
{
@@ -20887,27 +21680,31 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_z_gzread=yes
-else $as_nop
- ac_cv_lib_z_gzread=no
+else case e in #(
+ e) ac_cv_lib_z_gzread=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5
printf "%s\n" "$ac_cv_lib_z_gzread" >&6; }
if test "x$ac_cv_lib_z_gzread" = xyes
then :
have_zlib=yes
-else $as_nop
- have_zlib=no
+else case e in #(
+ e) have_zlib=no ;;
+esac
fi
LIBS=$py_check_lib_save_LIBS
-else $as_nop
- have_zlib=no
+else case e in #(
+ e) have_zlib=no ;;
+esac
fi
done
@@ -20922,16 +21719,22 @@ printf %s "checking for inflateCopy in -lz... " >&6; }
if test ${ac_cv_lib_z_inflateCopy+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char inflateCopy ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflateCopy (void);
int
main (void)
{
@@ -20943,12 +21746,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_z_inflateCopy=yes
-else $as_nop
- ac_cv_lib_z_inflateCopy=no
+else case e in #(
+ e) ac_cv_lib_z_inflateCopy=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
printf "%s\n" "$ac_cv_lib_z_inflateCopy" >&6; }
@@ -21084,16 +21889,22 @@ printf %s "checking for BZ2_bzCompress in -lbz2... " >&6; }
if test ${ac_cv_lib_bz2_BZ2_bzCompress+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lbz2 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char BZ2_bzCompress ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char BZ2_bzCompress (void);
int
main (void)
{
@@ -21105,25 +21916,29 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_bz2_BZ2_bzCompress=yes
-else $as_nop
- ac_cv_lib_bz2_BZ2_bzCompress=no
+else case e in #(
+ e) ac_cv_lib_bz2_BZ2_bzCompress=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5
printf "%s\n" "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; }
if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes
then :
have_bzip2=yes
-else $as_nop
- have_bzip2=no
+else case e in #(
+ e) have_bzip2=no ;;
+esac
fi
-else $as_nop
- have_bzip2=no
+else case e in #(
+ e) have_bzip2=no ;;
+esac
fi
done
@@ -21166,16 +21981,22 @@ printf %s "checking for BZ2_bzCompress in -lbz2... " >&6; }
if test ${ac_cv_lib_bz2_BZ2_bzCompress+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lbz2 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char BZ2_bzCompress ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char BZ2_bzCompress (void);
int
main (void)
{
@@ -21187,25 +22008,29 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_bz2_BZ2_bzCompress=yes
-else $as_nop
- ac_cv_lib_bz2_BZ2_bzCompress=no
+else case e in #(
+ e) ac_cv_lib_bz2_BZ2_bzCompress=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5
printf "%s\n" "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; }
if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes
then :
have_bzip2=yes
-else $as_nop
- have_bzip2=no
+else case e in #(
+ e) have_bzip2=no ;;
+esac
fi
-else $as_nop
- have_bzip2=no
+else case e in #(
+ e) have_bzip2=no ;;
+esac
fi
done
@@ -21312,16 +22137,22 @@ printf %s "checking for lzma_easy_encoder in -llzma... " >&6; }
if test ${ac_cv_lib_lzma_lzma_easy_encoder+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-llzma $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char lzma_easy_encoder ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lzma_easy_encoder (void);
int
main (void)
{
@@ -21333,25 +22164,29 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_lzma_lzma_easy_encoder=yes
-else $as_nop
- ac_cv_lib_lzma_lzma_easy_encoder=no
+else case e in #(
+ e) ac_cv_lib_lzma_lzma_easy_encoder=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5
printf "%s\n" "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; }
if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes
then :
have_liblzma=yes
-else $as_nop
- have_liblzma=no
+else case e in #(
+ e) have_liblzma=no ;;
+esac
fi
-else $as_nop
- have_liblzma=no
+else case e in #(
+ e) have_liblzma=no ;;
+esac
fi
done
@@ -21394,16 +22229,22 @@ printf %s "checking for lzma_easy_encoder in -llzma... " >&6; }
if test ${ac_cv_lib_lzma_lzma_easy_encoder+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-llzma $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char lzma_easy_encoder ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lzma_easy_encoder (void);
int
main (void)
{
@@ -21415,25 +22256,29 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_lzma_lzma_easy_encoder=yes
-else $as_nop
- ac_cv_lib_lzma_lzma_easy_encoder=no
+else case e in #(
+ e) ac_cv_lib_lzma_lzma_easy_encoder=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5
printf "%s\n" "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; }
if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes
then :
have_liblzma=yes
-else $as_nop
- have_liblzma=no
+else case e in #(
+ e) have_liblzma=no ;;
+esac
fi
-else $as_nop
- have_liblzma=no
+else case e in #(
+ e) have_liblzma=no ;;
+esac
fi
done
@@ -21469,8 +22314,8 @@ printf %s "checking for hstrerror... " >&6; }
if test ${ac_cv_func_hstrerror+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netdb.h>
int
@@ -21484,11 +22329,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_hstrerror=yes
-else $as_nop
- ac_cv_func_hstrerror=no
+else case e in #(
+ e) ac_cv_func_hstrerror=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_hstrerror" >&5
printf "%s\n" "$ac_cv_func_hstrerror" >&6; }
@@ -21508,8 +22355,8 @@ printf %s "checking for getservbyname... " >&6; }
if test ${ac_cv_func_getservbyname+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netdb.h>
int
@@ -21523,11 +22370,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_getservbyname=yes
-else $as_nop
- ac_cv_func_getservbyname=no
+else case e in #(
+ e) ac_cv_func_getservbyname=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getservbyname" >&5
printf "%s\n" "$ac_cv_func_getservbyname" >&6; }
@@ -21547,8 +22396,8 @@ printf %s "checking for getservbyport... " >&6; }
if test ${ac_cv_func_getservbyport+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netdb.h>
int
@@ -21562,11 +22411,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_getservbyport=yes
-else $as_nop
- ac_cv_func_getservbyport=no
+else case e in #(
+ e) ac_cv_func_getservbyport=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getservbyport" >&5
printf "%s\n" "$ac_cv_func_getservbyport" >&6; }
@@ -21586,8 +22437,8 @@ printf %s "checking for gethostbyname... " >&6; }
if test ${ac_cv_func_gethostbyname+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netdb.h>
int
@@ -21601,11 +22452,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_gethostbyname=yes
-else $as_nop
- ac_cv_func_gethostbyname=no
+else case e in #(
+ e) ac_cv_func_gethostbyname=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyname" >&5
printf "%s\n" "$ac_cv_func_gethostbyname" >&6; }
@@ -21625,8 +22478,8 @@ printf %s "checking for gethostbyaddr... " >&6; }
if test ${ac_cv_func_gethostbyaddr+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netdb.h>
int
@@ -21640,11 +22493,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_gethostbyaddr=yes
-else $as_nop
- ac_cv_func_gethostbyaddr=no
+else case e in #(
+ e) ac_cv_func_gethostbyaddr=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyaddr" >&5
printf "%s\n" "$ac_cv_func_gethostbyaddr" >&6; }
@@ -21664,8 +22519,8 @@ printf %s "checking for getprotobyname... " >&6; }
if test ${ac_cv_func_getprotobyname+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netdb.h>
int
@@ -21679,11 +22534,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_getprotobyname=yes
-else $as_nop
- ac_cv_func_getprotobyname=no
+else case e in #(
+ e) ac_cv_func_getprotobyname=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getprotobyname" >&5
printf "%s\n" "$ac_cv_func_getprotobyname" >&6; }
@@ -21706,8 +22563,8 @@ printf %s "checking for inet_aton... " >&6; }
if test ${ac_cv_func_inet_aton+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -21726,11 +22583,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_inet_aton=yes
-else $as_nop
- ac_cv_func_inet_aton=no
+else case e in #(
+ e) ac_cv_func_inet_aton=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_aton" >&5
printf "%s\n" "$ac_cv_func_inet_aton" >&6; }
@@ -21750,8 +22609,8 @@ printf %s "checking for inet_ntoa... " >&6; }
if test ${ac_cv_func_inet_ntoa+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -21770,11 +22629,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_inet_ntoa=yes
-else $as_nop
- ac_cv_func_inet_ntoa=no
+else case e in #(
+ e) ac_cv_func_inet_ntoa=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_ntoa" >&5
printf "%s\n" "$ac_cv_func_inet_ntoa" >&6; }
@@ -21794,8 +22655,8 @@ printf %s "checking for inet_pton... " >&6; }
if test ${ac_cv_func_inet_pton+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -21814,11 +22675,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_inet_pton=yes
-else $as_nop
- ac_cv_func_inet_pton=no
+else case e in #(
+ e) ac_cv_func_inet_pton=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_pton" >&5
printf "%s\n" "$ac_cv_func_inet_pton" >&6; }
@@ -21838,8 +22701,8 @@ printf %s "checking for getpeername... " >&6; }
if test ${ac_cv_func_getpeername+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -21858,11 +22721,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_getpeername=yes
-else $as_nop
- ac_cv_func_getpeername=no
+else case e in #(
+ e) ac_cv_func_getpeername=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpeername" >&5
printf "%s\n" "$ac_cv_func_getpeername" >&6; }
@@ -21882,8 +22747,8 @@ printf %s "checking for getsockname... " >&6; }
if test ${ac_cv_func_getsockname+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -21902,11 +22767,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_getsockname=yes
-else $as_nop
- ac_cv_func_getsockname=no
+else case e in #(
+ e) ac_cv_func_getsockname=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getsockname" >&5
printf "%s\n" "$ac_cv_func_getsockname" >&6; }
@@ -21926,8 +22793,8 @@ printf %s "checking for accept... " >&6; }
if test ${ac_cv_func_accept+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -21946,11 +22813,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_accept=yes
-else $as_nop
- ac_cv_func_accept=no
+else case e in #(
+ e) ac_cv_func_accept=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept" >&5
printf "%s\n" "$ac_cv_func_accept" >&6; }
@@ -21970,8 +22839,8 @@ printf %s "checking for bind... " >&6; }
if test ${ac_cv_func_bind+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -21990,11 +22859,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_bind=yes
-else $as_nop
- ac_cv_func_bind=no
+else case e in #(
+ e) ac_cv_func_bind=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_bind" >&5
printf "%s\n" "$ac_cv_func_bind" >&6; }
@@ -22014,8 +22885,8 @@ printf %s "checking for connect... " >&6; }
if test ${ac_cv_func_connect+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -22034,11 +22905,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_connect=yes
-else $as_nop
- ac_cv_func_connect=no
+else case e in #(
+ e) ac_cv_func_connect=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_connect" >&5
printf "%s\n" "$ac_cv_func_connect" >&6; }
@@ -22058,8 +22931,8 @@ printf %s "checking for listen... " >&6; }
if test ${ac_cv_func_listen+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -22078,11 +22951,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_listen=yes
-else $as_nop
- ac_cv_func_listen=no
+else case e in #(
+ e) ac_cv_func_listen=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_listen" >&5
printf "%s\n" "$ac_cv_func_listen" >&6; }
@@ -22102,8 +22977,8 @@ printf %s "checking for recvfrom... " >&6; }
if test ${ac_cv_func_recvfrom+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -22122,11 +22997,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_recvfrom=yes
-else $as_nop
- ac_cv_func_recvfrom=no
+else case e in #(
+ e) ac_cv_func_recvfrom=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_recvfrom" >&5
printf "%s\n" "$ac_cv_func_recvfrom" >&6; }
@@ -22146,8 +23023,8 @@ printf %s "checking for sendto... " >&6; }
if test ${ac_cv_func_sendto+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -22166,11 +23043,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_sendto=yes
-else $as_nop
- ac_cv_func_sendto=no
+else case e in #(
+ e) ac_cv_func_sendto=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sendto" >&5
printf "%s\n" "$ac_cv_func_sendto" >&6; }
@@ -22190,8 +23069,8 @@ printf %s "checking for setsockopt... " >&6; }
if test ${ac_cv_func_setsockopt+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -22210,11 +23089,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_setsockopt=yes
-else $as_nop
- ac_cv_func_setsockopt=no
+else case e in #(
+ e) ac_cv_func_setsockopt=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setsockopt" >&5
printf "%s\n" "$ac_cv_func_setsockopt" >&6; }
@@ -22234,8 +23115,8 @@ printf %s "checking for socket... " >&6; }
if test ${ac_cv_func_socket+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -22254,11 +23135,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_socket=yes
-else $as_nop
- ac_cv_func_socket=no
+else case e in #(
+ e) ac_cv_func_socket=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_socket" >&5
printf "%s\n" "$ac_cv_func_socket" >&6; }
@@ -22280,8 +23163,8 @@ printf %s "checking for setgroups... " >&6; }
if test ${ac_cv_func_setgroups+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
@@ -22300,11 +23183,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_setgroups=yes
-else $as_nop
- ac_cv_func_setgroups=no
+else case e in #(
+ e) ac_cv_func_setgroups=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setgroups" >&5
printf "%s\n" "$ac_cv_func_setgroups" >&6; }
@@ -22328,22 +23213,28 @@ if test "x$ac_cv_func_openpty" = xyes
then :
printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
printf %s "checking for openpty in -lutil... " >&6; }
if test ${ac_cv_lib_util_openpty+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lutil $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char openpty ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char openpty (void);
int
main (void)
{
@@ -22355,12 +23246,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_util_openpty=yes
-else $as_nop
- ac_cv_lib_util_openpty=no
+else case e in #(
+ e) ac_cv_lib_util_openpty=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
printf "%s\n" "$ac_cv_lib_util_openpty" >&6; }
@@ -22368,22 +23261,28 @@ if test "x$ac_cv_lib_util_openpty" = xyes
then :
printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
LIBS="$LIBS -lutil"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
printf %s "checking for openpty in -lbsd... " >&6; }
if test ${ac_cv_lib_bsd_openpty+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char openpty ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char openpty (void);
int
main (void)
{
@@ -22395,12 +23294,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_bsd_openpty=yes
-else $as_nop
- ac_cv_lib_bsd_openpty=no
+else case e in #(
+ e) ac_cv_lib_bsd_openpty=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
printf "%s\n" "$ac_cv_lib_bsd_openpty" >&6; }
@@ -22409,9 +23310,11 @@ then :
printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
LIBS="$LIBS -lbsd"
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
done
@@ -22420,15 +23323,21 @@ printf %s "checking for library containing login_tty... " >&6; }
if test ${ac_cv_search_login_tty+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char login_tty ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char login_tty (void);
int
main (void)
{
@@ -22459,11 +23368,13 @@ done
if test ${ac_cv_search_login_tty+y}
then :
-else $as_nop
- ac_cv_search_login_tty=no
+else case e in #(
+ e) ac_cv_search_login_tty=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login_tty" >&5
printf "%s\n" "$ac_cv_search_login_tty" >&6; }
@@ -22485,22 +23396,28 @@ if test "x$ac_cv_func_forkpty" = xyes
then :
printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
printf %s "checking for forkpty in -lutil... " >&6; }
if test ${ac_cv_lib_util_forkpty+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lutil $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char forkpty ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char forkpty (void);
int
main (void)
{
@@ -22512,12 +23429,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_util_forkpty=yes
-else $as_nop
- ac_cv_lib_util_forkpty=no
+else case e in #(
+ e) ac_cv_lib_util_forkpty=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
printf "%s\n" "$ac_cv_lib_util_forkpty" >&6; }
@@ -22525,22 +23444,28 @@ if test "x$ac_cv_lib_util_forkpty" = xyes
then :
printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
LIBS="$LIBS -lutil"
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
printf %s "checking for forkpty in -lbsd... " >&6; }
if test ${ac_cv_lib_bsd_forkpty+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char forkpty ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char forkpty (void);
int
main (void)
{
@@ -22552,12 +23477,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_bsd_forkpty=yes
-else $as_nop
- ac_cv_lib_bsd_forkpty=no
+else case e in #(
+ e) ac_cv_lib_bsd_forkpty=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
printf "%s\n" "$ac_cv_lib_bsd_forkpty" >&6; }
@@ -22566,9 +23493,11 @@ then :
printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h
LIBS="$LIBS -lbsd"
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
done
@@ -22617,13 +23546,14 @@ if test "x$ac_cv_func_dup2" = xyes
then :
printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
-else $as_nop
- case " $LIBOBJS " in
+else case e in #(
+ e) case " $LIBOBJS " in
*" dup2.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS dup2.$ac_objext"
;;
esac
-
+ ;;
+esac
fi
@@ -22706,23 +23636,29 @@ if test "x$ac_cv_func_clock_gettime" = xyes
then :
printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
printf %s "checking for clock_gettime in -lrt... " >&6; }
if test ${ac_cv_lib_rt_clock_gettime+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char clock_gettime ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime (void);
int
main (void)
{
@@ -22734,12 +23670,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_rt_clock_gettime=yes
-else $as_nop
- ac_cv_lib_rt_clock_gettime=no
+else case e in #(
+ e) ac_cv_lib_rt_clock_gettime=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; }
@@ -22755,7 +23693,8 @@ printf "%s\n" "#define TIMEMODULE_LIB rt" >>confdefs.h
fi
-
+ ;;
+esac
fi
done
@@ -22768,23 +23707,29 @@ if test "x$ac_cv_func_clock_getres" = xyes
then :
printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
printf %s "checking for clock_getres in -lrt... " >&6; }
if test ${ac_cv_lib_rt_clock_getres+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char clock_getres ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_getres (void);
int
main (void)
{
@@ -22796,12 +23741,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_rt_clock_getres=yes
-else $as_nop
- ac_cv_lib_rt_clock_getres=no
+else case e in #(
+ e) ac_cv_lib_rt_clock_getres=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
printf "%s\n" "$ac_cv_lib_rt_clock_getres" >&6; }
@@ -22813,7 +23760,8 @@ then :
fi
-
+ ;;
+esac
fi
done
@@ -22831,23 +23779,29 @@ if test "x$ac_cv_func_clock_settime" = xyes
then :
printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
printf %s "checking for clock_settime in -lrt... " >&6; }
if test ${ac_cv_lib_rt_clock_settime+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char clock_settime ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_settime (void);
int
main (void)
{
@@ -22859,12 +23813,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_rt_clock_settime=yes
-else $as_nop
- ac_cv_lib_rt_clock_settime=no
+else case e in #(
+ e) ac_cv_lib_rt_clock_settime=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
printf "%s\n" "$ac_cv_lib_rt_clock_settime" >&6; }
@@ -22876,7 +23832,8 @@ then :
fi
-
+ ;;
+esac
fi
done
@@ -22894,23 +23851,29 @@ if test "x$ac_cv_func_clock_nanosleep" = xyes
then :
printf "%s\n" "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_nanosleep in -lrt" >&5
printf %s "checking for clock_nanosleep in -lrt... " >&6; }
if test ${ac_cv_lib_rt_clock_nanosleep+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char clock_nanosleep ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_nanosleep (void);
int
main (void)
{
@@ -22922,12 +23885,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_rt_clock_nanosleep=yes
-else $as_nop
- ac_cv_lib_rt_clock_nanosleep=no
+else case e in #(
+ e) ac_cv_lib_rt_clock_nanosleep=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_nanosleep" >&5
printf "%s\n" "$ac_cv_lib_rt_clock_nanosleep" >&6; }
@@ -22939,7 +23904,8 @@ then :
fi
-
+ ;;
+esac
fi
done
@@ -22953,23 +23919,29 @@ if test "x$ac_cv_func_nanosleep" = xyes
then :
printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
printf %s "checking for nanosleep in -lrt... " >&6; }
if test ${ac_cv_lib_rt_nanosleep+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char nanosleep ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nanosleep (void);
int
main (void)
{
@@ -22981,12 +23953,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_rt_nanosleep=yes
-else $as_nop
- ac_cv_lib_rt_nanosleep=no
+else case e in #(
+ e) ac_cv_lib_rt_nanosleep=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
printf "%s\n" "$ac_cv_lib_rt_nanosleep" >&6; }
@@ -22998,7 +23972,8 @@ then :
fi
-
+ ;;
+esac
fi
done
@@ -23008,8 +23983,8 @@ printf %s "checking for major, minor, and makedev... " >&6; }
if test ${ac_cv_device_macros+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -23035,12 +24010,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_device_macros=yes
-else $as_nop
- ac_cv_device_macros=no
+else case e in #(
+ e) ac_cv_device_macros=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_device_macros" >&5
printf "%s\n" "$ac_cv_device_macros" >&6; }
@@ -23064,8 +24041,8 @@ printf %s "checking for getaddrinfo... " >&6; }
if test ${ac_cv_func_getaddrinfo+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -23085,12 +24062,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_func_getaddrinfo=yes
-else $as_nop
- ac_cv_func_getaddrinfo=no
+else case e in #(
+ e) ac_cv_func_getaddrinfo=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5
printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; }
@@ -23103,8 +24082,8 @@ printf %s "checking getaddrinfo bug... " >&6; }
if test ${ac_cv_buggy_getaddrinfo+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
if test "$ac_sys_system" = "Linux-android" || test "$ac_sys_system" = "iOS"; then
@@ -23114,8 +24093,8 @@ elif test "${enable_ipv6+set}" = set; then
else
ac_cv_buggy_getaddrinfo=yes
fi
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -23211,13 +24190,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_buggy_getaddrinfo=no
-else $as_nop
- ac_cv_buggy_getaddrinfo=yes
+else case e in #(
+ e) ac_cv_buggy_getaddrinfo=yes ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
printf "%s\n" "$ac_cv_buggy_getaddrinfo" >&6; }
@@ -23253,8 +24235,8 @@ printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
if test ${ac_cv_struct_tm+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <time.h>
@@ -23272,10 +24254,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_struct_tm=time.h
-else $as_nop
- ac_cv_struct_tm=sys/time.h
+else case e in #(
+ e) ac_cv_struct_tm=sys/time.h ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
printf "%s\n" "$ac_cv_struct_tm" >&6; }
@@ -23307,8 +24291,9 @@ else
if test "x$ac_cv_have_decl_tzname" = xyes
then :
ac_have_decl=1
-else $as_nop
- ac_have_decl=0
+else case e in #(
+ e) ac_have_decl=0 ;;
+esac
fi
printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
@@ -23317,8 +24302,8 @@ printf %s "checking for tzname... " >&6; }
if test ${ac_cv_var_tzname+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
#if !HAVE_DECL_TZNAME
@@ -23336,11 +24321,13 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_var_tzname=yes
-else $as_nop
- ac_cv_var_tzname=no
+else case e in #(
+ e) ac_cv_var_tzname=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
+ conftest$ac_exeext conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
printf "%s\n" "$ac_cv_var_tzname" >&6; }
@@ -23447,8 +24434,8 @@ printf %s "checking for time.h that defines altzone... " >&6; }
if test ${ac_cv_header_time_altzone+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
@@ -23463,11 +24450,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_header_time_altzone=yes
-else $as_nop
- ac_cv_header_time_altzone=no
+else case e in #(
+ e) ac_cv_header_time_altzone=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
printf "%s\n" "$ac_cv_header_time_altzone" >&6; }
@@ -23482,8 +24471,8 @@ printf %s "checking for addrinfo... " >&6; }
if test ${ac_cv_struct_addrinfo+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <netdb.h>
int
@@ -23497,10 +24486,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_struct_addrinfo=yes
-else $as_nop
- ac_cv_struct_addrinfo=no
+else case e in #(
+ e) ac_cv_struct_addrinfo=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
printf "%s\n" "$ac_cv_struct_addrinfo" >&6; }
@@ -23515,8 +24506,8 @@ printf %s "checking for sockaddr_storage... " >&6; }
if test ${ac_cv_struct_sockaddr_storage+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
# include <sys/types.h>
@@ -23532,10 +24523,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_struct_sockaddr_storage=yes
-else $as_nop
- ac_cv_struct_sockaddr_storage=no
+else case e in #(
+ e) ac_cv_struct_sockaddr_storage=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
printf "%s\n" "$ac_cv_struct_sockaddr_storage" >&6; }
@@ -23550,8 +24543,8 @@ printf %s "checking for sockaddr_alg... " >&6; }
if test ${ac_cv_struct_sockaddr_alg+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
# include <sys/types.h>
@@ -23568,10 +24561,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_struct_sockaddr_alg=yes
-else $as_nop
- ac_cv_struct_sockaddr_alg=no
+else case e in #(
+ e) ac_cv_struct_sockaddr_alg=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
printf "%s\n" "$ac_cv_struct_sockaddr_alg" >&6; }
@@ -23588,8 +24583,8 @@ printf %s "checking for an ANSI C-conforming const... " >&6; }
if test ${ac_cv_c_const+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -23653,10 +24648,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_c_const=yes
-else $as_nop
- ac_cv_c_const=no
+else case e in #(
+ e) ac_cv_c_const=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
printf "%s\n" "$ac_cv_c_const" >&6; }
@@ -23672,8 +24669,8 @@ printf %s "checking for working signed char... " >&6; }
if test ${ac_cv_working_signed_char_c+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -23688,11 +24685,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_working_signed_char_c=yes
-else $as_nop
- ac_cv_working_signed_char_c=no
+else case e in #(
+ e) ac_cv_working_signed_char_c=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_signed_char_c" >&5
printf "%s\n" "$ac_cv_working_signed_char_c" >&6; }
@@ -23710,8 +24709,8 @@ printf %s "checking for prototypes... " >&6; }
if test ${ac_cv_function_prototypes+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo(int x) { return 0; }
@@ -23726,11 +24725,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_function_prototypes=yes
-else $as_nop
- ac_cv_function_prototypes=no
+else case e in #(
+ e) ac_cv_function_prototypes=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_function_prototypes" >&5
printf "%s\n" "$ac_cv_function_prototypes" >&6; }
@@ -23752,8 +24753,8 @@ printf %s "checking for socketpair... " >&6; }
if test ${ac_cv_func_socketpair+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -23770,11 +24771,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_func_socketpair=yes
-else $as_nop
- ac_cv_func_socketpair=no
+else case e in #(
+ e) ac_cv_func_socketpair=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_socketpair" >&5
printf "%s\n" "$ac_cv_func_socketpair" >&6; }
@@ -23794,8 +24797,8 @@ printf %s "checking if sockaddr has sa_len member... " >&6; }
if test ${ac_cv_struct_sockaddr_sa_len+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
@@ -23812,11 +24815,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_struct_sockaddr_sa_len=yes
-else $as_nop
- ac_cv_struct_sockaddr_sa_len=no
+else case e in #(
+ e) ac_cv_struct_sockaddr_sa_len=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_sa_len" >&5
printf "%s\n" "$ac_cv_struct_sockaddr_sa_len" >&6; }
@@ -23873,8 +24878,8 @@ printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
@@ -23911,8 +24916,8 @@ printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
@@ -23947,23 +24952,26 @@ printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$OLD_CFLAGS
-else $as_nop
-
+else case e in #(
+ e)
ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
if test "x$ac_cv_func_gethostbyname" = xyes
then :
@@ -23971,7 +24979,8 @@ then :
fi
-
+ ;;
+esac
fi
@@ -23988,22 +24997,28 @@ ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
if test "x$ac_cv_func___fpu_control" = xyes
then :
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
printf %s "checking for __fpu_control in -lieee... " >&6; }
if test ${ac_cv_lib_ieee___fpu_control+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lieee $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char __fpu_control ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __fpu_control (void);
int
main (void)
{
@@ -24015,12 +25030,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_ieee___fpu_control=yes
-else $as_nop
- ac_cv_lib_ieee___fpu_control=no
+else case e in #(
+ e) ac_cv_lib_ieee___fpu_control=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
printf "%s\n" "$ac_cv_lib_ieee___fpu_control" >&6; }
@@ -24032,7 +25049,8 @@ then :
fi
-
+ ;;
+esac
fi
@@ -24059,9 +25077,10 @@ then LIBM=$withval
printf "%s\n" "set LIBM=\"$withval\"" >&6; }
else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
-printf "%s\n" "default LIBM=\"$LIBM\"" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
+printf "%s\n" "default LIBM=\"$LIBM\"" >&6; } ;;
+esac
fi
@@ -24084,9 +25103,10 @@ then LIBC=$withval
printf "%s\n" "set LIBC=\"$withval\"" >&6; }
else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
-printf "%s\n" "default LIBC=\"$LIBC\"" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
+printf "%s\n" "default LIBC=\"$LIBC\"" >&6; } ;;
+esac
fi
@@ -24100,8 +25120,8 @@ printf %s "checking for x64 gcc inline assembler... " >&6; }
if test ${ac_cv_gcc_asm_for_x64+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24118,12 +25138,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_gcc_asm_for_x64=yes
-else $as_nop
- ac_cv_gcc_asm_for_x64=no
+else case e in #(
+ e) ac_cv_gcc_asm_for_x64=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_x64" >&5
printf "%s\n" "$ac_cv_gcc_asm_for_x64" >&6; }
@@ -24146,8 +25168,8 @@ printf %s "checking whether float word ordering is bigendian... " >&6; }
if test ${ax_cv_c_float_words_bigendian+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_cv_c_float_words_bigendian=unknown
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -24184,7 +25206,8 @@ fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
+ conftest$ac_exeext conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
printf "%s\n" "$ax_cv_c_float_words_bigendian" >&6; }
@@ -24232,8 +25255,8 @@ printf %s "checking whether we can use gcc inline assembler to get and set x87 c
if test ${ac_cv_gcc_asm_for_x87+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24252,12 +25275,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_gcc_asm_for_x87=yes
-else $as_nop
- ac_cv_gcc_asm_for_x87=no
+else case e in #(
+ e) ac_cv_gcc_asm_for_x87=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_x87" >&5
printf "%s\n" "$ac_cv_gcc_asm_for_x87" >&6; }
@@ -24275,8 +25300,8 @@ printf %s "checking whether we can use gcc inline assembler to get and set mc688
if test ${ac_cv_gcc_asm_for_mc68881+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24295,12 +25320,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_gcc_asm_for_mc68881=yes
-else $as_nop
- ac_cv_gcc_asm_for_mc68881=no
+else case e in #(
+ e) ac_cv_gcc_asm_for_mc68881=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_mc68881" >&5
printf "%s\n" "$ac_cv_gcc_asm_for_mc68881" >&6; }
@@ -24323,16 +25350,16 @@ printf %s "checking for x87-style double rounding... " >&6; }
if test ${ac_cv_x87_double_rounding+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
# $BASECFLAGS may affect the result
ac_save_cc="$CC"
CC="$CC $BASECFLAGS"
if test "$cross_compiling" = yes
then :
ac_cv_x87_double_rounding=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
@@ -24358,15 +25385,18 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_x87_double_rounding=no
-else $as_nop
- ac_cv_x87_double_rounding=yes
+else case e in #(
+ e) ac_cv_x87_double_rounding=yes ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
CC="$ac_save_cc"
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
printf "%s\n" "$ac_cv_x87_double_rounding" >&6; }
@@ -24390,17 +25420,18 @@ LIBS="$LIBS $LIBM"
for ac_func in acosh asinh atanh erf erfc expm1 log1p log2
do :
- as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
+ as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1
_ACEOF
-else $as_nop
- as_fn_error $? "Python requires C99 compatible libm" "$LINENO" 5
-
+else case e in #(
+ e) as_fn_error $? "Python requires C99 compatible libm" "$LINENO" 5
+ ;;
+esac
fi
done
@@ -24411,12 +25442,12 @@ printf %s "checking whether POSIX semaphores are enabled... " >&6; }
if test ${ac_cv_posix_semaphores_enabled+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ac_cv_posix_semaphores_enabled=yes
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24442,14 +25473,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_posix_semaphores_enabled=yes
-else $as_nop
- ac_cv_posix_semaphores_enabled=no
+else case e in #(
+ e) ac_cv_posix_semaphores_enabled=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
printf "%s\n" "$ac_cv_posix_semaphores_enabled" >&6; }
@@ -24467,12 +25501,12 @@ printf %s "checking for broken sem_getvalue... " >&6; }
if test ${ac_cv_broken_sem_getvalue+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ac_cv_broken_sem_getvalue=yes
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24502,14 +25536,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_broken_sem_getvalue=no
-else $as_nop
- ac_cv_broken_sem_getvalue=yes
+else case e in #(
+ e) ac_cv_broken_sem_getvalue=yes ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
printf "%s\n" "$ac_cv_broken_sem_getvalue" >&6; }
@@ -24527,8 +25564,9 @@ ac_fn_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dl
if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes
then :
ac_have_decl=1
-else $as_nop
- ac_have_decl=0
+else case e in #(
+ e) ac_have_decl=0 ;;
+esac
fi
printf "%s\n" "#define HAVE_DECL_RTLD_LAZY $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
@@ -24536,8 +25574,9 @@ ac_fn_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfc
if test "x$ac_cv_have_decl_RTLD_NOW" = xyes
then :
ac_have_decl=1
-else $as_nop
- ac_have_decl=0
+else case e in #(
+ e) ac_have_decl=0 ;;
+esac
fi
printf "%s\n" "#define HAVE_DECL_RTLD_NOW $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
@@ -24545,8 +25584,9 @@ ac_fn_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include
if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes
then :
ac_have_decl=1
-else $as_nop
- ac_have_decl=0
+else case e in #(
+ e) ac_have_decl=0 ;;
+esac
fi
printf "%s\n" "#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
@@ -24554,8 +25594,9 @@ ac_fn_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <
if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes
then :
ac_have_decl=1
-else $as_nop
- ac_have_decl=0
+else case e in #(
+ e) ac_have_decl=0 ;;
+esac
fi
printf "%s\n" "#define HAVE_DECL_RTLD_LOCAL $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
@@ -24563,8 +25604,9 @@ ac_fn_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#inc
if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes
then :
ac_have_decl=1
-else $as_nop
- ac_have_decl=0
+else case e in #(
+ e) ac_have_decl=0 ;;
+esac
fi
printf "%s\n" "#define HAVE_DECL_RTLD_NODELETE $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
@@ -24572,8 +25614,9 @@ ac_fn_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include
if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes
then :
ac_have_decl=1
-else $as_nop
- ac_have_decl=0
+else case e in #(
+ e) ac_have_decl=0 ;;
+esac
fi
printf "%s\n" "#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
@@ -24581,8 +25624,9 @@ ac_fn_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#inc
if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes
then :
ac_have_decl=1
-else $as_nop
- ac_have_decl=0
+else case e in #(
+ e) ac_have_decl=0 ;;
+esac
fi
printf "%s\n" "#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
@@ -24590,8 +25634,9 @@ ac_fn_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include
if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes
then :
ac_have_decl=1
-else $as_nop
- ac_have_decl=0
+else case e in #(
+ e) ac_have_decl=0 ;;
+esac
fi
printf "%s\n" "#define HAVE_DECL_RTLD_MEMBER $ac_have_decl" >>confdefs.h
@@ -24618,9 +25663,10 @@ printf "%s\n" "$enable_big_digits" >&6; }
printf "%s\n" "#define PYLONG_BITS_IN_DIGIT $enable_big_digits" >>confdefs.h
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
-printf "%s\n" "no value specified" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
+printf "%s\n" "no value specified" >&6; } ;;
+esac
fi
@@ -24634,9 +25680,10 @@ printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
wchar_h="yes"
-else $as_nop
- wchar_h="no"
-
+else case e in #(
+ e) wchar_h="no"
+ ;;
+esac
fi
@@ -24645,29 +25692,31 @@ if test "$wchar_h" = 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]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
printf %s "checking size of wchar_t... " >&6; }
if test ${ac_cv_sizeof_wchar_t+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
"
then :
-else $as_nop
- if test "$ac_cv_type_wchar_t" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_wchar_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (wchar_t)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_wchar_t=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
@@ -24688,13 +25737,13 @@ printf %s "checking whether wchar_t is signed... " >&6; }
if test ${ac_cv_wchar_t_signed+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
if test "$cross_compiling" = yes
then :
ac_cv_wchar_t_signed=yes
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
@@ -24708,13 +25757,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_wchar_t_signed=yes
-else $as_nop
- ac_cv_wchar_t_signed=no
+else case e in #(
+ e) ac_cv_wchar_t_signed=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
printf "%s\n" "$ac_cv_wchar_t_signed" >&6; }
@@ -24758,8 +25810,8 @@ printf %s "checking whether byte ordering is bigendian... " >&6; }
if test ${ac_cv_c_bigendian+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_c_bigendian=unknown
+else case e in #(
+ e) ac_cv_c_bigendian=unknown
# See if we're dealing with a universal compiler.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24805,8 +25857,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
int
main (void)
{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
- && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
&& LITTLE_ENDIAN)
bogus endian macros
#endif
@@ -24837,8 +25889,9 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_c_bigendian=yes
-else $as_nop
- ac_cv_c_bigendian=no
+else case e in #(
+ e) ac_cv_c_bigendian=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
@@ -24882,8 +25935,9 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_c_bigendian=yes
-else $as_nop
- ac_cv_c_bigendian=no
+else case e in #(
+ e) ac_cv_c_bigendian=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
@@ -24910,22 +25964,23 @@ unsigned short int ascii_mm[] =
int use_ebcdic (int i) {
return ebcdic_mm[i] + ebcdic_ii[i];
}
- extern int foo;
-
-int
-main (void)
-{
-return use_ascii (foo) == use_ebcdic (foo);
- ;
- return 0;
-}
+ int
+ main (int argc, char **argv)
+ {
+ /* Intimidate the compiler so that it does not
+ optimize the arrays away. */
+ char *p = argv[0];
+ ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
+ ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
+ return use_ascii (argc) == use_ebcdic (*p);
+ }
_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
then :
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
ac_cv_c_bigendian=yes
fi
- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
if test "$ac_cv_c_bigendian" = unknown; then
ac_cv_c_bigendian=no
else
@@ -24934,9 +25989,10 @@ then :
fi
fi
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
@@ -24959,14 +26015,17 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_c_bigendian=no
-else $as_nop
- ac_cv_c_bigendian=yes
+else case e in #(
+ e) ac_cv_c_bigendian=yes ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
printf "%s\n" "$ac_cv_c_bigendian" >&6; }
@@ -25084,9 +26143,10 @@ else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
@@ -25117,9 +26177,10 @@ else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
fi
@@ -25130,13 +26191,13 @@ printf %s "checking whether right shift extends the sign bit... " >&6; }
if test ${ac_cv_rshift_extends_sign+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
if test "$cross_compiling" = yes
then :
ac_cv_rshift_extends_sign=yes
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(void)
@@ -25148,13 +26209,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_rshift_extends_sign=yes
-else $as_nop
- ac_cv_rshift_extends_sign=no
+else case e in #(
+ e) ac_cv_rshift_extends_sign=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
printf "%s\n" "$ac_cv_rshift_extends_sign" >&6; }
@@ -25171,8 +26235,8 @@ printf %s "checking for getc_unlocked() and friends... " >&6; }
if test ${ac_cv_have_getc_unlocked+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -25192,11 +26256,13 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_have_getc_unlocked=yes
-else $as_nop
- ac_cv_have_getc_unlocked=no
+else case e in #(
+ e) ac_cv_have_getc_unlocked=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
+ conftest$ac_exeext conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
printf "%s\n" "$ac_cv_have_getc_unlocked" >&6; }
@@ -25227,9 +26293,10 @@ then :
;;
esac
-else $as_nop
- with_readline=readline
-
+else case e in #(
+ e) with_readline=readline
+ ;;
+esac
fi
@@ -25316,16 +26383,22 @@ printf %s "checking for readline in -lreadline... " >&6; }
if test ${ac_cv_lib_readline_readline+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char readline ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline (void);
int
main (void)
{
@@ -25337,12 +26410,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_readline_readline=yes
-else $as_nop
- ac_cv_lib_readline_readline=no
+else case e in #(
+ e) ac_cv_lib_readline_readline=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
printf "%s\n" "$ac_cv_lib_readline_readline" >&6; }
@@ -25353,13 +26428,15 @@ then :
READLINE_CFLAGS=${LIBREADLINE_CFLAGS-""}
READLINE_LIBS=${LIBREADLINE_LIBS-"-lreadline"}
-else $as_nop
- with_readline=no
+else case e in #(
+ e) with_readline=no ;;
+esac
fi
-else $as_nop
- with_readline=no
+else case e in #(
+ e) with_readline=no ;;
+esac
fi
done
@@ -25395,16 +26472,22 @@ printf %s "checking for readline in -lreadline... " >&6; }
if test ${ac_cv_lib_readline_readline+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char readline ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline (void);
int
main (void)
{
@@ -25416,12 +26499,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_readline_readline=yes
-else $as_nop
- ac_cv_lib_readline_readline=no
+else case e in #(
+ e) ac_cv_lib_readline_readline=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
printf "%s\n" "$ac_cv_lib_readline_readline" >&6; }
@@ -25432,13 +26517,15 @@ then :
READLINE_CFLAGS=${LIBREADLINE_CFLAGS-""}
READLINE_LIBS=${LIBREADLINE_LIBS-"-lreadline"}
-else $as_nop
- with_readline=no
+else case e in #(
+ e) with_readline=no ;;
+esac
fi
-else $as_nop
- with_readline=no
+else case e in #(
+ e) with_readline=no ;;
+esac
fi
done
@@ -25547,16 +26634,22 @@ printf %s "checking for readline in -ledit... " >&6; }
if test ${ac_cv_lib_edit_readline+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ledit $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char readline ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline (void);
int
main (void)
{
@@ -25568,12 +26661,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_edit_readline=yes
-else $as_nop
- ac_cv_lib_edit_readline=no
+else case e in #(
+ e) ac_cv_lib_edit_readline=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5
printf "%s\n" "$ac_cv_lib_edit_readline" >&6; }
@@ -25586,13 +26681,15 @@ then :
READLINE_CFLAGS=${LIBEDIT_CFLAGS-""}
READLINE_LIBS=${LIBEDIT_LIBS-"-ledit"}
-else $as_nop
- with_readline=no
+else case e in #(
+ e) with_readline=no ;;
+esac
fi
-else $as_nop
- with_readline=no
+else case e in #(
+ e) with_readline=no ;;
+esac
fi
done
@@ -25628,16 +26725,22 @@ printf %s "checking for readline in -ledit... " >&6; }
if test ${ac_cv_lib_edit_readline+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ledit $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char readline ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline (void);
int
main (void)
{
@@ -25649,12 +26752,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_edit_readline=yes
-else $as_nop
- ac_cv_lib_edit_readline=no
+else case e in #(
+ e) ac_cv_lib_edit_readline=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5
printf "%s\n" "$ac_cv_lib_edit_readline" >&6; }
@@ -25667,13 +26772,15 @@ then :
READLINE_CFLAGS=${LIBEDIT_CFLAGS-""}
READLINE_LIBS=${LIBEDIT_LIBS-"-ledit"}
-else $as_nop
- with_readline=no
+else case e in #(
+ e) with_readline=no ;;
+esac
fi
-else $as_nop
- with_readline=no
+else case e in #(
+ e) with_readline=no ;;
+esac
fi
done
@@ -25711,8 +26818,8 @@ then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_readline (CFLAGS: $READLINE_CFLAGS, LIBS: $READLINE_LIBS)" >&5
printf "%s\n" "$with_readline (CFLAGS: $READLINE_CFLAGS, LIBS: $READLINE_LIBS)" >&6; }
@@ -25773,8 +26880,8 @@ printf %s "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; }
if test ${ac_cv_readline_rl_pre_input_hook+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25797,13 +26904,15 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_readline_rl_pre_input_hook=yes
-else $as_nop
- ac_cv_readline_rl_pre_input_hook=no
-
+else case e in #(
+ e) ac_cv_readline_rl_pre_input_hook=no
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_pre_input_hook" >&5
printf "%s\n" "$ac_cv_readline_rl_pre_input_hook" >&6; }
@@ -25822,8 +26931,8 @@ printf %s "checking for rl_completion_display_matches_hook in -l$LIBREADLINE...
if test ${ac_cv_readline_rl_completion_display_matches_hook+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25846,13 +26955,15 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_readline_rl_completion_display_matches_hook=yes
-else $as_nop
- ac_cv_readline_rl_completion_display_matches_hook=no
-
+else case e in #(
+ e) ac_cv_readline_rl_completion_display_matches_hook=no
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_completion_display_matches_hook" >&5
printf "%s\n" "$ac_cv_readline_rl_completion_display_matches_hook" >&6; }
@@ -25871,8 +26982,8 @@ printf %s "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; }
if test ${ac_cv_readline_rl_resize_terminal+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25895,13 +27006,15 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_readline_rl_resize_terminal=yes
-else $as_nop
- ac_cv_readline_rl_resize_terminal=no
-
+else case e in #(
+ e) ac_cv_readline_rl_resize_terminal=no
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_resize_terminal" >&5
printf "%s\n" "$ac_cv_readline_rl_resize_terminal" >&6; }
@@ -25920,8 +27033,8 @@ printf %s "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; }
if test ${ac_cv_readline_rl_completion_matches+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25944,13 +27057,15 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_readline_rl_completion_matches=yes
-else $as_nop
- ac_cv_readline_rl_completion_matches=no
-
+else case e in #(
+ e) ac_cv_readline_rl_completion_matches=no
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_completion_matches" >&5
printf "%s\n" "$ac_cv_readline_rl_completion_matches" >&6; }
@@ -25988,8 +27103,8 @@ printf %s "checking for append_history in -l$LIBREADLINE... " >&6; }
if test ${ac_cv_readline_append_history+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26012,13 +27127,15 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_readline_append_history=yes
-else $as_nop
- ac_cv_readline_append_history=no
-
+else case e in #(
+ e) ac_cv_readline_append_history=no
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_append_history" >&5
printf "%s\n" "$ac_cv_readline_append_history" >&6; }
@@ -26058,8 +27175,8 @@ printf %s "checking if rl_startup_hook takes arguments... " >&6; }
if test ${ac_cv_readline_rl_startup_hook_takes_args+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26083,12 +27200,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_readline_rl_startup_hook_takes_args=yes
-else $as_nop
- ac_cv_readline_rl_startup_hook_takes_args=no
-
+else case e in #(
+ e) ac_cv_readline_rl_startup_hook_takes_args=no
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_startup_hook_takes_args" >&5
printf "%s\n" "$ac_cv_readline_rl_startup_hook_takes_args" >&6; }
@@ -26108,7 +27227,8 @@ CPPFLAGS=$save_CPPFLAGS
LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
@@ -26116,13 +27236,13 @@ printf %s "checking for broken nice()... " >&6; }
if test ${ac_cv_broken_nice+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
if test "$cross_compiling" = yes
then :
ac_cv_broken_nice=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
@@ -26139,13 +27259,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_broken_nice=yes
-else $as_nop
- ac_cv_broken_nice=no
+else case e in #(
+ e) ac_cv_broken_nice=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
printf "%s\n" "$ac_cv_broken_nice" >&6; }
@@ -26161,12 +27284,12 @@ printf %s "checking for broken poll()... " >&6; }
if test ${ac_cv_broken_poll+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ac_cv_broken_poll=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <poll.h>
@@ -26192,13 +27315,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_broken_poll=yes
-else $as_nop
- ac_cv_broken_poll=no
+else case e in #(
+ e) ac_cv_broken_poll=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
printf "%s\n" "$ac_cv_broken_poll" >&6; }
@@ -26215,13 +27341,13 @@ printf %s "checking for working tzset()... " >&6; }
if test ${ac_cv_working_tzset+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
if test "$cross_compiling" = yes
then :
ac_cv_working_tzset=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
@@ -26291,13 +27417,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_working_tzset=yes
-else $as_nop
- ac_cv_working_tzset=no
+else case e in #(
+ e) ac_cv_working_tzset=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
printf "%s\n" "$ac_cv_working_tzset" >&6; }
@@ -26314,8 +27443,8 @@ printf %s "checking for tv_nsec in struct stat... " >&6; }
if test ${ac_cv_stat_tv_nsec+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
int
@@ -26332,10 +27461,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_stat_tv_nsec=yes
-else $as_nop
- ac_cv_stat_tv_nsec=no
+else case e in #(
+ e) ac_cv_stat_tv_nsec=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
printf "%s\n" "$ac_cv_stat_tv_nsec" >&6; }
@@ -26352,8 +27483,8 @@ printf %s "checking for tv_nsec2 in struct stat... " >&6; }
if test ${ac_cv_stat_tv_nsec2+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
int
@@ -26370,10 +27501,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_stat_tv_nsec2=yes
-else $as_nop
- ac_cv_stat_tv_nsec2=no
+else case e in #(
+ e) ac_cv_stat_tv_nsec2=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
printf "%s\n" "$ac_cv_stat_tv_nsec2" >&6; }
@@ -26389,13 +27522,13 @@ printf %s "checking whether year with century should be normalized for strftime.
if test ${ac_cv_normalize_century+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
if test "$cross_compiling" = yes
then :
ac_cv_normalize_century=yes
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
@@ -26419,13 +27552,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_normalize_century=yes
-else $as_nop
- ac_cv_normalize_century=no
+else case e in #(
+ e) ac_cv_normalize_century=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_normalize_century" >&5
printf "%s\n" "$ac_cv_normalize_century" >&6; }
@@ -26441,13 +27577,13 @@ printf %s "checking whether C99-compatible strftime specifiers are supported...
if test ${ac_cv_strftime_c99_support+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
if test "$cross_compiling" = yes
then :
ac_cv_strftime_c99_support=
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
@@ -26471,13 +27607,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_strftime_c99_support=yes
-else $as_nop
- as_fn_error $? "Python requires C99-compatible strftime specifiers" "$LINENO" 5
+else case e in #(
+ e) as_fn_error $? "Python requires C99-compatible strftime specifiers" "$LINENO" 5 ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_strftime_c99_support" >&5
printf "%s\n" "$ac_cv_strftime_c99_support" >&6; }
@@ -26868,15 +28007,21 @@ printf %s "checking for library containing initscr... " >&6; }
if test ${ac_cv_search_initscr+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char initscr ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char initscr (void);
int
main (void)
{
@@ -26907,11 +28052,13 @@ done
if test ${ac_cv_search_initscr+y}
then :
-else $as_nop
- ac_cv_search_initscr=no
+else case e in #(
+ e) ac_cv_search_initscr=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5
printf "%s\n" "$ac_cv_search_initscr" >&6; }
@@ -26924,8 +28071,9 @@ then :
have_curses=yes
CURSES_LIBS=${CURSES_LIBS-"$ac_cv_search_initscr"}
fi
-else $as_nop
- have_curses=no
+else case e in #(
+ e) have_curses=no ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing update_panels" >&5
@@ -26933,15 +28081,21 @@ printf %s "checking for library containing update_panels... " >&6; }
if test ${ac_cv_search_update_panels+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char update_panels ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char update_panels (void);
int
main (void)
{
@@ -26972,11 +28126,13 @@ done
if test ${ac_cv_search_update_panels+y}
then :
-else $as_nop
- ac_cv_search_update_panels=no
+else case e in #(
+ e) ac_cv_search_update_panels=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_update_panels" >&5
printf "%s\n" "$ac_cv_search_update_panels" >&6; }
@@ -26989,8 +28145,9 @@ then :
have_panel=yes
PANEL_LIBS=${PANEL_LIBS-"$ac_cv_search_update_panels"}
fi
-else $as_nop
- have_panel=no
+else case e in #(
+ e) have_panel=no ;;
+esac
fi
@@ -27042,8 +28199,8 @@ printf %s "checking whether mvwdelch is an expression... " >&6; }
if test ${ac_cv_mvwdelch_is_expression+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27075,10 +28232,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_mvwdelch_is_expression=yes
-else $as_nop
- ac_cv_mvwdelch_is_expression=no
+else case e in #(
+ e) ac_cv_mvwdelch_is_expression=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
printf "%s\n" "$ac_cv_mvwdelch_is_expression" >&6; }
@@ -27095,8 +28254,8 @@ printf %s "checking whether WINDOW has _flags... " >&6; }
if test ${ac_cv_window_has_flags+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27128,10 +28287,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_window_has_flags=yes
-else $as_nop
- ac_cv_window_has_flags=no
+else case e in #(
+ e) ac_cv_window_has_flags=no ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
printf "%s\n" "$ac_cv_window_has_flags" >&6; }
@@ -27153,8 +28314,8 @@ printf %s "checking for curses function is_pad... " >&6; }
if test ${ac_cv_lib_curses_is_pad+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27187,11 +28348,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_is_pad=yes
-else $as_nop
- ac_cv_lib_curses_is_pad=no
+else case e in #(
+ e) ac_cv_lib_curses_is_pad=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_is_pad" >&5
printf "%s\n" "$ac_cv_lib_curses_is_pad" >&6; }
@@ -27211,8 +28374,8 @@ printf %s "checking for curses function is_term_resized... " >&6; }
if test ${ac_cv_lib_curses_is_term_resized+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27245,11 +28408,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_is_term_resized=yes
-else $as_nop
- ac_cv_lib_curses_is_term_resized=no
+else case e in #(
+ e) ac_cv_lib_curses_is_term_resized=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_is_term_resized" >&5
printf "%s\n" "$ac_cv_lib_curses_is_term_resized" >&6; }
@@ -27269,8 +28434,8 @@ printf %s "checking for curses function resize_term... " >&6; }
if test ${ac_cv_lib_curses_resize_term+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27303,11 +28468,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_resize_term=yes
-else $as_nop
- ac_cv_lib_curses_resize_term=no
+else case e in #(
+ e) ac_cv_lib_curses_resize_term=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_resize_term" >&5
printf "%s\n" "$ac_cv_lib_curses_resize_term" >&6; }
@@ -27327,8 +28494,8 @@ printf %s "checking for curses function resizeterm... " >&6; }
if test ${ac_cv_lib_curses_resizeterm+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27361,11 +28528,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_resizeterm=yes
-else $as_nop
- ac_cv_lib_curses_resizeterm=no
+else case e in #(
+ e) ac_cv_lib_curses_resizeterm=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_resizeterm" >&5
printf "%s\n" "$ac_cv_lib_curses_resizeterm" >&6; }
@@ -27385,8 +28554,8 @@ printf %s "checking for curses function immedok... " >&6; }
if test ${ac_cv_lib_curses_immedok+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27419,11 +28588,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_immedok=yes
-else $as_nop
- ac_cv_lib_curses_immedok=no
+else case e in #(
+ e) ac_cv_lib_curses_immedok=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_immedok" >&5
printf "%s\n" "$ac_cv_lib_curses_immedok" >&6; }
@@ -27443,8 +28614,8 @@ printf %s "checking for curses function syncok... " >&6; }
if test ${ac_cv_lib_curses_syncok+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27477,11 +28648,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_syncok=yes
-else $as_nop
- ac_cv_lib_curses_syncok=no
+else case e in #(
+ e) ac_cv_lib_curses_syncok=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_syncok" >&5
printf "%s\n" "$ac_cv_lib_curses_syncok" >&6; }
@@ -27501,8 +28674,8 @@ printf %s "checking for curses function wchgat... " >&6; }
if test ${ac_cv_lib_curses_wchgat+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27535,11 +28708,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_wchgat=yes
-else $as_nop
- ac_cv_lib_curses_wchgat=no
+else case e in #(
+ e) ac_cv_lib_curses_wchgat=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_wchgat" >&5
printf "%s\n" "$ac_cv_lib_curses_wchgat" >&6; }
@@ -27559,8 +28734,8 @@ printf %s "checking for curses function filter... " >&6; }
if test ${ac_cv_lib_curses_filter+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27593,11 +28768,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_filter=yes
-else $as_nop
- ac_cv_lib_curses_filter=no
+else case e in #(
+ e) ac_cv_lib_curses_filter=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_filter" >&5
printf "%s\n" "$ac_cv_lib_curses_filter" >&6; }
@@ -27617,8 +28794,8 @@ printf %s "checking for curses function has_key... " >&6; }
if test ${ac_cv_lib_curses_has_key+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27651,11 +28828,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_has_key=yes
-else $as_nop
- ac_cv_lib_curses_has_key=no
+else case e in #(
+ e) ac_cv_lib_curses_has_key=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_has_key" >&5
printf "%s\n" "$ac_cv_lib_curses_has_key" >&6; }
@@ -27675,8 +28854,8 @@ printf %s "checking for curses function typeahead... " >&6; }
if test ${ac_cv_lib_curses_typeahead+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27709,11 +28888,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_typeahead=yes
-else $as_nop
- ac_cv_lib_curses_typeahead=no
+else case e in #(
+ e) ac_cv_lib_curses_typeahead=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_typeahead" >&5
printf "%s\n" "$ac_cv_lib_curses_typeahead" >&6; }
@@ -27733,8 +28914,8 @@ printf %s "checking for curses function use_env... " >&6; }
if test ${ac_cv_lib_curses_use_env+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define NCURSES_OPAQUE 0
@@ -27767,11 +28948,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_lib_curses_use_env=yes
-else $as_nop
- ac_cv_lib_curses_use_env=no
+else case e in #(
+ e) ac_cv_lib_curses_use_env=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_use_env" >&5
printf "%s\n" "$ac_cv_lib_curses_use_env" >&6; }
@@ -27822,14 +29005,15 @@ printf %s "checking for /dev/ptmx... " >&6; }
if test ${ac_cv_file__dev_ptmx+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- test "$cross_compiling" = yes &&
+else case e in #(
+ e) test "$cross_compiling" = yes &&
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "/dev/ptmx"; then
ac_cv_file__dev_ptmx=yes
else
ac_cv_file__dev_ptmx=no
-fi
+fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
printf "%s\n" "$ac_cv_file__dev_ptmx" >&6; }
@@ -27848,14 +29032,15 @@ printf %s "checking for /dev/ptc... " >&6; }
if test ${ac_cv_file__dev_ptc+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- test "$cross_compiling" = yes &&
+else case e in #(
+ e) test "$cross_compiling" = yes &&
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "/dev/ptc"; then
ac_cv_file__dev_ptc=yes
else
ac_cv_file__dev_ptc=no
-fi
+fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
printf "%s\n" "$ac_cv_file__dev_ptc" >&6; }
@@ -27891,10 +29076,11 @@ then :
printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h
-else $as_nop
-
+else case e in #(
+ e)
printf "%s\n" "#define socklen_t int" >>confdefs.h
-
+ ;;
+esac
fi
@@ -27903,12 +29089,12 @@ printf %s "checking for broken mbstowcs... " >&6; }
if test ${ac_cv_broken_mbstowcs+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
ac_cv_broken_mbstowcs=no
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stddef.h>
@@ -27925,13 +29111,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_broken_mbstowcs=no
-else $as_nop
- ac_cv_broken_mbstowcs=yes
+else case e in #(
+ e) ac_cv_broken_mbstowcs=yes ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
printf "%s\n" "$ac_cv_broken_mbstowcs" >&6; }
@@ -27967,9 +29156,10 @@ printf "%s\n" "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
printf "%s\n" "no" >&6; }
fi
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
-printf "%s\n" "no value specified" >&6; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
+printf "%s\n" "no value specified" >&6; } ;;
+esac
fi
@@ -27978,16 +29168,16 @@ printf %s "checking whether $CC supports computed gotos... " >&6; }
if test ${ac_cv_computed_gotos+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "$cross_compiling" = yes
+else case e in #(
+ e) if test "$cross_compiling" = yes
then :
if test "${with_computed_gotos+set}" = set; then
ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
else
ac_cv_computed_gotos=no
fi
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv)
@@ -28005,13 +29195,16 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
ac_cv_computed_gotos=yes
-else $as_nop
- ac_cv_computed_gotos=no
+else case e in #(
+ e) ac_cv_computed_gotos=no ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
printf "%s\n" "$ac_cv_computed_gotos" >&6; }
@@ -28078,8 +29271,8 @@ printf %s "checking for -O2... " >&6; }
if test ${ac_cv_compile_o2+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
saved_cflags="$CFLAGS"
CFLAGS="-O2"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -28096,12 +29289,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_compile_o2=yes
-else $as_nop
- ac_cv_compile_o2=no
+else case e in #(
+ e) ac_cv_compile_o2=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS="$saved_cflags"
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_compile_o2" >&5
printf "%s\n" "$ac_cv_compile_o2" >&6; }
@@ -28118,8 +29313,8 @@ fi
if test "$cross_compiling" = yes
then :
have_glibc_memmove_bug=undefined
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
@@ -28141,11 +29336,13 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
have_glibc_memmove_bug=no
-else $as_nop
- have_glibc_memmove_bug=yes
+else case e in #(
+ e) have_glibc_memmove_bug=yes ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
CFLAGS="$saved_cflags"
@@ -28170,8 +29367,8 @@ printf %s "checking for gcc ipa-pure-const bug... " >&6; }
if test "$cross_compiling" = yes
then :
have_ipa_pure_const_bug=undefined
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__attribute__((noinline)) int
@@ -28194,11 +29391,13 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
have_ipa_pure_const_bug=no
-else $as_nop
- have_ipa_pure_const_bug=yes
+else case e in #(
+ e) have_ipa_pure_const_bug=yes ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
CFLAGS="$saved_cflags"
@@ -28221,8 +29420,8 @@ printf %s "checking for ensurepip... " >&6; }
if test ${with_ensurepip+y}
then :
withval=$with_ensurepip;
-else $as_nop
-
+else case e in #(
+ e)
case $ac_sys_system in #(
Emscripten) :
with_ensurepip=no ;; #(
@@ -28234,7 +29433,8 @@ else $as_nop
with_ensurepip=upgrade
;;
esac
-
+ ;;
+esac
fi
case $with_ensurepip in #(
@@ -28257,8 +29457,8 @@ printf %s "checking if the dirent structure of a d_type field... " >&6; }
if test ${ac_cv_dirent_d_type+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -28275,12 +29475,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_dirent_d_type=yes
-else $as_nop
- ac_cv_dirent_d_type=no
+else case e in #(
+ e) ac_cv_dirent_d_type=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dirent_d_type" >&5
printf "%s\n" "$ac_cv_dirent_d_type" >&6; }
@@ -28300,8 +29502,8 @@ printf %s "checking for the Linux getrandom() syscall... " >&6; }
if test ${ac_cv_getrandom_syscall+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -28325,12 +29527,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_getrandom_syscall=yes
-else $as_nop
- ac_cv_getrandom_syscall=no
+else case e in #(
+ e) ac_cv_getrandom_syscall=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_getrandom_syscall" >&5
printf "%s\n" "$ac_cv_getrandom_syscall" >&6; }
@@ -28351,8 +29555,8 @@ printf %s "checking for the getrandom() function... " >&6; }
if test ${ac_cv_func_getrandom+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -28374,12 +29578,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_func_getrandom=yes
-else $as_nop
- ac_cv_func_getrandom=no
+else case e in #(
+ e) ac_cv_func_getrandom=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getrandom" >&5
printf "%s\n" "$ac_cv_func_getrandom" >&6; }
@@ -28407,15 +29613,21 @@ printf %s "checking for library containing shm_open... " >&6; }
if test ${ac_cv_search_shm_open+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char shm_open ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shm_open (void);
int
main (void)
{
@@ -28446,11 +29658,13 @@ done
if test ${ac_cv_search_shm_open+y}
then :
-else $as_nop
- ac_cv_search_shm_open=no
+else case e in #(
+ e) ac_cv_search_shm_open=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
printf "%s\n" "$ac_cv_search_shm_open" >&6; }
@@ -28478,16 +29692,17 @@ fi
for ac_func in shm_open shm_unlink
do :
- as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
+ as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1
_ACEOF
have_posix_shmem=yes
-else $as_nop
- have_posix_shmem=no
+else case e in #(
+ e) have_posix_shmem=no ;;
+esac
fi
done
@@ -28516,8 +29731,8 @@ then :
;;
esac
-else $as_nop
-
+else case e in #(
+ e)
# if pkg-config is installed and openssl has installed a .pc file,
# then use that information and don't search ssldirs
if test -n "$ac_tool_prefix"; then
@@ -28528,8 +29743,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_PKG_CONFIG+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$PKG_CONFIG"; then
+else case e in #(
+ e) if test -n "$PKG_CONFIG"; then
ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -28551,7 +29766,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
@@ -28573,8 +29789,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_PKG_CONFIG"; then
+else case e in #(
+ e) if test -n "$ac_ct_PKG_CONFIG"; then
ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -28596,7 +29812,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
if test -n "$ac_ct_PKG_CONFIG"; then
@@ -28636,7 +29853,8 @@ fi
ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
fi
-
+ ;;
+esac
fi
@@ -28699,12 +29917,13 @@ then :
printf "%s\n" "yes" >&6; }
have_openssl=yes
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
have_openssl=no
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -28723,15 +29942,16 @@ then :
rpath_arg="-Wl,--enable-new-dtags,-rpath="
-else $as_nop
-
+else case e in #(
+ e)
if test "$ac_sys_system" = "Darwin"
then
rpath_arg="-Wl,-rpath,"
else
rpath_arg="-Wl,-rpath="
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
@@ -28741,9 +29961,10 @@ printf %s "checking for --with-openssl-rpath... " >&6; }
if test ${with_openssl_rpath+y}
then :
withval=$with_openssl_rpath;
-else $as_nop
- with_openssl_rpath=no
-
+else case e in #(
+ e) with_openssl_rpath=no
+ ;;
+esac
fi
case $with_openssl_rpath in #(
@@ -28769,8 +29990,9 @@ then :
OPENSSL_RPATH="$with_openssl_rpath"
OPENSSL_LDFLAGS_RPATH="${rpath_arg}$with_openssl_rpath"
-else $as_nop
- as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5
+else case e in #(
+ e) as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5 ;;
+esac
fi
;;
@@ -28833,8 +30055,8 @@ printf %s "checking whether OpenSSL provides required ssl module APIs... " >&6;
if test ${ac_cv_working_openssl_ssl+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -28864,12 +30086,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_working_openssl_ssl=yes
-else $as_nop
- ac_cv_working_openssl_ssl=no
+else case e in #(
+ e) ac_cv_working_openssl_ssl=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_openssl_ssl" >&5
printf "%s\n" "$ac_cv_working_openssl_ssl" >&6; }
@@ -28896,8 +30120,8 @@ printf %s "checking whether OpenSSL provides required hashlib module APIs... " >
if test ${ac_cv_working_openssl_hashlib+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -28924,12 +30148,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_working_openssl_hashlib=yes
-else $as_nop
- ac_cv_working_openssl_hashlib=no
+else case e in #(
+ e) ac_cv_working_openssl_hashlib=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_openssl_hashlib" >&5
printf "%s\n" "$ac_cv_working_openssl_hashlib" >&6; }
@@ -28971,13 +30197,14 @@ case "$withval" in
;;
esac
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: python" >&5
printf "%s\n" "python" >&6; }
printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
-
+ ;;
+esac
fi
@@ -29000,8 +30227,9 @@ then :
;;
esac
-else $as_nop
- with_builtin_hashlib_hashes=$default_hashlib_hashes
+else case e in #(
+ e) with_builtin_hashlib_hashes=$default_hashlib_hashes ;;
+esac
fi
@@ -29043,12 +30271,14 @@ then :
if test "x$enable_test_modules" = xyes
then :
TEST_MODULES=yes
-else $as_nop
- TEST_MODULES=no
+else case e in #(
+ e) TEST_MODULES=no ;;
+esac
fi
-else $as_nop
- TEST_MODULES=yes
+else case e in #(
+ e) TEST_MODULES=yes ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TEST_MODULES" >&5
@@ -29077,8 +30307,8 @@ printf %s "checking whether libatomic is needed by <pyatomic.h>... " >&6; }
if test ${ac_cv_libatomic_needed+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
// pyatomic.h needs uint64_t and Py_ssize_t types
@@ -29121,11 +30351,13 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_libatomic_needed=no
-else $as_nop
- ac_cv_libatomic_needed=yes
+else case e in #(
+ e) ac_cv_libatomic_needed=yes ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
+ conftest$ac_exeext conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libatomic_needed" >&5
printf "%s\n" "$ac_cv_libatomic_needed" >&6; }
@@ -29778,11 +31010,13 @@ then :
if test "$ac_cv_func_sem_unlink" = "yes"
then :
py_cv_module__multiprocessing=yes
-else $as_nop
- py_cv_module__multiprocessing=missing
+else case e in #(
+ e) py_cv_module__multiprocessing=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__multiprocessing=disabled
+else case e in #(
+ e) py_cv_module__multiprocessing=disabled ;;
+esac
fi
fi
@@ -29816,11 +31050,13 @@ then :
if test "$have_posix_shmem" = "yes"
then :
py_cv_module__posixshmem=yes
-else $as_nop
- py_cv_module__posixshmem=missing
+else case e in #(
+ e) py_cv_module__posixshmem=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__posixshmem=disabled
+else case e in #(
+ e) py_cv_module__posixshmem=disabled ;;
+esac
fi
fi
@@ -29945,11 +31181,13 @@ then :
if test "$ac_cv_header_sys_ioctl_h" = "yes" -a "$ac_cv_header_fcntl_h" = "yes"
then :
py_cv_module_fcntl=yes
-else $as_nop
- py_cv_module_fcntl=missing
+else case e in #(
+ e) py_cv_module_fcntl=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_fcntl=disabled
+else case e in #(
+ e) py_cv_module_fcntl=disabled ;;
+esac
fi
fi
@@ -29983,11 +31221,13 @@ then :
if test "$ac_cv_header_sys_mman_h" = "yes" -a "$ac_cv_header_sys_stat_h" = "yes"
then :
py_cv_module_mmap=yes
-else $as_nop
- py_cv_module_mmap=missing
+else case e in #(
+ e) py_cv_module_mmap=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_mmap=disabled
+else case e in #(
+ e) py_cv_module_mmap=disabled ;;
+esac
fi
fi
@@ -30021,11 +31261,13 @@ then :
if test "$ac_cv_header_sys_socket_h" = "yes" -a "$ac_cv_header_sys_types_h" = "yes" -a "$ac_cv_header_netinet_in_h" = "yes"
then :
py_cv_module__socket=yes
-else $as_nop
- py_cv_module__socket=missing
+else case e in #(
+ e) py_cv_module__socket=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__socket=disabled
+else case e in #(
+ e) py_cv_module__socket=disabled ;;
+esac
fi
fi
@@ -30061,11 +31303,13 @@ then :
{ test "$ac_cv_func_getgrgid" = "yes" || test "$ac_cv_func_getgrgid_r" = "yes"; }
then :
py_cv_module_grp=yes
-else $as_nop
- py_cv_module_grp=missing
+else case e in #(
+ e) py_cv_module_grp=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_grp=disabled
+else case e in #(
+ e) py_cv_module_grp=disabled ;;
+esac
fi
fi
@@ -30099,11 +31343,13 @@ then :
if test "$ac_cv_func_getpwuid" = yes -o "$ac_cv_func_getpwuid_r" = yes
then :
py_cv_module_pwd=yes
-else $as_nop
- py_cv_module_pwd=missing
+else case e in #(
+ e) py_cv_module_pwd=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_pwd=disabled
+else case e in #(
+ e) py_cv_module_pwd=disabled ;;
+esac
fi
fi
@@ -30137,11 +31383,13 @@ then :
if test "$ac_cv_header_sys_resource_h" = yes
then :
py_cv_module_resource=yes
-else $as_nop
- py_cv_module_resource=missing
+else case e in #(
+ e) py_cv_module_resource=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_resource=disabled
+else case e in #(
+ e) py_cv_module_resource=disabled ;;
+esac
fi
fi
@@ -30175,11 +31423,13 @@ then :
if true
then :
py_cv_module__scproxy=yes
-else $as_nop
- py_cv_module__scproxy=missing
+else case e in #(
+ e) py_cv_module__scproxy=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__scproxy=disabled
+else case e in #(
+ e) py_cv_module__scproxy=disabled ;;
+esac
fi
fi
@@ -30213,11 +31463,13 @@ then :
if test "$ac_cv_header_syslog_h" = yes
then :
py_cv_module_syslog=yes
-else $as_nop
- py_cv_module_syslog=missing
+else case e in #(
+ e) py_cv_module_syslog=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_syslog=disabled
+else case e in #(
+ e) py_cv_module_syslog=disabled ;;
+esac
fi
fi
@@ -30251,11 +31503,13 @@ then :
if test "$ac_cv_header_termios_h" = yes
then :
py_cv_module_termios=yes
-else $as_nop
- py_cv_module_termios=missing
+else case e in #(
+ e) py_cv_module_termios=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_termios=disabled
+else case e in #(
+ e) py_cv_module_termios=disabled ;;
+esac
fi
fi
@@ -30290,11 +31544,13 @@ then :
if test "$ac_cv_header_sys_time_h" = "yes"
then :
py_cv_module_pyexpat=yes
-else $as_nop
- py_cv_module_pyexpat=missing
+else case e in #(
+ e) py_cv_module_pyexpat=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_pyexpat=disabled
+else case e in #(
+ e) py_cv_module_pyexpat=disabled ;;
+esac
fi
fi
@@ -30328,11 +31584,13 @@ then :
if true
then :
py_cv_module__elementtree=yes
-else $as_nop
- py_cv_module__elementtree=missing
+else case e in #(
+ e) py_cv_module__elementtree=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__elementtree=disabled
+else case e in #(
+ e) py_cv_module__elementtree=disabled ;;
+esac
fi
fi
@@ -30543,11 +31801,13 @@ then :
if true
then :
py_cv_module__md5=yes
-else $as_nop
- py_cv_module__md5=missing
+else case e in #(
+ e) py_cv_module__md5=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__md5=disabled
+else case e in #(
+ e) py_cv_module__md5=disabled ;;
+esac
fi
fi
@@ -30581,11 +31841,13 @@ then :
if true
then :
py_cv_module__sha1=yes
-else $as_nop
- py_cv_module__sha1=missing
+else case e in #(
+ e) py_cv_module__sha1=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__sha1=disabled
+else case e in #(
+ e) py_cv_module__sha1=disabled ;;
+esac
fi
fi
@@ -30619,11 +31881,13 @@ then :
if true
then :
py_cv_module__sha2=yes
-else $as_nop
- py_cv_module__sha2=missing
+else case e in #(
+ e) py_cv_module__sha2=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__sha2=disabled
+else case e in #(
+ e) py_cv_module__sha2=disabled ;;
+esac
fi
fi
@@ -30657,11 +31921,13 @@ then :
if true
then :
py_cv_module__sha3=yes
-else $as_nop
- py_cv_module__sha3=missing
+else case e in #(
+ e) py_cv_module__sha3=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__sha3=disabled
+else case e in #(
+ e) py_cv_module__sha3=disabled ;;
+esac
fi
fi
@@ -30695,11 +31961,13 @@ then :
if true
then :
py_cv_module__blake2=yes
-else $as_nop
- py_cv_module__blake2=missing
+else case e in #(
+ e) py_cv_module__blake2=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__blake2=disabled
+else case e in #(
+ e) py_cv_module__blake2=disabled ;;
+esac
fi
fi
@@ -30742,8 +32010,8 @@ printf %s "checking whether C compiler accepts -msse -msse2 -msse3 -msse4.1 -mss
if test ${ax_cv_check_cflags__Werror__msse__msse2__msse3__msse4_1__msse4_2+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -msse -msse2 -msse3 -msse4.1 -msse4.2"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -30760,11 +32028,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__msse__msse2__msse3__msse4_1__msse4_2=yes
-else $as_nop
- ax_cv_check_cflags__Werror__msse__msse2__msse3__msse4_1__msse4_2=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__msse__msse2__msse3__msse4_1__msse4_2=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__msse__msse2__msse3__msse4_1__msse4_2" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__msse__msse2__msse3__msse4_1__msse4_2" >&6; }
@@ -30793,8 +32063,9 @@ printf "%s\n" "standard" >&6; }
fi
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
fi
@@ -30814,8 +32085,8 @@ printf %s "checking whether C compiler accepts -mavx2... " >&6; }
if test ${ax_cv_check_cflags__Werror__mavx2+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -Werror -mavx2"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -30832,11 +32103,13 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags__Werror__mavx2=yes
-else $as_nop
- ax_cv_check_cflags__Werror__mavx2=no
+else case e in #(
+ e) ax_cv_check_cflags__Werror__mavx2=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- CFLAGS=$ax_check_save_flags
+ CFLAGS=$ax_check_save_flags ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__mavx2" >&5
printf "%s\n" "$ax_cv_check_cflags__Werror__mavx2" >&6; }
@@ -30864,8 +32137,9 @@ printf "%s\n" "universal2" >&6; }
printf "%s\n" "standard" >&6; }
fi
-else $as_nop
- :
+else case e in #(
+ e) : ;;
+esac
fi
fi
@@ -30883,11 +32157,13 @@ then :
if test "$have_libffi" = yes
then :
py_cv_module__ctypes=yes
-else $as_nop
- py_cv_module__ctypes=missing
+else case e in #(
+ e) py_cv_module__ctypes=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__ctypes=disabled
+else case e in #(
+ e) py_cv_module__ctypes=disabled ;;
+esac
fi
fi
@@ -30921,11 +32197,13 @@ then :
if test "$have_curses" = "yes"
then :
py_cv_module__curses=yes
-else $as_nop
- py_cv_module__curses=missing
+else case e in #(
+ e) py_cv_module__curses=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__curses=disabled
+else case e in #(
+ e) py_cv_module__curses=disabled ;;
+esac
fi
fi
@@ -30960,11 +32238,13 @@ then :
if test "$have_curses" = "yes" && test "$have_panel" = "yes"
then :
py_cv_module__curses_panel=yes
-else $as_nop
- py_cv_module__curses_panel=missing
+else case e in #(
+ e) py_cv_module__curses_panel=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__curses_panel=disabled
+else case e in #(
+ e) py_cv_module__curses_panel=disabled ;;
+esac
fi
fi
@@ -30999,11 +32279,13 @@ then :
if test "$have_mpdec" = "yes"
then :
py_cv_module__decimal=yes
-else $as_nop
- py_cv_module__decimal=missing
+else case e in #(
+ e) py_cv_module__decimal=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__decimal=disabled
+else case e in #(
+ e) py_cv_module__decimal=disabled ;;
+esac
fi
fi
@@ -31037,11 +32319,13 @@ then :
if test "$have_dbm" != "no"
then :
py_cv_module__dbm=yes
-else $as_nop
- py_cv_module__dbm=missing
+else case e in #(
+ e) py_cv_module__dbm=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__dbm=disabled
+else case e in #(
+ e) py_cv_module__dbm=disabled ;;
+esac
fi
fi
@@ -31075,11 +32359,13 @@ then :
if test "$have_gdbm" = yes
then :
py_cv_module__gdbm=yes
-else $as_nop
- py_cv_module__gdbm=missing
+else case e in #(
+ e) py_cv_module__gdbm=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__gdbm=disabled
+else case e in #(
+ e) py_cv_module__gdbm=disabled ;;
+esac
fi
fi
@@ -31113,11 +32399,13 @@ then :
if test "$with_readline" != "no"
then :
py_cv_module_readline=yes
-else $as_nop
- py_cv_module_readline=missing
+else case e in #(
+ e) py_cv_module_readline=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_readline=disabled
+else case e in #(
+ e) py_cv_module_readline=disabled ;;
+esac
fi
fi
@@ -31151,11 +32439,13 @@ then :
if test "$have_supported_sqlite3" = "yes"
then :
py_cv_module__sqlite3=yes
-else $as_nop
- py_cv_module__sqlite3=missing
+else case e in #(
+ e) py_cv_module__sqlite3=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__sqlite3=disabled
+else case e in #(
+ e) py_cv_module__sqlite3=disabled ;;
+esac
fi
fi
@@ -31189,11 +32479,13 @@ then :
if test "$have_tcltk" = "yes"
then :
py_cv_module__tkinter=yes
-else $as_nop
- py_cv_module__tkinter=missing
+else case e in #(
+ e) py_cv_module__tkinter=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__tkinter=disabled
+else case e in #(
+ e) py_cv_module__tkinter=disabled ;;
+esac
fi
fi
@@ -31227,11 +32519,13 @@ then :
if test "$have_uuid" = "yes"
then :
py_cv_module__uuid=yes
-else $as_nop
- py_cv_module__uuid=missing
+else case e in #(
+ e) py_cv_module__uuid=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__uuid=disabled
+else case e in #(
+ e) py_cv_module__uuid=disabled ;;
+esac
fi
fi
@@ -31266,11 +32560,13 @@ then :
if test "$have_zlib" = yes
then :
py_cv_module_zlib=yes
-else $as_nop
- py_cv_module_zlib=missing
+else case e in #(
+ e) py_cv_module_zlib=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_zlib=disabled
+else case e in #(
+ e) py_cv_module_zlib=disabled ;;
+esac
fi
fi
@@ -31326,11 +32622,13 @@ then :
if test "$have_bzip2" = yes
then :
py_cv_module__bz2=yes
-else $as_nop
- py_cv_module__bz2=missing
+else case e in #(
+ e) py_cv_module__bz2=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__bz2=disabled
+else case e in #(
+ e) py_cv_module__bz2=disabled ;;
+esac
fi
fi
@@ -31364,11 +32662,13 @@ then :
if test "$have_liblzma" = yes
then :
py_cv_module__lzma=yes
-else $as_nop
- py_cv_module__lzma=missing
+else case e in #(
+ e) py_cv_module__lzma=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__lzma=disabled
+else case e in #(
+ e) py_cv_module__lzma=disabled ;;
+esac
fi
fi
@@ -31403,11 +32703,13 @@ then :
if test "$ac_cv_working_openssl_ssl" = yes
then :
py_cv_module__ssl=yes
-else $as_nop
- py_cv_module__ssl=missing
+else case e in #(
+ e) py_cv_module__ssl=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__ssl=disabled
+else case e in #(
+ e) py_cv_module__ssl=disabled ;;
+esac
fi
fi
@@ -31441,11 +32743,13 @@ then :
if test "$ac_cv_working_openssl_hashlib" = yes
then :
py_cv_module__hashlib=yes
-else $as_nop
- py_cv_module__hashlib=missing
+else case e in #(
+ e) py_cv_module__hashlib=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__hashlib=disabled
+else case e in #(
+ e) py_cv_module__hashlib=disabled ;;
+esac
fi
fi
@@ -31480,11 +32784,13 @@ then :
if true
then :
py_cv_module__testcapi=yes
-else $as_nop
- py_cv_module__testcapi=missing
+else case e in #(
+ e) py_cv_module__testcapi=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testcapi=disabled
+else case e in #(
+ e) py_cv_module__testcapi=disabled ;;
+esac
fi
fi
@@ -31518,11 +32824,13 @@ then :
if true
then :
py_cv_module__testclinic=yes
-else $as_nop
- py_cv_module__testclinic=missing
+else case e in #(
+ e) py_cv_module__testclinic=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testclinic=disabled
+else case e in #(
+ e) py_cv_module__testclinic=disabled ;;
+esac
fi
fi
@@ -31556,11 +32864,13 @@ then :
if true
then :
py_cv_module__testclinic_limited=yes
-else $as_nop
- py_cv_module__testclinic_limited=missing
+else case e in #(
+ e) py_cv_module__testclinic_limited=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testclinic_limited=disabled
+else case e in #(
+ e) py_cv_module__testclinic_limited=disabled ;;
+esac
fi
fi
@@ -31594,11 +32904,13 @@ then :
if true
then :
py_cv_module__testlimitedcapi=yes
-else $as_nop
- py_cv_module__testlimitedcapi=missing
+else case e in #(
+ e) py_cv_module__testlimitedcapi=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testlimitedcapi=disabled
+else case e in #(
+ e) py_cv_module__testlimitedcapi=disabled ;;
+esac
fi
fi
@@ -31632,11 +32944,13 @@ then :
if true
then :
py_cv_module__testinternalcapi=yes
-else $as_nop
- py_cv_module__testinternalcapi=missing
+else case e in #(
+ e) py_cv_module__testinternalcapi=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testinternalcapi=disabled
+else case e in #(
+ e) py_cv_module__testinternalcapi=disabled ;;
+esac
fi
fi
@@ -31670,11 +32984,13 @@ then :
if true
then :
py_cv_module__testbuffer=yes
-else $as_nop
- py_cv_module__testbuffer=missing
+else case e in #(
+ e) py_cv_module__testbuffer=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testbuffer=disabled
+else case e in #(
+ e) py_cv_module__testbuffer=disabled ;;
+esac
fi
fi
@@ -31708,11 +33024,13 @@ then :
if test "$ac_cv_func_dlopen" = yes
then :
py_cv_module__testimportmultiple=yes
-else $as_nop
- py_cv_module__testimportmultiple=missing
+else case e in #(
+ e) py_cv_module__testimportmultiple=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testimportmultiple=disabled
+else case e in #(
+ e) py_cv_module__testimportmultiple=disabled ;;
+esac
fi
fi
@@ -31746,11 +33064,13 @@ then :
if test "$ac_cv_func_dlopen" = yes
then :
py_cv_module__testmultiphase=yes
-else $as_nop
- py_cv_module__testmultiphase=missing
+else case e in #(
+ e) py_cv_module__testmultiphase=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testmultiphase=disabled
+else case e in #(
+ e) py_cv_module__testmultiphase=disabled ;;
+esac
fi
fi
@@ -31784,11 +33104,13 @@ then :
if test "$ac_cv_func_dlopen" = yes
then :
py_cv_module__testsinglephase=yes
-else $as_nop
- py_cv_module__testsinglephase=missing
+else case e in #(
+ e) py_cv_module__testsinglephase=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testsinglephase=disabled
+else case e in #(
+ e) py_cv_module__testsinglephase=disabled ;;
+esac
fi
fi
@@ -31822,11 +33144,13 @@ then :
if true
then :
py_cv_module__testexternalinspection=yes
-else $as_nop
- py_cv_module__testexternalinspection=missing
+else case e in #(
+ e) py_cv_module__testexternalinspection=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__testexternalinspection=disabled
+else case e in #(
+ e) py_cv_module__testexternalinspection=disabled ;;
+esac
fi
fi
@@ -31860,11 +33184,13 @@ then :
if true
then :
py_cv_module_xxsubtype=yes
-else $as_nop
- py_cv_module_xxsubtype=missing
+else case e in #(
+ e) py_cv_module_xxsubtype=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_xxsubtype=disabled
+else case e in #(
+ e) py_cv_module_xxsubtype=disabled ;;
+esac
fi
fi
@@ -31898,11 +33224,13 @@ then :
if true
then :
py_cv_module__xxtestfuzz=yes
-else $as_nop
- py_cv_module__xxtestfuzz=missing
+else case e in #(
+ e) py_cv_module__xxtestfuzz=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__xxtestfuzz=disabled
+else case e in #(
+ e) py_cv_module__xxtestfuzz=disabled ;;
+esac
fi
fi
@@ -31936,11 +33264,13 @@ then :
if test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes
then :
py_cv_module__ctypes_test=yes
-else $as_nop
- py_cv_module__ctypes_test=missing
+else case e in #(
+ e) py_cv_module__ctypes_test=missing ;;
+esac
fi
-else $as_nop
- py_cv_module__ctypes_test=disabled
+else case e in #(
+ e) py_cv_module__ctypes_test=disabled ;;
+esac
fi
fi
@@ -31975,11 +33305,13 @@ then :
if test "$ac_cv_func_dlopen" = yes
then :
py_cv_module_xxlimited=yes
-else $as_nop
- py_cv_module_xxlimited=missing
+else case e in #(
+ e) py_cv_module_xxlimited=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_xxlimited=disabled
+else case e in #(
+ e) py_cv_module_xxlimited=disabled ;;
+esac
fi
fi
@@ -32013,11 +33345,13 @@ then :
if test "$ac_cv_func_dlopen" = yes
then :
py_cv_module_xxlimited_35=yes
-else $as_nop
- py_cv_module_xxlimited_35=missing
+else case e in #(
+ e) py_cv_module_xxlimited_35=missing ;;
+esac
fi
-else $as_nop
- py_cv_module_xxlimited_35=disabled
+else case e in #(
+ e) py_cv_module_xxlimited_35=disabled ;;
+esac
fi
fi
@@ -32062,8 +33396,8 @@ cat >confcache <<\_ACEOF
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# 'ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* 'ac_cv_foo' will be assigned the
# following values.
_ACEOF
@@ -32093,14 +33427,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;}
(set) 2>&1 |
case $as_nl`(ac_space=' '; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
+ # 'set' does not quote correctly, so add quotes: double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;; #(
*)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
+ # 'set' quotes correctly as required by POSIX, so do not add quotes.
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
esac |
@@ -32519,7 +33853,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-as_nop=:
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
emulate sh
@@ -32528,12 +33861,13 @@ then :
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else $as_nop
- case `(set -o) 2>/dev/null` in #(
+else case e in #(
+ e) case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
+esac ;;
esac
fi
@@ -32605,7 +33939,7 @@ IFS=$as_save_IFS
;;
esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
+# We did not find ourselves, most probably we were run as 'sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
@@ -32634,7 +33968,6 @@ as_fn_error ()
} # as_fn_error
-
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -32674,11 +34007,12 @@ then :
{
eval $1+=\$2
}'
-else $as_nop
- as_fn_append ()
+else case e in #(
+ e) as_fn_append ()
{
eval $1=\$$1\$2
- }
+ } ;;
+esac
fi # as_fn_append
# as_fn_arith ARG...
@@ -32692,11 +34026,12 @@ then :
{
as_val=$(( $* ))
}'
-else $as_nop
- as_fn_arith ()
+else case e in #(
+ e) as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
- }
+ } ;;
+esac
fi # as_fn_arith
@@ -32779,9 +34114,9 @@ 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 -pR'.
+ # 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 -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
@@ -32862,10 +34197,12 @@ as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed '$as_sed_sh'" # deprecated
exec 6>&1
@@ -32881,7 +34218,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by python $as_me 3.14, which was
-generated by GNU Autoconf 2.71. Invocation command line was
+generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -32912,7 +34249,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
+'$as_me' instantiates files and other configuration actions
from templates according to the current configuration. Unless the files
and actions are specified as TAGs, all are instantiated by default.
@@ -32945,10 +34282,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
python config.status 3.14
-configured by $0, generated by GNU Autoconf 2.71,
+configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -33009,8 +34346,8 @@ do
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
+ as_fn_error $? "ambiguous option: '$1'
+Try '$0 --help' for more information.";;
--help | --hel | -h )
printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -33018,8 +34355,8 @@ Try \`$0 --help' for more information.";;
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+ -*) as_fn_error $? "unrecognized option: '$1'
+Try '$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
@@ -33081,7 +34418,7 @@ do
"Modules/Setup.stdlib") CONFIG_FILES="$CONFIG_FILES Modules/Setup.stdlib" ;;
"Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -33100,7 +34437,7 @@ fi
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
+# after its creation but before its name has been assigned to '$tmp'.
$debug ||
{
tmp= ac_tmp=
@@ -33124,7 +34461,7 @@ ac_tmp=$tmp
# 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'.
+# This happens for instance with './config.status config.h'.
if test -n "$CONFIG_FILES"; then
@@ -33282,13 +34619,13 @@ 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'.
+# This happens for instance with './config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
-# Transform confdefs.h into an awk script `defines.awk', embedded as
+# 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.
@@ -33398,7 +34735,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -33420,19 +34757,19 @@ do
-) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
+ # because $ac_f cannot contain ':'.
test -f "$ac_f" ||
case $ac_f in
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
- # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # 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 '`
@@ -33565,7 +34902,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
esac
_ACEOF
-# Neutralize VPATH when `$srcdir' = `.'.
+# 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
@@ -33596,9 +34933,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$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 "$ac_tmp/stdin"
diff --git a/install-sh b/install-sh
index ec298b53740270..7c56c9c0151036 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2020-11-14.01; # UTC
+scriptversion=2023-11-23.18; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -124,9 +124,9 @@ it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
-Email bug reports to bug-automake(a)gnu.org.
-Automake home page: https://www.gnu.org/software/automake/
-"
+Report bugs to <bug-automake(a)gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>."
while test $# -ne 0; do
case $1 in
diff --git a/pyconfig.h.in b/pyconfig.h.in
index ca08f087a85e9f..d862966b7de4c8 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -16,13 +16,13 @@
support for AIX C++ shared extension modules. */
#undef AIX_GENUINE_CPLUSPLUS
-/* The normal alignment of `long', in bytes. */
+/* The normal alignment of 'long', in bytes. */
#undef ALIGNOF_LONG
-/* The normal alignment of `max_align_t', in bytes. */
+/* The normal alignment of 'max_align_t', in bytes. */
#undef ALIGNOF_MAX_ALIGN_T
-/* The normal alignment of `size_t', in bytes. */
+/* The normal alignment of 'size_t', in bytes. */
#undef ALIGNOF_SIZE_T
/* Alternative SOABI used in debug build to load C extensions built in release
@@ -59,16 +59,16 @@
/* Define if you have the 'accept' function. */
#undef HAVE_ACCEPT
-/* Define to 1 if you have the `accept4' function. */
+/* Define to 1 if you have the 'accept4' function. */
#undef HAVE_ACCEPT4
-/* Define to 1 if you have the `acosh' function. */
+/* Define to 1 if you have the 'acosh' function. */
#undef HAVE_ACOSH
/* struct addrinfo (netdb.h) */
#undef HAVE_ADDRINFO
-/* Define to 1 if you have the `alarm' function. */
+/* Define to 1 if you have the 'alarm' function. */
#undef HAVE_ALARM
/* Define if aligned memory access is required */
@@ -80,19 +80,19 @@
/* Define this if your time.h defines altzone. */
#undef HAVE_ALTZONE
-/* Define to 1 if you have the `asinh' function. */
+/* Define to 1 if you have the 'asinh' function. */
#undef HAVE_ASINH
/* Define to 1 if you have the <asm/types.h> header file. */
#undef HAVE_ASM_TYPES_H
-/* Define to 1 if you have the `atanh' function. */
+/* Define to 1 if you have the 'atanh' function. */
#undef HAVE_ATANH
/* Define if you have the 'bind' function. */
#undef HAVE_BIND
-/* Define to 1 if you have the `bind_textdomain_codeset' function. */
+/* Define to 1 if you have the 'bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET
/* Define to 1 if you have the <bluetooth/bluetooth.h> header file. */
@@ -135,43 +135,43 @@
/* Define to 1 if you have the 'chflags' function. */
#undef HAVE_CHFLAGS
-/* Define to 1 if you have the `chmod' function. */
+/* Define to 1 if you have the 'chmod' function. */
#undef HAVE_CHMOD
-/* Define to 1 if you have the `chown' function. */
+/* Define to 1 if you have the 'chown' function. */
#undef HAVE_CHOWN
/* Define if you have the 'chroot' function. */
#undef HAVE_CHROOT
-/* Define to 1 if you have the `clock' function. */
+/* Define to 1 if you have the 'clock' function. */
#undef HAVE_CLOCK
-/* Define to 1 if you have the `clock_getres' function. */
+/* Define to 1 if you have the 'clock_getres' function. */
#undef HAVE_CLOCK_GETRES
-/* Define to 1 if you have the `clock_gettime' function. */
+/* Define to 1 if you have the 'clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
-/* Define to 1 if you have the `clock_nanosleep' function. */
+/* Define to 1 if you have the 'clock_nanosleep' function. */
#undef HAVE_CLOCK_NANOSLEEP
-/* Define to 1 if you have the `clock_settime' function. */
+/* Define to 1 if you have the 'clock_settime' function. */
#undef HAVE_CLOCK_SETTIME
-/* Define to 1 if the system has the type `clock_t'. */
+/* Define to 1 if the system has the type 'clock_t'. */
#undef HAVE_CLOCK_T
-/* Define to 1 if you have the `closefrom' function. */
+/* Define to 1 if you have the 'closefrom' function. */
#undef HAVE_CLOSEFROM
-/* Define to 1 if you have the `close_range' function. */
+/* Define to 1 if you have the 'close_range' function. */
#undef HAVE_CLOSE_RANGE
/* Define if the C compiler supports computed gotos. */
#undef HAVE_COMPUTED_GOTOS
-/* Define to 1 if you have the `confstr' function. */
+/* Define to 1 if you have the 'confstr' function. */
#undef HAVE_CONFSTR
/* Define to 1 if you have the <conio.h> header file. */
@@ -180,10 +180,10 @@
/* Define if you have the 'connect' function. */
#undef HAVE_CONNECT
-/* Define to 1 if you have the `copy_file_range' function. */
+/* Define to 1 if you have the 'copy_file_range' function. */
#undef HAVE_COPY_FILE_RANGE
-/* Define to 1 if you have the `ctermid' function. */
+/* Define to 1 if you have the 'ctermid' function. */
#undef HAVE_CTERMID
/* Define if you have the 'ctermid_r' function. */
@@ -228,39 +228,39 @@
/* Define to 1 if you have the <db.h> header file. */
#undef HAVE_DB_H
-/* Define to 1 if you have the declaration of `RTLD_DEEPBIND', and to 0 if you
+/* Define to 1 if you have the declaration of 'RTLD_DEEPBIND', and to 0 if you
don't. */
#undef HAVE_DECL_RTLD_DEEPBIND
-/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you
+/* Define to 1 if you have the declaration of 'RTLD_GLOBAL', and to 0 if you
don't. */
#undef HAVE_DECL_RTLD_GLOBAL
-/* Define to 1 if you have the declaration of `RTLD_LAZY', and to 0 if you
+/* Define to 1 if you have the declaration of 'RTLD_LAZY', and to 0 if you
don't. */
#undef HAVE_DECL_RTLD_LAZY
-/* Define to 1 if you have the declaration of `RTLD_LOCAL', and to 0 if you
+/* Define to 1 if you have the declaration of 'RTLD_LOCAL', and to 0 if you
don't. */
#undef HAVE_DECL_RTLD_LOCAL
-/* Define to 1 if you have the declaration of `RTLD_MEMBER', and to 0 if you
+/* Define to 1 if you have the declaration of 'RTLD_MEMBER', and to 0 if you
don't. */
#undef HAVE_DECL_RTLD_MEMBER
-/* Define to 1 if you have the declaration of `RTLD_NODELETE', and to 0 if you
+/* Define to 1 if you have the declaration of 'RTLD_NODELETE', and to 0 if you
don't. */
#undef HAVE_DECL_RTLD_NODELETE
-/* Define to 1 if you have the declaration of `RTLD_NOLOAD', and to 0 if you
+/* Define to 1 if you have the declaration of 'RTLD_NOLOAD', and to 0 if you
don't. */
#undef HAVE_DECL_RTLD_NOLOAD
-/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you
+/* Define to 1 if you have the declaration of 'RTLD_NOW', and to 0 if you
don't. */
#undef HAVE_DECL_RTLD_NOW
-/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
+/* Define to 1 if you have the declaration of 'tzname', and to 0 if you don't.
*/
#undef HAVE_DECL_TZNAME
@@ -279,7 +279,7 @@
/* Define to 1 if the dirent structure has a d_type field */
#undef HAVE_DIRENT_D_TYPE
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+/* Define to 1 if you have the <dirent.h> header file, and it defines 'DIR'.
*/
#undef HAVE_DIRENT_H
@@ -289,16 +289,16 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
-/* Define to 1 if you have the `dlopen' function. */
+/* Define to 1 if you have the 'dlopen' function. */
#undef HAVE_DLOPEN
-/* Define to 1 if you have the `dup' function. */
+/* Define to 1 if you have the 'dup' function. */
#undef HAVE_DUP
-/* Define to 1 if you have the `dup2' function. */
+/* Define to 1 if you have the 'dup2' function. */
#undef HAVE_DUP2
-/* Define to 1 if you have the `dup3' function. */
+/* Define to 1 if you have the 'dup3' function. */
#undef HAVE_DUP3
/* Define if you have the '_dyld_shared_cache_contains_path' function. */
@@ -319,10 +319,10 @@
/* Define if you have the 'epoll_create1' function. */
#undef HAVE_EPOLL_CREATE1
-/* Define to 1 if you have the `erf' function. */
+/* Define to 1 if you have the 'erf' function. */
#undef HAVE_ERF
-/* Define to 1 if you have the `erfc' function. */
+/* Define to 1 if you have the 'erfc' function. */
#undef HAVE_ERFC
/* Define to 1 if you have the <errno.h> header file. */
@@ -331,34 +331,34 @@
/* Define if you have the 'eventfd' function. */
#undef HAVE_EVENTFD
-/* Define to 1 if you have the `execv' function. */
+/* Define to 1 if you have the 'execv' function. */
#undef HAVE_EXECV
-/* Define to 1 if you have the `explicit_bzero' function. */
+/* Define to 1 if you have the 'explicit_bzero' function. */
#undef HAVE_EXPLICIT_BZERO
-/* Define to 1 if you have the `explicit_memset' function. */
+/* Define to 1 if you have the 'explicit_memset' function. */
#undef HAVE_EXPLICIT_MEMSET
-/* Define to 1 if you have the `expm1' function. */
+/* Define to 1 if you have the 'expm1' function. */
#undef HAVE_EXPM1
-/* Define to 1 if you have the `faccessat' function. */
+/* Define to 1 if you have the 'faccessat' function. */
#undef HAVE_FACCESSAT
/* Define if you have the 'fchdir' function. */
#undef HAVE_FCHDIR
-/* Define to 1 if you have the `fchmod' function. */
+/* Define to 1 if you have the 'fchmod' function. */
#undef HAVE_FCHMOD
-/* Define to 1 if you have the `fchmodat' function. */
+/* Define to 1 if you have the 'fchmodat' function. */
#undef HAVE_FCHMODAT
-/* Define to 1 if you have the `fchown' function. */
+/* Define to 1 if you have the 'fchown' function. */
#undef HAVE_FCHOWN
-/* Define to 1 if you have the `fchownat' function. */
+/* Define to 1 if you have the 'fchownat' function. */
#undef HAVE_FCHOWNAT
/* Define to 1 if you have the <fcntl.h> header file. */
@@ -367,13 +367,13 @@
/* Define if you have the 'fdatasync' function. */
#undef HAVE_FDATASYNC
-/* Define to 1 if you have the `fdopendir' function. */
+/* Define to 1 if you have the 'fdopendir' function. */
#undef HAVE_FDOPENDIR
-/* Define to 1 if you have the `fdwalk' function. */
+/* Define to 1 if you have the 'fdwalk' function. */
#undef HAVE_FDWALK
-/* Define to 1 if you have the `fexecve' function. */
+/* Define to 1 if you have the 'fexecve' function. */
#undef HAVE_FEXECVE
/* Define if you have the 'ffi_closure_alloc' function. */
@@ -385,58 +385,58 @@
/* Define if you have the 'ffi_prep_closure_loc' function. */
#undef HAVE_FFI_PREP_CLOSURE_LOC
-/* Define to 1 if you have the `flock' function. */
+/* Define to 1 if you have the 'flock' function. */
#undef HAVE_FLOCK
-/* Define to 1 if you have the `fork' function. */
+/* Define to 1 if you have the 'fork' function. */
#undef HAVE_FORK
-/* Define to 1 if you have the `fork1' function. */
+/* Define to 1 if you have the 'fork1' function. */
#undef HAVE_FORK1
-/* Define to 1 if you have the `forkpty' function. */
+/* Define to 1 if you have the 'forkpty' function. */
#undef HAVE_FORKPTY
-/* Define to 1 if you have the `fpathconf' function. */
+/* Define to 1 if you have the 'fpathconf' function. */
#undef HAVE_FPATHCONF
-/* Define to 1 if you have the `fseek64' function. */
+/* Define to 1 if you have the 'fseek64' function. */
#undef HAVE_FSEEK64
-/* Define to 1 if you have the `fseeko' function. */
+/* Define to 1 if you have the 'fseeko' function. */
#undef HAVE_FSEEKO
-/* Define to 1 if you have the `fstatat' function. */
+/* Define to 1 if you have the 'fstatat' function. */
#undef HAVE_FSTATAT
-/* Define to 1 if you have the `fstatvfs' function. */
+/* Define to 1 if you have the 'fstatvfs' function. */
#undef HAVE_FSTATVFS
/* Define if you have the 'fsync' function. */
#undef HAVE_FSYNC
-/* Define to 1 if you have the `ftell64' function. */
+/* Define to 1 if you have the 'ftell64' function. */
#undef HAVE_FTELL64
-/* Define to 1 if you have the `ftello' function. */
+/* Define to 1 if you have the 'ftello' function. */
#undef HAVE_FTELLO
-/* Define to 1 if you have the `ftime' function. */
+/* Define to 1 if you have the 'ftime' function. */
#undef HAVE_FTIME
-/* Define to 1 if you have the `ftruncate' function. */
+/* Define to 1 if you have the 'ftruncate' function. */
#undef HAVE_FTRUNCATE
-/* Define to 1 if you have the `futimens' function. */
+/* Define to 1 if you have the 'futimens' function. */
#undef HAVE_FUTIMENS
-/* Define to 1 if you have the `futimes' function. */
+/* Define to 1 if you have the 'futimes' function. */
#undef HAVE_FUTIMES
-/* Define to 1 if you have the `futimesat' function. */
+/* Define to 1 if you have the 'futimesat' function. */
#undef HAVE_FUTIMESAT
-/* Define to 1 if you have the `gai_strerror' function. */
+/* Define to 1 if you have the 'gai_strerror' function. */
#undef HAVE_GAI_STRERROR
/* Define if we can use gcc inline assembler to get and set mc68881 fpcr */
@@ -467,40 +467,40 @@
/* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
#undef HAVE_GETC_UNLOCKED
-/* Define to 1 if you have the `getegid' function. */
+/* Define to 1 if you have the 'getegid' function. */
#undef HAVE_GETEGID
-/* Define to 1 if you have the `getentropy' function. */
+/* Define to 1 if you have the 'getentropy' function. */
#undef HAVE_GETENTROPY
-/* Define to 1 if you have the `geteuid' function. */
+/* Define to 1 if you have the 'geteuid' function. */
#undef HAVE_GETEUID
-/* Define to 1 if you have the `getgid' function. */
+/* Define to 1 if you have the 'getgid' function. */
#undef HAVE_GETGID
-/* Define to 1 if you have the `getgrent' function. */
+/* Define to 1 if you have the 'getgrent' function. */
#undef HAVE_GETGRENT
-/* Define to 1 if you have the `getgrgid' function. */
+/* Define to 1 if you have the 'getgrgid' function. */
#undef HAVE_GETGRGID
-/* Define to 1 if you have the `getgrgid_r' function. */
+/* Define to 1 if you have the 'getgrgid_r' function. */
#undef HAVE_GETGRGID_R
-/* Define to 1 if you have the `getgrnam_r' function. */
+/* Define to 1 if you have the 'getgrnam_r' function. */
#undef HAVE_GETGRNAM_R
-/* Define to 1 if you have the `getgrouplist' function. */
+/* Define to 1 if you have the 'getgrouplist' function. */
#undef HAVE_GETGROUPLIST
-/* Define to 1 if you have the `getgroups' function. */
+/* Define to 1 if you have the 'getgroups' function. */
#undef HAVE_GETGROUPS
/* Define if you have the 'gethostbyaddr' function. */
#undef HAVE_GETHOSTBYADDR
-/* Define to 1 if you have the `gethostbyname' function. */
+/* Define to 1 if you have the 'gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
/* Define this if you have some version of gethostbyname_r() */
@@ -515,19 +515,19 @@
/* Define this if you have the 6-arg version of gethostbyname_r(). */
#undef HAVE_GETHOSTBYNAME_R_6_ARG
-/* Define to 1 if you have the `gethostname' function. */
+/* Define to 1 if you have the 'gethostname' function. */
#undef HAVE_GETHOSTNAME
-/* Define to 1 if you have the `getitimer' function. */
+/* Define to 1 if you have the 'getitimer' function. */
#undef HAVE_GETITIMER
-/* Define to 1 if you have the `getloadavg' function. */
+/* Define to 1 if you have the 'getloadavg' function. */
#undef HAVE_GETLOADAVG
-/* Define to 1 if you have the `getlogin' function. */
+/* Define to 1 if you have the 'getlogin' function. */
#undef HAVE_GETLOGIN
-/* Define to 1 if you have the `getnameinfo' function. */
+/* Define to 1 if you have the 'getnameinfo' function. */
#undef HAVE_GETNAMEINFO
/* Define if you have the 'getpagesize' function. */
@@ -536,34 +536,34 @@
/* Define if you have the 'getpeername' function. */
#undef HAVE_GETPEERNAME
-/* Define to 1 if you have the `getpgid' function. */
+/* Define to 1 if you have the 'getpgid' function. */
#undef HAVE_GETPGID
-/* Define to 1 if you have the `getpgrp' function. */
+/* Define to 1 if you have the 'getpgrp' function. */
#undef HAVE_GETPGRP
-/* Define to 1 if you have the `getpid' function. */
+/* Define to 1 if you have the 'getpid' function. */
#undef HAVE_GETPID
-/* Define to 1 if you have the `getppid' function. */
+/* Define to 1 if you have the 'getppid' function. */
#undef HAVE_GETPPID
-/* Define to 1 if you have the `getpriority' function. */
+/* Define to 1 if you have the 'getpriority' function. */
#undef HAVE_GETPRIORITY
/* Define if you have the 'getprotobyname' function. */
#undef HAVE_GETPROTOBYNAME
-/* Define to 1 if you have the `getpwent' function. */
+/* Define to 1 if you have the 'getpwent' function. */
#undef HAVE_GETPWENT
-/* Define to 1 if you have the `getpwnam_r' function. */
+/* Define to 1 if you have the 'getpwnam_r' function. */
#undef HAVE_GETPWNAM_R
-/* Define to 1 if you have the `getpwuid' function. */
+/* Define to 1 if you have the 'getpwuid' function. */
#undef HAVE_GETPWUID
-/* Define to 1 if you have the `getpwuid_r' function. */
+/* Define to 1 if you have the 'getpwuid_r' function. */
#undef HAVE_GETPWUID_R
/* Define to 1 if the getrandom() function is available */
@@ -572,13 +572,13 @@
/* Define to 1 if the Linux getrandom() syscall is available */
#undef HAVE_GETRANDOM_SYSCALL
-/* Define to 1 if you have the `getresgid' function. */
+/* Define to 1 if you have the 'getresgid' function. */
#undef HAVE_GETRESGID
-/* Define to 1 if you have the `getresuid' function. */
+/* Define to 1 if you have the 'getresuid' function. */
#undef HAVE_GETRESUID
-/* Define to 1 if you have the `getrusage' function. */
+/* Define to 1 if you have the 'getrusage' function. */
#undef HAVE_GETRUSAGE
/* Define if you have the 'getservbyname' function. */
@@ -587,29 +587,29 @@
/* Define if you have the 'getservbyport' function. */
#undef HAVE_GETSERVBYPORT
-/* Define to 1 if you have the `getsid' function. */
+/* Define to 1 if you have the 'getsid' function. */
#undef HAVE_GETSID
/* Define if you have the 'getsockname' function. */
#undef HAVE_GETSOCKNAME
-/* Define to 1 if you have the `getspent' function. */
+/* Define to 1 if you have the 'getspent' function. */
#undef HAVE_GETSPENT
-/* Define to 1 if you have the `getspnam' function. */
+/* Define to 1 if you have the 'getspnam' function. */
#undef HAVE_GETSPNAM
-/* Define to 1 if you have the `getuid' function. */
+/* Define to 1 if you have the 'getuid' function. */
#undef HAVE_GETUID
-/* Define to 1 if you have the `getwd' function. */
+/* Define to 1 if you have the 'getwd' function. */
#undef HAVE_GETWD
/* Define if glibc has incorrect _FORTIFY_SOURCE wrappers for memmove and
bcopy. */
#undef HAVE_GLIBC_MEMMOVE_BUG
-/* Define to 1 if you have the `grantpt' function. */
+/* Define to 1 if you have the 'grantpt' function. */
#undef HAVE_GRANTPT
/* Define to 1 if you have the <grp.h> header file. */
@@ -621,7 +621,7 @@
/* Define this if you have le64toh() */
#undef HAVE_HTOLE64
-/* Define to 1 if you have the `if_nameindex' function. */
+/* Define to 1 if you have the 'if_nameindex' function. */
#undef HAVE_IF_NAMEINDEX
/* Define if you have the 'inet_aton' function. */
@@ -633,7 +633,7 @@
/* Define if you have the 'inet_pton' function. */
#undef HAVE_INET_PTON
-/* Define to 1 if you have the `initgroups' function. */
+/* Define to 1 if you have the 'initgroups' function. */
#undef HAVE_INITGROUPS
/* Define to 1 if you have the <inttypes.h> header file. */
@@ -645,10 +645,10 @@
/* Define if gcc has the ipa-pure-const bug. */
#undef HAVE_IPA_PURE_CONST_BUG
-/* Define to 1 if you have the `kill' function. */
+/* Define to 1 if you have the 'kill' function. */
#undef HAVE_KILL
-/* Define to 1 if you have the `killpg' function. */
+/* Define to 1 if you have the 'killpg' function. */
#undef HAVE_KILLPG
/* Define if you have the 'kqueue' function. */
@@ -666,31 +666,31 @@
/* Define to 1 if you have the 'lchflags' function. */
#undef HAVE_LCHFLAGS
-/* Define to 1 if you have the `lchmod' function. */
+/* Define to 1 if you have the 'lchmod' function. */
#undef HAVE_LCHMOD
-/* Define to 1 if you have the `lchown' function. */
+/* Define to 1 if you have the 'lchown' function. */
#undef HAVE_LCHOWN
/* Define to 1 if you have the `db' library (-ldb). */
#undef HAVE_LIBDB
-/* Define to 1 if you have the `dl' library (-ldl). */
+/* Define to 1 if you have the 'dl' library (-ldl). */
#undef HAVE_LIBDL
-/* Define to 1 if you have the `dld' library (-ldld). */
+/* Define to 1 if you have the 'dld' library (-ldld). */
#undef HAVE_LIBDLD
-/* Define to 1 if you have the `ieee' library (-lieee). */
+/* Define to 1 if you have the 'ieee' library (-lieee). */
#undef HAVE_LIBIEEE
/* Define to 1 if you have the <libintl.h> header file. */
#undef HAVE_LIBINTL_H
-/* Define to 1 if you have the `sendfile' library (-lsendfile). */
+/* Define to 1 if you have the 'sendfile' library (-lsendfile). */
#undef HAVE_LIBSENDFILE
-/* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
+/* Define to 1 if you have the 'sqlite3' library (-lsqlite3). */
#undef HAVE_LIBSQLITE3
/* Define to 1 if you have the <libutil.h> header file. */
@@ -699,7 +699,7 @@
/* Define if you have the 'link' function. */
#undef HAVE_LINK
-/* Define to 1 if you have the `linkat' function. */
+/* Define to 1 if you have the 'linkat' function. */
#undef HAVE_LINKAT
/* Define to 1 if you have the <linux/auxvec.h> header file. */
@@ -762,73 +762,73 @@
/* Define if you have the 'listen' function. */
#undef HAVE_LISTEN
-/* Define to 1 if you have the `lockf' function. */
+/* Define to 1 if you have the 'lockf' function. */
#undef HAVE_LOCKF
-/* Define to 1 if you have the `log1p' function. */
+/* Define to 1 if you have the 'log1p' function. */
#undef HAVE_LOG1P
-/* Define to 1 if you have the `log2' function. */
+/* Define to 1 if you have the 'log2' function. */
#undef HAVE_LOG2
/* Define to 1 if you have the `login_tty' function. */
#undef HAVE_LOGIN_TTY
-/* Define to 1 if the system has the type `long double'. */
+/* Define to 1 if the system has the type 'long double'. */
#undef HAVE_LONG_DOUBLE
-/* Define to 1 if you have the `lstat' function. */
+/* Define to 1 if you have the 'lstat' function. */
#undef HAVE_LSTAT
-/* Define to 1 if you have the `lutimes' function. */
+/* Define to 1 if you have the 'lutimes' function. */
#undef HAVE_LUTIMES
/* Define to 1 if you have the <lzma.h> header file. */
#undef HAVE_LZMA_H
-/* Define to 1 if you have the `madvise' function. */
+/* Define to 1 if you have the 'madvise' function. */
#undef HAVE_MADVISE
/* Define this if you have the makedev macro. */
#undef HAVE_MAKEDEV
-/* Define to 1 if you have the `mbrtowc' function. */
+/* Define to 1 if you have the 'mbrtowc' function. */
#undef HAVE_MBRTOWC
/* Define if you have the 'memfd_create' function. */
#undef HAVE_MEMFD_CREATE
-/* Define to 1 if you have the `memrchr' function. */
+/* Define to 1 if you have the 'memrchr' function. */
#undef HAVE_MEMRCHR
/* Define to 1 if you have the <minix/config.h> header file. */
#undef HAVE_MINIX_CONFIG_H
-/* Define to 1 if you have the `mkdirat' function. */
+/* Define to 1 if you have the 'mkdirat' function. */
#undef HAVE_MKDIRAT
-/* Define to 1 if you have the `mkfifo' function. */
+/* Define to 1 if you have the 'mkfifo' function. */
#undef HAVE_MKFIFO
-/* Define to 1 if you have the `mkfifoat' function. */
+/* Define to 1 if you have the 'mkfifoat' function. */
#undef HAVE_MKFIFOAT
-/* Define to 1 if you have the `mknod' function. */
+/* Define to 1 if you have the 'mknod' function. */
#undef HAVE_MKNOD
-/* Define to 1 if you have the `mknodat' function. */
+/* Define to 1 if you have the 'mknodat' function. */
#undef HAVE_MKNODAT
-/* Define to 1 if you have the `mktime' function. */
+/* Define to 1 if you have the 'mktime' function. */
#undef HAVE_MKTIME
-/* Define to 1 if you have the `mmap' function. */
+/* Define to 1 if you have the 'mmap' function. */
#undef HAVE_MMAP
-/* Define to 1 if you have the `mremap' function. */
+/* Define to 1 if you have the 'mremap' function. */
#undef HAVE_MREMAP
-/* Define to 1 if you have the `nanosleep' function. */
+/* Define to 1 if you have the 'nanosleep' function. */
#undef HAVE_NANOSLEEP
/* Define if you have the 'ncurses' library */
@@ -861,7 +861,7 @@
/* Define to 1 if you have the <ndbm.h> header file. */
#undef HAVE_NDBM_H
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* Define to 1 if you have the <ndir.h> header file, and it defines 'DIR'. */
#undef HAVE_NDIR_H
/* Define to 1 if you have the <netcan/can.h> header file. */
@@ -885,20 +885,20 @@
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
-/* Define to 1 if you have the `nice' function. */
+/* Define to 1 if you have the 'nice' function. */
#undef HAVE_NICE
/* Define if the internal form of wchar_t in non-Unicode locales is not
Unicode. */
#undef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION
-/* Define to 1 if you have the `openat' function. */
+/* Define to 1 if you have the 'openat' function. */
#undef HAVE_OPENAT
-/* Define to 1 if you have the `opendir' function. */
+/* Define to 1 if you have the 'opendir' function. */
#undef HAVE_OPENDIR
-/* Define to 1 if you have the `openpty' function. */
+/* Define to 1 if you have the 'openpty' function. */
#undef HAVE_OPENPTY
/* Define if you have the 'panel' library */
@@ -910,53 +910,53 @@
/* Define to 1 if you have the <panel.h> header file. */
#undef HAVE_PANEL_H
-/* Define to 1 if you have the `pathconf' function. */
+/* Define to 1 if you have the 'pathconf' function. */
#undef HAVE_PATHCONF
-/* Define to 1 if you have the `pause' function. */
+/* Define to 1 if you have the 'pause' function. */
#undef HAVE_PAUSE
-/* Define to 1 if you have the `pipe' function. */
+/* Define to 1 if you have the 'pipe' function. */
#undef HAVE_PIPE
-/* Define to 1 if you have the `pipe2' function. */
+/* Define to 1 if you have the 'pipe2' function. */
#undef HAVE_PIPE2
-/* Define to 1 if you have the `plock' function. */
+/* Define to 1 if you have the 'plock' function. */
#undef HAVE_PLOCK
-/* Define to 1 if you have the `poll' function. */
+/* Define to 1 if you have the 'poll' function. */
#undef HAVE_POLL
/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H
-/* Define to 1 if you have the `posix_fadvise' function. */
+/* Define to 1 if you have the 'posix_fadvise' function. */
#undef HAVE_POSIX_FADVISE
-/* Define to 1 if you have the `posix_fallocate' function. */
+/* Define to 1 if you have the 'posix_fallocate' function. */
#undef HAVE_POSIX_FALLOCATE
-/* Define to 1 if you have the `posix_openpt' function. */
+/* Define to 1 if you have the 'posix_openpt' function. */
#undef HAVE_POSIX_OPENPT
-/* Define to 1 if you have the `posix_spawn' function. */
+/* Define to 1 if you have the 'posix_spawn' function. */
#undef HAVE_POSIX_SPAWN
-/* Define to 1 if you have the `posix_spawnp' function. */
+/* Define to 1 if you have the 'posix_spawnp' function. */
#undef HAVE_POSIX_SPAWNP
-/* Define to 1 if you have the `posix_spawn_file_actions_addclosefrom_np'
+/* Define to 1 if you have the 'posix_spawn_file_actions_addclosefrom_np'
function. */
#undef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSEFROM_NP
-/* Define to 1 if you have the `pread' function. */
+/* Define to 1 if you have the 'pread' function. */
#undef HAVE_PREAD
-/* Define to 1 if you have the `preadv' function. */
+/* Define to 1 if you have the 'preadv' function. */
#undef HAVE_PREADV
-/* Define to 1 if you have the `preadv2' function. */
+/* Define to 1 if you have the 'preadv2' function. */
#undef HAVE_PREADV2
/* Define if you have the 'prlimit' function. */
@@ -965,83 +965,83 @@
/* Define to 1 if you have the <process.h> header file. */
#undef HAVE_PROCESS_H
-/* Define to 1 if you have the `process_vm_readv' function. */
+/* Define to 1 if you have the 'process_vm_readv' function. */
#undef HAVE_PROCESS_VM_READV
/* Define if your compiler supports function prototype */
#undef HAVE_PROTOTYPES
-/* Define to 1 if you have the `pthread_condattr_setclock' function. */
+/* Define to 1 if you have the 'pthread_condattr_setclock' function. */
#undef HAVE_PTHREAD_CONDATTR_SETCLOCK
-/* Define to 1 if you have the `pthread_cond_timedwait_relative_np' function.
+/* Define to 1 if you have the 'pthread_cond_timedwait_relative_np' function.
*/
#undef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP
/* Defined for Solaris 2.6 bug in pthread header. */
#undef HAVE_PTHREAD_DESTRUCTOR
-/* Define to 1 if you have the `pthread_getcpuclockid' function. */
+/* Define to 1 if you have the 'pthread_getcpuclockid' function. */
#undef HAVE_PTHREAD_GETCPUCLOCKID
-/* Define to 1 if you have the `pthread_getname_np' function. */
+/* Define to 1 if you have the 'pthread_getname_np' function. */
#undef HAVE_PTHREAD_GETNAME_NP
/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
-/* Define to 1 if you have the `pthread_init' function. */
+/* Define to 1 if you have the 'pthread_init' function. */
#undef HAVE_PTHREAD_INIT
-/* Define to 1 if you have the `pthread_kill' function. */
+/* Define to 1 if you have the 'pthread_kill' function. */
#undef HAVE_PTHREAD_KILL
-/* Define to 1 if you have the `pthread_setname_np' function. */
+/* Define to 1 if you have the 'pthread_setname_np' function. */
#undef HAVE_PTHREAD_SETNAME_NP
-/* Define to 1 if you have the `pthread_sigmask' function. */
+/* Define to 1 if you have the 'pthread_sigmask' function. */
#undef HAVE_PTHREAD_SIGMASK
/* Define if platform requires stubbed pthreads support */
#undef HAVE_PTHREAD_STUBS
-/* Define to 1 if you have the `ptsname' function. */
+/* Define to 1 if you have the 'ptsname' function. */
#undef HAVE_PTSNAME
-/* Define to 1 if you have the `ptsname_r' function. */
+/* Define to 1 if you have the 'ptsname_r' function. */
#undef HAVE_PTSNAME_R
/* Define to 1 if you have the <pty.h> header file. */
#undef HAVE_PTY_H
-/* Define to 1 if you have the `pwrite' function. */
+/* Define to 1 if you have the 'pwrite' function. */
#undef HAVE_PWRITE
-/* Define to 1 if you have the `pwritev' function. */
+/* Define to 1 if you have the 'pwritev' function. */
#undef HAVE_PWRITEV
-/* Define to 1 if you have the `pwritev2' function. */
+/* Define to 1 if you have the 'pwritev2' function. */
#undef HAVE_PWRITEV2
/* Define to 1 if you have the <readline/readline.h> header file. */
#undef HAVE_READLINE_READLINE_H
-/* Define to 1 if you have the `readlink' function. */
+/* Define to 1 if you have the 'readlink' function. */
#undef HAVE_READLINK
-/* Define to 1 if you have the `readlinkat' function. */
+/* Define to 1 if you have the 'readlinkat' function. */
#undef HAVE_READLINKAT
-/* Define to 1 if you have the `readv' function. */
+/* Define to 1 if you have the 'readv' function. */
#undef HAVE_READV
-/* Define to 1 if you have the `realpath' function. */
+/* Define to 1 if you have the 'realpath' function. */
#undef HAVE_REALPATH
/* Define if you have the 'recvfrom' function. */
#undef HAVE_RECVFROM
-/* Define to 1 if you have the `renameat' function. */
+/* Define to 1 if you have the 'renameat' function. */
#undef HAVE_RENAMEAT
/* Define if readline supports append_history */
@@ -1050,7 +1050,7 @@
/* Define if you can turn off readline's signal handling. */
#undef HAVE_RL_CATCH_SIGNAL
-/* Define to 1 if the system has the type `rl_compdisp_func_t'. */
+/* Define to 1 if the system has the type 'rl_compdisp_func_t'. */
#undef HAVE_RL_COMPDISP_FUNC_T
/* Define if you have readline 2.2 */
@@ -1071,154 +1071,154 @@
/* Define if you have readline 4.0 */
#undef HAVE_RL_RESIZE_TERMINAL
-/* Define to 1 if you have the `rtpSpawn' function. */
+/* Define to 1 if you have the 'rtpSpawn' function. */
#undef HAVE_RTPSPAWN
-/* Define to 1 if you have the `sched_get_priority_max' function. */
+/* Define to 1 if you have the 'sched_get_priority_max' function. */
#undef HAVE_SCHED_GET_PRIORITY_MAX
/* Define to 1 if you have the <sched.h> header file. */
#undef HAVE_SCHED_H
-/* Define to 1 if you have the `sched_rr_get_interval' function. */
+/* Define to 1 if you have the 'sched_rr_get_interval' function. */
#undef HAVE_SCHED_RR_GET_INTERVAL
-/* Define to 1 if you have the `sched_setaffinity' function. */
+/* Define to 1 if you have the 'sched_setaffinity' function. */
#undef HAVE_SCHED_SETAFFINITY
-/* Define to 1 if you have the `sched_setparam' function. */
+/* Define to 1 if you have the 'sched_setparam' function. */
#undef HAVE_SCHED_SETPARAM
-/* Define to 1 if you have the `sched_setscheduler' function. */
+/* Define to 1 if you have the 'sched_setscheduler' function. */
#undef HAVE_SCHED_SETSCHEDULER
-/* Define to 1 if you have the `sem_clockwait' function. */
+/* Define to 1 if you have the 'sem_clockwait' function. */
#undef HAVE_SEM_CLOCKWAIT
-/* Define to 1 if you have the `sem_getvalue' function. */
+/* Define to 1 if you have the 'sem_getvalue' function. */
#undef HAVE_SEM_GETVALUE
-/* Define to 1 if you have the `sem_open' function. */
+/* Define to 1 if you have the 'sem_open' function. */
#undef HAVE_SEM_OPEN
-/* Define to 1 if you have the `sem_timedwait' function. */
+/* Define to 1 if you have the 'sem_timedwait' function. */
#undef HAVE_SEM_TIMEDWAIT
-/* Define to 1 if you have the `sem_unlink' function. */
+/* Define to 1 if you have the 'sem_unlink' function. */
#undef HAVE_SEM_UNLINK
-/* Define to 1 if you have the `sendfile' function. */
+/* Define to 1 if you have the 'sendfile' function. */
#undef HAVE_SENDFILE
/* Define if you have the 'sendto' function. */
#undef HAVE_SENDTO
-/* Define to 1 if you have the `setegid' function. */
+/* Define to 1 if you have the 'setegid' function. */
#undef HAVE_SETEGID
-/* Define to 1 if you have the `seteuid' function. */
+/* Define to 1 if you have the 'seteuid' function. */
#undef HAVE_SETEUID
-/* Define to 1 if you have the `setgid' function. */
+/* Define to 1 if you have the 'setgid' function. */
#undef HAVE_SETGID
/* Define if you have the 'setgroups' function. */
#undef HAVE_SETGROUPS
-/* Define to 1 if you have the `sethostname' function. */
+/* Define to 1 if you have the 'sethostname' function. */
#undef HAVE_SETHOSTNAME
-/* Define to 1 if you have the `setitimer' function. */
+/* Define to 1 if you have the 'setitimer' function. */
#undef HAVE_SETITIMER
/* Define to 1 if you have the <setjmp.h> header file. */
#undef HAVE_SETJMP_H
-/* Define to 1 if you have the `setlocale' function. */
+/* Define to 1 if you have the 'setlocale' function. */
#undef HAVE_SETLOCALE
-/* Define to 1 if you have the `setns' function. */
+/* Define to 1 if you have the 'setns' function. */
#undef HAVE_SETNS
-/* Define to 1 if you have the `setpgid' function. */
+/* Define to 1 if you have the 'setpgid' function. */
#undef HAVE_SETPGID
-/* Define to 1 if you have the `setpgrp' function. */
+/* Define to 1 if you have the 'setpgrp' function. */
#undef HAVE_SETPGRP
-/* Define to 1 if you have the `setpriority' function. */
+/* Define to 1 if you have the 'setpriority' function. */
#undef HAVE_SETPRIORITY
-/* Define to 1 if you have the `setregid' function. */
+/* Define to 1 if you have the 'setregid' function. */
#undef HAVE_SETREGID
-/* Define to 1 if you have the `setresgid' function. */
+/* Define to 1 if you have the 'setresgid' function. */
#undef HAVE_SETRESGID
-/* Define to 1 if you have the `setresuid' function. */
+/* Define to 1 if you have the 'setresuid' function. */
#undef HAVE_SETRESUID
-/* Define to 1 if you have the `setreuid' function. */
+/* Define to 1 if you have the 'setreuid' function. */
#undef HAVE_SETREUID
-/* Define to 1 if you have the `setsid' function. */
+/* Define to 1 if you have the 'setsid' function. */
#undef HAVE_SETSID
/* Define if you have the 'setsockopt' function. */
#undef HAVE_SETSOCKOPT
-/* Define to 1 if you have the `setuid' function. */
+/* Define to 1 if you have the 'setuid' function. */
#undef HAVE_SETUID
-/* Define to 1 if you have the `setvbuf' function. */
+/* Define to 1 if you have the 'setvbuf' function. */
#undef HAVE_SETVBUF
/* Define to 1 if you have the <shadow.h> header file. */
#undef HAVE_SHADOW_H
-/* Define to 1 if you have the `shm_open' function. */
+/* Define to 1 if you have the 'shm_open' function. */
#undef HAVE_SHM_OPEN
-/* Define to 1 if you have the `shm_unlink' function. */
+/* Define to 1 if you have the 'shm_unlink' function. */
#undef HAVE_SHM_UNLINK
-/* Define to 1 if you have the `shutdown' function. */
+/* Define to 1 if you have the 'shutdown' function. */
#undef HAVE_SHUTDOWN
-/* Define to 1 if you have the `sigaction' function. */
+/* Define to 1 if you have the 'sigaction' function. */
#undef HAVE_SIGACTION
-/* Define to 1 if you have the `sigaltstack' function. */
+/* Define to 1 if you have the 'sigaltstack' function. */
#undef HAVE_SIGALTSTACK
-/* Define to 1 if you have the `sigfillset' function. */
+/* Define to 1 if you have the 'sigfillset' function. */
#undef HAVE_SIGFILLSET
-/* Define to 1 if `si_band' is a member of `siginfo_t'. */
+/* Define to 1 if 'si_band' is a member of 'siginfo_t'. */
#undef HAVE_SIGINFO_T_SI_BAND
-/* Define to 1 if you have the `siginterrupt' function. */
+/* Define to 1 if you have the 'siginterrupt' function. */
#undef HAVE_SIGINTERRUPT
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
-/* Define to 1 if you have the `sigpending' function. */
+/* Define to 1 if you have the 'sigpending' function. */
#undef HAVE_SIGPENDING
-/* Define to 1 if you have the `sigrelse' function. */
+/* Define to 1 if you have the 'sigrelse' function. */
#undef HAVE_SIGRELSE
-/* Define to 1 if you have the `sigtimedwait' function. */
+/* Define to 1 if you have the 'sigtimedwait' function. */
#undef HAVE_SIGTIMEDWAIT
-/* Define to 1 if you have the `sigwait' function. */
+/* Define to 1 if you have the 'sigwait' function. */
#undef HAVE_SIGWAIT
-/* Define to 1 if you have the `sigwaitinfo' function. */
+/* Define to 1 if you have the 'sigwaitinfo' function. */
#undef HAVE_SIGWAITINFO
-/* Define to 1 if you have the `snprintf' function. */
+/* Define to 1 if you have the 'snprintf' function. */
#undef HAVE_SNPRINTF
/* struct sockaddr_alg (linux/if_alg.h) */
@@ -1236,19 +1236,19 @@
/* Define if you have the 'socketpair' function. */
#undef HAVE_SOCKETPAIR
-/* Define to 1 if the system has the type `socklen_t'. */
+/* Define to 1 if the system has the type 'socklen_t'. */
#undef HAVE_SOCKLEN_T
/* Define to 1 if you have the <spawn.h> header file. */
#undef HAVE_SPAWN_H
-/* Define to 1 if you have the `splice' function. */
+/* Define to 1 if you have the 'splice' function. */
#undef HAVE_SPLICE
-/* Define to 1 if the system has the type `ssize_t'. */
+/* Define to 1 if the system has the type 'ssize_t'. */
#undef HAVE_SSIZE_T
-/* Define to 1 if you have the `statvfs' function. */
+/* Define to 1 if you have the 'statvfs' function. */
#undef HAVE_STATVFS
/* Define if you have struct stat.st_mtim.tv_nsec */
@@ -1269,7 +1269,7 @@
/* Has stdatomic.h with atomic_int and atomic_uintptr_t */
#undef HAVE_STD_ATOMIC
-/* Define to 1 if you have the `strftime' function. */
+/* Define to 1 if you have the 'strftime' function. */
#undef HAVE_STRFTIME
/* Define to 1 if you have the <strings.h> header file. */
@@ -1278,52 +1278,52 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
-/* Define to 1 if you have the `strlcpy' function. */
+/* Define to 1 if you have the 'strlcpy' function. */
#undef HAVE_STRLCPY
/* Define to 1 if you have the <stropts.h> header file. */
#undef HAVE_STROPTS_H
-/* Define to 1 if you have the `strsignal' function. */
+/* Define to 1 if you have the 'strsignal' function. */
#undef HAVE_STRSIGNAL
-/* Define to 1 if `pw_gecos' is a member of `struct passwd'. */
+/* Define to 1 if 'pw_gecos' is a member of 'struct passwd'. */
#undef HAVE_STRUCT_PASSWD_PW_GECOS
-/* Define to 1 if `pw_passwd' is a member of `struct passwd'. */
+/* Define to 1 if 'pw_passwd' is a member of 'struct passwd'. */
#undef HAVE_STRUCT_PASSWD_PW_PASSWD
-/* Define to 1 if `st_birthtime' is a member of `struct stat'. */
+/* Define to 1 if 'st_birthtime' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BIRTHTIME
-/* Define to 1 if `st_blksize' is a member of `struct stat'. */
+/* Define to 1 if 'st_blksize' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
-/* Define to 1 if `st_blocks' is a member of `struct stat'. */
+/* Define to 1 if 'st_blocks' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
-/* Define to 1 if `st_flags' is a member of `struct stat'. */
+/* Define to 1 if 'st_flags' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_FLAGS
-/* Define to 1 if `st_gen' is a member of `struct stat'. */
+/* Define to 1 if 'st_gen' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_GEN
-/* Define to 1 if `st_rdev' is a member of `struct stat'. */
+/* Define to 1 if 'st_rdev' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_RDEV
-/* Define to 1 if `tm_zone' is a member of `struct tm'. */
+/* Define to 1 if 'tm_zone' is a member of 'struct tm'. */
#undef HAVE_STRUCT_TM_TM_ZONE
/* Define if you have the 'symlink' function. */
#undef HAVE_SYMLINK
-/* Define to 1 if you have the `symlinkat' function. */
+/* Define to 1 if you have the 'symlinkat' function. */
#undef HAVE_SYMLINKAT
-/* Define to 1 if you have the `sync' function. */
+/* Define to 1 if you have the 'sync' function. */
#undef HAVE_SYNC
-/* Define to 1 if you have the `sysconf' function. */
+/* Define to 1 if you have the 'sysconf' function. */
#undef HAVE_SYSCONF
/* Define to 1 if you have the <sysexits.h> header file. */
@@ -1332,7 +1332,7 @@
/* Define to 1 if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
-/* Define to 1 if you have the `system' function. */
+/* Define to 1 if you have the 'system' function. */
#undef HAVE_SYSTEM
/* Define to 1 if you have the <sys/audioio.h> header file. */
@@ -1347,7 +1347,7 @@
/* Define to 1 if you have the <sys/devpoll.h> header file. */
#undef HAVE_SYS_DEVPOLL_H
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines 'DIR'.
*/
#undef HAVE_SYS_DIR_H
@@ -1390,7 +1390,7 @@
/* Define to 1 if you have the <sys/modem.h> header file. */
#undef HAVE_SYS_MODEM_H
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines 'DIR'.
*/
#undef HAVE_SYS_NDIR_H
@@ -1466,13 +1466,13 @@
/* Define to 1 if you have the <sys/xattr.h> header file. */
#undef HAVE_SYS_XATTR_H
-/* Define to 1 if you have the `tcgetpgrp' function. */
+/* Define to 1 if you have the 'tcgetpgrp' function. */
#undef HAVE_TCGETPGRP
-/* Define to 1 if you have the `tcsetpgrp' function. */
+/* Define to 1 if you have the 'tcsetpgrp' function. */
#undef HAVE_TCSETPGRP
-/* Define to 1 if you have the `tempnam' function. */
+/* Define to 1 if you have the 'tempnam' function. */
#undef HAVE_TEMPNAM
/* Define to 1 if you have the <termios.h> header file. */
@@ -1481,54 +1481,54 @@
/* Define to 1 if you have the <term.h> header file. */
#undef HAVE_TERM_H
-/* Define to 1 if you have the `timegm' function. */
+/* Define to 1 if you have the 'timegm' function. */
#undef HAVE_TIMEGM
/* Define if you have the 'timerfd_create' function. */
#undef HAVE_TIMERFD_CREATE
-/* Define to 1 if you have the `times' function. */
+/* Define to 1 if you have the 'times' function. */
#undef HAVE_TIMES
-/* Define to 1 if you have the `tmpfile' function. */
+/* Define to 1 if you have the 'tmpfile' function. */
#undef HAVE_TMPFILE
-/* Define to 1 if you have the `tmpnam' function. */
+/* Define to 1 if you have the 'tmpnam' function. */
#undef HAVE_TMPNAM
-/* Define to 1 if you have the `tmpnam_r' function. */
+/* Define to 1 if you have the 'tmpnam_r' function. */
#undef HAVE_TMPNAM_R
-/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
- `HAVE_STRUCT_TM_TM_ZONE' instead. */
+/* Define to 1 if your 'struct tm' has 'tm_zone'. Deprecated, use
+ 'HAVE_STRUCT_TM_TM_ZONE' instead. */
#undef HAVE_TM_ZONE
-/* Define to 1 if you have the `truncate' function. */
+/* Define to 1 if you have the 'truncate' function. */
#undef HAVE_TRUNCATE
-/* Define to 1 if you have the `ttyname' function. */
+/* Define to 1 if you have the 'ttyname' function. */
#undef HAVE_TTYNAME
-/* Define to 1 if you don't have `tm_zone' but do have the external array
- `tzname'. */
+/* Define to 1 if you don't have 'tm_zone' but do have the external array
+ 'tzname'. */
#undef HAVE_TZNAME
-/* Define to 1 if you have the `umask' function. */
+/* Define to 1 if you have the 'umask' function. */
#undef HAVE_UMASK
-/* Define to 1 if you have the `uname' function. */
+/* Define to 1 if you have the 'uname' function. */
#undef HAVE_UNAME
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to 1 if you have the `unlinkat' function. */
+/* Define to 1 if you have the 'unlinkat' function. */
#undef HAVE_UNLINKAT
-/* Define to 1 if you have the `unlockpt' function. */
+/* Define to 1 if you have the 'unlockpt' function. */
#undef HAVE_UNLOCKPT
-/* Define to 1 if you have the `unshare' function. */
+/* Define to 1 if you have the 'unshare' function. */
#undef HAVE_UNSHARE
/* Define if you have a useable wchar_t type defined in wchar.h; useable means
@@ -1539,10 +1539,10 @@
/* Define to 1 if you have the <util.h> header file. */
#undef HAVE_UTIL_H
-/* Define to 1 if you have the `utimensat' function. */
+/* Define to 1 if you have the 'utimensat' function. */
#undef HAVE_UTIMENSAT
-/* Define to 1 if you have the `utimes' function. */
+/* Define to 1 if you have the 'utimes' function. */
#undef HAVE_UTIMES
/* Define to 1 if you have the <utime.h> header file. */
@@ -1551,10 +1551,10 @@
/* Define to 1 if you have the <utmp.h> header file. */
#undef HAVE_UTMP_H
-/* Define to 1 if you have the `uuid_create' function. */
+/* Define to 1 if you have the 'uuid_create' function. */
#undef HAVE_UUID_CREATE
-/* Define to 1 if you have the `uuid_enc_be' function. */
+/* Define to 1 if you have the 'uuid_enc_be' function. */
#undef HAVE_UUID_ENC_BE
/* Define if uuid_generate_time_safe() exists. */
@@ -1566,44 +1566,44 @@
/* Define to 1 if you have the <uuid/uuid.h> header file. */
#undef HAVE_UUID_UUID_H
-/* Define to 1 if you have the `vfork' function. */
+/* Define to 1 if you have the 'vfork' function. */
#undef HAVE_VFORK
-/* Define to 1 if you have the `wait' function. */
+/* Define to 1 if you have the 'wait' function. */
#undef HAVE_WAIT
-/* Define to 1 if you have the `wait3' function. */
+/* Define to 1 if you have the 'wait3' function. */
#undef HAVE_WAIT3
-/* Define to 1 if you have the `wait4' function. */
+/* Define to 1 if you have the 'wait4' function. */
#undef HAVE_WAIT4
-/* Define to 1 if you have the `waitid' function. */
+/* Define to 1 if you have the 'waitid' function. */
#undef HAVE_WAITID
-/* Define to 1 if you have the `waitpid' function. */
+/* Define to 1 if you have the 'waitpid' function. */
#undef HAVE_WAITPID
/* Define if the compiler provides a wchar.h header file. */
#undef HAVE_WCHAR_H
-/* Define to 1 if you have the `wcscoll' function. */
+/* Define to 1 if you have the 'wcscoll' function. */
#undef HAVE_WCSCOLL
-/* Define to 1 if you have the `wcsftime' function. */
+/* Define to 1 if you have the 'wcsftime' function. */
#undef HAVE_WCSFTIME
-/* Define to 1 if you have the `wcsxfrm' function. */
+/* Define to 1 if you have the 'wcsxfrm' function. */
#undef HAVE_WCSXFRM
-/* Define to 1 if you have the `wmemcmp' function. */
+/* Define to 1 if you have the 'wmemcmp' function. */
#undef HAVE_WMEMCMP
/* Define if tzset() actually switches the local timezone in a meaningful way.
*/
#undef HAVE_WORKING_TZSET
-/* Define to 1 if you have the `writev' function. */
+/* Define to 1 if you have the 'writev' function. */
#undef HAVE_WRITEV
/* Define if the zlib library has inflateCopy */
@@ -1612,17 +1612,17 @@
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
-/* Define to 1 if you have the `_getpty' function. */
+/* Define to 1 if you have the '_getpty' function. */
#undef HAVE__GETPTY
-/* Define to 1 if the system has the type `__uint128_t'. */
+/* Define to 1 if the system has the type '__uint128_t'. */
#undef HAVE___UINT128_T
-/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
+/* Define to 1 if 'major', 'minor', and 'makedev' are declared in <mkdev.h>.
*/
#undef MAJOR_IN_MKDEV
-/* Define to 1 if `major', `minor', and `makedev' are declared in
+/* Define to 1 if 'major', 'minor', and 'makedev' are declared in
<sysmacros.h>. */
#undef MAJOR_IN_SYSMACROS
@@ -1730,58 +1730,58 @@
/* Define if i>>j for signed int i does not extend the sign bit when i < 0 */
#undef SIGNED_RIGHT_SHIFT_ZERO_FILLS
-/* The size of `double', as computed by sizeof. */
+/* The size of 'double', as computed by sizeof. */
#undef SIZEOF_DOUBLE
-/* The size of `float', as computed by sizeof. */
+/* The size of 'float', as computed by sizeof. */
#undef SIZEOF_FLOAT
-/* The size of `fpos_t', as computed by sizeof. */
+/* The size of 'fpos_t', as computed by sizeof. */
#undef SIZEOF_FPOS_T
-/* The size of `int', as computed by sizeof. */
+/* The size of 'int', as computed by sizeof. */
#undef SIZEOF_INT
-/* The size of `long', as computed by sizeof. */
+/* The size of 'long', as computed by sizeof. */
#undef SIZEOF_LONG
-/* The size of `long double', as computed by sizeof. */
+/* The size of 'long double', as computed by sizeof. */
#undef SIZEOF_LONG_DOUBLE
-/* The size of `long long', as computed by sizeof. */
+/* The size of 'long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
-/* The size of `off_t', as computed by sizeof. */
+/* The size of 'off_t', as computed by sizeof. */
#undef SIZEOF_OFF_T
-/* The size of `pid_t', as computed by sizeof. */
+/* The size of 'pid_t', as computed by sizeof. */
#undef SIZEOF_PID_T
-/* The size of `pthread_key_t', as computed by sizeof. */
+/* The size of 'pthread_key_t', as computed by sizeof. */
#undef SIZEOF_PTHREAD_KEY_T
-/* The size of `pthread_t', as computed by sizeof. */
+/* The size of 'pthread_t', as computed by sizeof. */
#undef SIZEOF_PTHREAD_T
-/* The size of `short', as computed by sizeof. */
+/* The size of 'short', as computed by sizeof. */
#undef SIZEOF_SHORT
-/* The size of `size_t', as computed by sizeof. */
+/* The size of 'size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
-/* The size of `time_t', as computed by sizeof. */
+/* The size of 'time_t', as computed by sizeof. */
#undef SIZEOF_TIME_T
-/* The size of `uintptr_t', as computed by sizeof. */
+/* The size of 'uintptr_t', as computed by sizeof. */
#undef SIZEOF_UINTPTR_T
-/* The size of `void *', as computed by sizeof. */
+/* The size of 'void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
-/* The size of `wchar_t', as computed by sizeof. */
+/* The size of 'wchar_t', as computed by sizeof. */
#undef SIZEOF_WCHAR_T
-/* The size of `_Bool', as computed by sizeof. */
+/* The size of '_Bool', as computed by sizeof. */
#undef SIZEOF__BOOL
/* Define to 1 if you have the ANSI C header files. */
@@ -1797,13 +1797,13 @@
/* Library needed by timemodule.c: librt may be needed for clock_gettime() */
#undef TIMEMODULE_LIB
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* Define to 1 if your <sys/time.h> declares 'struct tm'. */
#undef TM_IN_SYS_TIME
/* Define if you want to use computed gotos in ceval.c. */
#undef USE_COMPUTED_GOTOS
-/* Enable extensions on AIX 3, Interix. */
+/* Enable extensions on AIX, Interix, z/OS. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
@@ -1864,11 +1864,15 @@
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# undef __STDC_WANT_IEC_60559_DFP_EXT__
#endif
+/* Enable extensions specified by C23 Annex F. */
+#ifndef __STDC_WANT_IEC_60559_EXT__
+# undef __STDC_WANT_IEC_60559_EXT__
+#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
#endif
-/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
#endif
@@ -1997,16 +2001,16 @@
/* Define to 'long' if <time.h> does not define clock_t. */
#undef clock_t
-/* Define to empty if `const' does not conform to ANSI C. */
+/* Define to empty if 'const' does not conform to ANSI C. */
#undef const
-/* Define to `int' if <sys/types.h> doesn't define. */
+/* Define as 'int' if <sys/types.h> doesn't define. */
#undef gid_t
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define to 'int' if <sys/types.h> does not define. */
#undef mode_t
-/* Define to `long int' if <sys/types.h> does not define. */
+/* Define to 'long int' if <sys/types.h> does not define. */
#undef off_t
/* Define as a signed integer type capable of holding a process identifier. */
@@ -2015,13 +2019,13 @@
/* Define to empty if the keyword does not work. */
#undef signed
-/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* Define as 'unsigned int' if <stddef.h> doesn't define. */
#undef size_t
/* Define to 'int' if <sys/socket.h> does not define. */
#undef socklen_t
-/* Define to `int' if <sys/types.h> doesn't define. */
+/* Define as 'int' if <sys/types.h> doesn't define. */
#undef uid_t
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/4ed36d6efb3e3bc613045016dee594d671…
commit: 4ed36d6efb3e3bc613045016dee594d671997709
branch: main
author: Thomas Grainger <tagrain(a)gmail.com>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-03T12:33:35+02:00
summary:
gh-128404: Remove `asyncio` from `Lib/test/test_sys_settrace` (#128435)
files:
M Lib/test/test_sys_settrace.py
diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py
index e5cf88177f7131..28c2c681babe18 100644
--- a/Lib/test/test_sys_settrace.py
+++ b/Lib/test/test_sys_settrace.py
@@ -6,8 +6,7 @@
import difflib
import gc
from functools import wraps
-import asyncio
-from test.support import import_helper, requires_subprocess
+from test.support import import_helper, requires_subprocess, run_no_yield_async_fn
import contextlib
import os
import tempfile
@@ -19,8 +18,6 @@
except ImportError:
_testinternalcapi = None
-support.requires_working_socket(module=True)
-
class tracecontext:
"""Context manager that traces its enter and exit."""
def __init__(self, output, value):
@@ -2067,10 +2064,9 @@ def run_async_test(self, func, jumpFrom, jumpTo, expected, error=None,
stack.enter_context(self.assertRaisesRegex(*error))
if warning is not None:
stack.enter_context(self.assertWarnsRegex(*warning))
- asyncio.run(func(output))
+ run_no_yield_async_fn(func, output)
sys.settrace(None)
- asyncio._set_event_loop_policy(None)
self.compare_jump_output(expected, output)
def jump_test(jumpFrom, jumpTo, expected, error=None, event='line', warning=None):
1
0
gh-127529: Correct asyncio's `accept_connection` behaviour for handling `ConnectionAbortedError` (#127532)
by kumaraditya303 Jan. 3, 2025
by kumaraditya303 Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/830e10651b1f45cd0af36ff611397b9f53…
commit: 830e10651b1f45cd0af36ff611397b9f53171220
branch: main
author: jb2170 <email(a)jb2170.com>
committer: kumaraditya303 <kumaraditya(a)python.org>
date: 2025-01-03T10:32:36Z
summary:
gh-127529: Correct asyncio's `accept_connection` behaviour for handling `ConnectionAbortedError` (#127532)
Co-authored-by: Kumar Aditya <kumaraditya(a)python.org>
files:
A Misc/NEWS.d/next/Library/2024-12-02-19-13-19.gh-issue-127529.Pj1Xtf.rst
M Lib/asyncio/selector_events.py
M Lib/test/test_asyncio/test_selector_events.py
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index f1ab9b12d69a5d..50992a607b3a1c 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -180,9 +180,13 @@ def _accept_connection(
logger.debug("%r got a new connection from %r: %r",
server, addr, conn)
conn.setblocking(False)
- except (BlockingIOError, InterruptedError, ConnectionAbortedError):
- # Early exit because the socket accept buffer is empty.
- return None
+ except ConnectionAbortedError:
+ # Discard connections that were aborted before accept().
+ continue
+ except (BlockingIOError, InterruptedError):
+ # Early exit because of a signal or
+ # the socket accept buffer is empty.
+ return
except OSError as exc:
# There's nowhere to send the error, so just log it.
if exc.errno in (errno.EMFILE, errno.ENFILE,
diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py
index f984dc96415ba3..c9217d04bcd322 100644
--- a/Lib/test/test_asyncio/test_selector_events.py
+++ b/Lib/test/test_asyncio/test_selector_events.py
@@ -364,6 +364,31 @@ def test_accept_connection_multiple(self):
self.loop.run_until_complete(asyncio.sleep(0))
self.assertEqual(sock.accept.call_count, backlog)
+ def test_accept_connection_skip_connectionabortederror(self):
+ sock = mock.Mock()
+
+ def mock_sock_accept():
+ # mock accept(2) returning -ECONNABORTED every-other
+ # time that it's called. This applies most to OpenBSD
+ # whose sockets generate this errno more reproducibly than
+ # Linux and other OS.
+ if sock.accept.call_count % 2 == 0:
+ raise ConnectionAbortedError
+ return (mock.Mock(), mock.Mock())
+
+ sock.accept.side_effect = mock_sock_accept
+ backlog = 100
+ # test that _accept_connection's loop calls sock.accept
+ # all 100 times, continuing past ConnectionAbortedError
+ # instead of unnecessarily returning early
+ mock_obj = mock.patch.object
+ with mock_obj(self.loop, '_accept_connection2') as accept2_mock:
+ self.loop._accept_connection(
+ mock.Mock(), sock, backlog=backlog)
+ # as in test_accept_connection_multiple avoid task pending
+ # warnings by using asyncio.sleep(0)
+ self.loop.run_until_complete(asyncio.sleep(0))
+ self.assertEqual(sock.accept.call_count, backlog)
class SelectorTransportTests(test_utils.TestCase):
diff --git a/Misc/NEWS.d/next/Library/2024-12-02-19-13-19.gh-issue-127529.Pj1Xtf.rst b/Misc/NEWS.d/next/Library/2024-12-02-19-13-19.gh-issue-127529.Pj1Xtf.rst
new file mode 100644
index 00000000000000..26f2fd5923ab7b
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-12-02-19-13-19.gh-issue-127529.Pj1Xtf.rst
@@ -0,0 +1,4 @@
+Correct behavior of
+:func:`!asyncio.selector_events.BaseSelectorEventLoop._accept_connection`
+in handling :exc:`ConnectionAbortedError` in a loop. This improves
+performance on OpenBSD.
1
0
gh-128104: Remove `Py_STRFTIME_C99_SUPPORT`; require C99-compliant strftime (#128106)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/bb2dfadb9221fa3035fda42a2c153c8310…
commit: bb2dfadb9221fa3035fda42a2c153c831013e3d3
branch: main
author: Zanie Blue <contact(a)zanie.dev>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-03T11:04:03+01:00
summary:
gh-128104: Remove `Py_STRFTIME_C99_SUPPORT`; require C99-compliant strftime (#128106)
files:
A Misc/NEWS.d/next/Build/2024-12-20-09-03-22.gh-issue-128104.m_SoVx.rst
M Modules/_datetimemodule.c
M configure
M configure.ac
M pyconfig.h.in
diff --git a/Misc/NEWS.d/next/Build/2024-12-20-09-03-22.gh-issue-128104.m_SoVx.rst b/Misc/NEWS.d/next/Build/2024-12-20-09-03-22.gh-issue-128104.m_SoVx.rst
new file mode 100644
index 00000000000000..c3a47fbecd1dad
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2024-12-20-09-03-22.gh-issue-128104.m_SoVx.rst
@@ -0,0 +1,3 @@
+Remove ``Py_STRFTIME_C99_SUPPORT`` conditions in favor of requiring C99
+:manpage:`strftime(3)` specifier support at build time. When cross-compiling,
+there is no build time check and support is assumed.
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index b1102984cb5e9e..368d10411366c4 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -1912,9 +1912,7 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple,
}
#ifdef Py_NORMALIZE_CENTURY
else if (ch == 'Y' || ch == 'G'
-#ifdef Py_STRFTIME_C99_SUPPORT
|| ch == 'F' || ch == 'C'
-#endif
) {
/* 0-pad year with century as necessary */
PyObject *item = PySequence_GetItem(timetuple, 0);
@@ -1952,15 +1950,11 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple,
* +6 to accommodate dashes, 2-digit month and day for %F. */
char buf[SIZEOF_LONG * 5 / 2 + 2 + 6];
Py_ssize_t n = PyOS_snprintf(buf, sizeof(buf),
-#ifdef Py_STRFTIME_C99_SUPPORT
ch == 'F' ? "%04ld-%%m-%%d" :
-#endif
"%04ld", year_long);
-#ifdef Py_STRFTIME_C99_SUPPORT
if (ch == 'C') {
n -= 2;
}
-#endif
if (_PyUnicodeWriter_WriteSubstring(&writer, format, start, end) < 0) {
goto Error;
}
diff --git a/configure b/configure
index 3d2c60213db591..2c3046e89bcb65 100755
--- a/configure
+++ b/configure
@@ -26436,8 +26436,8 @@ printf "%s\n" "#define Py_NORMALIZE_CENTURY 1" >>confdefs.h
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C99-specific strftime specifiers are supported" >&5
-printf %s "checking whether C99-specific strftime specifiers are supported... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C99-compatible strftime specifiers are supported" >&5
+printf %s "checking whether C99-compatible strftime specifiers are supported... " >&6; }
if test ${ac_cv_strftime_c99_support+y}
then :
printf %s "(cached) " >&6
@@ -26445,7 +26445,7 @@ else $as_nop
if test "$cross_compiling" = yes
then :
- ac_cv_strftime_c99_support=no
+ ac_cv_strftime_c99_support=
else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26472,7 +26472,7 @@ if ac_fn_c_try_run "$LINENO"
then :
ac_cv_strftime_c99_support=yes
else $as_nop
- ac_cv_strftime_c99_support=no
+ as_fn_error $? "Python requires C99-compatible strftime specifiers" "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -26481,12 +26481,6 @@ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_strftime_c99_support" >&5
printf "%s\n" "$ac_cv_strftime_c99_support" >&6; }
-if test "$ac_cv_strftime_c99_support" = yes
-then
-
-printf "%s\n" "#define Py_STRFTIME_C99_SUPPORT 1" >>confdefs.h
-
-fi
have_curses=no
have_panel=no
diff --git a/configure.ac b/configure.ac
index ee034e5a9621df..50b130f2c802b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6672,7 +6672,7 @@ then
[Define if year with century should be normalized for strftime.])
fi
-AC_CACHE_CHECK([whether C99-specific strftime specifiers are supported], [ac_cv_strftime_c99_support], [
+AC_CACHE_CHECK([whether C99-compatible strftime specifiers are supported], [ac_cv_strftime_c99_support], [
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <time.h>
#include <string.h>
@@ -6692,13 +6692,8 @@ int main(void)
}
]])],
[ac_cv_strftime_c99_support=yes],
-[ac_cv_strftime_c99_support=no],
-[ac_cv_strftime_c99_support=no])])
-if test "$ac_cv_strftime_c99_support" = yes
-then
- AC_DEFINE([Py_STRFTIME_C99_SUPPORT], [1],
- [Define if C99-specific strftime specifiers are supported.])
-fi
+[AC_MSG_ERROR([Python requires C99-compatible strftime specifiers])],
+[ac_cv_strftime_c99_support=])])
dnl check for ncursesw/ncurses and panelw/panel
dnl NOTE: old curses is not detected.
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 1ca83fd2f2ca1b..ca08f087a85e9f 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -1715,9 +1715,6 @@
/* Define if you want to enable internal statistics gathering. */
#undef Py_STATS
-/* Define if C99-specific strftime specifiers are supported. */
-#undef Py_STRFTIME_C99_SUPPORT
-
/* The version of SunOS/Solaris as reported by `uname -r' without the dot. */
#undef Py_SUNOS_VERSION
1
0
[3.13] gh-108202: Document calendar.TextCalendar formatting helpers (GH-127608) (#128440)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/e0f0d2d2b899ceec3a7d1853f75dd50efa…
commit: e0f0d2d2b899ceec3a7d1853f75dd50efa5e2f1e
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-03T10:03:45Z
summary:
[3.13] gh-108202: Document calendar.TextCalendar formatting helpers (GH-127608) (#128440)
Document the following TextCalendar methods:
- formatday()
- formatmonthname()
- formatweekday()
- formatweekheader()
(cherry picked from commit bb73426cafb78691b249ffa50f1872ab6f899d4a)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland(a)users.noreply.github.com>
files:
M Doc/library/calendar.rst
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index 9a4395ecb5084d..97ca34b6c6184c 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -138,6 +138,14 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
:class:`TextCalendar` instances have the following methods:
+
+ .. method:: formatday(theday, weekday, width)
+
+ Return a string representing a single day formatted with the given *width*.
+ If *theday* is ``0``, return a string of spaces of
+ the specified width, representing an empty day. The *weekday* parameter
+ is unused.
+
.. method:: formatweek(theweek, w=0)
Return a single week in a string with no newline. If *w* is provided, it
@@ -145,6 +153,17 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
on the first weekday as specified in the constructor or set by the
:meth:`setfirstweekday` method.
+ .. method:: formatweekday(weekday, width)
+
+ Return a string representing the name of a single weekday formatted to
+ the specified *width*. The *weekday* parameter is an integer representing
+ the day of the week, where ``0`` is Monday and ``6`` is Sunday.
+
+ .. method:: formatweekheader(width)
+
+ Return a string containing the header row of weekday names, formatted
+ with the given *width* for each column. The names depend on the locale
+ settings and are padded to the specified width.
.. method:: formatmonth(theyear, themonth, w=0, l=0)
@@ -154,6 +173,12 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
on the first weekday as specified in the constructor or set by the
:meth:`setfirstweekday` method.
+ .. method:: formatmonthname(theyear, themonth, width=0, withyear=True)
+
+ Return a string representing the month's name centered within the
+ specified *width*. If *withyear* is ``True``, include the year in the
+ output. The *theyear* and *themonth* parameters specify the year
+ and month for the name to be formatted respectively.
.. method:: prmonth(theyear, themonth, w=0, l=0)
@@ -445,7 +470,7 @@ The :mod:`calendar` module exports the following data attributes:
A sequence that represents the months of the year in the current locale. This
follows normal convention of January being month number 1, so it has a length of
- 13 and ``month_name[0]`` is the empty string.
+ 13 and ``month_name[0]`` is the empty string.
>>> import calendar
>>> list(calendar.month_name)
1
0
[3.12] gh-108202: Document calendar.TextCalendar formatting helpers (GH-127608) (#128441)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/0d3f4b6a2fc22933a393e02784945fe68e…
commit: 0d3f4b6a2fc22933a393e02784945fe68efadc86
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-03T10:03:38Z
summary:
[3.12] gh-108202: Document calendar.TextCalendar formatting helpers (GH-127608) (#128441)
Document the following TextCalendar methods:
- formatday()
- formatmonthname()
- formatweekday()
- formatweekheader()
(cherry picked from commit bb73426cafb78691b249ffa50f1872ab6f899d4a)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland(a)users.noreply.github.com>
files:
M Doc/library/calendar.rst
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index 4b82e52bf3d8ba..9743e24ad2cdf0 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -138,6 +138,14 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
:class:`TextCalendar` instances have the following methods:
+
+ .. method:: formatday(theday, weekday, width)
+
+ Return a string representing a single day formatted with the given *width*.
+ If *theday* is ``0``, return a string of spaces of
+ the specified width, representing an empty day. The *weekday* parameter
+ is unused.
+
.. method:: formatweek(theweek, w=0)
Return a single week in a string with no newline. If *w* is provided, it
@@ -145,6 +153,17 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
on the first weekday as specified in the constructor or set by the
:meth:`setfirstweekday` method.
+ .. method:: formatweekday(weekday, width)
+
+ Return a string representing the name of a single weekday formatted to
+ the specified *width*. The *weekday* parameter is an integer representing
+ the day of the week, where ``0`` is Monday and ``6`` is Sunday.
+
+ .. method:: formatweekheader(width)
+
+ Return a string containing the header row of weekday names, formatted
+ with the given *width* for each column. The names depend on the locale
+ settings and are padded to the specified width.
.. method:: formatmonth(theyear, themonth, w=0, l=0)
@@ -154,6 +173,12 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
on the first weekday as specified in the constructor or set by the
:meth:`setfirstweekday` method.
+ .. method:: formatmonthname(theyear, themonth, width=0, withyear=True)
+
+ Return a string representing the month's name centered within the
+ specified *width*. If *withyear* is ``True``, include the year in the
+ output. The *theyear* and *themonth* parameters specify the year
+ and month for the name to be formatted respectively.
.. method:: prmonth(theyear, themonth, w=0, l=0)
@@ -445,7 +470,7 @@ The :mod:`calendar` module exports the following data attributes:
A sequence that represents the months of the year in the current locale. This
follows normal convention of January being month number 1, so it has a length of
- 13 and ``month_name[0]`` is the empty string.
+ 13 and ``month_name[0]`` is the empty string.
>>> import calendar
>>> list(calendar.month_name)
1
0
gh-108202: Document calendar.TextCalendar formatting helpers (#127608)
by erlend-aasland Jan. 3, 2025
by erlend-aasland Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/bb73426cafb78691b249ffa50f1872ab6f…
commit: bb73426cafb78691b249ffa50f1872ab6f899d4a
branch: main
author: Stan Ulbrych <89152624+StanFromIreland(a)users.noreply.github.com>
committer: erlend-aasland <erlend.aasland(a)protonmail.com>
date: 2025-01-03T10:57:15+01:00
summary:
gh-108202: Document calendar.TextCalendar formatting helpers (#127608)
Document the following TextCalendar methods:
- formatday()
- formatmonthname()
- formatweekday()
- formatweekheader()
files:
M Doc/library/calendar.rst
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index 9a4395ecb5084d..97ca34b6c6184c 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -138,6 +138,14 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
:class:`TextCalendar` instances have the following methods:
+
+ .. method:: formatday(theday, weekday, width)
+
+ Return a string representing a single day formatted with the given *width*.
+ If *theday* is ``0``, return a string of spaces of
+ the specified width, representing an empty day. The *weekday* parameter
+ is unused.
+
.. method:: formatweek(theweek, w=0)
Return a single week in a string with no newline. If *w* is provided, it
@@ -145,6 +153,17 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
on the first weekday as specified in the constructor or set by the
:meth:`setfirstweekday` method.
+ .. method:: formatweekday(weekday, width)
+
+ Return a string representing the name of a single weekday formatted to
+ the specified *width*. The *weekday* parameter is an integer representing
+ the day of the week, where ``0`` is Monday and ``6`` is Sunday.
+
+ .. method:: formatweekheader(width)
+
+ Return a string containing the header row of weekday names, formatted
+ with the given *width* for each column. The names depend on the locale
+ settings and are padded to the specified width.
.. method:: formatmonth(theyear, themonth, w=0, l=0)
@@ -154,6 +173,12 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
on the first weekday as specified in the constructor or set by the
:meth:`setfirstweekday` method.
+ .. method:: formatmonthname(theyear, themonth, width=0, withyear=True)
+
+ Return a string representing the month's name centered within the
+ specified *width*. If *withyear* is ``True``, include the year in the
+ output. The *theyear* and *themonth* parameters specify the year
+ and month for the name to be formatted respectively.
.. method:: prmonth(theyear, themonth, w=0, l=0)
@@ -445,7 +470,7 @@ The :mod:`calendar` module exports the following data attributes:
A sequence that represents the months of the year in the current locale. This
follows normal convention of January being month number 1, so it has a length of
- 13 and ``month_name[0]`` is the empty string.
+ 13 and ``month_name[0]`` is the empty string.
>>> import calendar
>>> list(calendar.month_name)
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/0706bab1c0985761cdbc07ab448f98c717…
commit: 0706bab1c0985761cdbc07ab448f98c717276b36
branch: main
author: Abhijeet <abhijeetsharma2002(a)gmail.com>
committer: kumaraditya303 <kumaraditya(a)python.org>
date: 2025-01-03T13:50:56+05:30
summary:
gh-128133: use relaxed atomics for hash of bytes (#128412)
files:
M Objects/bytesobject.c
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 533089d25cd73a..90e8a9af88b4a3 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -51,6 +51,33 @@ static inline PyObject* bytes_get_empty(void)
}
+static inline void
+set_ob_shash(PyBytesObject *a, Py_hash_t hash)
+{
+_Py_COMP_DIAG_PUSH
+_Py_COMP_DIAG_IGNORE_DEPR_DECLS
+#ifdef Py_GIL_DISABLED
+ _Py_atomic_store_ssize_relaxed(&a->ob_shash, hash);
+#else
+ a->ob_shash = hash;
+#endif
+_Py_COMP_DIAG_POP
+}
+
+static inline Py_hash_t
+get_ob_shash(PyBytesObject *a)
+{
+_Py_COMP_DIAG_PUSH
+_Py_COMP_DIAG_IGNORE_DEPR_DECLS
+#ifdef Py_GIL_DISABLED
+ return _Py_atomic_load_ssize_relaxed(&a->ob_shash);
+#else
+ return a->ob_shash;
+#endif
+_Py_COMP_DIAG_POP
+}
+
+
/*
For PyBytes_FromString(), the parameter 'str' points to a null-terminated
string containing exactly 'size' bytes.
@@ -98,10 +125,7 @@ _PyBytes_FromSize(Py_ssize_t size, int use_calloc)
return PyErr_NoMemory();
}
_PyObject_InitVar((PyVarObject*)op, &PyBytes_Type, size);
-_Py_COMP_DIAG_PUSH
-_Py_COMP_DIAG_IGNORE_DEPR_DECLS
- op->ob_shash = -1;
-_Py_COMP_DIAG_POP
+ set_ob_shash(op, -1);
if (!use_calloc) {
op->ob_sval[size] = '\0';
}
@@ -165,10 +189,7 @@ PyBytes_FromString(const char *str)
return PyErr_NoMemory();
}
_PyObject_InitVar((PyVarObject*)op, &PyBytes_Type, size);
-_Py_COMP_DIAG_PUSH
-_Py_COMP_DIAG_IGNORE_DEPR_DECLS
- op->ob_shash = -1;
-_Py_COMP_DIAG_POP
+ set_ob_shash(op, -1);
memcpy(op->ob_sval, str, size+1);
return (PyObject *) op;
}
@@ -1485,10 +1506,7 @@ bytes_repeat(PyObject *self, Py_ssize_t n)
return PyErr_NoMemory();
}
_PyObject_InitVar((PyVarObject*)op, &PyBytes_Type, size);
-_Py_COMP_DIAG_PUSH
-_Py_COMP_DIAG_IGNORE_DEPR_DECLS
- op->ob_shash = -1;
-_Py_COMP_DIAG_POP
+ set_ob_shash(op, -1);
op->ob_sval[size] = '\0';
_PyBytes_Repeat(op->ob_sval, size, a->ob_sval, Py_SIZE(a));
@@ -1597,14 +1615,13 @@ static Py_hash_t
bytes_hash(PyObject *self)
{
PyBytesObject *a = _PyBytes_CAST(self);
-_Py_COMP_DIAG_PUSH
-_Py_COMP_DIAG_IGNORE_DEPR_DECLS
- if (a->ob_shash == -1) {
+ Py_hash_t hash = get_ob_shash(a);
+ if (hash == -1) {
/* Can't fail */
- a->ob_shash = Py_HashBuffer(a->ob_sval, Py_SIZE(a));
+ hash = Py_HashBuffer(a->ob_sval, Py_SIZE(a));
+ set_ob_shash(a, hash);
}
- return a->ob_shash;
-_Py_COMP_DIAG_POP
+ return hash;
}
static PyObject*
@@ -3004,10 +3021,7 @@ bytes_alloc(PyTypeObject *self, Py_ssize_t nitems)
if (obj == NULL) {
return NULL;
}
-_Py_COMP_DIAG_PUSH
-_Py_COMP_DIAG_IGNORE_DEPR_DECLS
- obj->ob_shash = -1;
-_Py_COMP_DIAG_POP
+ set_ob_shash(obj, -1);
return (PyObject*)obj;
}
@@ -3024,11 +3038,8 @@ bytes_subtype_new(PyTypeObject *type, PyObject *tmp)
if (pnew != NULL) {
memcpy(PyBytes_AS_STRING(pnew),
PyBytes_AS_STRING(tmp), n+1);
-_Py_COMP_DIAG_PUSH
-_Py_COMP_DIAG_IGNORE_DEPR_DECLS
- ((PyBytesObject *)pnew)->ob_shash =
- ((PyBytesObject *)tmp)->ob_shash;
-_Py_COMP_DIAG_POP
+ set_ob_shash((PyBytesObject *)pnew,
+ get_ob_shash((PyBytesObject *)tmp));
}
return pnew;
}
@@ -3221,10 +3232,7 @@ _PyBytes_Resize(PyObject **pv, Py_ssize_t newsize)
sv = (PyBytesObject *) *pv;
Py_SET_SIZE(sv, newsize);
sv->ob_sval[newsize] = '\0';
-_Py_COMP_DIAG_PUSH
-_Py_COMP_DIAG_IGNORE_DEPR_DECLS
- sv->ob_shash = -1; /* invalidate cached hash value */
-_Py_COMP_DIAG_POP
+ set_ob_shash(sv, -1); /* invalidate cached hash value */
return 0;
}
1
0
Jan. 3, 2025
https://github.com/python/cpython/commit/b49c68a1b3dfd2c2567c38b2d044c4a1c1…
commit: b49c68a1b3dfd2c2567c38b2d044c4a1c14a26a7
branch: main
author: Thomas Grainger <tagrain(a)gmail.com>
committer: kumaraditya303 <kumaraditya(a)python.org>
date: 2025-01-03T07:50:24Z
summary:
gh-128404: remove asyncio from test_type_params (#128436)
files:
M Lib/test/test_type_params.py
diff --git a/Lib/test/test_type_params.py b/Lib/test/test_type_params.py
index 89f836cf722966..0f393def827271 100644
--- a/Lib/test/test_type_params.py
+++ b/Lib/test/test_type_params.py
@@ -1,11 +1,10 @@
import annotationlib
-import asyncio
import textwrap
import types
import unittest
import pickle
import weakref
-from test.support import requires_working_socket, check_syntax_error, run_code
+from test.support import check_syntax_error, run_code, run_no_yield_async_fn
from typing import Generic, NoDefault, Sequence, TypeAliasType, TypeVar, TypeVarTuple, ParamSpec, get_args
@@ -1051,7 +1050,6 @@ def generator2[B]():
self.assertIsInstance(c, TypeVar)
self.assertEqual(c.__name__, "C")
- @requires_working_socket()
def test_typevar_coroutine(self):
def get_coroutine[A]():
async def coroutine[B]():
@@ -1060,8 +1058,7 @@ async def coroutine[B]():
co = get_coroutine()
- self.addCleanup(asyncio._set_event_loop_policy, None)
- a, b = asyncio.run(co())
+ a, b = run_no_yield_async_fn(co)
self.assertIsInstance(a, TypeVar)
self.assertEqual(a.__name__, "A")
1
0
gh-128426: Mention PySequence_Fast in free-threading C API HOWTO (#128428)
by kumaraditya303 Jan. 3, 2025
by kumaraditya303 Jan. 3, 2025
Jan. 3, 2025
https://github.com/python/cpython/commit/e7adeecc2b318505eb53bc779320f028be…
commit: e7adeecc2b318505eb53bc779320f028be40cccc
branch: main
author: Nathan Goldbaum <nathan.goldbaum(a)gmail.com>
committer: kumaraditya303 <kumaraditya(a)python.org>
date: 2025-01-03T13:10:24+05:30
summary:
gh-128426: Mention PySequence_Fast in free-threading C API HOWTO (#128428)
files:
M Doc/howto/free-threading-extensions.rst
diff --git a/Doc/howto/free-threading-extensions.rst b/Doc/howto/free-threading-extensions.rst
index c1ad42e7e55ee5..95f214179bfb0e 100644
--- a/Doc/howto/free-threading-extensions.rst
+++ b/Doc/howto/free-threading-extensions.rst
@@ -96,8 +96,10 @@ Most of the C API is thread-safe, but there are some exceptions.
* **Struct Fields**: Accessing fields in Python C API objects or structs
directly is not thread-safe if the field may be concurrently modified.
-* **Macros**: Accessor macros like :c:macro:`PyList_GET_ITEM` and
- :c:macro:`PyList_SET_ITEM` do not perform any error checking or locking.
+* **Macros**: Accessor macros like :c:macro:`PyList_GET_ITEM`,
+ :c:macro:`PyList_SET_ITEM`, and macros like
+ :c:macro:`PySequence_Fast_GET_SIZE` that use the object returned by
+ :c:func:`PySequence_Fast` do not perform any error checking or locking.
These macros are not thread-safe if the container object may be modified
concurrently.
* **Borrowed References**: C API functions that return
1
0
[3.13] gh-128400: Stop-the-world when manually calling `faulthandler` (GH-128422) (GH-128423)
by colesbury Jan. 2, 2025
by colesbury Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/ebadfd1039a321a142e0e09e040bf8e724…
commit: ebadfd1039a321a142e0e09e040bf8e724bb5905
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: colesbury <colesbury(a)gmail.com>
date: 2025-01-02T19:21:16Z
summary:
[3.13] gh-128400: Stop-the-world when manually calling `faulthandler` (GH-128422) (GH-128423)
(cherry picked from commit c9356feef28e6dfc4dc32830d3427a5ae0e426e2)
Co-authored-by: Peter Bierma <zintensitydev(a)gmail.com>
files:
A Misc/NEWS.d/next/Library/2025-01-02-13-05-16.gh-issue-128400.5N43fF.rst
M Lib/test/test_faulthandler.py
M Modules/faulthandler.c
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index 60815be96e14eb..fd56dee5d842ac 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -7,7 +7,7 @@
import subprocess
import sys
from test import support
-from test.support import os_helper, script_helper, is_android, MS_WINDOWS
+from test.support import os_helper, script_helper, is_android, MS_WINDOWS, threading_helper
import tempfile
import unittest
from textwrap import dedent
@@ -896,6 +896,34 @@ def test_cancel_later_without_dump_traceback_later(self):
self.assertEqual(output, [])
self.assertEqual(exitcode, 0)
+ @threading_helper.requires_working_threading()
+ @unittest.skipUnless(support.Py_GIL_DISABLED, "only meaningful if the GIL is disabled")
+ def test_free_threaded_dump_traceback(self):
+ # gh-128400: Other threads need to be paused to invoke faulthandler
+ code = dedent("""
+ import faulthandler
+ from threading import Thread, Event
+
+ class Waiter(Thread):
+ def __init__(self):
+ Thread.__init__(self)
+ self.running = Event()
+ self.stop = Event()
+
+ def run(self):
+ self.running.set()
+ self.stop.wait()
+
+ for _ in range(100):
+ waiter = Waiter()
+ waiter.start()
+ waiter.running.wait()
+ faulthandler.dump_traceback(all_threads=True)
+ waiter.stop.set()
+ waiter.join()
+ """)
+ _, exitcode = self.get_output(code)
+ self.assertEqual(exitcode, 0)
if __name__ == "__main__":
unittest.main()
diff --git a/Misc/NEWS.d/next/Library/2025-01-02-13-05-16.gh-issue-128400.5N43fF.rst b/Misc/NEWS.d/next/Library/2025-01-02-13-05-16.gh-issue-128400.5N43fF.rst
new file mode 100644
index 00000000000000..4033dea4eaf7bf
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-01-02-13-05-16.gh-issue-128400.5N43fF.rst
@@ -0,0 +1,2 @@
+Fix crash when using :func:`faulthandler.dump_traceback` while other threads
+are active on the :term:`free threaded <free threading>` build.
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index b62362f277797e..2d16028a5232d0 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -237,7 +237,12 @@ faulthandler_dump_traceback_py(PyObject *self,
return NULL;
if (all_threads) {
+ PyInterpreterState *interp = _PyInterpreterState_GET();
+ /* gh-128400: Accessing other thread states while they're running
+ * isn't safe if those threads are running. */
+ _PyEval_StopTheWorld(interp);
errmsg = _Py_DumpTracebackThreads(fd, NULL, tstate);
+ _PyEval_StartTheWorld(interp);
if (errmsg != NULL) {
PyErr_SetString(PyExc_RuntimeError, errmsg);
return NULL;
1
0
Jan. 2, 2025
https://github.com/python/cpython/commit/8eebe4e6d02bb4ad3f1ca6c52624186903…
commit: 8eebe4e6d02bb4ad3f1ca6c52624186903dce893
branch: main
author: Sam Gross <colesbury(a)gmail.com>
committer: colesbury <colesbury(a)gmail.com>
date: 2025-01-02T14:02:54-05:00
summary:
gh-128212: Fix race in `_PyUnicode_CheckConsistency` (GH-128367)
There was a data race on the utf8 field between `PyUnicode_SET_UTF8` and
`_PyUnicode_CheckConsistency`. Use the `_PyUnicode_UTF8()` accessor,
which uses an atomic load internally, to avoid the data race.
files:
M Objects/unicodeobject.c
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 1aab9cf37768a8..9f0a4d4785eda6 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -688,7 +688,7 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content)
|| kind == PyUnicode_2BYTE_KIND
|| kind == PyUnicode_4BYTE_KIND);
CHECK(ascii->state.ascii == 0);
- CHECK(compact->utf8 != data);
+ CHECK(_PyUnicode_UTF8(op) != data);
}
else {
PyUnicodeObject *unicode = _PyUnicodeObject_CAST(op);
1
0
gh-128400: Stop-the-world when manually calling `faulthandler` (GH-128422)
by colesbury Jan. 2, 2025
by colesbury Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/c9356feef28e6dfc4dc32830d3427a5ae0…
commit: c9356feef28e6dfc4dc32830d3427a5ae0e426e2
branch: main
author: Peter Bierma <zintensitydev(a)gmail.com>
committer: colesbury <colesbury(a)gmail.com>
date: 2025-01-02T13:56:01-05:00
summary:
gh-128400: Stop-the-world when manually calling `faulthandler` (GH-128422)
files:
A Misc/NEWS.d/next/Library/2025-01-02-13-05-16.gh-issue-128400.5N43fF.rst
M Lib/test/test_faulthandler.py
M Modules/faulthandler.c
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index 60815be96e14eb..fd56dee5d842ac 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -7,7 +7,7 @@
import subprocess
import sys
from test import support
-from test.support import os_helper, script_helper, is_android, MS_WINDOWS
+from test.support import os_helper, script_helper, is_android, MS_WINDOWS, threading_helper
import tempfile
import unittest
from textwrap import dedent
@@ -896,6 +896,34 @@ def test_cancel_later_without_dump_traceback_later(self):
self.assertEqual(output, [])
self.assertEqual(exitcode, 0)
+ @threading_helper.requires_working_threading()
+ @unittest.skipUnless(support.Py_GIL_DISABLED, "only meaningful if the GIL is disabled")
+ def test_free_threaded_dump_traceback(self):
+ # gh-128400: Other threads need to be paused to invoke faulthandler
+ code = dedent("""
+ import faulthandler
+ from threading import Thread, Event
+
+ class Waiter(Thread):
+ def __init__(self):
+ Thread.__init__(self)
+ self.running = Event()
+ self.stop = Event()
+
+ def run(self):
+ self.running.set()
+ self.stop.wait()
+
+ for _ in range(100):
+ waiter = Waiter()
+ waiter.start()
+ waiter.running.wait()
+ faulthandler.dump_traceback(all_threads=True)
+ waiter.stop.set()
+ waiter.join()
+ """)
+ _, exitcode = self.get_output(code)
+ self.assertEqual(exitcode, 0)
if __name__ == "__main__":
unittest.main()
diff --git a/Misc/NEWS.d/next/Library/2025-01-02-13-05-16.gh-issue-128400.5N43fF.rst b/Misc/NEWS.d/next/Library/2025-01-02-13-05-16.gh-issue-128400.5N43fF.rst
new file mode 100644
index 00000000000000..4033dea4eaf7bf
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-01-02-13-05-16.gh-issue-128400.5N43fF.rst
@@ -0,0 +1,2 @@
+Fix crash when using :func:`faulthandler.dump_traceback` while other threads
+are active on the :term:`free threaded <free threading>` build.
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index b62362f277797e..2d16028a5232d0 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -237,7 +237,12 @@ faulthandler_dump_traceback_py(PyObject *self,
return NULL;
if (all_threads) {
+ PyInterpreterState *interp = _PyInterpreterState_GET();
+ /* gh-128400: Accessing other thread states while they're running
+ * isn't safe if those threads are running. */
+ _PyEval_StopTheWorld(interp);
errmsg = _Py_DumpTracebackThreads(fd, NULL, tstate);
+ _PyEval_StartTheWorld(interp);
if (errmsg != NULL) {
PyErr_SetString(PyExc_RuntimeError, errmsg);
return NULL;
1
0
Remove asserts that confuse `enum _framestate` with `enum _frameowner` (GH-124148)
by colesbury Jan. 2, 2025
by colesbury Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/a626f9a67b76e5fe69677afd5f8317d8c6…
commit: a626f9a67b76e5fe69677afd5f8317d8c61de8de
branch: main
author: Anders Kaseorg <andersk(a)mit.edu>
committer: colesbury <colesbury(a)gmail.com>
date: 2025-01-02T16:55:33Z
summary:
Remove asserts that confuse `enum _framestate` with `enum _frameowner` (GH-124148)
The `owner` field of `_PyInterpreterFrame` is supposed to be a member of
`enum _frameowner`, but `FRAME_CLEARED` is a member of `enum _framestate`.
At present, it happens that `FRAME_CLEARED` is not numerically equal to any
member of `enum _frameowner`, but that could change in the future. The code
that incorrectly assigned `owner = FRAME_CLEARED` was deleted in commit
a53cc3f49463e50cb3e2b839b3a82e6bf7f73fee (GH-116687). Remove the incorrect
checks for `owner != FRAME_CLEARED` as well.
files:
M Python/frame.c
diff --git a/Python/frame.c b/Python/frame.c
index 9a865e57d97cc6..6eb32bcce0b799 100644
--- a/Python/frame.c
+++ b/Python/frame.c
@@ -40,7 +40,6 @@ _PyFrame_MakeAndSetFrameObject(_PyInterpreterFrame *frame)
// here.
assert(frame->frame_obj == NULL);
assert(frame->owner != FRAME_OWNED_BY_FRAME_OBJECT);
- assert(frame->owner != FRAME_CLEARED);
f->f_frame = frame;
frame->frame_obj = f;
return f;
@@ -51,7 +50,6 @@ take_ownership(PyFrameObject *f, _PyInterpreterFrame *frame)
{
assert(frame->owner != FRAME_OWNED_BY_CSTACK);
assert(frame->owner != FRAME_OWNED_BY_FRAME_OBJECT);
- assert(frame->owner != FRAME_CLEARED);
Py_ssize_t size = ((char*)frame->stackpointer) - (char *)frame;
memcpy((_PyInterpreterFrame *)f->_f_frame_data, frame, size);
frame = (_PyInterpreterFrame *)f->_f_frame_data;
1
0
[3.13] gh-128013: fix data race in PyUnicode_AsUTF8AndSize on free-threading (#128021) (#128417)
by kumaraditya303 Jan. 2, 2025
by kumaraditya303 Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/fa6c48e4b3d5b6f80a9aed07d4a5620bf6…
commit: fa6c48e4b3d5b6f80a9aed07d4a5620bf62f195f
branch: 3.13
author: Kumar Aditya <kumaraditya(a)python.org>
committer: kumaraditya303 <kumaraditya(a)python.org>
date: 2025-01-02T22:10:17+05:30
summary:
[3.13] gh-128013: fix data race in PyUnicode_AsUTF8AndSize on free-threading (#128021) (#128417)
files:
M Lib/test/test_capi/test_unicode.py
M Objects/unicodeobject.c
diff --git a/Lib/test/test_capi/test_unicode.py b/Lib/test/test_capi/test_unicode.py
index a69f817c515ba7..f750ec1a56fef9 100644
--- a/Lib/test/test_capi/test_unicode.py
+++ b/Lib/test/test_capi/test_unicode.py
@@ -1,7 +1,7 @@
import unittest
import sys
from test import support
-from test.support import import_helper
+from test.support import threading_helper, import_helper
try:
import _testcapi
@@ -959,6 +959,24 @@ def test_asutf8(self):
self.assertRaises(TypeError, unicode_asutf8, [], 0)
# CRASHES unicode_asutf8(NULL, 0)
+ @unittest.skipIf(_testcapi is None, 'need _testcapi module')
+ @threading_helper.requires_working_threading()
+ def test_asutf8_race(self):
+ """Test that there's no race condition in PyUnicode_AsUTF8()"""
+ unicode_asutf8 = _testcapi.unicode_asutf8
+ from threading import Thread
+
+ data = "😊"
+
+ def worker():
+ for _ in range(1000):
+ self.assertEqual(unicode_asutf8(data, 5), b'\xf0\x9f\x98\x8a\0')
+
+ threads = [Thread(target=worker) for _ in range(10)]
+ with threading_helper.start_threads(threads):
+ pass
+
+
@support.cpython_only
@unittest.skipIf(_testlimitedcapi is None, 'need _testlimitedcapi module')
def test_asutf8andsize(self):
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index d4ce7fd7c97970..7e61d615418722 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -111,20 +111,42 @@ NOTE: In the interpreter's initialization phase, some globals are currently
# define _PyUnicode_CHECK(op) PyUnicode_Check(op)
#endif
-#define _PyUnicode_UTF8(op) \
- (_PyCompactUnicodeObject_CAST(op)->utf8)
-#define PyUnicode_UTF8(op) \
- (assert(_PyUnicode_CHECK(op)), \
- PyUnicode_IS_COMPACT_ASCII(op) ? \
- ((char*)(_PyASCIIObject_CAST(op) + 1)) : \
- _PyUnicode_UTF8(op))
-#define _PyUnicode_UTF8_LENGTH(op) \
- (_PyCompactUnicodeObject_CAST(op)->utf8_length)
-#define PyUnicode_UTF8_LENGTH(op) \
- (assert(_PyUnicode_CHECK(op)), \
- PyUnicode_IS_COMPACT_ASCII(op) ? \
- _PyASCIIObject_CAST(op)->length : \
- _PyUnicode_UTF8_LENGTH(op))
+static inline char* _PyUnicode_UTF8(PyObject *op)
+{
+ return FT_ATOMIC_LOAD_PTR_ACQUIRE(_PyCompactUnicodeObject_CAST(op)->utf8);
+}
+
+static inline char* PyUnicode_UTF8(PyObject *op)
+{
+ assert(_PyUnicode_CHECK(op));
+ if (PyUnicode_IS_COMPACT_ASCII(op)) {
+ return ((char*)(_PyASCIIObject_CAST(op) + 1));
+ }
+ else {
+ return _PyUnicode_UTF8(op);
+ }
+}
+
+static inline void PyUnicode_SET_UTF8(PyObject *op, char *utf8)
+{
+ FT_ATOMIC_STORE_PTR_RELEASE(_PyCompactUnicodeObject_CAST(op)->utf8, utf8);
+}
+
+static inline Py_ssize_t PyUnicode_UTF8_LENGTH(PyObject *op)
+{
+ assert(_PyUnicode_CHECK(op));
+ if (PyUnicode_IS_COMPACT_ASCII(op)) {
+ return _PyASCIIObject_CAST(op)->length;
+ }
+ else {
+ return _PyCompactUnicodeObject_CAST(op)->utf8_length;
+ }
+}
+
+static inline void PyUnicode_SET_UTF8_LENGTH(PyObject *op, Py_ssize_t length)
+{
+ _PyCompactUnicodeObject_CAST(op)->utf8_length = length;
+}
#define _PyUnicode_LENGTH(op) \
(_PyASCIIObject_CAST(op)->length)
@@ -132,26 +154,37 @@ NOTE: In the interpreter's initialization phase, some globals are currently
(_PyASCIIObject_CAST(op)->state)
#define _PyUnicode_HASH(op) \
(_PyASCIIObject_CAST(op)->hash)
-#define _PyUnicode_KIND(op) \
- (assert(_PyUnicode_CHECK(op)), \
- _PyASCIIObject_CAST(op)->state.kind)
-#define _PyUnicode_GET_LENGTH(op) \
- (assert(_PyUnicode_CHECK(op)), \
- _PyASCIIObject_CAST(op)->length)
+
+static inline Py_hash_t PyUnicode_HASH(PyObject *op)
+{
+ assert(_PyUnicode_CHECK(op));
+ return FT_ATOMIC_LOAD_SSIZE_RELAXED(_PyASCIIObject_CAST(op)->hash);
+}
+
+static inline void PyUnicode_SET_HASH(PyObject *op, Py_hash_t hash)
+{
+ FT_ATOMIC_STORE_SSIZE_RELAXED(_PyASCIIObject_CAST(op)->hash, hash);
+}
+
#define _PyUnicode_DATA_ANY(op) \
(_PyUnicodeObject_CAST(op)->data.any)
-#define _PyUnicode_SHARE_UTF8(op) \
- (assert(_PyUnicode_CHECK(op)), \
- assert(!PyUnicode_IS_COMPACT_ASCII(op)), \
- (_PyUnicode_UTF8(op) == PyUnicode_DATA(op)))
+static inline int _PyUnicode_SHARE_UTF8(PyObject *op)
+{
+ assert(_PyUnicode_CHECK(op));
+ assert(!PyUnicode_IS_COMPACT_ASCII(op));
+ return (_PyUnicode_UTF8(op) == PyUnicode_DATA(op));
+}
/* true if the Unicode object has an allocated UTF-8 memory block
(not shared with other data) */
-#define _PyUnicode_HAS_UTF8_MEMORY(op) \
- ((!PyUnicode_IS_COMPACT_ASCII(op) \
- && _PyUnicode_UTF8(op) \
- && _PyUnicode_UTF8(op) != PyUnicode_DATA(op)))
+static inline int _PyUnicode_HAS_UTF8_MEMORY(PyObject *op)
+{
+ return (!PyUnicode_IS_COMPACT_ASCII(op)
+ && _PyUnicode_UTF8(op) != NULL
+ && _PyUnicode_UTF8(op) != PyUnicode_DATA(op));
+}
+
/* Generic helper macro to convert characters of different types.
from_type and to_type have to be valid type names, begin and end
@@ -650,7 +683,7 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content)
|| kind == PyUnicode_2BYTE_KIND
|| kind == PyUnicode_4BYTE_KIND);
CHECK(ascii->state.ascii == 0);
- CHECK(compact->utf8 != data);
+ CHECK(_PyUnicode_UTF8(op) != data);
}
else {
PyUnicodeObject *unicode = _PyUnicodeObject_CAST(op);
@@ -662,16 +695,17 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content)
CHECK(ascii->state.compact == 0);
CHECK(data != NULL);
if (ascii->state.ascii) {
- CHECK(compact->utf8 == data);
+ CHECK(_PyUnicode_UTF8(op) == data);
CHECK(compact->utf8_length == ascii->length);
}
else {
- CHECK(compact->utf8 != data);
+ CHECK(_PyUnicode_UTF8(op) != data);
}
}
-
- if (compact->utf8 == NULL)
+#ifndef Py_GIL_DISABLED
+ if (_PyUnicode_UTF8(op) == NULL)
CHECK(compact->utf8_length == 0);
+#endif
}
/* check that the best kind is used: O(n) operation */
@@ -1115,8 +1149,8 @@ resize_compact(PyObject *unicode, Py_ssize_t length)
if (_PyUnicode_HAS_UTF8_MEMORY(unicode)) {
PyMem_Free(_PyUnicode_UTF8(unicode));
- _PyUnicode_UTF8(unicode) = NULL;
- _PyUnicode_UTF8_LENGTH(unicode) = 0;
+ PyUnicode_SET_UTF8_LENGTH(unicode, 0);
+ PyUnicode_SET_UTF8(unicode, NULL);
}
#ifdef Py_TRACE_REFS
_Py_ForgetReference(unicode);
@@ -1169,8 +1203,8 @@ resize_inplace(PyObject *unicode, Py_ssize_t length)
if (!share_utf8 && _PyUnicode_HAS_UTF8_MEMORY(unicode))
{
PyMem_Free(_PyUnicode_UTF8(unicode));
- _PyUnicode_UTF8(unicode) = NULL;
- _PyUnicode_UTF8_LENGTH(unicode) = 0;
+ PyUnicode_SET_UTF8_LENGTH(unicode, 0);
+ PyUnicode_SET_UTF8(unicode, NULL);
}
data = (PyObject *)PyObject_Realloc(data, new_size);
@@ -1180,8 +1214,8 @@ resize_inplace(PyObject *unicode, Py_ssize_t length)
}
_PyUnicode_DATA_ANY(unicode) = data;
if (share_utf8) {
- _PyUnicode_UTF8(unicode) = data;
- _PyUnicode_UTF8_LENGTH(unicode) = length;
+ PyUnicode_SET_UTF8_LENGTH(unicode, length);
+ PyUnicode_SET_UTF8(unicode, data);
}
_PyUnicode_LENGTH(unicode) = length;
PyUnicode_WRITE(PyUnicode_KIND(unicode), data, length, 0);
@@ -1411,12 +1445,12 @@ unicode_convert_wchar_to_ucs4(const wchar_t *begin, const wchar_t *end,
assert(unicode != NULL);
assert(_PyUnicode_CHECK(unicode));
- assert(_PyUnicode_KIND(unicode) == PyUnicode_4BYTE_KIND);
+ assert(PyUnicode_KIND(unicode) == PyUnicode_4BYTE_KIND);
ucs4_out = PyUnicode_4BYTE_DATA(unicode);
for (iter = begin; iter < end; ) {
assert(ucs4_out < (PyUnicode_4BYTE_DATA(unicode) +
- _PyUnicode_GET_LENGTH(unicode)));
+ PyUnicode_GET_LENGTH(unicode)));
if (Py_UNICODE_IS_HIGH_SURROGATE(iter[0])
&& (iter+1) < end
&& Py_UNICODE_IS_LOW_SURROGATE(iter[1]))
@@ -1430,7 +1464,7 @@ unicode_convert_wchar_to_ucs4(const wchar_t *begin, const wchar_t *end,
}
}
assert(ucs4_out == (PyUnicode_4BYTE_DATA(unicode) +
- _PyUnicode_GET_LENGTH(unicode)));
+ PyUnicode_GET_LENGTH(unicode)));
}
#endif
@@ -1801,7 +1835,7 @@ unicode_modifiable(PyObject *unicode)
assert(_PyUnicode_CHECK(unicode));
if (Py_REFCNT(unicode) != 1)
return 0;
- if (FT_ATOMIC_LOAD_SSIZE_RELAXED(_PyUnicode_HASH(unicode)) != -1)
+ if (PyUnicode_HASH(unicode) != -1)
return 0;
if (PyUnicode_CHECK_INTERNED(unicode))
return 0;
@@ -4052,6 +4086,21 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr)
static int unicode_fill_utf8(PyObject *unicode);
+
+static int
+unicode_ensure_utf8(PyObject *unicode)
+{
+ int err = 0;
+ if (PyUnicode_UTF8(unicode) == NULL) {
+ Py_BEGIN_CRITICAL_SECTION(unicode);
+ if (PyUnicode_UTF8(unicode) == NULL) {
+ err = unicode_fill_utf8(unicode);
+ }
+ Py_END_CRITICAL_SECTION();
+ }
+ return err;
+}
+
const char *
PyUnicode_AsUTF8AndSize(PyObject *unicode, Py_ssize_t *psize)
{
@@ -4063,13 +4112,11 @@ PyUnicode_AsUTF8AndSize(PyObject *unicode, Py_ssize_t *psize)
return NULL;
}
- if (PyUnicode_UTF8(unicode) == NULL) {
- if (unicode_fill_utf8(unicode) == -1) {
- if (psize) {
- *psize = -1;
- }
- return NULL;
+ if (unicode_ensure_utf8(unicode) == -1) {
+ if (psize) {
+ *psize = -1;
}
+ return NULL;
}
if (psize) {
@@ -5401,6 +5448,7 @@ unicode_encode_utf8(PyObject *unicode, _Py_error_handler error_handler,
static int
unicode_fill_utf8(PyObject *unicode)
{
+ _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(unicode);
/* the string cannot be ASCII, or PyUnicode_UTF8() would be set */
assert(!PyUnicode_IS_ASCII(unicode));
@@ -5442,10 +5490,10 @@ unicode_fill_utf8(PyObject *unicode)
PyErr_NoMemory();
return -1;
}
- _PyUnicode_UTF8(unicode) = cache;
- _PyUnicode_UTF8_LENGTH(unicode) = len;
memcpy(cache, start, len);
cache[len] = '\0';
+ PyUnicode_SET_UTF8_LENGTH(unicode, len);
+ PyUnicode_SET_UTF8(unicode, cache);
_PyBytesWriter_Dealloc(&writer);
return 0;
}
@@ -10996,9 +11044,9 @@ _PyUnicode_EqualToASCIIId(PyObject *left, _Py_Identifier *right)
return 0;
}
- Py_hash_t right_hash = FT_ATOMIC_LOAD_SSIZE_RELAXED(_PyUnicode_HASH(right_uni));
+ Py_hash_t right_hash = PyUnicode_HASH(right_uni);
assert(right_hash != -1);
- Py_hash_t hash = FT_ATOMIC_LOAD_SSIZE_RELAXED(_PyUnicode_HASH(left));
+ Py_hash_t hash = PyUnicode_HASH(left);
if (hash != -1 && hash != right_hash) {
return 0;
}
@@ -11484,14 +11532,14 @@ unicode_hash(PyObject *self)
#ifdef Py_DEBUG
assert(_Py_HashSecret_Initialized);
#endif
- Py_hash_t hash = FT_ATOMIC_LOAD_SSIZE_RELAXED(_PyUnicode_HASH(self));
+ Py_hash_t hash = PyUnicode_HASH(self);
if (hash != -1) {
return hash;
}
x = _Py_HashBytes(PyUnicode_DATA(self),
PyUnicode_GET_LENGTH(self) * PyUnicode_KIND(self));
- FT_ATOMIC_STORE_SSIZE_RELAXED(_PyUnicode_HASH(self), x);
+ PyUnicode_SET_HASH(self, x);
return x;
}
@@ -14888,8 +14936,8 @@ unicode_subtype_new(PyTypeObject *type, PyObject *unicode)
_PyUnicode_STATE(self).compact = 0;
_PyUnicode_STATE(self).ascii = _PyUnicode_STATE(unicode).ascii;
_PyUnicode_STATE(self).statically_allocated = 0;
- _PyUnicode_UTF8_LENGTH(self) = 0;
- _PyUnicode_UTF8(self) = NULL;
+ PyUnicode_SET_UTF8_LENGTH(self, 0);
+ PyUnicode_SET_UTF8(self, NULL);
_PyUnicode_DATA_ANY(self) = NULL;
share_utf8 = 0;
@@ -14919,8 +14967,8 @@ unicode_subtype_new(PyTypeObject *type, PyObject *unicode)
_PyUnicode_DATA_ANY(self) = data;
if (share_utf8) {
- _PyUnicode_UTF8_LENGTH(self) = length;
- _PyUnicode_UTF8(self) = data;
+ PyUnicode_SET_UTF8_LENGTH(self, length);
+ PyUnicode_SET_UTF8(self, data);
}
memcpy(data, PyUnicode_DATA(unicode), kind * (length + 1));
1
0
[3.12] gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015) (GH-128420)
by serhiy-storchaka Jan. 2, 2025
by serhiy-storchaka Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/7ce09fc93bc75ba64d64ed3386f7c5ce06…
commit: 7ce09fc93bc75ba64d64ed3386f7c5ce0611a84c
branch: 3.12
author: Serhiy Storchaka <storchaka(a)gmail.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2025-01-02T16:21:00Z
summary:
[3.12] gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015) (GH-128420)
(cherry picked from commit 58e9f95c4aa970db32a94b9152b51ede22f823bd)
Co-authored-by: Zhikang Yan <2951256653(a)qq.com>
files:
A Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst
M Lib/test/test_tkinter/test_misc.py
M Lib/tkinter/__init__.py
diff --git a/Lib/test/test_tkinter/test_misc.py b/Lib/test/test_tkinter/test_misc.py
index 81866993435a0c..bb6f7824ea746b 100644
--- a/Lib/test/test_tkinter/test_misc.py
+++ b/Lib/test/test_tkinter/test_misc.py
@@ -3,7 +3,8 @@
import tkinter
import enum
from test import support
-from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest
+from test.test_tkinter.support import (AbstractTkTest, AbstractDefaultRootTest,
+ requires_tk, get_tk_patchlevel)
support.requires('gui')
@@ -392,6 +393,34 @@ def test_embedded_null(self):
self.assertEqual(widget.selection_get(), '\u20ac\0abc\x00def')
+class WmTest(AbstractTkTest, unittest.TestCase):
+
+ def test_wm_iconbitmap(self):
+ t = tkinter.Toplevel(self.root)
+ self.assertEqual(t.wm_iconbitmap(), '')
+ t.wm_iconbitmap('hourglass')
+ bug = False
+ if t._windowingsystem == 'aqua':
+ # Tk bug 13ac26b35dc55f7c37f70b39d59d7ef3e63017c8.
+ patchlevel = get_tk_patchlevel(t)
+ if patchlevel < (8, 6, 17) or (9, 0) <= patchlevel < (9, 0, 2):
+ bug = True
+ if not bug:
+ self.assertEqual(t.wm_iconbitmap(), 'hourglass')
+ self.assertEqual(self.root.wm_iconbitmap(), '')
+ t.wm_iconbitmap('')
+ self.assertEqual(t.wm_iconbitmap(), '')
+
+ if t._windowingsystem == 'win32':
+ t.wm_iconbitmap(default='hourglass')
+ self.assertEqual(t.wm_iconbitmap(), 'hourglass')
+ self.assertEqual(self.root.wm_iconbitmap(), '')
+ t.wm_iconbitmap(default='')
+ self.assertEqual(t.wm_iconbitmap(), '')
+
+ t.destroy()
+
+
class EventTest(AbstractTkTest, unittest.TestCase):
def test_focus(self):
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index ac70d965f305d5..ac78c04efc5833 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -2150,7 +2150,7 @@ def wm_iconbitmap(self, bitmap=None, default=None):
explicitly. DEFAULT can be the relative path to a .ico file
(example: root.iconbitmap(default='myicon.ico') ). See Tk
documentation for more information."""
- if default:
+ if default is not None:
return self.tk.call('wm', 'iconbitmap', self._w, '-default', default)
else:
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
diff --git a/Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst b/Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst
new file mode 100644
index 00000000000000..ef339a291f0ddd
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst
@@ -0,0 +1,2 @@
+Fix resetting the default window icon by passing ``default=''`` to the
+:mod:`tkinter` method :meth:`!wm_iconbitmap`.
1
0
[3.13] gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015) (GH-128418)
by serhiy-storchaka Jan. 2, 2025
by serhiy-storchaka Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/24cddab4a20cc9fc218c80074457e83900…
commit: 24cddab4a20cc9fc218c80074457e8390060ed4c
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2025-01-02T16:14:18Z
summary:
[3.13] gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015) (GH-128418)
(cherry picked from commit 58e9f95c4aa970db32a94b9152b51ede22f823bd)
Co-authored-by: Zhikang Yan <2951256653(a)qq.com>
Co-authored-by: Serhiy Storchaka <storchaka(a)gmail.com>
files:
A Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst
M Lib/test/test_tkinter/test_misc.py
M Lib/tkinter/__init__.py
diff --git a/Lib/test/test_tkinter/test_misc.py b/Lib/test/test_tkinter/test_misc.py
index b0b9ed60040443..c7c1120ac48d18 100644
--- a/Lib/test/test_tkinter/test_misc.py
+++ b/Lib/test/test_tkinter/test_misc.py
@@ -4,7 +4,8 @@
from tkinter import TclError
import enum
from test import support
-from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest, requires_tk
+from test.test_tkinter.support import (AbstractTkTest, AbstractDefaultRootTest,
+ requires_tk, get_tk_patchlevel)
support.requires('gui')
@@ -540,6 +541,31 @@ def test_wm_attribute(self):
self.assertEqual(w.wm_attributes('alpha'),
1.0 if self.wantobjects else '1.0')
+ def test_wm_iconbitmap(self):
+ t = tkinter.Toplevel(self.root)
+ self.assertEqual(t.wm_iconbitmap(), '')
+ t.wm_iconbitmap('hourglass')
+ bug = False
+ if t._windowingsystem == 'aqua':
+ # Tk bug 13ac26b35dc55f7c37f70b39d59d7ef3e63017c8.
+ patchlevel = get_tk_patchlevel(t)
+ if patchlevel < (8, 6, 17) or (9, 0) <= patchlevel < (9, 0, 2):
+ bug = True
+ if not bug:
+ self.assertEqual(t.wm_iconbitmap(), 'hourglass')
+ self.assertEqual(self.root.wm_iconbitmap(), '')
+ t.wm_iconbitmap('')
+ self.assertEqual(t.wm_iconbitmap(), '')
+
+ if t._windowingsystem == 'win32':
+ t.wm_iconbitmap(default='hourglass')
+ self.assertEqual(t.wm_iconbitmap(), 'hourglass')
+ self.assertEqual(self.root.wm_iconbitmap(), '')
+ t.wm_iconbitmap(default='')
+ self.assertEqual(t.wm_iconbitmap(), '')
+
+ t.destroy()
+
class EventTest(AbstractTkTest, unittest.TestCase):
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index 5352276e874bf5..51d97634d38a12 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -2263,7 +2263,7 @@ def wm_iconbitmap(self, bitmap=None, default=None):
explicitly. DEFAULT can be the relative path to a .ico file
(example: root.iconbitmap(default='myicon.ico') ). See Tk
documentation for more information."""
- if default:
+ if default is not None:
return self.tk.call('wm', 'iconbitmap', self._w, '-default', default)
else:
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
diff --git a/Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst b/Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst
new file mode 100644
index 00000000000000..ef339a291f0ddd
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst
@@ -0,0 +1,2 @@
+Fix resetting the default window icon by passing ``default=''`` to the
+:mod:`tkinter` method :meth:`!wm_iconbitmap`.
1
0
gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015)
by serhiy-storchaka Jan. 2, 2025
by serhiy-storchaka Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/58e9f95c4aa970db32a94b9152b51ede22…
commit: 58e9f95c4aa970db32a94b9152b51ede22f823bd
branch: main
author: Zhikang Yan <2951256653(a)qq.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2025-01-02T17:51:57+02:00
summary:
gh-128014: Fix passing default='' to the tkinter method wm_iconbitmap() (GH-128015)
Co-authored-by: Serhiy Storchaka <storchaka(a)gmail.com>
files:
A Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst
M Lib/test/test_tkinter/test_misc.py
M Lib/tkinter/__init__.py
diff --git a/Lib/test/test_tkinter/test_misc.py b/Lib/test/test_tkinter/test_misc.py
index 475edcbd5338a7..3362169391818b 100644
--- a/Lib/test/test_tkinter/test_misc.py
+++ b/Lib/test/test_tkinter/test_misc.py
@@ -4,7 +4,8 @@
from tkinter import TclError
import enum
from test import support
-from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest, requires_tk
+from test.test_tkinter.support import (AbstractTkTest, AbstractDefaultRootTest,
+ requires_tk, get_tk_patchlevel)
support.requires('gui')
@@ -554,6 +555,31 @@ def test_wm_attribute(self):
self.assertEqual(w.wm_attributes('alpha'),
1.0 if self.wantobjects else '1.0')
+ def test_wm_iconbitmap(self):
+ t = tkinter.Toplevel(self.root)
+ self.assertEqual(t.wm_iconbitmap(), '')
+ t.wm_iconbitmap('hourglass')
+ bug = False
+ if t._windowingsystem == 'aqua':
+ # Tk bug 13ac26b35dc55f7c37f70b39d59d7ef3e63017c8.
+ patchlevel = get_tk_patchlevel(t)
+ if patchlevel < (8, 6, 17) or (9, 0) <= patchlevel < (9, 0, 2):
+ bug = True
+ if not bug:
+ self.assertEqual(t.wm_iconbitmap(), 'hourglass')
+ self.assertEqual(self.root.wm_iconbitmap(), '')
+ t.wm_iconbitmap('')
+ self.assertEqual(t.wm_iconbitmap(), '')
+
+ if t._windowingsystem == 'win32':
+ t.wm_iconbitmap(default='hourglass')
+ self.assertEqual(t.wm_iconbitmap(), 'hourglass')
+ self.assertEqual(self.root.wm_iconbitmap(), '')
+ t.wm_iconbitmap(default='')
+ self.assertEqual(t.wm_iconbitmap(), '')
+
+ t.destroy()
+
class EventTest(AbstractTkTest, unittest.TestCase):
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index bfec04bb6c1e6e..d494c0c9687cd1 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -2265,7 +2265,7 @@ def wm_iconbitmap(self, bitmap=None, default=None):
explicitly. DEFAULT can be the relative path to a .ico file
(example: root.iconbitmap(default='myicon.ico') ). See Tk
documentation for more information."""
- if default:
+ if default is not None:
return self.tk.call('wm', 'iconbitmap', self._w, '-default', default)
else:
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
diff --git a/Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst b/Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst
new file mode 100644
index 00000000000000..ef339a291f0ddd
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-12-18-00-07-50.gh-issue-128014.F3aUbz.rst
@@ -0,0 +1,2 @@
+Fix resetting the default window icon by passing ``default=''`` to the
+:mod:`tkinter` method :meth:`!wm_iconbitmap`.
1
0
[3.12] Revert "Doc: Show object descriptions in the table of contents (GH-125757)" (GH-128406) (#128414)
by AA-Turner Jan. 2, 2025
by AA-Turner Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/52c08ed02974c47596c00adbbb4087bd6d…
commit: 52c08ed02974c47596c00adbbb4087bd6d587c1c
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: AA-Turner <9087854+AA-Turner(a)users.noreply.github.com>
date: 2025-01-02T14:41:25Z
summary:
[3.12] Revert "Doc: Show object descriptions in the table of contents (GH-125757)" (GH-128406) (#128414)
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
files:
D Doc/tools/static/sidebar-wrap.css
M Doc/conf.py
M Doc/tools/extensions/pyspecific.py
diff --git a/Doc/conf.py b/Doc/conf.py
index 4e76c21fe0c670..4b18d02a943f62 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -89,9 +89,7 @@
# Create table of contents entries for domain objects (e.g. functions, classes,
# attributes, etc.). Default is True.
-toc_object_entries = True
-# Hide parents to tidy up long entries in sidebar
-toc_object_entries_show_parents = 'hide'
+toc_object_entries = False
# Ignore any .rst files in the includes/ directory;
# they're embedded in pages but not rendered as individual pages.
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index 615c7f1f30fc6c..f09574d1ad34a4 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -435,6 +435,5 @@ def setup(app):
app.add_directive_to_domain('py', 'awaitablemethod', PyAwaitableMethod)
app.add_directive_to_domain('py', 'abstractmethod', PyAbstractMethod)
app.add_directive('miscnews', MiscNews)
- app.add_css_file('sidebar-wrap.css')
app.connect('env-check-consistency', patch_pairindextypes)
return {'version': '1.0', 'parallel_read_safe': True}
diff --git a/Doc/tools/static/sidebar-wrap.css b/Doc/tools/static/sidebar-wrap.css
deleted file mode 100644
index 0a80f516f28349..00000000000000
--- a/Doc/tools/static/sidebar-wrap.css
+++ /dev/null
@@ -1,6 +0,0 @@
-div.sphinxsidebarwrapper {
- overflow-x: scroll;
-}
-div.sphinxsidebarwrapper li code {
- overflow-wrap: normal;
-}
1
0
[3.13] Revert "Doc: Show object descriptions in the table of contents (GH-125757)" (GH-128406) (#128413)
by AA-Turner Jan. 2, 2025
by AA-Turner Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/cc5b03f89d30db593baf881b087a8c72dd…
commit: cc5b03f89d30db593baf881b087a8c72dd00079e
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: AA-Turner <9087854+AA-Turner(a)users.noreply.github.com>
date: 2025-01-02T14:40:19Z
summary:
[3.13] Revert "Doc: Show object descriptions in the table of contents (GH-125757)" (GH-128406) (#128413)
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
files:
D Doc/tools/static/sidebar-wrap.css
M Doc/conf.py
M Doc/tools/extensions/pyspecific.py
diff --git a/Doc/conf.py b/Doc/conf.py
index 73d7d5db26ff7b..829124c86c8b19 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -97,9 +97,7 @@
# Create table of contents entries for domain objects (e.g. functions, classes,
# attributes, etc.). Default is True.
-toc_object_entries = True
-# Hide parents to tidy up long entries in sidebar
-toc_object_entries_show_parents = 'hide'
+toc_object_entries = False
# Ignore any .rst files in the includes/ directory;
# they're embedded in pages but not rendered as individual pages.
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index 1ad10d4bef6f36..014c7c279e90b4 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -434,6 +434,5 @@ def setup(app):
app.add_directive_to_domain('py', 'awaitablemethod', PyAwaitableMethod)
app.add_directive_to_domain('py', 'abstractmethod', PyAbstractMethod)
app.add_directive('miscnews', MiscNews)
- app.add_css_file('sidebar-wrap.css')
app.connect('env-check-consistency', patch_pairindextypes)
return {'version': '1.0', 'parallel_read_safe': True}
diff --git a/Doc/tools/static/sidebar-wrap.css b/Doc/tools/static/sidebar-wrap.css
deleted file mode 100644
index 0a80f516f28349..00000000000000
--- a/Doc/tools/static/sidebar-wrap.css
+++ /dev/null
@@ -1,6 +0,0 @@
-div.sphinxsidebarwrapper {
- overflow-x: scroll;
-}
-div.sphinxsidebarwrapper li code {
- overflow-wrap: normal;
-}
1
0
Revert "Doc: Show object descriptions in the table of contents (#125757)" (#128406)
by AA-Turner Jan. 2, 2025
by AA-Turner Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/c9d2bc6d7f6d74e0539afb0f7066997ae7…
commit: c9d2bc6d7f6d74e0539afb0f7066997ae736dfc8
branch: main
author: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
committer: AA-Turner <9087854+AA-Turner(a)users.noreply.github.com>
date: 2025-01-02T14:35:00Z
summary:
Revert "Doc: Show object descriptions in the table of contents (#125757)" (#128406)
files:
D Doc/tools/static/sidebar-wrap.css
M Doc/conf.py
M Doc/tools/extensions/pyspecific.py
diff --git a/Doc/conf.py b/Doc/conf.py
index 9cde394cbaed69..ae08c7fa288080 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -101,9 +101,7 @@
# Create table of contents entries for domain objects (e.g. functions, classes,
# attributes, etc.). Default is True.
-toc_object_entries = True
-# Hide parents to tidy up long entries in sidebar
-toc_object_entries_show_parents = 'hide'
+toc_object_entries = False
# Ignore any .rst files in the includes/ directory;
# they're embedded in pages but not rendered as individual pages.
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index f4df7ec0839339..bcb8a421e32d09 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -434,6 +434,5 @@ def setup(app):
app.add_directive_to_domain('py', 'awaitablemethod', PyAwaitableMethod)
app.add_directive_to_domain('py', 'abstractmethod', PyAbstractMethod)
app.add_directive('miscnews', MiscNews)
- app.add_css_file('sidebar-wrap.css')
app.connect('env-check-consistency', patch_pairindextypes)
return {'version': '1.0', 'parallel_read_safe': True}
diff --git a/Doc/tools/static/sidebar-wrap.css b/Doc/tools/static/sidebar-wrap.css
deleted file mode 100644
index 0a80f516f28349..00000000000000
--- a/Doc/tools/static/sidebar-wrap.css
+++ /dev/null
@@ -1,6 +0,0 @@
-div.sphinxsidebarwrapper {
- overflow-x: scroll;
-}
-div.sphinxsidebarwrapper li code {
- overflow-wrap: normal;
-}
1
0
https://github.com/python/cpython/commit/9ba0528537b2befcd02a7fdc5904e0cfbc…
commit: 9ba0528537b2befcd02a7fdc5904e0cfbc33a887
branch: main
author: Thomas Grainger <tagrain(a)gmail.com>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-02T15:00:26+02:00
summary:
gh-128404: Remove ``asyncio`` from ``test_builtin`` (#128403)
Co-authored-by: Kumar Aditya <kumaraditya(a)python.org>
files:
M Lib/test/test_builtin.py
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index f98138391bc1a8..5f4eac5267622f 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -1,7 +1,6 @@
# Python test set -- built-in functions
import ast
-import asyncio
import builtins
import collections
import contextlib
@@ -31,7 +30,8 @@
from types import AsyncGeneratorType, FunctionType, CellType
from operator import neg
from test import support
-from test.support import (cpython_only, swap_attr, maybe_get_event_loop_policy)
+from test.support import cpython_only, swap_attr
+from test.support import async_yield, run_yielding_async_fn
from test.support.import_helper import import_module
from test.support.os_helper import (EnvironmentVarGuard, TESTFN, unlink)
from test.support.script_helper import assert_python_ok
@@ -414,10 +414,6 @@ def test_compile_top_level_await_no_coro(self):
msg=f"source={source} mode={mode}")
- @unittest.skipIf(
- support.is_emscripten or support.is_wasi,
- "socket.accept is broken"
- )
def test_compile_top_level_await(self):
"""Test whether code with top level await can be compiled.
@@ -432,13 +428,25 @@ async def arange(n):
for i in range(n):
yield i
+ class Lock:
+ async def __aenter__(self):
+ return self
+
+ async def __aexit__(self, *exc_info):
+ pass
+
+ async def sleep(delay, result=None):
+ assert delay == 0
+ await async_yield(None)
+ return result
+
modes = ('single', 'exec')
optimizations = (-1, 0, 1, 2)
code_samples = [
- '''a = await asyncio.sleep(0, result=1)''',
+ '''a = await sleep(0, result=1)''',
'''async for i in arange(1):
a = 1''',
- '''async with asyncio.Lock() as l:
+ '''async with Lock() as l:
a = 1''',
'''a = [x async for x in arange(2)][1]''',
'''a = 1 in {x async for x in arange(2)}''',
@@ -446,16 +454,16 @@ async def arange(n):
'''a = [x async for x in arange(2) async for x in arange(2)][1]''',
'''a = [x async for x in (x async for x in arange(5))][1]''',
'''a, = [1 for x in {x async for x in arange(1)}]''',
- '''a = [await asyncio.sleep(0, x) async for x in arange(2)][1]''',
+ '''a = [await sleep(0, x) async for x in arange(2)][1]''',
# gh-121637: Make sure we correctly handle the case where the
# async code is optimized away
- '''assert not await asyncio.sleep(0); a = 1''',
+ '''assert not await sleep(0); a = 1''',
'''assert [x async for x in arange(1)]; a = 1''',
'''assert {x async for x in arange(1)}; a = 1''',
'''assert {x: x async for x in arange(1)}; a = 1''',
'''
if (a := 1) and __debug__:
- async with asyncio.Lock() as l:
+ async with Lock() as l:
pass
''',
'''
@@ -464,36 +472,31 @@ async def arange(n):
pass
''',
]
- policy = maybe_get_event_loop_policy()
- try:
- for mode, code_sample, optimize in product(modes, code_samples, optimizations):
- with self.subTest(mode=mode, code_sample=code_sample, optimize=optimize):
- source = dedent(code_sample)
- with self.assertRaises(
- SyntaxError, msg=f"source={source} mode={mode}"):
- compile(source, '?', mode, optimize=optimize)
-
- co = compile(source,
- '?',
- mode,
- flags=ast.PyCF_ALLOW_TOP_LEVEL_AWAIT,
- optimize=optimize)
-
- self.assertEqual(co.co_flags & CO_COROUTINE, CO_COROUTINE,
- msg=f"source={source} mode={mode}")
-
- # test we can create and advance a function type
- globals_ = {'asyncio': asyncio, 'a': 0, 'arange': arange}
- async_f = FunctionType(co, globals_)
- asyncio.run(async_f())
- self.assertEqual(globals_['a'], 1)
-
- # test we can await-eval,
- globals_ = {'asyncio': asyncio, 'a': 0, 'arange': arange}
- asyncio.run(eval(co, globals_))
- self.assertEqual(globals_['a'], 1)
- finally:
- asyncio._set_event_loop_policy(policy)
+ for mode, code_sample, optimize in product(modes, code_samples, optimizations):
+ with self.subTest(mode=mode, code_sample=code_sample, optimize=optimize):
+ source = dedent(code_sample)
+ with self.assertRaises(
+ SyntaxError, msg=f"source={source} mode={mode}"):
+ compile(source, '?', mode, optimize=optimize)
+
+ co = compile(source,
+ '?',
+ mode,
+ flags=ast.PyCF_ALLOW_TOP_LEVEL_AWAIT,
+ optimize=optimize)
+
+ self.assertEqual(co.co_flags & CO_COROUTINE, CO_COROUTINE,
+ msg=f"source={source} mode={mode}")
+
+ # test we can create and advance a function type
+ globals_ = {'Lock': Lock, 'a': 0, 'arange': arange, 'sleep': sleep}
+ run_yielding_async_fn(FunctionType(co, globals_))
+ self.assertEqual(globals_['a'], 1)
+
+ # test we can await-eval,
+ globals_ = {'Lock': Lock, 'a': 0, 'arange': arange, 'sleep': sleep}
+ run_yielding_async_fn(lambda: eval(co, globals_))
+ self.assertEqual(globals_['a'], 1)
def test_compile_top_level_await_invalid_cases(self):
# helper function just to check we can run top=level async-for
@@ -501,6 +504,13 @@ async def arange(n):
for i in range(n):
yield i
+ class Lock:
+ async def __aenter__(self):
+ return self
+
+ async def __aexit__(self, *exc_info):
+ pass
+
modes = ('single', 'exec')
code_samples = [
'''def f(): await arange(10)\n''',
@@ -511,27 +521,22 @@ async def arange(n):
a = 1
''',
'''def f():
- async with asyncio.Lock() as l:
+ async with Lock() as l:
a = 1
'''
]
- policy = maybe_get_event_loop_policy()
- try:
- for mode, code_sample in product(modes, code_samples):
- source = dedent(code_sample)
- with self.assertRaises(
- SyntaxError, msg=f"source={source} mode={mode}"):
- compile(source, '?', mode)
-
- with self.assertRaises(
- SyntaxError, msg=f"source={source} mode={mode}"):
- co = compile(source,
- '?',
- mode,
- flags=ast.PyCF_ALLOW_TOP_LEVEL_AWAIT)
- finally:
- asyncio._set_event_loop_policy(policy)
+ for mode, code_sample in product(modes, code_samples):
+ source = dedent(code_sample)
+ with self.assertRaises(
+ SyntaxError, msg=f"source={source} mode={mode}"):
+ compile(source, '?', mode)
+ with self.assertRaises(
+ SyntaxError, msg=f"source={source} mode={mode}"):
+ co = compile(source,
+ '?',
+ mode,
+ flags=ast.PyCF_ALLOW_TOP_LEVEL_AWAIT)
def test_compile_async_generator(self):
"""
@@ -542,7 +547,7 @@ def test_compile_async_generator(self):
code = dedent("""async def ticker():
for i in range(10):
yield i
- await asyncio.sleep(0)""")
+ await sleep(0)""")
co = compile(code, '?', 'exec', flags=ast.PyCF_ALLOW_TOP_LEVEL_AWAIT)
glob = {}
1
0
gh-126624: Expose error code ``XML_ERROR_NOT_STARTED`` of Expat >=2.6.4 (#126625)
by Eclips4 Jan. 2, 2025
by Eclips4 Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/8e48a6edc75ca67a34924bbe54463ca913…
commit: 8e48a6edc75ca67a34924bbe54463ca913ae6e58
branch: main
author: Sebastian Pipping <sebastian(a)pipping.org>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-02T14:54:38+02:00
summary:
gh-126624: Expose error code ``XML_ERROR_NOT_STARTED`` of Expat >=2.6.4 (#126625)
Expose error code ``XML_ERROR_NOT_STARTED`` in `xml.parsers.expat.errors` which was
introduced in Expat 2.6.4.
Co-authored-by: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
files:
A Misc/NEWS.d/next/Library/2024-11-09-15-59-51.gh-issue-126624.bN53Va.rst
M Doc/library/pyexpat.rst
M Modules/pyexpat.c
diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst
index c0e9999f4b1270..0f3b58ef6ea5af 100644
--- a/Doc/library/pyexpat.rst
+++ b/Doc/library/pyexpat.rst
@@ -941,6 +941,13 @@ The ``errors`` module has the following attributes:
has been breached.
+.. data:: XML_ERROR_NOT_STARTED
+
+ The parser was tried to be stopped or suspended before it started.
+
+ .. versionadded:: next
+
+
.. rubric:: Footnotes
.. [1] The encoding string included in XML output should conform to the
diff --git a/Misc/NEWS.d/next/Library/2024-11-09-15-59-51.gh-issue-126624.bN53Va.rst b/Misc/NEWS.d/next/Library/2024-11-09-15-59-51.gh-issue-126624.bN53Va.rst
new file mode 100644
index 00000000000000..468840a651c253
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-11-09-15-59-51.gh-issue-126624.bN53Va.rst
@@ -0,0 +1,2 @@
+Expose error code :data:`~xml.parsers.expat.errors.XML_ERROR_NOT_STARTED`
+of Expat >=2.6.4 in :mod:`xml.parsers.expat.errors`.
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index cf7714e7656205..9931ca2a8d4749 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1767,7 +1767,10 @@ struct ErrorInfo error_info_of[] = {
{"XML_ERROR_NO_BUFFER", "a successful prior call to function XML_GetBuffer is required"},
/* Added in 2.4.0. */
- {"XML_ERROR_AMPLIFICATION_LIMIT_BREACH", "limit on input amplification factor (from DTD and entities) breached"}
+ {"XML_ERROR_AMPLIFICATION_LIMIT_BREACH", "limit on input amplification factor (from DTD and entities) breached"},
+
+ /* Added in 2.6.4. */
+ {"XML_ERROR_NOT_STARTED", "parser not started"},
};
static int
1
0
gh-124130: Fix a bug in matching regular expression \B in empty string (GH-127007)
by serhiy-storchaka Jan. 2, 2025
by serhiy-storchaka Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/a3711d1541c1b7987941b41d2247f87dae…
commit: a3711d1541c1b7987941b41d2247f87dae347117
branch: main
author: Serhiy Storchaka <storchaka(a)gmail.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2025-01-02T12:11:21Z
summary:
gh-124130: Fix a bug in matching regular expression \B in empty string (GH-127007)
files:
A Misc/NEWS.d/next/Library/2024-11-19-10-46-57.gh-issue-124130.OZ_vR5.rst
M Doc/library/re.rst
M Doc/whatsnew/3.14.rst
M Lib/test/test_re.py
M Modules/_sre/sre_lib.h
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 9db6f1da3be4db..29387a429b844c 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -572,11 +572,8 @@ character ``'$'``.
Word boundaries are determined by the current locale
if the :py:const:`~re.LOCALE` flag is used.
- .. note::
-
- Note that ``\B`` does not match an empty string, which differs from
- RE implementations in other programming languages such as Perl.
- This behavior is kept for compatibility reasons.
+ .. versionchanged:: next
+ ``\B`` now matches empty input string.
.. index:: single: \d; in regular expressions
diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst
index 4b3f1b2e8eed42..61f5ffdb6c89d1 100644
--- a/Doc/whatsnew/3.14.rst
+++ b/Doc/whatsnew/3.14.rst
@@ -245,6 +245,10 @@ Other language changes
making it a :term:`generic type`.
(Contributed by Brian Schubert in :gh:`126012`.)
+* ``\B`` in :mod:`regular expression <re>` now matches empty input string.
+ Now it is always the opposite of ``\b``.
+ (Contributed by Serhiy Storchaka in :gh:`124130`.)
+
* iOS and macOS apps can now be configured to redirect ``stdout`` and
``stderr`` content to the system log. (Contributed by Russell Keith-Magee in
:gh:`127592`.)
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 0d3599be87f228..5538de60b2a03a 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -978,18 +978,15 @@ def test_word_boundaries(self):
self.assertIsNone(re.fullmatch(br".+\B", b"abc", re.LOCALE))
self.assertIsNone(re.fullmatch(r".+\B", "ьюя"))
self.assertTrue(re.fullmatch(r".+\B", "ьюя", re.ASCII))
- # However, an empty string contains no word boundaries, and also no
- # non-boundaries.
+ # However, an empty string contains no word boundaries.
self.assertIsNone(re.search(r"\b", ""))
self.assertIsNone(re.search(r"\b", "", re.ASCII))
self.assertIsNone(re.search(br"\b", b""))
self.assertIsNone(re.search(br"\b", b"", re.LOCALE))
- # This one is questionable and different from the perlre behaviour,
- # but describes current behavior.
- self.assertIsNone(re.search(r"\B", ""))
- self.assertIsNone(re.search(r"\B", "", re.ASCII))
- self.assertIsNone(re.search(br"\B", b""))
- self.assertIsNone(re.search(br"\B", b"", re.LOCALE))
+ self.assertTrue(re.search(r"\B", ""))
+ self.assertTrue(re.search(r"\B", "", re.ASCII))
+ self.assertTrue(re.search(br"\B", b""))
+ self.assertTrue(re.search(br"\B", b"", re.LOCALE))
# A single word-character string has two boundaries, but no
# non-boundary gaps.
self.assertEqual(len(re.findall(r"\b", "a")), 2)
diff --git a/Misc/NEWS.d/next/Library/2024-11-19-10-46-57.gh-issue-124130.OZ_vR5.rst b/Misc/NEWS.d/next/Library/2024-11-19-10-46-57.gh-issue-124130.OZ_vR5.rst
new file mode 100644
index 00000000000000..a1d4fc8ff4c22f
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-11-19-10-46-57.gh-issue-124130.OZ_vR5.rst
@@ -0,0 +1,4 @@
+Fix a bug in matching regular expression ``\B`` in empty input string.
+Now it is always the opposite of ``\b``.
+To get an old behavior, use ``(?!\A\Z)\B``.
+To get a new behavior in old Python versions, use ``(?!\b)``.
diff --git a/Modules/_sre/sre_lib.h b/Modules/_sre/sre_lib.h
index af4bfc56083bcb..df377905bfae0d 100644
--- a/Modules/_sre/sre_lib.h
+++ b/Modules/_sre/sre_lib.h
@@ -42,8 +42,6 @@ SRE(at)(SRE_STATE* state, const SRE_CHAR* ptr, SRE_CODE at)
return ((void*) ptr == state->end);
case SRE_AT_BOUNDARY:
- if (state->beginning == state->end)
- return 0;
thatp = ((void*) ptr > state->beginning) ?
SRE_IS_WORD((int) ptr[-1]) : 0;
thisp = ((void*) ptr < state->end) ?
@@ -51,8 +49,6 @@ SRE(at)(SRE_STATE* state, const SRE_CHAR* ptr, SRE_CODE at)
return thisp != thatp;
case SRE_AT_NON_BOUNDARY:
- if (state->beginning == state->end)
- return 0;
thatp = ((void*) ptr > state->beginning) ?
SRE_IS_WORD((int) ptr[-1]) : 0;
thisp = ((void*) ptr < state->end) ?
@@ -60,8 +56,6 @@ SRE(at)(SRE_STATE* state, const SRE_CHAR* ptr, SRE_CODE at)
return thisp == thatp;
case SRE_AT_LOC_BOUNDARY:
- if (state->beginning == state->end)
- return 0;
thatp = ((void*) ptr > state->beginning) ?
SRE_LOC_IS_WORD((int) ptr[-1]) : 0;
thisp = ((void*) ptr < state->end) ?
@@ -69,8 +63,6 @@ SRE(at)(SRE_STATE* state, const SRE_CHAR* ptr, SRE_CODE at)
return thisp != thatp;
case SRE_AT_LOC_NON_BOUNDARY:
- if (state->beginning == state->end)
- return 0;
thatp = ((void*) ptr > state->beginning) ?
SRE_LOC_IS_WORD((int) ptr[-1]) : 0;
thisp = ((void*) ptr < state->end) ?
@@ -78,8 +70,6 @@ SRE(at)(SRE_STATE* state, const SRE_CHAR* ptr, SRE_CODE at)
return thisp == thatp;
case SRE_AT_UNI_BOUNDARY:
- if (state->beginning == state->end)
- return 0;
thatp = ((void*) ptr > state->beginning) ?
SRE_UNI_IS_WORD((int) ptr[-1]) : 0;
thisp = ((void*) ptr < state->end) ?
@@ -87,8 +77,6 @@ SRE(at)(SRE_STATE* state, const SRE_CHAR* ptr, SRE_CODE at)
return thisp != thatp;
case SRE_AT_UNI_NON_BOUNDARY:
- if (state->beginning == state->end)
- return 0;
thatp = ((void*) ptr > state->beginning) ?
SRE_UNI_IS_WORD((int) ptr[-1]) : 0;
thisp = ((void*) ptr < state->end) ?
1
0
[3.13] gh-123925: Fix building curses on platforms without libncursesw (GH-128405) (GH-128407)
by serhiy-storchaka Jan. 2, 2025
by serhiy-storchaka Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/261a604a887d6b62724f9dd6f52f042940…
commit: 261a604a887d6b62724f9dd6f52f04294055db6f
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2025-01-02T12:01:40Z
summary:
[3.13] gh-123925: Fix building curses on platforms without libncursesw (GH-128405) (GH-128407)
(cherry picked from commit 8d16919a06a55a50756bf083221a6f6cab43de50)
Co-authored-by: Serhiy Storchaka <storchaka(a)gmail.com>
files:
A Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst
M Modules/_cursesmodule.c
diff --git a/Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst b/Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst
new file mode 100644
index 00000000000000..a2a9c6fc7680b5
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst
@@ -0,0 +1,2 @@
+Fix building the :mod:`curses` module on platforms with libncurses but
+without libncursesw.
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 55038cf09c2876..a7cbe81226eb19 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -137,7 +137,7 @@ typedef chtype attr_t; /* No attr_t type is available */
#define STRICT_SYSV_CURSES
#endif
-#if NCURSES_EXT_FUNCS+0 >= 20170401 && NCURSES_EXT_COLORS+0 >= 20170401
+#if defined(HAVE_NCURSESW) && NCURSES_EXT_FUNCS+0 >= 20170401 && NCURSES_EXT_COLORS+0 >= 20170401
#define _NCURSES_EXTENDED_COLOR_FUNCS 1
#else
#define _NCURSES_EXTENDED_COLOR_FUNCS 0
1
0
[3.12] gh-123925: Fix building curses on platforms without libncursesw (GH-128405) (GH-128408)
by serhiy-storchaka Jan. 2, 2025
by serhiy-storchaka Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/84c884349002702f56999d1457055347a7…
commit: 84c884349002702f56999d1457055347a7cb8a9a
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2025-01-02T11:54:43Z
summary:
[3.12] gh-123925: Fix building curses on platforms without libncursesw (GH-128405) (GH-128408)
(cherry picked from commit 8d16919a06a55a50756bf083221a6f6cab43de50)
Co-authored-by: Serhiy Storchaka <storchaka(a)gmail.com>
files:
A Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst
M Modules/_cursesmodule.c
diff --git a/Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst b/Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst
new file mode 100644
index 00000000000000..a2a9c6fc7680b5
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst
@@ -0,0 +1,2 @@
+Fix building the :mod:`curses` module on platforms with libncurses but
+without libncursesw.
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index b099959ea409b6..3fc7f88c61ede4 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -139,7 +139,7 @@ typedef chtype attr_t; /* No attr_t type is available */
#define STRICT_SYSV_CURSES
#endif
-#if NCURSES_EXT_FUNCS+0 >= 20170401 && NCURSES_EXT_COLORS+0 >= 20170401
+#if defined(HAVE_NCURSESW) && NCURSES_EXT_FUNCS+0 >= 20170401 && NCURSES_EXT_COLORS+0 >= 20170401
#define _NCURSES_EXTENDED_COLOR_FUNCS 1
#else
#define _NCURSES_EXTENDED_COLOR_FUNCS 0
1
0
gh-123925: Fix building curses on platforms without libncursesw (GH-128405)
by serhiy-storchaka Jan. 2, 2025
by serhiy-storchaka Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/8d16919a06a55a50756bf083221a6f6cab…
commit: 8d16919a06a55a50756bf083221a6f6cab43de50
branch: main
author: Serhiy Storchaka <storchaka(a)gmail.com>
committer: serhiy-storchaka <storchaka(a)gmail.com>
date: 2025-01-02T13:38:21+02:00
summary:
gh-123925: Fix building curses on platforms without libncursesw (GH-128405)
files:
A Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst
M Modules/_cursesmodule.c
diff --git a/Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst b/Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst
new file mode 100644
index 00000000000000..a2a9c6fc7680b5
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2025-01-02-11-02-45.gh-issue-123925.TLlyUi.rst
@@ -0,0 +1,2 @@
+Fix building the :mod:`curses` module on platforms with libncurses but
+without libncursesw.
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 040ffa81153ebe..92961af381b9cb 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -138,7 +138,7 @@ typedef chtype attr_t; /* No attr_t type is available */
#define STRICT_SYSV_CURSES
#endif
-#if NCURSES_EXT_FUNCS+0 >= 20170401 && NCURSES_EXT_COLORS+0 >= 20170401
+#if defined(HAVE_NCURSESW) && NCURSES_EXT_FUNCS+0 >= 20170401 && NCURSES_EXT_COLORS+0 >= 20170401
#define _NCURSES_EXTENDED_COLOR_FUNCS 1
#else
#define _NCURSES_EXTENDED_COLOR_FUNCS 0
1
0
gh-95371: Add support for other image formats(e.g. PNG) to the turtle… (#95378)
by hugovk Jan. 2, 2025
by hugovk Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/e1baa778f602ede66831eb34b9ef17f21e…
commit: e1baa778f602ede66831eb34b9ef17f21e4d4347
branch: main
author: Shin-myoung-serp <relent95(a)naver.com>
committer: hugovk <1324225+hugovk(a)users.noreply.github.com>
date: 2025-01-02T11:45:07+02:00
summary:
gh-95371: Add support for other image formats(e.g. PNG) to the turtle… (#95378)
Co-authored-by: Hugo van Kemenade <1324225+hugovk(a)users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot](a)users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg(a)arhadthedev.net>
files:
A Misc/NEWS.d/next/Library/2022-07-28-12-32-59.gh-issue-95371.F24IFC.rst
M Doc/library/turtle.rst
M Lib/turtle.py
diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst
index 8eb4f8271fcfae..512647f5f6e01f 100644
--- a/Doc/library/turtle.rst
+++ b/Doc/library/turtle.rst
@@ -1823,7 +1823,8 @@ Window control
.. function:: bgpic(picname=None)
- :param picname: a string, name of a gif-file or ``"nopic"``, or ``None``
+ :param picname: a string, name of an image file (PNG, GIF, PGM, and PPM)
+ or ``"nopic"``, or ``None``
Set background image or return name of current backgroundimage. If *picname*
is a filename, set the corresponding image as background. If *picname* is
@@ -2200,9 +2201,9 @@ Settings and special methods
.. function:: register_shape(name, shape=None)
addshape(name, shape=None)
- There are three different ways to call this function:
+ There are four different ways to call this function:
- (1) *name* is the name of a gif-file and *shape* is ``None``: Install the
+ (1) *name* is the name of an image file (PNG, GIF, PGM, and PPM) and *shape* is ``None``: Install the
corresponding image shape. ::
>>> screen.register_shape("turtle.gif")
@@ -2211,7 +2212,16 @@ Settings and special methods
Image shapes *do not* rotate when turning the turtle, so they do not
display the heading of the turtle!
- (2) *name* is an arbitrary string and *shape* is a tuple of pairs of
+ (2) *name* is an arbitrary string and *shape* is the name of an image file (PNG, GIF, PGM, and PPM): Install the
+ corresponding image shape. ::
+
+ >>> screen.register_shape("turtle", "turtle.gif")
+
+ .. note::
+ Image shapes *do not* rotate when turning the turtle, so they do not
+ display the heading of the turtle!
+
+ (3) *name* is an arbitrary string and *shape* is a tuple of pairs of
coordinates: Install the corresponding polygon shape.
.. doctest::
@@ -2219,12 +2229,16 @@ Settings and special methods
>>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3)))
- (3) *name* is an arbitrary string and *shape* is a (compound) :class:`Shape`
+ (4) *name* is an arbitrary string and *shape* is a (compound) :class:`Shape`
object: Install the corresponding compound shape.
Add a turtle shape to TurtleScreen's shapelist. Only thusly registered
shapes can be used by issuing the command ``shape(shapename)``.
+ .. versionchanged:: next
+ Added support for PNG, PGM, and PPM image formats.
+ Both a shape name and an image file name can be specified.
+
.. function:: turtles()
diff --git a/Lib/turtle.py b/Lib/turtle.py
index 8a5801f2efe625..1320cfd93fd6db 100644
--- a/Lib/turtle.py
+++ b/Lib/turtle.py
@@ -51,7 +51,7 @@
turtle. So the turtles can more easily be used as a visual feedback
instrument by the (beginning) programmer.
-- Different turtle shapes, gif-images as turtle shapes, user defined
+- Different turtle shapes, image files as turtle shapes, user defined
and user controllable turtle shapes, among them compound
(multicolored) shapes. Turtle shapes can be stretched and tilted, which
makes turtles very versatile geometrical objects.
@@ -468,7 +468,7 @@ def _blankimage(self):
def _image(self, filename):
"""return an image object containing the
- imagedata from a gif-file named filename.
+ imagedata from an image file named filename.
"""
return TK.PhotoImage(file=filename, master=self.cv)
@@ -872,10 +872,7 @@ def __init__(self, type_, data=None):
if isinstance(data, list):
data = tuple(data)
elif type_ == "image":
- if isinstance(data, str):
- if data.lower().endswith(".gif") and isfile(data):
- data = TurtleScreen._image(data)
- # else data assumed to be PhotoImage
+ assert(isinstance(data, TK.PhotoImage))
elif type_ == "compound":
data = []
else:
@@ -1100,14 +1097,18 @@ def register_shape(self, name, shape=None):
"""Adds a turtle shape to TurtleScreen's shapelist.
Arguments:
- (1) name is the name of a gif-file and shape is None.
+ (1) name is the name of an image file (PNG, GIF, PGM, and PPM) and shape is None.
Installs the corresponding image shape.
!! Image-shapes DO NOT rotate when turning the turtle,
!! so they do not display the heading of the turtle!
- (2) name is an arbitrary string and shape is a tuple
+ (2) name is an arbitrary string and shape is the name of an image file (PNG, GIF, PGM, and PPM).
+ Installs the corresponding image shape.
+ !! Image-shapes DO NOT rotate when turning the turtle,
+ !! so they do not display the heading of the turtle!
+ (3) name is an arbitrary string and shape is a tuple
of pairs of coordinates. Installs the corresponding
polygon shape
- (3) name is an arbitrary string and shape is a
+ (4) name is an arbitrary string and shape is a
(compound) Shape object. Installs the corresponding
compound shape.
To use a shape, you have to issue the command shape(shapename).
@@ -1120,12 +1121,9 @@ def register_shape(self, name, shape=None):
"""
if shape is None:
- # image
- if name.lower().endswith(".gif"):
- shape = Shape("image", self._image(name))
- else:
- raise TurtleGraphicsError("Bad arguments for register_shape.\n"
- + "Use help(register_shape)" )
+ shape = Shape("image", self._image(name))
+ elif isinstance(shape, str):
+ shape = Shape("image", self._image(shape))
elif isinstance(shape, tuple):
shape = Shape("polygon", shape)
## else shape assumed to be Shape-instance
@@ -1454,7 +1452,7 @@ def bgpic(self, picname=None):
"""Set background image or return name of current backgroundimage.
Optional argument:
- picname -- a string, name of a gif-file or "nopic".
+ picname -- a string, name of an image file (PNG, GIF, PGM, and PPM) or "nopic".
If picname is a filename, set the corresponding image as background.
If picname is "nopic", delete backgroundimage, if present.
diff --git a/Misc/NEWS.d/next/Library/2022-07-28-12-32-59.gh-issue-95371.F24IFC.rst b/Misc/NEWS.d/next/Library/2022-07-28-12-32-59.gh-issue-95371.F24IFC.rst
new file mode 100644
index 00000000000000..4a62aaed78b425
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-07-28-12-32-59.gh-issue-95371.F24IFC.rst
@@ -0,0 +1 @@
+Added support for other image formats (PNG, PGM, and PPM) to the turtle module. Patch by Shin-myoung-serp.
1
0
[3.12] gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379) (#128402)
by Eclips4 Jan. 2, 2025
by Eclips4 Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/487caa95796651bc99bccc77fc42e4e5e7…
commit: 487caa95796651bc99bccc77fc42e4e5e7a8ae2b
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-02T07:30:39Z
summary:
[3.12] gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379) (#128402)
gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379)
(cherry picked from commit 60c65184695a3eab766b3bc26fc99f695deb998f)
Co-authored-by: abkmystery <36216019+abkmystery(a)users.noreply.github.com>
files:
M Doc/library/decimal.rst
M Doc/whatsnew/3.3.rst
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index c5544f6216fd7b..2ce4c913ff4364 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -1016,7 +1016,7 @@ New contexts can also be created using the :class:`Context` constructor
described below. In addition, the module provides three pre-made contexts:
-.. class:: BasicContext
+.. data:: BasicContext
This is a standard context defined by the General Decimal Arithmetic
Specification. Precision is set to nine. Rounding is set to
@@ -1027,7 +1027,7 @@ described below. In addition, the module provides three pre-made contexts:
Because many of the traps are enabled, this context is useful for debugging.
-.. class:: ExtendedContext
+.. data:: ExtendedContext
This is a standard context defined by the General Decimal Arithmetic
Specification. Precision is set to nine. Rounding is set to
@@ -1040,7 +1040,7 @@ described below. In addition, the module provides three pre-made contexts:
presence of conditions that would otherwise halt the program.
-.. class:: DefaultContext
+.. data:: DefaultContext
This context is used by the :class:`Context` constructor as a prototype for new
contexts. Changing a field (such a precision) has the effect of changing the
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
index 92656090885737..f386e05db3696a 100644
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -1147,8 +1147,8 @@ API changes
| :const:`MIN_EMIN` | ``-425000000`` | ``-999999999999999999`` |
+-------------------+----------------+-------------------------+
-* In the context templates (:class:`~decimal.DefaultContext`,
- :class:`~decimal.BasicContext` and :class:`~decimal.ExtendedContext`)
+* In the context templates (:const:`~decimal.DefaultContext`,
+ :const:`~decimal.BasicContext` and :const:`~decimal.ExtendedContext`)
the magnitude of :attr:`~decimal.Context.Emax` and
:attr:`~decimal.Context.Emin` has changed to ``999999``.
1
0
[3.13] gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379) (#128401)
by Eclips4 Jan. 2, 2025
by Eclips4 Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/48d50fd4918d9236cf0bc88fb318e560f5…
commit: 48d50fd4918d9236cf0bc88fb318e560f5a4e3d8
branch: 3.13
author: Miss Islington (bot) <31488909+miss-islington(a)users.noreply.github.com>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-02T07:28:12Z
summary:
[3.13] gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379) (#128401)
gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379)
(cherry picked from commit 60c65184695a3eab766b3bc26fc99f695deb998f)
Co-authored-by: abkmystery <36216019+abkmystery(a)users.noreply.github.com>
files:
M Doc/library/decimal.rst
M Doc/whatsnew/3.3.rst
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index 916f17cadfaa7e..f1bd3e8f371ee2 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -1016,7 +1016,7 @@ New contexts can also be created using the :class:`Context` constructor
described below. In addition, the module provides three pre-made contexts:
-.. class:: BasicContext
+.. data:: BasicContext
This is a standard context defined by the General Decimal Arithmetic
Specification. Precision is set to nine. Rounding is set to
@@ -1027,7 +1027,7 @@ described below. In addition, the module provides three pre-made contexts:
Because many of the traps are enabled, this context is useful for debugging.
-.. class:: ExtendedContext
+.. data:: ExtendedContext
This is a standard context defined by the General Decimal Arithmetic
Specification. Precision is set to nine. Rounding is set to
@@ -1040,7 +1040,7 @@ described below. In addition, the module provides three pre-made contexts:
presence of conditions that would otherwise halt the program.
-.. class:: DefaultContext
+.. data:: DefaultContext
This context is used by the :class:`Context` constructor as a prototype for new
contexts. Changing a field (such a precision) has the effect of changing the
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
index f814c4e90d5719..7a8eb47cbdb354 100644
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -1147,8 +1147,8 @@ API changes
| :const:`MIN_EMIN` | ``-425000000`` | ``-999999999999999999`` |
+-------------------+----------------+-------------------------+
-* In the context templates (:class:`~decimal.DefaultContext`,
- :class:`~decimal.BasicContext` and :class:`~decimal.ExtendedContext`)
+* In the context templates (:const:`~decimal.DefaultContext`,
+ :const:`~decimal.BasicContext` and :const:`~decimal.ExtendedContext`)
the magnitude of :attr:`~decimal.Context.Emax` and
:attr:`~decimal.Context.Emin` has changed to ``999999``.
1
0
gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (#128379)
by Eclips4 Jan. 2, 2025
by Eclips4 Jan. 2, 2025
Jan. 2, 2025
https://github.com/python/cpython/commit/60c65184695a3eab766b3bc26fc99f695d…
commit: 60c65184695a3eab766b3bc26fc99f695deb998f
branch: main
author: abkmystery <36216019+abkmystery(a)users.noreply.github.com>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-02T09:20:31+02:00
summary:
gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (#128379)
files:
M Doc/library/decimal.rst
M Doc/whatsnew/3.3.rst
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index c9a3e448cad063..185eaf3f721c72 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -1033,7 +1033,7 @@ New contexts can also be created using the :class:`Context` constructor
described below. In addition, the module provides three pre-made contexts:
-.. class:: BasicContext
+.. data:: BasicContext
This is a standard context defined by the General Decimal Arithmetic
Specification. Precision is set to nine. Rounding is set to
@@ -1044,7 +1044,7 @@ described below. In addition, the module provides three pre-made contexts:
Because many of the traps are enabled, this context is useful for debugging.
-.. class:: ExtendedContext
+.. data:: ExtendedContext
This is a standard context defined by the General Decimal Arithmetic
Specification. Precision is set to nine. Rounding is set to
@@ -1057,7 +1057,7 @@ described below. In addition, the module provides three pre-made contexts:
presence of conditions that would otherwise halt the program.
-.. class:: DefaultContext
+.. data:: DefaultContext
This context is used by the :class:`Context` constructor as a prototype for new
contexts. Changing a field (such a precision) has the effect of changing the
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
index f814c4e90d5719..7a8eb47cbdb354 100644
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -1147,8 +1147,8 @@ API changes
| :const:`MIN_EMIN` | ``-425000000`` | ``-999999999999999999`` |
+-------------------+----------------+-------------------------+
-* In the context templates (:class:`~decimal.DefaultContext`,
- :class:`~decimal.BasicContext` and :class:`~decimal.ExtendedContext`)
+* In the context templates (:const:`~decimal.DefaultContext`,
+ :const:`~decimal.BasicContext` and :const:`~decimal.ExtendedContext`)
the magnitude of :attr:`~decimal.Context.Emax` and
:attr:`~decimal.Context.Emin` has changed to ``999999``.
1
0
gh-126469: remove unnecessary error-checking branch in `lexer.c` (#126473)
by pablogsal Jan. 1, 2025
by pablogsal Jan. 1, 2025
Jan. 1, 2025
https://github.com/python/cpython/commit/c810ed7c8e0a7464d19700ba1c8668a406…
commit: c810ed7c8e0a7464d19700ba1c8668a406f1c042
branch: main
author: qqwqqw689 <114795525+qqwqqw689(a)users.noreply.github.com>
committer: pablogsal <Pablogsal(a)gmail.com>
date: 2025-01-01T22:11:29Z
summary:
gh-126469: remove unnecessary error-checking branch in `lexer.c` (#126473)
files:
M Parser/lexer/lexer.c
diff --git a/Parser/lexer/lexer.c b/Parser/lexer/lexer.c
index 8c868593f944c8..dbbb94a407c81d 100644
--- a/Parser/lexer/lexer.c
+++ b/Parser/lexer/lexer.c
@@ -329,11 +329,7 @@ verify_identifier(struct tok_state *tok)
return 0;
}
Py_ssize_t invalid = _PyUnicode_ScanIdentifier(s);
- if (invalid < 0) {
- Py_DECREF(s);
- tok->done = E_ERROR;
- return 0;
- }
+ assert(invalid >= 0);
assert(PyUnicode_GET_LENGTH(s) > 0);
if (invalid < PyUnicode_GET_LENGTH(s)) {
Py_UCS4 ch = PyUnicode_READ_CHAR(s, invalid);
1
0
Jan. 1, 2025
https://github.com/python/cpython/commit/a327810169982e3782bdefc2247789a71a…
commit: a327810169982e3782bdefc2247789a71aa79b43
branch: main
author: RUANG (James Roy) <rruuaanng(a)outlook.com>
committer: pablogsal <Pablogsal(a)gmail.com>
date: 2025-01-01T20:39:28Z
summary:
Fix while statements with non-bool conditions in `_pyrepl` (#127509)
Fix non-bool value conditions
files:
M Lib/_pyrepl/simple_interact.py
M Lib/_pyrepl/unix_console.py
diff --git a/Lib/_pyrepl/simple_interact.py b/Lib/_pyrepl/simple_interact.py
index 342a4b58bfd0f3..a5033496712a73 100644
--- a/Lib/_pyrepl/simple_interact.py
+++ b/Lib/_pyrepl/simple_interact.py
@@ -138,7 +138,7 @@ def maybe_run_command(statement: str) -> bool:
return False
- while 1:
+ while True:
try:
try:
sys.stdout.flush()
diff --git a/Lib/_pyrepl/unix_console.py b/Lib/_pyrepl/unix_console.py
index 2576b938a34c64..63e8fc24dd7625 100644
--- a/Lib/_pyrepl/unix_console.py
+++ b/Lib/_pyrepl/unix_console.py
@@ -786,7 +786,7 @@ def __tputs(self, fmt, prog=delayprog):
# only if the bps is actually needed (which I'm
# betting is pretty unlkely)
bps = ratedict.get(self.__svtermstate.ospeed)
- while 1:
+ while True:
m = prog.search(fmt)
if not m:
os.write(self.output_fd, fmt)
1
0
gh-128277: remove unnecessary critical section from `socket.close` (#128305)
by kumaraditya303 Jan. 1, 2025
by kumaraditya303 Jan. 1, 2025
Jan. 1, 2025
https://github.com/python/cpython/commit/bb9d955e16c5578bdbc72750fbbffc8313…
commit: bb9d955e16c5578bdbc72750fbbffc8313559109
branch: main
author: Kumar Aditya <kumaraditya(a)python.org>
committer: kumaraditya303 <kumaraditya(a)python.org>
date: 2025-01-01T18:00:47+05:30
summary:
gh-128277: remove unnecessary critical section from `socket.close` (#128305)
Remove unnecessary critical section from `socket.close` as it now uses relaxed atomics for `sock_fd`.
files:
M Lib/test/test_socket.py
M Modules/clinic/socketmodule.c.h
M Modules/socketmodule.c
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index aac213e36aecf0..faf326d9164e1b 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -7075,6 +7075,26 @@ def close_fds(fds):
self.assertEqual(data, str(index).encode())
+class FreeThreadingTests(unittest.TestCase):
+
+ def test_close_detach_race(self):
+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+
+ def close():
+ for _ in range(1000):
+ s.close()
+
+ def detach():
+ for _ in range(1000):
+ s.detach()
+
+ t1 = threading.Thread(target=close)
+ t2 = threading.Thread(target=detach)
+
+ with threading_helper.start_threads([t1, t2]):
+ pass
+
+
def setUpModule():
thread_info = threading_helper.threading_setup()
unittest.addModuleCleanup(threading_helper.threading_cleanup, *thread_info)
diff --git a/Modules/clinic/socketmodule.c.h b/Modules/clinic/socketmodule.c.h
index db1a28b86c8773..2152f288a9722f 100644
--- a/Modules/clinic/socketmodule.c.h
+++ b/Modules/clinic/socketmodule.c.h
@@ -6,7 +6,6 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
-#include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION()
#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(_socket_socket_close__doc__,
@@ -26,13 +25,7 @@ _socket_socket_close_impl(PySocketSockObject *s);
static PyObject *
_socket_socket_close(PySocketSockObject *s, PyObject *Py_UNUSED(ignored))
{
- PyObject *return_value = NULL;
-
- Py_BEGIN_CRITICAL_SECTION(s);
- return_value = _socket_socket_close_impl(s);
- Py_END_CRITICAL_SECTION();
-
- return return_value;
+ return _socket_socket_close_impl(s);
}
static int
@@ -287,4 +280,4 @@ _socket_socket_if_nametoindex(PySocketSockObject *self, PyObject *arg)
#ifndef _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF
#define _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF
#endif /* !defined(_SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF) */
-/*[clinic end generated code: output=59c36bb31b05de68 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=3e612e8df1c322dd input=a9049054013a1b77]*/
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index efc8be3ab592ba..e70aa304f2f3a3 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3386,7 +3386,6 @@ sockets the address is a tuple (ifname, proto [,pkttype [,hatype [,addr]]])");
will surely fail. */
/*[clinic input]
-@critical_section
_socket.socket.close
self as s: self(type="PySocketSockObject *")
@@ -3397,7 +3396,7 @@ Close the socket. It cannot be used after this call.
static PyObject *
_socket_socket_close_impl(PySocketSockObject *s)
-/*[clinic end generated code: output=038b2418e07f6f6c input=9839a261e05bcb97]*/
+/*[clinic end generated code: output=038b2418e07f6f6c input=dc487e470e55a83c]*/
{
SOCKET_T fd;
int res;
1
0
gh-121676: Raise a ``DeprecationWarning`` if the Python implementation of ``functools.reduce`` is called with `function` or `sequence` as a keyword args (#121677)
by Eclips4 Jan. 1, 2025
by Eclips4 Jan. 1, 2025
Jan. 1, 2025
https://github.com/python/cpython/commit/d903b17499b1a3bfb3ea848f6a1b6da02e…
commit: d903b17499b1a3bfb3ea848f6a1b6da02eac3328
branch: main
author: Kirill Podoprigora <kirill.bast9(a)mail.ru>
committer: Eclips4 <kirill.bast9(a)mail.ru>
date: 2025-01-01T13:36:47+02:00
summary:
gh-121676: Raise a ``DeprecationWarning`` if the Python implementation of ``functools.reduce`` is called with `function` or `sequence` as a keyword args (#121677)
Python implementation of `functools` allows calling `reduce`
with `function` or `sequence` as keyword args. This doesn't
match behavior of our C accelerator and our documentation
for `functools.reduce` states that `function`and `sequence`
are positional-only arguments.
Now calling a Python implementation of `functools.reduce`
with `function` or `sequence` as keyword args would raise
a `DeprecationWarning` and is planned to be prohibited in
Python 3.16.
Co-authored-by: Victor Stinner <vstinner(a)python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz(a)users.noreply.github.com>
files:
A Misc/NEWS.d/next/Library/2024-07-13-13-25-31.gh-issue-121676.KDLS11.rst
M Doc/deprecations/pending-removal-in-3.16.rst
M Doc/whatsnew/3.14.rst
M Lib/functools.py
M Lib/test/test_functools.py
diff --git a/Doc/deprecations/pending-removal-in-3.16.rst b/Doc/deprecations/pending-removal-in-3.16.rst
index f2b818f14c63cd..d093deb648baf7 100644
--- a/Doc/deprecations/pending-removal-in-3.16.rst
+++ b/Doc/deprecations/pending-removal-in-3.16.rst
@@ -79,3 +79,8 @@ Pending removal in Python 3.16
* The undocumented and unused :attr:`!TarFile.tarfile` attribute
has been deprecated since Python 3.13.
+
+* :mod:`functools`:
+
+ * Calling the Python implementation of :func:`functools.reduce` with *function*
+ or *sequence* as keyword arguments has been deprecated since Python 3.14.
diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst
index 63fa21e17bc834..4b3f1b2e8eed42 100644
--- a/Doc/whatsnew/3.14.rst
+++ b/Doc/whatsnew/3.14.rst
@@ -744,6 +744,11 @@ Deprecated
as a single positional argument.
(Contributed by Serhiy Storchaka in :gh:`109218`.)
+* :mod:`functools`:
+ Calling the Python implementation of :func:`functools.reduce` with *function*
+ or *sequence* as keyword arguments is now deprecated.
+ (Contributed by Kirill Podoprigora in :gh:`121676`.)
+
* :mod:`os`:
:term:`Soft deprecate <soft deprecated>` :func:`os.popen` and
:func:`os.spawn* <os.spawnl>` functions. They should no longer be used to
diff --git a/Lib/functools.py b/Lib/functools.py
index 786b8aedfd77f5..fd33f0ae479ddc 100644
--- a/Lib/functools.py
+++ b/Lib/functools.py
@@ -264,11 +264,6 @@ def reduce(function, sequence, initial=_initial_missing):
return value
-try:
- from _functools import reduce
-except ImportError:
- pass
-
################################################################################
### partial() argument application
@@ -1124,3 +1119,31 @@ def __get__(self, instance, owner=None):
return val
__class_getitem__ = classmethod(GenericAlias)
+
+def _warn_python_reduce_kwargs(py_reduce):
+ @wraps(py_reduce)
+ def wrapper(*args, **kwargs):
+ if 'function' in kwargs or 'sequence' in kwargs:
+ import os
+ import warnings
+ warnings.warn(
+ 'Calling functools.reduce with keyword arguments '
+ '"function" or "sequence" '
+ 'is deprecated in Python 3.14 and will be '
+ 'forbidden in Python 3.16.',
+ DeprecationWarning,
+ skip_file_prefixes=(os.path.dirname(__file__),))
+ return py_reduce(*args, **kwargs)
+ return wrapper
+
+reduce = _warn_python_reduce_kwargs(reduce)
+del _warn_python_reduce_kwargs
+
+# The import of the C accelerated version of reduce() has been moved
+# here due to gh-121676. In Python 3.16, _warn_python_reduce_kwargs()
+# should be removed and the import block should be moved back right
+# after the definition of reduce().
+try:
+ from _functools import reduce
+except ImportError:
+ pass
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index 4a0252cb637a52..32224866082824 100644
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -1045,6 +1045,12 @@ class TestReduceC(TestReduce, unittest.TestCase):
class TestReducePy(TestReduce, unittest.TestCase):
reduce = staticmethod(py_functools.reduce)
+ def test_reduce_with_kwargs(self):
+ with self.assertWarns(DeprecationWarning):
+ self.reduce(function=lambda x, y: x + y, sequence=[1, 2, 3, 4, 5], initial=1)
+ with self.assertWarns(DeprecationWarning):
+ self.reduce(lambda x, y: x + y, sequence=[1, 2, 3, 4, 5], initial=1)
+
class TestCmpToKey:
diff --git a/Misc/NEWS.d/next/Library/2024-07-13-13-25-31.gh-issue-121676.KDLS11.rst b/Misc/NEWS.d/next/Library/2024-07-13-13-25-31.gh-issue-121676.KDLS11.rst
new file mode 100644
index 00000000000000..be589b727a1968
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-07-13-13-25-31.gh-issue-121676.KDLS11.rst
@@ -0,0 +1,3 @@
+Deprecate calling the Python implementation of :meth:`functools.reduce`
+with a ``function`` or ``sequence`` as a :term:`keyword argument`.
+This will be forbidden in Python 3.16 in order to match the C implementation.
1
0