From 53c636c4c666ab27440fb4a866bf0ae32f0aa517 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 14 Apr 2010 14:39:16 +0000 Subject: [PATCH] ./autogen.sh --build-w32ce does now succeed. --- ChangeLog | 9 ++++++++ Makefile.am | 2 ++ NEWS | 2 +- agent/ChangeLog | 3 +++ agent/Makefile.am | 6 +++++- autogen.sh | 7 ++++--- common/ChangeLog | 7 +++++++ common/Makefile.am | 7 ++++++- common/init.c | 5 ++++- common/sysutils.c | 11 ++++++++++ common/util.h | 4 ++++ common/w32help.h | 9 ++++++++ configure.ac | 44 ++++++++++++++++++++++++++------------- g10/ChangeLog | 16 ++++++++++++++ g10/Makefile.am | 19 +++++++++++++---- g10/compress.c | 17 +++++++++------ g10/cpr.c | 6 +++++- g10/decrypt.c | 5 +++++ g10/exec.c | 8 +++++++ g10/gpg.c | 14 ++++++++----- g10/keygen.c | 11 +++++----- g10/keyring.c | 4 ++-- g10/main.h | 7 ++++++- g10/misc.c | 19 ++++++++++------- keyserver/ksutil.c | 4 +++- tools/ChangeLog | 5 +++++ tools/Makefile.am | 11 ++++++++-- tools/gpg-connect-agent.c | 6 +----- 28 files changed, 206 insertions(+), 62 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe930b9ea..9641bf001 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-04-14 Werner Koch + + * Makefile.am (keyserver) [W32CE]: Do not build for now. + + * configure.ac (use_zip): New. + (--disable-zip): New option. + (HAVE_ZIP): New. + * autogen.sh : Disable ZIP. + 2010-04-07 Werner Koch * autogen.sh: Take a .gnupg-autogen.rc file in account. diff --git a/Makefile.am b/Makefile.am index 59e8226c5..a51b5ffd3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,7 +34,9 @@ endif if BUILD_GPG gpg = g10 +if !HAVE_W32CE_SYSTEM keyserver = keyserver +endif else gpg = keyserver = diff --git a/NEWS b/NEWS index a81215c1e..78e64b0d2 100644 --- a/NEWS +++ b/NEWS @@ -21,7 +21,7 @@ Noteworthy changes in version 2.1.x (under development) * 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) diff --git a/agent/ChangeLog b/agent/ChangeLog index 57f5d8d14..264ad53c7 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,5 +1,8 @@ 2010-04-14 Werner Koch + * 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 diff --git a/agent/Makefile.am b/agent/Makefile.am index 4f5c08ef9..8ec81932f 100644 --- a/agent/Makefile.am +++ b/agent/Makefile.am @@ -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 diff --git a/autogen.sh b/autogen.sh index 0f42a90a2..092e35e8a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -82,7 +82,7 @@ case "$1" in exit 1 ;; *) - ;; + ;; esac @@ -100,9 +100,10 @@ if [ "$myhost" = "w32" ]; then 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" diff --git a/common/ChangeLog b/common/ChangeLog index b4ddfbf37..7a6c33743 100644 --- a/common/ChangeLog +++ b/common/ChangeLog @@ -1,5 +1,12 @@ 2010-04-14 Werner Koch + * 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. diff --git a/common/Makefile.am b/common/Makefile.am index 7544d08e7..d991182d0 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -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 @@ libcommonpth_a_SOURCES += srv.c 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 diff --git a/common/init.c b/common/init.c index 0904cf7b1..ce661f6c5 100644 --- a/common/init.c +++ b/common/init.c @@ -30,11 +30,14 @@ #ifdef HAVE_PTH #include #endif +#ifdef HAVE_W32CE_SYSTEM +# include /* For _assuan_w32ce_finish_pipe. */ +#endif #include "util.h" + #ifdef HAVE_W32CE_SYSTEM -#include static void parse_std_file_handles (int *argcp, char ***argvp); static void sleep_on_exit (void) diff --git a/common/sysutils.c b/common/sysutils.c index 6ad5e27a9..46731271b 100644 --- a/common/sysutils.c +++ b/common/sysutils.c @@ -623,6 +623,17 @@ gnupg_unsetenv (const char *name) #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. diff --git a/common/util.h b/common/util.h index 159d66ee2..e197ea7a3 100644 --- a/common/util.h +++ b/common/util.h @@ -300,6 +300,10 @@ char *_gnupg_getenv (const char *name); /* See sysutils.c */ #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 diff --git a/common/w32help.h b/common/w32help.h index 6bc9f6605..beabdedef 100644 --- a/common/w32help.h +++ b/common/w32help.h @@ -33,6 +33,15 @@ int write_w32_registry_string (const char *root, const char *dir, /* 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*/ diff --git a/configure.ac b/configure.ac index 911580730..cf1c09154 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,7 @@ have_pth=no have_libusb=no have_adns=no +use_zip=yes use_bzip2=yes use_exec=yes disable_keyserver_path=no @@ -169,6 +170,16 @@ AC_ARG_ENABLE(selinux-support, 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 @@ AM_CONDITIONAL(DISABLE_REGEX, test x"$use_regex" != xyes) # 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 diff --git a/g10/ChangeLog b/g10/ChangeLog index fd1167e41..8e2d65552 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,19 @@ +2010-04-14 Werner Koch + + * 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 * openfile.c (mkdir): Remove. diff --git a/g10/Makefile.am b/g10/Makefile.am index b89ff8ee6..d0ed298a0 100644 --- a/g10/Makefile.am +++ b/g10/Makefile.am @@ -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 @@ AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) 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 @@ LDADD = $(needed_libs) ../common/libgpgrl.a \ $(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 @@ install-data-local: uninstall-local: -@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 diff --git a/g10/compress.c b/g10/compress.c index 6a29c0a94..db9fedb64 100644 --- a/g10/compress.c +++ b/g10/compress.c @@ -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 #include #include -#include -#if defined(__riscos__) && defined(USE_ZLIBRISCOS) -# include "zlib-riscos.h" -#endif +#ifdef HAVE_ZIP +# include +# 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,7 +288,7 @@ compress_filter( void *opaque, int control, *(char**)buf = "compress_filter"; return rc; } - +#endif /*HAVE_ZIP*/ static void release_context (compress_filter_context_t *ctx) @@ -337,10 +340,12 @@ push_compress_filter2(IOBUF out,compress_filter_context_t *zfx, 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: diff --git a/g10/cpr.c b/g10/cpr.c index cb4de6339..365295400 100644 --- a/g10/cpr.c +++ b/g10/cpr.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifdef HAVE_SIGNAL_H +# include +#endif #include "gpg.h" #include "util.h" @@ -312,7 +314,9 @@ myread(int fd, void *buf, size_t count) } 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 diff --git a/g10/decrypt.c b/g10/decrypt.c index 82eefcccc..870c21616 100644 --- a/g10/decrypt.c +++ b/g10/decrypt.c @@ -131,7 +131,12 @@ decrypt_message_fd (int input_fd, int output_fd) 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]; diff --git a/g10/exec.c b/g10/exec.c index 8f26edadf..2803812dc 100644 --- a/g10/exec.c +++ b/g10/exec.c @@ -74,6 +74,9 @@ set_exec_path(const char *path) { return G10ERR_GENERAL; } 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 @@ w32_system(const char *command) xfree(string); return 0; +#endif } #endif @@ -106,6 +110,9 @@ w32_system(const char *command) 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 @@ set_exec_path(const char *path) return G10ERR_GENERAL; else return 0; +#endif } /* Makes a temp directory and filenames */ diff --git a/g10/gpg.c b/g10/gpg.c index 9f5a51540..0d94969df 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -1242,7 +1242,7 @@ rm_group(char *name) 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 @@ check_permissions(const char *path,int item) 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 @@ main (int argc, char **argv) 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); diff --git a/g10/keygen.c b/g10/keygen.c index 5b625dba1..836b559f6 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -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 @@ keygen_set_std_prefs (const char *string,int personal) if (!openpgp_md_test_algo (DIGEST_ALGO_SHA224)) strcat (dummy_string, "H11 "); - - /* ZLIB */ - strcat(dummy_string,"Z2 "); + if(!check_compress_algo(COMPRESS_ALGO_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; } diff --git a/g10/keyring.c b/g10/keyring.c index bef9b932b..ab0316065 100644 --- a/g10/keyring.c +++ b/g10/keyring.c @@ -1274,7 +1274,7 @@ rename_tmp_file (const char *bakfname, const char *tmpfname, if (!secret) { #if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__) - remove (bakfname); + gnupg_remove (bakfname); #endif if (rename (fname, bakfname) ) { @@ -1287,7 +1287,7 @@ rename_tmp_file (const char *bakfname, const char *tmpfname, /* then rename the file */ #if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__) - remove( fname ); + gnupg_remove( fname ); #endif if (secret) unregister_secured_file (fname); diff --git a/g10/main.h b/g10/main.h index 781a49f38..540d9b1d9 100644 --- a/g10/main.h +++ b/g10/main.h @@ -33,8 +33,13 @@ #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) diff --git a/g10/misc.c b/g10/misc.c index 5e0ba9449..eb3eceee9 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -905,15 +905,18 @@ string_to_compress_algo(const char *string) int check_compress_algo(int algo) { -#ifdef HAVE_BZIP2 - if(algo>=0 && algo<=3) - return 0; -#else - if(algo>=0 && algo<=2) - return 0; + switch (algo) + { + case 0: return 0; +#ifdef HAVE_ZIP + case 1: + case 2: return 0; #endif - - return G10ERR_COMPR_ALGO; +#ifdef HAVE_BZIP2 + case 3: return 0; +#endif + default: return G10ERR_COMPR_ALGO; + } } int diff --git a/keyserver/ksutil.c b/keyserver/ksutil.c index cc46b92a9..1f85f165f 100644 --- a/keyserver/ksutil.c +++ b/keyserver/ksutil.c @@ -29,7 +29,9 @@ */ #include -#include +#ifdef HAVE_SIGNAL_H +# include +#endif #include #include #include diff --git a/tools/ChangeLog b/tools/ChangeLog index 52a16a238..aeb2313ac 100644 --- a/tools/ChangeLog +++ b/tools/ChangeLog @@ -1,3 +1,8 @@ +2010-04-14 Werner Koch + + * Makefile.am (bin_PROGRAMS) [W32CE]: Exclude gpgkey2ssh. + (noinst_PROGRAMS) [W32CE]: Don't build them. + 2010-03-25 Werner Koch * Makefile.am (opt_libassuan_libs) [W32CE]: New. diff --git a/tools/Makefile.am b/tools/Makefile.am index a610e6282..4bdeacb88 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -42,16 +42,22 @@ else 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,13 +94,14 @@ gpg_connect_agent_LDADD = ../common/libgpgrl.a $(common_libs) \ $(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 diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c index 8506d6feb..80bb4e785 100644 --- a/tools/gpg-connect-agent.c +++ b/tools/gpg-connect-agent.c @@ -1203,11 +1203,7 @@ main (int argc, char **argv) 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) {