* Turns out that the "upper" half of the old (gcc2) libio - the C++ classes -
keeps its own idea about what a wchar_t is and that was still a short. This of course made the data structure of a streambuf incompatible with the "lower" half - the glibc part - causing (potentially all sorts of) crashes when these classes were used. This should fix the crash of gensyscalls when building haiku natively on a gcc2-haiku. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31462 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -58,7 +58,7 @@ extern "C" {
|
|||||||
#if _G_IO_IO_FILE_VERSION == 0x20001
|
#if _G_IO_IO_FILE_VERSION == 0x20001
|
||||||
#define _IO_wchar_t _G_wchar_t
|
#define _IO_wchar_t _G_wchar_t
|
||||||
#else
|
#else
|
||||||
#define _IO_wchar_t short
|
#define _IO_wchar_t wchar_t
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -320,7 +320,7 @@ struct streambuf : public _IO_FILE { // protected??
|
|||||||
void setp(char* p, char* ep)
|
void setp(char* p, char* ep)
|
||||||
{ _IO_write_base=_IO_write_ptr=p; _IO_write_end=ep; }
|
{ _IO_write_base=_IO_write_ptr=p; _IO_write_end=ep; }
|
||||||
void setg(char* eb, char* g, char *eg) {
|
void setg(char* eb, char* g, char *eg) {
|
||||||
if (_IO_file_flags & _IO_IN_BACKUP) _IO_free_backup_area(this);
|
if (_IO_file_flags & _IO_IN_BACKUP) _IO_free_backup_area(this);
|
||||||
_IO_read_base = eb; _IO_read_ptr = g; _IO_read_end = eg; }
|
_IO_read_base = eb; _IO_read_ptr = g; _IO_read_end = eg; }
|
||||||
char *shortbuf() { return _shortbuf; }
|
char *shortbuf() { return _shortbuf; }
|
||||||
|
|
||||||
@@ -342,7 +342,7 @@ struct streambuf : public _IO_FILE { // protected??
|
|||||||
void unsave_markers(); // Make all streammarkers !saving().
|
void unsave_markers(); // Make all streammarkers !saving().
|
||||||
int put_mode() { return _flags & _IO_CURRENTLY_PUTTING; }
|
int put_mode() { return _flags & _IO_CURRENTLY_PUTTING; }
|
||||||
int switch_to_get_mode();
|
int switch_to_get_mode();
|
||||||
|
|
||||||
streambuf(int flags=0);
|
streambuf(int flags=0);
|
||||||
public:
|
public:
|
||||||
static int flush_all();
|
static int flush_all();
|
||||||
|
|||||||
Reference in New Issue
Block a user