aboutsummaryrefslogtreecommitdiff
path: root/src/stable/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stable/file.cpp')
-rw-r--r--src/stable/file.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/stable/file.cpp b/src/stable/file.cpp
index 33420f1..14e4f3c 100644
--- a/src/stable/file.cpp
+++ b/src/stable/file.cpp
@@ -91,7 +91,11 @@ Bu::size Bu::File::tell()
91 if( fd < 0 ) 91 if( fd < 0 )
92 throw FileException("File not open."); 92 throw FileException("File not open.");
93 93
94#ifdef USE_64BIT_IO
95 return lseek64( fd, 0, SEEK_CUR );
96#else
94 return lseek( fd, 0, SEEK_CUR ); 97 return lseek( fd, 0, SEEK_CUR );
98#endif
95} 99}
96 100
97void Bu::File::seek( Bu::size offset ) 101void Bu::File::seek( Bu::size offset )
@@ -99,7 +103,11 @@ void Bu::File::seek( Bu::size offset )
99 if( fd < 0 ) 103 if( fd < 0 )
100 throw FileException("File not open."); 104 throw FileException("File not open.");
101 105
106#ifdef USE_64BIT_IO
107 lseek64( fd, offset, SEEK_CUR );
108#else
102 lseek( fd, offset, SEEK_CUR ); 109 lseek( fd, offset, SEEK_CUR );
110#endif
103 bEos = false; 111 bEos = false;
104} 112}
105 113
@@ -108,7 +116,11 @@ void Bu::File::setPos( Bu::size pos )
108 if( fd < 0 ) 116 if( fd < 0 )
109 throw FileException("File not open."); 117 throw FileException("File not open.");
110 118
119#ifdef USE_64BIT_IO
120 lseek64( fd, pos, SEEK_SET );
121#else
111 lseek( fd, pos, SEEK_SET ); 122 lseek( fd, pos, SEEK_SET );
123#endif
112 bEos = false; 124 bEos = false;
113} 125}
114 126
@@ -117,7 +129,7 @@ void Bu::File::setPosEnd( Bu::size pos )
117 if( fd < 0 ) 129 if( fd < 0 )
118 throw FileException("File not open."); 130 throw FileException("File not open.");
119 131
120 lseek( fd, pos, SEEK_END ); 132 lseek64( fd, pos, SEEK_END );
121 bEos = false; 133 bEos = false;
122} 134}
123 135