]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
cmake/autotools: remove HAVE_DIRFD/HAVE_DDFD
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 11 Jul 2022 06:59:33 +0000 (10:59 +0400)
committerSimon McVittie <smcv@collabora.com>
Wed, 13 Jul 2022 19:36:13 +0000 (20:36 +0100)
dirfd() is assumed to be present on Linux, dd_fd is never used.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
cmake/ConfigureChecks.cmake
cmake/config.h.cmake
configure.ac

index 57986d084e508e26f349537aaaa2d7ff50a6bef6..e15406532dd903be7f19c5c16100d0146e4dfa92 100644 (file)
@@ -134,32 +134,6 @@ int main() {
 }
 " DBUS_USE_SYNC)
 
-CHECK_C_SOURCE_COMPILES("
-#include <sys/types.h>
-#include <dirent.h>
-int main(
-    DIR *dirp;
-    dirp = opendir(\".\");
-    dirfd(dirp);
-    closedir(dirp);
-)
-" HAVE_DIRFD)
-
-if(NOT HAVE_DIRFD)
-    CHECK_C_SOURCE_COMPILES("
-    #include <sys/types.h>
-    #include <dirent.h>
-    int main()
-    {
-        DIR *dirp;
-        int fd;
-        dirp = opendir(\".\");
-        fd = dirp->dd_fd;
-        closedir(dirp);
-    }
-    " HAVE_DDFD)
-endif()
-
 check_type_size("short"     SIZEOF_SHORT)
 check_type_size("int"       SIZEOF_INT)
 check_type_size("long"      SIZEOF_LONG)
index 69f88feabe7840fcb3332486bb26664f4c390fee..a0acc5b7600c2576af66e4eef93db78580b8db01 100644 (file)
 
 #cmakedefine HAVE_ACCEPT4 1
 
-/* Have dirfd function */
-#cmakedefine HAVE_DIRFD 1
-
-/* Have the ddfd member of DIR */
-#cmakedefine HAVE_DDFD 1
-
 #cmakedefine HAVE_INOTIFY_INIT1 1
 #cmakedefine HAVE_GETRANDOM 1
 #cmakedefine HAVE_GETRLIMIT 1
index 3b225a299632e4d10d0ad2fd1380c1adcb9d765c..d72d8f7c8b4f8d06f968d45334ddc497a84ff24f 100644 (file)
@@ -647,41 +647,6 @@ if test "x$ac_cv_header_syslog_h" = "xyes"; then
   AC_CHECK_DECLS([LOG_PERROR], [], [], [[#include <syslog.h>]])
 fi
 
-AC_MSG_CHECKING(for dirfd)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#include <dirent.h>
-]], [[
-DIR *dirp;
-dirp = opendir(".");
-dirfd(dirp);
-closedir(dirp);
-]])],
-[dbus_have_dirfd=yes],
-[dbus_have_dirfd=no])
-AC_MSG_RESULT($dbus_have_dirfd)
-if test "$dbus_have_dirfd" = yes; then
-       AC_DEFINE(HAVE_DIRFD,1,[Have dirfd function])
-else
-       AC_MSG_CHECKING(for DIR *dirp->dd_fd)
-       AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#include <dirent.h>
-       ]], [[
-DIR *dirp;
-int fd;
-dirp = opendir(".");
-fd = dirp->dd_fd;
-closedir(dirp);
-        ]])],
-        [dbus_have_ddfd=yes],
-        [dbus_have_ddfd=no])
-       AC_MSG_RESULT($dbus_have_ddfd)
-       if test "$dbus_have_ddfd" = yes; then
-               AC_DEFINE(HAVE_DDFD,1,[Have the ddfd member of DIR])
-       fi
-fi
-
 AC_CHECK_HEADERS([execinfo.h],
        [AC_SEARCH_LIBS([backtrace], [execinfo],
                [AC_DEFINE([HAVE_BACKTRACE], [1],