Replace unnecessary DISABLE_ZLIB define in pgcrypto with HAVE_LIBZ from core.

Patch from Marko Kreen.
This commit is contained in:
Alvaro Herrera 2007-01-14 20:55:14 +00:00
parent 2f8f76bcd5
commit a62e2c2b57
2 changed files with 5 additions and 8 deletions

View File

@ -1,5 +1,5 @@
# #
# $PostgreSQL: pgsql/contrib/pgcrypto/Makefile,v 1.24 2006/07/13 04:15:24 neilc Exp $ # $PostgreSQL: pgsql/contrib/pgcrypto/Makefile,v 1.25 2007/01/14 20:55:14 alvherre Exp $
# #
INT_SRCS = md5.c sha1.c sha2.c internal.c internal-sha2.c blf.c rijndael.c \ INT_SRCS = md5.c sha1.c sha2.c internal.c internal-sha2.c blf.c rijndael.c \
@ -9,17 +9,13 @@ INT_TESTS = sha2
OSSL_SRCS = openssl.c pgp-mpi-openssl.c OSSL_SRCS = openssl.c pgp-mpi-openssl.c
OSSL_TESTS = sha2 des 3des cast5 OSSL_TESTS = sha2 des 3des cast5
ZLIB_OFF_CFLAGS = -DDISABLE_ZLIB
ZLIB_TST = pgp-compression ZLIB_TST = pgp-compression
ZLIB_OFF_TST = pgp-zlib-DISABLED ZLIB_OFF_TST = pgp-zlib-DISABLED
CF_SRCS = $(if $(subst no,,$(with_openssl)), $(OSSL_SRCS), $(INT_SRCS)) CF_SRCS = $(if $(subst no,,$(with_openssl)), $(OSSL_SRCS), $(INT_SRCS))
CF_TESTS = $(if $(subst no,,$(with_openssl)), $(OSSL_TESTS), $(INT_TESTS)) CF_TESTS = $(if $(subst no,,$(with_openssl)), $(OSSL_TESTS), $(INT_TESTS))
CF_CFLAGS = $(if $(subst yes,,$(with_zlib)), $(ZLIB_OFF_CFLAGS))
CF_PGP_TESTS = $(if $(subst no,,$(with_zlib)), $(ZLIB_TST), $(ZLIB_OFF_TST)) CF_PGP_TESTS = $(if $(subst no,,$(with_zlib)), $(ZLIB_TST), $(ZLIB_OFF_TST))
PG_CPPFLAGS = $(CF_CFLAGS)
SRCS = pgcrypto.c px.c px-hmac.c px-crypt.c \ SRCS = pgcrypto.c px.c px-hmac.c px-crypt.c \
crypt-gensalt.c crypt-blowfish.c crypt-des.c \ crypt-gensalt.c crypt-blowfish.c crypt-des.c \
crypt-md5.c $(CF_SRCS) \ crypt-md5.c $(CF_SRCS) \

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $PostgreSQL: pgsql/contrib/pgcrypto/pgp-compress.c,v 1.5 2005/10/15 02:49:06 momjian Exp $ * $PostgreSQL: pgsql/contrib/pgcrypto/pgp-compress.c,v 1.6 2007/01/14 20:55:14 alvherre Exp $
*/ */
#include "postgres.h" #include "postgres.h"
@ -40,7 +40,7 @@
* Compressed pkt writer * Compressed pkt writer
*/ */
#ifndef DISABLE_ZLIB #ifdef HAVE_LIBZ
#include <zlib.h> #include <zlib.h>
@ -312,7 +312,8 @@ pgp_decompress_filter(PullFilter ** res, PGP_Context * ctx, PullFilter * src)
{ {
return pullf_create(res, &decompress_filter, ctx, src); return pullf_create(res, &decompress_filter, ctx, src);
} }
#else /* DISABLE_ZLIB */
#else /* !HAVE_ZLIB */
int int
pgp_compress_filter(PushFilter ** res, PGP_Context * ctx, PushFilter * dst) pgp_compress_filter(PushFilter ** res, PGP_Context * ctx, PushFilter * dst)