This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: gold patch committed: Make relro_test fail if dc is not present


>> Ugh. How about this? Is strtonum() supported in all versions of awk
>> that we care about?
>
> Good idea, but I don't think so. ?strtonum is only in GNU awk, and is
> probably not in, e.g., Solaris awk.
>
> I wonder how portable printf is?

printf and sprintf are described in the Posix Single Unix
Specification's awk page, so they ought to be portable enough?
Unfortunately, the SUS only says that an implementation "may accept
numeric constants with the form and numeric value equivalent to the
hexadecimal-constant and hexadecimal-floating-constant tokens as
specified by the ISO C standard," and there's no built-in function
that would convert.

What platform doesn't have dc? I know it's not in Posix, but it's been
on every version of Unix I've seen since v6. And who doesn't have a
Posix shell?

What about bc? That's in the SUS, and it supports "ibase = 16".

-cary


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