mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Force sockets to be blocking on HPUX 11.0
Changed BITMAP to MY_BITMAP to avoid type conflict on windows configure.in: Force sockets to be blocking on HPUX 11.0 include/my_bitmap.h: Changed BITMAP to MY_BITMAP to avoid type conflict on windows mysys/my_bitmap.c: Changed BITMAP to MY_BITMAP to avoid type conflict on windows mysys/my_init.c: Removed LOCK_bitmap sql/mysql_priv.h: Changed BITMAP to MY_BITMAP to avoid type conflict on windows sql/mysqld.cc: Changed BITMAP to MY_BITMAP to avoid type conflict on windows sql/violite.c: Force sockets to be blocking on HPUX 11.0
This commit is contained in:
parent
f816d6f16d
commit
455ac66af8
7 changed files with 22 additions and 20 deletions
|
@ -709,8 +709,8 @@ case $SYSTEM_TYPE in
|
|||
;;
|
||||
*hpux11.*)
|
||||
echo "Enabling pread/pwrite workaround for hpux 11"
|
||||
CFLAGS="$CFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS"
|
||||
CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG"
|
||||
CFLAGS="$CFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK"
|
||||
CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK"
|
||||
if test "$with_named_thread" = "no"
|
||||
then
|
||||
echo "Using --with-named-thread=-lpthread"
|
||||
|
|
|
@ -29,16 +29,16 @@ typedef struct st_bitmap
|
|||
#ifdef THREAD
|
||||
pthread_mutex_t mutex;
|
||||
#endif
|
||||
} BITMAP;
|
||||
} MY_BITMAP;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern my_bool bitmap_init(BITMAP *bitmap, uint bitmap_size);
|
||||
extern void bitmap_free(BITMAP *bitmap);
|
||||
extern void bitmap_set_bit(BITMAP *bitmap, uint bitmap_bit);
|
||||
extern uint bitmap_set_next(BITMAP *bitmap);
|
||||
extern void bitmap_clear_bit(BITMAP *bitmap, uint bitmap_bit);
|
||||
extern my_bool bitmap_init(MY_BITMAP *bitmap, uint bitmap_size);
|
||||
extern void bitmap_free(MY_BITMAP *bitmap);
|
||||
extern void bitmap_set_bit(MY_BITMAP *bitmap, uint bitmap_bit);
|
||||
extern uint bitmap_set_next(MY_BITMAP *bitmap);
|
||||
extern void bitmap_clear_bit(MY_BITMAP *bitmap, uint bitmap_bit);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -27,9 +27,7 @@
|
|||
#include <my_bitmap.h>
|
||||
#include <assert.h>
|
||||
|
||||
pthread_mutex_t LOCK_bitmap;
|
||||
|
||||
my_bool bitmap_init(BITMAP *map, uint bitmap_size)
|
||||
my_bool bitmap_init(MY_BITMAP *map, uint bitmap_size)
|
||||
{
|
||||
if (!(map->bitmap=(uchar*) my_malloc((bitmap_size+7)/8,MYF(MY_WME))))
|
||||
return 1;
|
||||
|
@ -41,7 +39,7 @@ my_bool bitmap_init(BITMAP *map, uint bitmap_size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void bitmap_free(BITMAP *map)
|
||||
void bitmap_free(MY_BITMAP *map)
|
||||
{
|
||||
if (map->bitmap)
|
||||
{
|
||||
|
@ -53,7 +51,7 @@ void bitmap_free(BITMAP *map)
|
|||
}
|
||||
}
|
||||
|
||||
void bitmap_set_bit(BITMAP *map, uint bitmap_bit)
|
||||
void bitmap_set_bit(MY_BITMAP *map, uint bitmap_bit)
|
||||
{
|
||||
if (bitmap_bit < map->bitmap_size)
|
||||
{
|
||||
|
@ -64,7 +62,7 @@ void bitmap_set_bit(BITMAP *map, uint bitmap_bit)
|
|||
}
|
||||
|
||||
|
||||
uint bitmap_set_next(BITMAP *map)
|
||||
uint bitmap_set_next(MY_BITMAP *map)
|
||||
{
|
||||
uchar *bitmap=map->bitmap;
|
||||
uint bit_found = MY_BIT_NONE;
|
||||
|
@ -94,7 +92,7 @@ uint bitmap_set_next(BITMAP *map)
|
|||
}
|
||||
|
||||
|
||||
void bitmap_clear_bit(BITMAP *map, uint bitmap_bit)
|
||||
void bitmap_clear_bit(MY_BITMAP *map, uint bitmap_bit)
|
||||
{
|
||||
if (bitmap_bit < map->bitmap_size)
|
||||
{
|
||||
|
|
|
@ -168,7 +168,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
|
|||
pthread_mutex_destroy(&THR_LOCK_keycache);
|
||||
pthread_mutex_destroy(&THR_LOCK_malloc);
|
||||
pthread_mutex_destroy(&THR_LOCK_open);
|
||||
pthread_mutex_destroy(&LOCK_bitmap);
|
||||
DBUG_POP(); /* Must be done before my_thread_end */
|
||||
my_thread_end();
|
||||
my_thread_global_end();
|
||||
|
|
|
@ -509,7 +509,7 @@ extern ulong ha_read_count, ha_write_count, ha_delete_count, ha_update_count,
|
|||
ha_read_key_count, ha_read_next_count, ha_read_prev_count,
|
||||
ha_read_first_count, ha_read_last_count,
|
||||
ha_read_rnd_count, ha_read_rnd_next_count;
|
||||
extern BITMAP temp_pool;
|
||||
extern MY_BITMAP temp_pool;
|
||||
extern bool use_temp_pool;
|
||||
extern char f_fyllchar;
|
||||
extern uchar *days_in_month;
|
||||
|
|
|
@ -284,7 +284,7 @@ I_List<THD> threads,thread_cache;
|
|||
time_t start_time;
|
||||
|
||||
|
||||
BITMAP temp_pool;
|
||||
MY_BITMAP temp_pool;
|
||||
bool use_temp_pool=0;
|
||||
|
||||
pthread_key(MEM_ROOT*,THR_MALLOC);
|
||||
|
|
|
@ -35,9 +35,11 @@
|
|||
#ifdef HAVE_POLL
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(__EMX__)
|
||||
#include <sys/ioctl.h>
|
||||
#define ioctlsocket ioctl
|
||||
#endif /* defined(__EMX__) */
|
||||
|
||||
|
@ -106,6 +108,9 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost)
|
|||
#if !defined(___WIN__) && !defined(__EMX__)
|
||||
#if !defined(NO_FCNTL_NONBLOCK)
|
||||
vio->fcntl_mode = fcntl(sd, F_GETFL);
|
||||
#elif defined(HAVE_SYS_IOCTL_H) /* hpux */
|
||||
/* Non blocking sockets doesn't work good on HPUX 11.0 */
|
||||
(void) ioctl(net->fd,FIOSNBIO,0);
|
||||
#endif
|
||||
#else /* !defined(__WIN__) && !defined(__EMX__) */
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue