From 3c04dea3ecebed35208f6b631b2e8b04222ea432 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 31 Oct 2018 12:27:27 +0100 Subject: 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 --- src/data-fd.c | 56 -------------------------------------------------------- 1 file changed, 56 deletions(-) (limited to 'src/data-fd.c') diff --git a/src/data-fd.c b/src/data-fd.c index 42d6a0d2..cf17f00e 100644 --- a/src/data-fd.c +++ b/src/data-fd.c @@ -33,62 +33,6 @@ #include "data.h" - -#if defined(HAVE_W32CE_SYSTEM) && !defined(__MINGW32CE__) -/* We need to provide replacements for read, write and lseek. They - are taken from the cegcc runtime files, written by Pedro Alves - in Feb 2007 and placed in the public - domain. (cf. cegcc/src/mingw/mingwex/wince/) */ - -#include - -static int -read (int fildes, void *buf, unsigned int bufsize) -{ - DWORD NumberOfBytesRead; - if (bufsize > 0x7fffffff) - bufsize = 0x7fffffff; - if (!ReadFile ((HANDLE) fildes, buf, bufsize, &NumberOfBytesRead, NULL)) - return -1; - return (int) NumberOfBytesRead; -} - -static int -write (int fildes, const void *buf, unsigned int bufsize) -{ - DWORD NumberOfBytesWritten; - if (bufsize > 0x7fffffff) - bufsize = 0x7fffffff; - if (!WriteFile ((HANDLE) fildes, buf, bufsize, &NumberOfBytesWritten, NULL)) - return -1; - return (int) NumberOfBytesWritten; -} - -static long -lseek (int fildes, long offset, int whence) -{ - DWORD mode; - switch (whence) - { - case SEEK_SET: - mode = FILE_BEGIN; - break; - case SEEK_CUR: - mode = FILE_CURRENT; - break; - case SEEK_END: - mode = FILE_END; - break; - default: - /* Specify an invalid mode so SetFilePointer catches it. */ - mode = (DWORD)-1; - } - return (long) SetFilePointer ((HANDLE) fildes, offset, NULL, mode); -} -#endif /*HAVE_W32CE_SYSTEM && !__MINGW32CE__*/ - - - static gpgme_ssize_t fd_read (gpgme_data_t dh, void *buffer, size_t size) { -- cgit v1.2.3