mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpgconf does now work for Wince.
This commit is contained in:
parent
15330f36a7
commit
d9791119d0
9 changed files with 355 additions and 204 deletions
|
@ -1,3 +1,17 @@
|
|||
2010-08-23 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgconf-comp.c (GPGNAME) [W32CE]: s/gpg2/gpg/.
|
||||
(get_config_filename) [W32CE]: Adjust absolute file name check.
|
||||
|
||||
* gpgconf-comp.c (retrieve_options_from_program)
|
||||
(retrieve_options_from_file, retrieve_options_from_program)
|
||||
(copy_file, gc_process_gpgconf_conf): Do not use es_ferror after a
|
||||
failed es_fclose. Note that the stream is in any case invalid
|
||||
after calling es_fclose and that es_fclose does set ERRNO.
|
||||
|
||||
* Makefile.am (maybe_commonpth_libs): New.
|
||||
(gpgconf_LDADD): Use it.
|
||||
|
||||
2010-08-20 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgconf-comp.c (collect_error_output): Remove extra CRs.
|
||||
|
|
|
@ -67,6 +67,14 @@ endif
|
|||
|
||||
common_libs = $(libcommon) ../gl/libgnu.a
|
||||
commonpth_libs = $(libcommonpth) ../gl/libgnu.a
|
||||
|
||||
# Some modules require PTH under W32CE.
|
||||
if HAVE_W32CE_SYSTEM
|
||||
maybe_commonpth_libs = $(commonpth_libs)
|
||||
else
|
||||
maybe_commonpth_libs = $(common_libs)
|
||||
endif
|
||||
|
||||
if HAVE_W32CE_SYSTEM
|
||||
pwquery_libs =
|
||||
else
|
||||
|
@ -85,8 +93,8 @@ gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c
|
|||
|
||||
# common sucks in gpg-error, will they, nil they (some compilers
|
||||
# do not eliminate the supposed-to-be-unused-inline-functions).
|
||||
gpgconf_LDADD = $(common_libs) $(opt_libassuan_libs) \
|
||||
$(LIBINTL) $(GPG_ERROR_LIBS) $(NETLIBS) \
|
||||
gpgconf_LDADD = $(maybe_commonpth_libs) $(opt_libassuan_libs) \
|
||||
$(LIBINTL) $(GPG_ERROR_LIBS) $(PTH_LIBS) $(NETLIBS) \
|
||||
$(LIBICONV) $(W32SOCKLIBS)
|
||||
|
||||
gpgparsemail_SOURCES = gpgparsemail.c rfc822parse.c rfc822parse.h
|
||||
|
|
|
@ -54,9 +54,8 @@
|
|||
|
||||
/* There is a problem with gpg 1.4 under Windows: --gpgconf-list
|
||||
returns a plain filename without escaping. As long as we have not
|
||||
fixed that we need to use gpg2 - it might actually be better to use
|
||||
gpg2 in any case. */
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
fixed that we need to use gpg2. */
|
||||
#if defined(HAVE_W32_SYSTEM) && !defined(HAVE_W32CE_SYSTEM)
|
||||
#define GPGNAME "gpg2"
|
||||
#else
|
||||
#define GPGNAME "gpg"
|
||||
|
@ -1799,7 +1798,9 @@ get_config_filename (gc_component_t component, gc_backend_t backend)
|
|||
else
|
||||
filename = "";
|
||||
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
#if HAVE_W32CE_SYSTEM
|
||||
if (!(filename[0] == '/' || filename[0] == '\\'))
|
||||
#elif defined(HAVE_DOSISH_SYSTEM)
|
||||
if (!(filename[0]
|
||||
&& filename[1] == ':'
|
||||
&& (filename[2] == '/' || filename[2] == '\\')))
|
||||
|
@ -1916,7 +1917,7 @@ retrieve_options_from_program (gc_component_t component, gc_backend_t backend)
|
|||
}
|
||||
if (length < 0 || es_ferror (outfp))
|
||||
gc_error (1, errno, "error reading from %s", pgmname);
|
||||
if (es_fclose (outfp) && es_ferror (outfp))
|
||||
if (es_fclose (outfp))
|
||||
gc_error (1, errno, "error closing %s", pgmname);
|
||||
|
||||
err = gnupg_wait_process (pgmname, pid, 1, &exitcode);
|
||||
|
@ -2018,7 +2019,7 @@ retrieve_options_from_program (gc_component_t component, gc_backend_t backend)
|
|||
|
||||
if (length < 0 || es_ferror (config))
|
||||
gc_error (1, errno, "error reading from %s", config_filename);
|
||||
if (es_fclose (config) && es_ferror (config))
|
||||
if (es_fclose (config))
|
||||
gc_error (1, errno, "error closing %s", config_filename);
|
||||
}
|
||||
|
||||
|
@ -2098,7 +2099,7 @@ retrieve_options_from_file (gc_component_t component, gc_backend_t backend)
|
|||
if (config_option->flags & GC_OPT_FLAG_NO_CHANGE)
|
||||
list_option->flags |= GC_OPT_FLAG_NO_CHANGE;
|
||||
|
||||
if (list_file && fclose (list_file) && ferror (list_file))
|
||||
if (list_file && fclose (list_file))
|
||||
gc_error (1, errno, "error closing %s", list_filename);
|
||||
xfree (line);
|
||||
}
|
||||
|
@ -2328,9 +2329,9 @@ copy_file (const char *src_name, const char *dst_name)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (fclose (dst) && ferror (dst))
|
||||
if (fclose (dst))
|
||||
gc_error (1, errno, "error closing %s", dst_name);
|
||||
if (fclose (src) && ferror (src))
|
||||
if (fclose (src))
|
||||
gc_error (1, errno, "error closing %s", src_name);
|
||||
|
||||
return 0;
|
||||
|
@ -3623,7 +3624,7 @@ gc_process_gpgconf_conf (const char *fname_arg, int update, int defaults,
|
|||
gc_error (0, errno, "error reading from `%s'", fname);
|
||||
result = -1;
|
||||
}
|
||||
if (fclose (config) && ferror (config))
|
||||
if (fclose (config))
|
||||
gc_error (0, errno, "error closing `%s'", fname);
|
||||
|
||||
xfree (line);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue