[msvcrt] stat64 (1/3) add declarations for stat64, fstat64 and wstat64

Francois Gouget fgouget at free.fr
Tue Jan 30 05:14:48 CST 2007


On Tue, 30 Jan 2007, Damjan Jovanovic wrote:

> Changelog:
> * Added declarations for stat64, fstat64 and wstat64


--- a/include/msvcrt/sys/stat.h 2006-11-24 18:18:04.000000000 +0200
+++ b/include/msvcrt/sys/stat.h 2007-01-28 15:48:28.000000000 +0200
@@ -104,6 +104,20 @@
+struct __stat64 {
+  _dev_t st_dev;
+  _ino_t st_ino;
+  unsigned short st_mode;
+  short          st_nlink;
+  short          st_uid;
+  short          st_gid;
+  _dev_t st_rdev;
+  __int64        st_size;
+  __time64_t     st_atime;
+  __time64_t     st_mtime;
+  __time64_t     st_ctime;
+};

This structure is called _stat64 in Visual Studio 2005. Has it 
changed in more recent versions? If not I would stick to it 
otherwise Windows code that uses 'struct _stat64' would fail to 
compile with Winelib.


[...]
+int _fstat64(const char*,struct __stat64*);
+int _stat64(int,struct __stat64*);

You have reversed the _fstat64() and _stat64() prototypes.


--- a/include/msvcrt/sys/types.h        2006-11-24 18:18:04.000000000 +0200
+++ b/include/msvcrt/sys/types.h        2007-01-28 14:23:09.000000000 +0200
@@ -56,6 +56,11 @@
+#ifndef _TIME64_T_DEFINED
+typedef __int64 __time64_t;
+#define _TIME64_T_DEFINED
+#endif

I'd write it as below but that's purely an aesthetic thing (I like how 
the #ifndef and the #define line up):

+#ifndef _TIME64_T_DEFINED
+#define _TIME64_T_DEFINED  
+typedef __int64 __time64_t;
+#endif


-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
      Any sufficiently advanced bug is indistinguishable from a feature.
                            -- from some indian guy



More information about the wine-patches mailing list