From: Miek Gieben Date: Tue, 6 Dec 2005 14:32:43 +0000 (+0000) Subject: sol9 tweaks X-Git-Tag: release-1.1.0~555 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c322ead121f53df5f5ca056d97c8a928b319e8df;p=thirdparty%2Fldns.git sol9 tweaks --- diff --git a/Changelog b/Changelog index 414477cf..076aafb3 100644 --- a/Changelog +++ b/Changelog @@ -2,7 +2,9 @@ December??? 2005: 1.0.1: ldns-team * Added include/ and lib/ dirs so that you can compile against ldns without installing ldns on your system * Makefile updates - * assert is used throughout the library to catch illegal library calls + * Assert is used throughout the library to catch illegal library calls + * Solaris 9 testing was carried out. Ldns now compiles on that + platform; some gnuism were identified and fixed. Drill: * -r was killed in favor of -o
which diff --git a/configure.ac b/configure.ac index 4a61cc9c..3c389f29 100644 --- a/configure.ac +++ b/configure.ac @@ -127,21 +127,8 @@ AC_CHECK_HEADERS(sys/param.h sys/mount.h,,, ] ]) -# I don't use these -# Checks for typedefs, structures, and compiler characteristics. -#AC_TYPE_UID_T -#AC_TYPE_MODE_T -#AC_TYPE_OFF_T -#AC_TYPE_SIZE_T -#AC_STRUCT_TM - -# Checks for library functions. -#AC_FUNC_CHOWN -#AC_FUNC_FORK AC_FUNC_MALLOC -#AC_FUNC_MKTIME -#AC_FUNC_STAT -#AC_CHECK_FUNCS([mkdir rmdir strchr strrchr strstr]) +AC_CHECK_FUNCS(isblank) AC_REPLACE_FUNCS(b64_pton) AC_REPLACE_FUNCS(b64_ntop) @@ -155,7 +142,6 @@ AC_CHECK_UNUSED_ATTRIBUTE AC_DEFINE([SYSCONFDIR], [sysconfdir], [System configuration dir]) AH_BOTTOM([ - #include #include #include diff --git a/drill/configure.ac b/drill/configure.ac index 612f8c47..46039cac 100644 --- a/drill/configure.ac +++ b/drill/configure.ac @@ -2,27 +2,21 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(drill, 1.0.1, drill@nlnetlabs.nl, drill) +AC_INIT(drill, 1.0.1, libdns@nlnetlabs.nl, drill) AC_CONFIG_SRCDIR([drill_util.h]) AC_AIX -# Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET -# Checks for libraries. -# Checks for header files. -#AC_HEADER_STDC -#AC_HEADER_SYS_WAIT -# do the very minimum - we can always extend this -AC_CHECK_HEADERS([getopt.h stdlib.h stdio.h assert.h netinet/in.hctype.h time.h]) -AC_CHECK_HEADERS(sys/param.h sys/mount.h,,, -[ +AC_CHECK_HEADERS([getopt.h stdlib.h stdio.h assert.h netinet/in.hctype.h time.h],,, [AC_INCLUDES_DEFAULT]) +AC_CHECK_HEADERS(sys/param.h sys/mount.h,,, [AC_INCLUDES_DEFAULT] +[ [ #if HAVE_SYS_PARAM_H # include #endif - ] + ] ]) # check for ldns @@ -45,15 +39,10 @@ AC_ARG_WITH(ldns, AC_HELP_STRING([--with-ldns=PATHNAME],[])) AC_CHECK_HEADER(ldns/dns.h,, [ AC_MSG_ERROR([Can't find ldns headers]) - ] + ], [AC_INCLUDES_DEFAULT] ) -#AC_CHECK_FUNCS([mkdir rmdir strchr strrchr strstr]) - -#AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir") - AH_BOTTOM([ - #include #include #include diff --git a/examples/configure.ac b/examples/configure.ac index a318ef19..5c5f5899 100644 --- a/examples/configure.ac +++ b/examples/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT(drill, 1.0.1, drill@nlnetlabs.nl, drill) +AC_INIT(libdns, 1.0.1, libdns@nlnetlabs.nl,libdns) AC_CONFIG_SRCDIR([ldns-read-zone.c]) AC_AIX @@ -10,15 +10,9 @@ AC_AIX AC_PROG_CC AC_PROG_MAKE_SET -# Checks for libraries. -# Checks for header files. -#AC_HEADER_STDC -#AC_HEADER_SYS_WAIT -# do the very minimum - we can always extend this -#AC_CHECK_HEADERS([getopt.h stdlib.h stdio.h assert.h netinet/in.hctype.h time.h]) -AC_CHECK_HEADERS([sys/types.h getopt.h stdlib.h stdio.h assert.h netinet/in.hctype.h netinet/udp.h time.h pcap.h net/bpf.h arpa/inet.h sys/time.h sys/socket.h netinet/in.h netinet/ip.h netinet/if_ether.h ]) +AC_CHECK_HEADERS([sys/types.h getopt.h stdlib.h stdio.h assert.h netinet/in.hctype.h netinet/udp.h time.h pcap.h net/bpf.h arpa/inet.h sys/time.h sys/socket.h netinet/in.h netinet/ip.h netinet/if_ether.h]) AC_CHECK_HEADERS([sys/param.h sys/mount.h],,, -[ +[ [AC_INCLUDES_DEFAULT] [ #if HAVE_SYS_PARAM_H # include @@ -44,7 +38,7 @@ AC_CHECK_LIB(ldns, ldns_rr_new,, [ AC_CHECK_HEADER(ldns/dns.h,, [ AC_MSG_ERROR([Can't find ldns headers]) - ] + ], [AC_INCLUDES_DEFAULT] ) AC_CHECK_LIB(pcap, pcap_open_offline,, [ @@ -54,7 +48,7 @@ AC_CHECK_LIB(pcap, pcap_open_offline,, [ AC_CHECK_HEADER(pcap.h,, [ AC_MSG_ERROR([Can't find pcap library headers (needed for dpa)]) - ] + ], [AC_INCLUDES_DEFAULT] ) AH_BOTTOM([ diff --git a/ldns/util.h.in b/ldns/util.h.in index 91bb7423..d0cc64dc 100644 --- a/ldns/util.h.in +++ b/ldns/util.h.in @@ -105,6 +105,15 @@ ldns_write_uint32(void *dst, uint32_t data) #endif } +#ifndef HAVE_ISBLANK +/* gnuism */ +static int +isblank(int c) +{ + return (c==' ') || (c=='\t'); +} +#endif + /* warning. */ INLINE void ldns_write_uint64_as_uint48(void *dst, uint64_t data)