Commit 489c6be1 authored by Marius Wachtler's avatar Marius Wachtler

Move stat.h include into pyport.h

parent b24c218e
......@@ -41,6 +41,47 @@ typedef ssize_t Py_ssize_t;
#define Py_LOCAL_INLINE(type) static type
#endif
/*******************************
* stat() and fstat() fiddling *
*******************************/
/* We expect that stat and fstat exist on most systems.
* It's confirmed on Unix, Mac and Windows.
* If you don't have them, add
* #define DONT_HAVE_STAT
* and/or
* #define DONT_HAVE_FSTAT
* to your pyconfig.h. Python code beyond this should check HAVE_STAT and
* HAVE_FSTAT instead.
* Also
* #define HAVE_SYS_STAT_H
* if <sys/stat.h> exists on your platform, and
* #define HAVE_STAT_H
* if <stat.h> does.
*/
#ifndef DONT_HAVE_STAT
#define HAVE_STAT
#endif
#ifndef DONT_HAVE_FSTAT
#define HAVE_FSTAT
#endif
#ifdef RISCOS
#include <sys/types.h>
#include "unixstuff.h"
#endif
#ifdef HAVE_SYS_STAT_H
#if defined(PYOS_OS2) && defined(PYCC_GCC)
#include <sys/types.h>
#endif
#include <sys/stat.h>
#elif defined(HAVE_STAT_H)
#include <stat.h>
#endif
/* The functions _Py_dg_strtod and _Py_dg_dtoa in Python/dtoa.c (which are
* required to support the short float repr introduced in Python 3.1) require
* that the floating-point unit that's being used for arithmetic operations
......
......@@ -3,8 +3,6 @@
#include "Python.h"
#include "osdefs.h"
#include <sys/stat.h> // Pyston change
#include <sys/types.h>
#include <string.h>
......
......@@ -4,8 +4,6 @@
#include "marshal.h"
#include <time.h>
// Pyston change:
#include <sys/stat.h>
#define IS_SOURCE 0x0
#define IS_BYTECODE 0x1
......
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