/*
- * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
__uint32_t st_gen; /* file generation number */
__uint32_t st_lspare; /* RESERVED: DO NOT USE! */
__int64_t st_qspare[2]; /* RESERVED: DO NOT USE! */
+#if __arm__ && (__BIGGEST_ALIGNMENT__ > 4)
+/* For the newer ARMv7k ABI where 64-bit types are 64-bit aligned, but pointers
+ * are 32-bit:
+ * Applying attributes here causes a mismatch with the user-space struct stat64
+ */
+};
+#else
} __attribute__((packed,aligned(4)));
+#endif
extern void munge_user64_stat64(struct stat64 *sbp, struct user64_stat64 *usbp);
extern void munge_user32_stat64(struct stat64 *sbp, struct user32_stat64 *usbp);
* in Mac OS X.
*/
/* #define UF_NOUNLINK 0x00000010 */ /* file may not be removed or renamed */
-#define UF_COMPRESSED 0x00000020 /* file is hfs-compressed */
-#define UF_TRACKED 0x00000040 /* file renames and deletes are tracked */
-/* Bits 0x0080 through 0x4000 are currently undefined. */
+#define UF_COMPRESSED 0x00000020 /* file is compressed (some file-systems) */
+
+/* UF_TRACKED is used for dealing with document IDs. We no longer issue
+ notifications for deletes or renames for files which have UF_TRACKED set. */
+#define UF_TRACKED 0x00000040
+
+#define UF_DATAVAULT 0x00000080 /* entitlement required for reading */
+ /* and writing */
+
+/* Bits 0x0100 through 0x4000 are currently undefined. */
#define UF_HIDDEN 0x00008000 /* hint that this item should not be */
/* displayed in a GUI */
/*
* Super-user changeable flags.
*/
+#define SF_SUPPORTED 0x001f0000 /* mask of superuser supported flags */
#define SF_SETTABLE 0xffff0000 /* mask of superuser changeable flags */
#define SF_ARCHIVED 0x00010000 /* file is archived */
#define SF_IMMUTABLE 0x00020000 /* file may not be changed */
#define SF_APPEND 0x00040000 /* writes to file may only append */
+#define SF_RESTRICTED 0x00080000 /* entitlement required for writing */
+#define SF_NOUNLINK 0x00100000 /* Item may not be removed, renamed or mounted on */
/*
* The following two bits are reserved for FreeBSD. They are not
* implemented in Mac OS X.
*/
-/* #define SF_NOUNLINK 0x00100000 */ /* file may not be removed or renamed */
/* #define SF_SNAPSHOT 0x00200000 */ /* snapshot inode */
/* NOTE: There is no SF_HIDDEN bit. */
int mknod(const char *, mode_t, dev_t);
mode_t umask(mode_t);
+#if __DARWIN_C_LEVEL >= 200809L
+int fchmodat(int, const char *, mode_t, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
+int fstatat(int, const char *, struct stat *, int) __DARWIN_INODE64(fstatat) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
+int mkdirat(int, const char *, mode_t) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
+
+#define UTIME_NOW -1
+#define UTIME_OMIT -2
+
+int futimens(int __fd, const struct timespec __times[2]) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+int utimensat(int __fd, const char *__path, const struct timespec __times[2],
+ int __flag) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+#endif
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
#include <sys/_types/_filesec_t.h>