# HG changeset patch
# User Juuso Lapinlampi <wubthecaptain@gmail.com>
# Date 1537541797 0
#      Fri Sep 21 14:56:37 2018 +0000
# Node ID c9c0b4dfe5db98a4a64c8239fd5a3ada431b1eb2
# Parent  7a5abe18789f4cdd76ffa74e6f095ca3f41db203
updaterevision: Fix hgdate data type to signed 64-bit int

time_t is usually a signed integer (32-bits or 64-bits wide), not
unsigned. ISO C does not specify any particular type.

See: https://stackoverflow.com/q/471248
Fixes: #3497

diff --git a/tools/updaterevision/updaterevision.c b/tools/updaterevision/updaterevision.c
--- a/tools/updaterevision/updaterevision.c
+++ b/tools/updaterevision/updaterevision.c
@@ -158,7 +158,7 @@
 			hash, vertag, hash, lastlog);
 
 		// [BB] Also save out hg info.
-		fprintf (stream, "#define HG_REVISION_NUMBER %lu\n", hgdate);
+		fprintf (stream, "#define HG_REVISION_NUMBER %lld\n", (long long) hgdate);
 		// [BB] We use the short hash.
 		hash[12] = 0;
 		fprintf (stream, "#define HG_REVISION_HASH_STRING \"%s\"\n", hash);
