Update of /project/elephant/cvsroot/elephant/src
In directory common-lisp.net:/tmp/cvs-serv6453/src
Modified Files:
libsleepycat.c
Log Message:
win32 fixes (thanks to Bill Clementson)
Date: Fri Oct 8 02:53:04 2004
Author: blee
Index: elephant/src/libsleepycat.c
diff -u elephant/src/libsleepycat.c:1.9 elephant/src/libsleepycat.c:1.10
--- elephant/src/libsleepycat.c:1.9 Sun Sep 19 19:50:22 2004
+++ elephant/src/libsleepycat.c Fri Oct 8 02:53:04 2004
@@ -55,6 +55,8 @@
;;;
*/
+#include <string.h>
+
/* Pointer arithmetic utility functions */
/* should these be in network-byte order? probably not..... */
int read_int(char *buf, int offset) {
@@ -101,8 +103,6 @@
return p + offset;
}
-#include <string.h>
-
void copy_buf(char *dest, int dest_offset, char *src, int src_offset,
int length) {
memcpy(dest + dest_offset, src + src_offset, length);
@@ -226,6 +226,10 @@
#include <math.h>
double read_num(char *buf);
+int case_cmp(const char *a, int32_t length1, const char *b, int32_t length2);
+int utf16_cmp(const char *s1, int32_t length1,
+ const char *s2, int32_t length2);
+int lex_cmp(const char *a, int32_t length1, const char *b, int32_t length2);
/* Inspired by the Sleepycat docs. We have to memcpy to
insure memory alignment. */
@@ -320,6 +324,7 @@
}
return result;
case 7:
+ default:
switch ((++buf)[0]) {
case 1:
result = (double)read_int(++buf, 0);
@@ -334,6 +339,7 @@
}
break;
case 6:
+ default:
result = 0;
buf += 5;
limit = buf + read_uint(buf, -4);
@@ -355,6 +361,7 @@
}
return result / denom;
case 6:
+ default:
denom = 0;
buf += 5;
limit = buf + read_uint(buf, -4);
@@ -365,6 +372,11 @@
}
}
}
+
+#ifdef WIN32
+#define strncasecmp _strnicmp
+typedef unsigned short uint16_t;
+#endif
int case_cmp(const char *a, int32_t length1, const char *b, int32_t length2) {
int min, sizediff, diff;