diff options
author | Werner Koch <wk@gnupg.org> | 2010-01-21 21:36:43 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2010-01-21 21:36:43 +0000 |
commit | b299da47a6f733c2e28fd98b8f2e19261f3b2608 (patch) | |
tree | daf8da2d3dcbe142e03010fc9dc643b02c280a5b /src/hmac256.c | |
parent | c9a727088a4a763ff368e4f10d98d3a0c3a8d3b2 (diff) | |
download | libgcrypt-b299da47a6f733c2e28fd98b8f2e19261f3b2608.tar.gz |
Support WindowsCE.
Diffstat (limited to 'src/hmac256.c')
-rw-r--r-- | src/hmac256.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/hmac256.c b/src/hmac256.c index b2f83dd0..a1383738 100644 --- a/src/hmac256.c +++ b/src/hmac256.c @@ -56,6 +56,15 @@ # include <fcntl.h> /* We need setmode(). */ #endif +/* For a native WindowsCE binary we need to include gpg-error.h to + provide a replacement for strerror. In other cases we need a + replacement macro for gpg_err_set_errno. */ +#ifdef __MINGW32CE__ +# include <gpg-error.h> +#else +# define gpg_err_set_errno(a) (errno = (a)) +#endif + #include "hmac256.h" @@ -502,7 +511,7 @@ _gcry_hmac256_file (void *result, size_t resultsize, const char *filename, if (digestlen > resultsize) { _gcry_hmac256_release (hd); - errno = EINVAL; + gpg_err_set_errno (EINVAL); return -1; } memcpy (result, digest, digestlen); |