summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-02-10 16:50:21 (GMT)
committerSkip Montanaro <skip@pobox.com>2004-02-10 16:50:21 (GMT)
commit7befb9966e1435475a9d2e9d3cc3670564ce77aa (patch)
tree4e33029bfd72bb8eaa72f9fdd5c1712e5ecdb97b
parent05eb40128e305e07527d317e3964e8a1160d0961 (diff)
downloadcpython-7befb9966e1435475a9d2e9d3cc3670564ce77aa.zip
cpython-7befb9966e1435475a9d2e9d3cc3670564ce77aa.tar.gz
cpython-7befb9966e1435475a9d2e9d3cc3670564ce77aa.tar.bz2
remove support for missing ANSI C header files (limits.h, stddef.h, etc).
-rw-r--r--Include/Python.h6
-rw-r--r--Include/pyport.h2
-rw-r--r--Include/structmember.h2
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/expat/macconfig.h6
-rw-r--r--Modules/posixmodule.c2
-rw-r--r--Modules/readline.c2
-rw-r--r--Modules/socketmodule.c4
-rw-r--r--PC/os2emx/pyconfig.h21
-rw-r--r--PC/os2vacpp/pyconfig.h7
-rw-r--r--PC/pyconfig.h13
-rw-r--r--Python/ceval.c11
-rw-r--r--Python/pythonrun.c4
-rw-r--r--Python/thread.c6
-rw-r--r--RISCOS/pyconfig.h23
-rwxr-xr-xconfigure14
-rw-r--r--configure.in6
-rw-r--r--pyconfig.h.in24
18 files changed, 17 insertions, 139 deletions
diff --git a/Include/Python.h b/Include/Python.h
index bff2c57..232cdbe 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -15,11 +15,7 @@
#define WITH_CYCLE_GC 1
#endif
-#ifdef HAVE_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
#error "Something's broken. UCHAR_MAX should be defined in limits.h."
@@ -40,9 +36,7 @@
#include <string.h>
#include <errno.h>
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/Include/pyport.h b/Include/pyport.h
index 5b0e590..79b92c3 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -85,9 +85,7 @@ typedef PY_LONG_LONG Py_intptr_t;
# error "Python needs a typedef for Py_uintptr_t in pyport.h."
#endif /* HAVE_UINTPTR_T */
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#include <math.h> /* Moved here from the math section, before extern "C" */
diff --git a/Include/structmember.h b/Include/structmember.h
index 3f4cfe0..015ca19 100644
--- a/Include/structmember.h
+++ b/Include/structmember.h
@@ -7,9 +7,7 @@ extern "C" {
/* Interface to map C struct members to Python object attributes */
-#ifdef HAVE_STDDEF_H
#include <stddef.h> /* For offsetof */
-#endif
/* The offsetof() macro calculates the offset of a structure member
in its structure. Unfortunately this cannot be written down
diff --git a/Misc/NEWS b/Misc/NEWS
index 33ff152..45068ad 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -334,6 +334,9 @@ Tools/Demos
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
supported (see PEP 11).
diff --git a/Modules/expat/macconfig.h b/Modules/expat/macconfig.h
index 3c5eb54..0a7f39d 100644
--- a/Modules/expat/macconfig.h
+++ b/Modules/expat/macconfig.h
@@ -42,15 +42,9 @@
/* Define to 1 if you have the <stdint.h> header file. */
#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. */
#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. */
#undef HAVE_SYS_STAT_H
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 71a102c..e51310d 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -53,9 +53,7 @@ corresponding Unix manual entries for more information on calls.");
#include <sys/wait.h> /* For WNOHANG */
#endif
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
diff --git a/Modules/readline.c b/Modules/readline.c
index 7535ecf..e151537 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -12,7 +12,7 @@
#include <signal.h>
#include <errno.h>
-#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
+#if defined(HAVE_SETLOCALE)
/* GNU readline() mistakenly sets the LC_CTYPE locale.
* 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.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index c897f65..81a65f0 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -247,9 +247,7 @@ int h_errno; /* not used */
#endif
-#ifdef HAVE_STDDEF_H
-# include <stddef.h>
-#endif
+#include <stddef.h>
#ifndef offsetof
# define offsetof(type, member) ((size_t)(&((type *)0)->member))
diff --git a/PC/os2emx/pyconfig.h b/PC/os2emx/pyconfig.h
index a0817f8..afe79e4 100644
--- a/PC/os2emx/pyconfig.h
+++ b/PC/os2emx/pyconfig.h
@@ -227,9 +227,6 @@ typedef long intptr_t;
/* Define if you have the sigaction function. */
#define HAVE_SIGACTION 1
-/* Define if you have the strdup function. */
-#define HAVE_STRDUP 1
-
/* Define if you have the strerror function. */
#define HAVE_STRERROR 1
@@ -263,27 +260,9 @@ typedef long intptr_t;
/* Define if you have the <fcntl.h> header file. */
#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 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 HAVE_SYS_FILE_H 1
diff --git a/PC/os2vacpp/pyconfig.h b/PC/os2vacpp/pyconfig.h
index d175f51..0051d92 100644
--- a/PC/os2vacpp/pyconfig.h
+++ b/PC/os2vacpp/pyconfig.h
@@ -109,29 +109,22 @@ typedef int pid_t;
/* #undef BAD_STATIC_FORWARD */ /* if compiler botches static fwd decls */
#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_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 */
/* Variable-Arguments/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 */
/* String/Memory/Locale Operations */
-#define HAVE_STRDUP 1 /* strdup() */
#define HAVE_MEMMOVE 1 /* memmove() */
#define HAVE_STRERROR 1 /* strerror() */
#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 */
/* Signal Handling */
#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) */
/* #define HAVE_ALARM 1 */ /* alarm() */
/* #define HAVE_SIGINTERRUPT 1 */ /* siginterrupt() */
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 54c98d1..79f5ddd 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -28,7 +28,6 @@ MS_CORE_DLL.
*/
#include <io.h>
-#define HAVE_LIMITS_H
#define HAVE_SYS_UTIME_H
#define HAVE_HYPOT
#define HAVE_TEMPNAM
@@ -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 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 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. */
/* #undef HAVE_SYS_AUDIOIO_H */
diff --git a/Python/ceval.c b/Python/ceval.c
index f2d79e7..cf5e9ec 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -806,17 +806,6 @@ eval_frame(PyFrameObject *f)
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
if (interpreter_lock) {
/* Give another thread a chance */
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index eedb562..224b3c8 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -13,9 +13,7 @@
#include "eval.h"
#include "marshal.h"
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_LANGINFO_H
#include <locale.h>
@@ -1563,7 +1561,6 @@ Py_Exit(int sts)
static void
initsigs(void)
{
-#ifdef HAVE_SIGNAL_H
#ifdef SIGPIPE
signal(SIGPIPE, SIG_IGN);
#endif
@@ -1573,7 +1570,6 @@ initsigs(void)
#ifdef SIGXFSZ
signal(SIGXFSZ, SIG_IGN);
#endif
-#endif /* HAVE_SIGNAL_H */
PyOS_InitInterrupts(); /* May imply initsignal() */
}
diff --git a/Python/thread.c b/Python/thread.c
index 016ccba..8bc958f 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -11,13 +11,7 @@
#include <stdio.h>
#endif
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#else
-#ifdef Py_DEBUG
-extern char *getenv(const char *);
-#endif
-#endif
#ifdef __sgi
#ifndef HAVE_PTHREAD_H /* XXX Need to check in configure.in */
diff --git a/RISCOS/pyconfig.h b/RISCOS/pyconfig.h
index 9d59e83..45f87be 100644
--- a/RISCOS/pyconfig.h
+++ b/RISCOS/pyconfig.h
@@ -1,5 +1,8 @@
/* RISCOS/pyconfig.h: Python configuration for RISC OS */
+#ifndef Py_PYCONFIG_H
+#define Py_PYCONFIG_H
+
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
@@ -577,12 +580,6 @@
/* Define if you have the <libutil.h> header file. */
#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. */
#undef HAVE_NCURSES_H
@@ -604,18 +601,6 @@
/* Define if you have the <pty.h> header file. */
#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. */
#undef HAVE_SYS_AUDIOIO_H
@@ -706,3 +691,5 @@
#undef DONT_HAVE_SYS_STAT_H
#define PLATFORM "riscos"
+
+#endif /* Py_PYCONFIG_H */
diff --git a/configure b/configure
index a5ffac8..cf2747a 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.450 .
+# From configure.in Revision: 1.451 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for python 2.4.
#
@@ -4343,15 +4343,9 @@ done
-
-
-
-
-
-
-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 \
+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 \
unistd.h utime.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 \
diff --git a/configure.in b/configure.in
index 44a0390..e5495bd 100644
--- a/configure.in
+++ b/configure.in
@@ -911,9 +911,9 @@ dnl AC_MSG_RESULT($cpp_type)
# checks for header files
AC_HEADER_STDC
-AC_CHECK_HEADERS(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 \
+AC_CHECK_HEADERS(dlfcn.h fcntl.h grp.h langinfo.h \
+libintl.h ncurses.h poll.h pthread.h \
+stropts.h termios.h thread.h \
unistd.h utime.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 \
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 6d422df..e42f807 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -266,15 +266,9 @@
/* Define to 1 if you have the <libutil.h> header file. */
#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. */
#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. */
#undef HAVE_LONG_LONG
@@ -416,9 +410,6 @@
/* Define to 1 if you have the `siginterrupt' function. */
#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. */
#undef HAVE_SIGRELSE
@@ -437,25 +428,13 @@
/* Define if you have struct stat.st_mtim.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.
void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
#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. */
#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. */
#undef HAVE_STRERROR
@@ -465,9 +444,6 @@
/* Define to 1 if you have the <strings.h> header file. */
#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. */
#undef HAVE_STROPTS_H