[svn] GnuPG - r5306 - in trunk: . agent common g10 keyserver tools

svn author wk cvs at cvs.gnupg.org
Wed Apr 14 16:39:17 CEST 2010


Author: wk
Date: 2010-04-14 16:39:16 +0200 (Wed, 14 Apr 2010)
New Revision: 5306

Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/NEWS
   trunk/agent/ChangeLog
   trunk/agent/Makefile.am
   trunk/autogen.sh
   trunk/common/ChangeLog
   trunk/common/Makefile.am
   trunk/common/init.c
   trunk/common/sysutils.c
   trunk/common/util.h
   trunk/common/w32help.h
   trunk/configure.ac
   trunk/g10/ChangeLog
   trunk/g10/Makefile.am
   trunk/g10/compress.c
   trunk/g10/cpr.c
   trunk/g10/decrypt.c
   trunk/g10/exec.c
   trunk/g10/gpg.c
   trunk/g10/keygen.c
   trunk/g10/keyring.c
   trunk/g10/main.h
   trunk/g10/misc.c
   trunk/keyserver/ksutil.c
   trunk/tools/ChangeLog
   trunk/tools/Makefile.am
   trunk/tools/gpg-connect-agent.c
Log:
./autogen.sh --build-w32ce does now succeed.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/ChangeLog	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1,3 +1,12 @@
+2010-04-14  Werner Koch  <wk at g10code.com>
+
+	* Makefile.am (keyserver) [W32CE]: Do not build for now.
+
+	* configure.ac (use_zip): New.
+	(--disable-zip): New option.
+	(HAVE_ZIP): New.
+	* autogen.sh <build-w32ce>: Disable ZIP.
+
 2010-04-07  Werner Koch  <wk at g10code.com>
 
 	* autogen.sh: Take a .gnupg-autogen.rc file in account.

Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/agent/ChangeLog	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1,5 +1,8 @@
 2010-04-14  Werner Koch  <wk at g10code.com>
 
+	* Makefile.am (libexec_PROGRAMS) [W32CE]: Do not build
+	gpg-preset-passphrase for now.
+
 	* trustlist.c (read_one_trustfile): Use estream.
 
 2010-04-13  Werner Koch  <wk at g10code.com>

Modified: trunk/common/ChangeLog
===================================================================
--- trunk/common/ChangeLog	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/common/ChangeLog	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1,5 +1,12 @@
 2010-04-14  Werner Koch  <wk at g10code.com>
 
+	* Makefile.am (noinst_LIBRARIES) [W32CE]: Exclude libsimple-pwquery.
+
+	* w32help.h (umask) [W32CE]: New.
+
+	* sysutils.c (_gnupg_isatty): New.
+	* util.h (gnupg_isatty): New.
+
 	* asshelp.c (setup_libassuan_logging): Read ASSUAN_DEBUG envvar.
 	(my_libassuan_log_handler): Use it.
 	* sysutils.c (_gnupg_getenv): Implement ASSUAN_DEBUG.

Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/ChangeLog	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1,3 +1,19 @@
+2010-04-14  Werner Koch  <wk at g10code.com>
+
+	* cpr.c (myread) [W32CE]: Do not use raise.
+
+	* misc.c (check_compress_algo): Rewrite to handle the new HAVE_ZIP.
+	* compress.c (push_compress_filter2): Ditto.
+	(init_compress, do_compress, init_uncompress, do_uncompress)
+	(compress_filter) [!HAVE_ZIP]: Do not build.
+	* main.h (DEFAULT_COMPRESS_ALGO): Depend on HAVE_ZIP.
+	* keygen.c (keygen_set_std_prefs): Use check_compress_algo also
+	for ZIP and ZLIB.
+
+	* Makefile.am (install-exec-hook) [W32CE]: New.
+	(bin_PROGRAMS) [W32CE]: Do not build gpgv2.
+	(gpg2_LDADD): Add extra_syslibs.
+
 2010-04-06  Werner Koch  <wk at g10code.com>
 
 	* openfile.c (mkdir): Remove.

Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/tools/ChangeLog	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1,3 +1,8 @@
+2010-04-14  Werner Koch  <wk at g10code.com>
+
+	* Makefile.am (bin_PROGRAMS) [W32CE]: Exclude gpgkey2ssh.
+	(noinst_PROGRAMS) [W32CE]: Don't build them.
+
 2010-03-25  Werner Koch  <wk at g10code.com>
 
 	* Makefile.am (opt_libassuan_libs) [W32CE]: New.

Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/Makefile.am	2010-04-14 14:39:16 UTC (rev 5306)
@@ -34,7 +34,9 @@
 
 if BUILD_GPG
 gpg = g10
