Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
macOS has recently deprecated the use of the
stat64
structure defined insys/stat.h
. Thus, this pull request introduces a configure-time check for whetherstat64
is present in both CMake and Autotools, that is used to pick whether to usestat64
orstat
. On macOS, thestat
structure may now refer to the 32 or 64 bit version of the structure. On most systems it should be 64 bit version by default but I added an ifdef insilo.c
for macOS that requests to use its larger counterpart:CMakeLists.txt:
configure.ac
silo.c:
Uses of the
stat
structure now look like:The
|| !defined(HAVE_STAT)
section of ifdef handles the case where the build system being used hasn't generated anyHAVE_STAT64
orHAVE_STAT
preprocessor definitions. It is mostly there as a safety net.I installed
autoconf
,automake
,autoconf-archive
, andlibtool
on Arch Linux to regenerate the configure scripts, but had to temporally create theSiloWindows
folder and manually patch one line of the generated./configure
script, adding;;
in a case switch statement forgnu)
. This seems to be the result of a minor bug withAX_CC_MAXOPT
, however, my experience with autotools is limited. I confirmed the code configures and compiles on macOS and on my Linux system.