summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2005-07-25 14:44:11 +0000
committerdes <des@FreeBSD.org>2005-07-25 14:44:11 +0000
commit96f2eb8f8a21f13bcc534dbc434fa918cd5fea62 (patch)
treed848c0acefb27fd6ce966fce864fdd4501bffccd /lib
parent817761fa0f8a54cbdf828342dfc6441acf6d06f8 (diff)
downloadFreeBSD-src-96f2eb8f8a21f13bcc534dbc434fa918cd5fea62.zip
FreeBSD-src-96f2eb8f8a21f13bcc534dbc434fa918cd5fea62.tar.gz
Disable thread support in BIND. It appears to reduce performance rather
than increase it, and seems to be the cause of the memory leaks which some users have reported. Requested by: dougb MFC after: 5 days
Diffstat (limited to 'lib')
-rw-r--r--lib/bind/bind/config.h8
-rw-r--r--lib/bind/config.h19
-rw-r--r--lib/bind/config.mk16
-rw-r--r--lib/bind/isc/Makefile12
-rw-r--r--lib/bind/isc/isc/platform.h2
5 files changed, 28 insertions, 29 deletions
diff --git a/lib/bind/bind/config.h b/lib/bind/bind/config.h
index 1d5285f..ac563d3 100644
--- a/lib/bind/bind/config.h
+++ b/lib/bind/bind/config.h
@@ -46,3 +46,11 @@ extern __inline int __sputaux(int _c, struct __sFILE *_p);
#endif
/* #undef BROKEN_IN6ADDR_INIT_MACROS */
#define HAVE_STRLCAT 1
+/* Shut up warnings about missing braces */
+/* #undef SHUTUP_MUTEX_INITIALIZER */
+#ifdef SHUTUP_MUTEX_INITIALIZER
+#define LIBBIND_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER }
+#else
+#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+#endif
+
diff --git a/lib/bind/config.h b/lib/bind/config.h
index eb9594e..42d2c14 100644
--- a/lib/bind/config.h
+++ b/lib/bind/config.h
@@ -36,7 +36,7 @@
/* #undef NEED_PTHREAD_INIT */
/* define if your system has sigwait() */
-#define HAVE_SIGWAIT 1
+/* #undef HAVE_SIGWAIT */
/* define if sigwait() is the UnixWare flavor */
/* #undef HAVE_UNIXWARE_SIGWAIT */
@@ -48,7 +48,7 @@
/* #undef HAVE_LINUXTHREADS */
/* define if sysconf() is available */
-#define HAVE_SYSCONF 1
+/* #undef HAVE_SYSCONF */
/* define if sysctlbyname() is available */
#define HAVE_SYSCTLBYNAME 1
@@ -129,10 +129,10 @@ int sigwait(const unsigned int *set, int *sig);
#define PATH_RANDOMDEV "/dev/random"
/* define if pthread_attr_getstacksize() is available */
-#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
+/* #undef HAVE_PTHREAD_ATTR_GETSTACKSIZE */
/* define if pthread_attr_setstacksize() is available */
-#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
+/* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */
/* define if you have strerror in the C library. */
#define HAVE_STRERROR 1
@@ -149,6 +149,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
/* #undef NEED_PTHREAD_SCOPE_SYSTEM */
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #undef HAVE_DLFCN_H */
+
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
@@ -165,7 +168,7 @@ int sigwait(const unsigned int *set, int *sig);
/* #undef HAVE_LIBNSL */
/* Define to 1 if you have the `pthread' library (-lpthread). */
-#define HAVE_LIBPTHREAD 1
+/* #undef HAVE_LIBPTHREAD */
/* Define to 1 if you have the `scf' library (-lscf). */
/* #undef HAVE_LIBSCF */
@@ -252,9 +255,11 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
- if it is not supported. */
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
/* #undef inline */
+#endif
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */
diff --git a/lib/bind/config.mk b/lib/bind/config.mk
index ac8d433..15d8122 100644
--- a/lib/bind/config.mk
+++ b/lib/bind/config.mk
@@ -74,7 +74,7 @@ LIBISCCFG= ${LIB_BIND_REL}/isccfg/libisccfg.a
CFLAGS+= -I${BIND_DIR}/lib/isccfg/include
LIBISC= ${LIB_BIND_REL}/isc/libisc.a
CFLAGS+= -I${BIND_DIR}/lib/isc/unix/include \
- -I${BIND_DIR}/lib/isc/pthreads/include \
+ -I${BIND_DIR}/lib/isc/nothreads/include \
-I${BIND_DIR}/lib/isc/include \
-I${LIB_BIND_DIR}/isc
LIBLWRES= ${LIB_BIND_REL}/lwres/liblwres.a
@@ -95,17 +95,3 @@ BIND_LDADD= ${BIND_DPADD}
CRYPTO_DPADD= ${LIBCRYPTO}
CRYPTO_LDADD= -lcrypto
.endif
-
-# Link against POSIX threads library
-.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64"
-.if defined(NO_LIBC_R)
-.error "BIND requires libpthread - define NO_BIND, or undefine NO_LIBC_R"
-.endif
-.else
-.if defined(NO_LIBPTHREAD)
-.error "BIND requires libpthread - define NO_BIND, or undefine NO_LIBPTHREAD"
-.endif
-.endif
-
-PTHREAD_DPADD= ${LIBPTHREAD}
-PTHREAD_LDADD= -lpthread
diff --git a/lib/bind/isc/Makefile b/lib/bind/isc/Makefile
index 6114bd0..c296235 100644
--- a/lib/bind/isc/Makefile
+++ b/lib/bind/isc/Makefile
@@ -19,7 +19,7 @@ SRCS+= app.c dir.c entropy.c \
.PATH: ${SRCDIR}/nls
SRCS+= msgcat.c \
-.PATH: ${SRCDIR}/pthreads
+.PATH: ${SRCDIR}/nothreads
SRCS+= condition.c mutex.c \
thread.c
@@ -35,7 +35,7 @@ SRCS+= inet_pton.c \
serial.c sha1.c sockaddr.c string.c strtoul.c \
symtab.c task.c taskpool.c timer.c version.c
-CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/pthreads/include
+CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/nothreads/include
CFLAGS+= -I${SRCDIR}/include -I${.CURDIR}
DPADD= ${PTHREAD_DPADD}
@@ -104,10 +104,10 @@ INCS= ${SRCDIR}/include/isc/app.h \
${SRCDIR}/include/isc/types.h \
${SRCDIR}/include/isc/util.h \
${SRCDIR}/include/isc/version.h \
- ${SRCDIR}/pthreads/include/isc/condition.h \
- ${SRCDIR}/pthreads/include/isc/mutex.h \
- ${SRCDIR}/pthreads/include/isc/once.h \
- ${SRCDIR}/pthreads/include/isc/thread.h \
+ ${SRCDIR}/nothreads/include/isc/condition.h \
+ ${SRCDIR}/nothreads/include/isc/mutex.h \
+ ${SRCDIR}/nothreads/include/isc/once.h \
+ ${SRCDIR}/nothreads/include/isc/thread.h \
${SRCDIR}/unix/include/isc/dir.h \
${SRCDIR}/unix/include/isc/int.h \
${SRCDIR}/unix/include/isc/keyboard.h \
diff --git a/lib/bind/isc/isc/platform.h b/lib/bind/isc/isc/platform.h
index be0e8eb..c40be12 100644
--- a/lib/bind/isc/isc/platform.h
+++ b/lib/bind/isc/isc/platform.h
@@ -158,7 +158,7 @@
/*
* Defined if we are using threads.
*/
-#define ISC_PLATFORM_USETHREADS 1
+#undef ISC_PLATFORM_USETHREADS
/*
* Defined if unistd.h does not cause fd_set to be delared.
OpenPOWER on IntegriCloud