./autogen.sh --build-w32ce does now succeed.

This commit is contained in:
Werner Koch 2010-04-14 14:39:16 +00:00
parent 31d7bdfe77
commit 53c636c4c6
28 changed files with 206 additions and 62 deletions

View File

@ -1,3 +1,12 @@
2010-04-14 Werner Koch <wk@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@g10code.com> 2010-04-07 Werner Koch <wk@g10code.com>
* autogen.sh: Take a .gnupg-autogen.rc file in account. * autogen.sh: Take a .gnupg-autogen.rc file in account.

View File

@ -34,7 +34,9 @@ endif
if BUILD_GPG if BUILD_GPG
gpg = g10 gpg = g10
if !HAVE_W32CE_SYSTEM
keyserver = keyserver keyserver = keyserver
endif
else else
gpg = gpg =
keyserver = keyserver =

2
NEWS
View File

@ -21,7 +21,7 @@ Noteworthy changes in version 2.1.x (under development)
* New and changed passphrases are now created with an iteration count * New and changed passphrases are now created with an iteration count
requiring about 100ms of CPU work. requiring about 100ms of CPU work.
* Ported to Windows CE. * Support for Windows CE.
Noteworthy changes in version 2.0.13 (2009-09-04) Noteworthy changes in version 2.0.13 (2009-09-04)

View File

@ -1,5 +1,8 @@
2010-04-14 Werner Koch <wk@g10code.com> 2010-04-14 Werner Koch <wk@g10code.com>
* Makefile.am (libexec_PROGRAMS) [W32CE]: Do not build
gpg-preset-passphrase for now.
* trustlist.c (read_one_trustfile): Use estream. * trustlist.c (read_one_trustfile): Use estream.
2010-04-13 Werner Koch <wk@g10code.com> 2010-04-13 Werner Koch <wk@g10code.com>

View File

@ -18,7 +18,11 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
bin_PROGRAMS = gpg-agent 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) noinst_PROGRAMS = $(TESTS)
# EXTRA_DIST = gpg-agent.ico gpg-agent-resource.rc # EXTRA_DIST = gpg-agent.ico gpg-agent-resource.rc

View File

@ -82,7 +82,7 @@ case "$1" in
exit 1 exit 1
;; ;;
*) *)
;; ;;
esac esac
@ -100,9 +100,10 @@ if [ "$myhost" = "w32" ]; then
case $myhostsub in case $myhostsub in
ce) ce)
[ -z "$w32ce_root" ] && w32root="$HOME/w32ce_root" w32root="$w32ce_root"
[ -z "$w32root" ] && w32root="$HOME/w32ce_root"
toolprefixes="$w32ce_toolprefixes arm-mingw32ce" toolprefixes="$w32ce_toolprefixes arm-mingw32ce"
extraoptions="--disable-scdaemon $w32ce_extraoptions" extraoptions="--disable-scdaemon --disable-zip $w32ce_extraoptions"
;; ;;
*) *)
[ -z "$w32root" ] && w32root="$HOME/w32root" [ -z "$w32root" ] && w32root="$HOME/w32root"

View File

@ -1,5 +1,12 @@
2010-04-14 Werner Koch <wk@g10code.com> 2010-04-14 Werner Koch <wk@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. * asshelp.c (setup_libassuan_logging): Read ASSUAN_DEBUG envvar.
(my_libassuan_log_handler): Use it. (my_libassuan_log_handler): Use it.
* sysutils.c (_gnupg_getenv): Implement ASSUAN_DEBUG. * sysutils.c (_gnupg_getenv): Implement ASSUAN_DEBUG.

View File

@ -21,7 +21,10 @@
EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \ EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \
audit-events.h status-codes.h README.jnlib ChangeLog.jnlib 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) noinst_PROGRAMS = $(jnlib_tests) $(module_tests) $(module_maint_tests)
TESTS = $(jnlib_tests) $(module_tests) TESTS = $(jnlib_tests) $(module_tests)
@ -118,9 +121,11 @@ libcommonpth_a_SOURCES += srv.c
endif endif
libcommonpth_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) $(PTH_CFLAGS) libcommonpth_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) $(PTH_CFLAGS)
if !HAVE_W32CE_SYSTEM
libsimple_pwquery_a_SOURCES = \ libsimple_pwquery_a_SOURCES = \
simple-pwquery.c simple-pwquery.h asshelp.c asshelp.h simple-pwquery.c simple-pwquery.h asshelp.c asshelp.h
libsimple_pwquery_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) libsimple_pwquery_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS)
endif
libgpgrl_a_SOURCES = \ libgpgrl_a_SOURCES = \
gpgrlhelp.c gpgrlhelp.c

