Message ID | BLU437-SMTP106633E3F0A4D95093D51B697C00@phx.gbl |
---|---|
State | New |
Headers | show |
On Sun, Sep 7, 2014 at 7:36 PM, John David Anglin <dave.anglin@bell.net> wrote: > The attached patch fixes bootstrap on hpux which doesn't have the atoll > function. > > Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11. > > OK for trunk? "ll" is not portable (it's GNU), I think BSD uses "q" and windows may use sth else. I think the code shouldn't use 'long long' but int64_t and the appropriate SCNd64 macros for the sscanf format specifier. Note that C99 has atoll and only C99 has the SCNd64 stuff (inttypes.h). I wonder if hpux11 has a C99 conforming inttypes.h? Thanks, Richard. > Dave > -- > John David Anglin dave.anglin@bell.net > >
Index: gcov-tool.c =================================================================== --- gcov-tool.c (revision 214998) +++ gcov-tool.c (working copy) @@ -308,7 +308,7 @@ break; case 'n': if (!do_scaling) - normalize_val = atoll (optarg); + sscanf (optarg, "%lld", &normalize_val); else fnotice (stderr, "scaling cannot co-exist with normalization," " skipping\n");