[Pkg-gnupg-commit] [libassuan] 07/19: We can't support fd passing, if the system doesn't support it.

Eric Dorland eric at moszumanska.debian.org
Sat Nov 25 07:02:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit 87c2bb5708ff202651fca81d91d5f1e0c898cb07
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Sep 6 18:25:56 2017 +0900

    We can't support fd passing, if the system doesn't support it.
    
    * configure.ac (check_descriptor_passing): New.
    (use_descriptor_passing): Use check_descriptor_passing.
    
    --
    
    GnuPG-bug-id: 3384
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
 configure.ac | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index cd36183..118e047 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,12 +105,16 @@ LT_LANG([Windows Resource])
 # For now we hardcode the use of version scripts.  It would be better
 # to write a test for this or even implement this within libtool.
 have_ld_version_script=no
+check_descriptor_passing=yes
 case "${host}" in
+    *-*-cygwin*)
+        check_descriptor_passing=no
+        ;;
     *-*-linux*)
-	have_ld_version_script=yes
+        have_ld_version_script=yes
         ;;
     *-*-gnu*)
-	have_ld_version_script=yes
+        have_ld_version_script=yes
         ;;
     *-apple-darwin*)
         AC_DEFINE(_XOPEN_SOURCE, 500, Activate POSIX interface on MacOS X)
@@ -217,10 +221,10 @@ case "${host}" in
         have_w32_system=yes
         ;;
     *-solaris*)
-	AC_DEFINE(_XOPEN_SOURCE, 500, Activate extensions on Solaris)
-	AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Activate extensions on Solaris)
-	AC_DEFINE(__EXTENSIONS__, 1, Activate extensions on Solaris)
-	;;
+        AC_DEFINE(_XOPEN_SOURCE, 500, Activate extensions on Solaris)
+        AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Activate extensions on Solaris)
+        AC_DEFINE(__EXTENSIONS__, 1, Activate extensions on Solaris)
+        ;;
 esac
 
 if test "$have_dosish_system" = yes; then
@@ -279,7 +283,7 @@ AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
 # Check for network libraries.  They are needed for tests.
 #
 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
-	[NETLIBS="-lsocket $NETLIBS"]))
+        [NETLIBS="-lsocket $NETLIBS"]))
 AC_SUBST(NETLIBS)
 
 if test "$have_w32_system" = yes; then
@@ -329,10 +333,13 @@ AC_DECL_SYS_SIGLIST
 gl_HEADER_SYS_SOCKET
 gl_TYPE_SOCKLEN_T
 
-AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
-                [use_descriptor_passing=yes],
-                [use_descriptor_passing=no
-                 AC_MSG_WARN([
+if test $check_descriptor_passing != yes; then
+    use_descriptor_passing=no
+else
+    AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
+                    [use_descriptor_passing=yes],
+                    [use_descriptor_passing=no
+                     AC_MSG_WARN([
 ***
 *** Data structure for sending ancillary data missing.
 *** Descriptor passing won't work.
@@ -348,6 +355,7 @@ AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
 #endif
 #include <unistd.h>
        ])
+fi
 if test "$use_descriptor_passing" = "yes"; then
  AC_DEFINE(USE_DESCRIPTOR_PASSING, 1,
             [Defined if descriptor passing is supported])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list