Skip to content

Commit 65ac3ef

Browse files
author
montanaro
committed
remove support for missing ANSI C header files (limits.h, stddef.h, etc).
git-svn-id: http://svn.python.org/projects/python/trunk@35255 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent cc72336 commit 65ac3ef

File tree

18 files changed

+17
-139
lines changed

18 files changed

+17
-139
lines changed

Include/Python.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
#define WITH_CYCLE_GC 1
1616
#endif
1717

18-
#ifdef HAVE_LIMITS_H
1918
#include <limits.h>
20-
#else
21-
#error "limits.h is required by std C -- why isn't HAVE_LIMITS_H defined?"
22-
#endif
2319

2420
#ifndef UCHAR_MAX
2521
#error "Something's broken. UCHAR_MAX should be defined in limits.h."
@@ -40,9 +36,7 @@
4036

4137
#include <string.h>
4238
#include <errno.h>
43-
#ifdef HAVE_STDLIB_H
4439
#include <stdlib.h>
45-
#endif
4640
#ifdef HAVE_UNISTD_H
4741
#include <unistd.h>
4842
#endif

Include/pyport.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ typedef PY_LONG_LONG Py_intptr_t;
8585
# error "Python needs a typedef for Py_uintptr_t in pyport.h."
8686
#endif /* HAVE_UINTPTR_T */
8787

88-
#ifdef HAVE_STDLIB_H
8988
#include <stdlib.h>
90-
#endif
9189

9290
#include <math.h> /* Moved here from the math section, before extern "C" */
9391

Include/structmember.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ extern "C" {
77

88
/* Interface to map C struct members to Python object attributes */
99

10-
#ifdef HAVE_STDDEF_H
1110
#include <stddef.h> /* For offsetof */
12-
#endif
1311

1412
/* The offsetof() macro calculates the offset of a structure member
1513
in its structure. Unfortunately this cannot be written down

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ Tools/Demos
334334
Build
335335
-----
336336

337+
- Support for missing ANSI C header files (limits.h, stddef.h, etc) was
338+
removed.
339+
337340
- Systems requiring the D4, D6 or D7 variants of pthreads are no longer
338341
supported (see PEP 11).
339342

Modules/expat/macconfig.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,9 @@
4242
/* Define to 1 if you have the <stdint.h> header file. */
4343
#undef HAVE_STDINT_H
4444

45-
/* Define to 1 if you have the <stdlib.h> header file. */
46-
#define HAVE_STDLIB_H
47-
4845
/* Define to 1 if you have the <strings.h> header file. */
4946
#undef HAVE_STRINGS_H
5047

51-
/* Define to 1 if you have the <string.h> header file. */
52-
#define HAVE_STRING_H
53-
5448
/* Define to 1 if you have the <sys/stat.h> header file. */
5549
#undef HAVE_SYS_STAT_H
5650

Modules/posixmodule.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ corresponding Unix manual entries for more information on calls.");
5353
#include <sys/wait.h> /* For WNOHANG */
5454
#endif
5555

56-
#ifdef HAVE_SIGNAL_H
5756
#include <signal.h>
58-
#endif
5957

6058
#ifdef HAVE_FCNTL_H
6159
#include <fcntl.h>

Modules/readline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <signal.h>
1313
#include <errno.h>
1414

15-
#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
15+
#if defined(HAVE_SETLOCALE)
1616
/* GNU readline() mistakenly sets the LC_CTYPE locale.
1717
* This is evil. Only the user or the app's main() should do this!
1818
* We must save and restore the locale around the rl_initialize() call.

Modules/socketmodule.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,7 @@ int h_errno; /* not used */
247247

248248
#endif
249249

250-
#ifdef HAVE_STDDEF_H
251-
# include <stddef.h>
252-
#endif
250+
#include <stddef.h>
253251

254252
#ifndef offsetof
255253
# define offsetof(type, member) ((size_t)(&((type *)0)->member))

PC/os2emx/pyconfig.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,6 @@ typedef long intptr_t;
227227
/* Define if you have the sigaction function. */
228228
#define HAVE_SIGACTION 1
229229

230-
/* Define if you have the strdup function. */
231-
#define HAVE_STRDUP 1
232-
233230
/* Define if you have the strerror function. */
234231
#define HAVE_STRERROR 1
235232

@@ -263,27 +260,9 @@ typedef long intptr_t;
263260
/* Define if you have the <fcntl.h> header file. */
264261
#define HAVE_FCNTL_H 1
265262

266-
/* Define if you have the <limits.h> header file. */
267-
#define HAVE_LIMITS_H 1
268-
269-
/* Define if you have the <locale.h> header file. */
270-
#define HAVE_LOCALE_H 1
271-
272263
/* Define if you have the <ncurses.h> header file. */
273264
#define HAVE_NCURSES_H 1
274265

275-
/* Define if you have the <signal.h> header file. */
276-
#define HAVE_SIGNAL_H 1
277-
278-
/* Define if you have the <stdarg.h> header file. */
279-
#define HAVE_STDARG_H 1
280-
281-
/* Define if you have the <stddef.h> header file. */
282-
#define HAVE_STDDEF_H 1
283-
284-
/* Define if you have the <stdlib.h> header file. */
285-
#define HAVE_STDLIB_H 1
286-
287266
/* Define if you have the <sys/file.h> header file. */
288267
#define HAVE_SYS_FILE_H 1
289268

PC/os2vacpp/pyconfig.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,29 +109,22 @@ typedef int pid_t;
109109
/* #undef BAD_STATIC_FORWARD */ /* if compiler botches static fwd decls */
110110

111111
#define STDC_HEADERS 1 /* VAC++ is an ANSI C Compiler */
112-
#define HAVE_LIMITS_H 1 /* #include <limits.h> */
113-
#define HAVE_STDLIB_H 1 /* #include <stdlib.h> */
114112
#define HAVE_HYPOT 1 /* hypot() */
115113
#define HAVE_PUTENV 1 /* putenv() */
116-
#define HAVE_STDDEF_H 1 /* #include <stddef.h> */
117114
/* #define VA_LIST_IS_ARRAY 1 */ /* if va_list is an array of some kind */
118115

119116
/* Variable-Arguments/Prototypes */
120117
#define HAVE_PROTOTYPES 1 /* VAC++ supports C Function Prototypes */
121-
#define HAVE_STDARG_H 1 /* #include <stdarg.h> */
122118
#define HAVE_STDARG_PROTOTYPES 1 /* Our <stdarg.h> has prototypes */
123119

124120
/* String/Memory/Locale Operations */
125-
#define HAVE_STRDUP 1 /* strdup() */
126121
#define HAVE_MEMMOVE 1 /* memmove() */
127122
#define HAVE_STRERROR 1 /* strerror() */
128123
#define HAVE_SETLOCALE 1 /* setlocale() */
129-
#define HAVE_LOCALE_H 1 /* #include <locale.h> */
130124
#define MALLOC_ZERO_RETURNS_NULL 1 /* Our malloc(0) returns a NULL ptr */
131125

132126
/* Signal Handling */
133127
#define RETSIGTYPE void /* Return type of handlers (int or void) */
134-
#define HAVE_SIGNAL_H 1 /* #include <signal.h> */
135128
/* #undef WANT_SIGFPE_HANDLER */ /* Handle SIGFPE (see Include/pyfpe.h) */
136129
/* #define HAVE_ALARM 1 */ /* alarm() */
137130
/* #define HAVE_SIGINTERRUPT 1 */ /* siginterrupt() */

0 commit comments

Comments
 (0)