summaryrefslogtreecommitdiff
path: root/src/file.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-09-24 00:19:12 +0000
committerMike Buland <eichlan@xagasoft.com>2008-09-24 00:19:12 +0000
commit17df4c2b9616c29865b0d893cc797d4938a660a2 (patch)
treed31d62c5694279747909bbab2b8be93f01a7fb7b /src/file.cpp
parent5230927c4f087cf2dcaac4fb9ed133c1ff3e2269 (diff)
downloadlibbu++-17df4c2b9616c29865b0d893cc797d4938a660a2.tar.gz
libbu++-17df4c2b9616c29865b0d893cc797d4938a660a2.tar.bz2
libbu++-17df4c2b9616c29865b0d893cc797d4938a660a2.tar.xz
libbu++-17df4c2b9616c29865b0d893cc797d4938a660a2.zip
Wholly crap. Added the Fifo, fixed a bunch of bugs, made things more standard,
now I have a huge list of new functions to add. Also, we discovered that if we add -W it produces more warnings, warnings about things that we'd like to know about. I have a lot of work to go fixing that...
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 3896005..83d76c5 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -10,6 +10,7 @@
10#include <errno.h> 10#include <errno.h>
11#include <sys/types.h> 11#include <sys/types.h>
12#include <sys/stat.h> 12#include <sys/stat.h>
13#include <fcntl.h>
13 14
14Bu::File::File( const char *sName, const char *sFlags ) 15Bu::File::File( const char *sName, const char *sFlags )
15{ 16{
@@ -138,7 +139,16 @@ bool Bu::File::isBlocking()
138 139
139void Bu::File::setBlocking( bool bBlocking ) 140void Bu::File::setBlocking( bool bBlocking )
140{ 141{
141 return; 142 if( bBlocking )
143 fcntl(
144 fileno( fh ),
145 F_SETFL, fcntl( fileno( fh ), F_GETFL, 0 )&(~O_NONBLOCK)
146 );
147 else
148 fcntl(
149 fileno( fh ),
150 F_SETFL, fcntl( fileno( fh ), F_GETFL, 0 )|O_NONBLOCK
151 );
142} 152}
143 153
144#ifndef WIN32 154#ifndef WIN32