don't call master_cleanup() directly from signal handler.
* routines.c: prototype getutline() if necessary
* getutline.c: stupid bugfix
+ * acconfig.h, configure.in, locate_host.c, server.h: work around
+ nonreentrant gethostbyaddr() on BSDI
Mon Feb 15 22:59:00 EST 1999 Vaggelis Tsirkas
* citadel.c: increased hostname buffer size to handle very big names
/* define this if struct utmp has an ut_type member */
#undef HAVE_UT_TYPE
+
+/* define this if the OS has broken non-reentrant gethostby{name,addr}() */
+#undef HAVE_NONREENTRANT_NETDB
SO=.so
case "$host" in
dnl BSDI 3.0 wants relocatable object modules instead of shared libs
- dnl for dlopen(), and has a wrapper script to link with shared libs
+ dnl for dlopen(), and has a wrapper script to link with shared libs.
+ dnl Also has stupid non-reentrant gethostbyaddr() and friends.
i?86-*-bsdi*)
test -z "$CC" -a -x /usr/bin/shlicc2 && CC=shlicc2
SO=.mo
+ AC_DEFINE(HAVE_NONREENTRANT_NETDB)
;;
dnl Digital Unix has an odd way to build pthreads, and we can't build
dnl pthreads programs with gcc due to header problems.
strcpy(tbuf,config.c_fqdn);
return;
}
+
+#ifdef HAVE_NONREENTRANT_NETDB
+ begin_critical_section(S_NETDB);
+#endif
if((ch = gethostbyaddr((char *) &cs.sin_addr, sizeof(cs.sin_addr),
AF_INET)) == NULL) {
}
strncpy(tbuf,ch->h_name, 24);
+
+#ifdef HAVE_NONREENTRANT_NETDB
+ end_critical_section(S_NETDB);
+#endif
+
tbuf[24] = 0;
}
#define S_CONTROL 8
#define S_HOUSEKEEPING 9
#define S_DATABASE 10
-#define MAX_SEMAPHORES 11
+#define S_NETDB 11
+#define MAX_SEMAPHORES 12
/*