Commit f3f1e53e authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Fix for HPUX to not use -lc_r library.

Fixed hangup problem in net_clear() on HPUX and Windows. 
parent 7229f853
......@@ -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)
{
......
......@@ -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
......
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment