From 207e6ea598e56acb3a77603f85d9f4448a81ddcc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 26 Aug 2002 12:28:49 +0300 Subject: Fix for HPUX to not use -lc_r library. Fixed hangup problem in net_clear() on HPUX and Windows. Build-tools/Do-compile: Added --bdb-max-lock=60000 option when testing BDB tables. configure.in: Fix for HPUX to not use -lc_r library. vio/viosocket.c: Fixed hangup problem in net_clear() on HPUX and Windows. --- Build-tools/Do-compile | 4 ++-- configure.in | 4 ++-- vio/viosocket.c | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index b41733394ab..061b0c4147f 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -159,7 +159,7 @@ if ($opt_stage <= 1) } if ($opt_with_other_libc) { - $opt_with_other_libc = "--with-other-libc=$opt_with_other_libc"; + $opt_with_other_libc = "--with-other-libc=$opt_with_other_libc"; } if (!$opt_enable_shared) { @@ -254,7 +254,7 @@ if (!$opt_no_test) $extra=""; if ($opt_bdb) { - $extra.=" -O bdb_cache_size=16M"; + $extra.=" --bdb_cache_size=16M --bdb_max_lock=60000" } if ($opt_innodb) { diff --git a/configure.in b/configure.in index 5c6330c2672..8a74c3e5265 100644 --- a/configure.in +++ b/configure.in @@ -1315,11 +1315,11 @@ AC_CHECK_LIB(pthread,strtok_r) LIBS="$my_save_LIBS" if test "$ac_cv_lib_pthread_strtok_r" = "no" then - my_save_LIBS="$LIBS" AC_CHECK_LIB(c_r,strtok_r) case "$with_osf32_threads---$target_os" in # Don't keep -lc_r in LIBS; -pthread handles it magically - yes---* | *---freebsd* ) LIBS="$my_save_LIBS" ;; + yes---* | *---freebsd* | *---hpux*) LIBS="$my_save_LIBS" ;; + esac AC_CHECK_FUNCS(strtok_r pthread_init) else diff --git a/vio/viosocket.c b/vio/viosocket.c index 176af25b395..2c6cdb5a7fd 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -123,7 +123,6 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode, #if !defined(HAVE_OPENSSL) #if !defined(___WIN__) && !defined(__EMX__) #if !defined(NO_FCNTL_NONBLOCK) - if (vio->sd >= 0) { int old_fcntl=vio->fcntl_mode; @@ -134,6 +133,8 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode, if (old_fcntl != vio->fcntl_mode) r = fcntl(vio->sd, F_SETFL, vio->fcntl_mode); } +#else + r= set_blocking_mode ? 0 : 1; #endif /* !defined(NO_FCNTL_NONBLOCK) */ #else /* !defined(__WIN__) && !defined(__EMX__) */ #ifndef __EMX__ @@ -155,6 +156,10 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode, if (old_fcntl != vio->fcntl_mode) r = ioctlsocket(vio->sd,FIONBIO,(void*) &arg, sizeof(arg)); } +#ifndef __EMX__ + else + r= test(!(vio->fcntl_mode & O_NONBLOCK)) != set_blocking_mode; +#endif /* __EMX__ */ #endif /* !defined(__WIN__) && !defined(__EMX__) */ #endif /* !defined (HAVE_OPENSSL) */ DBUG_PRINT("exit", ("%d", r)); -- cgit v1.2.1