[Patches] Patch to fileobject.c

Jack Jansen Jack.Jansen@oratrix.com
Fri, 02 Jun 2000 23:13:21 +0200


This is a multi-part message in MIME format.
--------------4DB26C1822752BBA52A35D28
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Various includes were halfway the file. Moved to the top to fix problems with
multiple includes of files on the Mac.
--------------4DB26C1822752BBA52A35D28
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="522A6368";
 name="fileobject.diffs"
Content-Transfer-Encoding: 7bit
Content-Description: Unknown Document
Content-Disposition: inline;
 filename="fileobject.diffs"

Index: fileobject.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Objects/fileobject.c,v
retrieving revision 2.73
diff -c -r2.73 fileobject.c
*** fileobject.c	2000/05/03 23:44:34	2.73
--- fileobject.c	2000/06/02 21:09:44
***************
*** 38,43 ****
--- 38,63 ----
  #include <sys/types.h>
  #endif /* DONT_HAVE_SYS_TYPES_H */
  
+ /* We expect that fstat exists on most systems.
+    It's confirmed on Unix, Mac and Windows.
+    If you don't have it, add #define DONT_HAVE_FSTAT to your config.h. */
+ #ifndef DONT_HAVE_FSTAT
+ #define HAVE_FSTAT
+ 
+ #ifndef DONT_HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ 
+ #ifndef DONT_HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+ #else
+ #ifdef HAVE_STAT_H
+ #include <stat.h>
+ #endif
+ #endif
+ 
+ #endif /* DONT_HAVE_FSTAT */
+ 
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
***************
*** 445,465 ****
  	return PyInt_FromLong(res);
  }
  
- /* We expect that fstat exists on most systems.
-    It's confirmed on Unix, Mac and Windows.
-    If you don't have it, add #define DONT_HAVE_FSTAT to your config.h. */
- #ifndef DONT_HAVE_FSTAT
- #define HAVE_FSTAT
- 
- #ifndef DONT_HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- 
- #ifndef DONT_HAVE_SYS_STAT_H
- #include <sys/stat.h>
- #endif
- 
- #endif /* DONT_HAVE_FSTAT */
  
  #if BUFSIZ < 8192
  #define SMALLCHUNK 8192
--- 465,470 ----


--------------4DB26C1822752BBA52A35D28--