| 123 | {} |
| 124 | protected: |
| 125 | int_type overflow (int_type c) override { |
| 126 | if (c == EOF) return EOF; |
| 127 | char buf = c; |
| 128 | if (write (fd, &buf, 1) != 1) { |
| 129 | return EOF; |
| 130 | } |
| 131 | return c; |
| 132 | } |
| 133 | std::streamsize xsputn (const char* s, std::streamsize count) override { |
| 134 | return write(fd, s, count); |
| 135 | } |