[hatari-devel] Issues with CMake/CMakeLists.txt
Thomas Huth
huth at users.berlios.de
Tue Mar 23 00:14:16 CET 2010
On Tue, 23 Mar 2010 01:04:10 +0200
Eero Tamminen <eerot at users.berlios.de> wrote:
> > it defines _FILE_OFFSET_BITS=64 which should be sufficient to get
> > the prototypes and #defines from zlib.h, right?
>
> Incorrect.
>
> That gets only these:
> #if _FILE_OFFSET_BITS == 64
> # define gzopen gzopen64
> # define gzseek gzseek64
> # define gztell gztell64
> # define adler32_combine adler32_combine64
> # define crc32_combine crc32_combine64
> #else
>
> Not these:
> #ifdef _LARGEFILE64_SOURCE
> ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
> ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int));
> ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile));
> ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong,
> off64_t)); ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong,
> off64_t)); #endif
>
> Compiler was complaining about missing gz*64() function declarations.
Well, it works for me because my zlib.h (version 1.2.3.3, October 2nd,
2006) looks like this here:
#if defined(_LARGEFILE64_SOURCE) || _FILE_OFFSET_BITS == 64
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
#endif
Which IMHO makes also more sense. Why shouldn't the prototypes be
declared when the #defines remap the functions to the 64-bit versions?
Thomas
More information about the hatari-devel
mailing list