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

Skip to content

Commit 2571cc8

Browse files
committed
Changes by Mark Hammond for Windows CE. Mostly of the form
#ifdef DONT_HAVE_header_H ... #endif around #include <header.h>.
1 parent 99fb7c7 commit 2571cc8

5 files changed

Lines changed: 18 additions & 0 deletions

File tree

Python/ceval.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ static long dxp[256];
108108

109109
#ifdef WITH_THREAD
110110

111+
#ifndef DONT_HAVE_ERRNO_H
111112
#include <errno.h>
113+
#endif
112114
#include "pythread.h"
113115

114116
extern int _PyThread_Started; /* Flag for Py_Exit */

Python/import.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ PERFORMANCE OF THIS SOFTWARE.
5555
#ifndef DONT_HAVE_STAT
5656
#define HAVE_STAT
5757

58+
#ifndef DONT_HAVE_SYS_TYPES_H
5859
#include <sys/types.h>
60+
#endif
61+
#ifndef DONT_HAVE_SYS_STAT_H
5962
#include <sys/stat.h>
63+
#endif
6064

6165
#if defined(PYCC_VACPP)
6266
/* VisualAge C/C++ Failed to Define MountType Field in sys/stat.h */

Python/mystrtoul.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ PERFORMANCE OF THIS SOFTWARE.
6060
*/
6161

6262
#include <ctype.h>
63+
#ifndef DONT_HAVE_ERRNO_H
6364
#include <errno.h>
65+
#endif
6466

6567
unsigned long
6668
PyOS_strtoul(str, ptr, base)

Python/strtod.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ static double HUGE = 1.7976931348623157e308;
5454

5555
extern double atof(); /* Only called when result known to be ok */
5656

57+
#ifndef DONT_HAVE_ERRNO_H
5758
#include <errno.h>
59+
#endif
5860
extern int errno;
5961

6062
double strtod(str, ptr)

Python/thread.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,17 @@ PERFORMANCE OF THIS SOFTWARE.
4242
#define DL_IMPORT(RTYPE) RTYPE
4343
#endif
4444

45+
#ifndef DONT_HAVE_STDIO_H
4546
#include <stdio.h>
47+
#endif
4648

4749
#ifdef HAVE_STDLIB_H
4850
#include <stdlib.h>
4951
#else
52+
#ifdef Py_DEBUG
5053
extern char *getenv();
5154
#endif
55+
#endif
5256

5357
#ifdef HAVE_UNISTD_H
5458
#include <unistd.h>
@@ -162,6 +166,10 @@ void PyThread_init_thread _P0()
162166
#include "thread_beos.h"
163167
#endif
164168

169+
#ifdef WINCE_THREADS
170+
#include "thread_wince.h"
171+
#endif
172+
165173
/*
166174
#ifdef FOOBAR_THREADS
167175
#include "thread_foobar.h"

0 commit comments

Comments
 (0)