SunOS: FOPEN rename to magicFOPEN due to sys/file.h definition
Example build issue using SunOS Solaris solaris 5.11 11.4.42.111.0 i86pc i386
with gcc version 5.5.0 (GCC).
It turns out the definition is not used by the magic codebase. So only the
macro name is changed by this commit.
This platform also has a definition for FREAD but the MacOS patch can be used
to rename that.
In file included from DBio.c:51:0:
../utils/magic.h:141:0: warning: "FOPEN" redefined
#define FOPEN gzopen
^
In file included from DBio.c:30:0:
/usr/include/sys/file.h:74:0: note: this is the location of the previous definition
#define FOPEN 0xffffffff
^
In file included from DBio.c:51:0:
../utils/magic.h:144:0: warning: "FREAD" redefined
#define FREAD(a,b,c,d) gzread(d,a,b*c)
^
In file included from DBio.c:30:0:
/usr/include/sys/file.h:75:0: note: this is the location of the previous definition
#define FREAD 0x01 /* <sys/aiocb.h> LIO_READ must be identical */
^
This commit is contained in:
parent
778201fbc2
commit
6b0bc5bbdc
|
|
@ -151,7 +151,7 @@ extern char AbortMessage[];
|
||||||
/* ------------ zlib (compression) support -------------------------------- */
|
/* ------------ zlib (compression) support -------------------------------- */
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
#define FOPEN gzopen
|
#define magicFOPEN gzopen
|
||||||
#define FCLOSE gzclose
|
#define FCLOSE gzclose
|
||||||
#define FGETC gzgetc
|
#define FGETC gzgetc
|
||||||
#define magicFREAD(a,b,c,d) gzread(d,a,b*c)
|
#define magicFREAD(a,b,c,d) gzread(d,a,b*c)
|
||||||
|
|
@ -162,7 +162,7 @@ extern char AbortMessage[];
|
||||||
#define FILETYPE gzFile
|
#define FILETYPE gzFile
|
||||||
#define OFFTYPE z_off_t
|
#define OFFTYPE z_off_t
|
||||||
#else
|
#else
|
||||||
#define FOPEN fopen
|
#define magicFOPEN fopen
|
||||||
#define FCLOSE fclose
|
#define FCLOSE fclose
|
||||||
#define FGETC getc
|
#define FGETC getc
|
||||||
#define magicFREAD fread
|
#define magicFREAD fread
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue