Debian Codegraph @

android/app/jni/extern/macports-legacy-support/include/sys/stat.h

raw
1
2 /*
3 * Copyright (c) 2018 Chris Jones <[email protected]>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18 #ifndef _MACPORTS_SYSSTAT_H_
19 #define _MACPORTS_SYSSTAT_H_
20
21 /* MP support header */
22 #include "MacportsLegacySupport.h"
23
24 /* Include the primary system stat.h */
25 #include_next <sys/stat.h>
26
27 #if __MP_LEGACY_SUPPORT_UTIMENSAT__
28
29 #if !defined(UTIME_NOW)
30 #define UTIME_NOW -1
31 #endif
32
33 #if !defined(UTIME_OMIT)
34 #define UTIME_OMIT -2
35 #endif
36
37 __MP__BEGIN_DECLS
38
39 extern int futimens(int fd, const struct timespec _times_in[2]);
40 extern int utimensat(int fd, const char *path, const struct timespec _times_in[2], int flags);
41
42 __MP__END_DECLS
43
44 #endif /* __MP_LEGACY_SUPPORT_UTIMENSAT__ */
45
46
47 #if __MP_LEGACY_SUPPORT_ATCALLS__
48
49 __MP__BEGIN_DECLS
50
51 extern int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags);
52 extern int fstatat(int dirfd, const char *pathname, struct stat *buf, int flags);
53
54 /* 64bit inode types appeared only on 10.5, and currently can't be replaced on Tiger */
55 /* due to lack of kernel support for the underlying syscalls */
56 #if !__DARWIN_ONLY_64_BIT_INO_T && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
57 extern int fstatat64(int dirfd, const char *pathname, struct stat64 *buf, int flags);
58 #endif
59
60 extern int mkdirat(int dirfd, const char *pathname, mode_t mode);
61
62 __MP__END_DECLS
63
64 #endif /* __MP_LEGACY_SUPPORT_ATCALLS__ */
65
66 #if __MP_LEGACY_SUPPORT_LSMOD__
67
68 __MP__BEGIN_DECLS
69
70 extern int lchmod(const char *, mode_t);
71
72 __MP__END_DECLS
73
74 #endif /* __MP_LEGACY_SUPPORT_LSMOD__ */
75
76 #endif /* _MACPORTS_SYSSTAT_H_ */