Skip to content

Commit

Permalink
Trying to enable large files on MacOS and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoLevy committed Feb 9, 2025
1 parent 0082e87 commit 3e32b5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/geogram/basic/geofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ namespace {
/** \brief Maximum length of a gzlib gzread() or gzwrite() */
static constexpr GEO::Numeric::uint32 MAX_GZ_IO_SIZE = 1024*1024*1024;

#ifdef GEO_OS_LINUX
#ifdef Z_LARGE64

/**
* \brief Wrapper around gzread() to read more than 4Gb
Expand Down
8 changes: 8 additions & 0 deletions src/lib/geogram/third_party/zlib/zconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
#ifndef ZCONF_H
#define ZCONF_H

/* [Bruno] enable 64 bits IO on MacOS and Windows */
#if defined(__APPLE__) || defined(_WIN32) || defined(_WIN64)
#define _LARGEFILE64_SOURCE
#define _LFS64_LARGEFILE
#define _FILE_OFFSET_BITS 64
#endif


/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
Expand Down

0 comments on commit 3e32b5e

Please sign in to comment.