File: devel/glibc/files/gar-base.diff
lnx-bbc--stable--2.1--patch-38 lnx-bbc--research--0.0--patch-33
Line 1Line 1
diff -Nru tmp/glibc-2.2.5/sysdeps/unix/sysv/linux/bits/in.h work/glibc-2.2.5/sysdeps/unix/sysv/linux/bits/in.h
--- tmp/glibc-2.2.5/sysdeps/unix/sysv/linux/bits/in.h        Thu Jul 5 21:56:14 2001
+++ work/glibc-2.2.5/sysdeps/unix/sysv/linux/bits/in.h        Thu Jul 4 23:59:43 2002
@@ -63,11 +63,36 @@
/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst'
field is used for the first-hop gateway when using a source route
(this gets put into the header proper). */
-struct ip_opts
- {
- struct in_addr ip_dst;        /* First hop; zero without source route. */
- char ip_opts[40];                /* Actually variable in size. */
- };
+/* struct ip_opts
+ {
+ struct in_addr ip_dst;
+ char ip_opts[40];
+ }; */
diff --speed-large-files --minimal -Nru scratch/glibc-2.3.2/Makerules work/main.d/glibc-2.3.2/Makerules
--- scratch/glibc-2.3.2/Makerules        2003-02-22 18:23:31.000000000 -0500
+++ work/main.d/glibc-2.3.2/Makerules        2004-07-30 01:34:37.000000000 -0400
@@ -605,8 +605,11 @@
LDLIBS-c.so += $(gnulib)
# Give libc.so an entry point and make it directly runnable itself.
LDFLAGS-c.so += -e __libc_main
-# Force the backward compatibility EH functions to be linked.
-LDFLAGS-c.so += -u __register_frame
+
+
+/* In ANSI C++, a struct may not have a member with the same name as the
+ * struct. This rule is ignored by g++ in header files included from
+ * standard system include paths, but not files included via -I. The result
+ * is that a C++ program which includes <netinet/in.h> and gets the present
+ * file in a -I specified include directory will fail to compile. (lftp is
+ * one example of such a program.)
+ *
+ * One solution provided by
+ *
+ * http://www.monkey.org/openbsd/archive/bugs/9812/msg00097.html
+ *
+ * is used below. If you want the original definition, it's commented out
+ * immediately above. */
+
+struct ip_opts {
+ struct in_addr ip_dst; /* first hop, 0 w/o src rt */
+#if defined(__cplusplus)
+#warning ip_opts structure for C++ MODIFIED by LNX-BBC; see <bits/in.h>!
+ char Ip_opts[40]; /* cannot have same name as class */
+#else
+ char ip_opts[40]; /* actually variable in size */
+#endif
+};
+# Force the backward compatibility EH functions to be linked. -Zack Weinberg
+# Take it out because it fills up libc.so.lds with linker errors. -Nate Riffe
+#LDFLAGS-c.so += -u __register_frame
+
+

# Pre-link the objects of libc_pic.a so that we can locally resolve
# COMMON symbols before we link against ld.so. This is because ld.so
# contains some of libc_pic.a already, which will prevent the COMMONs
diff --speed-large-files --minimal -Nru scratch/glibc-2.3.2/configure work/main.d/glibc-2.3.2/configure
--- scratch/glibc-2.3.2/configure        2003-02-26 04:20:48.000000000 -0500
+++ work/main.d/glibc-2.3.2/configure        2004-07-30 01:34:37.000000000 -0400
@@ -2271,10 +2271,7 @@
echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.[2-9]*)
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ *) ac_prog_version="$ac_prog_version, fine"; ac_verc_fail=no;;

esac
echo "$as_me:$LINENO: result: $ac_prog_version" >&5
diff --speed-large-files --minimal -Nru scratch/glibc-2.3.2/libio/swprintf.c work/main.d/glibc-2.3.2/libio/swprintf.c
--- scratch/glibc-2.3.2/libio/swprintf.c        2001-07-07 15:21:03.000000000 -0400
+++ work/main.d/glibc-2.3.2/libio/swprintf.c        2004-07-30 01:34:37.000000000 -0400
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,1995,1997,1998,1999,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1997,1998,1999,2000,2003
+        Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
@@ -22,10 +23,7 @@
/* Write formatted output into S, according to the format string FORMAT. */
/* VARARGS3 */
int
-swprintf (s, n, format)
- wchar_t *s;
- size_t n;
- const wchar_t *format;
+swprintf (wchar_t *s, size_t n, const wchar_t *format, ...)
{
va_list arg;
int done;
diff --speed-large-files --minimal -Nru scratch/glibc-2.3.2/libio/swscanf.c work/main.d/glibc-2.3.2/libio/swscanf.c
--- scratch/glibc-2.3.2/libio/swscanf.c        2001-07-07 15:21:03.000000000 -0400
+++ work/main.d/glibc-2.3.2/libio/swscanf.c        2004-07-30 01:34:37.000000000 -0400
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1998,1999,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
@@ -22,9 +22,7 @@
/* Read formatted input from S, according to the format string FORMAT. */
/* VARARGS2 */
int
-swscanf (s, format)
- const wchar_t *s;
- const wchar_t *format;
+swscanf (const wchar_t *s, const wchar_t *format, ...)
{
va_list arg;
int done;
diff --speed-large-files --minimal -Nru scratch/glibc-2.3.2/stdio-common/sscanf.c work/main.d/glibc-2.3.2/stdio-common/sscanf.c
--- scratch/glibc-2.3.2/stdio-common/sscanf.c        2002-08-10 14:09:08.000000000 -0400
+++ work/main.d/glibc-2.3.2/stdio-common/sscanf.c        2004-07-30 01:34:37.000000000 -0400
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,95,96,98,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1998,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.


/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */
struct ip_mreq
The GNU C Library is free software; you can redistribute it and/or
@@ -27,9 +27,7 @@
/* Read formatted input from S, according to the format string FORMAT. */
/* VARARGS2 */
int
-sscanf (s, format)
- const char *s;
- const char *format;
+sscanf (const char *s, const char *format, ...)
{
va_list arg;
int done;