add HAVE_ZLIB around the rest of the zlib stuff in w_wad.c/h, move zlib.h inclusion down below doomdef.h etc includes in case that does anything for compiling (?)

This commit is contained in:
Monster Iestyn 2018-11-27 13:57:32 +00:00
parent b7f7c2ecf7
commit 1889c36dea
2 changed files with 20 additions and 16 deletions

View file

@ -26,22 +26,6 @@
#include "lzf.h"
#endif
#ifndef _MSC_VER
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#endif
#ifndef _LFS64_LARGEFILE
#define _LFS64_LARGEFILE
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 0
#endif
#include "zlib.h"
#include "doomdef.h"
#include "doomstat.h"
#include "doomtype.h"
@ -79,6 +63,24 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
#define O_BINARY 0
#endif
#ifdef HAVE_ZLIB
#ifndef _MSC_VER
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#endif
#ifndef _LFS64_LARGEFILE
#define _LFS64_LARGEFILE
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 0
#endif
#include "zlib.h"
#endif
typedef struct
{

View file

@ -154,7 +154,9 @@ size_t W_LumpLength(lumpnum_t lumpnum);
boolean W_IsLumpWad(lumpnum_t lumpnum); // for loading maps from WADs in PK3s
#ifdef HAVE_ZLIB
void zerr(int ret); // zlib error checking
#endif
size_t W_ReadLumpHeaderPwad(UINT16 wad, UINT16 lump, void *dest, size_t size, size_t offset);
size_t W_ReadLumpHeader(lumpnum_t lump, void *dest, size_t size, size_t offest); // read all or a part of a lump