DLONG_PREFIX is %ld on x86_64 LP64

GCC14 loud default warnings fix
This commit is contained in:
Darryl L. Miles 2024-10-02 06:59:00 +01:00 committed by Tim Edwards
parent 32a7323287
commit 1ae4518846
1 changed files with 6 additions and 0 deletions

View File

@ -49,7 +49,13 @@ ERROR: Cannot compile without knowing the size of a pointer. See utils/magic.h
typedef int64_t dlong;
#define DLONG_MAX INT64_MAX
#define DLONG_MIN INT64_MIN
#if (defined(__x86_64__) && !defined(_WIN64))
/* gcc x86_64 defines int64_t as 'long int' on LP64 */
#define DLONG_PREFIX "l"
#else
/* for 32bit and 64bit LLP64 (_WIN64) systems */
#define DLONG_PREFIX "ll"
#endif
/* --------------------- Universal pointer type ----------------------- */