diff --git a/Makefile.inc1 b/Makefile.inc1 index cb18de6c3c1f..08130a481c7a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -973,14 +973,6 @@ _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libexpat \ lib/libopie__L lib/libtacplus__L: lib/libmd__L -.if !defined(NO_BIND) -.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64" -_prebuild_libs+= lib/libc_r -.else -_prebuild_libs+= lib/libpthread -.endif -.endif - _generic_libs+= lib .if !defined(NO_CRYPT) diff --git a/lib/bind/bind/config.h b/lib/bind/bind/config.h index 1d5285f1e88c..ac563d3459a8 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 eb9594e3ba10..42d2c14c4353 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 header file. */ +/* #undef HAVE_DLFCN_H */ + /* Define to 1 if you have the 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 does not define. */ /* #undef size_t */ diff --git a/lib/bind/config.mk b/lib/bind/config.mk index ac8d43328633..15d81229d43d 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 6114bd0cdf68..c296235ff18f 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 be0e8ebf3e3d..c40be125b4b3 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. diff --git a/usr.bin/dig/Makefile b/usr.bin/dig/Makefile index d7ec398d1ac8..0f19499f7249 100644 --- a/usr.bin/dig/Makefile +++ b/usr.bin/dig/Makefile @@ -14,7 +14,7 @@ SRCS+= dig.c dighost.c CFLAGS+= -I${SRCDIR}/include -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} .include diff --git a/usr.bin/host/Makefile b/usr.bin/host/Makefile index ed24435059f6..998a496c7b37 100644 --- a/usr.bin/host/Makefile +++ b/usr.bin/host/Makefile @@ -14,7 +14,7 @@ SRCS+= dighost.c host.c CFLAGS+= -I${SRCDIR}/include -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} .include diff --git a/usr.bin/nslookup/Makefile b/usr.bin/nslookup/Makefile index 244dc4ee1038..c8a2dda6ca8d 100644 --- a/usr.bin/nslookup/Makefile +++ b/usr.bin/nslookup/Makefile @@ -14,7 +14,7 @@ SRCS+= dighost.c nslookup.c CFLAGS+= -I${SRCDIR}/include -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} .include diff --git a/usr.bin/nsupdate/Makefile b/usr.bin/nsupdate/Makefile index ea0128759a5a..3bc6506df99a 100644 --- a/usr.bin/nsupdate/Makefile +++ b/usr.bin/nsupdate/Makefile @@ -14,8 +14,8 @@ SRCS+= nsupdate.c CFLAGS+= -I${SRCDIR}/include -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} MAN= nsupdate.8 diff --git a/usr.sbin/dnssec-keygen/Makefile b/usr.sbin/dnssec-keygen/Makefile index 3ac90058106d..0964188e0cb6 100644 --- a/usr.sbin/dnssec-keygen/Makefile +++ b/usr.sbin/dnssec-keygen/Makefile @@ -14,8 +14,8 @@ SRCS+= dnssec-keygen.c dnssectool.c CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/include -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} MAN= dnssec-keygen.8 diff --git a/usr.sbin/dnssec-signzone/Makefile b/usr.sbin/dnssec-signzone/Makefile index 7c4ca65a78cc..73dcc75718cc 100644 --- a/usr.sbin/dnssec-signzone/Makefile +++ b/usr.sbin/dnssec-signzone/Makefile @@ -14,8 +14,8 @@ SRCS+= dnssec-signzone.c dnssectool.c CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/include -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} MAN= dnssec-signzone.8 diff --git a/usr.sbin/named-checkconf/Makefile b/usr.sbin/named-checkconf/Makefile index 8728b4ad15e9..0a631f91a567 100644 --- a/usr.sbin/named-checkconf/Makefile +++ b/usr.sbin/named-checkconf/Makefile @@ -14,8 +14,8 @@ SRCS+= named-checkconf.c check-tool.c CFLAGS+= -I${LIB_BIND_DIR} -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} MAN= named-checkconf.8 diff --git a/usr.sbin/named-checkzone/Makefile b/usr.sbin/named-checkzone/Makefile index 39384e52a237..1a7d191d17da 100644 --- a/usr.sbin/named-checkzone/Makefile +++ b/usr.sbin/named-checkzone/Makefile @@ -14,8 +14,8 @@ SRCS+= named-checkzone.c check-tool.c CFLAGS+= -I${LIB_BIND_DIR} -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} MAN= named-checkzone.8 diff --git a/usr.sbin/named/Makefile b/usr.sbin/named/Makefile index 4cf8db3045a9..fe294eaf2dfc 100644 --- a/usr.sbin/named/Makefile +++ b/usr.sbin/named/Makefile @@ -24,8 +24,8 @@ SRCS+= aclconf.c builtin.c client.c config.c control.c \ CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/include -I${LIB_BIND_DIR} -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} MAN= named.8 lwresd.8 named.conf.5 diff --git a/usr.sbin/rndc-confgen/Makefile b/usr.sbin/rndc-confgen/Makefile index b8a52dd4d57a..e924f5c41d7f 100644 --- a/usr.sbin/rndc-confgen/Makefile +++ b/usr.sbin/rndc-confgen/Makefile @@ -17,8 +17,8 @@ SRCS+= rndc-confgen.c util.c CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/include -I${LIB_BIND_DIR} -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} MAN= rndc-confgen.8 diff --git a/usr.sbin/rndc/Makefile b/usr.sbin/rndc/Makefile index 2ca76976e5a9..70c5d6d6d686 100644 --- a/usr.sbin/rndc/Makefile +++ b/usr.sbin/rndc/Makefile @@ -17,8 +17,8 @@ SRCS+= rndc.c util.c CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/include -I${LIB_BIND_DIR} -DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} -LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} +DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} +LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} MAN= rndc.8 rndc.conf.5