pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/aegis Add more casts when storing a time_t in a ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/769a68a40079
branches:  trunk
changeset: 567954:769a68a40079
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun Nov 29 21:55:09 2009 +0000

description:
Add more casts when storing a time_t in a pointer, to shut up the compiler
and thereby fix broken build on 5.0 amd64.

The code in question will break in 2038 on i386, but for now at least
that's someone else's problem.

diffstat:

 devel/aegis/distinfo         |   3 ++-
 devel/aegis/patches/patch-ab |  25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletions(-)

diffs (42 lines):

diff -r 083b8c1e0796 -r 769a68a40079 devel/aegis/distinfo
--- a/devel/aegis/distinfo      Sun Nov 29 21:49:59 2009 +0000
+++ b/devel/aegis/distinfo      Sun Nov 29 21:55:09 2009 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.8 2009/06/10 11:16:36 obache Exp $
+$NetBSD: distinfo,v 1.9 2009/11/29 21:55:09 dholland Exp $
 
 SHA1 (aegis-4.24.1.tar.gz) = 825d1fc24c1d9c1250bc297abf5162b1c56cbc63
 RMD160 (aegis-4.24.1.tar.gz) = b8d5e37c0870c21d123ab5b5ec01a84f33f2b424
 Size (aegis-4.24.1.tar.gz) = 4087917 bytes
 SHA1 (patch-aa) = 6b85eb9011379e6bed80635744509a2537f5457b
+SHA1 (patch-ab) = c29c15aff7037f18a2e1cc0847d5ed2adbea38cc
 SHA1 (patch-ad) = fedf733f29e02382887b1e2dbd004404da513787
diff -r 083b8c1e0796 -r 769a68a40079 devel/aegis/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/aegis/patches/patch-ab      Sun Nov 29 21:55:09 2009 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-ab,v 1.3 2009/11/29 21:55:09 dholland Exp $
+
+Avoid compiler noise when storing an integer in a pointer.
+
+(This code will break on 32-bit platforms after 2038, but that's
+somebody else's problem.)
+
+--- libaegis/project/history/change/change2time.cc~    2008-09-24 17:48:58.000000000 -0400
++++ libaegis/project/history/change/change2time.cc     2009-11-29 15:30:43.000000000 -0500
+@@ -28,13 +28,13 @@ time_t
+ project_ty::change_completion_timestamp(long change_number)
+ {
+     assert(change2time_stp);
+-    time_t result = (time_t)itab_query(change2time_stp, change_number);
++    time_t result = (time_t)(intptr_t)itab_query(change2time_stp, change_number);
+     if (!result)
+     {
+         change::pointer cp = change_alloc(this, change_number);
+         change_bind_existing(cp);
+         result = ::change_completion_timestamp(cp);
+-        itab_assign (change2time_stp, cp->number, (void*)result);
++        itab_assign (change2time_stp, cp->number, (void*)(intptr_t)result);
+         change_free(cp);
+     }
+ 



Home | Main Index | Thread Index | Old Index