Mercurial > hg > octave-lyh
comparison src/c-file-ptr-stream.h @ 4073:38a22328f192
[project @ 2002-09-27 18:02:14 by jwe]
author | jwe |
---|---|
date | Fri, 27 Sep 2002 18:02:14 +0000 |
parents | 47d3baea432d |
children | 5719210fff4c |
comparison
equal
deleted
inserted
replaced
4072:3cc39e3b8fa5 | 4073:38a22328f192 |
---|---|
29 | 29 |
30 #include <iostream> | 30 #include <iostream> |
31 #include <fstream> | 31 #include <fstream> |
32 #include <cstdio> | 32 #include <cstdio> |
33 | 33 |
34 // | |
35 // The c_file_ptr_buf requires a std::filebuf that accepts an open | 34 // The c_file_ptr_buf requires a std::filebuf that accepts an open |
36 // file descriptor. This feature, while not part of the ISO C++ | 35 // file descriptor. This feature, while not part of the ISO C++ |
37 // standard, is supported by a variety of C++ compiler runtimes, | 36 // standard, is supported by a variety of C++ compiler runtimes, |
38 // albeit in slightly different ways. | 37 // albeit in slightly different ways. |
39 // | 38 // |
43 // GNU C++ runtime shipped with GCC 3.0.x supports a different non-standard | 42 // GNU C++ runtime shipped with GCC 3.0.x supports a different non-standard |
44 // filebuf constructor that takes a FILE* instead; starting from GCC 3.1, | 43 // filebuf constructor that takes a FILE* instead; starting from GCC 3.1, |
45 // the GNU C++ runtime removes all non-standard std::filebuf constructors | 44 // the GNU C++ runtime removes all non-standard std::filebuf constructors |
46 // and provides an extension template class __gnu_cxx::stdio_filebuf | 45 // and provides an extension template class __gnu_cxx::stdio_filebuf |
47 // that supports the the 3.0.x behavior. | 46 // that supports the the 3.0.x behavior. |
48 // | 47 |
49 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) | 48 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) && ! (defined (__APPLE__) && defined (__MACH__)) |
50 # include <ext/stdio_filebuf.h> | 49 # include <ext/stdio_filebuf.h> |
51 # define OCTAVE_STD_FILEBUF __gnu_cxx::stdio_filebuf<char> | 50 # define OCTAVE_STD_FILEBUF __gnu_cxx::stdio_filebuf<char> |
52 #else | 51 #else |
53 # define OCTAVE_STD_FILEBUF std::filebuf | 52 # define OCTAVE_STD_FILEBUF std::filebuf |
54 #endif | 53 #endif |