[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.11-35-g3a22b62
by Werner Koch
cvs at cvs.gnupg.org
Thu Jan 12 19:06:10 CET 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-1-4 has been updated
via 3a22b622c89ae87c4d557ab71c619803a4fed8ed (commit)
from 02f282368e6e68ac1c8dffcfd6e772ec4ff356f8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3a22b622c89ae87c4d557ab71c619803a4fed8ed
Author: Werner Koch <wk at gnupg.org>
Date: Thu Jan 12 18:10:30 2012 +0100
Allow building with the 32 bit mingw-w64 toolchain.
* scripts/autogen.sh <--build-w32>: Support i686-w64-mingw32 and use
it by default if installed.
* keyserver/gpgkeys_ldap.c (my_ldap_start_tls_s): Define macro
depending on compiler version.
(main): Use new macro.
* util/miscutil.c [!HAVE_TIMEGM]: Add prototype for the timegm
autoconf replacement function.
--
It seems that the LDAP keyserver helper build with the old mingw32
toolchain never worked correctly for LDAPS. The prototype there for
ldap_start_tls_s is plainly wrong for Windows. Anyway I included
special support so not to break building with the old compiler.
diff --git a/keyserver/gpgkeys_ldap.c b/keyserver/gpgkeys_ldap.c
index 4536325..3541957 100644
--- a/keyserver/gpgkeys_ldap.c
+++ b/keyserver/gpgkeys_ldap.c
@@ -66,6 +66,20 @@
#include "util.h"
#endif
+#if HAVE_W32_SYSTEM
+# if !defined(__MINGW64_VERSION_MAJOR) || !defined(__MINGW32_MAJOR_VERSION)
+ /* This is mingw32 with bogus ldap definitions; i.e. Unix style
+ LDAP definitions. */
+# define my_ldap_start_tls_s(a,b,c) ldap_start_tls_sA ((a),(b),(c))
+# else
+ /* Standard Microsoft or mingw64. */
+# define my_ldap_start_tls_s(a,b,c) ldap_start_tls_sA ((a),NULL, NULL,(b),(c))
+# endif
+#else /*!W32*/
+# define my_ldap_start_tls_s(a,b,c) ldap_start_tls_s ((a),(b),(c))
+#endif /*!W32*/
+
+
extern char *optarg;
extern int optind;
@@ -460,7 +474,7 @@ build_attrs(LDAPMod ***modlist,char *line)
case 'R':
revoked=1;
break;
-
+
case 'd':
case 'D':
disabled=1;
@@ -1043,7 +1057,7 @@ get_key(char *getkey)
else
{
/* short key id */
-
+
sprintf(search,"(pgpkeyid=%.8s)",getkey);
}
@@ -1773,12 +1787,12 @@ find_basekeyspacedn(void)
}
ldap_msgfree(si_res);
- }
+ }
return LDAP_SUCCESS;
}
-static void
+static void
show_help (FILE *fp)
{
fprintf (fp,"-h, --help\thelp\n");
@@ -2195,7 +2209,7 @@ main(int argc,char *argv[])
#endif
if(err==LDAP_SUCCESS)
- err=ldap_start_tls_s(ldap,NULL,NULL);
+ err = my_ldap_start_tls_s (ldap, NULL, NULL);
if(err!=LDAP_SUCCESS)
{
diff --git a/scripts/autogen.sh b/scripts/autogen.sh
index 408f760..9d3e739 100755
--- a/scripts/autogen.sh
+++ b/scripts/autogen.sh
@@ -56,7 +56,7 @@ if test "$1" = "--build-w32"; then
# Locate the cross compiler
crossbindir=
- for host in i586-mingw32msvc i386-mingw32msvc; do
+ for host in i686-w64-mingw32 i586-mingw32msvc i386-mingw32msvc; do
if ${host}-gcc --version >/dev/null 2>&1 ; then
crossbindir=/usr/${host}/bin
conf_CC="CC=${host}-gcc"
diff --git a/util/miscutil.c b/util/miscutil.c
index f82c4d9..f0cbaca 100644
--- a/util/miscutil.c
+++ b/util/miscutil.c
@@ -31,6 +31,10 @@
#include "util.h"
#include "i18n.h"
+#ifndef HAVE_TIMEGM
+time_t timegm (struct tm *tm);
+#endif
+
#ifdef HAVE_UNSIGNED_TIME_T
# define INVALID_TIME_CHECK(a) ((a) == (time_t)(-1))
#else
-----------------------------------------------------------------------
Summary of changes:
keyserver/gpgkeys_ldap.c | 24 +++++++++++++++++++-----
scripts/autogen.sh | 2 +-
util/miscutil.c | 4 ++++
3 files changed, 24 insertions(+), 6 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list