#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
-#include <errno.h>
-#include <fcntl.h> /* AT_FOO constants */
-#include <ftw.h> /* nftw() et al. */
-#include <getopt.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
+#include <fcntl.h> /* AT_FOO constants */
+#include <ftw.h> /* nftw() et al. */
+#include <getopt.h> /* getopt_long() */
+#include <stdbool.h> /* the "bool" type */
+#include <stdio.h> /* perror() */
+#include <stdlib.h> /* EXIT_FAILURE, EXIT_SUCCESS */
+#include <unistd.h> /* faccessat() */
#include "libadacl.h"
/* Enables get_current_dir_name() in unistd.h */
#define _GNU_SOURCE
-#include <errno.h>
-#include <fcntl.h>
-#include <libgen.h> /* basename(), dirname() */
-#include <limits.h> /* PATH_MAX */
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h> /* get_current_dir_name() */
+#include <errno.h> /* ELOOP, EINVAL, etc. */
+#include <fcntl.h> /* openat() */
+#include <libgen.h> /* basename(), dirname() */
+#include <limits.h> /* PATH_MAX */
+#include <stdbool.h> /* the "bool" type */
+#include <stdio.h> /* perror(), snprintf() */
+#include <stdlib.h> /* free() */
+#include <string.h> /* strdup() */
+#include <sys/stat.h> /* fstat() */
+#include <unistd.h> /* get_current_dir_name() */
/* ACLs */
#include <acl/libacl.h> /* acl_get_perm, not portable */
-#include <sys/types.h>
-#include <sys/acl.h>
+#include <sys/acl.h> /* all other acl_foo functions */
#include "libadacl.h"