This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Use sscanf instead of atoll in gcov-tool.c


On 8-Sep-14, at 5:21 AM, Richard Biener wrote:

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.

Attached is an updated version using the SCNd64 macro.  It works fine
on hpux.  The PRI/SCN macrocs are available back to at least hpux10.20.

The other alternative is to use the atoll implementation in read-rtl.c.

Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.

OK for trunk?

Dave
--
John David Anglin	dave.anglin@bell.net


Attachment: gcov-tool.c.d.1.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]