patches/glibc/2.2.2/glibc-2.2.2-printf-not-macro.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
yann@1
     1
I'm testing toolchains with glibc-2.2.2 now.  It looks ok except
yann@1
     2
that glibc-2.2.2 headers contain the gosh-awful line
yann@1
     3
  #  define printf(fmt, args...) fprintf (stdout, fmt, ##args)
yann@1
     4
which causes builds of programs with methods named 'printf' to fail with
yann@1
     5
  error: `stdout' is not a type
yann@1
     6
Feh.
yann@1
     7
yann@1
     8
Revision 1.8, Thu Aug 2 16:09:51 2001 UTC (3 years, 9 months ago) by aj
yann@1
     9
Branch: MAIN
yann@1
    10
CVS Tags: glibc-2_3_2, glibc-2_2_4, glibc-2-3-1, glibc-2-3, glibc-2-2-branch, glibc-2-2-5
yann@1
    11
yann@1
    12
(printf): Remove printf optimization since GCC 3.0 can optimize printf.
yann@1
    13
yann@1
    14
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/bits/stdio.h.diff?r1=1.7&r2=1.8&cvsroot=glibc
yann@1
    15
yann@1
    16
===================================================================
yann@1
    17
RCS file: /cvs/glibc/libc/libio/bits/stdio.h,v
yann@1
    18
retrieving revision 1.7
yann@1
    19
retrieving revision 1.8
yann@1
    20
diff -u -r1.7 -r1.8
yann@1
    21
--- libc/libio/bits/stdio.h	2001/07/06 04:55:32	1.7
yann@1
    22
+++ libc/libio/bits/stdio.h	2001/08/02 16:09:51	1.8
yann@1
    23
@@ -29,13 +29,6 @@
yann@1
    24
 
yann@1
    25
 
yann@1
    26
 #ifdef __USE_EXTERN_INLINES
yann@1
    27
-/* Since version 2.97 GCC knows about `fprintf' and can optimize certain
yann@1
    28
-   cases.  Help gcc to optimize more code by mapping `printf' to the known
yann@1
    29
-   `fprintf' function.  Unfortunately we have to use a macro.  */
yann@1
    30
-# if __GNUC_PREREQ (2,97)
yann@1
    31
-#  define printf(fmt, args...) fprintf (stdout, fmt, ##args)
yann@1
    32
-# endif
yann@1
    33
-
yann@1
    34
 /* Write formatted output to stdout from argument list ARG.  */
yann@1
    35
 __STDIO_INLINE int
yann@1
    36
 vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW