diff options
author | unknown <jani@a88-113-38-195.elisa-laajakaista.fi> | 2007-01-22 02:32:07 +0200 |
---|---|---|
committer | unknown <jani@a88-113-38-195.elisa-laajakaista.fi> | 2007-01-22 02:32:07 +0200 |
commit | 454c763c6be44b34c8e1ff9b8561ab21e717b742 (patch) | |
tree | 48ef8f384e9e6131e128376bb19245a4cfec17c3 /include/my_global.h | |
parent | 7b2b2231a2df30198eb5dd4a35f7270dec5e5468 (diff) | |
download | mariadb-git-454c763c6be44b34c8e1ff9b8561ab21e717b742.tar.gz |
Fix for configure to detect library correctly.
Fix to check library in use during runtime.
Fix for Bug#16995, "idle connections not being killed due to timeout when NPTL is used".
BUILD/SETUP.sh:
To avoid warnings during compilation.
configure.in:
Fixed configure so that it can correctly detect
between NPTL and Linuxthreads.
include/my_global.h:
Fix for Linuxthreads.
include/my_pthread.h:
Added defines for different libraries that can be detected.
Currently only 'other', 'nptl', and 'lt' (linuxthreads) are
being used.
changed sigset() and signal() to my_sigset() and my_signal()
include/thr_alarm.h:
Removed defines for Linuxthreads. This is now detected during
runtime and handled in the thr_alarm.c
mysys/my_pthread.c:
Runtime check for library.
mysys/thr_alarm.c:
Runtime checks for library and corresponding
signals.
sql/mysqld.cc:
Added function for detecting thread library in use
during start-up.
THR_KILL_SIGNAL removed, setting signals during runtime.
Diffstat (limited to 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/my_global.h b/include/my_global.h index 37e53c65dec..e6bf9a9b840 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -97,7 +97,7 @@ /* Fix problem with S_ISLNK() on Linux */ -#if defined(HAVE_LINUXTHREADS) +#if defined(TARGET_OS_LINUX) || defined(__GLIBC__) #undef _GNU_SOURCE #define _GNU_SOURCE 1 #endif @@ -348,7 +348,10 @@ int __void__; #endif /* Define some useful general macros */ -#if !defined(max) +#if defined(__cplusplus) && defined(__GNUC__) +#define max(a, b) ((a) >? (b)) +#define min(a, b) ((a) <? (b)) +#elif !defined(max) #define max(a, b) ((a) > (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b)) #endif |