]> git.mxchange.org Git - simgear.git/blob - simgear/compatibility/streambuf
Safety updates
[simgear.git] / simgear / compatibility / streambuf
1
2 #ifndef __SG_STREAMBUF
3 #define __SG_STREAMBUF 1
4
5 # include <iostream>
6 # include <char_traits.h>
7
8 //
9 // Until we find a good way to rename the original streambuf class
10 // and derive our own streambuf class from that, define this variable
11 // for now so the code can inherit our streambuf class instead.
12 //
13 # define SG_NEED_STREAMBUF_HACK  1
14
15 class __streambuf : virtual public streambuf {
16 public:
17
18   typedef std::char_traits<char>            traits_type;
19   typedef std::char_traits<char>::int_type  int_type;
20
21   typedef streampos  pos_type;
22   typedef streamoff  off_type;
23 };
24
25
26 # if defined(sgi) && !defined(__GNUC__)
27
28 # define pubsync  sync
29
30   namespace std {
31     using ::streambuf;
32     using ::streampos;
33     using ::streamoff;
34   };
35 # endif
36
37 #endif // !__SG_STREAMBUF
38