30 #include <sys/types.h>
37 namespace gzstream_detail
80 if ( mode_r == std::ios_base::in )
82 _fd = ::open( name_r, O_RDONLY | O_CLOEXEC );
85 else if ( mode_r == std::ios_base::out )
87 _fd = ::open( name_r, O_WRONLY|O_CREAT|O_CLOEXEC, 0666 );
118 int r = gzclose(
_file );
130 _mode = std::ios_base::openmode(0);
145 int read = gzread(
_file, buffer_r, maxcount_r );
162 if ( (written = gzwrite(
_file, buffer_r, count_r )) == 0 )
165 return( written == count_r );
176 z_off_t ret = gzseek(
_file, off_r, way_r );
190 z_off_t ret = gztell(
_file );
199 off_t pos = lseek (
_fd, 0, SEEK_CUR);