⛏️ index : buildtools.git

author Oliver Tappe <zooey@hirschkaefer.de> 2004-11-07 19:16:03.0 +00:00:00
committer Oliver Tappe <zooey@hirschkaefer.de> 2004-11-07 19:16:03.0 +00:00:00
commit
b16647ffb41897e5316399e83a425c472ea79d8a [patch]
tree
2718e08628fa9a958ec02a39c731fd9b965e9f8a
parent
1fd444a297fd9b6f647db6f0338afec774859c06
download
b16647ffb41897e5316399e83a425c472ea79d8a.tar.gz

- fixed problem with bdb-compatibility when compiling libstdc++ without inlining (compatibility functions were missing from libstdc++.r4.so in that case).

git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9835 a95241bf-73f2-0310-859d-f6bbb57e9c96

Diff

 gcc/libio/iostream.cc | 36 ++++++++++++++++++++++++++++++++++++
 gcc/libio/iostream.h  | 30 +++++++++++++++++-------------
 2 files changed, 48 insertions(+), 18 deletions(-)

diff --git a/gcc/libio/iostream.cc b/gcc/libio/iostream.cc
index cf6445e..0afc856 100644
--- a/gcc/libio/iostream.cc
+++ b/gcc/libio/iostream.cc
@@ -102,6 +102,24 @@
  return ch;
}

// [zooey]: added for R5-compatibility with bdb
istream& istream::read(char *ptr, int n)
{
  return read((char*)ptr, (streamsize)n);
}
istream& istream::read(unsigned char *ptr, int n)
{
  return read((char*)ptr, (streamsize)n);
}
istream& istream::read(signed char *ptr, int n)
{
  return read((char*)ptr, (streamsize)n);
}
istream& istream::read(void *ptr, int n)
{
  return read((char*)ptr, (streamsize)n);
}

istream& istream::ignore(int n /* = 1 */, int delim /* = EOF */)
{
    _gcount = 0;
@@ -1020,6 +1038,24 @@
	_IO_cleanup_region_end (0);
    }
    return *this;
}

// [zooey]: added for R5-compatibility
ostream& ostream::write(const char *s, int n)
{
  return write((const char*)s, (streamsize)n);
}
ostream& ostream::write(const unsigned char *s, int n)
{
  return write((const char*)s, (streamsize)n);
}
ostream& ostream::write(const signed char *s, int n)
{
  return write((const char*)s, (streamsize)n);
}
ostream& ostream::write(const void *s, int n)
{ 
  return write((const char*)s, (streamsize)n);
}

void ostream::do_osfx()
diff --git a/gcc/libio/iostream.h b/gcc/libio/iostream.h
index 73cf442..22b9d69 100644
--- a/gcc/libio/iostream.h
+++ b/gcc/libio/iostream.h
@@ -69,15 +69,12 @@
    ostream& write(const void *s, streamsize n)
      { return write((const char*)s, n);}
#ifdef _STREAM_COMPAT
    // [zooey]: added for R5-compatibility
    ostream& write(const char *s, int n)
      { return write((const char*)s, (streamsize)n);}
    ostream& write(const unsigned char *s, int n)
      { return write((const char*)s, (streamsize)n);}
    ostream& write(const signed char *s, int n)
      { return write((const char*)s, (streamsize)n);}
    ostream& write(const void *s, int n)
      { return write((const char*)s, (streamsize)n);}
    // [zooey]: added for R5-compatibility with bdb,
    // these can't be inlined as they wouldn't end up in the lib then.
    ostream& write(const char *s, int n);
    ostream& write(const unsigned char *s, int n);
    ostream& write(const signed char *s, int n);
    ostream& write(const void *s, int n);
#endif
    ostream& seekp(streampos);
    ostream& seekp(streamoff, _seek_dir);
@@ -153,15 +150,12 @@
    istream& read(void *ptr, streamsize n)
      { return read((char*)ptr, n); }
#ifdef _STREAM_COMPAT
    // [zooey]: added for R5-compatibility
    istream& read(char *ptr, int n)
      { return read((char*)ptr, (streamsize)n); }
    istream& read(unsigned char *ptr, int n)
      { return read((char*)ptr, (streamsize)n); }
    istream& read(signed char *ptr, int n)
      { return read((char*)ptr, (streamsize)n); }
    istream& read(void *ptr, int n)
      { return read((char*)ptr, (streamsize)n); }
    // [zooey]: added for R5-compatibility with bdb,
    // these can't be inlined as they wouldn't end up in the lib then.
    istream& read(char *ptr, int n);
    istream& read(unsigned char *ptr, int n);
    istream& read(signed char *ptr, int n);
    istream& read(void *ptr, int n);
#endif
    istream& get(streambuf& sb, char delim = '\n');
    istream& gets(char **s, char delim = '\n');