diff options
| author | Sam Varshavchik | 2022-05-22 23:52:28 -0400 | 
|---|---|---|
| committer | Sam Varshavchik | 2022-05-22 23:52:31 -0400 | 
| commit | 83e37efc8ed785cd095eb585ff747e5702ec49b3 (patch) | |
| tree | 15aed6da6214e9a03d91be1754cd351175349945 /rfc1035 | |
| parent | 1ce81fa6af52651628a0bffcd8b15fdb459901a5 (diff) | |
| download | courier-libs-83e37efc8ed785cd095eb585ff747e5702ec49b3.tar.bz2 | |
gcc 12, autotool updates, sqwebmail fixes.
Diffstat (limited to 'rfc1035')
| -rw-r--r-- | rfc1035/configure.ac | 99 | ||||
| -rw-r--r-- | rfc1035/rfc1035.c | 6 | ||||
| -rw-r--r-- | rfc1035/rfc1035dumprrdata.c | 16 | ||||
| -rw-r--r-- | rfc1035/rfc1035tcp.c | 6 | ||||
| -rw-r--r-- | rfc1035/rfc1035udp.c | 6 | ||||
| -rw-r--r-- | rfc1035/spf.c | 6 | ||||
| -rw-r--r-- | rfc1035/testlookup.c | 3 | 
7 files changed, 57 insertions, 85 deletions
| diff --git a/rfc1035/configure.ac b/rfc1035/configure.ac index 84b731c..90cd963 100644 --- a/rfc1035/configure.ac +++ b/rfc1035/configure.ac @@ -3,7 +3,7 @@ dnl  dnl Copyright 1998 - 2003 Double Precision, Inc.  See COPYING for  dnl distribution information. -AC_INIT(librfc1035, 0.10, [courier-users@lists.sourceforge.net]) +AC_INIT([librfc1035],[0.10],[courier-users@lists.sourceforge.net])  >confdefs.h  # Kill PACKAGE_ macros @@ -16,11 +16,9 @@ AC_CONFIG_HEADERS(config.h)  dnl Checks for programs.  AC_PROG_AWK  AC_PROG_CC -AC_PROG_CC_C99  AC_PROG_INSTALL  AC_PROG_LN_S -AC_LIBTOOL_DLOPEN -AC_PROG_LIBTOOL +LT_INIT  dnl Checks for libraries. @@ -31,7 +29,7 @@ then  	AC_MSG_ERROR(libidn not found)  fi  dnl Checks for header files. -AC_HEADER_STDC +  AC_CHECK_HEADERS(sys/types.h sys/time.h unistd.h arpa/inet.h netinet/in.h strings.h stdint.h)  USENSL=no @@ -74,7 +72,8 @@ AC_CHECK_LIB(socket,socket)  dnl Checks for typedefs, structures, and compiler characteristics.  AC_C_CONST -AC_HEADER_TIME +AC_CHECK_HEADERS_ONCE([sys/time.h]) +  AC_SYS_LARGEFILE  AC_ARG_WITH(int32, @@ -84,7 +83,7 @@ AC_ARG_WITH(int32,  		AC_MSG_CHECKING(for uint32_t) -		AC_TRY_COMPILE([ +		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #if HAVE_SYS_TYPES_H  #include	<sys/types.h>  #endif @@ -92,13 +91,13 @@ AC_ARG_WITH(int32,  #include	<stdint.h>  #endif  uint32_t n; -		],[ -		], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [ +		]], [[ +		]])],[ AC_MSG_RESULT(yes) ; int32="uint32_t"],[  		AC_MSG_RESULT(no)  		AC_MSG_CHECKING(for u_int_32_t) -		AC_TRY_COMPILE([ +		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #if HAVE_SYS_TYPES_H  #include	<sys/types.h>  #endif @@ -106,8 +105,8 @@ uint32_t n;  #include	<stdint.h>  #endif  u_int32_t n; -			],[ -			], [AC_MSG_RESULT(yes); int32="u_int32_t"],[ +			]], [[ +			]])],[AC_MSG_RESULT(yes); int32="u_int32_t"],[  			AC_MSG_RESULT(no) @@ -120,7 +119,7 @@ u_int32_t n;  					AC_CHECK_SIZEOF(unsigned short, 0)  					if test "$ac_cv_sizeof_unsigned_short" != 4  					then -						AC_ERROR(--with-int32 option is required) +						AC_MSG_ERROR(--with-int32 option is required)  					fi  					int32="unsigned short"  				fi @@ -141,7 +140,7 @@ AC_ARG_WITH(int16,  		AC_MSG_CHECKING(for uint16_t) -		AC_TRY_COMPILE([ +		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #if HAVE_SYS_TYPES_H  #include	<sys/types.h>  #endif @@ -149,13 +148,13 @@ AC_ARG_WITH(int16,  #include	<stdint.h>  #endif  uint16_t n; -		],[ -		], [ AC_MSG_RESULT(yes) ; int16="uint16_t"], [ +		]], [[ +		]])],[ AC_MSG_RESULT(yes) ; int16="uint16_t"],[  		AC_MSG_RESULT(no)  		AC_MSG_CHECKING(for u_int_16_t) -		AC_TRY_COMPILE([ +		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #if HAVE_SYS_TYPES_H  #include	<sys/types.h>  #endif @@ -163,8 +162,8 @@ uint16_t n;  #include	<stdint.h>  #endif  u_int16_t n; -			],[ -			], [AC_MSG_RESULT(yes); int16="u_int16_t"],[ +			]], [[ +			]])],[AC_MSG_RESULT(yes); int16="u_int16_t"],[  			AC_MSG_RESULT(no) @@ -177,7 +176,7 @@ u_int16_t n;  					AC_CHECK_SIZEOF(unsigned short, 0)  					if test "$ac_cv_sizeof_unsigned_short" != 4  					then -						AC_ERROR(--with-int16 option is required) +						AC_MSG_ERROR(--with-int16 option is required)  					fi  					int16="unsigned short"  				fi @@ -232,20 +231,19 @@ dnl Check for IPv6 support  AC_CACHE_CHECK([for structs in6_addr, sockaddr_in6, and sockaddr_storage],  	rfc1035_cv_hasipv6structs, -AC_TRY_COMPILE( [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #include <sys/types.h>  #include <sys/socket.h>  #include <netinet/in.h>  #include <arpa/inet.h> -        ], [ +        ]], [[  	(void)(sizeof(struct in6_addr)+  			     sizeof(struct sockaddr_in6)+  			     sizeof(struct sockaddr_storage)+  			     PF_INET6); -	], rfc1035_cv_hasipv6structs=yes, -                rfc1035_cv_hasipv6structs=no ) +	]])],[rfc1035_cv_hasipv6structs=yes],[rfc1035_cv_hasipv6structs=no ])  )  changequote() @@ -257,57 +255,60 @@ changequote([,])  AC_CACHE_CHECK([for IPv6 flavor],  	rfc1035_cv_ipv6flavor, +[  if test "$rfc1035_cv_hasipv6structs" = no  then  	rfc1035_cv_ipv6flavor=none  else -AC_TRY_COMPILE( [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #include <sys/types.h>  #include <sys/socket.h>  #include <netinet/in.h>  #include <arpa/inet.h>  struct in6_addr in6a; -] , [ + ]], [[  	in6a.s6_addr16 $LB 0 $RB =0;  	in6a.s6_addr32 $LB 0 $RB =0; -], -	rfc1035_cv_ipv6flavor="glibc (default)", +]])],[rfc1035_cv_ipv6flavor="glibc (default)"],[]) +fi -AC_TRY_COMPILE( [ +if test "$rfc1035_cv_ipv6flavor" = "" +then +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #include <sys/types.h>  #include <sys/socket.h>  #include <netinet/in.h>  #include <arpa/inet.h>  struct in6_addr in6a; -        ], [ +        ]], [[  	in6a.__u6_addr.__u6_addr16 $LB 0 $RB =0;  	in6a.__u6_addr.__u6_addr32 $LB 0 $RB =0; -	], -		rfc1035_cv_ipv6flavor="freebsd-4.0", +	]])],[rfc1035_cv_ipv6flavor="freebsd-4.0"],[]) +fi -AC_TRY_COMPILE( [ +if test "$rfc1035_cv_ipv6flavor" = "" +then + +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #include <sys/types.h>  #include <sys/socket.h>  #include <netinet/in.h>  #include <arpa/inet.h>  struct in6_addr in6a; -        ], [ +        ]], [[         in6a._S6_un._S6_u8 $LB 0 $RB = 0;         in6a._S6_un._S6_u32 $LB 0 $RB = 0; -       ], -		rfc1035_cv_ipv6flavor="solaris8", -		rfc1035_cv_ipv6flavor="unknown" -		) -	) -) +       ]])],[rfc1035_cv_ipv6flavor="solaris8"],[rfc1035_cv_ipv6flavor="unknown" +		])  fi -) + +])  RFC1035_FREEBSD40=0  if test "$rfc1035_cv_ipv6flavor" = "freebsd-4.0" @@ -331,13 +332,13 @@ AC_SUBST(RFC1035_SOLARIS8)  AC_CACHE_CHECK([for SIOCGIFCONF],  	rfc1035_cv_siocgifconf, -AC_TRY_COMPILE( [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #include <sys/types.h>  #include <sys/ioctl.h>  #include <net/if.h>  #include <unistd.h> -] , [ + ]], [[  	struct ifreq ifreq_buf;  	struct ifconf ifc; @@ -345,7 +346,7 @@ AC_TRY_COMPILE( [  	ifc.ifc_req=&ifreq_buf;  	ioctl(0, SIOCGIFCONF, &ifc); -], rfc1035_cv_siocgifconf=yes, rfc1035_cv_siocgifconf=no) +]])],[rfc1035_cv_siocgifconf=yes],[rfc1035_cv_siocgifconf=no])  )  if test "$rfc1035_cv_siocgifconf" = "yes" @@ -357,15 +358,14 @@ fi  AC_CACHE_CHECK([for alloca],  	[rfc1035_cv_alloca], -AC_TRY_COMPILE( [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[  #include <stdio.h>  #include <stdlib.h> -        ], [ +        ]], [[  (void)(char *)alloca(10); -	], rfc1035_cv_alloca=yes, -                rfc1035_cv_alloca=no ) +	]])],[rfc1035_cv_alloca=yes],[rfc1035_cv_alloca=no ])  )  ipv6=0 @@ -403,4 +403,5 @@ AC_DEFINE_UNQUOTED(RFC1035_UINT16, $UINT16, [ 16bit datatype ])  AC_DEFINE_UNQUOTED(RFC1035_IPV6, $RFC1035_IPV6,  	[ Whether IPv6 support is enabled ]) -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/rfc1035/rfc1035.c b/rfc1035/rfc1035.c index 0e3678b..74335ff 100644 --- a/rfc1035/rfc1035.c +++ b/rfc1035/rfc1035.c @@ -10,15 +10,9 @@  #include	<string.h>  #include	<errno.h>  #include	<sys/types.h> -#if TIME_WITH_SYS_TIME -#include	<sys/time.h>  #include	<time.h> -#else  #if HAVE_SYS_TIME_H  #include	<sys/time.h> -#else -#include	<time.h> -#endif  #endif  #include	<arpa/inet.h>  #if	HAVE_UNISTD_H diff --git a/rfc1035/rfc1035dumprrdata.c b/rfc1035/rfc1035dumprrdata.c index 0e964c7..4a12022 100644 --- a/rfc1035/rfc1035dumprrdata.c +++ b/rfc1035/rfc1035dumprrdata.c @@ -9,15 +9,9 @@  #include	<stdlib.h>  #include	<sys/types.h>  #include	<arpa/inet.h> -#if TIME_WITH_SYS_TIME -#include	<sys/time.h>  #include	<time.h> -#else  #if HAVE_SYS_TIME_H  #include	<sys/time.h> -#else -#include	<time.h> -#endif  #endif @@ -34,15 +28,15 @@ char	timebuf[RFC1035_MAXTIMEBUFSIZE+1];  	if (!p)	return (0);  	strcat(strcat(strcat(strcpy(p, name2), ". "), name1), ". (\n\t\t\t\t"); -	sprintf(p+strlen(p), "%lu ; serial\n",  +	sprintf(p+strlen(p), "%lu ; serial\n",  			(unsigned long)rr->rr.soa.serial); -	sprintf(p+strlen(p), "\t\t\t\t%s  ; refresh\n",  +	sprintf(p+strlen(p), "\t\t\t\t%s  ; refresh\n",  			rfc1035_fmttime( rr->rr.soa.refresh, timebuf)); -	sprintf(p+strlen(p), "\t\t\t\t%s  ; retry\n",  +	sprintf(p+strlen(p), "\t\t\t\t%s  ; retry\n",  			rfc1035_fmttime( rr->rr.soa.retry, timebuf)); -	sprintf(p+strlen(p), "\t\t\t\t%s  ; expire\n",  +	sprintf(p+strlen(p), "\t\t\t\t%s  ; expire\n",  			rfc1035_fmttime( rr->rr.soa.expire, timebuf)); -	sprintf(p+strlen(p), "\t\t\t\t%s) ; minimum",  +	sprintf(p+strlen(p), "\t\t\t\t%s) ; minimum",  			rfc1035_fmttime( rr->rr.soa.minimum, timebuf));  	return (p);  } diff --git a/rfc1035/rfc1035tcp.c b/rfc1035/rfc1035tcp.c index 69725da..62e7338 100644 --- a/rfc1035/rfc1035tcp.c +++ b/rfc1035/rfc1035tcp.c @@ -16,15 +16,9 @@  #include	<stdlib.h>  #include	<errno.h>  #include	<fcntl.h> -#if TIME_WITH_SYS_TIME -#include	<sys/time.h>  #include	<time.h> -#else  #if HAVE_SYS_TIME_H  #include	<sys/time.h> -#else -#include	<time.h> -#endif  #endif diff --git a/rfc1035/rfc1035udp.c b/rfc1035/rfc1035udp.c index 2a4ed34..0451f90 100644 --- a/rfc1035/rfc1035udp.c +++ b/rfc1035/rfc1035udp.c @@ -15,15 +15,9 @@  #if	HAVE_UNISTD_H  #include	<unistd.h>  #endif -#if TIME_WITH_SYS_TIME -#include	<sys/time.h>  #include	<time.h> -#else  #if HAVE_SYS_TIME_H  #include	<sys/time.h> -#else -#include	<time.h> -#endif  #endif  int rfc1035_open_udp(int *af) diff --git a/rfc1035/spf.c b/rfc1035/spf.c index 63735ff..34075ab 100644 --- a/rfc1035/spf.c +++ b/rfc1035/spf.c @@ -12,15 +12,9 @@  #include	<string.h>  #include	<errno.h>  #include	<sys/types.h> -#if TIME_WITH_SYS_TIME -#include	<sys/time.h>  #include	<time.h> -#else  #if HAVE_SYS_TIME_H  #include	<sys/time.h> -#else -#include	<time.h> -#endif  #endif  #include	<idna.h> diff --git a/rfc1035/testlookup.c b/rfc1035/testlookup.c index 869e806..29faafc 100644 --- a/rfc1035/testlookup.c +++ b/rfc1035/testlookup.c @@ -332,7 +332,7 @@ char	ptrbuf[RFC1035_MAXNAMESIZE+1];  		replyp=rfc1035_resolve(&res, RFC1035_OPCODE_QUERY,  				       q_name, q_type[0], q_class);  	} -	free(q_type); +  	if (!replyp)  	{  		perror(argv[0]); @@ -358,5 +358,6 @@ char	ptrbuf[RFC1035_MAXNAMESIZE+1];  	}  	rfc1035_replyfree(replyp);  	rfc1035_destroy_resolv(&res); +	free(q_type);  	return (0);  } | 
