Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bada4c3

Browse files
committed
configure.in: Avoid autoconf warning: Assume C89 semantics that
RETSIGTYPE is always void (issue #8510).
1 parent 44d3d78 commit bada4c3

3 files changed

Lines changed: 4 additions & 43 deletions

File tree

configure

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 80475 .
2+
# From configure.in Revision: 80478 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.65 for python 3.2.
55
#
@@ -6417,39 +6417,11 @@ _ACEOF
64176417
64186418
fi
64196419
6420-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6421-
$as_echo_n "checking return type of signal handlers... " >&6; }
6422-
if test "${ac_cv_type_signal+set}" = set; then :
6423-
$as_echo_n "(cached) " >&6
6424-
else
6425-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6426-
/* end confdefs.h. */
6427-
#include <sys/types.h>
6428-
#include <signal.h>
6429-
6430-
int
6431-
main ()
6432-
{
6433-
return *(signal (0, 0)) (0) == 1;
6434-
;
6435-
return 0;
6436-
}
6437-
_ACEOF
6438-
if ac_fn_c_try_compile "$LINENO"; then :
6439-
ac_cv_type_signal=int
6440-
else
6441-
ac_cv_type_signal=void
6442-
fi
6443-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6444-
fi
6445-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6446-
$as_echo "$ac_cv_type_signal" >&6; }
64476420
64486421
cat >>confdefs.h <<_ACEOF
6449-
#define RETSIGTYPE $ac_cv_type_signal
6422+
#define RETSIGTYPE void
64506423
_ACEOF
64516424
6452-
64536425
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
64546426
if test "x$ac_cv_type_size_t" = x""yes; then :
64556427

configure.in

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,18 +1374,7 @@ EOF
13741374
AC_TYPE_MODE_T
13751375
AC_TYPE_OFF_T
13761376
AC_TYPE_PID_T
1377-
AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void.
1378-
Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
1379-
AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
1380-
[AC_LANG_PROGRAM([#include <sys/types.h>
1381-
#include <signal.h>
1382-
],
1383-
[return *(signal (0, 0)) (0) == 1;])],
1384-
[ac_cv_type_signal=int],
1385-
[ac_cv_type_signal=void])])
1386-
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
1387-
(`int' or `void').])
1388-
1377+
AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void])
13891378
AC_TYPE_SIZE_T
13901379
AC_TYPE_UID_T
13911380
AC_TYPE_UINT32_T

pyconfig.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@
958958
/* Define as the size of the unicode type. */
959959
#undef Py_UNICODE_SIZE
960960

961-
/* Define as the return type of signal handlers (`int' or `void'). */
961+
/* assume C89 semantics that RETSIGTYPE is always void */
962962
#undef RETSIGTYPE
963963

964964
/* Define if setpgrp() must be called as setpgrp(0, 0). */

0 commit comments

Comments
 (0)