--- mstools/h/sys/stat.h 2018/08/09 18:21:15 1.1.1.3 +++ mstools/h/sys/stat.h 2018/08/09 18:23:11 1.1.1.4 @@ -1,7 +1,7 @@ /*** *sys/stat.h - defines structure used by stat() and fstat() * -* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* Copyright (c) 1985-1993, Microsoft Corporation. All rights reserved. * *Purpose: * This file defines the structure used by the _stat() and _fstat() @@ -31,15 +31,6 @@ extern "C" { #define _CRTAPI1 __cdecl #define _CRTAPI2 __cdecl -#elif ( _MSC_VER == 600 ) - -/* - * Definitions for old MS C6-386 compiler - */ -#define _CRTAPI1 _cdecl -#define _CRTAPI2 _cdecl -#define _M_IX86 300 - #else /* @@ -60,6 +51,9 @@ typedef long time_t; #ifndef _STAT_DEFINED +#ifdef _M_IX86 +#pragma pack(4) +#endif /* _M_IX86 */ struct _stat { _dev_t st_dev; @@ -75,11 +69,9 @@ struct _stat { time_t st_ctime; }; -#if !__STDC__ -/* Non-ANSI name for compatibility */ -// stat already mapped to _stat below -#endif - +#ifdef _M_IX86 +#pragma pack() +#endif /* _M_IX86 */ #define _STAT_DEFINED #endif @@ -87,6 +79,7 @@ struct _stat { #define _S_IFMT 0170000 /* file type mask */ #define _S_IFDIR 0040000 /* directory */ #define _S_IFCHR 0020000 /* character special */ +#define _S_IFIFO 0010000 /* pipe */ #define _S_IFREG 0100000 /* regular */ #define _S_IREAD 0000400 /* read permission, owner */ #define _S_IWRITE 0000200 /* write permission, owner */ @@ -96,7 +89,7 @@ struct _stat { /* function prototypes */ int _CRTAPI1 _fstat(int, struct _stat *); -int _CRTAPI1 _stat(char *, struct _stat *); +int _CRTAPI1 _stat(const char *, struct _stat *); #if !__STDC__ /* Non-ANSI names for compatibility */