# define SEEK_END 2 /* Seek from end of file. */
#endif /* XPG */
-/* The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EACCESS
- is meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to
- unlinkat. The two functions do completely different things and therefore,
- the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to
- faccessat would be undefined behavior and thus treating it equivalent to
- AT_EACCESS is valid undefined behavior. */
-#ifdef __USE_ATFILE
-# define AT_FDCWD -100 /* Special value used to indicate
- the *at functions should use the
- current working directory. */
-# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
-# define AT_REMOVEDIR 0x200 /* Remove directory instead of
- unlinking file. */
-# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
-# ifdef __USE_GNU
-# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount
- traversal. */
-# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */
-# endif
-# define AT_EACCESS 0x200 /* Test access permitted for
- effective IDs, not real IDs. */
-#endif
-
/* Do the file control operation described by CMD on FD.
The remaining arguments are interpreted depending on CMD.
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+/* Values for `*at' functions. */
+#ifdef __USE_ATFILE
+# define AT_FDCWD -100 /* Special value used to indicate
+ the *at functions should use the
+ current working directory. */
+# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
+# define AT_REMOVEDIR 0x200 /* Remove directory instead of
+ unlinking file. */
+# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
+# ifdef __USE_GNU
+# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount
+ traversal. */
+# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */
+# endif
+# define AT_EACCESS 0x200 /* Test access permitted for
+ effective IDs, not real IDs. */
+#endif
# define MAX_HANDLE_SZ 128
#endif
+/* Values for `*at' functions. */
+#ifdef __USE_ATFILE
+# define AT_FDCWD -100 /* Special value used to indicate
+ the *at functions should use the
+ current working directory. */
+# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
+# define AT_REMOVEDIR 0x200 /* Remove directory instead of
+ unlinking file. */
+# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
+# ifdef __USE_GNU
+# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount
+ traversal. */
+# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */
+# endif
+# define AT_EACCESS 0x200 /* Test access permitted for
+ effective IDs, not real IDs. */
+#endif
+
__BEGIN_DECLS
#ifdef __USE_GNU