diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2012-08-28 17:42:54 +0000 | 
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2012-08-28 17:42:54 +0000 | 
| commit | 411cdf39fc2b961a970a0ae91b9059614251247e (patch) | |
| tree | 935afa56c11aef0fb769e63659970e7d033a99e8 /src/unstable/myriadfs.cpp | |
| parent | fc5132d68ae9e6afdbd0b5a687ba81c88fc84826 (diff) | |
| download | libbu++-411cdf39fc2b961a970a0ae91b9059614251247e.tar.gz libbu++-411cdf39fc2b961a970a0ae91b9059614251247e.tar.bz2 libbu++-411cdf39fc2b961a970a0ae91b9059614251247e.tar.xz libbu++-411cdf39fc2b961a970a0ae91b9059614251247e.zip  | |
Loads of win32 compilation issues fixed.  Most are fairly minor unsigned/signed
mismatches because of socket handles, but there were also some
order-of-definition issues that were fixed in the FD_SETSIZE definition code.
Fixed a few things that just never worked on windows, like Bu::Thread::yield().
Diffstat (limited to 'src/unstable/myriadfs.cpp')
| -rw-r--r-- | src/unstable/myriadfs.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/src/unstable/myriadfs.cpp b/src/unstable/myriadfs.cpp index 32e1ad6..6ed176d 100644 --- a/src/unstable/myriadfs.cpp +++ b/src/unstable/myriadfs.cpp  | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | * terms of the license contained in the file LICENSE. | 5 | * terms of the license contained in the file LICENSE. | 
| 6 | */ | 6 | */ | 
| 7 | 7 | ||
| 8 | #include "bu/config.h" | ||
| 8 | #include "bu/myriadfs.h" | 9 | #include "bu/myriadfs.h" | 
| 9 | #include "bu/myriadstream.h" | 10 | #include "bu/myriadstream.h" | 
| 10 | 11 | ||
| @@ -434,7 +435,7 @@ int32_t Bu::MyriadFs::lookupInode( Bu::String::const_iterator iStart, | |||
| 434 | void Bu::MyriadFs::readInode( int32_t iNode, RawStat &rs, MyriadStream &rIs ) | 435 | void Bu::MyriadFs::readInode( int32_t iNode, RawStat &rs, MyriadStream &rIs ) | 
| 435 | { | 436 | { | 
| 436 | rIs.setPos( hNodeIndex.get( iNode )*sizeof(RawStat) ); | 437 | rIs.setPos( hNodeIndex.get( iNode )*sizeof(RawStat) ); | 
| 437 | if( rIs.read( &rs, sizeof(RawStat) ) < sizeof(RawStat) ) | 438 | if( rIs.read( &rs, sizeof(RawStat) ) < (int)sizeof(RawStat) ) | 
| 438 | throw Bu::MyriadFsException("Filesystem corruption detected."); | 439 | throw Bu::MyriadFsException("Filesystem corruption detected."); | 
| 439 | if( rs.iNode != iNode ) | 440 | if( rs.iNode != iNode ) | 
| 440 | throw Bu::MyriadFsException("Filesystem corruption detected."); | 441 | throw Bu::MyriadFsException("Filesystem corruption detected."); | 
| @@ -451,7 +452,7 @@ void Bu::MyriadFs::writeInode( const RawStat &rs, | |||
| 451 | { | 452 | { | 
| 452 | rOs.setSize( hNodeIndex.getSize()*sizeof(RawStat) ); | 453 | rOs.setSize( hNodeIndex.getSize()*sizeof(RawStat) ); | 
| 453 | rOs.setPos( hNodeIndex.get( rs.iNode )*sizeof(RawStat) ); | 454 | rOs.setPos( hNodeIndex.get( rs.iNode )*sizeof(RawStat) ); | 
| 454 | if( rOs.write( &rs, sizeof(RawStat) ) < sizeof(RawStat) ) | 455 | if( rOs.write( &rs, sizeof(RawStat) ) < (int)sizeof(RawStat) ) | 
| 455 | throw Bu::MyriadFsException("Error writing inode to header stream."); | 456 | throw Bu::MyriadFsException("Error writing inode to header stream."); | 
| 456 | } | 457 | } | 
| 457 | 458 | ||
