This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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: system without printf_has_long_long?


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.
> 



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