Wed Jan 8 11:54:04 2014 UTC ()
Back-port and complete the fixes from radmind HEAD to support 64 bit
time_t on NetBSD 6+.

The configure patch had to be generated with autoconf downgraded to 2.61 -
leave it to autohell to ruin your day...

While we are here, shake, rattle & roll the patches.

The resulting gyrations finally fix PR pkg/46555


(hauke)
diff -r1.32 -r1.33 pkgsrc/sysutils/radmind/Makefile
diff -r1.18 -r1.19 pkgsrc/sysutils/radmind/distinfo
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-Makefile.in
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-command.c
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-command.h
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-config.h.in
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-configure
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-configure.ac
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-ktcheck.c
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-largefile.h
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-lcksum.c
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-libsnet_snet.c
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-ra.sh
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-retr.c
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-transcript.c
diff -r0 -r1.1 pkgsrc/sysutils/radmind/patches/patch-update.c
diff -r1.5 -r0 pkgsrc/sysutils/radmind/patches/patch-aa
diff -r1.5 -r0 pkgsrc/sysutils/radmind/patches/patch-ac
diff -r1.8 -r0 pkgsrc/sysutils/radmind/patches/patch-ab
diff -r1.2 -r0 pkgsrc/sysutils/radmind/patches/patch-ae

cvs diff -r1.32 -r1.33 pkgsrc/sysutils/radmind/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/radmind/Makefile 2013/03/26 14:38:11 1.32
+++ pkgsrc/sysutils/radmind/Makefile 2014/01/08 11:54:04 1.33
@@ -1,29 +1,26 @@ @@ -1,29 +1,26 @@
1# $NetBSD: Makefile,v 1.32 2013/03/26 14:38:11 hauke Exp $ 1# $NetBSD: Makefile,v 1.33 2014/01/08 11:54:04 hauke Exp $
2# 2#
3 3
4DISTNAME= radmind-1.14.1 4DISTNAME= radmind-1.14.1
5PKGREVISION= 2 5PKGREVISION= 3
6CATEGORIES= sysutils 6CATEGORIES= sysutils
7MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=radmind/} 7MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=radmind/}
8 8
9MAINTAINER= hauke@NetBSD.org 9MAINTAINER= hauke@NetBSD.org
10HOMEPAGE= http://rsug.itd.umich.edu/software/radmind/ 10HOMEPAGE= http://rsug.itd.umich.edu/software/radmind/
11COMMENT= Remote file administration and integrity tool 11COMMENT= Remote file administration and integrity tool
12LICENSE= modified-bsd 12LICENSE= modified-bsd
13 13
14# Not yet 64 bit time_t safe, see PR pkg/46555 
15NOT_FOR_PLATFORM= NetBSD-5.99.*-* NetBSD-[6-9]*-* 
16 
17GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
18CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl} 15CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
19CONFIGURE_ARGS+= --with-radminddir=${RADMINDDIR} 16CONFIGURE_ARGS+= --with-radminddir=${RADMINDDIR}
20CONFIGURE_ENV+= diffpath=${TOOLS_DIFF:Q} 17CONFIGURE_ENV+= diffpath=${TOOLS_DIFF:Q}
21# XXX configure script checks for path to echo, which pkgsrc does not 18# XXX configure script checks for path to echo, which pkgsrc does not
22# provide, so we need to side-step {echopath}. 19# provide, so we need to side-step {echopath}.
23CONFIGURE_ENV+= ac_cv_path_echopath=${TOOLS_ECHO:Q} 20CONFIGURE_ENV+= ac_cv_path_echopath=${TOOLS_ECHO:Q}
24 21
25BUILD_TARGET= all man rash 22BUILD_TARGET= all man rash
26RADMINDDIR= ${VARBASE}/radmind 23RADMINDDIR= ${VARBASE}/radmind
27BUILD_DEFS+= VARBASE 24BUILD_DEFS+= VARBASE
28 25
29OWN_DIRS_PERMS+= ${RADMINDDIR} ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0750 26OWN_DIRS_PERMS+= ${RADMINDDIR} ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0750

