diff options
author | kan <kan@FreeBSD.org> | 2003-02-10 05:47:54 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-02-10 05:47:54 +0000 |
commit | 78fa66448c770aa99b6f69113061eb5d77581627 (patch) | |
tree | 548333fba089bbaa9f6f60f38860213a7f7ccf69 /contrib/libstdc++/src/ios.cc | |
parent | 793833d7a78bb624965885760593495e7079d705 (diff) | |
download | FreeBSD-src-78fa66448c770aa99b6f69113061eb5d77581627.zip FreeBSD-src-78fa66448c770aa99b6f69113061eb5d77581627.tar.gz |
Gcc 3.2.2-release C++ support bits.
Diffstat (limited to 'contrib/libstdc++/src/ios.cc')
-rw-r--r-- | contrib/libstdc++/src/ios.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/libstdc++/src/ios.cc b/contrib/libstdc++/src/ios.cc index 7bfdc5b..9f4c718 100644 --- a/contrib/libstdc++/src/ios.cc +++ b/contrib/libstdc++/src/ios.cc @@ -38,6 +38,9 @@ #include <fstream> #include <bits/atomicity.h> #include <ext/stdio_filebuf.h> +#ifdef _GLIBCPP_HAVE_UNISTD_H +#include <unistd.h> +#endif namespace __gnu_cxx { @@ -157,7 +160,11 @@ namespace std ios_base::Init::_S_ios_create(bool __sync) { int __out_size = __sync ? 0 : static_cast<int>(BUFSIZ); - int __in_size = __sync ? 1 : static_cast<int>(BUFSIZ); +#ifdef _GLIBCPP_HAVE_ISATTY + int __in_size = (__sync || isatty (0)) ? 1 : static_cast<int>(BUFSIZ); +#else + int __in_size = 1; +#endif // NB: The file globals.cc creates the four standard files // with NULL buffers. At this point, we swap out the dummy NULL |