diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-07-27 23:18:35 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-07-27 23:18:35 +0000 |
commit | c7662795f519d2b6797e4b1ac7fa4a22afa26310 (patch) | |
tree | b1737dfa78d8e7bfb2d5a7e9831bab91869ade97 /lib/server/makeprotocol.pl.in | |
parent | a85b710c46ec79e968da349304f30945cb9b7bc1 (diff) |
* 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).
Diffstat (limited to 'lib/server/makeprotocol.pl.in')
-rwxr-xr-x | lib/server/makeprotocol.pl.in | 18 |
1 files changed, 15 insertions, 3 deletions
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 |