From e126baafbc78f15c794082f0a93740d81041d038 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 21 Dec 2015 10:19:02 +0100 Subject: =?UTF-8?q?MDEV-9249=20MariaDB=20un-buildable=20on=20linux64:=20fa?= =?UTF-8?q?ils=20@=20"error:=20=E2=80=98ERR=5Fremove=5Fstate=E2=80=99=20wa?= =?UTF-8?q?s=20not=20declared=20in=20this=20scope"=20when=20linking=20agai?= =?UTF-8?q?nst=20OpenSSL=201.0.2e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ERR_remove_state is deprecated, use ERR_remove_thread_state if possible --- include/violite.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/violite.h b/include/violite.h index 14c99e8d8fe..ea7e3d7897c 100644 --- a/include/violite.h +++ b/include/violite.h @@ -123,6 +123,10 @@ typedef my_socket YASSL_SOCKET_T; #include #include +#ifdef HAVE_ERR_remove_thread_state +#define ERR_remove_state(X) ERR_remove_thread_state(NULL) +#endif + enum enum_ssl_init_error { SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY, -- cgit v1.2.1 From 3d1306f7b74077cfa197c8fa23baeb96c535af67 Mon Sep 17 00:00:00 2001 From: Ajo Robert Date: Thu, 7 Jan 2016 14:36:19 +0530 Subject: Bug#21770366 backport bug#21657078 to 5.5 and 5.6 Problem Statement ========= Fix various issues when building MySQL with Visual Studio 2015. Fix: ======= - Visual Studio 2015 adds support for timespec. Add check and related code to use this and only use our replacement if timespec is not defined. - Rename lfind/lsearch to my* to avoid redefinition problems. - Set default value for TMPDIR to "" on Windows as P_tmpdir no longer exists. - using VS definition of snprintf if available - tzname are now renamed to _tzname. --- include/my_pthread.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/my_pthread.h b/include/my_pthread.h index 92676bd727c..6ff198ac6f3 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -90,6 +90,7 @@ typedef volatile LONG my_pthread_once_t; windows implementation of pthread_cond_timedwait */ +#ifndef HAVE_STRUCT_TIMESPEC /* Declare a union to make sure FILETIME is properly aligned so it can be used directly as a 64 bit value. The value @@ -128,6 +129,7 @@ struct timespec { ((TS1.tv.i64 > TS2.tv.i64) ? 1 : \ ((TS1.tv.i64 < TS2.tv.i64) ? -1 : 0)) +#endif int win_pthread_mutex_trylock(pthread_mutex_t *mutex); int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *); @@ -433,13 +435,7 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex); #endif /* !set_timespec_nsec */ #else #ifndef set_timespec -#define set_timespec(ABSTIME,SEC) \ -{\ - struct timeval tv;\ - gettimeofday(&tv,0);\ - (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\ - (ABSTIME).tv_nsec=tv.tv_usec*1000;\ -} +#define set_timespec(ABSTIME,SEC) set_timespec_nsec((ABSTIME),(SEC)*1000000000ULL) #endif /* !set_timespec */ #ifndef set_timespec_nsec #define set_timespec_nsec(ABSTIME,NSEC) \ -- cgit v1.2.1 From 0aab0e7a3d9afa5475d5a515142a19c6a09ae44c Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 11 Jan 2016 14:10:58 +0100 Subject: Updated copyright year in user visible text --- include/welcome_copyright_notice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/welcome_copyright_notice.h b/include/welcome_copyright_notice.h index eb2bf260af3..7b6c28c2f56 100644 --- a/include/welcome_copyright_notice.h +++ b/include/welcome_copyright_notice.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ #ifndef _welcome_copyright_notice_h_ #define _welcome_copyright_notice_h_ -#define COPYRIGHT_NOTICE_CURRENT_YEAR "2015" +#define COPYRIGHT_NOTICE_CURRENT_YEAR "2016" /* This define specifies copyright notice which is displayed by every MySQL -- cgit v1.2.1 From 8cf1f50967ff58abb7d9688ae64ac662e66389c0 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Mon, 1 Feb 2016 16:10:49 +0100 Subject: MDEV-9112: Non-blocking client API missing on non-x86 platforms The check for UCONTEXT in cmake was somehow become broken, disabling the fallback to ucontext. This caused the non-blocking client API to not be available for non-x86 platforms, on which no hand-crafted assembler implementation of my_context is available. --- include/my_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_context.h b/include/my_context.h index b5daca25bba..dd44103d3b2 100644 --- a/include/my_context.h +++ b/include/my_context.h @@ -31,7 +31,7 @@ #define MY_CONTEXT_USE_X86_64_GCC_ASM #elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__) #define MY_CONTEXT_USE_I386_GCC_ASM -#elif defined(HAVE_UCONTEXT) +#elif defined(HAVE_UCONTEXT_H) #define MY_CONTEXT_USE_UCONTEXT #else #define MY_CONTEXT_DISABLE -- cgit v1.2.1 From 603c0960ba7e27dfa25c1b0297deb1c4c5ed6746 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 3 Feb 2016 00:43:00 +0100 Subject: MDEV-9466 : Exception handler on Windows does not output any text, if mysqld runs as service The bug is caused by the attempt to write to filedescriptor 2 (STDERR_FILENO), however in case of a service stderr has different fd (debugging shows fileno(stderr) is 4 after freopen, and -1 before it) Fixed definition of STDERR_FILENO for Windows to be fileno(stderr). --- include/my_global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_global.h b/include/my_global.h index 09adc9989ef..9e9651b7409 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -436,7 +436,7 @@ extern "C" int madvise(void *addr, size_t len, int behav); #endif #ifndef STDERR_FILENO -#define STDERR_FILENO 2 +#define STDERR_FILENO fileno(stderr) #endif /* -- cgit v1.2.1 From c4cb24006139bb6a619ca9d6b00d00c2275d2c28 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 6 Feb 2016 22:41:58 +0100 Subject: MDEV-9024 Build fails with VS2015 cherry-pick f1daf9ce from 10.0 branch ------------------------------------- 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) --- include/my_pthread.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/my_pthread.h b/include/my_pthread.h index 17c971cd621..9b5703dedb7 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 *); -- cgit v1.2.1