Permalink
Browse files

Remove some more hard-coded checks.

Still have segementation fault on ubuntu32.
  • Loading branch information...
Andy Chu
Andy Chu committed Sep 8, 2017
1 parent a3cd796 commit e0ff74f1b290a43f578ac46f682ab9b58fda4972
Showing with 18 additions and 40 deletions.
  1. +0 −39 Python-2.7.13/pyconfig.h
  2. +18 −1 configure
View
@@ -524,21 +524,6 @@
/* Define if you have GNU PTH threads. */
/* #undef HAVE_PTH */
/* Define to 1 if you have the `pthread_atfork' function. */
/* #undef HAVE_PTHREAD_ATFORK */
/* Defined for Solaris 2.6 bug in pthread header. */
/* #undef HAVE_PTHREAD_DESTRUCTOR */
/* Define to 1 if you have the <pthread.h> header file. */
#define HAVE_PTHREAD_H 1
/* Define to 1 if you have the `pthread_init' function. */
/* #undef HAVE_PTHREAD_INIT */
/* Define to 1 if you have the `pthread_sigmask' function. */
/* #undef HAVE_PTHREAD_SIGMASK */
/* Define to 1 if you have the <pty.h> header file. */
#define HAVE_PTY_H 1
@@ -794,9 +779,6 @@
/* Define to 1 if you have the <sys/times.h> header file. */
#define HAVE_SYS_TIMES_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
@@ -865,9 +847,6 @@
/* Define if your compiler provides uint64_t. */
#define HAVE_UINT64_T 1
/* Define to 1 if the system has the type `uintptr_t'. */
#define HAVE_UINTPTR_T 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
@@ -900,9 +879,6 @@
/* Define to 1 if you have the `waitpid' function. */
#define HAVE_WAITPID 1
/* Define if the compiler provides a wchar.h header file. */
#define HAVE_WCHAR_H 1
/* Define to 1 if you have the `wcscoll' function. */
#define HAVE_WCSCOLL 1
@@ -993,21 +969,6 @@
/* 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 `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `pthread_t', as computed by sizeof. */
#define SIZEOF_PTHREAD_T 8
/* The size of `time_t', as computed by sizeof. */
#define SIZEOF_TIME_T 8
/* The size of `uintptr_t', as computed by sizeof. */
#define SIZEOF_UINTPTR_T 8
/* The size of `wchar_t', as computed by sizeof. */
#define SIZEOF_WCHAR_T 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
View
@@ -175,7 +175,7 @@ check_sizeof() {
local actual_bytes
actual_bytes=$(cat $TMP/print_expr.out)
if test "$actual_bytes" -lt "$min_bytes"; then
if test -n "$min_bytes" && test "$actual_bytes" -lt "$min_bytes"; then
die "sizeof($c_type) should be at least $min_bytes; got $actual_bytes"
fi
@@ -199,6 +199,11 @@ detect_c_language() {
check_sizeof SIZEOF_FPOS_T 'fpos_t' 4
check_sizeof SIZEOF_PID_T 'pid_t' 4
check_sizeof SIZEOF_OFF_T 'off_t' ''
# autoconf checks if we have time.h, but the check isn't used. We just
# assume it's there.
check_sizeof SIZEOF_TIME_T 'time_t' ''
if cc_statement HAVE_LONG_LONG 'long long x; x = (long long)0;'
then
check_sizeof SIZEOF_LONG_LONG 'long long' 8
@@ -207,11 +212,23 @@ detect_c_language() {
then
check_sizeof SIZEOF_LONG_DOUBLE 'long double' 8
fi
if cc_statement HAVE_C99_BOOL '_Bool x; x = (_Bool)0;'
then
# NOTE: this is mainly used in ctypes.h, which we might not need.
check_sizeof SIZEOF__BOOL '_Bool' 1
fi
# NOTE: Python also has a check for C99 uintptr_t. Just assume we don't
# have it?
#if cc_statement HAVE_C99_BOOL 'wchar_t x; x = (wchar_t)0;'
#then
# check_sizeof SIZEOF_WCHAR_T 'wchar_t' 4
#fi
# TODO: Detect header and size.
echo '#define HAVE_WCHAR_H 1'
echo '#define SIZEOF_WCHAR_T 4'
}
# Another way of working: set detected-config.mk ?

0 comments on commit e0ff74f

Please sign in to comment.