summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/include/os_windows.h
diff options
context:
space:
mode:
authorRamon Fernandez <ramon.fernandez@mongodb.com>2015-03-26 12:27:35 -0400
committerRamon Fernandez <ramon.fernandez@mongodb.com>2015-03-26 12:27:35 -0400
commit61d6d65a8b6c18f38465e2379b9897cab8f3f5e8 (patch)
tree89911163de7a4e1a1fcfe9deaa966d6d93840b5f /src/third_party/wiredtiger/src/include/os_windows.h
parent06b58e9c7c349ce81504cf6ce2823082205ab0f7 (diff)
downloadmongo-61d6d65a8b6c18f38465e2379b9897cab8f3f5e8.tar.gz
Import wiredtiger-wiredtiger-2.5.2-293-g3e37e1f.tar.gz from wiredtiger branch mongodb-3.0
Diffstat (limited to 'src/third_party/wiredtiger/src/include/os_windows.h')
-rw-r--r--src/third_party/wiredtiger/src/include/os_windows.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/src/include/os_windows.h b/src/third_party/wiredtiger/src/include/os_windows.h
index 49dbc694895..de97143335f 100644
--- a/src/third_party/wiredtiger/src/include/os_windows.h
+++ b/src/third_party/wiredtiger/src/include/os_windows.h
@@ -14,13 +14,25 @@ typedef CONDITION_VARIABLE wt_cond_t;
typedef CRITICAL_SECTION wt_mutex_t;
typedef HANDLE wt_thread_t;
+/*
+ * Thread callbacks need to match the return signature of _beginthreadex.
+ */
+#define WT_THREAD_CALLBACK(x) unsigned (__stdcall x)
+#define WT_THREAD_RET unsigned __stdcall
+#define WT_THREAD_RET_VALUE 0
+
+/*
+ * WT declaration for calling convention type
+ */
+#define WT_CDECL __cdecl
+
+#if _MSC_VER < 1900
/* Timespec is a POSIX structure not defined in Windows */
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
-
-#define strncasecmp _strnicmp
+#endif
/*
* Windows Portability stuff
@@ -29,7 +41,7 @@ struct timespec {
*/
typedef uint32_t u_int;
typedef unsigned char u_char;
-typedef unsigned long u_long;
+typedef uint64_t u_long;
/* <= VS 2013 is not C99 compat */
#if _MSC_VER < 1900
@@ -63,3 +75,6 @@ _Check_return_opt_ int __cdecl _wt_vsnprintf(
/* Provide a custom version of localtime_r */
struct tm *localtime_r(const time_t* timer, struct tm* result);
+
+/* Windows does not provide fsync */
+#define fsync _commit