This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
system without printf_has_long_long?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: gdb at sources dot redhat dot com
- Date: Sat, 12 Jan 2002 00:52:56 -0500
- Subject: system without printf_has_long_long?
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.