2011/5/9 Eric Blake <eblake@xxxxxxxxxx>: > On 05/07/2011 06:28 AM, Matthias Bolte wrote: >> Rename u_int and unsigned to unsigned int. This gets rid of some special >> case code in the generator. >> --- >> Âdaemon/remote_generator.pl  |  10 +++--- >> Âsrc/remote/remote_protocol.x |  72 +++++++++++++++++++++--------------------- >> Â2 files changed, 41 insertions(+), 41 deletions(-) >> >> diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl >> index 8d62c37..e6a0e2c 100755 >> --- a/daemon/remote_generator.pl >> +++ b/daemon/remote_generator.pl >> @@ -878,13 +878,13 @@ elsif ($opt_k) { >>           Âpush(@setters_list, "args.$1.${1}_val = (char *)$1;"); >>           Âpush(@setters_list, "args.$1.${1}_len = ${1}len;"); >>           Âpush(@args_check_list, { name => "\"$1\"", arg => "${1}len", limit => $2 }); >> -        Â} elsif ($args_member =~ m/^(.*) (\S+);/) { >> -          Âmy $type_name = $1; >> -          Âmy $arg_name = $2; >> +        Â} elsif ($args_member =~ m/^(unsigned )?(int|hyper) (\S+);/) { >> +          Âmy $type_name; >> +          Âmy $arg_name = $3; >> >> +          Â$type_name = $1 if ($1); >> +          Â$type_name .= $2; >>           Â$type_name =~ s/hyper/long/; >> -          Â$type_name =~ s/^unsigned$/unsigned int/; >> -          Â$type_name =~ s/u_int/unsigned int/; > > Makes sense. ÂCertainly makes life stricter for $type_name, which is a > good thing for maintenance. > >> +++ b/src/remote/remote_protocol.x >> @@ -541,8 +541,8 @@ struct remote_domain_interface_stats_ret { >> >> Âstruct remote_domain_memory_stats_args { >>   Âremote_nonnull_domain dom; >> -  Âu_int maxStats; >> -  Âu_int flags; >> +  Âunsigned int maxStats; >> +  Âunsigned int flags; > > Good change; http://www.ietf.org/rfc/rfc4506.txt only documents > 'unsigned int identifier' [4.2], and not 'u_int' nor 'unsigned' for > declaring unsigned 32-bit values. Ârpcgen may have accepted those other > aliases as an extension (or via an intermediate typedef), but we might > as well stick as close to the specs as possible, especially if it makes > life easier for our generator. > > ACK. > Thanks, pushed. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list