diff options
author | Werner Koch <wk@gnupg.org> | 2022-06-02 16:10:37 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2022-06-03 10:08:21 +0200 |
commit | d2d7a2b128e981740ee3a3c6e2859bec0202cb86 (patch) | |
tree | e4e8e62681ca9ae4cb678c0a9ac85d2b25ebd7a9 /g10/tdbio.c | |
parent | tools: Minor fix to gpg-connect-agent options. (diff) | |
download | gnupg2-d2d7a2b128e981740ee3a3c6e2859bec0202cb86.tar.xz gnupg2-d2d7a2b128e981740ee3a3c6e2859bec0202cb86.zip |
Remove remaining support for WindowsCE
--
Diffstat (limited to 'g10/tdbio.c')
-rw-r--r-- | g10/tdbio.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/g10/tdbio.c b/g10/tdbio.c index a6ce5ce00..50dccca05 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -48,13 +48,6 @@ #define MY_O_BINARY 0 #endif -/* We use ERRNO despite that the cegcc provided open/read/write - functions don't set ERRNO - at least show that ERRNO does not make - sense. */ -#ifdef HAVE_W32CE_SYSTEM -#undef strerror -#define strerror(a) ("[errno not available]") -#endif /* * Yes, this is a very simple implementation. We should really @@ -730,13 +723,6 @@ tdbio_set_dbname (ctrl_t ctrl, const char *new_dbname, int rc; mode_t oldmask; -#ifdef HAVE_W32CE_SYSTEM - /* We know how the cegcc implementation of access works ;-). */ - if (GetLastError () == ERROR_FILE_NOT_FOUND) - gpg_err_set_errno (ENOENT); - else - gpg_err_set_errno (EIO); -#endif /*HAVE_W32CE_SYSTEM*/ if (errno && errno != ENOENT) log_fatal ( _("can't access '%s': %s\n"), fname, strerror (errno)); @@ -797,22 +783,6 @@ open_db () log_assert( db_fd == -1 ); -#ifdef HAVE_W32CE_SYSTEM - { - DWORD prevrc = 0; - wchar_t *wname = utf8_to_wchar (db_name); - if (wname) - { - db_fd = (int)CreateFile (wname, GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, 0, NULL); - xfree (wname); - } - if (db_fd == -1) - log_fatal ("can't open '%s': %d, %d\n", db_name, - (int)prevrc, (int)GetLastError ()); - } -#else /*!HAVE_W32CE_SYSTEM*/ db_fd = gnupg_open (db_name, O_RDWR | MY_O_BINARY, 0); if (db_fd == -1 && (errno == EACCES #ifdef EROFS @@ -827,7 +797,7 @@ open_db () } if ( db_fd == -1 ) log_fatal( _("can't open '%s': %s\n"), db_name, strerror(errno) ); -#endif /*!HAVE_W32CE_SYSTEM*/ + register_secured_file (db_name); /* Read the version record. */ |