[RFA:] Take 2 to get libstdc++-v3 to bootstrap-land for glibc 2.0and libc1.
Hans-Peter Nilsson
hp@bitrange.com
Wed Nov 22 16:33:00 GMT 2000
On Tue, 21 Nov 2000, Benjamin Kosnik wrote:
> Please enclose a unified ChangeLog, in the canonical GNU style as part of
> you patch.
This should address your concerns and implements your suggestion to force
an empty __THROW for those systems and does not intrude needlessly in
libio.h. I don't know how to address Drepper's concern that (IIUC)
including this version of libio.h is unsafe except when running glibc
version 2.2. In any case libstdc++-v3 needs to work for earlier versions
too.
I assume that by "unified ChangeLog" you mean one in libstdc++-v3 for both
patches, instead of a separate entry for libio/ChangeLog.
This was bootstrapped on i686-pc-linux-gnulibc1, where bash 2.0 isn't
installed so I only tested with check-gcc and check-g++, and bootstrapped
and tested on i586-pc-linux-gnu with glibc 2.1 and on i686-pc-linux-gnu
with glibc 2.0.
Ok to commit?
2000-11-23 Hans-Peter Nilsson <hp@bitrange.com>
* config/os/gnu-linux/bits/os_defines.h: Include <features.h>.
If not glibc 2.1 or higher, include <gnu/types.h> and define
__off64_t as __loff_t and #define __THROW as empty.
* libio/libio.h [__P]: Move __THROW and __PMT into their own
ifndef:s.
Index: config/os/gnu-linux/bits/os_defines.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/gnu-linux/bits/os_defines.h,v
retrieving revision 1.4
diff -p -c -r1.4 os_defines.h
*** os_defines.h 2000/10/31 01:26:05 1.4
--- os_defines.h 2000/11/23 00:11:33
***************
*** 40,45 ****
--- 40,64 ----
// This keeps isanum, et al from being propagated as macros.
#define __NO_CTYPE 1
+ #include <features.h>
+
+ #if !defined (__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__+0 == 0)
+
+ // The types __off_t and __off64_t are not defined through <sys/types.h>
+ // as _G_config assumes. For libc5 and glibc 2.0 instead use
+ // <gnu/types.h> and the old name for __off64_t.
+ #include <gnu/types.h>
+ typedef __loff_t __off64_t;
+
+ // These systems have declarations mismatching those in libio.h by
+ // omitting throw qualifiers. Cleanest way out is to not provide
+ // throw-qualifiers at all. Defining it as empty here will make libio.h
+ // not define it.
+ #undef __THROW
+ #define __THROW
+
+ #endif /* not glibc 2.1 or higher. */
+
# if defined __GLIBC__ && __GLIBC__ >= 2
// We must not see the optimized string functions GNU libc defines.
# define __NO_STRING_INLINES
Index: libio/libio.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libio/libio.h,v
retrieving revision 1.11
diff -p -c -r1.11 libio.h
*** libio.h 2000/10/29 21:52:54 1.11
--- libio.h 2000/11/23 00:11:45
***************
*** 55,69 ****
# endif /* __GNUC_VA_LIST */
#endif
! #ifndef __P
# ifdef __cplusplus
# define __THROW throw ()
# else
# define __THROW
# endif
# define __P(p) p __THROW
# define __PMT(p) p
! #endif /*!__P*/
/* For backward compatibility */
#ifndef _PARAMS
--- 55,75 ----
# endif /* __GNUC_VA_LIST */
#endif
! #ifndef __THROW
# ifdef __cplusplus
# define __THROW throw ()
# else
# define __THROW
# endif
+ #endif /* not __THROW */
+
+ #ifndef __P
# define __P(p) p __THROW
+ #endif /* not __P */
+
+ #ifndef __PMT
# define __PMT(p) p
! #endif /* not __PMT */
/* For backward compatibility */
#ifndef _PARAMS
brgds, H-P
More information about the Gcc-patches
mailing list