From c7662795f519d2b6797e4b1ac7fa4a22afa26310 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 27 Jul 2006 23:18:35 +0000 Subject: * merge - This is my current patch queue. I think that all of these are safe to apply. This is just under half of the pending changes in chris/general (the easy half). --- lib/server/makeprotocol.pl.in | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'lib/server/makeprotocol.pl.in') diff --git a/lib/server/makeprotocol.pl.in b/lib/server/makeprotocol.pl.in index 3dce6118..efe6519d 100755 --- a/lib/server/makeprotocol.pl.in +++ b/lib/server/makeprotocol.pl.in @@ -1,6 +1,9 @@ #!@PERL@ use strict; +use lib "../../infrastructure"; +use BoxPlatform; + # Make protocol C++ classes from a protocol description file # built in type info (values are is basic type, C++ typename) @@ -167,8 +170,8 @@ close IN; # open files my $h_filename = 'autogen_'.$protocol_name.'Protocol'.$type.'.h'; -open CPP,'>autogen_'.$protocol_name.'Protocol'.$type.'.cpp'; -open H,">$h_filename"; +open CPP,'>autogen_'.$protocol_name.'Protocol'.$type.'.cpp.new'; +open H,">$h_filename.new"; print CPP <<__E; @@ -912,6 +915,8 @@ __E close H; close CPP; +update_if_changed('autogen_'.$protocol_name.'Protocol'.$type.'.cpp'); +update_if_changed($h_filename); sub obj_is_type { @@ -981,8 +986,15 @@ sub make_log_strings { # need to translate it my ($format,$arg) = @{$log_display_types{$ty}}; - push @str,$format; $arg =~ s/VAR/m$nm/g; + + if ($format eq "0x%llx" and $target_windows) + { + $format = "0x%I64x"; + $arg = "(uint64_t)$arg"; + } + + push @str,$format; push @arg,$arg; } else -- cgit v1.2.3