diff options
-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 |