Commit 7befb996 authored by Skip Montanaro's avatar Skip Montanaro

remove support for missing ANSI C header files (limits.h, stddef.h, etc).

parent 05eb4012
...@@ -15,11 +15,7 @@ ...@@ -15,11 +15,7 @@
#define WITH_CYCLE_GC 1 #define WITH_CYCLE_GC 1
#endif #endif
#ifdef HAVE_LIMITS_H
#include <limits.h> #include <limits.h>
#else
#error "limits.h is required by std C -- why isn't HAVE_LIMITS_H defined?"
#endif
#ifndef UCHAR_MAX #ifndef UCHAR_MAX
#error "Something's broken. UCHAR_MAX should be defined in limits.h." #error "Something's broken. UCHAR_MAX should be defined in limits.h."
...@@ -40,9 +36,7 @@ ...@@ -40,9 +36,7 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
......
...@@ -85,9 +85,7 @@ typedef PY_LONG_LONG Py_intptr_t; ...@@ -85,9 +85,7 @@ typedef PY_LONG_LONG Py_intptr_t;
# error "Python needs a typedef for Py_uintptr_t in pyport.h." # error "Python needs a typedef for Py_uintptr_t in pyport.h."
#endif /* HAVE_UINTPTR_T */ #endif /* HAVE_UINTPTR_T */
#ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
#endif
#include <math.h> /* Moved here from the math section, before extern "C" */ #include <math.h> /* Moved here from the math section, before extern "C" */
......
...@@ -7,9 +7,7 @@ extern "C" { ...@@ -7,9 +7,7 @@ extern "C" {
/* Interface to map C struct members to Python object attributes */ /* Interface to map C struct members to Python object attributes */
#ifdef HAVE_STDDEF_H
#include <stddef.h> /* For offsetof */ #include <stddef.h> /* For offsetof */
#endif
/* The offsetof() macro calculates the offset of a structure member /* The offsetof() macro calculates the offset of a structure member
in its structure. Unfortunately this cannot be written down in its structure. Unfortunately this cannot be written down
......
...@@ -334,6 +334,9 @@ Tools/Demos ...@@ -334,6 +334,9 @@ Tools/Demos
Build Build
----- -----
- Support for missing ANSI C header files (limits.h, stddef.h, etc) was
removed.
- Systems requiring the D4, D6 or D7 variants of pthreads are no longer - Systems requiring the D4, D6 or D7 variants of pthreads are no longer
supported (see PEP 11). supported (see PEP 11).
......
...@@ -42,15 +42,9 @@ ...@@ -42,15 +42,9 @@
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */ /* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H #undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */ /* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H #undef HAVE_SYS_STAT_H
......
...@@ -53,9 +53,7 @@ corresponding Unix manual entries for more information on calls."); ...@@ -53,9 +53,7 @@ corresponding Unix manual entries for more information on calls.");
#include <sys/wait.h> /* For WNOHANG */ #include <sys/wait.h> /* For WNOHANG */
#endif #endif
#ifdef HAVE_SIGNAL_H
#include <signal.h> #include <signal.h>
#endif
#ifdef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H
#include <fcntl.h> #include <fcntl.h>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <signal.h> #include <signal.h>
#include <errno.h> #include <errno.h>
#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) #if defined(HAVE_SETLOCALE)
/* GNU readline() mistakenly sets the LC_CTYPE locale. /* GNU readline() mistakenly sets the LC_CTYPE locale.
* This is evil. Only the user or the app's main() should do this! * This is evil. Only the user or the app's main() should do this!
* We must save and restore the locale around the rl_initialize() call. * We must save and restore the locale around the rl_initialize() call.
......
...@@ -247,9 +247,7 @@ int h_errno; /* not used */ ...@@ -247,9 +247,7 @@ int h_errno; /* not used */
#endif #endif
#ifdef HAVE_STDDEF_H #include <stddef.h>
# include <stddef.h>
#endif
#ifndef offsetof #ifndef offsetof
# define offsetof(type, member) ((size_t)(&((type *)0)->member)) # define offsetof(type, member) ((size_t)(&((type *)0)->member))
......
...@@ -227,9 +227,6 @@ typedef long intptr_t; ...@@ -227,9 +227,6 @@ typedef long intptr_t;
/* Define if you have the sigaction function. */ /* Define if you have the sigaction function. */
#define HAVE_SIGACTION 1 #define HAVE_SIGACTION 1
/* Define if you have the strdup function. */
#define HAVE_STRDUP 1
/* Define if you have the strerror function. */ /* Define if you have the strerror function. */
#define HAVE_STRERROR 1 #define HAVE_STRERROR 1
...@@ -263,27 +260,9 @@ typedef long intptr_t; ...@@ -263,27 +260,9 @@ typedef long intptr_t;
/* Define if you have the <fcntl.h> header file. */ /* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1 #define HAVE_FCNTL_H 1
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <ncurses.h> header file. */ /* Define if you have the <ncurses.h> header file. */
#define HAVE_NCURSES_H 1 #define HAVE_NCURSES_H 1
/* Define if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <sys/file.h> header file. */ /* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1 #define HAVE_SYS_FILE_H 1
......
...@@ -109,29 +109,22 @@ typedef int pid_t; ...@@ -109,29 +109,22 @@ typedef int pid_t;
/* #undef BAD_STATIC_FORWARD */ /* if compiler botches static fwd decls */ /* #undef BAD_STATIC_FORWARD */ /* if compiler botches static fwd decls */
#define STDC_HEADERS 1 /* VAC++ is an ANSI C Compiler */ #define STDC_HEADERS 1 /* VAC++ is an ANSI C Compiler */
#define HAVE_LIMITS_H 1 /* #include <limits.h> */
#define HAVE_STDLIB_H 1 /* #include <stdlib.h> */
#define HAVE_HYPOT 1 /* hypot() */ #define HAVE_HYPOT 1 /* hypot() */
#define HAVE_PUTENV 1 /* putenv() */ #define HAVE_PUTENV 1 /* putenv() */
#define HAVE_STDDEF_H 1 /* #include <stddef.h> */
/* #define VA_LIST_IS_ARRAY 1 */ /* if va_list is an array of some kind */ /* #define VA_LIST_IS_ARRAY 1 */ /* if va_list is an array of some kind */
/* Variable-Arguments/Prototypes */ /* Variable-Arguments/Prototypes */
#define HAVE_PROTOTYPES 1 /* VAC++ supports C Function Prototypes */ #define HAVE_PROTOTYPES 1 /* VAC++ supports C Function Prototypes */
#define HAVE_STDARG_H 1 /* #include <stdarg.h> */
#define HAVE_STDARG_PROTOTYPES 1 /* Our <stdarg.h> has prototypes */ #define HAVE_STDARG_PROTOTYPES 1 /* Our <stdarg.h> has prototypes */
/* String/Memory/Locale Operations */ /* String/Memory/Locale Operations */
#define HAVE_STRDUP 1 /* strdup() */
#define HAVE_MEMMOVE 1 /* memmove() */ #define HAVE_MEMMOVE 1 /* memmove() */
#define HAVE_STRERROR 1 /* strerror() */ #define HAVE_STRERROR 1 /* strerror() */
#define HAVE_SETLOCALE 1 /* setlocale() */ #define HAVE_SETLOCALE 1 /* setlocale() */
#define HAVE_LOCALE_H 1 /* #include <locale.h> */
#define MALLOC_ZERO_RETURNS_NULL 1 /* Our malloc(0) returns a NULL ptr */ #define MALLOC_ZERO_RETURNS_NULL 1 /* Our malloc(0) returns a NULL ptr */
/* Signal Handling */ /* Signal Handling */
#define RETSIGTYPE void /* Return type of handlers (int or void) */ #define RETSIGTYPE void /* Return type of handlers (int or void) */
#define HAVE_SIGNAL_H 1 /* #include <signal.h> */
/* #undef WANT_SIGFPE_HANDLER */ /* Handle SIGFPE (see Include/pyfpe.h) */ /* #undef WANT_SIGFPE_HANDLER */ /* Handle SIGFPE (see Include/pyfpe.h) */
/* #define HAVE_ALARM 1 */ /* alarm() */ /* #define HAVE_ALARM 1 */ /* alarm() */
/* #define HAVE_SIGINTERRUPT 1 */ /* siginterrupt() */ /* #define HAVE_SIGINTERRUPT 1 */ /* siginterrupt() */
......
...@@ -28,7 +28,6 @@ MS_CORE_DLL. ...@@ -28,7 +28,6 @@ MS_CORE_DLL.
*/ */
#include <io.h> #include <io.h>
#define HAVE_LIMITS_H
#define HAVE_SYS_UTIME_H #define HAVE_SYS_UTIME_H
#define HAVE_HYPOT #define HAVE_HYPOT
#define HAVE_TEMPNAM #define HAVE_TEMPNAM
...@@ -478,21 +477,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ ...@@ -478,21 +477,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Define if you have the <fcntl.h> header file. */ /* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1 #define HAVE_FCNTL_H 1
/* Define if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stdarg.h> prototypes. */ /* Define if you have the <stdarg.h> prototypes. */
#define HAVE_STDARG_PROTOTYPES #define HAVE_STDARG_PROTOTYPES
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <sys/audioio.h> header file. */ /* Define if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */ /* #undef HAVE_SYS_AUDIOIO_H */
......
...@@ -806,17 +806,6 @@ eval_frame(PyFrameObject *f) ...@@ -806,17 +806,6 @@ eval_frame(PyFrameObject *f)
goto on_error; goto on_error;
} }
} }
#if !defined(HAVE_SIGNAL_H)
/* If we have true signals, the signal handler
will call Py_AddPendingCall() so we don't
have to call PyErr_CheckSignals(). On the
Mac and DOS, alas, we have to call it. */
if (PyErr_CheckSignals()) {
why = WHY_EXCEPTION;
goto on_error;
}
#endif
#ifdef WITH_THREAD #ifdef WITH_THREAD
if (interpreter_lock) { if (interpreter_lock) {
/* Give another thread a chance */ /* Give another thread a chance */
......
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
#include "eval.h" #include "eval.h"
#include "marshal.h" #include "marshal.h"
#ifdef HAVE_SIGNAL_H
#include <signal.h> #include <signal.h>
#endif
#ifdef HAVE_LANGINFO_H #ifdef HAVE_LANGINFO_H
#include <locale.h> #include <locale.h>
...@@ -1563,7 +1561,6 @@ Py_Exit(int sts) ...@@ -1563,7 +1561,6 @@ Py_Exit(int sts)
static void static void
initsigs(void) initsigs(void)
{ {
#ifdef HAVE_SIGNAL_H
#ifdef SIGPIPE #ifdef SIGPIPE
signal(SIGPIPE, SIG_IGN); signal(SIGPIPE, SIG_IGN);
#endif #endif
...@@ -1573,7 +1570,6 @@ initsigs(void) ...@@ -1573,7 +1570,6 @@ initsigs(void)
#ifdef SIGXFSZ #ifdef SIGXFSZ
signal(SIGXFSZ, SIG_IGN); signal(SIGXFSZ, SIG_IGN);
#endif #endif
#endif /* HAVE_SIGNAL_H */
PyOS_InitInterrupts(); /* May imply initsignal() */ PyOS_InitInterrupts(); /* May imply initsignal() */
} }
......
...@@ -11,13 +11,7 @@ ...@@ -11,13 +11,7 @@
#include <stdio.h> #include <stdio.h>
#endif #endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
#else
#ifdef Py_DEBUG
extern char *getenv(const char *);
#endif
#endif
#ifdef __sgi #ifdef __sgi
#ifndef HAVE_PTHREAD_H /* XXX Need to check in configure.in */ #ifndef HAVE_PTHREAD_H /* XXX Need to check in configure.in */
......
/* RISCOS/pyconfig.h: Python configuration for RISC OS */ /* RISCOS/pyconfig.h: Python configuration for RISC OS */
#ifndef Py_PYCONFIG_H
#define Py_PYCONFIG_H
/* Define if on AIX 3. /* Define if on AIX 3.
System headers sometimes define this. System headers sometimes define this.
We just want to avoid a redefinition error message. */ We just want to avoid a redefinition error message. */
...@@ -577,12 +580,6 @@ ...@@ -577,12 +580,6 @@
/* Define if you have the <libutil.h> header file. */ /* Define if you have the <libutil.h> header file. */
#undef HAVE_LIBUTIL_H #undef HAVE_LIBUTIL_H
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <ncurses.h> header file. */ /* Define if you have the <ncurses.h> header file. */
#undef HAVE_NCURSES_H #undef HAVE_NCURSES_H
...@@ -604,18 +601,6 @@ ...@@ -604,18 +601,6 @@
/* Define if you have the <pty.h> header file. */ /* Define if you have the <pty.h> header file. */
#undef HAVE_PTY_H #undef HAVE_PTY_H
/* Define if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <sys/audioio.h> header file. */ /* Define if you have the <sys/audioio.h> header file. */
#undef HAVE_SYS_AUDIOIO_H #undef HAVE_SYS_AUDIOIO_H
...@@ -706,3 +691,5 @@ ...@@ -706,3 +691,5 @@
#undef DONT_HAVE_SYS_STAT_H #undef DONT_HAVE_SYS_STAT_H
#define PLATFORM "riscos" #define PLATFORM "riscos"
#endif /* Py_PYCONFIG_H */
#! /bin/sh #! /bin/sh
# From configure.in Revision: 1.450 . # From configure.in Revision: 1.451 .
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for python 2.4. # Generated by GNU Autoconf 2.57 for python 2.4.
# #
...@@ -4343,15 +4343,9 @@ done ...@@ -4343,15 +4343,9 @@ done
for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
libintl.h ncurses.h poll.h pthread.h \
stropts.h termios.h thread.h \
for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
libintl.h locale.h ncurses.h poll.h pthread.h \
signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
unistd.h utime.h \ unistd.h utime.h \
sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \ sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \ sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
......
...@@ -911,9 +911,9 @@ dnl AC_MSG_RESULT($cpp_type) ...@@ -911,9 +911,9 @@ dnl AC_MSG_RESULT($cpp_type)
# checks for header files # checks for header files
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(dlfcn.h fcntl.h grp.h limits.h langinfo.h \ AC_CHECK_HEADERS(dlfcn.h fcntl.h grp.h langinfo.h \
libintl.h locale.h ncurses.h poll.h pthread.h \ libintl.h ncurses.h poll.h pthread.h \
signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \ stropts.h termios.h thread.h \
unistd.h utime.h \ unistd.h utime.h \
sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \ sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \ sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
......
...@@ -266,15 +266,9 @@ ...@@ -266,15 +266,9 @@
/* Define to 1 if you have the <libutil.h> header file. */ /* Define to 1 if you have the <libutil.h> header file. */
#undef HAVE_LIBUTIL_H #undef HAVE_LIBUTIL_H
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the 'link' function. */ /* Define if you have the 'link' function. */
#undef HAVE_LINK #undef HAVE_LINK
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define this if you have the type long long. */ /* Define this if you have the type long long. */
#undef HAVE_LONG_LONG #undef HAVE_LONG_LONG
...@@ -416,9 +410,6 @@ ...@@ -416,9 +410,6 @@
/* Define to 1 if you have the `siginterrupt' function. */ /* Define to 1 if you have the `siginterrupt' function. */
#undef HAVE_SIGINTERRUPT #undef HAVE_SIGINTERRUPT
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* Define to 1 if you have the `sigrelse' function. */ /* Define to 1 if you have the `sigrelse' function. */
#undef HAVE_SIGRELSE #undef HAVE_SIGRELSE
...@@ -437,25 +428,13 @@ ...@@ -437,25 +428,13 @@
/* Define if you have struct stat.st_mtim.tv_nsec */ /* Define if you have struct stat.st_mtim.tv_nsec */
#undef HAVE_STAT_TV_NSEC #undef HAVE_STAT_TV_NSEC
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
/* Define if your compiler supports variable length function prototypes (e.g. /* Define if your compiler supports variable length function prototypes (e.g.
void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */ void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
#undef HAVE_STDARG_PROTOTYPES #undef HAVE_STDARG_PROTOTYPES
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror' function. */ /* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR #undef HAVE_STRERROR
...@@ -465,9 +444,6 @@ ...@@ -465,9 +444,6 @@
/* Define to 1 if you have the <strings.h> header file. */ /* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H #undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <stropts.h> header file. */ /* Define to 1 if you have the <stropts.h> header file. */
#undef HAVE_STROPTS_H #undef HAVE_STROPTS_H
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment