This patch makes the pgcrypto Makefile check that a recognized random source has been defined. If no such source is defined, pgcrypto will compile successfully but will be unusable.
(An alternative place to do the check would be in random.c; comments on which location is preferrable are welcome.) Barring any objections I will apply this to HEAD later tonight. -Neil
# # patch "contrib/pgcrypto/Makefile" # from [c549a19bc0a0ff6582bb02e37d2db011c1e0cf01] # to [709404895862b1734a4c1af7ca0f9fb423097c0a] # --- contrib/pgcrypto/Makefile +++ contrib/pgcrypto/Makefile @@ -48,13 +48,17 @@ ifeq ($(random), dev) CRYPTO_CFLAGS += -DRAND_DEV=$(random_dev) -endif +else ifeq ($(random), openssl) CRYPTO_CFLAGS += -DRAND_OPENSSL -endif +else ifeq ($(random), silly) CRYPTO_CFLAGS += -DRAND_SILLY +else +$(error "Unrecognized random source: $(random)") endif +endif +endif SRCS += pgcrypto.c px.c px-hmac.c px-crypt.c misc.c \ crypt-gensalt.c random.c
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend
