patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-sscanf.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
http://sources.redhat.com/ml/bug-glibc/2003-08/msg00087.html
yann@1
     2
yann@1
     3
From: Gernot Hillier <gernot dot hillier at siemens dot com>
yann@1
     4
Organization: Siemens AG
yann@1
     5
To: Jeffrey Bedard <jefbed at e-list dot net>, bug-glibc at gnu dot org
yann@1
     6
Date: Mon, 18 Aug 2003 08:50:03 +0200
yann@1
     7
References: <3F3D0899.6020004@e-list.net>
yann@1
     8
Message-Id: <200308180850.03431.gernot.hillier@siemens.com>
yann@1
     9
Subject: Re: Build Fails with gcc 3.3.1
yann@1
    10
X-BeenThere: bug-glibc@gnu.org
yann@1
    11
yann@1
    12
Hi!
yann@1
    13
yann@1
    14
Am Freitag, 15. August 2003 18:21 schrieb Jeffrey Bedard:
yann@1
    15
> gcc sscanf.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes
yann@1
    16
[...]
yann@1
    17
> sscanf.c:31: warning: conflicting types for built-in function `sscanf'
yann@1
    18
> sscanf.c: In function `sscanf':
yann@1
    19
> sscanf.c:37: error: `va_start' used in function with fixed args
yann@1
    20
> .../stdio-common/_itoa.h: At top level:
yann@1
    21
> .../stdio-common/_itoa.h:40: warning: inlining failed in call to
yann@1
    22
> `_itoa_word' .../stdio-common/_itoa.h:76: warning: called from here
yann@1
    23
> make[2]: ***
yann@1
    24
> [/home/jefbed/src/packages/glibc-build/stdio-common/sscanf.o] Error 1
yann@1
    25
yann@1
    26
You can find the fitting patch in the glibc CVS. You have to replace some 
yann@1
    27
function headers. 
yann@1
    28
yann@1
    29
I created a patch for glibc-2.2.5 for the same reason. I don't know if it 
yann@1
    30
applies cleanly, but if not it should at least show you what to do...
yann@1
    31
yann@1
    32
-- 
yann@1
    33
Bye,
yann@1
    34
yann@1
    35
Gernot Hillier
yann@1
    36
Siemens AG
yann@1
    37
yann@1
    38
yann@1
    39
yann@1
    40
yann@1
    41
Content-Disposition: attachment; filename="glibc-2.2.5-gcc-3.3.diff"
yann@1
    42
yann@1
    43
diff -ur glibc-2.2.5.orig/stdio-common/sprintf.c glibc-2.2.5/stdio-common/sprintf.c
yann@1
    44
--- glibc-2.2.5.orig/stdio-common/sprintf.c	2001-07-06 06:55:41.000000000 +0200
yann@1
    45
+++ glibc-2.2.5/stdio-common/sprintf.c	2003-08-11 13:25:48.000000000 +0200
yann@1
    46
@@ -27,9 +27,7 @@
yann@1
    47
 /* Write formatted output into S, according to the format string FORMAT.  */
yann@1
    48
 /* VARARGS2 */
yann@1
    49
 int
yann@1
    50
-sprintf (s, format)
yann@1
    51
-     char *s;
yann@1
    52
-     const char *format;
yann@1
    53
+sprintf (char *s, const char *format,...)
yann@1
    54
 {
yann@1
    55
   va_list arg;
yann@1
    56
   int done;
yann@1
    57
Only in glibc-2.2.5/stdio-common: sprintf.c.orig
yann@1
    58
Only in glibc-2.2.5/stdio-common: sprintf.c.rej
yann@1
    59
diff -ur glibc-2.2.5.orig/stdio-common/sscanf.c glibc-2.2.5/stdio-common/sscanf.c
yann@1
    60
--- glibc-2.2.5.orig/stdio-common/sscanf.c	2001-07-06 06:55:41.000000000 +0200
yann@1
    61
+++ glibc-2.2.5/stdio-common/sscanf.c	2003-08-11 13:27:58.000000000 +0200
yann@1
    62
@@ -27,9 +27,7 @@
yann@1
    63
 /* Read formatted input from S, according to the format string FORMAT.  */
yann@1
    64
 /* VARARGS2 */
yann@1
    65
 int
yann@1
    66
-sscanf (s, format)
yann@1
    67
-     const char *s;
yann@1
    68
-     const char *format;
yann@1
    69
+sscanf (const char *s, const char *format,...)
yann@1
    70
 {
yann@1
    71
   va_list arg;
yann@1
    72
   int done;
yann@1
    73