summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorserg@serg.mylan <>2005-02-17 14:00:44 +0100
committerserg@serg.mylan <>2005-02-17 14:00:44 +0100
commit530eecbd99c7157917ca95b80e002e32d1d6e50e (patch)
tree2286825455d6ff56f96a8bcd52bbb6737ebcd354 /include
parentf795c787cd66e3c94f6d3461a93658359c6a7ac4 (diff)
parent2b41b8fa0187c80c135e346a262b0472cd295889 (diff)
downloadmariadb-git-530eecbd99c7157917ca95b80e002e32d1d6e50e.tar.gz
Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0-xa
Diffstat (limited to 'include')
-rw-r--r--include/my_global.h2
-rw-r--r--include/my_pthread.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/my_global.h b/include/my_global.h
index f5cd8edeab9..30b98b9fbeb 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -761,7 +761,7 @@ typedef long int32;
#endif
typedef unsigned long uint32; /* Short for unsigned integer >= 32 bits */
#else
-error "Neither int or long is of 4 bytes width"
+#error "Neither int or long is of 4 bytes width"
#endif
#if !defined(HAVE_ULONG) && !defined(HAVE_LINUXTHREADS) && !defined(__USE_MISC)
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 8e5d2aa0e01..b170753913b 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -689,12 +689,12 @@ extern pthread_t shutdown_th, main_th, signal_th;
#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)))
-#if defined (__GNUC__) || defined (__cplusplus)
-static inline bool thread_safe_dec_and_test(ulong V, pthread_mutex_t *L)
+#ifdef __cplusplus
+static inline bool thread_safe_dec_and_test(ulong &V, pthread_mutex_t *L)
{
ulong res;
pthread_mutex_lock(L);
- res=V--;
+ res=--V;
pthread_mutex_unlock(L);
return res==0;
}