summaryrefslogtreecommitdiff
blob: 23a12464b3483a63b7ec9a8c9608e469a97b6fa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
diff -urN octave-2.1.36/src/c-file-ptr-stream.h octave-2.1.36-modified/src/c-file-ptr-stream.h
--- octave-2.1.36/src/c-file-ptr-stream.h	Thu Nov  1 23:12:00 2001
+++ octave-2.1.36-modified/src/c-file-ptr-stream.h	Mon Jul 15 11:28:29 2002
@@ -31,13 +31,23 @@
 #include <fstream>
 #include <cstdio>
 
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+# include <ext/stdio_filebuf.h>
+#endif
+
 class
-c_file_ptr_buf : public std::filebuf
+#if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+  c_file_ptr_buf : public __gnu_cxx::stdio_filebuf<char>
+#else
+  c_file_ptr_buf : public std::filebuf
+#endif
 {
 public:
 
 #if !defined (CXX_ISO_COMPLIANT_LIBRARY)
   typedef int int_type;
+#else
+  typedef std::filebuf::int_type int_type;
 #endif
 
   typedef int (*close_fcn) (FILE *);
@@ -47,7 +57,11 @@
   c_file_ptr_buf (FILE *f_arg, close_fcn cf_arg = ::fclose)
     : 
 #if defined __GNUC__ && __GNUC__ >= 3
-    std::filebuf (f_arg, std::ios::in | std::ios::out),
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+  __gnu_cxx::stdio_filebuf<char> (f_arg, std::ios::in | std::ios::out),
+# else
+  std::filebuf (f_arg, std::ios::in | std::ios::out),
+#endif
 #else
     std::filebuf (f_arg ? fileno (f_arg) : -1),
 #endif