summaryrefslogtreecommitdiff
path: root/include/config-win.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/config-win.h')
-rw-r--r--include/config-win.h36
1 files changed, 21 insertions, 15 deletions
diff --git a/include/config-win.h b/include/config-win.h
index eba699159c7..15c107597d1 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -15,6 +15,8 @@
/* Defines for Win32 to make it compatible for MySQL */
+#define BIG_TABLES
+
#ifdef __WIN2000__
/* We have to do this define before including windows.h to get the AWE API
functions */
@@ -30,13 +32,12 @@ functions */
#endif
#include <sys/locking.h>
-#include <windows.h>
+#include <winsock2.h>
#include <math.h> /* Because of rint() */
#include <fcntl.h>
#include <io.h>
#include <malloc.h>
-#define BIG_TABLES 1
#define HAVE_SMEM 1
#if defined(_WIN64) || defined(WIN64)
@@ -98,7 +99,7 @@ functions */
#define O_SHORT_LIVED 0
#define SH_DENYNO _SH_DENYNO
#else
-#define O_BINARY _O_BINARY /* compability with MSDOS */
+#define O_BINARY _O_BINARY /* compability with older style names */
#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */
#define O_TEMPORARY _O_TEMPORARY
#define O_SHORT_LIVED _O_SHORT_LIVED
@@ -125,12 +126,12 @@ functions */
/* Type information */
-#if defined(__EMX__) || !defined(HAVE_UINT)
+#if !defined(HAVE_UINT)
#undef HAVE_UINT
#define HAVE_UINT
typedef unsigned short ushort;
typedef unsigned int uint;
-#endif /* defined(__EMX__) || !defined(HAVE_UINT) */
+#endif /* !defined(HAVE_UINT) */
typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
typedef __int64 longlong;
@@ -174,6 +175,7 @@ typedef uint rf_SetTimer;
#endif
#define VOID_SIGHANDLER
#define SIZEOF_CHAR 1
+#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8
#define SIZEOF_OFF_T 8
@@ -207,6 +209,9 @@ typedef uint rf_SetTimer;
/* If LOAD DATA LOCAL INFILE should be enabled by default */
#define ENABLED_LOCAL_INFILE 1
+/* If query profiling should be enabled by default */
+#define ENABLED_PROFILING 1
+
/* Convert some simple functions to Posix */
#define my_sigset(A,B) signal((A),(B))
@@ -259,8 +264,11 @@ inline ulonglong double2ulonglong(double d)
#define tell(A) _telli64(A)
#endif
-
#define STACK_DIRECTION -1
+
+/* Difference between GetSystemTimeAsFileTime() and now() */
+#define OFFSET_TO_EPOCH ULL(116444736000000000)
+
#define HAVE_PERROR
#define HAVE_VFPRINT
#define HAVE_RENAME /* Have rename() as function */
@@ -294,7 +302,14 @@ inline ulonglong double2ulonglong(double d)
#define SPRINTF_RETURNS_INT
#define HAVE_SETFILEPOINTER
#define HAVE_VIO_READ_BUFF
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+/* strnlen() appeared in Studio 2005 */
#define HAVE_STRNLEN
+#endif
+#define HAVE_WINSOCK2
+
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
#ifndef __NT__
#undef FILE_SHARE_DELETE
@@ -351,16 +366,7 @@ inline ulonglong double2ulonglong(double d)
#ifdef __NT__ /* This should also work on Win98 but .. */
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
-#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
-#else
-#define thread_safe_add(V,C,L) \
- pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
-#define thread_safe_sub(V,C,L) \
- pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
-#define statistic_add(V,C,L) (V)+=(C)
#endif
-#define statistic_increment(V,L) thread_safe_increment((V),(L))
-#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
#define shared_memory_buffer_length 16000
#define default_shared_memory_base_name "MYSQL"