View File

@ -30,11 +30,14 @@
#ifdef HAVE_PTH #ifdef HAVE_PTH
#include <pth.h> #include <pth.h>
#endif #endif
#ifdef HAVE_W32CE_SYSTEM
# include <assuan.h> /* For _assuan_w32ce_finish_pipe. */
#endif
#include "util.h" #include "util.h"
#ifdef HAVE_W32CE_SYSTEM #ifdef HAVE_W32CE_SYSTEM
#include <assuan.h>
static void parse_std_file_handles (int *argcp, char ***argvp); static void parse_std_file_handles (int *argcp, char ***argvp);
static void static void
sleep_on_exit (void) sleep_on_exit (void)

View File

@ -623,6 +623,17 @@ gnupg_unsetenv (const char *name)
#endif #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 #ifdef HAVE_W32CE_SYSTEM
/* Replacement for getenv which takes care of the our use of getenv. /* Replacement for getenv which takes care of the our use of getenv.

View File

@ -300,6 +300,10 @@ char *_gnupg_getenv (const char *name); /* See sysutils.c */
#define getenv(a) _gnupg_getenv ((a)) #define getenv(a) _gnupg_getenv ((a))
char *_gnupg_setenv (const char *name); /* See sysutils.c */ char *_gnupg_setenv (const char *name); /* See sysutils.c */
#define setenv(a,b,c) _gnupg_setenv ((a),(b),(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 #endif

View File

@ -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. */ /* Setmode is missing in cegcc but available since CE 5.0. */
int _setmode (int handle, int mode); int _setmode (int handle, int mode);
# define setmode(a,b) _setmode ((a),(b)) # define setmode(a,b) _setmode ((a),(b))
static inline int
umask (int a)
{
(void)a;
return 0;
}
#endif /*HAVE_W32CE_SYSTEM*/ #endif /*HAVE_W32CE_SYSTEM*/
#endif /*HAVE_W32_SYSTEM*/ #endif /*HAVE_W32_SYSTEM*/

View File

