diff options
Diffstat (limited to 'app-sci/octave/files/filebuf.diff')
-rw-r--r-- | app-sci/octave/files/filebuf.diff | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/app-sci/octave/files/filebuf.diff b/app-sci/octave/files/filebuf.diff new file mode 100644 index 000000000000..23a12464b348 --- /dev/null +++ b/app-sci/octave/files/filebuf.diff @@ -0,0 +1,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 |