+if !HAVE_W32CE_SYSTEM
 keyserver = keyserver
+endif
 else
 gpg =
 keyserver = 

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/NEWS	2010-04-14 14:39:16 UTC (rev 5306)
@@ -21,7 +21,7 @@
  * New and changed passphrases are now created with an iteration count
    requiring about 100ms of CPU work.
 
- * Ported to Windows CE.
+ * Support for Windows CE.
 
 
 Noteworthy changes in version 2.0.13 (2009-09-04)

Modified: trunk/agent/Makefile.am
===================================================================
--- trunk/agent/Makefile.am	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/agent/Makefile.am	2010-04-14 14:39:16 UTC (rev 5306)
@@ -18,7 +18,11 @@
 ## Process this file with automake to produce Makefile.in
 
 bin_PROGRAMS = gpg-agent
-libexec_PROGRAMS = gpg-protect-tool gpg-preset-passphrase
+libexec_PROGRAMS = gpg-protect-tool
+if !HAVE_W32CE_SYSTEM
+# fixme: Do no use simple-pwquery for preset-passphrase.
+libexec_PROGRAMS += gpg-preset-passphrase
+endif
 noinst_PROGRAMS = $(TESTS)
 
 # EXTRA_DIST = gpg-agent.ico gpg-agent-resource.rc

Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/autogen.sh	2010-04-14 14:39:16 UTC (rev 5306)
@@ -82,7 +82,7 @@
         exit 1
         ;;
     *)
-     ;;
+        ;;
 esac
 
 
@@ -100,9 +100,10 @@
 
     case $myhostsub in
         ce)
-          [ -z "$w32ce_root" ] && w32root="$HOME/w32ce_root"
+          w32root="$w32ce_root"
+          [ -z "$w32root" ] && w32root="$HOME/w32ce_root"
           toolprefixes="$w32ce_toolprefixes arm-mingw32ce"
-          extraoptions="--disable-scdaemon $w32ce_extraoptions"
+          extraoptions="--disable-scdaemon --disable-zip $w32ce_extraoptions"
           ;;
         *)
           [ -z "$w32root" ] && w32root="$HOME/w32root"

Modified: trunk/common/Makefile.am
===================================================================
--- trunk/common/Makefile.am	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/common/Makefile.am	2010-04-14 14:39:16 UTC (rev 5306)
@@ -21,7 +21,10 @@
 EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \
              audit-events.h status-codes.h README.jnlib ChangeLog.jnlib
 
-noinst_LIBRARIES = libcommon.a libcommonpth.a libsimple-pwquery.a libgpgrl.a
+noinst_LIBRARIES = libcommon.a libcommonpth.a libgpgrl.a
+if !HAVE_W32CE_SYSTEM
+noinst_LIBRARIES += libsimple-pwquery.a
+endif
 noinst_PROGRAMS = $(jnlib_tests) $(module_tests) $(module_maint_tests)
 TESTS = $(jnlib_tests) $(module_tests)
 
@@ -118,9 +121,11 @@
 endif
 libcommonpth_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) $(PTH_CFLAGS)
 
+if !HAVE_W32CE_SYSTEM
 libsimple_pwquery_a_SOURCES = \
 	simple-pwquery.c simple-pwquery.h asshelp.c asshelp.h
 libsimple_pwquery_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS)
+endif
 
 libgpgrl_a_SOURCES = \
         gpgrlhelp.c

Modified: trunk/common/init.c
===================================================================
--- trunk/common/init.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/common/init.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -30,11 +30,14 @@
 #ifdef HAVE_PTH      
 #include <pth.h>
 #endif
+#ifdef HAVE_W32CE_SYSTEM
+# include <assuan.h> /* For _assuan_w32ce_finish_pipe. */
+#endif
 
 #include "util.h"
 
+
 #ifdef HAVE_W32CE_SYSTEM
-#include <assuan.h>
 static void parse_std_file_handles (int *argcp, char ***argvp);
 static void
 sleep_on_exit (void)

Modified: trunk/common/sysutils.c
===================================================================
--- trunk/common/sysutils.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/common/sysutils.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -623,7 +623,18 @@
 #endif
 }
 
