summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-06-29 17:14:35 +0000
committerWerner Koch <wk@gnupg.org>2010-06-29 17:14:35 +0000
commit6dc4847a38ce9617879273266fee371672a6d451 (patch)
tree0e42828cac0b6cbee98165b855f4fa4c5bdaddaf
parent839a8508b1a1d7bafb1930694e05f45fc560b47a (diff)
downloadlibgcrypt-6dc4847a38ce9617879273266fee371672a6d451.tar.gz
fixes for msvc compiler
-rw-r--r--src/ChangeLog4
-rw-r--r--src/gcrypt.h.in5
-rw-r--r--src/sexp.c2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4398b053..cdca915c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-24 Werner Koch <wk@g10code.com>
+
+ * gcrypt.h.in [W32]: Include time.h and not sys/time.h.
+
2010-04-19 Marcus Brinkmann <marcus@g10code.de>
* misc.c (write2stderr): Dummy variable to silence gcc warning.
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index ff08d69b..33b52ff5 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -33,14 +33,15 @@
#if defined _WIN32 || defined __WIN32__
# include <winsock2.h>
# include <ws2tcpip.h>
+# include <time.h>
+ typedef long ssize_t;
#else
# include <sys/socket.h>
+# include <sys/time.h>
#endif /*!_WIN32*/
@FALLBACK_SOCKLEN_T@
-#include <sys/time.h>
-
/* This is required for error code compatibility. */
#define _GCRY_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_GCRYPT
diff --git a/src/sexp.c b/src/sexp.c
index 0156f36a..d4f238bf 100644
--- a/src/sexp.c
+++ b/src/sexp.c
@@ -1838,7 +1838,7 @@ gcry_sexp_sprint (const gcry_sexp_t list, int mode,
}
-/* Scan a cannocial encoded buffer with implicit length values and
+/* Scan a canonical encoded buffer with implicit length values and
return the actual length this S-expression uses. For a valid S-Exp
it should never return 0. If LENGTH is not zero, the maximum
length to scan is given - this can be used for syntax checks of