diff options
author | Werner Koch <[email protected]> | 2018-10-31 11:27:27 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2018-10-31 11:35:14 +0000 |
commit | 3c04dea3ecebed35208f6b631b2e8b04222ea432 (patch) | |
tree | b8dbdf9bbceed60e1b2f9b4615e0a3d1dad9d550 /src/w32-util.c | |
parent | w32: Remove cruft in w32-io from WindowsME times. (diff) | |
download | gpgme-3c04dea3ecebed35208f6b631b2e8b04222ea432.tar.gz gpgme-3c04dea3ecebed35208f6b631b2e8b04222ea432.zip |
w32: Remove all support for WindowsCE
* configure.ac: Remove WindwosCE support.
* contrib/: Remove all; it was only used for WindowsCE.
* src/w32-ce.c, src/w32-ce.h: Remove files.
* src/Makefile.am (system_components): Remove these files.
* src/ath.c, src/ath.h: Remove W32CE support.
* src/data-compat.c (gpgme_data_new_from_filepart): Ditto.
(gpgme_data_new_from_file): Ditto.
* src/debug.c (debug_init, _gpgme_debug): Ditto.
* src/gpgme-tool.c (gpgme_server): Ditto.
(main): Ditto.
* src/priv-io.h: Do not include w32-ce.h.
* src/util.h: Remove WindowsCE support.
* src/w32-io.c: Ditto.
* src/w32-util.c: Ditto.
* src/debug.h (TRACE_SUC4): New.
--
There is no more hardware to test our code, the support for Windows CE
terminated along time ago. Note that our code worked only with the
old WindowsCE with that overall system limit of 31 processes.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/w32-util.c')
-rw-r--r-- | src/w32-util.c | 79 |
1 files changed, 1 insertions, 78 deletions
diff --git a/src/w32-util.c b/src/w32-util.c index ef9b5f36..79541898 100644 --- a/src/w32-util.c +++ b/src/w32-util.c @@ -65,9 +65,7 @@ #include "sys-util.h" -#ifndef HAVE_W32CE_SYSTEM #define HAVE_ALLOW_SET_FOREGROUND_WINDOW 1 -#endif #ifndef F_OK # define F_OK 0 #endif @@ -303,53 +301,6 @@ read_w32_registry_string (const char *root, const char *dir, const char *name) } result[nbytes] = 0; /* Make sure it is really a string. */ -#ifndef HAVE_W32CE_SYSTEM - /* Windows CE does not have an environment. */ - if (type == REG_EXPAND_SZ && strchr (result, '%')) - { - char *tmp; - - n1 += 1000; - tmp = malloc (n1 + 1); - if (!tmp) - goto leave; - nbytes = ExpandEnvironmentStrings (result, tmp, n1); - if (nbytes && nbytes > n1) - { - free (tmp); - n1 = nbytes; - tmp = malloc (n1 + 1); - if (!tmp) - goto leave; - nbytes = ExpandEnvironmentStrings (result, tmp, n1); - if (nbytes && nbytes > n1) { - free (tmp); /* Oops - truncated, better don't expand at all. */ - goto leave; - } - tmp[nbytes] = 0; - free (result); - result = tmp; - } - else if (nbytes) /* Okay, reduce the length. */ - { - tmp[nbytes] = 0; - free (result); - result = malloc (strlen (tmp)+1); - if (!result) - result = tmp; - else - { - strcpy (result, tmp); - free (tmp); - } - } - else /* Error - don't expand. */ - { - free (tmp); - } - } -#endif - leave: RegCloseKey (key_handle); return result; @@ -652,15 +603,8 @@ _gpgme_get_conf_int (const char *key, int *value) return 1; } - -#ifdef HAVE_W32CE_SYSTEM -int -_gpgme_mkstemp (int *fd, char **name) -{ - return -1; -} -#else + /* mkstemp extracted from libc/sysdeps/posix/tempname.c. Copyright (C) 1991-1999, 2000, 2001, 2006 Free Software Foundation, Inc. @@ -794,30 +738,9 @@ _gpgme_mkstemp (int *fd, char **name) *name = tmpname; return 0; } -#endif -#ifdef HAVE_W32CE_SYSTEM -/* Return a malloced string with the replacement value for the - GPGME_DEBUG envvar. Caller must release. Returns NULL if not - set. */ -char * -_gpgme_w32ce_get_debug_envvar (void) -{ - char *tmp; - - tmp = read_w32_registry_string (NULL, "\\Software\\GNU\\gpgme", "debug"); - if (tmp && !*tmp) - { - free (tmp); - tmp = NULL; - } - return tmp; -} -#endif /*HAVE_W32CE_SYSTEM*/ - - /* Entry point called by the DLL loader. */ #ifdef DLL_EXPORT int WINAPI |