bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFT: *printf-posix modules


From: Bruno Haible
Subject: Re: RFT: *printf-posix modules
Date: Sun, 20 May 2007 15:35:27 +0200
User-agent: KMail/1.5.4

Jim Meyering wrote:
> Do you feel like adding a few coreutils tests that currently fail
> on common platforms but that would succeed if coreutils switched?
> E.g., here:
>   coreutils/tests/seq/basic
>   coreutils/tests/misc/printf

Yes, sure. Which tests exactly do you want to be included in gnulib?
(I don't see any of the coreutils tests being commented out.)

> Have you tried and compared code size on a modern Linux/libc system?

On a glibc 2.3.6 system, we have:
checking whether printf supports size specifiers as in C99... yes
checking whether printf supports 'long double' arguments... yes
checking whether printf supports infinite 'double' arguments... yes
checking whether printf supports infinite 'long double' arguments... yes
checking whether printf supports the 'a' and 'A' directives... no
checking whether printf supports the 'F' directive... yes
checking whether printf supports the 'n' directive... yes
checking whether printf supports POSIX/XSI format strings with positions... yes
checking whether printf supports the grouping flag... yes
checking whether printf supports the zero flag correctly... yes
$ size printf.o vfprintf.o vasnprintf.o
   text    data     bss     dec     hex filename
     38       0       0      38      26 printf.o
    190       0       0     190      be vfprintf.o
   7783       0       0    7783    1e67 vasnprintf.o

On a glibc 2.5 system, we should have:
checking whether printf supports size specifiers as in C99... yes
checking whether printf supports 'long double' arguments... yes
checking whether printf supports infinite 'double' arguments... yes
checking whether printf supports infinite 'long double' arguments... yes
checking whether printf supports the 'a' and 'A' directives... yes
checking whether printf supports the 'F' directive... yes
checking whether printf supports the 'n' directive... yes
checking whether printf supports POSIX/XSI format strings with positions... yes
checking whether printf supports the grouping flag... yes
checking whether printf supports the zero flag correctly... yes
$ ls -l printf.o vfprintf.o vasnprintf.o 
/bin/ls: printf.o: No such file or directory
/bin/ls: vfprintf.o: No such file or directory
-rw-r--r--    1 bruno    user        20092 May 20 15:28 vasnprintf.o
$ size vasnprintf.o
   text    data     bss     dec     hex filename
   3746       0       0    3746     ea2 vasnprintf.o

So, on a glibc 2.5 system, the size increase of executables will be 0 bytes,
since vasnprintf.o will not be linked in (coreutils only needs printf(),
not vasnprintf()).

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]