+#ifdef HAVE_W32CE_SYSTEM
+/* There is a isatty function declaration in cegcc but it does not
+   make sense, thus we redefine it.  */
+int 
+_gnupg_isatty (int fd)
+{
+  (void)fd;
+  return 0;
+}
+#endif
 
+
 #ifdef HAVE_W32CE_SYSTEM
 /* Replacement for getenv which takes care of the our use of getenv.
    The code is not thread safe but we expect it to work in all cases

Modified: trunk/common/util.h
===================================================================
--- trunk/common/util.h	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/common/util.h	2010-04-14 14:39:16 UTC (rev 5306)
@@ -300,6 +300,10 @@
 #define getenv(a)  _gnupg_getenv ((a))
 char *_gnupg_setenv (const char *name); /* See sysutils.c */
 #define setenv(a,b,c)  _gnupg_setenv ((a),(b),(c))
+int _gnupg_isatty (int fd);
+#define gnupg_isatty(a)  _gnupg_isatty ((a))
+#else
+#define gnupg_isatty(a)  isatty ((a))
 #endif
 
 

Modified: trunk/common/w32help.h
===================================================================
--- trunk/common/w32help.h	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/common/w32help.h	2010-04-14 14:39:16 UTC (rev 5306)
@@ -33,6 +33,15 @@
 /* Setmode is missing in cegcc but available since CE 5.0.  */
 int _setmode (int handle, int mode);
 # define setmode(a,b)   _setmode ((a),(b))
+
+static inline int
+umask (int a)
+{
+  (void)a;
+  return 0;
+}
+
+
 #endif /*HAVE_W32CE_SYSTEM*/
 
 #endif /*HAVE_W32_SYSTEM*/

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/configure.ac	2010-04-14 14:39:16 UTC (rev 5306)
@@ -74,6 +74,7 @@
 have_libusb=no
 have_adns=no
 
+use_zip=yes
 use_bzip2=yes
 use_exec=yes
 disable_keyserver_path=no
@@ -169,6 +170,16 @@
               selinux_support=$enableval, selinux_support=no)
 AC_MSG_RESULT($selinux_support)
 
+# Allow disabling of zip support.
+# This is in general not a good idea because according to rfc4880 OpenPGP
+# implementations SHOULD support ZLIB.
+AC_MSG_CHECKING([whether to enable the ZIP and ZLIB compression algorithm])
+AC_ARG_ENABLE(zip,
+   AC_HELP_STRING([--disable-zip],
+                  [disable the ZIP and ZLIB compression algorithm]),
+   use_zip=$enableval)
+AC_MSG_RESULT($use_zip)
+
 # Allow disabling of bzib2 support.
 # It is defined only after we confirm the library is available later
 AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
@@ -1210,21 +1221,26 @@
 # when compiling a conftest (due to the "-lz" from LIBS).
 # Note that we combine zlib and bzlib2 in ZLIBS.
 #
