From 669f8728cb82508f217a09ea48150de615673cf9 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 24 Mar 2005 13:09:54 +0000 Subject: [PATCH] 2005-03-24 Marcus Brinkmann * configure.ac (AH_BOTTOM): Removed. gpgme/ 2005-03-24 Marcus Brinkmann * data.h (EOPNOTSUPP) [_WIN32]: Remove definition. * data.c (EOPNOTSUPP) [HAVE_W32_SYSTEM]: Remove definition. (gpgme_data_read, gpgme_data_write, gpgme_data_seek): Return ENOSYS instead EOPNOTSUPP. * data-compat.c (EOPNOTSUPP) [HAVE_W32_SYSTEM]: Remove definition. (gpgme_error_to_errno): Map GPG_ERR_NOT_SUPPORTED to ENOSYS. --- trunk/ChangeLog | 4 ++++ trunk/configure.ac | 11 ----------- trunk/gpgme/ChangeLog | 10 ++++++++++ trunk/gpgme/data-compat.c | 7 +------ trunk/gpgme/data.c | 11 +++-------- trunk/gpgme/data.h | 4 ---- 6 files changed, 18 insertions(+), 29 deletions(-) diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 6e85315..a55f2ae 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2005-03-24 Marcus Brinkmann + + * configure.ac (AH_BOTTOM): Removed. + 2005-03-09 Werner Koch * acinclude.m4 (GNUPG_CHECK_VA_COPY): Assume no when cross-compiling. diff --git a/trunk/configure.ac b/trunk/configure.ac index b62e357..6a31bd5 100644 --- a/trunk/configure.ac +++ b/trunk/configure.ac @@ -68,17 +68,6 @@ AH_VERBATIM([_REENTRANT], # define _REENTRANT 1 #endif]) -AH_BOTTOM([ -/* Some environments miss the definition for EOPNOTSUPP. We provide - the error code here and test where neded whether it should be - defined. Can't do the test here due to the order of includes. */ -#ifdef HAVE_W32_SYSTEM -#define VALUE_FOR_EOPNOTSUPP 95 -#endif /*!HAVE_W32_SYSTEM*/ - -]) - - AC_PROG_CC diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index be43384..6ee994d 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,13 @@ +2005-03-24 Marcus Brinkmann + + * data.h (EOPNOTSUPP) [_WIN32]: Remove definition. + * data.c (EOPNOTSUPP) [HAVE_W32_SYSTEM]: Remove definition. + (gpgme_data_read, gpgme_data_write, gpgme_data_seek): Return + ENOSYS instead EOPNOTSUPP. + * data-compat.c (EOPNOTSUPP) [HAVE_W32_SYSTEM]: Remove definition. + (gpgme_error_to_errno): Map GPG_ERR_NOT_SUPPORTED + to ENOSYS. + 2005-03-24 Marcus Brinkmann * io.h: Rename to ... diff --git a/trunk/gpgme/data-compat.c b/trunk/gpgme/data-compat.c index b55fd61..91fa6be 100644 --- a/trunk/gpgme/data-compat.c +++ b/trunk/gpgme/data-compat.c @@ -30,11 +30,6 @@ #include "data.h" #include "util.h" -#if defined(HAVE_W32_SYSTEM) && !defined(EOPNOTSUPP) -#define EOPNOTSUPP VALUE_FOR_EOPNOTSUPP -#endif - - /* Create a new data buffer filled with LENGTH bytes starting from OFFSET within the file FNAME or stream STREAM (exactly one must be @@ -145,7 +140,7 @@ gpgme_error_to_errno (gpgme_error_t err) errno = EINVAL; return -1; case GPG_ERR_NOT_SUPPORTED: - errno = EOPNOTSUPP; + errno = ENOSYS; return -1; default: /* FIXME: Yeah, well. */ diff --git a/trunk/gpgme/data.c b/trunk/gpgme/data.c index 39f60af..144dc86 100644 --- a/trunk/gpgme/data.c +++ b/trunk/gpgme/data.c @@ -33,11 +33,6 @@ #include "ops.h" #include "priv-io.h" -#if defined(HAVE_W32_SYSTEM) && !defined(EOPNOTSUPP) -#define EOPNOTSUPP VALUE_FOR_EOPNOTSUPP -#endif - - gpgme_error_t _gpgme_data_new (gpgme_data_t *r_dh, struct _gpgme_data_cbs *cbs) @@ -80,7 +75,7 @@ gpgme_data_read (gpgme_data_t dh, void *buffer, size_t size) } if (!dh->cbs->read) { - errno = EOPNOTSUPP; + errno = ENOSYS; return -1; } return (*dh->cbs->read) (dh, buffer, size); @@ -100,7 +95,7 @@ gpgme_data_write (gpgme_data_t dh, const void *buffer, size_t size) } if (!dh->cbs->write) { - errno = EOPNOTSUPP; + errno = ENOSYS; return -1; } return (*dh->cbs->write) (dh, buffer, size); @@ -120,7 +115,7 @@ gpgme_data_seek (gpgme_data_t dh, off_t offset, int whence) } if (!dh->cbs->seek) { - errno = EOPNOTSUPP; + errno = ENOSYS; return -1; } diff --git a/trunk/gpgme/data.h b/trunk/gpgme/data.h index 02ada89..feb4a60 100644 --- a/trunk/gpgme/data.h +++ b/trunk/gpgme/data.h @@ -30,10 +30,6 @@ #include "gpgme.h" -#ifdef _WIN32 -# define EOPNOTSUPP 95 -#endif - /* Read up to SIZE bytes into buffer BUFFER from the data object with the handle DH. Return the number of characters read, 0 on EOF and -- 2.26.2