enable long long and long double support in printf/scanf

Jeff Johnston jjohnstn@redhat.com
Wed May 26 20:43:00 GMT 2004


Patch with minor modifications checked in, thanks.  It was not necessary to 
alter acinclude.m4  since the new configuration options are designed to modify 
newlib.h.  Thus, the new options were placed in configure.in.  I modified 
configure.host to add some default option variables that various platforms can 
set as needed.  At the end of configure.host, a check is made to see if the 
configuration options are not set and if a default is specified.  This allows 
the user to override defaults with configuration options.

-- Jeff J.

Jeff Johnston wrote:
> Hi Artem,
> 
>   I haven't forgotten about this.  It needs a tweak and some testing.  
> The tweak I am referring to is that there should be a mechanism for the 
> configure options to override the platform defaults.  For example, if a 
> user configures with --disable-newlib-io-long-long, this should take 
> precedence even though the default may be "yes" for newlib_io_long_long 
> on a particular platform.  I'll take care of implementing this.  After 
> looking, I noticed a similar mechanism is needed for some other newlib 
> configuration options.
> 
> -- Jeff J.
> 
> Artem B. Bityuckiy wrote:
> 
>> Hello.
>>
>> Here is the patch that:
>>
>> 1. Adds --enable-newlib-io-long-long and 
>> --enable-newlib-io-long-double configure script options to allow users 
>> to enable long long and long double types support in printf/scanf 
>> series functions.
>> 2. Removes direct passing -DWANT_PRINTF_LONG_LONG and 
>> -DWANT_IO_LONG_DBL command line arguments when compiling Newlib (see 
>> configure.host).
>> 3. Adds new _WANT_IO_LONG_LONG and _WANT_IO_LONG_DOUBLE macros to 
>> newlib.hin
>> 4. Uses new _WANT_IO_LONG_LONG and _WANT_IO_LONG_DOUBLE macros from 
>> newlib.h instead of old WANT_PRINTF_LONG_LONG and WANT_IO_LONG_DBL 
>> macros.
>>
>> Also, there are 2 small changes:
>> 1. Include <reent.h> in powerpc's printf/scanf
>> 2. Remove junk newlib_cflags=${newlib_cflags} from configure.host
>>
>> Note: aclocal.m4 and configure form newlib/ directory should be 
>> regenerated.
>>
>> Please, see and commit if consider necessary.
>>
> 



More information about the Newlib mailing list