diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1995-12-21 11:01:53 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1995-12-21 11:01:53 +0000 |
commit | e8bd759fc7d3eb1b74d224c65d96ee33061be6f2 (patch) | |
tree | 2292e0c0305b32941b1bf95cde80ad0f0ba0b2ee | |
parent | 45b8cd0825f894eda5c4b56f17ad02972f7bf2ff (diff) |
Make libg++ compileable with recent GCC versions. This means:
recognize changed name mangling, correct ambiguous overload resolution
and adhere to new C++ scoping rules.
-rw-r--r-- | gnu/lib/libg++/iostream/stdstrbufs.C | 16 | ||||
-rw-r--r-- | gnu/lib/libg++/iostream/strstream.C | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/gnu/lib/libg++/iostream/stdstrbufs.C b/gnu/lib/libg++/iostream/stdstrbufs.C index 2ae80fa9c41..8888d22facf 100644 --- a/gnu/lib/libg++/iostream/stdstrbufs.C +++ b/gnu/lib/libg++/iostream/stdstrbufs.C @@ -53,10 +53,18 @@ #define vt_filebuf __vtbl__7filebuf extern char vt_filebuf[1]; #elif _G_DOLLAR_IN_LABEL +#if __GNUC_MINOR__ >= 5 // XXX I'm not sure it was introduced in 2.5 +extern char vt_filebuf[1] asm(UNDERSCORE "_vt$7filebuf"); +#else extern char vt_filebuf[1] asm(UNDERSCORE "_vt$filebuf"); +#endif +#else +#if __GNUC_MINOR__ >= 5 // XXX I'm not sure it was introduced in 2.5 +extern char vt_filebuf[1] asm(UNDERSCORE "_vt.7filebuf"); #else extern char vt_filebuf[1] asm(UNDERSCORE "_vt.filebuf"); #endif +#endif #endif /* !defined(vt_filebuf) */ struct _fake_filebuf { @@ -85,10 +93,18 @@ DEF_FILEBUF(__std_filebuf_2, 2, (streambuf*)&__std_filebuf_1, #define vt_stdiobuf __vtbl__8stdiobuf extern char vt_stdiobuf[1]; #elif _G_DOLLAR_IN_LABEL +#if __GNUC_MINOR__ >= 5 // XXX I'm not sure it was introduced in 2.5 +extern char vt_stdiobuf[1] asm(UNDERSCORE "_vt$8stdiobuf"); +#else extern char vt_stdiobuf[1] asm(UNDERSCORE "_vt$stdiobuf"); +#endif +#else +#if __GNUC_MINOR__ >= 5 // XXX I'm not sure it was introduced in 2.5 +extern char vt_stdiobuf[1] asm(UNDERSCORE "_vt.8stdiobuf"); #else extern char vt_stdiobuf[1] asm(UNDERSCORE "_vt.stdiobuf"); #endif +#endif #endif /* !defined(vt_stdiobuf) */ struct _fake_stdiobuf { diff --git a/gnu/lib/libg++/iostream/strstream.C b/gnu/lib/libg++/iostream/strstream.C index d5a57137d52..d460930bfac 100644 --- a/gnu/lib/libg++/iostream/strstream.C +++ b/gnu/lib/libg++/iostream/strstream.C @@ -144,7 +144,8 @@ void strstreambuf::init_static(char *ptr, int size, char *pstart) // This can lose in pathological cases (ptr near the end // of the address space). A better solution might be to // adjust the size on underflow/overflow. FIXME. - for (int s; s = 2*size, s > 0 && ptr + s > ptr && s < 0x4000000L; ) + int s; + for (; s = 2*size, s > 0 && ptr + s > ptr && s < 0x4000000L; ) size = s; size = s; #else |