]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.9] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30915)
authorChristian Heimes <christian@python.org>
Wed, 26 Jan 2022 11:20:39 +0000 (13:20 +0200)
committerGitHub <noreply@github.com>
Wed, 26 Jan 2022 11:20:39 +0000 (12:20 +0100)
Co-authored-by: Christian Heimes <christian@python.org>
Misc/NEWS.d/next/Build/2022-01-25-12-32-37.bpo-46513.mPm9B4.rst [new file with mode: 0644]
Modules/audioop.c
configure
configure.ac
pyconfig.h.in

diff --git a/Misc/NEWS.d/next/Build/2022-01-25-12-32-37.bpo-46513.mPm9B4.rst b/Misc/NEWS.d/next/Build/2022-01-25-12-32-37.bpo-46513.mPm9B4.rst
new file mode 100644 (file)
index 0000000..b8986ae
--- /dev/null
@@ -0,0 +1,2 @@
+:program:`configure` no longer uses ``AC_C_CHAR_UNSIGNED`` macro and
+``pyconfig.h`` no longer defines reserved symbol ``__CHAR_UNSIGNED__``.
index 3aeb6f04f13cbb6b2e40b058d835676bbc08d9f5..2a5d805c053c7d5565cbaefb564b441eeab173e7 100644 (file)
@@ -5,13 +5,6 @@
 
 #include "Python.h"
 
-#if defined(__CHAR_UNSIGNED__)
-#if defined(signed)
-/* This module currently does not work on systems where only unsigned
-   characters are available.  Take it out of Setup.  Sorry. */
-#endif
-#endif
-
 static const int maxvals[] = {0, 0x7F, 0x7FFF, 0x7FFFFF, 0x7FFFFFFF};
 /* -1 trick is needed on Windows to support -0x80000000 without a warning */
 static const int minvals[] = {0, -0x80, -0x8000, -0x800000, -0x7FFFFFFF-1};
index d078887b2f4856c739daf34db84732d07d62f9c4..5232ce64b27fd0c6b33a0fd61cce8c35266a1857 100755 (executable)
--- a/configure
+++ b/configure
 
 # checks for compiler characteristics
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
-$as_echo_n "checking whether char is unsigned... " >&6; }
-if ${ac_cv_c_char_unsigned+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((char) -1) < 0)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_char_unsigned=no
-else
-  ac_cv_c_char_unsigned=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
-$as_echo "$ac_cv_c_char_unsigned" >&6; }
-if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
-  $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
-
-fi
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 if ${ac_cv_c_const+:} false; then :
index 431d66197bc7ffd1652be7f06c62d47b703a777f..754621844b1ed10e15be7ae2f49d5a195b744cd9 100644 (file)
@@ -4309,7 +4309,6 @@ fi
 
 # checks for compiler characteristics
 
-AC_C_CHAR_UNSIGNED
 AC_C_CONST
 
 works=no
index 188faeeb1202076b17b1cbf05008308799090e90..b7bfc2541f8bae6dab65e6d232cb5430342eeddf 100644 (file)
 /* Define on FreeBSD to activate all library features */
 #undef __BSD_VISIBLE
 
-/* Define to 1 if type `char' is unsigned and you are not using gcc.  */
-#ifndef __CHAR_UNSIGNED__
-# undef __CHAR_UNSIGNED__
-#endif
-
 /* Define to 'long' if <time.h> doesn't define. */
 #undef clock_t