Force daysFromBuildID() to return an int so that mingw windres doesn't fail.
authorChris Seawood <cls@seawood.org>
Sat, 15 Aug 2009 17:24:35 -0700
changeset 31598 83de9673213ec80a6895b36555c414b9c6e1ce46
parent 31585 0aa2596a20cc9346308297975fa6376802e53d37
child 31599 715598e98f06b5a98623b689359d70c0ff914816
push id8608
push usercls@seawood.org
push dateMon, 17 Aug 2009 00:54:59 +0000
treeherdermozilla-central@715598e98f06 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs508879
milestone1.9.3a1pre
Force daysFromBuildID() to return an int so that mingw windres doesn't fail. Bug #508879 r=bsmedberg
config/version_win.pl
js/src/config/version_win.pl
--- a/config/version_win.pl
+++ b/config/version_win.pl
@@ -49,18 +49,19 @@ use POSIX;
 sub daysFromBuildID
 {
     my ($buildid,) = @_;
 
     my ($y, $m, $d, $h) = ($buildid =~ /^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/);
     $d || die("Unrecognized buildid string.");
 
     my $secondstodays = 60 * 60 * 24;
-    return (POSIX::mktime(00, 00, 00, $d, $m - 1, $y - 1900) -
-            POSIX::mktime(00, 00, 00, 01, 00, 100)) / $secondstodays;
+    return sprintf("%d",
+		   (POSIX::mktime(00, 00, 00, $d, $m - 1, $y - 1900) -
+		    POSIX::mktime(00, 00, 00, 01, 00, 100)) / $secondstodays);
 }
 
 #Creates version resource file
 
 #Paramaters are passed on the command line:
 
 #Example: -MODNAME nsToolkitCompsModule -DEBUG=1
 
--- a/js/src/config/version_win.pl
+++ b/js/src/config/version_win.pl
@@ -49,18 +49,19 @@ use POSIX;
 sub daysFromBuildID
 {
     my ($buildid,) = @_;
 
     my ($y, $m, $d, $h) = ($buildid =~ /^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/);
     $d || die("Unrecognized buildid string.");
 
     my $secondstodays = 60 * 60 * 24;
-    return (POSIX::mktime(00, 00, 00, $d, $m - 1, $y - 1900) -
-            POSIX::mktime(00, 00, 00, 01, 00, 100)) / $secondstodays;
+    return sprintf("%d",
+		   (POSIX::mktime(00, 00, 00, $d, $m - 1, $y - 1900) -
+		    POSIX::mktime(00, 00, 00, 01, 00, 100)) / $secondstodays);
 }
 
 #Creates version resource file
 
 #Paramaters are passed on the command line:
 
 #Example: -MODNAME nsToolkitCompsModule -DEBUG=1