Browse files

Don't use the time_t for win32

When compiling from php it turns out that it gets another
size of the time_t type, causing the struct offsets to differ.

Let's just use a 32 bit time_t for now (that's the only thing
that gets stored on the server anyway...)

Change-Id: I74fc19356f5bd41a8b86353a608ec899d60d8c86
Reviewed-by: Sergey Avseyev <>
Tested-by: Trond Norbye <>
  • Loading branch information...
trondn committed Nov 1, 2012
1 parent 2bdbcc5 commit 1f0b60f3f0b7afc62a7fb50988a1eab964917fa3
Showing with 15 additions and 30 deletions.
  1. +15 −30 win32/libcouchbase/configuration.h
@@ -29,46 +29,31 @@
#include <stddef.h>
-#include <time.h>
#define LCB_VERSION_STRING "2.0.0beta2"
#define LCB_VERSION 0x020000
-#ifdef __cplusplus
-extern "C" {
-#ifdef _WIN32
#define PACKAGE_STRING "libcouchbase 2.0.0beta2"
#include <winsock2.h>
#include <BaseTsd.h>
- typedef SIZE_T lcb_size_t;
- typedef SSIZE_T lcb_ssize_t;
- typedef __int64 lcb_int64_t;
- typedef __int32 lcb_int32_t;
- typedef unsigned __int8 lcb_uint8_t;
- typedef unsigned __int16 lcb_vbucket_t;
- typedef unsigned __int16 lcb_uint16_t;
- typedef unsigned __int32 lcb_uint32_t;
- typedef unsigned __int64 lcb_cas_t;
- typedef unsigned __int64 lcb_uint64_t;
- typedef time_t lcb_time_t;
- typedef int64_t lcb_int64_t;
- typedef int32_t lcb_int32_t;
- typedef size_t lcb_size_t;
- typedef ssize_t lcb_ssize_t;
- typedef uint16_t lcb_vbucket_t;
- typedef uint8_t lcb_uint8_t;
- typedef uint16_t lcb_uint16_t;
- typedef uint32_t lcb_uint32_t;
- typedef uint64_t lcb_cas_t;
- typedef uint64_t lcb_uint64_t;
- typedef time_t lcb_time_t;
+#ifdef __cplusplus
+extern "C" {
+typedef SIZE_T lcb_size_t;
+typedef SSIZE_T lcb_ssize_t;
+typedef __int64 lcb_int64_t;
+typedef __int32 lcb_int32_t;
+typedef unsigned __int8 lcb_uint8_t;
+typedef unsigned __int16 lcb_vbucket_t;
+typedef unsigned __int16 lcb_uint16_t;
+typedef unsigned __int32 lcb_uint32_t;
+typedef unsigned __int64 lcb_cas_t;
+typedef unsigned __int64 lcb_uint64_t;
+typedef unsigned __int32 lcb_time_t;
#ifdef __cplusplus

0 comments on commit 1f0b60f

Please sign in to comment.