This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: system without printf_has_long_long?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Sat, 12 Jan 2002 14:54:20 -0500
- Subject: Re: system without printf_has_long_long?
- References: <3C3FCF38.7000508@cygnus.com>
FYI, Peter Schauer tossed me a patch to fix it so I'll check it in.
Andrew
> Hello,
>
> This, er gem, from language.c, has me truely puzzled:
>
> #ifndef CC_HAS_LONG_LONG
> ....
> #elif defined (PRINTF_HAS_LONG_LONG)
> ....
> #else /* !defined (PRINTF_HAS_LONG_LONG) */
> /* Use strcat_address_numeric to print the number into a string, then
> build the result string from local_hex_format_prefix, padding and
> the hex representation as indicated by "width". */
>
> temp_nbr_buf[0] = 0;
> /* With use_local == 0, we don't get the leading "0x" prefix. */
> /* MERGEBUG ?? As a quick fix I am replacing this call to
> strcat_address_numeric with sprintf
> strcat_address_numeric(num, 0, temp_nbr_buf, RESULT_BUF_LEN);
> */
>
> {
> long long ll = num;
> sprintf (temp_nbr_buf, "%llx", ll);
> }
>
> It has been in there for two years (HP merge) and it can't work.
>
> Andrew.
>