[ntp:bk-ntp-dev-send] BitKeeper diffs

Harlan Stenn stenn at whimsy.udel.edu
Tue Feb 2 08:34:45 UTC 2010


#### ChangeSet ####
2010-02-02 08:28:17+00:00, stenn at poog.il.thewrittenword.com 
  [Bug 1469] more int32 cleanup

==== configure.ac ====
2010-02-02 08:28:06+00:00, stenn at poog.il.thewrittenword.com +1 -1
  [Bug 1469] more int32 cleanup

--- 1.475/configure.ac	2010-01-30 17:35:08 -05:00
+++ 1.476/configure.ac	2010-02-02 03:28:06 -05:00
@@ -428,7 +428,7 @@ AC_CHECK_HEADER(dns_sd.h,
 case "$ac_cv_lib_dns_sd_DNSServiceRegister" in
  yes) LIBS="-ldns_sd $LIBS" ;;
 esac
-AC_CHECK_HEADERS(errno.h fcntl.h ieeefp.h kvm.h math.h)
+AC_CHECK_HEADERS(errno.h fcntl.h ieeefp.h inttypes.h kvm.h math.h)
 
 AC_CHECK_HEADERS(md5.h, [], [],
 [#if HAVE_SYS_TYPES_H

==== include/ntp_types.h ====
2010-02-02 08:28:07+00:00, stenn at poog.il.thewrittenword.com +4 -3
  [Bug 1469] more int32 cleanup

--- 1.17/include/ntp_types.h	2010-01-30 12:53:03 -05:00
+++ 1.18/include/ntp_types.h	2010-02-02 03:28:07 -05:00
@@ -7,10 +7,11 @@
 #ifndef NTP_TYPES_H
 #define NTP_TYPES_H
 
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
 #include <sys/types.h>
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
 #include "ntp_machine.h"
 
 /*

#### ChangeSet ####
2010-01-30 22:35:13+00:00, davehart at shiny.ad.hartbrothers.com 
  configure.ac:
    reword to better fit with surrounding messages

==== configure.ac ====
2010-01-30 22:35:08+00:00, davehart at shiny.ad.hartbrothers.com +2 -2
  reword to better fit with surrounding messages

--- 1.474/configure.ac	2010-01-30 17:28:23 -05:00
+++ 1.475/configure.ac	2010-01-30 17:35:08 -05:00
@@ -694,7 +694,7 @@ AC_CHECK_TYPES([time_t, int32, u_int32])
 case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
  no::yes)
     AC_CACHE_CHECK(
-	[if DNS headers provide int32 type],
+	[for int32 with DNS headers included],
 	[ntp_cv_type_int32_with_dns],
 	AC_COMPILE_IFELSE(
 	    AC_LANG_PROGRAM(
@@ -721,7 +721,7 @@ esac
 case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
  no::yes)
     AC_CACHE_CHECK(
-	[if DNS headers provide u_int32 type],
+	[for u_int32 with DNS headers included],
 	[ntp_cv_type_u_int32_with_dns],
 	AC_COMPILE_IFELSE(
 	    AC_LANG_PROGRAM(

#### ChangeSet ####
2010-01-30 22:28:30+00:00, davehart at shiny.ad.hartbrothers.com 
  configure.ac:
    attempt to properly quote all args to AC_LANG_PROGRAM()

==== configure.ac ====
2010-01-30 22:28:23+00:00, davehart at shiny.ad.hartbrothers.com +39 -39
  attempt to properly quote all args to AC_LANG_PROGRAM()

--- 1.473/configure.ac	2010-01-30 17:16:53 -05:00
+++ 1.474/configure.ac	2010-01-30 17:28:23 -05:00
@@ -135,7 +135,7 @@ AC_CACHE_CHECK(
     ac_cv_cpp_warning,
     [
 	AC_COMPILE_IFELSE(
-	    AC_LANG_PROGRAM([], [#warning foo]),
+	    AC_LANG_PROGRAM([[]], [[#warning foo]]),
 	    [ac_cv_cpp_warning=yes],
 	    [ac_cv_cpp_warning=no],
 	)
@@ -156,7 +156,7 @@ case "$GCC" in
 	ac_cv_gcc_Wstrict_overflow, 
 	[
 	    AC_COMPILE_IFELSE(
-		[AC_LANG_PROGRAM([], [])],
+		[AC_LANG_PROGRAM()],
 		[ac_cv_gcc_Wstrict_overflow=yes],
 		[ac_cv_gcc_Wstrict_overflow=no]
 	    )
@@ -180,7 +180,7 @@ case "$GCC" in
 	ac_cv_gcc_Winit_self, 
 	[
 	    AC_COMPILE_IFELSE(
-		[AC_LANG_PROGRAM([], [])],
+		[AC_LANG_PROGRAM()],
 		[ac_cv_gcc_Winit_self=yes],
 		[ac_cv_gcc_Winit_self=no]
 	    )
@@ -698,15 +698,15 @@ case "$ac_cv_type_int32::$ac_cv_header_r
 	[ntp_cv_type_int32_with_dns],
 	AC_COMPILE_IFELSE(
 	    AC_LANG_PROGRAM(
-		[
+		[[
 		    #ifdef HAVE_ARPA_NAMESER_H
 		    # include <arpa/nameser.h>
 		    #endif
 		    #include <resolv.h>
-		],
-		[
+		]],
+		[[
 		    size_t cb = sizeof(int32);
-		]
+		]]
 	    ),
 	    [ntp_cv_type_int32_with_dns=yes],
 	    [ntp_cv_type_int32_with_dns=no]
@@ -725,15 +725,15 @@ case "$ac_cv_type_u_int32::$ac_cv_header
 	[ntp_cv_type_u_int32_with_dns],
 	AC_COMPILE_IFELSE(
 	    AC_LANG_PROGRAM(
-		[
+		[[
 		    #ifdef HAVE_ARPA_NAMESER_H
 		    # include <arpa/nameser.h>
 		    #endif
 		    #include <resolv.h>
-		],
-		[
+		]],
+		[[
 		    size_t cb = sizeof(u_int32);
-		]
+		]]
 	    ),
 	    [ntp_cv_type_u_int32_with_dns=yes],
 	    [ntp_cv_type_u_int32_with_dns=no]
@@ -2194,15 +2194,15 @@ AC_CACHE_CHECK(
 	 *)
 	    AC_COMPILE_IFELSE(
 		AC_LANG_PROGRAM(
-		    [
+		    [[
 			#ifdef HAVE_NETINET_IN_H
 			#include <netinet/in.h>
 			#endif
-		    ],
-		    [
+		    ]],
+		    [[
 			struct ip_mreq ipmr;
 			ipmr.imr_interface.s_addr = 0;
-		    ]
+		    ]]
 		),
 		[ntp_cv_multicast=yes],
 		[]
@@ -4663,14 +4663,14 @@ AC_CACHE_CHECK(
 	AC_COMPILE_IFELSE(
 	    [
 		AC_LANG_PROGRAM(
-		    [
+		    [[
 			#include <sys/types.h>
 			#include <sys/socket.h>
 			#include <netinet/in.h>
-		    ],
-		    [
+		    ]],
+		    [[
 			struct sockaddr_in6 sin6;
-		    ]
+		    ]]
 		)
 	    ],
 	    [ac_cv_isc_found_ipv6=yes],
@@ -4760,16 +4760,16 @@ case "$ac_cv_isc_found_ipv6" in
 	    AC_COMPILE_IFELSE(
 		[
 		    AC_LANG_PROGRAM(
-			[
+			[[
 			    #include <sys/types.h>
 			    #include <sys/socket.h>
 			    #include <netinet/in.h>
 			    $isc_netinetin6_hack
 			    $isc_netinet6in6_hack
-			],
-			[
+			]],
+			[[
 			    struct in6_pktinfo xyzzy;
-			]
+			]]
 		    )
 		],
 		[ac_cv_have_in6_pktinfo=yes],
@@ -4792,17 +4792,17 @@ case "$ac_cv_isc_found_ipv6" in
 	    AC_COMPILE_IFELSE(
 		[
 		    AC_LANG_PROGRAM(
-			[
+			[[
 			    #include <sys/types.h>
 			    #include <sys/socket.h>
 			    #include <netinet/in.h>
 			    $isc_netinetin6_hack
 			    $isc_netinet6in6_hack
-			],
-			[
+			]],
+			[[
 			    struct sockaddr_in6 xyzzy;
 			    xyzzy.sin6_scope_id = 0;
-			]
+			]]
 		    )
 		],
 		[ac_cv_have_sin6_scope_id=yes],
@@ -4827,17 +4827,17 @@ AC_CACHE_CHECK(
 	AC_LINK_IFELSE(
 	    [
 		AC_LANG_PROGRAM(
-		    [
+		    [[
 			#include <sys/types.h>
 			#include <sys/socket.h>
 			#include <netinet/in.h>
 			$isc_netinetin6_hack
 			$isc_netinet6in6_hack
-		    ],
-		    [
+		    ]],
+		    [[
 			struct in6_addr in6; 
 			in6 = in6addr_any;
-		    ]
+		    ]]
 		)
 	    ],
 	    [isc_cv_have_in6addr_any=yes],
@@ -4859,13 +4859,13 @@ AC_CACHE_CHECK(
         AC_COMPILE_IFELSE(
 	    [
 		AC_LANG_PROGRAM(
-		    [
+		    [[
 			#include <sys/types.h>
 			#include <net/if6.h>
-		    ],
-		    [
+		    ]],
+		    [[
 			struct if_laddrconf a;
-		    ]
+		    ]]
 		)
 	    ],
 	    [ac_cv_isc_struct_if_laddrconf=yes],
@@ -4886,13 +4886,13 @@ AC_CACHE_CHECK(
         AC_COMPILE_IFELSE(
 	    [
 		AC_LANG_PROGRAM(
-		    [
+		    [[
 			#include <sys/types.h>
 			#include <net/if6.h>
-		    ],
-		    [
+		    ]],
+		    [[
 			struct if_laddrreq a;
-		    ]
+		    ]]
 		)
 	    ],
 	    [ac_cv_isc_struct_if_laddrreq=yes],

#### ChangeSet ####
2010-01-30 22:16:54+00:00, davehart at shiny.ad.hartbrothers.com 
  check for int32, u_int32 before testing result.

==== configure.ac ====
2010-01-30 22:16:53+00:00, davehart at shiny.ad.hartbrothers.com +3 -1
  check for int32, u_int32 before testing result.

--- 1.472/configure.ac	2010-01-30 12:53:02 -05:00
+++ 1.473/configure.ac	2010-01-30 17:16:53 -05:00
@@ -680,7 +680,7 @@ AC_C_BIGENDIAN
 AC_TYPE_SIGNAL
 AC_TYPE_OFF_T
 AC_TYPE_SIZE_T
-AC_CHECK_TYPES([time_t, uintptr_t])
+AC_CHECK_TYPES([uintptr_t])
  
 AH_VERBATIM([TYPEDEF_UINTPTR_T],
 [/* Provide a typedef for uintptr_t? */
@@ -688,6 +688,8 @@ AH_VERBATIM([TYPEDEF_UINTPTR_T],
 typedef unsigned int	uintptr_t;
 #define HAVE_UINTPTR_T	1
 #endif])
+
+AC_CHECK_TYPES([time_t, int32, u_int32])
 
 case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
  no::yes)

#### ChangeSet ####
2010-01-30 17:53:03+00:00, davehart at shiny.ad.hartbrothers.com 
  [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.

==== ChangeLog ====
2010-01-30 17:53:02+00:00, davehart at shiny.ad.hartbrothers.com +1 -1
  [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.

--- 1.515/ChangeLog	2010-01-30 11:42:07 -05:00
+++ 1.516/ChangeLog	2010-01-30 12:53:02 -05:00
@@ -1,6 +1,6 @@
+* [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
 (4.2.7p12) 2010/01/30 Released by Harlan Stenn <stenn at ntp.org>
 * [Bug 1468] 'make install' broken for root on default NFS mount.
-* [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
 (4.2.7p11) 2010/01/28 Released by Harlan Stenn <stenn at ntp.org>
 * [Bug 47] Debugging and logging do not work after a fork.
 * [Bug 1010] getaddrinfo() could block and thus should not be called by

==== configure.ac ====
2010-01-30 17:53:02+00:00, davehart at shiny.ad.hartbrothers.com +56 -22
  [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.

--- 1.471/configure.ac	2010-01-27 13:45:22 -05:00
+++ 1.472/configure.ac	2010-01-30 12:53:02 -05:00
@@ -680,9 +680,7 @@ AC_C_BIGENDIAN
 AC_TYPE_SIGNAL
 AC_TYPE_OFF_T
 AC_TYPE_SIZE_T
-AC_CHECK_TYPE(time_t, long)
-AC_CHECK_SIZEOF(time_t)
-AC_CHECK_TYPES(uintptr_t)
+AC_CHECK_TYPES([time_t, uintptr_t])
  
 AH_VERBATIM([TYPEDEF_UINTPTR_T],
 [/* Provide a typedef for uintptr_t? */
@@ -691,27 +689,62 @@ typedef unsigned int	uintptr_t;
 #define HAVE_UINTPTR_T	1
 #endif])
 
-AC_STRUCT_TM
+case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
+ no::yes)
+    AC_CACHE_CHECK(
+	[if DNS headers provide int32 type],
+	[ntp_cv_type_int32_with_dns],
+	AC_COMPILE_IFELSE(
+	    AC_LANG_PROGRAM(
+		[
+		    #ifdef HAVE_ARPA_NAMESER_H
+		    # include <arpa/nameser.h>
+		    #endif
+		    #include <resolv.h>
+		],
+		[
+		    size_t cb = sizeof(int32);
+		]
+	    ),
+	    [ntp_cv_type_int32_with_dns=yes],
+	    [ntp_cv_type_int32_with_dns=no]
+	)
+    )
+    case "$ntp_cv_type_int32_with_dns" in
+     yes)
+	AC_DEFINE([HAVE_INT32_ONLY_WITH_DNS], , [int32 type in DNS headers, not others.])
+    esac
+esac
 
-AC_CACHE_CHECK([for u_int8_t], ac_cv_type_u_int8_t,
-[AC_TRY_COMPILE([#include <sys/types.h>],
-	[u_int8_t len = 42; return 0;],
-	ac_cv_type_u_int8_t=yes,
-	ac_cv_type_u_int8_t=no)
-])
-if test $ac_cv_type_u_int8_t = yes; then
-	AC_DEFINE(HAVE_TYPE_U_INT8_T, 1, [Does u_int8_t exist?])
-fi
+case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
+ no::yes)
+    AC_CACHE_CHECK(
+	[if DNS headers provide u_int32 type],
+	[ntp_cv_type_u_int32_with_dns],
+	AC_COMPILE_IFELSE(
+	    AC_LANG_PROGRAM(
+		[
+		    #ifdef HAVE_ARPA_NAMESER_H
+		    # include <arpa/nameser.h>
+		    #endif
+		    #include <resolv.h>
+		],
+		[
+		    size_t cb = sizeof(u_int32);
+		]
+	    ),
+	    [ntp_cv_type_u_int32_with_dns=yes],
+	    [ntp_cv_type_u_int32_with_dns=no]
+	)
+    )
+    case "$ntp_cv_type_u_int32_with_dns" in
+     yes)
+	AC_DEFINE([HAVE_U_INT32_ONLY_WITH_DNS], , [u_int32 type in DNS headers, not others.])
+    esac
+esac
 
-AC_CACHE_CHECK([for u_int64_t], ac_cv_type_u_int64_t,
-[AC_TRY_COMPILE([#include <sys/types.h>],
-	[u_int64_t len = 42; return 0;],
-	ac_cv_type_u_int64_t=yes,
-	ac_cv_type_u_int64_t=no)
-])
-if test $ac_cv_type_u_int64_t = yes; then
-	AC_DEFINE(HAVE_TYPE_U_INT64_T, 1, [Does u_int64_t exist?])
-fi
+AC_CHECK_SIZEOF([time_t])
+AC_STRUCT_TM
 
 AC_CACHE_CHECK([for a fallback value for HZ], ac_cv_var_default_hz,
 [ac_cv_var_default_hz=100
@@ -1131,6 +1164,7 @@ AC_C_CHAR_UNSIGNED		dnl CROSS_COMPILE?
 AC_CHECK_SIZEOF(signed char)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
+AC_CHECK_TYPES([int32, u_int32])
 
 AC_CHECK_TYPES([s_char])
 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in

==== include/ntp_types.h ====
2010-01-30 17:53:03+00:00, davehart at shiny.ad.hartbrothers.com +11 -7
  [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.

--- 1.16/include/ntp_types.h	2010-01-30 01:26:10 -05:00
+++ 1.17/include/ntp_types.h	2010-01-30 12:53:03 -05:00
@@ -47,27 +47,31 @@ typedef unsigned int u_int;
 #endif /* VMS */
 
 #ifdef HAVE_UINT32_T
-  typedef	int32_t		int32;
-  typedef	uint32_t	u_int32;
+# ifndef HAVE_INT32
+   typedef	int32_t		int32;
+# endif
+# ifndef HAVE_U_INT32
+   typedef	uint32_t	u_int32;
+# endif
 #elif (SIZEOF_INT == 4)
-# ifndef int32
+# if !defined(HAVE_INT32) && !defined(int32)
    typedef	int		int32;
 # endif
-# ifndef u_int32
+# if !defined(HAVE_U_INT32) && !defined(u_int32)
    typedef	unsigned	u_int32;
 # endif
 #else	/* SIZEOF_INT != 4 */
 # if (SIZEOF_LONG == 4)
-#  ifndef int32
+# if !defined(HAVE_INT32) && !defined(int32)
     typedef	long		int32;
 #  endif
-#  ifndef u_int32
+# if !defined(HAVE_U_INT32) && !defined(u_int32)
     typedef	unsigned long	u_int32;
 #  endif
 # else	/* SIZEOF_LONG != 4 */
 #  include "Bletch: what's 32 bits on this machine?"
 # endif
-#endif	/* !HAVE_UINT32_t && SIZEOF_INT != 4 */
+#endif	/* !HAVE_UINT32_T && SIZEOF_INT != 4 */
 
 typedef u_char		ntp_u_int8_t;
 typedef u_short		ntp_u_int16_t;

==== ntpd/ntp_intres.c ====
2010-01-30 17:53:03+00:00, davehart at shiny.ad.hartbrothers.com +6 -0
  [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.

--- 1.80/ntpd/ntp_intres.c	2010-01-27 13:45:25 -05:00
+++ 1.81/ntpd/ntp_intres.c	2010-01-30 12:53:03 -05:00
@@ -84,6 +84,12 @@
 # ifdef RES_TIMEOUT
 #  undef RES_TIMEOUT	/* resolv.h has one, we want ours */
 # endif
+# ifdef HAVE_INT32_ONLY_WITH_DNS
+#  define HAVE_INT32
+# endif
+# ifdef HAVE_U_INT32_ONLY_WITH_DNS
+#  define HAVE_U_INT32
+# endif
 #endif
 
 #include "ntp_stdlib.h"

#### ChangeSet ####
2010-01-30 06:26:12+00:00, davehart at shiny.ad.hartbrothers.com 
  * [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.

==== ChangeLog ====
2010-01-30 06:26:10+00:00, davehart at shiny.ad.hartbrothers.com +1 -0
  * [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.

--- 1.513/ChangeLog	2010-01-29 15:11:52 -05:00
+++ 1.514/ChangeLog	2010-01-30 01:26:10 -05:00
@@ -1,4 +1,5 @@
 * [Bug 1468] 'make install' broken for root on default NFS mount.
+* [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
 (4.2.7p11) 2010/01/28 Released by Harlan Stenn <stenn at ntp.org>
 * [Bug 47] Debugging and logging do not work after a fork.
 * [Bug 1010] getaddrinfo() could block and thus should not be called by

==== include/ntp_types.h ====
2010-01-30 06:26:10+00:00, davehart at shiny.ad.hartbrothers.com +8 -6
  * [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.

--- 1.15/include/ntp_types.h	2010-01-27 13:45:23 -05:00
+++ 1.16/include/ntp_types.h	2010-01-30 01:26:10 -05:00
@@ -7,6 +7,9 @@
 #ifndef NTP_TYPES_H
 #define NTP_TYPES_H
 
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
 #include <sys/types.h>
 #include "ntp_machine.h"
 
@@ -41,13 +44,12 @@
 #if defined(VMS)
 #include <socket.h>
 typedef unsigned int u_int;
-/*
- * Note: VMS DECC has  long == int  (even on __alpha),
- *	 so the distinction below doesn't matter
- */
 #endif /* VMS */
 
-#if (SIZEOF_INT == 4)
+#ifdef HAVE_UINT32_T
+  typedef	int32_t		int32;
+  typedef	uint32_t	u_int32;
+#elif (SIZEOF_INT == 4)
 # ifndef int32
    typedef	int		int32;
 # endif
@@ -65,7 +67,7 @@ typedef unsigned int u_int;
 # else	/* SIZEOF_LONG != 4 */
 #  include "Bletch: what's 32 bits on this machine?"
 # endif
-#endif	/* SIZEOF_INT != 4 */
+#endif	/* !HAVE_UINT32_t && SIZEOF_INT != 4 */
 
 typedef u_char		ntp_u_int8_t;
 typedef u_short		ntp_u_int16_t;


More information about the bk-ntp-dev-send mailing list