Subject: | patches for MSVC6 and MSVC7.0 |
Dear Tomash,
The compilation ends in failure using MSVC7.0 and the prior. In fact, these
compilers don't support C99, for example the type "long long" and inline.
So, may I ask you a favour? Could you apply the attached patches?
Best regards,
Taro Nishino
Subject: | socket_win32.c.diff.txt |
--- socket_win32.c.orig Tue Nov 3 06:58:37 2009
+++ socket_win32.c Tue Nov 3 06:59:32 2009
@@ -63,7 +63,7 @@
}
-ssize_t
+SSIZE_T
readv(SOCKET fd, const struct iovec *iov, int iovcnt)
{
DWORD count, flags = 0;
@@ -75,7 +75,7 @@
}
-ssize_t
+SSIZE_T
writev(SOCKET fd, const struct iovec *iov, int iovcnt)
{
DWORD count;
Subject: | client.c.diff.txt |
--- client.c.orig Tue Nov 3 06:01:46 2009
+++ client.c Tue Nov 3 07:08:59 2009
@@ -61,9 +61,7 @@
static const char eol[2] = "\r\n";
-
-typedef unsigned long long generation_type;
-
+typedef uint64_t generation_type;
struct value_state
{
@@ -829,9 +827,9 @@
static
int
-parse_ull(struct command_state *state, unsigned long long *result)
+parse_ull(struct command_state *state, uint64_t *result)
{
- unsigned long long res = 0;
+ uint64_t res = 0;
const char *beg;
while (*state->pos == ' ')
@@ -861,7 +859,7 @@
int
parse_get_reply(struct command_state *state)
{
- unsigned long long num;
+ uint64_t num;
int res;
switch (state->match)
Subject: | addrinfo_hostent.h.diff.txt |
--- addrinfo_hostent.h.orig Tue Nov 3 05:27:09 2009
+++ addrinfo_hostent.h Tue Nov 3 05:27:51 2009
@@ -27,6 +27,7 @@
#ifndef WIN32
#include <netdb.h>
#else /* WIN32 */
+#include <WinSock2.h>
#include <ws2tcpip.h>
#endif /* WIN32 */
Subject: | socket_win32.h.diff.txt |
--- socket_win32.h.orig Tue Nov 3 06:33:25 2009
+++ socket_win32.h Tue Nov 3 07:15:02 2009
@@ -28,7 +28,6 @@
#include <ws2tcpip.h>
#include <sys/types.h>
-
#if _WIN32_WINNT >= 0x0501
#include <wspiapi.h>
@@ -88,6 +87,9 @@
#define win32_socket_library_release WSACleanup
+#undef ssize_t
+#define ssize_t SSIZE_T
+
extern
int
win32_socket_library_acquire();
Subject: | client.h.diff.txt |
--- client.h.orig Tue Nov 3 05:55:22 2009
+++ client.h Tue Nov 3 19:07:34 2009
@@ -59,10 +59,15 @@
typedef unsigned long value_size_type;
#define FMT_VALUE_SIZE "%lu"
-typedef unsigned long long cas_type;
+#if defined( _MSC_VER ) && ( _MSC_VER <= 1300 ) /* 1300 == VC++ 7.0 */
+#define inline __inline
+typedef unsigned __int64 uint64_t;
+#else
+typedef unsigned long long uint64_t;
+#endif
+typedef uint64_t cas_type;
+typedef uint64_t arith_type;
#define FMT_CAS "%llu"
-
-typedef unsigned long long arith_type;
#define FMT_ARITH "%llu"
Subject: | gencrc32.pl.diff.txt |
--- gencrc32.pl.orig Tue Nov 3 04:58:57 2009
+++ gencrc32.pl Tue Nov 3 19:11:50 2009
@@ -91,7 +91,9 @@
#define $guard 1
#include <stddef.h>
-
+#if defined( _MSC_VER ) && ( _MSC_VER <= 1300 ) /* 1300 == VC++ 7.0 */
+#define inline __inline
+#endif
extern const unsigned int crc32lookup[];