[project @ 2001-03-01 12:25:32 by rrt]
[ghc-hetmet.git] / ghc / lib / std / cbits / stgio.h
index 1734b64..64cf6a2 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: stgio.h,v 1.25 2001/01/16 14:06:14 simonmar Exp $
+ * $Id: stgio.h,v 1.27 2001/03/01 12:25:33 rrt Exp $
  *
  * (c) The GRASP/AQUA Project, Glasgow University, 1994-1999
  *
 #include "stgerror.h"
 #include "fileObject.h"
 
+/* Fix for mingwin stat */
+#ifdef mingw32_TARGET_OS
+/* Need to #define __MSVCRT__ to get these versions, but in order to do this
+   early enough it's done in Stg.h (included by Rts.h) */
+#define Stat _stati64
+#define Fstat _fstati64
+#else
+#define Stat stat
+#define Fstat fstat
+#endif
+
 /* Function prototypes for the I/O subsytem...
  */
 
@@ -172,8 +183,8 @@ StgInt  write_ (StgForeignPtr ptr, StgAddr buf, StgInt len);
 /* tcSetAttr.c */
 #ifdef HAVE_TERMIOS_H
 #include <termios.h>
-#endif
 int tcSetAttr (int fd, int options, const struct termios *tp);
+#endif
 
 #endif /* ! STGIO_H */