From 7bb67fe38b2baf2f25244e81d09e3811279450bf Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 30 Nov 2004 01:18:08 +0000 Subject: [PATCH] 1774. [port] Aix: Silence compiler warnings / build failures. [RT #13154] --- CHANGES | 9 ++++++--- configure.in | 5 ++++- lib/bind/config.h.in | 8 ++++++++ lib/bind/configure.in | 17 ++++++++++------- lib/bind/include/netdb.h | 5 ++++- lib/bind/irs/gai_strerror.c | 5 ++++- lib/bind/irs/getnetgrent_r.c | 3 +-- lib/bind/irs/irs_data.c | 7 +++++-- lib/bind/port/aix5/include/sys/cdefs.h | 6 +++++- lib/bind/port_after.h.in | 13 +++++++++++++ lib/isccfg/include/isccfg/grammar.h | 22 +++++++++++----------- 11 files changed, 71 insertions(+), 29 deletions(-) diff --git a/CHANGES b/CHANGES index 9153c06ccd..c5d279ade5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,7 @@ -1770. [bug] named-checkconf failed to report missing a missing -1763. [func] Perform sanity checks on NS records which refer to - 'in zone' names. [RT #13002] +1774. [port] Aix: Silence compiler warnings / build failures. + [RT #13154] +1770. [bug] named-checkconf failed to report missing a missing file clause for rbt{64} master/hint zones. [RT#13009] 1769. [port] win32: change compiler flags /MTd ==> /MDd, @@ -22,6 +22,9 @@ if there was no SOA record in the replacment db. [RT #13016] +1763. [func] Perform sanity checks on NS records which refer to + 'in zone' names. [RT #13002] + 1762. [bug] isc_interfaceiter_create() could return ISC_R_SUCCESS even when it failed. [RT #12995] diff --git a/configure.in b/configure.in index 77f9eaabcc..2e12cb2ac1 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.355.18.10 $) +AC_REVISION($Revision: 1.355.18.11 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -1857,6 +1857,9 @@ AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT) ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT" case "$host" in + *-aix5.1.*) + hack_shutup_pthreadonceinit=yes + ;; *-bsdi3.1*) hack_shutup_sputaux=yes ;; diff --git a/lib/bind/config.h.in b/lib/bind/config.h.in index 46de822b7e..6c86b4deed 100644 --- a/lib/bind/config.h.in +++ b/lib/bind/config.h.in @@ -43,3 +43,11 @@ extern __inline int __sputaux(int _c, struct __sFILE *_p); #endif #undef BROKEN_IN6ADDR_INIT_MACROS #undef HAVE_STRLCAT +/* 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/configure.in b/lib/bind/configure.in index 4b8e2ea666..a3a4185f66 100644 --- a/lib/bind/configure.in +++ b/lib/bind/configure.in @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -AC_REVISION($Revision: 1.90.18.2 $) +AC_REVISION($Revision: 1.90.18.3 $) AC_INIT(resolv/herror.c) AC_PREREQ(2.13) @@ -2299,11 +2299,13 @@ AC_SUBST(INNETGR_ARGS) # Random remaining OS-specific issues involving compiler warnings. # XXXDCL print messages to indicate some compensation is being done? # -AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT) -ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT" BROKEN_IN6ADDR_INIT_MACROS="#undef BROKEN_IN6ADDR_INIT_MACROS" case "$host" in + *-aix5.1.*) + hack_shutup_pthreadmutexinit=yes + hack_shutup_in6addr_init_macros=yes + ;; *-bsdi3.1*) hack_shutup_sputaux=yes ;; @@ -2316,17 +2318,18 @@ case "$host" in hack_shutup_stdargcast=yes ;; *-solaris2.8) - hack_shutup_pthreadonceinit=yes + hack_shutup_pthreadmutexinit=yes hack_shutup_in6addr_init_macros=yes ;; esac -case "$hack_shutup_pthreadonceinit" in +case "$hack_shutup_pthreadmutexinit" in yes) # - # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings. + # Shut up PTHREAD_MUTEX_INITIALIZER unbraced + # initializer warnings. # - ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" + AC_DEFINE(SHUTUP_MUTEX_INITIALIZER) ;; esac diff --git a/lib/bind/include/netdb.h b/lib/bind/include/netdb.h index f452aab789..544193574f 100644 --- a/lib/bind/include/netdb.h +++ b/lib/bind/include/netdb.h @@ -86,7 +86,7 @@ /* * @(#)netdb.h 8.1 (Berkeley) 6/2/93 - * $Id: netdb.h,v 1.15 2004/03/16 05:52:16 marka Exp $ + * $Id: netdb.h,v 1.15.18.1 2004/11/30 01:18:06 marka Exp $ */ #ifndef _NETDB_H_ @@ -527,6 +527,9 @@ void endservent_r __P((void)); #ifdef __GLIBC__ int getnetgrent_r __P((char **, char **, char **, char *, size_t)); #endif +#ifdef _AIX +int setnetgrent_r __P((char *, void **)); +#endif #endif #endif diff --git a/lib/bind/irs/gai_strerror.c b/lib/bind/irs/gai_strerror.c index 7355b93c3c..6aeaaa1910 100644 --- a/lib/bind/irs/gai_strerror.c +++ b/lib/bind/irs/gai_strerror.c @@ -52,7 +52,10 @@ gai_strerror(int ecode) { #ifndef DO_PTHREADS static char buf[EAI_BUFSIZE]; #else /* DO_PTHREADS */ - static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +#ifndef LIBBIND_MUTEX_INITIALIZER +#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER +#endif + static pthread_mutex_t lock = LIBBIND_MUTEX_INITIALIZER; static pthread_key_t key; static int once = 0; char *buf; diff --git a/lib/bind/irs/getnetgrent_r.c b/lib/bind/irs/getnetgrent_r.c index 777b5467a4..69dd145789 100644 --- a/lib/bind/irs/getnetgrent_r.c +++ b/lib/bind/irs/getnetgrent_r.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.7 2004/03/09 06:30:02 marka Exp $"; +static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.7.18.1 2004/11/30 01:18:07 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -29,7 +29,6 @@ static const char rcsid[] = "$Id: getnetgrent_r.c,v 1.7 2004/03/09 06:30:02 mark #include #include #include -#include #include #include diff --git a/lib/bind/irs/irs_data.c b/lib/bind/irs/irs_data.c index 9b33369550..ad316c8199 100644 --- a/lib/bind/irs/irs_data.c +++ b/lib/bind/irs/irs_data.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: irs_data.c,v 1.7 2004/03/18 02:57:59 marka Exp $"; +static const char rcsid[] = "$Id: irs_data.c,v 1.7.18.1 2004/11/30 01:18:07 marka Exp $"; #endif #include "port_before.h" @@ -121,7 +121,10 @@ net_data_destroy(void *p) { struct net_data * net_data_init(const char *conf_file) { #ifdef DO_PTHREADS - static pthread_mutex_t keylock = PTHREAD_MUTEX_INITIALIZER; +#ifndef LIBBIND_MUTEX_INITIALIZER +#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER +#endif + static pthread_mutex_t keylock = LIBBIND_MUTEX_INITIALIZER; struct net_data *net_data; if (!once) { diff --git a/lib/bind/port/aix5/include/sys/cdefs.h b/lib/bind/port/aix5/include/sys/cdefs.h index a8101d3864..ca30ac3755 100644 --- a/lib/bind/port/aix5/include/sys/cdefs.h +++ b/lib/bind/port/aix5/include/sys/cdefs.h @@ -55,7 +55,7 @@ /* * @(#)cdefs.h 8.1 (Berkeley) 6/2/93 - * $Id: cdefs.h,v 1.1.2.1 2004/09/24 05:56:44 marka Exp $ + * $Id: cdefs.h,v 1.1.2.2 2004/11/30 01:18:08 marka Exp $ */ #ifndef _CDEFS_H_ @@ -96,7 +96,11 @@ #endif /* !__cplusplus */ #else /* !(__STDC__ || __cplusplus) */ +#ifdef _NO_PROTO #define __P(protos) () /* traditional C preprocessor */ +#else +#define __P(protos) protos +#endif #define __CONCAT(x,y) x/**/y #define __STRING(x) "x" diff --git a/lib/bind/port_after.h.in b/lib/bind/port_after.h.in index 6d5f4dca66..c043561b16 100644 --- a/lib/bind/port_after.h.in +++ b/lib/bind/port_after.h.in @@ -86,6 +86,19 @@ struct sockaddr_in6 { #undef IN6ADDR_LOOPBACK_INIT #endif +#ifdef _AIX +#ifndef IN6ADDR_ANY_INIT +#define IN6ADDR_ANY_INIT {{{ 0, 0, 0, 0 }}} +#endif +#ifndef IN6ADDR_LOOPBACK_INIT +#if BYTE_ORDER == BIG_ENDIAN +#define IN6ADDR_LOOPBACK_INIT {{{ 0, 0, 0, 1 }}} +#else +#define IN6ADDR_LOOPBACK_INIT {{{0, 0, 0, 0x01000000}}} +#endif +#endif +#endif + #ifndef IN6ADDR_ANY_INIT #ifdef s6_addr #define IN6ADDR_ANY_INIT \ diff --git a/lib/isccfg/include/isccfg/grammar.h b/lib/isccfg/include/isccfg/grammar.h index 219607690c..8236891bca 100644 --- a/lib/isccfg/include/isccfg/grammar.h +++ b/lib/isccfg/include/isccfg/grammar.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: grammar.h,v 1.4.18.1 2004/07/23 04:12:49 marka Exp $ */ +/* $Id: grammar.h,v 1.4.18.2 2004/11/30 01:18:08 marka Exp $ */ #ifndef ISCCFG_GRAMMAR_H #define ISCCFG_GRAMMAR_H 1 @@ -226,16 +226,16 @@ struct cfg_parser { /* * Predefined data representation types. */ -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_uint32; -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_uint64; -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_string; -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_boolean; -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_map; -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_list; -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_tuple; -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_sockaddr; -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_netprefix; -LIBISCCFG_EXTERNAL_DATA cfg_rep_t cfg_rep_void; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_uint32; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_uint64; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_string; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_boolean; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_map; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_list; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_tuple; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_sockaddr; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_netprefix; +LIBISCCFG_EXTERNAL_DATA extern cfg_rep_t cfg_rep_void; /* * Predefined configuration object types.