cvs diff -r1.18 -r1.19 pkgsrc/sysutils/radmind/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/radmind/distinfo 2010/12/14 16:27:29 1.18
+++ pkgsrc/sysutils/radmind/distinfo 2014/01/08 11:54:04 1.19
@@ -1,9 +1,19 @@ @@ -1,9 +1,19 @@
1$NetBSD: distinfo,v 1.18 2010/12/14 16:27:29 hauke Exp $ 1$NetBSD: distinfo,v 1.19 2014/01/08 11:54:04 hauke Exp $
2 2
3SHA1 (radmind-1.14.1.tar.gz) = 26f37f1c002384a9c609e688d6cee2fa15b6d0d2 3SHA1 (radmind-1.14.1.tar.gz) = 26f37f1c002384a9c609e688d6cee2fa15b6d0d2
4RMD160 (radmind-1.14.1.tar.gz) = 6b925083ef9dce2de21ebb0ffef287b1ffe9173d 4RMD160 (radmind-1.14.1.tar.gz) = 6b925083ef9dce2de21ebb0ffef287b1ffe9173d
5Size (radmind-1.14.1.tar.gz) = 403553 bytes 5Size (radmind-1.14.1.tar.gz) = 403553 bytes
6SHA1 (patch-aa) = e82fdc59bfc79f736ca135af9ed9923c09de488f 6SHA1 (patch-Makefile.in) = 3602966fb8f7c5118fa378a6646b81dbf0d69ab7
7SHA1 (patch-ab) = 52683f62bd36e22dcf56f6d19968ba2efd8926ed 7SHA1 (patch-command.c) = f274826aa830263b84202a55c05bf87e44c0b9c1
8SHA1 (patch-ac) = b4aa18fcd8eb0b9dd36def555e7505a3ed557017 8SHA1 (patch-command.h) = c050593ab68538e99bd79030e50e803d17027cdb
9SHA1 (patch-ae) = c42712bbc9494cc6cbb1300abadfa0b5a05f03f9 9SHA1 (patch-config.h.in) = a5e157b47fb28d33e2a28fecc9367ff410c6fda5
 10SHA1 (patch-configure) = ecf336c9b77b1622a0190a67c268012cedd074b5
 11SHA1 (patch-configure.ac) = 1d009458df88fba1a25425306a46cad7d2b51737
 12SHA1 (patch-ktcheck.c) = 1dff9d5d0a169b2f544f66fc79a42d22f8a5f54d
 13SHA1 (patch-largefile.h) = 574e908d716d50aab84fccdd699c8b03c56b6e05
 14SHA1 (patch-lcksum.c) = 2d8a8285eb70988a32b41f77d4683ef5ca127883
 15SHA1 (patch-libsnet_snet.c) = 2268af5ada0b8e1c212dbd258b1a1632f2ff7613
 16SHA1 (patch-ra.sh) = 7bdaec355d9fbe98f0cb7e8f49d928f4c2dfd823
 17SHA1 (patch-retr.c) = 69cdf4260583313f0a9f95dfe5597ee03897a313
 18SHA1 (patch-transcript.c) = b309079b7a272547f4c8843b925dd29479cc7e1d
 19SHA1 (patch-update.c) = e27b377378aae6d51cdbb3b9e9f04e5dd33ee211

File Added: pkgsrc/sysutils/radmind/patches/patch-Makefile.in
$NetBSD: patch-Makefile.in,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- Makefile.in.orig	2010-12-13 03:43:49.000000000 +0000
+++ Makefile.in
@@ -269,6 +269,8 @@ rash : FRC
 	    -e 's@_RADMIND_MAIL_DOMAIN@${RADMIND_MAIL_DOMAIN}@g' \
 	    -e 's@_RADMIND_COMMANDFILE@${COMMANDFILE}@g' \
 	    -e 's@_RADMIND_VERSION@$(shell cat VERSION)@g' \
+	    -e 's@_PKG_SYSCONFDIR@${PKG_SYSCONFDIR}@g' \
+	    -e 's@_LOCALBASE@${LOCALBASE}@g' \
 	    -e 's@_RADMIND_ECHO_PATH@${ECHO}@g' \
 	    ${srcdir}/ra.sh > tmp/ra.sh; 
 

File Added: pkgsrc/sysutils/radmind/patches/patch-command.c
$NetBSD: patch-command.c,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- command.c.orig	2010-12-13 03:42:49.000000000 +0000
+++ command.c
@@ -624,11 +624,11 @@ f_stat( SNET *sn, int ac, char *av[] )
     switch ( key ) {
     case K_COMMAND:
 	if ( ac == 2 ) {
-	    snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
+	    snet_writef( sn, RADMIND_STAT_FMT,
 		"f", "command", DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
 		st.st_mtime, st.st_size, cksum_b64 );
 	} else {
-	    snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
+	    snet_writef( sn, RADMIND_STAT_FMT,
 		"f", av[ 2 ], DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
 		st.st_mtime, st.st_size, cksum_b64 );
 	}
@@ -636,7 +636,7 @@ f_stat( SNET *sn, int ac, char *av[] )
         
 		    
     case K_TRANSCRIPT:
-	snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
+	snet_writef( sn, RADMIND_STAT_FMT,
 		"f", av[ 2 ], 
 		DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
 		st.st_mtime, st.st_size, cksum_b64 );
@@ -655,7 +655,7 @@ f_stat( SNET *sn, int ac, char *av[] )
 		"f_stat: transcript path longer than MAXPATHLEN" );
 
 	    /* return constants */
