Compare commits

...

1 Commits

Author SHA1 Message Date
Xavier Roche
5f7f4deb63 Gate INTsys on HTS_LFS, not the never-defined LFS_FLAG
LFS_FLAG is an AC_SUBST make variable holding the -D large-file flags; it is
never itself a preprocessor macro, so "#ifdef LFS_FLAG" was always false and
INTsys stayed int on POSIX. HTS_LFS is the AC_DEFINE that config.h carries,
and htsglobal.h already includes config.h before this point.

No live bug either way: every INTsys use site holds a bounded length (cache
strings, a recv length), never a file offset. INTsys appears in no struct
field or function signature, so nothing in the ABI moves, and INTsysP tracks
the typedef so the cache text stays identical decimal digits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
2026-07-16 10:18:21 +02:00

View File

@@ -323,11 +323,9 @@ typedef int64_t TStamp;
#define LLintP "%" PRId64
/* Integer type for file offsets/sizes passed to the C library; INTsysP is its
printf conversion. FIXME: LFS_FLAG is a configure make variable, never a C
macro, so this test is dead and INTsys stays int on POSIX despite large-file
support (the real macro is HTS_LFS). Widening it there is an installed-header
type change, so it is left alone here. */
#if defined(LFS_FLAG) || defined(_MSC_VER)
printf conversion. HTS_LFS is the large-file macro: LFS_FLAG is a configure
make variable carrying the -D flags, never itself defined. */
#if defined(HTS_LFS) || defined(_MSC_VER)
typedef LLint INTsys;
#define INTsysP LLintP