ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

stat.h
Go to the documentation of this file.
00001 
00006 #ifndef _INC_STAT
00007 #define _INC_STAT
00008 
00009 #ifndef _WIN32
00010 #error Only Win32 target is supported!
00011 #endif
00012 
00013 #include <crtdefs.h>
00014 
00015 #pragma pack(push,_CRT_PACKING)
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021 #include <sys/types.h>
00022 
00023 #ifndef _STAT_DEFINED
00024 #define _STAT_DEFINED
00025 
00026   struct _stat32 {
00027     _dev_t st_dev;
00028     _ino_t st_ino;
00029     unsigned short st_mode;
00030     short st_nlink;
00031     short st_uid;
00032     short st_gid;
00033     _dev_t st_rdev;
00034     _off_t st_size;
00035     __time32_t st_atime;
00036     __time32_t st_mtime;
00037     __time32_t st_ctime;
00038   };
00039 
00040   struct _stat {
00041     _dev_t st_dev;
00042     _ino_t st_ino;
00043     unsigned short st_mode;
00044     short st_nlink;
00045     short st_uid;
00046     short st_gid;
00047     _dev_t st_rdev;
00048     _off_t st_size;
00049     time_t st_atime;
00050     time_t st_mtime;
00051     time_t st_ctime;
00052   };
00053 
00054 #ifndef NO_OLDNAMES
00055   struct stat {
00056     _dev_t st_dev;
00057     _ino_t st_ino;
00058     unsigned short st_mode;
00059     short st_nlink;
00060     short st_uid;
00061     short st_gid;
00062     _dev_t st_rdev;
00063     _off_t st_size;
00064     time_t st_atime;
00065     time_t st_mtime;
00066     time_t st_ctime;
00067   };
00068 #endif
00069 
00070 #if _INTEGRAL_MAX_BITS >= 64
00071   struct _stat32i64 {
00072     _dev_t st_dev;
00073     _ino_t st_ino;
00074     unsigned short st_mode;
00075     short st_nlink;
00076     short st_uid;
00077     short st_gid;
00078     _dev_t st_rdev;
00079     __int64 st_size;
00080     __time32_t st_atime;
00081     __time32_t st_mtime;
00082     __time32_t st_ctime;
00083   };
00084 
00085   struct _stat64i32 {
00086     _dev_t st_dev;
00087     _ino_t st_ino;
00088     unsigned short st_mode;
00089     short st_nlink;
00090     short st_uid;
00091     short st_gid;
00092     _dev_t st_rdev;
00093     _off_t st_size;
00094     __time64_t st_atime;
00095     __time64_t st_mtime;
00096     __time64_t st_ctime;
00097   };
00098 
00099   struct _stat64 {
00100     _dev_t st_dev;
00101     _ino_t st_ino;
00102     unsigned short st_mode;
00103     short st_nlink;
00104     short st_uid;
00105     short st_gid;
00106     _dev_t st_rdev;
00107     __int64 st_size;
00108     __time64_t st_atime;
00109     __time64_t st_mtime;
00110     __time64_t st_ctime;
00111   };
00112 
00113   struct _stati64 {
00114     _dev_t st_dev;
00115     _ino_t st_ino;
00116     unsigned short st_mode;
00117     short st_nlink;
00118     short st_uid;
00119     short st_gid;
00120     _dev_t st_rdev;
00121     __int64 st_size;
00122     time_t st_atime;
00123     time_t st_mtime;
00124     time_t st_ctime;
00125   };
00126 
00127 #endif /* _INTEGRAL_MAX_BITS >= 64 */
00128 
00129 #define __stat64 _stat64
00130 
00131 #endif /* !_STAT_DEFINED */
00132 
00133 #define _S_IFMT 0xF000
00134 #define _S_IFDIR 0x4000
00135 #define _S_IFCHR 0x2000
00136 #define _S_IFIFO 0x1000
00137 #define _S_IFREG 0x8000
00138 #define _S_IREAD 0x0100
00139 #define _S_IWRITE 0x0080
00140 #define _S_IEXEC 0x0040
00141 
00142   _CRTIMP int __cdecl _fstat(int _FileDes,struct _stat *_Stat);
00143   _CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat);
00144   _CRTIMP int __cdecl _stat(const char *_Name,struct _stat *_Stat);
00145   _CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat);
00146 
00147 #if _INTEGRAL_MAX_BITS >= 64
00148   _CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat);
00149   _CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat);
00150   _CRTIMP int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
00151   _CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat);
00152   _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat);
00153   _CRTIMP int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
00154 #endif /* _INTEGRAL_MAX_BITS >= 64 */
00155 
00156 #ifndef _WSTAT_DEFINED
00157 #define _WSTAT_DEFINED
00158   _CRTIMP int __cdecl _wstat(const wchar_t *_Name,struct _stat *_Stat);
00159   _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
00160 #if _INTEGRAL_MAX_BITS >= 64
00161   _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
00162   _CRTIMP int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
00163   _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
00164 #endif
00165 #endif
00166 
00167 
00170 #if !defined(RC_INVOKED)
00171 
00172 #ifdef _USE_32BIT_TIME_T
00173  #define _fstat32 _fstat
00174  #define _fstat32i64 _fstati64
00175  #define _fstat64i32 _fstat64
00176 #else
00177  #define _fstat64i32 _fstat
00178   __CRT_INLINE int __cdecl _fstat32(int _FileDes, struct _stat32 *_Stat)
00179   {
00180     struct _stat _Stat64;
00181     int ret = _fstat(_FileDes, &_Stat64);
00182     _Stat->st_dev = _Stat64.st_dev;
00183     _Stat->st_ino = _Stat64.st_ino;
00184     _Stat->st_mode = _Stat64.st_mode;
00185     _Stat->st_nlink = _Stat64.st_nlink;
00186     _Stat->st_uid = _Stat64.st_uid;
00187     _Stat->st_gid = _Stat64.st_gid;
00188     _Stat->st_rdev = _Stat64.st_rdev;
00189     _Stat->st_size = _Stat64.st_size;
00190     _Stat->st_atime = (__time32_t)_Stat64.st_atime;
00191     _Stat->st_mtime = (__time32_t)_Stat64.st_mtime;
00192     _Stat->st_ctime = (__time32_t)_Stat64.st_ctime;
00193     return ret;
00194   }
00195   __CRT_INLINE int __cdecl _fstat32i64(int _FileDes, struct _stat32i64 *_Stat)
00196   {
00197     struct _stat64 _Stat64;
00198     int ret = _fstat64(_FileDes, &_Stat64);
00199     _Stat->st_dev = _Stat64.st_dev;
00200     _Stat->st_ino = _Stat64.st_ino;
00201     _Stat->st_mode = _Stat64.st_mode;
00202     _Stat->st_nlink = _Stat64.st_nlink;
00203     _Stat->st_uid = _Stat64.st_uid;
00204     _Stat->st_gid = _Stat64.st_gid;
00205     _Stat->st_rdev = _Stat64.st_rdev;
00206     _Stat->st_size = _Stat64.st_size;
00207     _Stat->st_atime = (__time32_t)_Stat64.st_atime;
00208     _Stat->st_mtime = (__time32_t)_Stat64.st_mtime;
00209     _Stat->st_ctime = (__time32_t)_Stat64.st_ctime;
00210     return ret;
00211   }
00212 #endif /* _USE_32BIT_TIME_T */
00213 
00214 #endif /* !defined(RC_INVOKED) */
00215 
00216 #ifndef NO_OLDNAMES
00217 #define _S_IFBLK    0x3000  /* Block: Is this ever set under w32? */
00218 
00219 #define S_IFMT _S_IFMT
00220 #define S_IFDIR _S_IFDIR
00221 #define S_IFCHR _S_IFCHR
00222 #define S_IFREG _S_IFREG
00223 #define S_IREAD _S_IREAD
00224 #define S_IWRITE _S_IWRITE
00225 #define S_IEXEC _S_IEXEC
00226 #define S_IFIFO     _S_IFIFO
00227 #define S_IFBLK     _S_IFBLK
00228 
00229 #define _S_IRWXU    (_S_IREAD | _S_IWRITE | _S_IEXEC)
00230 #define _S_IXUSR    _S_IEXEC
00231 #define _S_IWUSR    _S_IWRITE
00232 
00233 #define S_IRWXU     _S_IRWXU
00234 #define S_IXUSR     _S_IXUSR
00235 #define S_IWUSR     _S_IWUSR
00236 #define S_IRUSR     _S_IRUSR
00237 #define _S_IRUSR    _S_IREAD
00238 
00239 #define S_ISDIR(m)  (((m) & S_IFMT) == S_IFDIR)
00240 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
00241 #define S_ISCHR(m)  (((m) & S_IFMT) == S_IFCHR)
00242 #define S_ISBLK(m)  (((m) & S_IFMT) == S_IFBLK)
00243 #define S_ISREG(m)  (((m) & S_IFMT) == S_IFREG)
00244 
00245 #if !defined (RC_INVOKED)
00246   _CRTIMP int __cdecl stat(const char *_Filename,struct stat *_Stat);
00247   _CRTIMP int __cdecl fstat(int _Desc,struct stat *_Stat);
00248   _CRTIMP int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
00249 __CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
00250   return _fstat(_Desc,(struct _stat *)_Stat);
00251 }
00252 
00253 __CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
00254   return _stat(_Filename,(struct _stat *)_Stat);
00255 }
00256 
00257 __CRT_INLINE int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat) {
00258   return _wstat(_Filename,(struct _stat *)_Stat);
00259 }
00260 
00261 #endif
00262 
00263 #endif /* !NO_OLDNAMES */
00264 
00265 
00266 #ifdef __cplusplus
00267 }
00268 #endif
00269 
00270 #pragma pack(pop)
00271 #endif

Generated on Sun May 27 2012 04:29:54 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.