Skip to content

Commit

Permalink
Fix #50 off64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Romain committed Mar 2, 2021
1 parent 36972ad commit fea7e62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Fix: build failure with GCC 4.x
- Fix: gcc-asan signed integer overflow.
- Fix: when reading an non supported extra bytes attribute rlas used to print a warning message. It now throws a real warning.
- Fix: querying ROI using LAX files in LAS file > 2GB on Windows (see [#50](https://github.com/Jean-Romain/rlas/issues/50))
- Change: use `tinytest` instead of `testthat`
- New: `read.lasheader()` now reads the extended variable length record (EVLR)
- New: `write.las()` now writes all GeoKeyDirectoryTag + GeoAsciiParamsTag + GeoDoubleParamsTag
Expand Down
14 changes: 7 additions & 7 deletions inst/include/bytestreamin_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
===============================================================================
FILE: bytestreamin_file.hpp
CONTENTS:
Class for FILE*-based input streams with endian handling.
PROGRAMMERS:
Expand All @@ -21,13 +21,13 @@
This software is distributed WITHOUT ANY WARRANTY and without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CHANGE HISTORY:
1 October 2011 -- added 64 bit file support in MSVC 6.0 at McCafe at Hbf Linz
10 January 2011 -- licensing change for LGPL release and liblas integration
12 December 2010 -- created from ByteStreamOutFile after Howard got pushy (-;
===============================================================================
*/
#ifndef BYTE_STREAM_IN_FILE_H
Expand Down Expand Up @@ -150,7 +150,7 @@ inline BOOL ByteStreamInFile::seek(const I64 position)
#if defined _WIN32 && ! defined (__MINGW32__)
return !(_fseeki64(file, position, SEEK_SET));
#elif defined (__MINGW32__)
return !(fseeko64(file, (off_t)position, SEEK_SET));
return !(fseeko64(file, (off64_t)position, SEEK_SET));
#else
return !(fseeko(file, (off_t)position, SEEK_SET));
#endif
Expand All @@ -163,7 +163,7 @@ inline BOOL ByteStreamInFile::seekEnd(const I64 distance)
#if defined _WIN32 && ! defined (__MINGW32__)
return !(_fseeki64(file, -distance, SEEK_END));
#elif defined (__MINGW32__)
return !(fseeko64(file, (off_t)-distance, SEEK_END));
return !(fseeko64(file, (off64_t)-distance, SEEK_END));
#else
return !(fseeko(file, (off_t)-distance, SEEK_END));
#endif
Expand Down
2 changes: 1 addition & 1 deletion laslib2R.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ perl -pi -w -e 's/exit\(1\)/throw std::runtime_error\("Internal error"\)/g;' $fi
# level_offset[l+1] = level_offset[l] + ((1<<l)*(1<<l));
# else
# level_offset[l+1] = level_offset[l];

# bytestreamin_file.hpp l153,166 off_t -> off64_t (see #50)
# CRAN is happy now!

# In addition:
Expand Down

0 comments on commit fea7e62

Please sign in to comment.