This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
libstdc++-v3 PATCH for bootstrap error related to ptrdiff_t (fwd)
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: libstdc++-v3 PATCH for bootstrap error related to ptrdiff_t (fwd)
- From: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Date: Thu, 16 Nov 2000 17:05:22 +0100 (CET)
Mistyped the address. When replying, please Cc: the full list below; I
didn't want to resend to everyone...
---------- Forwarded message ----------
From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
To: Mark Mitchell <mark@codesourcery.com>
Cc: gcc-patch@gcc.gnu.org, libstdc++@sources.redhat.com,
David O'Brien <obrien@nuxi.com>,
Loren James Rittle <rittle@latour.rsch.comm.mot.com>
Date: Thu, 16 Nov 2000 17:03:06 +0100 (CET)
Subject: libstdc++-v3 PATCH for bootstrap error related to ptrdiff_t
I'm afraid your patch
2000-11-16 Mark Mitchell <mark@codesourcery.com>
* config/c_io_stdio.h (streamsize): Make it a typedef for
ptrdiff_t.
(wstreamsize): Likewise.
breaks bootstrap on i386-unknown-freebsd4.1 with --enable-cstdio=stdio and
also sparc-sun-solaris2.8 seems to be affected, as ptrdiff_t is defined in
stdlib.h resp. cstddef (according to ISO C++) which we don't include.
How about the following patch? I have not been able to do a full bootstrap
due to other problems, but it definitely solves the problem at hand.
Gerald
2000-11-16 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* config/c_io_stdio.h: Include cstddef.
Index: config/c_io_stdio.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/c_io_stdio.h,v
retrieving revision 1.4
diff -u -3 -p -r1.4 c_io_stdio.h
--- c_io_stdio.h 2000/11/16 09:26:14 1.4
+++ c_io_stdio.h 2000/11/16 16:02:08
@@ -33,6 +33,7 @@
#define _CPP_IO_STDIO_H 1
#include <stdio.h>
+#include <cstddef>
#include <bits/c++threads.h>
#if _GLIBCPP_USE_WCHAR_T