-	    snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
+	    snet_writef( sn, RADMIND_STAT_FMT,
 		    "f", av[ 2 ], 
 		    DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
 		    st.st_mtime, st.st_size, cksum_b64 );
@@ -682,7 +682,7 @@ f_stat( SNET *sn, int ac, char *av[] )
 	if (( av = special_t( path, enc_file )) == NULL ) {
 	    if (( av = special_t( "transcript/special.T", enc_file ))
 		    == NULL ) {
-		snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
+		snet_writef( sn, RADMIND_STAT_FMT,
 			"f", enc_file, 
 			DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID, 
 			st.st_mtime, st.st_size, cksum_b64 );
@@ -690,7 +690,7 @@ f_stat( SNET *sn, int ac, char *av[] )
 		return( 0 );
 	    }
 	}
-	snet_writef( sn, "%s %s %s %s %s %d %" PRIofft "d %s\r\n",
+	snet_writef( sn, RADMIND_STAT_FMT,
 		av[ 0 ], enc_file,
 		av[ 2 ], av[ 3 ], av[ 4 ],
 		st.st_mtime, st.st_size, cksum_b64 );

File Added: pkgsrc/sysutils/radmind/patches/patch-command.h
$NetBSD: patch-command.h,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- command.h.orig	2010-12-13 03:42:49.000000000 +0000
+++ command.h
@@ -13,3 +13,5 @@ struct command {
     char	*c_name;
     int		(*c_func)( SNET *, int, char *[] );
 };
+
+#define RADMIND_STAT_FMT "%s %s %o %d %d %" PRItimet "d %" PRIofft "d %s\r\n"

File Added: pkgsrc/sysutils/radmind/patches/patch-config.h.in
$NetBSD: patch-config.h.in,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- config.h.in.orig	2010-12-13 03:42:49.000000000 +0000
+++ config.h.in
@@ -1,6 +1,9 @@
-/* Size of off_T */
+/* Size of off_t */
 #undef SIZEOF_OFF_T
 
+/* Size of time_t */
+#undef SIZEOF_TIME_T
+
 /* Version number of package */
 #undef VERSION
 

File Added: pkgsrc/sysutils/radmind/patches/patch-configure
$NetBSD: patch-configure,v 1.1 2014/01/08 11:54:04 hauke Exp $

This patch was generated by downgrading devel/autoconf to 2.61,
and diffing the autoconf generated 'configure' script
against the distributed one.

--- configure.orig	2010-12-13 03:49:48.000000000 +0000
+++ configure
@@ -4525,6 +4525,411 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+{ echo "$as_me:$LINENO: checking for time_t" >&5
+echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_time_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef time_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_time_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_time_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
+echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of time_t" >&5
+echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_time_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef time_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef time_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr $ac_mid + 1`
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef time_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef time_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_hi=`expr '(' $ac_mid ')' - 1`
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef time_t ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_time_t=$ac_lo;;
+'') if test "$ac_cv_type_time_t" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (time_t)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_time_t=0
+   fi ;;
+esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef time_t ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+    {
+      long int i = longval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%lu\n", i);
+    }
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_time_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_time_t" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (time_t)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_time_t=0
+   fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
+_ACEOF
+
+
 
 # Checks for libraries.
 { echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5

File Added: pkgsrc/sysutils/radmind/patches/patch-configure.ac
$NetBSD: patch-configure.ac,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- configure.ac.orig	2010-12-13 03:43:38.000000000 +0000
+++ configure.ac
@@ -44,6 +44,7 @@ AC_SYS_LARGEFILE
 
 # Check sizes
 AC_CHECK_SIZEOF(off_t)
+AC_CHECK_SIZEOF(time_t)
 
 # Checks for libraries.
 AC_CHECK_LIB(c, inet_aton, libc_inet_aton=yes) 

File Added: pkgsrc/sysutils/radmind/patches/patch-ktcheck.c
$NetBSD: patch-ktcheck.c,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- ktcheck.c.orig	2010-12-13 03:42:49.000000000 +0000
+++ ktcheck.c
@@ -459,7 +459,7 @@ check( SNET *sn, char *type, char *file 
 	perror( "Incorrect number of arguments\n" );
 	return( 2 );
     }
-    times.modtime = atoi( targv[ 5 ] );
+    times.modtime = strtotimet( targv[ 5 ], NULL, 10 );
     times.actime = time( NULL );
 
     if (( stat( path, &st )) != 0 ) {
@@ -506,7 +506,7 @@ check( SNET *sn, char *type, char *file 
 		needupdate = 1;
 	    }
 	} else {
-	    if ( atoi( targv[ 5 ] ) != (int)st.st_mtime )  {
+	    if ( strtotimet( targv[ 5 ], NULL, 10 ) != st.st_mtime )  {
 		needupdate = 1;
 	    }
 	}

File Added: pkgsrc/sysutils/radmind/patches/patch-largefile.h
$NetBSD: patch-largefile.h,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- largefile.h.orig	2010-12-13 03:42:49.000000000 +0000
+++ largefile.h
@@ -18,3 +18,19 @@
 #define strtoofft(x,y,z)	(strtol((x),(y),(z)))
 #define PRIofft			"l"
 #endif
+
+#ifndef SIZEOF_TIME_T
+#error "sizeof time_t unknown."
+#endif
+
+#if SIZEOF_TIME_T == 8
+    #ifdef HAVE_STRTOLL
+    #define strtotimet(x,y,z)	(strtoll((x),(y),(z)))
+    #else /* !HAVE_STRTOLL */
+    #define strtotimet(x,y,z)	(strtol((x),(y),(z)))
+    #endif /* HAVE_STRTOLL */
+    #define PRItimet		"ll"
+#else /* SIZEOF_TIME_T != 8 */
+    #define strtotimet(x,y,z)	(strtol((x),(y),(z)))
+    #define PRItimet		"l"
+#endif /* SIZEOF_TIME_T */

File Added: pkgsrc/sysutils/radmind/patches/patch-lcksum.c
$NetBSD: patch-lcksum.c,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- lcksum.c.orig	2010-12-13 03:42:49.000000000 +0000
+++ lcksum.c
@@ -434,7 +434,7 @@ do_lcksum( char *tpath )
 		/* Check to see if checksum is listed in transcript */
 		if ( strcmp( targv[ 7 ], "-" ) != 0) {
 		    /* use mtime from server */
-		    fprintf( ufs, "%s %-37s %4s %5s %5s %9ld "
+		    fprintf( ufs, "%s %-37s %4s %5s %5s %9" PRItimet "d "
 			    "%7" PRIofft "d %s\n",
 			targv[ 0 ], targv[ 1 ], targv[ 2 ], targv[ 3 ],
 			targv[ 4 ], st.st_mtime, st.st_size, lcksum );

File Added: pkgsrc/sysutils/radmind/patches/patch-libsnet_snet.c
$NetBSD: patch-libsnet_snet.c,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- libsnet/snet.c.orig	2010-12-13 03:43:00.000000000 +0000
+++ libsnet/snet.c
@@ -792,7 +792,6 @@ snet_read1( sn, buf, len, tv )
     fd_set		fds;
     ssize_t		rc;
     struct timeval	default_tv;
-    extern int		errno;
     int			oflags = 0, dontblock = 0;
 
     if (( tv == NULL ) && ( sn->sn_flag & SNET_READ_TIMEOUT )) {
@@ -976,7 +975,6 @@ snet_getline( sn, tv )
 {
     char		*eol, *line;
     ssize_t		rc;
-    extern int		errno;
 
     for ( eol = sn->sn_rcur; ; eol++ ) {
 	if ( eol >= sn->sn_rend ) {				/* fill */

File Added: pkgsrc/sysutils/radmind/patches/patch-ra.sh
$NetBSD: patch-ra.sh,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- ra.sh.orig	2010-12-13 03:42:49.000000000 +0000
+++ ra.sh
@@ -31,7 +31,7 @@ EDITOR=${EDITOR:-vi}
 PAGER=${PAGER:-cat}
 USER=${SUDO_USER:-$USER}
 TMPDIR="${TMPDIR:=/tmp}"
-DEFAULTS="/etc/defaults/radmind"
+DEFAULTS="_PKG_SYSCONFDIR/radmind.defaults"
 FSDIFFROOT="."
 DEFAULTWORKDIR="/"
 FLAG="_RADMIND_DIR/client/.RadmindRunning"
@@ -46,7 +46,7 @@ NETOPTS=
 PREAPPLY="_RADMIND_PREAPPLY"
 POSTAPPLY="_RADMIND_POSTAPPLY"
 
-PATH=/usr/local/bin:/usr/bin:/bin; export PATH
+PATH=_LOCALBASE/bin:/usr/bin:/bin; export PATH
 RETRY=10
 
 MKTEMP="_RADMIND_MKTEMP"
@@ -62,14 +62,6 @@ fi
 LTMP="${RASHTMP}/lapply.out"
 FTMP="${RASHTMP}/fsdiff.out"
 
-# different systems use different default dirs
-if [ ! -f "${DEFAULTS}" ]; then
-    DEFAULTS="/etc/default/radmind"
-    if [ ! -f "${DEFAULTS}" ]; then
-	DEFAULTS="/etc/radmind.defaults"
-    fi
-fi
-
 Yn() {
     $ECHO -n "$*" "[Yn] "
     read ans

File Added: pkgsrc/sysutils/radmind/patches/patch-retr.c
$NetBSD: patch-retr.c,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- retr.c.orig	2010-12-13 03:42:49.000000000 +0000
+++ retr.c
@@ -47,7 +47,6 @@ extern int		verbose;
 extern int		showprogress;
 extern int		dodots;
 extern int		cksum;
-extern int		errno;
 extern int		create_prefix;
 extern SSL_CTX  	*ctx;
 

File Added: pkgsrc/sysutils/radmind/patches/patch-transcript.c
$NetBSD: patch-transcript.c,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- transcript.c.orig	2010-12-13 03:42:49.000000000 +0000
+++ transcript.c
@@ -271,7 +271,7 @@ transcript_parse( struct transcript *tra
 	tran->t_pinfo.pi_stat.st_mode = strtol( argv[ 2 ], NULL, 8 );
 	tran->t_pinfo.pi_stat.st_uid = atoi( argv[ 3 ] );
 	tran->t_pinfo.pi_stat.st_gid = atoi( argv[ 4 ] );
-	tran->t_pinfo.pi_stat.st_mtime = atoi( argv[ 5 ] );
+	tran->t_pinfo.pi_stat.st_mtime = strtotimet( argv[ 5 ], NULL, 10 );
 	tran->t_pinfo.pi_stat.st_size = strtoofft( argv[ 6 ], NULL, 10 );
 	if ( tran->t_type != T_NEGATIVE ) {
 	    if (( cksum ) && ( strcmp( "-", argv [ 7 ] ) == 0  )) {
@@ -436,12 +436,13 @@ t_print( struct pathinfo *fs, struct tra
 	 * but the corresponding transcript is negative, hence, retain
 	 * the file system's mtime.  Woof!
 	 */
-	fprintf( outtran, "%c %-37s\t%.4lo %5d %5d %9d %7" PRIofft "d %s\n",
+	fprintf( outtran, "%c %-37s\t%.4lo %5d %5d %9" PRItimet "d "
+			  "%7" PRIofft "d %s\n",
 		cur->pi_type, epath,
 		(unsigned long)( T_MODE & cur->pi_stat.st_mode ), 
 		(int)cur->pi_stat.st_uid, (int)cur->pi_stat.st_gid,
 		( flag == PR_STATUS_NEG ) ?
-			(int)fs->pi_stat.st_mtime : (int)cur->pi_stat.st_mtime,
+			fs->pi_stat.st_mtime : cur->pi_stat.st_mtime,
 		cur->pi_stat.st_size, cur->pi_cksum_b64 );
 	break;
 

File Added: pkgsrc/sysutils/radmind/patches/patch-update.c
$NetBSD: patch-update.c,v 1.1 2014/01/08 11:54:04 hauke Exp $

--- update.c.orig	2010-12-13 03:42:49.000000000 +0000
+++ update.c
@@ -26,6 +26,7 @@
 #include "update.h"
 #include "code.h"
 #include "radstat.h"
+#include "largefile.h"
 #include "transcript.h"
 #include "progress.h"
 #include "mkdirs.h"
@@ -73,7 +74,7 @@ update( char *path, char *displaypath, i
 
 	mode = strtol( targv[ 2 ], (char **)NULL, 8 );
 
-	times.modtime = atoi( targv[ 5 ] );
+	times.modtime = strtotimet( targv[ 5 ], NULL, 10 );
 	if ( times.modtime != st->st_mtime ) {
 	    times.actime = st->st_atime;
 	    if ( utime( path, &times ) != 0 ) {

File Deleted: pkgsrc/sysutils/radmind/patches/Attic/patch-aa

File Deleted: pkgsrc/sysutils/radmind/patches/Attic/patch-ac

File Deleted: pkgsrc/sysutils/radmind/patches/Attic/patch-ab

File Deleted: pkgsrc/sysutils/radmind/patches/Attic/patch-ae