Skip to content

Commit 4371fbd

Browse files
authored
[3.10] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) (GH-30914)
Co-authored-by: Christian Heimes <[email protected]>
1 parent c730342 commit 4371fbd

File tree

5 files changed

+2
-46
lines changed

5 files changed

+2
-46
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:program:`configure` no longer uses ``AC_C_CHAR_UNSIGNED`` macro and
2+
``pyconfig.h`` no longer defines reserved symbol ``__CHAR_UNSIGNED__``.

Modules/audioop.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55

66
#include "Python.h"
77

8-
#if defined(__CHAR_UNSIGNED__)
9-
#if defined(signed)
10-
/* This module currently does not work on systems where only unsigned
11-
characters are available. Take it out of Setup. Sorry. */
12-
#endif
13-
#endif
14-
158
static const int maxvals[] = {0, 0x7F, 0x7FFF, 0x7FFFFF, 0x7FFFFFFF};
169
/* -1 trick is needed on Windows to support -0x80000000 without a warning */
1710
static const int minvals[] = {0, -0x80, -0x8000, -0x800000, -0x7FFFFFFF-1};

configure

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14183,39 +14183,6 @@ fi
1418314183

1418414184
# checks for compiler characteristics
1418514185

14186-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
14187-
$as_echo_n "checking whether char is unsigned... " >&6; }
14188-
if ${ac_cv_c_char_unsigned+:} false; then :
14189-
$as_echo_n "(cached) " >&6
14190-
else
14191-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14192-
/* end confdefs.h. */
14193-
$ac_includes_default
14194-
int
14195-
main ()
14196-
{
14197-
static int test_array [1 - 2 * !(((char) -1) < 0)];
14198-
test_array [0] = 0;
14199-
return test_array [0];
14200-
14201-
;
14202-
return 0;
14203-
}
14204-
_ACEOF
14205-
if ac_fn_c_try_compile "$LINENO"; then :
14206-
ac_cv_c_char_unsigned=no
14207-
else
14208-
ac_cv_c_char_unsigned=yes
14209-
fi
14210-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14211-
fi
14212-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14213-
$as_echo "$ac_cv_c_char_unsigned" >&6; }
14214-
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
14215-
$as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
14216-
14217-
fi
14218-
1421914186
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
1422014187
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
1422114188
if ${ac_cv_c_const+:} false; then :

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4322,7 +4322,6 @@ fi
43224322

43234323
# checks for compiler characteristics
43244324

4325-
AC_C_CHAR_UNSIGNED
43264325
AC_C_CONST
43274326

43284327
works=no

pyconfig.h.in

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,11 +1656,6 @@
16561656
/* Define on FreeBSD to activate all library features */
16571657
#undef __BSD_VISIBLE
16581658

1659-
/* Define to 1 if type `char' is unsigned and you are not using gcc. */
1660-
#ifndef __CHAR_UNSIGNED__
1661-
# undef __CHAR_UNSIGNED__
1662-
#endif
1663-
16641659
/* Define to 'long' if <time.h> doesn't define. */
16651660
#undef clock_t
16661661

0 commit comments

Comments
 (0)