@ -74,6 +74,7 @@ have_pth=no
have_libusb=no have_libusb=no
have_adns=no have_adns=no
use_zip=yes
use_bzip2=yes use_bzip2=yes
use_exec=yes use_exec=yes
disable_keyserver_path=no disable_keyserver_path=no
@ -169,6 +170,16 @@ AC_ARG_ENABLE(selinux-support,
selinux_support=$enableval, selinux_support=no) selinux_support=$enableval, selinux_support=no)
AC_MSG_RESULT($selinux_support) 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. # Allow disabling of bzib2 support.
# It is defined only after we confirm the library is available later # It is defined only after we confirm the library is available later
AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm]) 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). # when compiling a conftest (due to the "-lz" from LIBS).
# Note that we combine zlib and bzlib2 in ZLIBS. # Note that we combine zlib and bzlib2 in ZLIBS.
# #
_cppflags="${CPPFLAGS}" if test "$use_zip" = yes ; then
_ldflags="${LDFLAGS}" _cppflags="${CPPFLAGS}"
AC_ARG_WITH(zlib, _ldflags="${LDFLAGS}"
[ --with-zlib=DIR use libz in DIR],[ AC_ARG_WITH(zlib,
if test -d "$withval"; then [ --with-zlib=DIR use libz in DIR],[
CPPFLAGS="${CPPFLAGS} -I$withval/include" if test -d "$withval"; then
LDFLAGS="${LDFLAGS} -L$withval/lib" CPPFLAGS="${CPPFLAGS} -I$withval/include"
fi 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 # Check whether we can support bzip2

View File

@ -1,3 +1,19 @@
2010-04-14 Werner Koch <wk@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@g10code.com> 2010-04-06 Werner Koch <wk@g10code.com>
* openfile.c (mkdir): Remove. * openfile.c (mkdir): Remove.

View File

@ -1,5 +1,5 @@
# Copyright (C) 1998, 1999, 2000, 2001, 2002, # 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. # 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 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) noinst_PROGRAMS = $(module_tests)
TESTS = $(module_tests) TESTS = $(module_tests)
@ -120,9 +123,9 @@ LDADD = $(needed_libs) ../common/libgpgrl.a \
$(ZLIBS) $(DNSLIBS) $(LIBREADLINE) \ $(ZLIBS) $(DNSLIBS) $(LIBREADLINE) \
$(LIBINTL) $(CAPLIBS) $(NETLIBS) $(LIBINTL) $(CAPLIBS) $(NETLIBS)
gpg2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \ 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) \ gpgv2_LDADD = $(LDADD) $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) \
$(LIBICONV) $(LIBICONV) $(extra_sys_libs)
t_common_ldadd = t_common_ldadd =
module_tests = t-rmd160 module_tests = t-rmd160
@ -139,3 +142,11 @@ install-data-local:
uninstall-local: uninstall-local:
-@rm $(DESTDIR)$(pkgdatadir)/gpg-conf.skel -@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

View File

@ -1,6 +1,6 @@
/* compress.c - compress filter /* compress.c - compress filter
* Copyright (C) 1998, 1999, 2000, 2001, 2002, * 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. * This file is part of GnuPG.
* *
@ -31,10 +31,12 @@
#include <unistd.h> #include <unistd.h>
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <zlib.h> #ifdef HAVE_ZIP
#if defined(__riscos__) && defined(USE_ZLIBRISCOS) # include <zlib.h>
# include "zlib-riscos.h" # if defined(__riscos__) && defined(USE_ZLIBRISCOS)
#endif # include "zlib-riscos.h"
# endif
#endif
#include "gpg.h" #include "gpg.h"
#include "util.h" #include "util.h"
@ -55,6 +57,7 @@
int compress_filter_bz2( void *opaque, int control, int compress_filter_bz2( void *opaque, int control,
IOBUF a, byte *buf, size_t *ret_len); IOBUF a, byte *buf, size_t *ret_len);
#ifdef HAVE_ZIP
static void static void
init_compress( compress_filter_context_t *zfx, z_stream *zs ) init_compress( compress_filter_context_t *zfx, z_stream *zs )
{ {
@ -285,7 +288,7 @@ compress_filter( void *opaque, int control,
*(char**)buf = "compress_filter"; *(char**)buf = "compress_filter";
return rc; return rc;
} }
#endif /*HAVE_ZIP*/
static void static void
release_context (compress_filter_context_t *ctx) 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: case COMPRESS_ALGO_NONE:
break; break;
#ifdef HAVE_ZIP
case COMPRESS_ALGO_ZIP: case COMPRESS_ALGO_ZIP:
case COMPRESS_ALGO_ZLIB: case COMPRESS_ALGO_ZLIB:
iobuf_push_filter2(out,compress_filter,zfx,rel); iobuf_push_filter2(out,compress_filter,zfx,rel);
break; break;
#endif
#ifdef HAVE_BZIP2 #ifdef HAVE_BZIP2
case COMPRESS_ALGO_BZIP2: case COMPRESS_ALGO_BZIP2:

View File

@ -24,7 +24,9 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <signal.h> #ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
#include "gpg.h" #include "gpg.h"
#include "util.h" #include "util.h"
@ -312,7 +314,9 @@ myread(int fd, void *buf, size_t count)
} }
else { /* Ctrl-D not caught - do something reasonable */ else { /* Ctrl-D not caught - do something reasonable */
#ifdef HAVE_DOSISH_SYSTEM #ifdef HAVE_DOSISH_SYSTEM
#ifndef HAVE_W32CE_SYSTEM
raise (SIGINT); /* nothing to hangup under DOS */ raise (SIGINT); /* nothing to hangup under DOS */
#endif
#else #else
raise (SIGHUP); /* no more input data */ raise (SIGHUP); /* no more input data */
#endif #endif

View File

@ -131,7 +131,12 @@ decrypt_message_fd (int input_fd, int output_fd)
return err; return err;
} }
#ifdef HAVE_W32CE_SYSTEM
#warning Ned to fix this
opt.outfp = NULL;
#else
opt.outfp = fdopen (dup (output_fd), "wb"); opt.outfp = fdopen (dup (output_fd), "wb");
#endif
if (!opt.outfp) if (!opt.outfp)
{ {
char xname[64]; char xname[64];

View File

@ -74,6 +74,9 @@ set_exec_path(const char *path) { return G10ERR_GENERAL; }
static int static int
w32_system(const char *command) w32_system(const char *command)
{ {
#ifdef HAVE_W32CE_SYSTEM
#warning Change this code to use common/exechelp.c
#else
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
STARTUPINFO si; STARTUPINFO si;
char *string; char *string;
@ -99,6 +102,7 @@ w32_system(const char *command)
xfree(string); xfree(string);
return 0; return 0;
#endif
} }
#endif #endif
@ -106,6 +110,9 @@ w32_system(const char *command)
int int
set_exec_path(const char *path) set_exec_path(const char *path)
{ {
#ifdef HAVE_W32CE_SYSTEM
#warning Change this code to use common/exechelp.c
#else
char *p; char *p;
p=xmalloc(5+strlen(path)+1); p=xmalloc(5+strlen(path)+1);
@ -123,6 +130,7 @@ set_exec_path(const char *path)
return G10ERR_GENERAL; return G10ERR_GENERAL;
else else
return 0; return 0;
#endif
} }
/* Makes a temp directory and filenames */ /* Makes a temp directory and filenames */

View File

@ -1242,7 +1242,7 @@ rm_group(char *name)
Returns true if the item is unsafe. */ Returns true if the item is unsafe. */
static int static int
check_permissions(const char *path,int item) check_permissions (const char *path, int item)
{ {
#if defined(HAVE_STAT) && !defined(HAVE_DOSISH_SYSTEM) #if defined(HAVE_STAT) && !defined(HAVE_DOSISH_SYSTEM)
static int homedir_cache=-1; static int homedir_cache=-1;
@ -1428,9 +1428,11 @@ check_permissions(const char *path,int item)
return ret; return ret;
#endif /* HAVE_STAT && !HAVE_DOSISH_SYSTEM */ #else /*!(HAVE_STAT && !HAVE_DOSISH_SYSTEM)*/
(void)path;
(void)item;
return 0; return 0;
#endif /*!(HAVE_STAT && !HAVE_DOSISH_SYSTEM)*/
} }
@ -4028,8 +4030,10 @@ main (int argc, char **argv)
if( argc > 1 ) if( argc > 1 )
wrong_args(_("[filename]")); wrong_args(_("[filename]"));
/* Issue some output for the unix newbie */ /* Issue some output for the unix newbie */
if( !fname && !opt.outfile && isatty( fileno(stdin) ) if (!fname && !opt.outfile
&& isatty( fileno(stdout) ) && isatty( fileno(stderr) ) ) && gnupg_isatty (fileno (stdin))
&& gnupg_isatty (fileno (stdout))
&& gnupg_isatty (fileno (stderr)))
log_info(_("Go ahead and type your message ...\n")); log_info(_("Go ahead and type your message ...\n"));
a = iobuf_open(fname); a = iobuf_open(fname);

View File

@ -1,6 +1,6 @@
/* keygen.c - generate a key pair /* keygen.c - generate a key pair
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, * 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. * 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)) if (!openpgp_md_test_algo (DIGEST_ALGO_SHA224))
strcat (dummy_string, "H11 "); strcat (dummy_string, "H11 ");
if(!check_compress_algo(COMPRESS_ALGO_ZLIB))
/* ZLIB */ strcat(dummy_string,"Z2 ");
strcat(dummy_string,"Z2 ");
if(!check_compress_algo(COMPRESS_ALGO_BZIP2)) if(!check_compress_algo(COMPRESS_ALGO_BZIP2))
strcat(dummy_string,"Z3 "); strcat(dummy_string,"Z3 ");
/* ZIP */ if(!check_compress_algo(COMPRESS_ALGO_ZIP))
strcat(dummy_string,"Z1"); strcat(dummy_string,"Z1");
string=dummy_string; string=dummy_string;
} }