-_cppflags="${CPPFLAGS}"
-_ldflags="${LDFLAGS}"
-AC_ARG_WITH(zlib,
-  [  --with-zlib=DIR         use libz in DIR],[
-    if test -d "$withval"; then
-      CPPFLAGS="${CPPFLAGS} -I$withval/include"
-      LDFLAGS="${LDFLAGS} -L$withval/lib"
-    fi
-  ])
+if test "$use_zip" = yes ; then
+  _cppflags="${CPPFLAGS}"
+  _ldflags="${LDFLAGS}"
+  AC_ARG_WITH(zlib,
+    [  --with-zlib=DIR         use libz in DIR],[
+      if test -d "$withval"; then
+        CPPFLAGS="${CPPFLAGS} -I$withval/include"
+        LDFLAGS="${LDFLAGS} -L$withval/lib"
+      fi
+    ])
+  
+  AC_CHECK_HEADER(zlib.h,
+        AC_CHECK_LIB(z, deflateInit2_,
+         ZLIBS="-lz",
+         CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
+         CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
+         
+  AC_DEFINE(HAVE_ZIP,1, [Defined if ZIP and ZLIB are supported])
+fi
 
-AC_CHECK_HEADER(zlib.h,
-      AC_CHECK_LIB(z, deflateInit2_,
-       ZLIBS="-lz",
-       CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
-       CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
 
 #
 # Check whether we can support bzip2

Modified: trunk/g10/Makefile.am
===================================================================
--- trunk/g10/Makefile.am	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/Makefile.am	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1,5 +1,5 @@
 # Copyright (C) 1998, 1999, 2000, 2001, 2002,
-#               2003, 2006  Free Software Foundation, Inc.
+#               2003, 2006, 2010  Free Software Foundation, Inc.
 #
 # This file is part of GnuPG.
 #
@@ -29,7 +29,10 @@
 
 needed_libs = $(libcommon) ../gl/libgnu.a 
 
-bin_PROGRAMS = gpg2 gpgv2
+bin_PROGRAMS = gpg2
+if !HAVE_W32CE_SYSTEM
+bin_PROGRAMS += gpgv2
+endif
 noinst_PROGRAMS = $(module_tests)
 TESTS = $(module_tests)
 
@@ -120,9 +123,9 @@
          $(ZLIBS) $(DNSLIBS) $(LIBREADLINE) \
          $(LIBINTL) $(CAPLIBS) $(NETLIBS)
 gpg2_LDADD =  $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
-	     $(LIBICONV)
+	     $(LIBICONV) $(extra_sys_libs)
 gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
-	      $(LIBICONV)
+	      $(LIBICONV) $(extra_sys_libs)
 
 t_common_ldadd = 
 module_tests = t-rmd160
@@ -139,3 +142,11 @@
 
 uninstall-local:
 	- at rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel        
+
+
+# There has never been a gpg for WindowsCE, thus we don't need a gpg2 here
+if HAVE_W32CE_SYSTEM
+install-exec-hook:
+	mv -f $(DESTDIR)$(bindir)/gpg2$(EXEEXT) \
+              $(DESTDIR)$(bindir)/gpg$(EXEEXT)
+endif

Modified: trunk/g10/compress.c
===================================================================
--- trunk/g10/compress.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/compress.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1,6 +1,6 @@
 /* compress.c - compress filter
  * Copyright (C) 1998, 1999, 2000, 2001, 2002,
- *               2003, 2006 Free Software Foundation, Inc.
+ *               2003, 2006, 2010 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -31,10 +31,12 @@
 #include <unistd.h>
 #include <assert.h>
 #include <errno.h>
-#include <zlib.h>
-#if defined(__riscos__) && defined(USE_ZLIBRISCOS)
-# include "zlib-riscos.h"
-#endif 
+#ifdef HAVE_ZIP
+# include <zlib.h>
+# if defined(__riscos__) && defined(USE_ZLIBRISCOS)
+#  include "zlib-riscos.h"
+# endif 
+#endif
 
 #include "gpg.h"
 #include "util.h"
@@ -55,6 +57,7 @@
 int compress_filter_bz2( void *opaque, int control,
 			 IOBUF a, byte *buf, size_t *ret_len);
 
+#ifdef HAVE_ZIP
 static void
 init_compress( compress_filter_context_t *zfx, z_stream *zs )
 {
@@ -285,8 +288,8 @@
 	*(char**)buf = "compress_filter";
     return rc;
 }
+#endif /*HAVE_ZIP*/
 
-
 static void
 release_context (compress_filter_context_t *ctx)
 {
@@ -337,10 +340,12 @@
     case COMPRESS_ALGO_NONE:
       break;
 
+#ifdef HAVE_ZIP
     case COMPRESS_ALGO_ZIP:
     case COMPRESS_ALGO_ZLIB:
       iobuf_push_filter2(out,compress_filter,zfx,rel);
       break;
+#endif
 
 #ifdef HAVE_BZIP2
     case COMPRESS_ALGO_BZIP2:

Modified: trunk/g10/cpr.c
===================================================================
--- trunk/g10/cpr.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/cpr.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -24,7 +24,9 @@
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>
-#include <signal.h>
+#ifdef HAVE_SIGNAL_H
+# include <signal.h>
+#endif
 
 #include "gpg.h"
 #include "util.h"
@@ -312,7 +314,9 @@
         }
         else { /* Ctrl-D not caught - do something reasonable */
 #ifdef HAVE_DOSISH_SYSTEM
+#ifndef HAVE_W32CE_SYSTEM
             raise (SIGINT);  /* nothing to hangup under DOS */
+#endif
 #else
             raise (SIGHUP); /* no more input data */
 #endif

Modified: trunk/g10/decrypt.c
===================================================================
--- trunk/g10/decrypt.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/decrypt.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -131,7 +131,12 @@
       return err;
     }
 
+#ifdef HAVE_W32CE_SYSTEM
+#warning Ned to fix this
+  opt.outfp = NULL;
+#else
   opt.outfp = fdopen (dup (output_fd), "wb");
+#endif
   if (!opt.outfp)
     {
       char xname[64];

Modified: trunk/g10/exec.c
===================================================================
--- trunk/g10/exec.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/exec.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -74,6 +74,9 @@
 static int 
 w32_system(const char *command)
 {
+#ifdef HAVE_W32CE_SYSTEM
+#warning Change this code to use common/exechelp.c
+#else
   PROCESS_INFORMATION pi;
   STARTUPINFO si;
   char *string;
@@ -99,6 +102,7 @@
   xfree(string);
 
   return 0;
+#endif
 }
 #endif
 
@@ -106,6 +110,9 @@
 int 
 set_exec_path(const char *path)
 {
+#ifdef HAVE_W32CE_SYSTEM
+#warning Change this code to use common/exechelp.c
+#else
   char *p;
 
   p=xmalloc(5+strlen(path)+1);
@@ -123,6 +130,7 @@
     return G10ERR_GENERAL;
   else
     return 0;
+#endif
 }
 
 /* Makes a temp directory and filenames */

Modified: trunk/g10/gpg.c
===================================================================
--- trunk/g10/gpg.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/gpg.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1242,7 +1242,7 @@
 
    Returns true if the item is unsafe. */
 static int
-check_permissions(const char *path,int item)
+check_permissions (const char *path, int item)
 {
 #if defined(HAVE_STAT) && !defined(HAVE_DOSISH_SYSTEM)
   static int homedir_cache=-1;
@@ -1428,9 +1428,11 @@
 
   return ret;
 
-#endif /* HAVE_STAT && !HAVE_DOSISH_SYSTEM */
-
+#else /*!(HAVE_STAT && !HAVE_DOSISH_SYSTEM)*/
+  (void)path;
+  (void)item;
   return 0;
+#endif /*!(HAVE_STAT && !HAVE_DOSISH_SYSTEM)*/
 }
 
 
@@ -4028,8 +4030,10 @@
 	if( argc > 1 )
 	    wrong_args(_("[filename]"));
 	/* Issue some output for the unix newbie */
-	if( !fname && !opt.outfile && isatty( fileno(stdin) )
-		&& isatty( fileno(stdout) ) && isatty( fileno(stderr) ) )
+	if (!fname && !opt.outfile
+            && gnupg_isatty (fileno (stdin))
+            && gnupg_isatty (fileno (stdout))
+            && gnupg_isatty (fileno (stderr)))
 	    log_info(_("Go ahead and type your message ...\n"));
 
 	a = iobuf_open(fname);

Modified: trunk/g10/keygen.c
===================================================================
--- trunk/g10/keygen.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/keygen.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1,6 +1,6 @@
 /* keygen.c - generate a key pair
  * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- *               2006, 2007, 2009 Free Software Foundation, Inc.
+ *               2006, 2007, 2009, 2010 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -374,15 +374,14 @@
 	    if (!openpgp_md_test_algo (DIGEST_ALGO_SHA224))
 	      strcat (dummy_string, "H11 ");
 
+	    if(!check_compress_algo(COMPRESS_ALGO_ZLIB))
+              strcat(dummy_string,"Z2 ");
 
-	    /* ZLIB */
-	    strcat(dummy_string,"Z2 ");
-
 	    if(!check_compress_algo(COMPRESS_ALGO_BZIP2))
 	      strcat(dummy_string,"Z3 ");
 
-	    /* ZIP */
-	    strcat(dummy_string,"Z1");
+	    if(!check_compress_algo(COMPRESS_ALGO_ZIP))
+              strcat(dummy_string,"Z1");
 
 	    string=dummy_string;
 	  }

Modified: trunk/g10/keyring.c
===================================================================
--- trunk/g10/keyring.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/keyring.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1274,7 +1274,7 @@
   if (!secret)
     { 
 #if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__)
-      remove (bakfname);
+      gnupg_remove (bakfname);
 #endif
       if (rename (fname, bakfname) )
         {
@@ -1287,7 +1287,7 @@
   
   /* then rename the file */
 #if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__)
-  remove( fname );
+  gnupg_remove( fname );
 #endif
   if (secret)
     unregister_secured_file (fname);

Modified: trunk/g10/main.h
===================================================================
--- trunk/g10/main.h	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/main.h	2010-04-14 14:39:16 UTC (rev 5306)
@@ -33,9 +33,14 @@
 
 #define DEFAULT_CIPHER_ALGO     CIPHER_ALGO_CAST5
 #define DEFAULT_DIGEST_ALGO     DIGEST_ALGO_SHA1
-#define DEFAULT_COMPRESS_ALGO   COMPRESS_ALGO_ZIP
 #define DEFAULT_S2K_DIGEST_ALGO DIGEST_ALGO_SHA1
+#ifdef HAVE_ZIP
+# define DEFAULT_COMPRESS_ALGO   COMPRESS_ALGO_ZIP
+#else
+# define DEFAULT_COMPRESS_ALGO   COMPRESS_ALGO_NONE
+#endif
 
+
 #define S2K_DIGEST_ALGO (opt.s2k_digest_algo?opt.s2k_digest_algo:DEFAULT_S2K_DIGEST_ALGO)
 
 typedef struct

Modified: trunk/g10/misc.c
===================================================================
--- trunk/g10/misc.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/g10/misc.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -905,15 +905,18 @@
 int
 check_compress_algo(int algo)
 {
+  switch (algo)
+    {
+    case 0: return 0;
+#ifdef HAVE_ZIP
+    case 1:  
+    case 2: return 0;
+#endif
 #ifdef HAVE_BZIP2
-  if(algo>=0 && algo<=3)
-    return 0;
-#else
-  if(algo>=0 && algo<=2)
-    return 0;
+    case 3: return 0;
 #endif
-
-  return G10ERR_COMPR_ALGO;
+    default: return G10ERR_COMPR_ALGO;
+    }
 }
 
 int

Modified: trunk/keyserver/ksutil.c
===================================================================
--- trunk/keyserver/ksutil.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/keyserver/ksutil.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -29,7 +29,9 @@
  */
 
 #include <config.h>
-#include <signal.h>
+#ifdef HAVE_SIGNAL_H
+# include <signal.h>
+#endif
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>

Modified: trunk/tools/Makefile.am
===================================================================
--- trunk/tools/Makefile.am	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/tools/Makefile.am	2010-04-14 14:39:16 UTC (rev 5306)
@@ -42,16 +42,22 @@
   symcryptrun =
 endif
 
-bin_PROGRAMS = gpgconf gpg-connect-agent gpgkey2ssh ${symcryptrun}
+# Fixme: We should remove the gpgkey2ssh tool.
+bin_PROGRAMS = gpgconf gpg-connect-agent ${symcryptrun}
 if !HAVE_W32_SYSTEM
 bin_PROGRAMS += watchgnupg gpgparsemail
 endif
+if !HAVE_W32CE_SYSTEM
+bin_PROGRAMS += gpgkey2ssh 
+endif
 
 if !DISABLE_REGEX
 libexec_PROGRAMS = gpg-check-pattern
 endif
 
+if !HAVE_W32CE_SYSTEM
 noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit
+endif
 
 common_libs = $(libcommon) ../gl/libgnu.a
 pwquery_libs = ../common/libsimple-pwquery.a
@@ -88,14 +94,15 @@
 	                  $(LIBASSUAN_LIBS) $(PTH_LIBS) $(GPG_ERROR_LIBS) \
                           $(LIBREADLINE) $(LIBINTL) $(NETLIBS) $(LIBICONV)
 
+if !HAVE_W32CE_SYSTEM
 gpgkey2ssh_SOURCES = gpgkey2ssh.c
 gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
 # common via use of BUG() in an inline function, which
 # some compilers do not eliminate.
 gpgkey2ssh_LDADD = $(common_libs) \
                    $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
+endif
 
-
 if !DISABLE_REGEX
 gpg_check_pattern_SOURCES = gpg-check-pattern.c
 gpg_check_pattern_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)

Modified: trunk/tools/gpg-connect-agent.c
===================================================================
--- trunk/tools/gpg-connect-agent.c	2010-04-14 11:24:02 UTC (rev 5305)
+++ trunk/tools/gpg-connect-agent.c	2010-04-14 14:39:16 UTC (rev 5306)
@@ -1203,11 +1203,7 @@
   if (log_get_errorcount (0))
     exit (2);
 
-#ifdef HAVE_W32CE_SYSTEM
-  use_tty = 0;
-#else
-  use_tty = (isatty ( fileno (stdin)) && isatty (fileno (stdout)));
-#endif
+  use_tty = (gnupg_isatty (fileno (stdin)) && gnupg_isatty (fileno (stdout)));
 
   if (opt.exec)
     {




More information about the Gnupg-commits mailing list