summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-06-28 12:05:04 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-06-28 12:05:04 +0900
commit14ead267268f8ed14bf1ab49189646a95654b706 (patch)
tree19424bb2bacde3198c0f139e2d42c8c2225cac16
parent084d135f44a027e86f1005c893935464ffbc4b82 (diff)
downloadlibgpg-error-14ead267268f8ed14bf1ab49189646a95654b706.tar.gz
Remove Windows CE support.
* contrib/*: Remove. * Makefile.am: Remove contrib. * autogen.sh: Remove Windows CE support. * configure.ac (have_w32ce_system): Remove. * src/Makefile.am [HAVE_W32CE_SYSTEM] (extra_cppflags): Remove. (gpg_extra_headers): Remove. (EXTRA_DIST): Remove mkw32errmap.c and w32ce-add.h (BUILT_SOURCES): Remove mkw32errmap.map.c. (tmp_files): Remove mkw32errmap.tab.h mkw32errmap.map.c (CLEANFILES): Likewise. * src/estream-printf.c [HAVE_W32CE_SYSTEM]: Remove. * src/estream.c [HAVE_W32CE_SYSTEM]: Remove. * src/gpg-error.def.in [HAVE_W32CE_SYSTEM]: Remove. * src/gpgrt-int.h: Fix comment. * src/init.c [HAVE_W32CE_SYSTEM]: Remove. * src/init.h [HAVE_W32CE_SYSTEM]: Remove. * src/mkheader.c: Remove Windows CE support. * src/mkw32errmap.c, src/w32ce-add.h: Remove. * src/spawn-posix.c [HAVE_W32CE_SYSTEM]: Remove. * src/spawn-w32.c [HAVE_W32CE_SYSTEM]: Remove. * src/sysutils.c [HAVE_W32CE_SYSTEM]: Remove. * src/w32-estream.c [HAVE_W32CE_SYSTEM]: Remove. * src/w32-reg.c [HAVE_W32CE_SYSTEM]: Remove. * tests/Makefile.am [HAVE_W32CE_SYSTEM]: Remove. -- GnuPG-bug-id: 5912 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r--Makefile.am2
-rwxr-xr-xautogen.sh18
-rw-r--r--configure.ac15
-rw-r--r--contrib/ChangeLog-201125
-rwxr-xr-xcontrib/conf-w32ce-msc/build.mk144
-rwxr-xr-xcontrib/conf-w32ce-msc/config.h153
-rwxr-xr-xcontrib/conf-w32ce-msc/stdint.h9
-rw-r--r--src/Makefile.am66
-rw-r--r--src/estream-printf.c12
-rw-r--r--src/estream.c34
-rw-r--r--src/gpg-error.def.in4
-rw-r--r--src/gpgrt-int.h12
-rw-r--r--src/init.c63
-rw-r--r--src/init.h9
-rw-r--r--src/mkheader.c5
-rw-r--r--src/mkw32errmap.c178
-rw-r--r--src/spawn-posix.c2
-rw-r--r--src/spawn-w32.c2
-rw-r--r--src/sysutils.c6
-rw-r--r--src/w32-estream.c42
-rw-r--r--src/w32-reg.c2
-rw-r--r--src/w32ce-add.h8
-rw-r--r--tests/Makefile.am8
23 files changed, 27 insertions, 792 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/autogen.sh b/autogen.sh
index 8f33ece..9ea0612 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# autogen.sh
-# Copyright (C) 2003, 2014, 2017, 2018 g10 Code GmbH
+# Copyright (C) 2003, 2014, 2017, 2018, 2022 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
@@ -15,7 +15,7 @@
# configure it for the respective package. It is maintained as part of
# GnuPG and source copied by other packages.
#
-# Version: 2018-07-10
+# Version: 2022-06-28
configure_ac="configure.ac"
@@ -137,8 +137,6 @@ extraoptions=
# List of optional variables sourced from autogen.rc and ~/.gnupg-autogen.rc
w32_toolprefixes=
w32_extraoptions=
-w32ce_toolprefixes=
-w32ce_extraoptions=
w64_toolprefixes=
w64_extraoptions=
amd64_toolprefixes=
@@ -146,7 +144,6 @@ amd64_toolprefixes=
# What follows are variables which are sourced but default to
# environment variables or lacking them hardcoded values.
#w32root=
-#w32ce_root=
#w64root=
#amd64root=
@@ -167,11 +164,6 @@ case "$1" in
myhost="w32"
shift
;;
- --build-w32ce)
- myhost="w32"
- myhostsub="ce"
- shift
- ;;
--build-w64)
myhost="w32"
myhostsub="64"
@@ -294,12 +286,6 @@ fi
# ******************
if [ "$myhost" = "w32" ]; then
case $myhostsub in
- ce)
- w32root="$w32ce_root"
- [ -z "$w32root" ] && w32root="$HOME/w32ce_root"
- toolprefixes="$w32ce_toolprefixes arm-mingw32ce"
- extraoptions="$extraoptions $w32ce_extraoptions"
- ;;
64)
w32root="$w64root"
[ -z "$w32root" ] && w32root="$HOME/w64root"
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..ded4f0b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,14 +24,6 @@
# 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
bin_PROGRAMS = gpg-error
@@ -96,7 +88,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 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 \
@@ -106,14 +98,14 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
BUILT_SOURCES = $(srcdir)/err-sources.h $(srcdir)/err-codes.h \
code-to-errno.h code-from-errno.h \
err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h gpgrt.h \
- gpg-error.def mkw32errmap.map.c
+ gpg-error.def
-tmp_files = _mkerrcodes.h _gpg-error.def.h mkw32errmap.tab.h mkw32errmap.map.c
+tmp_files = _mkerrcodes.h _gpg-error.def.h
CLEANFILES = code-to-errno.h code-from-errno.h \
gpg-error.h gpgrt.h \
- mkerrcodes$(EXEEXT_FOR_BUILD) mkerrcodes.h gpg-error.def mkw32errmap.tab.h \
- mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h \
+ mkerrcodes$(EXEEXT_FOR_BUILD) mkerrcodes.h gpg-error.def \
+ err-sources-sym.h err-codes-sym.h errnos-sym.h \
gpg-extra/errno.h mkheader$(EXEEXT_FOR_BUILD) \
gpgrt-config gpg-error-config-old gpg-error-config-test.sh \
gpg-error-config gpg-error-config-test.log \
@@ -130,7 +122,7 @@ if HAVE_W32_SYSTEM
arch_sources = w32-gettext.c w32-lock.c w32-lock-obj.h w32-thread.c \
w32-iconv.c w32-estream.c w32-reg.c spawn-w32.c
RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- -DLOCALEDIR=\"$(localedir)\" $(AM_CPPFLAGS) $(CPPFLAGS)
+ $(libgpg_error_la_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)
LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
SUFFIXES = .rc .lo
@@ -211,15 +203,12 @@ nodist_libgpg_error_la_SOURCES = gpg-error.h
# libgpg_error_la_DEPENDENCIES = \
# $(srcdir)/gpg-error.vers
-# Note that RCCOMPILE needs the same defines as ..._la_CPPFLAGS but
-# without the extra_cppflags because they may include am -idirafter
-# which is not supported by the RC compiler.
-libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags)
+libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
libgpg_error_la_LIBADD = $(gpg_error_res) $(intllibs) $(socklibs) $(LIBTHREAD)
gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c
gpg_error_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \
- -DLOCALEDIR=\"$(localedir)\" $(extra_cppflags)
+ -DLOCALEDIR=\"$(localedir)\"
gpg_error_LDADD = libgpg-error.la $(LTLIBINTL)
# We build err-sources.h and err-codes.h in the source directory.
@@ -247,32 +236,17 @@ code-to-errno.h: Makefile mkerrnos.awk errnos.in
$(AWK) -f $(srcdir)/mkerrnos.awk $(srcdir)/errnos.in >$@
# It is correct to use $(CPP). We want the host's idea of the error codes.
-mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
+mkerrcodes.h: Makefile mkerrcodes.awk
$(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
- $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
+ $(CPP) $(CPPFLAGS) -P _$@ | grep GPG_ERR_ | \
$(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.
gpg-error.def: Makefile gpg-error.def.in
cat $(srcdir)/gpg-error.def.in >_$@.h
- $(CPP) $(DEFAULT_INCLUDES) $(INCLUDES) $(extra_cppflags) _$@.h | \
+ $(CPP) $(DEFAULT_INCLUDES) $(INCLUDES) _$@.h | \
grep -v '^#' >$@
-rm _$@.h
@@ -282,14 +256,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 +275,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 +321,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[],
diff --git a/src/init.c b/src/init.c
index 2d9f7ab..493e3ba 100644
--- a/src/init.c
+++ b/src/init.c
@@ -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
diff --git a/src/init.h b/src/init.h
index 90a716a..ea7154d 100644
--- a/src/init.h
+++ b/src/init.h
@@ -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/mkheader.c b/src/mkheader.c
index 154d79f..e05dafd 100644
--- a/src/mkheader.c
+++ b/src/mkheader.c
@@ -614,11 +614,6 @@ write_special (const char *fname, int lnr, const char *tag)
{
include_file (fname, lnr, "w32-add.h", write_line);
}
- else if (!strcmp (host_os, "mingw32ce"))
- {
- include_file (fname, lnr, "w32-add.h", write_line);
- include_file (fname, lnr, "w32ce-add.h", write_line);
- }
}
else if (!strcmp (tag, "include:lock-obj"))
{
diff --git a/src/mkw32errmap.c b/src/mkw32errmap.c
deleted file mode 100644
index 508a513..0000000
--- a/src/mkw32errmap.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/* mkw32errmap.c - Generate mapping sources for Windows.
- Copyright (C) 2010 g10 Code GmbH
-
- This file is part of libgpg-error.
-
- libgpg-error is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- as published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- libgpg-error is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#ifdef RESOLVE_MACROS
-# include <winerror.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-
-static const char header_gpg_extra_errno_h[] =
- "/* errno.h - WindowsCE errno.h substitute\n"
- " Copyright (C) 2010 g10 Code GmbH\n"
- "\n"
- " This file is free software; as a special exception the author gives\n"
- " unlimited permission to copy and/or distribute it, with or without\n"
- " modifications, as long as this notice is preserved.\n"
- "\n"
- " This file is distributed in the hope that it will be useful, but\n"
- " WITHOUT ANY WARRANTY, to the extent permitted by law; without even\n"
- " the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n"
- " PURPOSE.\n"
- "\n"
- " +++ Do not edit! File has been generated by mkw32errmap.c +++\n"
- "\n"
- " This file is intended to be used with ming32ce-gcc to implement an\n"
- " errno substitute under WindowsCE. It must be included via gcc's\n"
- " -idirafter option. The gpg-error-config script emits the\n"
- " appropriate option snippet. The actual implementation of the errno\n"
- " related functions are part of libgpg-error. A separate header file\n"
- " is required because errno.h is often included before gpg-error.h.\n"
- " */\n"
- "\n"
- "#ifndef _GPG_ERROR_EXTRA_ERRNO_H\n"
- "#define _GPG_ERROR_EXTRA_ERRNO_H\n"
- "\n"
- "/* Due to peculiarities in W32 we can't implement ERRNO as an\n"
- " writable lvalue. This also allows us to easily find places\n"
- " where ERRNO is being written to. See also gpg_err_set_errno. */\n"
- "int _gpg_w32ce_get_errno (void);\n"
- "#define errno (_gpg_w32ce_get_errno ())\n"
- "\n";
-static const char footer_gpg_extra_errno_h[] =
- "\n"
- "#endif /*_GPG_ERROR_EXTRA_ERRNO_H*/\n";
-
-
-/* The table below is used in two modes. First we run the host
- preprocessor over it to generate a new include file. This include
- file has the same content but the Windows error macros are
- resolved. This is so that we don't need to include winerror.h into
- the generated errno.h. The mkw32errmap_marker variable is only
- here to have something to grep for after preprocessing. */
-static int mkw32errmap_marker;
-struct table_s
-{
- int *dummy;
- const char *name;
- int w32code;
- int w32code2;
-};
-
-struct table_s table[] =
- {
-#ifdef RESOLVE_MACROS
-#define X(a,b,c) \
- {&mkw32errmap_marker, (a), (b), (c)}
- X( "EPERM", ERROR_CANNOT_MAKE , 0 ),
- X( "ENOENT", ERROR_FILE_NOT_FOUND , ERROR_PATH_NOT_FOUND ),
- X( "EINTR", ERROR_INVALID_AT_INTERRUPT_TIME , 0 ),
- X( "EIO", ERROR_IO_DEVICE , 0 ),
- X( "ENXIO", ERROR_FILE_INVALID , 0 ),
- X( "EBADF", ERROR_INVALID_HANDLE , 0 ),
- X( "EAGAIN", ERROR_MORE_DATA , WSAEWOULDBLOCK ),
-
- X( "ENOMEM", ERROR_NOT_ENOUGH_MEMORY , 0 ),
- X( "EACCES", ERROR_ACCESS_DENIED , 0 ),
- X( "EFAULT", ERROR_PROCESS_ABORTED , 0 ),
- X( "EBUSY", ERROR_BUSY , 0 ),
- X( "EEXIST", ERROR_FILE_EXISTS , WSAEADDRINUSE ),
-
- X( "EXDEV", ERROR_NOT_SAME_DEVICE , 0 ),
- X( "ENODEV", ERROR_BAD_DEVICE , ERROR_DEV_NOT_EXIST ),
-
- X( "ENOTDIR",ERROR_DIRECTORY , 0 ),
- X( "EINVAL", ERROR_INVALID_PARAMETER , 0 ),
- X( "ENFILE", ERROR_NO_MORE_FILES , 0 ),
- X( "EMFILE", ERROR_TOO_MANY_OPEN_FILES , 0 ),
- X( "ENOSPC", ERROR_DISK_FULL , 0 ),
- X( "EROFS", ERROR_WRITE_PROTECT , 0 ),
- X( "EPIPE", ERROR_BROKEN_PIPE , 0 ),
- X( "ERANGE", ERROR_ARITHMETIC_OVERFLOW , 0 ),
- X( "EDEADLOCK",ERROR_POSSIBLE_DEADLOCK , 0 ),
- X( "ENAMETOOLONG", ERROR_FILENAME_EXCED_RANGE, 0 ),
- X( "ENOLCK", ERROR_SHARING_BUFFER_EXCEEDED , 0 ),
- X( "ENOSYS", ERROR_NOT_SUPPORTED , 0 ),
- X( "ENOTEMPTY",ERROR_DIR_NOT_EMPTY , 0 ),
- X( "ESPIPE", ERROR_SEEK_ON_DEVICE , 0 ),
-#if 0 /* FIXME: Find appropriate mappings. */
- X( "EILSEQ", ),
- X( "EDOM", ),
- X( "EMLINK", ),
- X( "ESRCH", ), /* No such process */
- X( "E2BIG", ), /* Arg list too long */
- X( "ENOEXEC", ), /* Exec format error */
- X( "ECHILD", ), /* No child processes */
- X( "EISDIR", ), /* Is a directory */
- X( "ENOTTY", ), /* Inappropriate I/O control operation */
- X( "EFBIG", ), /* File too large */
-#endif
-#undef X
-#else /*!RESOLVE_MACROS*/
-# include "mkw32errmap.tab.h"
-#endif /*!RESOLVE_MACROS*/
- { NULL, 0 }
- };
-
-
-
-static int
-compare_table (const void *a_v, const void *b_v)
-{
- const struct table_s *a = a_v;
- const struct table_s *b = b_v;
-
- return (a->w32code - b->w32code);
-}
-
-
-int
-main (int argc, char **argv)
-{
- int idx;
-
- for (idx=0; table[idx].name; idx++)
- ;
- qsort (table, idx, sizeof *table, compare_table);
-
- if (argc == 2 && !strcmp (argv[1], "--map"))
- {
- fputs ("static int\n"
- "map_w32codes (int err)\n"
- "{\n"
- " switch (err)\n"
- " {\n", stdout );
- for (idx=0; table[idx].name; idx++)
- if (table[idx].w32code2)
- printf (" case %d: return %d;\n",
- table[idx].w32code2, table[idx].w32code);
- fputs (" default: return err;\n"
- " }\n"
- "}\n", stdout);
- }
- else
- {
- fputs (header_gpg_extra_errno_h, stdout);
- for (idx=0; table[idx].name; idx++)
- printf ("#define %-12s %5d\n", table[idx].name, table[idx].w32code);
- fputs (footer_gpg_extra_errno_h, stdout);
- }
-
- return 0;
-}
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@