Skip to content

Commit 7f6b25f

Browse files
tiranhello-adam
authored andcommitted
[3.9] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (pythonGH-30851) (pythonGH-30915)
Co-authored-by: Christian Heimes <[email protected]>
1 parent 0cb65fb commit 7f6b25f

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
@@ -13998,39 +13998,6 @@ fi
1399813998

1399913999
# checks for compiler characteristics
1400014000

14001-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
14002-
$as_echo_n "checking whether char is unsigned... " >&6; }
14003-
if ${ac_cv_c_char_unsigned+:} false; then :
14004-
$as_echo_n "(cached) " >&6
14005-
else
14006-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14007-
/* end confdefs.h. */
14008-
$ac_includes_default
14009-
int
14010-
main ()
14011-
{
14012-
static int test_array [1 - 2 * !(((char) -1) < 0)];
14013-
test_array [0] = 0;
14014-
return test_array [0];
14015-
14016-
;
14017-
return 0;
14018-
}
14019-
_ACEOF
14020-
if ac_fn_c_try_compile "$LINENO"; then :
14021-
ac_cv_c_char_unsigned=no
14022-
else
14023-
ac_cv_c_char_unsigned=yes
14024-
fi
14025-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14026-
fi
14027-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
14028-
$as_echo "$ac_cv_c_char_unsigned" >&6; }
14029-
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
14030-
$as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
14031-
14032-
fi
14033-
1403414001
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
1403514002
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
1403614003
if ${ac_cv_c_const+:} false; then :

configure.ac

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

43104310
# checks for compiler characteristics
43114311

4312-
AC_C_CHAR_UNSIGNED
43134312
AC_C_CONST
43144313

43154314
works=no

pyconfig.h.in

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

1635-
/* Define to 1 if type `char' is unsigned and you are not using gcc. */
1636-
#ifndef __CHAR_UNSIGNED__
1637-
# undef __CHAR_UNSIGNED__
1638-
#endif
1639-
16401635
/* Define to 'long' if <time.h> doesn't define. */
16411636
#undef clock_t
16421637

0 commit comments

Comments
 (0)