Skip to content

Commit

Permalink
Fix setting PRI_OFF_T for 64bit Mac (#1256)
Browse files Browse the repository at this point in the history
_FILE_OFFSET_BITS is not set for Mac compiling with clang, but off_t is
defined as a int64 (long long) type requiring a "lld" printf format.
  • Loading branch information
nilason committed Feb 13, 2021
1 parent 1587392 commit d79d6ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/gis.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static const char *GRASS_copyright __attribute__ ((unused))
#define FALSE 0
#endif

#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
#if (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) || (__APPLE__ && __LP64__)
#define PRI_OFF_T "lld"
#else
#define PRI_OFF_T "ld"
Expand Down

0 comments on commit d79d6ff

Please sign in to comment.