summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-11-25 16:46:45 +0300
committerAlexander Nozdrin <alik@sun.com>2009-11-25 16:46:45 +0300
commit4b28a6ce84fbcab3e819018a03c116c0939dab5e (patch)
tree3e8e0dbed8da743714f85fb19c404dce34319d8b /include
parent6e01be7552aa5c5fb854d30d5d8cb61c2729b292 (diff)
parent0a9d4e675ad3b176909d30c5a6aa8ab1f0b7186b (diff)
downloadmariadb-git-4b28a6ce84fbcab3e819018a03c116c0939dab5e.tar.gz
Auto-merge from mysql-next-mr.
Diffstat (limited to 'include')
-rw-r--r--include/config-netware.h1
-rw-r--r--include/config-win.h15
-rw-r--r--include/my_alarm.h10
-rw-r--r--include/my_global.h11
-rw-r--r--include/my_pthread.h35
-rw-r--r--include/violite.h1
6 files changed, 21 insertions, 52 deletions
diff --git a/include/config-netware.h b/include/config-netware.h
index 4b9e1437170..adde3c4fbd2 100644
--- a/include/config-netware.h
+++ b/include/config-netware.h
@@ -73,7 +73,6 @@ extern "C" {
#undef HAVE_FINITE
#undef HAVE_GETPWNAM
#undef HAVE_GETPWUID
-#undef HAVE_PTHREAD_SETSCHEDPARAM
#undef HAVE_READLINK
#undef HAVE_STPCPY
/* changes end */
diff --git a/include/config-win.h b/include/config-win.h
index 364c4f92134..431bfcfa702 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -145,10 +145,21 @@ typedef __int64 os_off_t;
#ifdef _WIN64
typedef UINT_PTR rf_SetTimer;
#else
+typedef uint rf_SetTimer;
+#endif
+
#ifndef HAVE_SIZE_T
-typedef unsigned int size_t;
+#ifndef _SIZE_T_DEFINED
+typedef SIZE_T size_t;
+#define _SIZE_T_DEFINED
+#endif
+#endif
+
+#ifndef HAVE_SSIZE_T
+#ifndef _SSIZE_T_DEFINED
+typedef SSIZE_T ssize_t;
+#define _SSIZE_T_DEFINED
#endif
-typedef uint rf_SetTimer;
#endif
#define Socket_defined
diff --git a/include/my_alarm.h b/include/my_alarm.h
index 750135d64ed..dd2d5642f5f 100644
--- a/include/my_alarm.h
+++ b/include/my_alarm.h
@@ -33,15 +33,15 @@ extern ulong my_time_to_wait_for_lock;
#define ALARM_INIT my_have_got_alarm=0 ; \
alarm_old=(uint) alarm(MY_HOW_OFTEN_TO_ALARM); \
alarm_signal=signal(SIGALRM,my_set_alarm_variable);
-#define ALARM_END VOID(signal(SIGALRM,alarm_signal)); \
- VOID(alarm(alarm_old));
+#define ALARM_END (void) signal(SIGALRM,alarm_signal); \
+ (void) alarm(alarm_old);
#define ALARM_TEST my_have_got_alarm
#ifdef DONT_REMEMBER_SIGNAL
-#define ALARM_REINIT VOID(alarm(MY_HOW_OFTEN_TO_ALARM)); \
- VOID(signal(SIGALRM,my_set_alarm_variable));\
+#define ALARM_REINIT (void) alarm(MY_HOW_OFTEN_TO_ALARM); \
+ (void) signal(SIGALRM,my_set_alarm_variable);\
my_have_got_alarm=0;
#else
-#define ALARM_REINIT VOID(alarm((uint) MY_HOW_OFTEN_TO_ALARM)); \
+#define ALARM_REINIT (void) alarm((uint) MY_HOW_OFTEN_TO_ALARM); \
my_have_got_alarm=0;
#endif /* DONT_REMEMBER_SIGNAL */
#else
diff --git a/include/my_global.h b/include/my_global.h
index f6d1592fc6f..815be622b16 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -542,17 +542,6 @@ extern "C" int madvise(void *addr, size_t len, int behav);
#define DONT_REMEMBER_SIGNAL
#endif
-/* Define void to stop lint from generating "null effekt" comments */
-#ifndef DONT_DEFINE_VOID
-#ifdef _lint
-int __void__;
-#define VOID(X) (__void__ = (int) (X))
-#else
-#undef VOID
-#define VOID(X) (X)
-#endif
-#endif /* DONT_DEFINE_VOID */
-
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
#define LINT_INIT(var) var=0 /* No uninitialize-warning */
#else
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 3e23c0fa410..3b95e2adb73 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -35,7 +35,6 @@ typedef DWORD pthread_t;
typedef struct thread_attr {
DWORD dwStackSize ;
DWORD dwCreatingFlag ;
- int priority ;
} pthread_attr_t ;
typedef struct { int dummy; } pthread_condattr_t;
@@ -110,7 +109,6 @@ int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_destroy(pthread_cond_t *cond);
int pthread_attr_init(pthread_attr_t *connect_att);
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
-int pthread_attr_setprio(pthread_attr_t *connect_att,int priority);
int pthread_attr_destroy(pthread_attr_t *connect_att);
struct tm *localtime_r(const time_t *timep,struct tm *tmp);
struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
@@ -141,20 +139,19 @@ int pthread_join(pthread_t thread, void **value_ptr);
#define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A))
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
-#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
/* Dummy defines for easier code */
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
-#define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B)
#define pthread_attr_setscope(A,B)
#define pthread_detach_this_thread()
#define pthread_condattr_init(A)
#define pthread_condattr_destroy(A)
#define pthread_yield() SwitchToThread()
-#define my_pthread_getprio(thread_id) pthread_dummy(0)
+/* per the platform's documentation */
+#define pthread_yield() Sleep(0)
#else /* Normal threads */
@@ -182,8 +179,6 @@ void my_pthread_exit(void *status);
#define pthread_exit(A) my_pthread_exit(A)
#endif
-extern int my_pthread_getprio(pthread_t thread_id);
-
#define pthread_key(T,V) pthread_key_t V
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
@@ -255,32 +250,6 @@ int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
#define my_sigset(A,B) signal((A),(B))
#endif
-#ifndef my_pthread_setprio
-#if defined(HAVE_PTHREAD_SETPRIO_NP) /* FSU threads */
-#define my_pthread_setprio(A,B) pthread_setprio_np((A),(B))
-#elif defined(HAVE_PTHREAD_SETPRIO)
-#define my_pthread_setprio(A,B) pthread_setprio((A),(B))
-#elif defined(HAVE_PTHREAD_SETSCHEDPRIO) && !defined (__GNUC__)
-/*
- Workaround for bug on Solaris where pthread.h have bug in GNU
- version of pthread.h => configure says yes, header files says
- no. So not used with gcc and issue is Solaris only, so will
- be used on Solaris using SunStudio.
-*/
-#define my_pthread_setprio(A,B) pthread_setschedprio((A),(B))
-#else
-extern void my_pthread_setprio(pthread_t thread_id,int prior);
-#endif
-#endif
-
-#ifndef my_pthread_attr_setprio
-#ifdef HAVE_PTHREAD_ATTR_SETPRIO
-#define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B))
-#else
-extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority);
-#endif
-#endif
-
#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS)
#define pthread_attr_setscope(A,B)
#undef HAVE_GETHOSTBYADDR_R /* No definition */
diff --git a/include/violite.h b/include/violite.h
index 0af7a566307..3e8e430392b 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -86,6 +86,7 @@ my_bool vio_peer_addr(Vio* vio, char *buf, uint16 *port);
void vio_in_addr(Vio *vio, struct in_addr *in);
my_bool vio_poll_read(Vio *vio, uint timeout);
my_bool vio_is_connected(Vio *vio);
+ssize_t vio_pending(Vio *vio);
#ifdef HAVE_OPENSSL
#include <openssl/opensslv.h>