diff options
author | Werner Koch <[email protected]> | 2010-03-24 12:15:30 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2010-03-24 12:15:30 +0000 |
commit | f080b353ed4ea5c16ad3fda79497a0ebe3be9a7d (patch) | |
tree | ce173438e276aa2ac40a254e557219ce1a25ba23 /kbx | |
parent | Reorganized the exechelp code. (diff) | |
download | gnupg-f080b353ed4ea5c16ad3fda79497a0ebe3be9a7d.tar.gz gnupg-f080b353ed4ea5c16ad3fda79497a0ebe3be9a7d.zip |
More changes for CE. gpgsm does now build and run a keylisting.
Diffstat (limited to 'kbx')
-rw-r--r-- | kbx/ChangeLog | 9 | ||||
-rw-r--r-- | kbx/Makefile.am | 8 | ||||
-rw-r--r-- | kbx/keybox-update.c | 12 |
3 files changed, 24 insertions, 5 deletions
diff --git a/kbx/ChangeLog b/kbx/ChangeLog index d88500a0e..95c6477a4 100644 --- a/kbx/ChangeLog +++ b/kbx/ChangeLog @@ -1,3 +1,12 @@ +2010-03-23 Werner Koch <[email protected]> + + * Makefile.am (extra_libs): New. + (kbxutil_LDADD): Use it. + + * keybox-update.c: [HAVE_DOSISH_SYSTEM]: Include sysutils.h. + (keybox_compress): Replace rewind by fseek+clearerr. + (rename_tmp_file, keybox_compress): s/remove/gnupg_remove/. + 2010-03-10 Werner Koch <[email protected]> * Makefile.am (kbxutil_LDADD, $(PROGRAMS)): Remove libjnlib.a. diff --git a/kbx/Makefile.am b/kbx/Makefile.am index 81a7d3f24..b5bfa19fc 100644 --- a/kbx/Makefile.am +++ b/kbx/Makefile.am @@ -28,6 +28,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl \ noinst_LIBRARIES = libkeybox.a bin_PROGRAMS = kbxutil +if HAVE_W32CE_SYSTEM +extra_libs = $(LIBASSUAN_LIBS) +else +extra_libs = +endif + common_sources = \ keybox.h keybox-defs.h keybox-search-desc.h \ keybox-util.c \ @@ -47,7 +53,7 @@ libkeybox_a_SOURCES = $(common_sources) # to do it this way. kbxutil_SOURCES = kbxutil.c $(common_sources) kbxutil_LDADD = ../common/libcommon.a ../gl/libgnu.a \ - $(KSBA_LIBS) $(LIBGCRYPT_LIBS) \ + $(KSBA_LIBS) $(LIBGCRYPT_LIBS) $(extra_libs) \ $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV) $(W32SOCKLIBS) $(PROGRAMS) : ../common/libcommon.a ../gl/libgnu.a diff --git a/kbx/keybox-update.c b/kbx/keybox-update.c index e524292d5..c3aa5dc8d 100644 --- a/kbx/keybox-update.c +++ b/kbx/keybox-update.c @@ -26,6 +26,9 @@ #include <unistd.h> #include "keybox-defs.h" +#ifdef HAVE_DOSISH_SYSTEM +#include "../common/sysutils.h" +#endif #define EXTSEP_S "." @@ -174,7 +177,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) ) { @@ -184,7 +187,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 (rename (tmpfname, fname) ) { @@ -607,7 +610,8 @@ keybox_compress (KEYBOX_HANDLE hd) } } _keybox_release_blob (blob); - rewind (fp); + fseek (fp, 0, SEEK_SET); + clearerr (fp); } /* Create the new file. */ @@ -709,7 +713,7 @@ keybox_compress (KEYBOX_HANDLE hd) /* Rename or remove the temporary file. */ if (rc || !any_changes) - remove (tmpfname); + gnupg_remove (tmpfname); else rc = rename_tmp_file (bakfname, tmpfname, fname, hd->secret); |