diff --git a/alib2std/src/extensions/fdstream.cpp b/alib2std/src/extensions/fdstream.cpp index ed7b0f16cc3cc7dd0b6003f6e729d3202f10300c..8a5abe163784080526e4367cfd449ea91432af9a 100644 --- a/alib2std/src/extensions/fdstream.cpp +++ b/alib2std/src/extensions/fdstream.cpp @@ -83,7 +83,7 @@ fdaccessor::fdaccessor ( int new_fd, int fallback_fd ) { fd = fallback_fd; redirected = false; } else { - fd = -1; + fd = FAIL_FD; redirected = false; } } @@ -99,7 +99,7 @@ bool fdaccessor::is_redirected ( ) const { ofdstream::ofdstream ( int fd, int fallback_fd ) : fda ( fd, fallback_fd ), fdbuf ( fda.get_fd ( ) ) { this->init ( & fdbuf ); - if ( fda.get_fd ( ) == -1 ) + if ( fda.get_fd ( ) == FAIL_FD ) setstate ( ios_base::failbit ); } @@ -113,7 +113,7 @@ bool ofdstream::is_redirected ( ) const { ifdstream::ifdstream ( int fd, int fallback_fd ) : fda ( fd, fallback_fd ), fdbuf ( fda.get_fd ( ) ) { this->init ( & fdbuf ); - if ( fda.get_fd ( ) == -1 ) + if ( fda.get_fd ( ) == FAIL_FD ) setstate ( ios_base::failbit ); }