Cleanup: autoconf 'dirfd' detection
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 26 Aug 2020 15:17:10 +0000 (11:17 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 27 Oct 2020 14:06:07 +0000 (10:06 -0400)
Remove the unused AM conditionnal and use the 'HAVE_' prefix for the
define like the other detected features.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9a001051a14e2360e7f66fd4f627f97b11563c4f

configure.ac
src/common/compat/directory-handle.c
src/common/compat/directory-handle.h
src/common/fd-tracker/utils.c

index 1186d2ffd36aff2f161c376568453631bfa88563..36f00de2a941c0e4c5920f36a1c6241628177f9b 100644 (file)
@@ -632,10 +632,8 @@ AS_IF([test "x$ac_cv_func_dirfd" = "xyes"],
 )
 AX_CONFIG_FEATURE(
        [dirfd], [Use directory file descriptors],
-       [COMPAT_DIRFD], [This platform supports directory file descriptors.],
-       [enable_dirfd="yes"], [enable_dirfd="no"]
+       [HAVE_DIRFD], [This platform supports directory file descriptors.]
 )
-AM_CONDITIONAL([COMPAT_DIRFD], [ test "$enable_dirfd" = "yes" ])
 
 AM_CONDITIONAL([TEST_JAVA_JUL_AGENT], [test "x$test_java_agent_jul" = "xyes"])
 AM_CONDITIONAL([TEST_JAVA_LOG4J_AGENT], [test "x$test_java_agent_log4j" = "xyes"])
index aea4be5fe27ffc54e3c9c873fa36209317cb2ba9..356376ac0ed00a516fe9cadee59ac6a68b6835c5 100644 (file)
@@ -78,7 +78,7 @@ void lttng_directory_handle_invalidate(struct lttng_directory_handle *handle);
 static
 void lttng_directory_handle_release(struct urcu_ref *ref);
 
-#ifdef COMPAT_DIRFD
+#ifdef HAVE_DIRFD
 
 /*
  * Special inode number reserved to represent the "current working directory".
@@ -378,7 +378,7 @@ int _run_as_rmdir_recursive(
        return run_as_rmdirat_recursive(handle->dirfd, name, uid, gid, flags);
 }
 
-#else /* COMPAT_DIRFD */
+#else /* HAVE_DIRFD */
 
 static
 int get_full_path(const struct lttng_directory_handle *handle,
@@ -891,7 +891,7 @@ end:
        return ret;
 }
 
-#endif /* COMPAT_DIRFD */
+#endif /* HAVE_DIRFD */
 
 /* Common implementation. */
 
index 574a09d743776e831d04fe9ef24f07e4790be32d..24f1e6f6810b318ac8ab8e0b26decdddcc388260 100644 (file)
@@ -25,7 +25,7 @@ enum lttng_directory_handle_rmdir_recursive_flags {
  * This wrapper provides a handle that is either a copy of a directory's path
  * or a directory file descriptors, depending on the platform's capabilities.
  */
-#ifdef COMPAT_DIRFD
+#ifdef HAVE_DIRFD
 
 struct lttng_directory_handle;
 
index fe2cdcc4ed4f84f1c629e27c630964d25d10f377..85d28b29468208ef34f595bd18bcd769ebaac0a9 100644 (file)
@@ -101,7 +101,7 @@ int open_directory_handle(void *_args, int *out_fds)
        if (!lttng_directory_handle_uses_fd(new_handle)) {
                ret = ENOTSUP;
        } else {
-#ifdef COMPAT_DIRFD
+#ifdef HAVE_DIRFD
                *out_fds = new_handle->dirfd;
 #else
                abort();
@@ -112,7 +112,7 @@ end:
        return ret;
 }
 
-#ifdef COMPAT_DIRFD
+#ifdef HAVE_DIRFD
 static
 int fd_close(void *unused, int *in_fds)
 {
@@ -182,7 +182,7 @@ struct lttng_directory_handle *fd_tracker_create_directory_handle_from_handle(
        }
        new_handle = open_args.ret_handle;
 
-#ifdef COMPAT_DIRFD
+#ifdef HAVE_DIRFD
        new_handle->destroy_cb = directory_handle_destroy;
        new_handle->destroy_cb_data = tracker;
 #endif
This page took 0.027624 seconds and 4 git commands to generate.