44 lines
1.2 KiB
C
44 lines
1.2 KiB
C
/*
|
|
* <sys/stat.h> overlay for the MontaukOS git port.
|
|
*
|
|
* The libc header comes in through #include_next; this only adds the mode
|
|
* bits it leaves out. They are not idle definitions:
|
|
*
|
|
* S_ISUID builtin/fast-import.c borrows it as a private in-memory flag
|
|
* (NO_DELTA), so it must exist even though no file ever carries
|
|
* it on MontaukOS.
|
|
* S_ISGID setup.c uses it for shared-repository directory modes.
|
|
* S_ISVTX referenced when normalising modes read from an index.
|
|
*
|
|
* The S_IF* type constants below round out the set for the same reason: git
|
|
* masks against them. MontaukOS never reports a fifo, socket or block device
|
|
* from stat(), and the libc's S_ISFIFO/S_ISSOCK/S_ISBLK are hard-coded false
|
|
* to say exactly that -- they are deliberately left alone here.
|
|
*/
|
|
#ifndef _MONTAUK_GIT_SYS_STAT_H_
|
|
#define _MONTAUK_GIT_SYS_STAT_H_
|
|
|
|
#include_next <sys/stat.h>
|
|
|
|
#ifndef S_ISUID
|
|
#define S_ISUID 04000
|
|
#endif
|
|
#ifndef S_ISGID
|
|
#define S_ISGID 02000
|
|
#endif
|
|
#ifndef S_ISVTX
|
|
#define S_ISVTX 01000
|
|
#endif
|
|
|
|
#ifndef S_IFIFO
|
|
#define S_IFIFO 0010000
|
|
#endif
|
|
#ifndef S_IFBLK
|
|
#define S_IFBLK 0060000
|
|
#endif
|
|
#ifndef S_IFSOCK
|
|
#define S_IFSOCK 0140000
|
|
#endif
|
|
|
|
#endif /* _MONTAUK_GIT_SYS_STAT_H_ */
|