summaryrefslogtreecommitdiff
path: root/include/my_pthread.h
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2015-11-06 17:24:23 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2015-11-06 17:27:24 +0100
commitf1daf9ced46ba65b025a92f512833c86d04e7cf2 (patch)
treed8c63373681dde1e5db37d76019df110eb75b4cf /include/my_pthread.h
parenta36048d143c2e3cd956009849dc28f4a714d00d0 (diff)
downloadmariadb-git-f1daf9ced46ba65b025a92f512833c86d04e7cf2.tar.gz
MDEV-9024 Build fails with VS2015
Fix build failures caused by new C runtime library - isnan, snprintf, struct timespec are now defined, attempt to redefine them leads - P_tmpdir, tzname are no more defined - lfind() and lsearch() in lf_hash.c had to be renamed, declaration conflicts with some C runtime functions with the same name declared in a header included by stdlib.h Also fix couple of annoying warnings : - remove #define NOMINMAX from config.h to avoid "redefined" compiler warnings(NOMINMAX is already in compile flags) - disable incremental linker in Debug as well (feature not used much and compiler crashes often) Also simplify package building with Wix, require Wix 3.9 or later (VS2015 is not compatible with old Wix 3.5/3.6)
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r--include/my_pthread.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index bb4d0c88ebd..cff6416904a 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -86,10 +86,12 @@ typedef volatile LONG my_pthread_once_t;
#define MY_PTHREAD_ONCE_INPROGRESS 1
#define MY_PTHREAD_ONCE_DONE 2
+#if !STRUCT_TIMESPEC_HAS_TV_SEC || !STRUCT_TIMESPEC_HAS_TV_NSEC
struct timespec {
time_t tv_sec;
long tv_nsec;
};
+#endif
int win_pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *);