Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
40beb147
Commit
40beb147
authored
Apr 05, 2008
by
Eli Zaretskii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New file.
parent
e3b88685
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
0 deletions
+69
-0
nt/inc/sys/stat.h
nt/inc/sys/stat.h
+59
-0
src/ChangeLog
src/ChangeLog
+10
-0
No files found.
nt/inc/sys/stat.h
0 → 100644
View file @
40beb147
/*
* sys/stat.h supplied with MSVCRT uses too narrow data types for
* inode and user/group id, so we replace them with our own.
*/
#ifndef INC_SYS_STAT_H_
#define INC_SYS_STAT_H_
#ifdef __MINGW32__
# include <_mingw.h>
#else
# define __MINGW_NOTHROW
#endif
#include <sys/types.h>
#include <time.h>
#define S_IFMT 0xF000
#define S_IFREG 0x8000
#define S_IFDIR 0x4000
#define S_IFBLK 0x3000
#define S_IFCHR 0x2000
#define S_IFIFO 0x1000
#define S_IREAD 0x0100
#define S_IWRITE 0x0080
#define S_IEXEC 0x0040
#define S_IRUSR S_IREAD
#define S_IWUSR S_IWRITE
#define S_IXUSR S_IEXEC
#define S_IRWXU (S_IREAD | S_IWRITE | S_IEXEC)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
struct
stat
{
dev_t
st_dev
;
unsigned
__int64
st_ino
;
/* ino_t in sys/types.h is too narrow */
unsigned
short
st_mode
;
short
st_nlink
;
int
st_uid
;
int
st_gid
;
dev_t
st_rdev
;
off_t
st_size
;
time_t
st_atime
;
time_t
st_mtime
;
time_t
st_ctime
;
};
_CRTIMP
int
__cdecl
__MINGW_NOTHROW
fstat
(
int
,
struct
stat
*
);
_CRTIMP
int
__cdecl
__MINGW_NOTHROW
chmod
(
const
char
*
,
int
);
_CRTIMP
int
__cdecl
__MINGW_NOTHROW
stat
(
const
char
*
,
struct
stat
*
);
#endif
/* INC_SYS_STAT_H_ */
src/ChangeLog
View file @
40beb147
2008-04-05 Eli Zaretskii <eliz@gnu.org>
* dired.c (Ffile_attributes): Support inode numbers wider than 32
bits. Remove ugly WINDOWSNT-specific kludge introduced on
2008-03-14 to force inode be positive.
* w32.c (sys_chown, stat, fstat): Use S_* constants instead of
_S_* ones, since we now use our own sys/stat.h.
(stat, fstat): Don't mangle the inode number.
2008-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
* frame.h (struct frame): Give one more bit to `visible' since we use
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment