Skip to content

Commit eebd65e

Browse files
author
Cristy
committed
define POSIX file type and permission macros
1 parent 664cfbd commit eebd65e

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

magick/nt-base.c

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,34 @@
7272
#define MAP_FAILED ((void *)(LONG_PTR) -1)
7373
#endif
7474
#define MaxWideByteExtent 100
75+
76+
77+
/* File type macros */
78+
#ifndef S_IFDIR
79+
#define S_IFDIR 0040000 /* directory */
80+
#endif
81+
#ifndef S_IFREG
82+
#define S_IFREG 0100000 /* regular file */
83+
#endif
7584
#ifndef S_IFLNK
76-
#define S_IFLNK 0120000 /* POSIX value for symbolic link */
85+
#define S_IFLNK 0120000 /* symbolic link */
86+
#endif
87+
88+
/* Permission bits */
89+
#ifndef S_IRUSR
90+
#define S_IRUSR 0000400 /* owner has read permission */
91+
#endif
92+
#ifndef S_IRGRP
93+
#define S_IRGRP 0000040 /* group has read permission */
94+
#endif
95+
#ifndef S_IROTH
96+
#define S_IROTH 0000004 /* others have read permission */
97+
#endif
98+
#ifndef S_IWGRP
99+
#define S_IWGRP 0000020 /* group has write permission */
100+
#endif
101+
#ifndef S_IWOTH
102+
#define S_IWOTH 0000002 /* others have write permission */
77103
#endif
78104

79105
/*

0 commit comments

Comments
 (0)