diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2023-05-17 11:31:41 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2023-05-17 11:31:41 +0900 |
commit | 316fae4401975e26d6b7e6b89534133c7b3df25c (patch) | |
tree | 481fef102ea783d41fc5351467f03dce40326201 | |
parent | 5d1cdaaa03c664fddbaff16c68e79fc6a248c59b (diff) | |
download | libassuan-316fae4401975e26d6b7e6b89534133c7b3df25c.tar.gz |
w32: File handle passing to server is now supported.
* configure.ac: Fix for MinGW.
* src/assuan-buffer.c (assuan_sendfd): Fix runtime check.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | src/assuan-buffer.c | 4 |
2 files changed, 14 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index b5c2cc7..a46e933 100644 --- a/configure.ac +++ b/configure.ac @@ -132,11 +132,7 @@ 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 ;; @@ -322,6 +318,18 @@ AC_TYPE_SIZE_T gl_TYPE_SOCKLEN_T +# Windows has different method for "descriptor passing" (actually, +# it's file handle passing), so, don't check the feature. +check_descriptor_passing=yes +case "${host}" in + *-*-cygwin*) + check_descriptor_passing=no + ;; + *-mingw32*) + check_descriptor_passing=no + ;; +esac + if test $check_descriptor_passing != yes; then use_descriptor_passing=no else diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c index 895eb93..987ba45 100644 --- a/src/assuan-buffer.c +++ b/src/assuan-buffer.c @@ -520,10 +520,10 @@ assuan_sendfd (assuan_context_t ctx, assuan_fd_t fd) /* It is explicitly allowed to use (NULL, -1) as a runtime test to check whether descriptor passing is available. */ if (!ctx && fd == ASSUAN_INVALID_FD) -#ifdef USE_DESCRIPTOR_PASSING +#if defined(USE_DESCRIPTOR_PASSING) || defined(HAVE_W32_SYSTEM) return 0; #else - return _assuan_error (ctx, GPG_ERR_NOT_IMPLEMENTED); + return _assuan_error (ctx, GPG_ERR_NOT_IMPLEMENTED); #endif if (!ctx) |