diff options
author | Andrey Nazarov <skuller@skuller.net> | 2012-11-11 18:19:59 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2012-11-11 18:19:59 +0400 |
commit | 5ae5fa3733e1291a88beb6413f771ee8c32f1c2b (patch) | |
tree | 9faf5ea7baf2b9a5eaf313e1e215f852745386d0 | |
parent | a8e0a1859212d7712dfaf3df812c06251359ab5e (diff) |
Stop using zlib OF() macro.
This thing does nothing in ANSI C and causes problems with distributions
that remove it from zlib headers (e.g. Gentoo).
-rw-r--r-- | src/common/files.c | 4 | ||||
-rw-r--r-- | src/server/init.c | 4 | ||||
-rw-r--r-- | src/server/main.c | 4 | ||||
-rw-r--r-- | src/server/mvd.c | 4 | ||||
-rw-r--r-- | src/server/mvd/client.c | 4 | ||||
-rw-r--r-- | src/server/server.h | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/src/common/files.c b/src/common/files.c index e689e93..b29b928 100644 --- a/src/common/files.c +++ b/src/common/files.c @@ -1061,12 +1061,12 @@ static qerror_t check_header_coherency(FILE *fp, packfile_t *entry) return Q_ERR_SUCCESS; } -static voidpf FS_zalloc OF((voidpf opaque, uInt items, uInt size)) +static voidpf FS_zalloc(voidpf opaque, uInt items, uInt size) { return FS_Malloc(items * size); } -static void FS_zfree OF((voidpf opaque, voidpf address)) +static void FS_zfree(voidpf opaque, voidpf address) { Z_Free(address); } diff --git a/src/server/init.c b/src/server/init.c index 405e427..29be671 100644 --- a/src/server/init.c +++ b/src/server/init.c @@ -346,8 +346,8 @@ void SV_InitGame(unsigned mvd_spawn) Cvar_ClampInteger(sv_reserved_slots, 0, sv_maxclients->integer - 1); #if USE_ZLIB - svs.z.zalloc = SV_Zalloc; - svs.z.zfree = SV_Zfree; + svs.z.zalloc = SV_zalloc; + svs.z.zfree = SV_zfree; if (deflateInit2(&svs.z, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -MAX_WBITS, 9, Z_DEFAULT_STRATEGY) != Z_OK) { Com_Error(ERR_FATAL, "%s: deflateInit2() failed", __func__); diff --git a/src/server/main.c b/src/server/main.c index f547b5d..53bfc03 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -1960,12 +1960,12 @@ static void sv_hostname_changed(cvar_t *self) #endif #if USE_ZLIB -voidpf SV_Zalloc OF((voidpf opaque, uInt items, uInt size)) +voidpf SV_zalloc(voidpf opaque, uInt items, uInt size) { return SV_Malloc(items * size); } -void SV_Zfree OF((voidpf opaque, voidpf address)) +void SV_zfree(voidpf opaque, voidpf address) { Z_Free(address); } diff --git a/src/server/mvd.c b/src/server/mvd.c index 7234aa6..aa9586a 100644 --- a/src/server/mvd.c +++ b/src/server/mvd.c @@ -1424,8 +1424,8 @@ static void parse_hello(gtv_client_t *client) #if USE_ZLIB // the rest of the stream will be deflated if (flags & GTF_DEFLATE) { - client->z.zalloc = SV_Zalloc; - client->z.zfree = SV_Zfree; + client->z.zalloc = SV_zalloc; + client->z.zfree = SV_zfree; if (deflateInit(&client->z, Z_DEFAULT_COMPRESSION) != Z_OK) { drop_client(client, "deflateInit failed"); return; diff --git a/src/server/mvd/client.c b/src/server/mvd/client.c index 4036a2f..626e108 100644 --- a/src/server/mvd/client.c +++ b/src/server/mvd/client.c @@ -1061,12 +1061,12 @@ static void send_stream_stop(gtv_t *gtv) #if USE_ZLIB -static voidpf gtv_zalloc OF((voidpf opaque, uInt items, uInt size)) +static voidpf gtv_zalloc(voidpf opaque, uInt items, uInt size) { return MVD_Malloc(items * size); } -static void gtv_zfree OF((voidpf opaque, voidpf address)) +static void gtv_zfree(voidpf opaque, voidpf address) { Z_Free(address); } diff --git a/src/server/server.h b/src/server/server.h index d0a91a4..17efb90 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -542,8 +542,8 @@ addrmatch_t *SV_MatchAddress(list_t *list, netadr_t *address); int SV_CountClients(void); #if USE_ZLIB -voidpf SV_Zalloc OF((voidpf opaque, uInt items, uInt size)); -void SV_Zfree OF((voidpf opaque, voidpf address)); +voidpf SV_zalloc(voidpf opaque, uInt items, uInt size); +void SV_zfree(voidpf opaque, voidpf address); #endif // |