diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-06-07 16:16:14 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-06-07 16:16:14 +0900 |
commit | 13e7650f4924cfdf94fad72f47f62a88e1c835ec (patch) | |
tree | 247f09bb8b5f2017e61b0f6c73216383812c9855 | |
parent | ff3b2ea8858a7f95633edf0d41d1815048aa8ac8 (diff) | |
download | libgpg-error-13e7650f4924cfdf94fad72f47f62a88e1c835ec.tar.gz |
Remove WindowsCE support.
* Makefile.am: Remove contrib/ChangeLog-2011.
* configure.ac (have_w32ce_system): Remove.
(HAVE_W32CE_SYSTEM): Remove.
* contrib/*: Remove.
* src/w32ce-add.h: Remove
* src/Makefile.am [HAVE_W32CE_SYSTEM]: Remove.
* src/estream-printf.c [HAVE_W32CE_SYSTEM]: Remove.
* src/estream.c: Likewise.
* src/gpg-error.def.in: Likewise.
* src/gpgrt-int.h: Fix comments.
* src/init.c: Remove HAVE_W32CE_SYSTEM support.
* src/init.h: Likewise.
* src/spawn-posix.c: Likewise.
* src/spawn-w32.c: Likewise.
* src/sysutils.c: Likewise.
* src/w32-estream.c: Likewise.
* src/w32-reg.c: Likewise.
* tests/Makefile.am: Remove HAVE_W32CE_SYSTEM support.
--
GnuPG-bug-id: 5912
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | contrib/ChangeLog-2011 | 25 | ||||
-rwxr-xr-x | contrib/conf-w32ce-msc/build.mk | 144 | ||||
-rwxr-xr-x | contrib/conf-w32ce-msc/config.h | 153 | ||||
-rwxr-xr-x | contrib/conf-w32ce-msc/stdint.h | 9 | ||||
-rw-r--r-- | src/Makefile.am | 37 | ||||
-rw-r--r-- | src/estream-printf.c | 12 | ||||
-rw-r--r-- | src/estream.c | 34 | ||||
-rw-r--r-- | src/gpg-error.def.in | 4 | ||||
-rw-r--r-- | src/gpgrt-int.h | 12 | ||||
-rw-r--r-- | src/init.c | 63 | ||||
-rw-r--r-- | src/init.h | 9 | ||||
-rw-r--r-- | src/spawn-posix.c | 2 | ||||
-rw-r--r-- | src/spawn-w32.c | 2 | ||||
-rw-r--r-- | src/sysutils.c | 6 | ||||
-rw-r--r-- | src/w32-estream.c | 42 | ||||
-rw-r--r-- | src/w32-reg.c | 2 | ||||
-rw-r--r-- | src/w32ce-add.h | 8 | ||||
-rw-r--r-- | tests/Makefile.am | 8 |
20 files changed, 15 insertions, 574 deletions
diff --git a/Makefile.am b/Makefile.am index 074b9a3..8897f17 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,7 +35,7 @@ GITLOG_TO_CHANGELOG=gitlog-to-changelog EXTRA_DIST = autogen.sh autogen.rc libgpg-error.spec.in \ VERSION COPYING COPYING.LIB doc/HACKING ChangeLog-2011 \ - po/ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 \ + po/ChangeLog-2011 m4/ChangeLog-2011 \ build-aux/git-log-footer build-aux/git-log-fix diff --git a/configure.ac b/configure.ac index 3c74045..a123630 100644 --- a/configure.ac +++ b/configure.ac @@ -122,16 +122,11 @@ AC_SUBST([LDADD_FOR_TESTS_KLUDGE]) # Set some variables depending on the platform for later use. have_w32_system=no have_w64_system=no -have_w32ce_system=no case "${host}" in x86_64-*mingw32*) have_w32_system=yes have_w64_system=yes ;; - *-mingw32ce*) - have_w32_system=yes - have_w32ce_system=yes - ;; *-mingw32*) have_w32_system=yes ;; @@ -529,11 +524,7 @@ if test "x$LIBMULTITHREAD" != x; then else GPG_ERROR_CONFIG_MT_LIBS="" fi -if test "$have_w32ce_system" = yes; then - GPG_ERROR_CONFIG_CFLAGS="-idirafter \${includedir}/gpg-extra" -else - GPG_ERROR_CONFIG_CFLAGS="" -fi +GPG_ERROR_CONFIG_CFLAGS="" if test "x$THREADLIB_CPPFLAGS" != x; then GPG_ERROR_CONFIG_MT_CFLAGS="${THREADLIB_CPPFLAGS}" else @@ -591,9 +582,6 @@ if test "$have_w32_system" = yes; then if test "$have_w64_system" = yes; then AC_DEFINE(HAVE_W64_SYSTEM,1,[Defined if we run on 64 bit W32 API system]) fi - if test "$have_w32ce_system" = yes; then - AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE]) - fi force_use_syscfg=yes fi if test x"$gl_use_threads" = xno; then @@ -627,7 +615,6 @@ fi AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes) AM_CONDITIONAL(HAVE_W64_SYSTEM, test "$have_w64_system" = yes) -AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes) AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes) AM_CONDITIONAL(FORCE_USE_SYSCFG, test x$force_use_syscfg = xyes) AM_CONDITIONAL(HAVE_GENERATED_LOCK_OBJ_H, test x$lock_obj_h_generated = xyes) diff --git a/contrib/ChangeLog-2011 b/contrib/ChangeLog-2011 deleted file mode 100644 index 87c1aa4..0000000 --- a/contrib/ChangeLog-2011 +++ /dev/null @@ -1,25 +0,0 @@ -2011-12-01 Werner Koch <wk@g10code.com> - - NB: ChangeLog files are no longer manually maintained. Starting - on December 1st, 2011 we put change information only in the GIT - commit log, and generate a top-level ChangeLog file from logs at - "make dist". See doc/HACKING for details. - -2010-11-15 Marcus Brinkmann <mb@g10code.com> - - * conf-w32ce-msc/stdint.h: New file. - * conf-w32ce-msc/build.mk (conf_sources): Add stdint.h. - -2010-11-15 Werner Koch <wk@g10code.com> - - * conf-w32ce-msc/build.mk (clean): New. - -2010-11-02 Werner Koch <wk@g10code.com> - - * conf-w32ce-msc/build.mk: Change directory layout. Provide - install target. - -2010-10-28 Werner Koch <wk@g10code.com> - - * contrib/conf-w32ce-msc/build.mk: New. - * contrib/conf-w32ce-msc/config.h: New. diff --git a/contrib/conf-w32ce-msc/build.mk b/contrib/conf-w32ce-msc/build.mk deleted file mode 100755 index 0909509..0000000 --- a/contrib/conf-w32ce-msc/build.mk +++ /dev/null @@ -1,144 +0,0 @@ -# build.mk - Makefile to build libgpg-error using Visual-C -# Copyright 2010 g10 Code GmbH -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This file is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This is a helper make script to build libgpg-error for WindowsCE -# using the Microsoft Visual C compiler. - -# The target build directory where we run the Visual C compiler/ This -# needs to be an absolute directory name. Further we expect this -# structure of the tree: -# -# TARGET/src - Source directories: One directory for each project -# /bin - Installed DLLs -# /lib - Installed import libs. -# /include - Instaled header files. - -targetdir = /home/smb/xppro-gnu -targetsrc = $(targetdir)/src - -# Install directories (relative) -bindir = ../../../bin -libdir = ../../../lib -incdir = ../../../include - -help: - @echo "Run " - @echo " make -f ../contrib/conf-w32ce-msc/build.mk copy-source" - @echo "on the POSIX system and then" - @echo " nmake -f build.mk all" - @echo " nmake -f build.mk install" - @echo "on the Windows system" - -ce_defines = -DWINCE -D_WIN32_WCE=0x502 -DUNDER_CE \ - -DWIN32_PLATFORM_PSPC -D_UNICODE -DUNICODE \ - -D_CONSOLE -DARM -D_ARM_ -#-D_DEBUG -DDEBUG - -# Some options of Visual-C: -# -W3 Set warning level 3 -# -Zi Generate debug info -# -Od Disable optimization -# -Gm Enable minimal rebuild (for C++) -# -EHsc Exception handling model sc -# -MTd Create a debug multithreaded executable -# -fp: Floating point behaviour -# -GR- Disable runtime type information -# -Os Favor small code -# -LD Create a DLL -# -Fe Set executable output name (may be only a directory) -CFLAGS = -nologo -W3 -fp:fast -Os $(ce_defines) \ - -DHAVE_CONFIG_H -DDLL_EXPORT -I. -Igpg-extra - -LDFLAGS = - -# Standard source files -sources = \ - init.c init.h \ - strsource.c \ - strerror.c \ - code-to-errno.c \ - code-from-errno.c \ - w32-gettext.c \ - gettext.h \ - err-sources.h \ - err-codes.h - -# Sources files in this directory inclduing this Makefile -conf_sources = \ - build.mk \ - config.h \ - stdint.h - -# Source files built by running the standard build system. -built_sources = \ - code-from-errno.h \ - code-to-errno.h \ - err-codes-sym.h \ - err-sources-sym.h \ - errnos-sym.h \ - gpg-error.h \ - mkerrcodes.h \ - mkw32errmap.map.c \ - gpg-error.def \ - gpg-extra/errno.h - -copy-static-source: - @if [ ! -f ./w32-gettext.c ]; then \ - echo "Please cd to the src/ directory first"; \ - exit 1; \ - fi - cp -t $(targetsrc)/libgpg-error/src $(sources); - cd ../contrib/conf-w32ce-msc ; \ - cp -t $(targetsrc)/libgpg-error/src $(conf_sources) - - -copy-built-source: - @if [ ! -f ./mkw32errmap.map.c ]; then \ - echo "Please build using ./autogen.sh --build-w32ce first"; \ - exit 1; \ - fi - cp -t $(targetsrc)/libgpg-error/src $(built_sources) - -mkdir $(targetsrc)/libgpg-error/src/gpg-extra - mv $(targetsrc)/libgpg-error/src/errno.h \ - $(targetsrc)/libgpg-error/src/gpg-extra - -copy-source: copy-static-source copy-built-source - - -all: $(sources) $(conf_sources) $(built_sources) - $(CC) $(CFLAGS) -c w32-gettext.c - $(CC) $(CFLAGS) -c init.c - $(CC) $(CFLAGS) -c strsource.c - $(CC) $(CFLAGS) -c strerror.c - $(CC) $(CFLAGS) -c code-to-errno.c - $(CC) $(CFLAGS) -c code-from-errno.c - link.exe /DLL /IMPLIB:libgpg-error-0-msc.lib \ - /OUT:libgpg-error-0-msc.dll \ - /DEF:gpg-error.def /NOLOGO /MANIFEST:NO \ - /NODEFAULTLIB:"oldnames.lib" /DYNAMICBASE:NO \ - w32-gettext.obj init.obj strsource.obj strerror.obj \ - code-to-errno.obj code-from-errno.obj \ - coredll.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib \ - commctrl.lib /subsystem:windowsce,5.02 - -install: all - -mkdir $(bindir:/=\) - -mkdir $(libdir:/=\) - -mkdir $(incdir:/=\) - -mkdir $(incdir:/=\)\gpg-extra - copy /y gpg-error.h $(incdir:/=\) - copy /y gpg-extra\errno.h $(incdir:/=\)\gpg-extra - copy /y libgpg-error-0-msc.dll $(bindir:/=\) - copy /y libgpg-error-0-msc.lib $(libdir:/=\) - -clean: - del *.obj libgpg-error-0-msc.lib \ - libgpg-error-0-msc.dll libgpg-error-0-msc.exe diff --git a/contrib/conf-w32ce-msc/config.h b/contrib/conf-w32ce-msc/config.h deleted file mode 100755 index 1d8132c..0000000 --- a/contrib/conf-w32ce-msc/config.h +++ /dev/null @@ -1,153 +0,0 @@ -/* config.h for building with Visual-C for WindowsCE. - * Copyright 2010 g10 Code GmbH - * - * This file is free software; as a special exception the author gives - * unlimited permission to copy and/or distribute it, with or without - * modifications, as long as this notice is preserved. - * - * This file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* This file was originally created by running - * ./autogen.sh --build-w32ce - * on svn revision 253 (libgpg-error 1.10) and then adjusted to work - * with Visual-C. - */ - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.11-msc1" - - -/* Name of package */ -#define PACKAGE "libgpg-error" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-gnupg@gnupg.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "libgpg-error" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "libgpg-error " PACKAGE_VERSION - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "libgpg-error" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - - - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -/* #undef ENABLE_NLS */ - -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYCURRENT */ - -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the <dlfcn.h> header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define if you have the iconv() function and it works. */ -/* #undef HAVE_ICONV */ - -/* Define to 1 if you have the <inttypes.h> header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the <locale.h> header file. */ -/* #undef HAVE_LOCALE_H */ - -/* Define to 1 if you have the <memory.h> header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the <stdint.h> header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the <stdlib.h> header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the <strings.h> header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the <string.h> header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the <unistd.h> header file. */ -#define HAVE_UNISTD_H 1 - -/* Defined if we run on WindowsCE */ -#define HAVE_W32CE_SYSTEM 1 - -/* Defined if we run on a W32 API based system */ -#define HAVE_W32_SYSTEM 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - - -/* Version number of package */ -#define VERSION PACKAGE_VERSION - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - - -/* Force using of NLS for W32 even if no libintl has been found. This is - okay because we have our own gettext implementation for W32. */ -#if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS) -#define ENABLE_NLS 1 -#endif -/* For building we need to define these macro. */ -#define GPG_ERR_ENABLE_GETTEXT_MACROS 1 -#define GPG_ERR_ENABLE_ERRNO_MACROS 1 - -/* snprintf is not part of oldnames.lib thus we redefine it here. */ -#define snprintf _snprintf - diff --git a/contrib/conf-w32ce-msc/stdint.h b/contrib/conf-w32ce-msc/stdint.h deleted file mode 100755 index 0a821b7..0000000 --- a/contrib/conf-w32ce-msc/stdint.h +++ /dev/null @@ -1,9 +0,0 @@ -typedef unsigned long long uint64_t; -typedef long long int64_t; -typedef unsigned int uint32_t; -typedef int int32_t; -typedef unsigned short uint16_t; -typedef short int16_t; -typedef unsigned int uintptr_t; -typedef int intptr_t; - diff --git a/src/Makefile.am b/src/Makefile.am index 34e0476..b8334a4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,13 +24,8 @@ # depend on the configuration anyway. # -if HAVE_W32CE_SYSTEM -gpg_extra_headers = gpg-extra/errno.h -extra_cppflags = -idirafter gpg-extra -else gpg_extra_headers = extra_cppflags = -endif localedir = $(datadir)/locale @@ -96,7 +91,7 @@ pkgconfig_DATA = gpg-error.pc EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ mkerrnos.awk errnos.in README \ mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ - mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \ + mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h \ err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 gpgrt.m4 \ gpg-error.vers gpg-error.def.in \ versioninfo.rc.in gpg-error.w32-manifest.in \ @@ -253,20 +248,8 @@ mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers) $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ -rm _$@ -if HAVE_W32CE_SYSTEM -# It is correct to use $(CPP). We want the host's idea of the error codes. -mkw32errmap.tab.h: Makefile mkw32errmap.c - $(CPP) -DRESOLVE_MACROS $(srcdir)/mkw32errmap.c | \ - grep '{&mkw32errmap_marker' >$@ -mkw32errmap.map.c: mkw32errmap$(EXEEXT_FOR_BUILD) - ./mkw32errmap$(EXEEXT_FOR_BUILD) --map > $@ -gpg-extra/errno.h: mkw32errmap$(EXEEXT_FOR_BUILD) - -$(MKDIR_P) gpg-extra - ./mkw32errmap$(EXEEXT_FOR_BUILD) > $@ -else mkw32errmap.map.c: echo "/*dummy*/" > $@ -endif # We use CC proper for preprocessing thus we have to convince it that # the data is really to be preprocessed. @@ -282,14 +265,6 @@ mkerrcodes$(EXEEXT_FOR_BUILD): mkerrcodes.c mkerrcodes.h Makefile $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ $(CPPFLAGS_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkerrcodes.c -if HAVE_W32CE_SYSTEM -# It is correct to use $(CC_FOR_BUILD) here. We want to run the -# program at build time. -mkw32errmap$(EXEEXT_FOR_BUILD): mkw32errmap.c mkw32errmap.tab.h Makefile - $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ - $(CPPFLAGS_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkw32errmap.c -endif - code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile ./mkerrcodes$(EXEEXT_FOR_BUILD) | $(AWK) -f $(srcdir)/mkerrcodes2.awk >$@ @@ -309,7 +284,6 @@ parts_of_gpg_error_h = \ err-codes.h.in \ errnos.in \ w32-add.h \ - w32ce-add.h \ $(lock_obj_pub) # If we are cross-compiling or building on Windows we better make sure @@ -356,12 +330,3 @@ gpg-error-config: gpgrt-config gpg-error-config-old gpg-error-config-test.sh exit 1; \ fi cp gpg-error-config-old $@ - -install-data-local: -if HAVE_W32CE_SYSTEM - -$(MKDIR_P) "$(DESTDIR)$(includedir)/gpg-extra" - $(INSTALL_DATA) gpg-extra/errno.h \ - "$(DESTDIR)$(includedir)/gpg-extra/errno.h" -else - : -endif diff --git a/src/estream-printf.c b/src/estream-printf.c index fe25657..831af55 100644 --- a/src/estream-printf.c +++ b/src/estream-printf.c @@ -77,9 +77,6 @@ #if defined(_WIN32) && !defined(HAVE_W32_SYSTEM) # define HAVE_W32_SYSTEM 1 -# if defined(__MINGW32CE__) && !defined (HAVE_W32CE_SYSTEM) -# define HAVE_W32CE_SYSTEM -# endif #endif #include <stdio.h> @@ -97,9 +94,6 @@ #ifdef HAVE_LANGINFO_THOUSEP #include <langinfo.h> #endif -#ifdef HAVE_W32CE_SYSTEM -#include <gpg-error.h> /* ERRNO replacement. */ -#endif #ifdef _ESTREAM_PRINTF_EXTRA_INCLUDE # include _ESTREAM_PRINTF_EXTRA_INCLUDE #endif @@ -116,11 +110,7 @@ #endif /* A wrapper to set ERRNO. */ -#ifdef HAVE_W32CE_SYSTEM -# define _set_errno(a) gpg_err_set_errno ((a)) -#else -# define _set_errno(a) do { errno = (a); } while (0) -#endif +#define _set_errno(a) do { errno = (a); } while (0) /* Calculate array dimension. */ diff --git a/src/estream.c b/src/estream.c index 32f8f48..07a5d97 100644 --- a/src/estream.c +++ b/src/estream.c @@ -62,9 +62,6 @@ #if defined(_WIN32) && !defined(HAVE_W32_SYSTEM) # define HAVE_W32_SYSTEM 1 -# if defined(__MINGW32CE__) && !defined (HAVE_W32CE_SYSTEM) -# define HAVE_W32CE_SYSTEM -# endif #endif #ifdef HAVE_SYS_TIME_H @@ -146,14 +143,7 @@ #endif -#ifdef HAVE_W32CE_SYSTEM -# define _set_errno(a) gpg_err_set_errno ((a)) -/* Setmode is missing in cegcc but available since CE 5.0. */ -int _setmode (int handle, int mode); -# define setmode(a,b) _setmode ((a),(b)) -#else -# define _set_errno(a) do { errno = (a); } while (0) -#endif +#define _set_errno(a) do { errno = (a); } while (0) #define IS_INVALID_FD(a) ((a) == -1) @@ -1590,9 +1580,6 @@ func_w32_seek (void *cookie, gpgrt_off_t *offset, int whence) _set_errno (EINVAL); return -1; } -#ifdef HAVE_W32CE_SYSTEM -# warning need to use SetFilePointer -#else if (!w32_cookie->no_syscall_clamp) _gpgrt_pre_syscall (); if (!SetFilePointerEx (w32_cookie->hd, distance, &newoff, method)) @@ -1603,7 +1590,6 @@ func_w32_seek (void *cookie, gpgrt_off_t *offset, int whence) } if (!w32_cookie->no_syscall_clamp) _gpgrt_post_syscall (); -#endif /* Note that gpgrt_off_t is always 64 bit. */ *offset = (gpgrt_off_t)newoff.QuadPart; return 0; @@ -5024,15 +5010,9 @@ tmpfd (void) { #ifdef HAVE_W32_SYSTEM int attempts, n; -#ifdef HAVE_W32CE_SYSTEM - wchar_t buffer[MAX_PATH+9+12+1]; -# define mystrlen(a) wcslen (a) - wchar_t *name, *p; -#else char buffer[MAX_PATH+9+12+1]; # define mystrlen(a) strlen (a) char *name, *p; -#endif HANDLE file; int pid = GetCurrentProcessId (); unsigned int value; @@ -5045,11 +5025,7 @@ tmpfd (void) return -1; } p = buffer + mystrlen (buffer); -#ifdef HAVE_W32CE_SYSTEM - wcscpy (p, L"_estream"); -#else strcpy (p, "_estream"); -#endif p += 8; /* We try to create the directory but don't care about an error as it may already exist and the CreateFile would throw an error @@ -5066,11 +5042,7 @@ tmpfd (void) *p++ = tohex (((value >> 28) & 0x0f)); value <<= 4; } -#ifdef HAVE_W32CE_SYSTEM - wcscpy (p, L".tmp"); -#else strcpy (p, ".tmp"); -#endif file = CreateFile (buffer, GENERIC_READ | GENERIC_WRITE, 0, @@ -5080,16 +5052,12 @@ tmpfd (void) NULL); if (file != INVALID_HANDLE_VALUE) { -#ifdef HAVE_W32CE_SYSTEM - int fd = (int)file; -#else int fd = _open_osfhandle ((intptr_t)file, 0); if (fd == -1) { CloseHandle (file); return -1; } -#endif return fd; } Sleep (1); /* One ms as this is the granularity of GetTickCount. */ diff --git a/src/gpg-error.def.in b/src/gpg-error.def.in index c75b317..28e9ef3 100644 --- a/src/gpg-error.def.in +++ b/src/gpg-error.def.in @@ -34,10 +34,6 @@ EXPORTS /* @6 - Not anymore used. */ gpg_err_code_from_syserror @7 gpg_err_set_errno @8 -#ifdef HAVE_W32CE_SYSTEM - _gpg_w32ce_get_errno @9 - _gpg_w32ce_strerror @10 -#endif #ifdef HAVE_W32_SYSTEM _gpg_w32_bindtextdomain @11 _gpg_w32_textdomain @12 diff --git a/src/gpgrt-int.h b/src/gpgrt-int.h index a541620..cb14191 100644 --- a/src/gpgrt-int.h +++ b/src/gpgrt-int.h @@ -667,14 +667,14 @@ gpg_err_code_t _gpgrt_make_pipe (int filedes[2], estream_t *r_fp, * * GPGRT_SPAWN_DETACHED * If set the process will be started as a background process. - * This flag is only useful under W32 (but not W32CE) systems, - * so that no new console is created and pops up a console - * window when starting the server. Does not work on W32CE. + * This flag is only useful under W32 systems, so that no new + * console is created and pops up a console window when starting + * the server. * * GPGRT_SPAWN_RUN_ASFW - * On W32 (but not on W32CE) run AllowSetForegroundWindow for - * the child. Note that due to unknown problems this actually - * allows SetForegroundWindow for all children of this process. + * On W32 run AllowSetForegroundWindow for the child. Note that + * due to unknown problems this actually allows + * SetForegroundWindow for all children of this process. */ gpg_err_code_t _gpgrt_spawn_process (const char *pgmname, const char *argv[], @@ -30,17 +30,6 @@ #include "gettext.h" #include "init.h" -#ifdef HAVE_W32CE_SYSTEM -# include "mkw32errmap.map.c" /* Generated map_w32codes () */ -# ifndef TLS_OUT_OF_INDEXES -# define TLS_OUT_OF_INDEXES 0xFFFFFFFF -# endif -# ifndef __MINGW32CE__ -# /* Replace the Mingw32CE provided abort function. */ -# define abort() do { TerminateProcess (GetCurrentProcess(), 8); } while (0) -# endif -#endif - /* Locale directory support. */ @@ -426,11 +415,7 @@ _gpgrt_free (void *a) void _gpg_err_set_errno (int err) { -#ifdef HAVE_W32CE_SYSTEM - SetLastError (err); -#else /*!HAVE_W32CE_SYSTEM*/ errno = err; -#endif /*!HAVE_W32CE_SYSTEM*/ } @@ -649,54 +634,6 @@ get_tls (void) } -/* Return the value of the ERRNO variable. This needs to be a - function so that we can have a per-thread ERRNO. This is used only - on WindowsCE because that OS misses an errno. */ -#ifdef HAVE_W32CE_SYSTEM -int -_gpg_w32ce_get_errno (void) -{ - return map_w32codes ( GetLastError () ); -} -#endif /*HAVE_W32CE_SYSTEM*/ - - -/* Replacement strerror function for WindowsCE. */ -#ifdef HAVE_W32CE_SYSTEM -char * -_gpg_w32ce_strerror (int err) -{ - struct tls_space_s *tls = get_tls (); - wchar_t tmpbuf[STRBUFFER_SIZE]; - int n; - - if (err == -1) - err = _gpg_w32ce_get_errno (); - - /* Note: On a German HTC Touch Pro2 device I also tried - LOCALE_USER_DEFAULT and LOCALE_SYSTEM_DEFAULT - both returned - English messages. */ - if (FormatMessageW (FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, - MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - tmpbuf, STRBUFFER_SIZE -1, - NULL)) - { - n = WideCharToMultiByte (CP_UTF8, 0, tmpbuf, -1, - tls->strerror_buffer, - sizeof tls->strerror_buffer -1, - NULL, NULL); - } - else - n = -1; - - if (n < 0) - snprintf (tls->strerror_buffer, sizeof tls->strerror_buffer -1, - "[w32err=%d]", err); - return tls->strerror_buffer; -} -#endif /*HAVE_W32CE_SYSTEM*/ - - /* Entry point called by the DLL loader. */ #ifdef DLL_EXPORT int WINAPI @@ -40,20 +40,11 @@ struct domainlist_s -/* 119 bytes for an error message should be enough. With this size we - can assume that the allocation does not take up more than 128 bytes - per thread. Note that this is only used for W32CE. */ -#define STRBUFFER_SIZE 120 - /* The TLS space definition. */ struct tls_space_s { /* Flag used by w32-gettext. */ int gt_use_utf8; - -#ifdef HAVE_W32CE_SYSTEM - char strerror_buffer[STRBUFFER_SIZE]; -#endif }; /* Return the TLS. */ diff --git a/src/spawn-posix.c b/src/spawn-posix.c index d33bade..54a6a68 100644 --- a/src/spawn-posix.c +++ b/src/spawn-posix.c @@ -23,7 +23,7 @@ #include <config.h> -#if defined(HAVE_W32_SYSTEM) || defined (HAVE_W32CE_SYSTEM) +#if defined(HAVE_W32_SYSTEM) #error This code is only used on POSIX #endif diff --git a/src/spawn-w32.c b/src/spawn-w32.c index 1b5f085..90c0538 100644 --- a/src/spawn-w32.c +++ b/src/spawn-w32.c @@ -23,7 +23,7 @@ #include <config.h> -#if !defined(HAVE_W32_SYSTEM) || defined (HAVE_W32CE_SYSTEM) +#if !defined(HAVE_W32_SYSTEM) #error This code is only used on W32. #endif diff --git a/src/sysutils.c b/src/sysutils.c index bc3a68d..1251ed6 100644 --- a/src/sysutils.c +++ b/src/sysutils.c @@ -436,11 +436,7 @@ _gpgrt_chdir (const char *name) char * _gpgrt_getcwd (void) { -#ifdef HAVE_W32CE_SYSTEM - - return xtrystrdup ("/"); - -#elif defined(HAVE_W32_SYSTEM) +#if defined(HAVE_W32_SYSTEM) wchar_t wbuffer[MAX_PATH + sizeof(wchar_t)]; DWORD wlen; char *buf, *p; diff --git a/src/w32-estream.c b/src/w32-estream.c index e17ea2c..06851a5 100644 --- a/src/w32-estream.c +++ b/src/w32-estream.c @@ -168,8 +168,6 @@ reader (void *arg) if (nread < 0) { ctx->error_code = (int) errno; - /* NOTE (W32CE): Do not ignore ERROR_BUSY! Check at - least stop_me if that happens. */ if (ctx->error_code == ERROR_BROKEN_PIPE) { ctx->eof = 1; @@ -268,12 +266,7 @@ create_reader (estream_cookie_w32_pollable_t pcookie) InitializeCriticalSection (&ctx->mutex); -#ifdef HAVE_W32CE_SYSTEM - ctx->thread_hd = CreateThread (&sec_attr, 64 * 1024, reader, ctx, - STACK_SIZE_PARAM_IS_A_RESERVATION, &tid); -#else ctx->thread_hd = CreateThread (&sec_attr, 0, reader, ctx, 0, &tid); -#endif if (!ctx->thread_hd) { @@ -314,22 +307,6 @@ destroy_reader (struct reader_context_s *ctx) SetEvent (ctx->have_space_ev); LeaveCriticalSection (&ctx->mutex); -#ifdef HAVE_W32CE_SYSTEM - /* Scenario: We never create a full pipe, but already started - reading. Then we need to unblock the reader in the pipe driver - to make our reader thread notice that we want it to go away. */ - - if (ctx->file_hd != INVALID_HANDLE_VALUE) - { - if (!DeviceIoControl (ctx->file_hd, GPGCEDEV_IOCTL_UNBLOCK, - NULL, 0, NULL, 0, NULL, NULL)) - { - trace (("%p: unblock control call failed: ec=%d", - ctx, (int)GetLastError ())); - } - } -#endif - /* XXX is it feasible to unblock the thread? */ /* After setting this event CTX is void. */ @@ -571,12 +548,7 @@ create_writer (estream_cookie_w32_pollable_t pcookie) InitializeCriticalSection (&ctx->mutex); -#ifdef HAVE_W32CE_SYSTEM - ctx->thread_hd = CreateThread (&sec_attr, 64 * 1024, writer, ctx, - STACK_SIZE_PARAM_IS_A_RESERVATION, &tid); -#else ctx->thread_hd = CreateThread (&sec_attr, 0, writer, ctx, 0, &tid ); -#endif if (!ctx->thread_hd) { @@ -621,20 +593,6 @@ destroy_writer (struct writer_context_s *ctx) /* Give the writer a chance to flush the buffer. */ WaitForSingleObject (ctx->is_empty, INFINITE); -#ifdef HAVE_W32CE_SYSTEM - /* Scenario: We never create a full pipe, but already started - writing more than the pipe buffer. Then we need to unblock the - writer in the pipe driver to make our writer thread notice that - we want it to go away. */ - - if (!DeviceIoControl (ctx->file_hd, GPGCEDEV_IOCTL_UNBLOCK, - NULL, 0, NULL, 0, NULL, NULL)) - { - trace (("%p: unblock control call failed: ec=%d", - ctx, (int)GetLastError ())); - } -#endif - /* After setting this event CTX is void. */ trace (("%p: set close_ev", ctx)); SetEvent (ctx->close_ev); diff --git a/src/w32-reg.c b/src/w32-reg.c index d1d2ca6..5510df8 100644 --- a/src/w32-reg.c +++ b/src/w32-reg.c @@ -102,7 +102,6 @@ _gpgrt_w32_reg_query_string (const char *root, const char *dir, } result[nbytes] = 0; /* Make sure it is really a string. */ -#ifndef HAVE_W32CE_SYSTEM /* (Windows CE has no environment.) */ if (type == REG_EXPAND_SZ && strchr (result, '%')) { char *tmp; @@ -146,7 +145,6 @@ _gpgrt_w32_reg_query_string (const char *root, const char *dir, xfree (tmp); } } -#endif leave: RegCloseKey (key_handle); diff --git a/src/w32ce-add.h b/src/w32ce-add.h deleted file mode 100644 index c6207bb..0000000 --- a/src/w32ce-add.h +++ /dev/null @@ -1,8 +0,0 @@ -## w32ce-add.h - Snippet to be be included into gpg-error.h. -## (Comments are indicated by a double hash mark) - -/* Substitute for strerror - this one is thread safe. */ -char *_gpg_w32ce_strerror (int err); -#ifdef GPG_ERR_ENABLE_ERRNO_MACROS -# define strerror(a) _gpg_w32ce_strerror (a) -#endif diff --git a/tests/Makefile.am b/tests/Makefile.am index 9652982..61453ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -19,12 +19,6 @@ ## Process this file with automake to produce Makefile.in -if HAVE_W32CE_SYSTEM -extra_includes = -idirafter $(top_builddir)/src/gpg-extra -else -extra_includes = -endif - EXTRA_DIST = t-argparse.conf etc/t-argparse.conf gpg_error_lib = ../src/libgpg-error.la @@ -36,7 +30,7 @@ if HAVE_LOCK_OPTIMIZATION TESTS += t-lock-single-posix endif -AM_CPPFLAGS = -I$(top_builddir)/src $(extra_includes) +AM_CPPFLAGS = -I$(top_builddir)/src AM_LDFLAGS = -no-install LDADD = $(gpg_error_lib) @LDADD_FOR_TESTS_KLUDGE@ |