View File

@ -1274,7 +1274,7 @@ rename_tmp_file (const char *bakfname, const char *tmpfname,
if (!secret) if (!secret)
{ {
#if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__) #if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__)
remove (bakfname); gnupg_remove (bakfname);
#endif #endif
if (rename (fname, bakfname) ) if (rename (fname, bakfname) )
{ {
@ -1287,7 +1287,7 @@ rename_tmp_file (const char *bakfname, const char *tmpfname,
/* then rename the file */ /* then rename the file */
#if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__) #if defined(HAVE_DOSISH_SYSTEM) || defined(__riscos__)
remove( fname ); gnupg_remove( fname );
#endif #endif
if (secret) if (secret)
unregister_secured_file (fname); unregister_secured_file (fname);

View File

@ -33,8 +33,13 @@
#define DEFAULT_CIPHER_ALGO CIPHER_ALGO_CAST5 #define DEFAULT_CIPHER_ALGO CIPHER_ALGO_CAST5
#define DEFAULT_DIGEST_ALGO DIGEST_ALGO_SHA1 #define DEFAULT_DIGEST_ALGO DIGEST_ALGO_SHA1
#define DEFAULT_COMPRESS_ALGO COMPRESS_ALGO_ZIP
#define DEFAULT_S2K_DIGEST_ALGO DIGEST_ALGO_SHA1 #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) #define S2K_DIGEST_ALGO (opt.s2k_digest_algo?opt.s2k_digest_algo:DEFAULT_S2K_DIGEST_ALGO)

View File

@ -905,15 +905,18 @@ string_to_compress_algo(const char *string)
int int
check_compress_algo(int algo) check_compress_algo(int algo)
{ {
#ifdef HAVE_BZIP2 switch (algo)
if(algo>=0 && algo<=3) {
return 0; case 0: return 0;
#else #ifdef HAVE_ZIP
if(algo>=0 && algo<=2) case 1:
return 0; case 2: return 0;
#endif #endif
#ifdef HAVE_BZIP2
return G10ERR_COMPR_ALGO; case 3: return 0;
#endif
default: return G10ERR_COMPR_ALGO;
}
} }
int int

View File

@ -29,7 +29,9 @@
*/ */
#include <config.h> #include <config.h>
#include <signal.h> #ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@ -1,3 +1,8 @@
2010-04-14 Werner Koch <wk@g10code.com>
* Makefile.am (bin_PROGRAMS) [W32CE]: Exclude gpgkey2ssh.
(noinst_PROGRAMS) [W32CE]: Don't build them.
2010-03-25 Werner Koch <wk@g10code.com> 2010-03-25 Werner Koch <wk@g10code.com>
* Makefile.am (opt_libassuan_libs) [W32CE]: New. * Makefile.am (opt_libassuan_libs) [W32CE]: New.

View File

@ -42,16 +42,22 @@ else
symcryptrun = symcryptrun =
endif 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 if !HAVE_W32_SYSTEM
bin_PROGRAMS += watchgnupg gpgparsemail bin_PROGRAMS += watchgnupg gpgparsemail
endif endif
if !HAVE_W32CE_SYSTEM
bin_PROGRAMS += gpgkey2ssh
endif
if !DISABLE_REGEX if !DISABLE_REGEX
libexec_PROGRAMS = gpg-check-pattern libexec_PROGRAMS = gpg-check-pattern
endif endif
if !HAVE_W32CE_SYSTEM
noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit
endif
common_libs = $(libcommon) ../gl/libgnu.a common_libs = $(libcommon) ../gl/libgnu.a
pwquery_libs = ../common/libsimple-pwquery.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) \ $(LIBASSUAN_LIBS) $(PTH_LIBS) $(GPG_ERROR_LIBS) \
$(LIBREADLINE) $(LIBINTL) $(NETLIBS) $(LIBICONV) $(LIBREADLINE) $(LIBINTL) $(NETLIBS) $(LIBICONV)
if !HAVE_W32CE_SYSTEM
gpgkey2ssh_SOURCES = gpgkey2ssh.c gpgkey2ssh_SOURCES = gpgkey2ssh.c
gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
# common via use of BUG() in an inline function, which # common via use of BUG() in an inline function, which
# some compilers do not eliminate. # some compilers do not eliminate.
gpgkey2ssh_LDADD = $(common_libs) \ gpgkey2ssh_LDADD = $(common_libs) \
$(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
endif
if !DISABLE_REGEX if !DISABLE_REGEX
gpg_check_pattern_SOURCES = gpg-check-pattern.c gpg_check_pattern_SOURCES = gpg-check-pattern.c

View File

@ -1203,11 +1203,7 @@ main (int argc, char **argv)
if (log_get_errorcount (0)) if (log_get_errorcount (0))
exit (2); exit (2);
#ifdef HAVE_W32CE_SYSTEM use_tty = (gnupg_isatty (fileno (stdin)) && gnupg_isatty (fileno (stdout)));
use_tty = 0;
#else
use_tty = (isatty ( fileno (stdin)) && isatty (fileno (stdout)));
#endif
if (opt.exec) if (opt.exec)
{ {