You don't have the threadsafe versions, or configure didn't find them.
tom jackson
On Friday 19 October 2007 08:19, Enrique Catalan wrote:
> checking for gethostbyname_r... no
> checking for gethostbyaddr_r... no
> configure: WARNING: dns queries will use non-threadsafe calls which
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <list...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
I tried to compile Aolserver4.5 for unix and got weird warning message
and was wondering if you know how to get rid of that, I hadn't got
this before.
The messages I got are:
% /usr/local/tcl8.4.16/bin/tclsh8.4 nsconfig.tcl -install
/usr/local/aolserver4.5/
Executing ./configure TCLSH=/usr/local/tcl8.4.16/bin/tclsh8.4
--prefix=/usr/local/aolserver4.5 --with-tcl=/usr/local/tcl8.4.16/lib
checking for Tcl configuration... found /usr/local/tcl8.4.16/lib/tclConfig.sh
checking for existence of /usr/local/tcl8.4.16/lib/tclConfig.sh... loading
checking for build with symbols... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h .. . yes
checking for unistd.h... yes
checking for inttypes.h... (cached) yes
checking for timegm... no
checking for fork1... no
checking for drand48... yes
checking for random... yes
checking for _NSGetEnviron... no
checking for poll... yes
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking need for dup high... no
checking for shared libgcc... no
checking for getaddrinfo in -lsocket... no
checking for getnameinfo in -lsocket... no
checking for getaddrinfo... no
checking for getnameinfo... no
checking for gethostbyname_r... no
checking for gethostbyaddr_r... no
configure: WARNING: dns queries will use non-threadsafe calls which
could result in server instability
configure: creating ./config.status
config.status: creating include/ns.mak
%
Thanks!
I mean, I'm compiling everything with the right switches according to
the README files to get the threading stuff and still getting this.
Using tcl 8.4.16 multithreaded and using --enable-threads when
compiling the aolsvr45.
Thanks!
Cheers
$ find . -name "*.c" -print | xargs egrep -n '(gethostbyname|gethostbyaddr)'
./driver.c:261: he = gethostbyname(host ? host : Ns_InfoHostname());
./driver.c:274: he = gethostbyaddr(he->h_addr, he->h_length, he->h_addrtype);
SF bug #1008721 (closed since 2004) says that's ok, no danger:
http://sourceforge.net/tracker/index.php?func=detail&aid=1008721&group_id=3152&atid=103152
AOLserver uses gethostbyname() in two places - once
in nsd/driver.c at server start-up, which is safe since
we're only running one thread in the config interp at
that time.
But, why call these non-thread-safe functions there, rather than
Ns_GetAddrByHost() and Ns_GetHostByAddr()?
Alos, if we do keep the use of gethostbyname(), ideally someone would
add a comment saying why, and that it's safe, like Dossy explained in
that old ticket.
--
Andrew Piskorski <a...@piskorski.com>
http://www.piskorski.com/
Good question! Without looking too deeply at the code, the two
functions you reference uses mutexes and caches--things that I don't
believe are initialized at the early time of Ns_DriverInit's invoking.
I haven't actually researched this, so I could be totally wrong.
> Alos, if we do keep the use of gethostbyname(), ideally someone would
> add a comment saying why, and that it's safe, like Dossy explained in
> that old ticket.
Feel free to copy my explanation into the source as a comment, if you
feel it's valuable to do so.
-- Dossy
--
Dossy Shiobara | do...@panoptic.com | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)