libstdc++-v3 PATCH for bootstrap error related to ptrdiff_t

Gerald Pfeifer
Thu Nov 16 08:03:00 GMT 2000

I'm afraid your patch

  2000-11-16  Mark Mitchell  <>

        * config/c_io_stdio.h (streamsize): Make it a typedef for
        (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.


2000-11-16  Gerald Pfeifer  <>

	* 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>


More information about the Libstdc++ mailing list