Re: pgcrypto: Makefile check

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pgcrypto: Makefile check
Date: 2004-11-22 23:42:38
Message-ID: 1101166958.12361.12.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Perhaps I wasn't clear: the *present* behavior of pgcrypto is to
"compile successfully but ... be unusable" if an invalid random source
is defined. This is prone to error. That patch changes this behavior to
refuse to compile if an invalid random source has been defined.

On Mon, 2004-11-22 at 10:46 -0500, Tom Lane wrote:
> > +$(error "Unrecognized random source: $(random)")
>
> Doesn't look like a successful compile to me.

Right, that's the whole point.

> What's worse, this would also cause maintenance operations (like
> "make clean") to fail.

I don't think this is a problem (an invalid random source is effectively
a misconfiguration and could only be the result of user error). But if
you like I can change the patch so that we error out when attempting to
compile random.c

> (I see little point in this anyway given that the makefile defaults to
> "random = silly" further up.)

This patch was specifically motivated by a user who was confused when
they edited the Makefile, compiled pgcrypto, and couldn't use it -- as
it turned out the random source was defined with trailing whitespace. I
think the Makefile syntax is sufficiently esoteric that some error
checking would be helpful.

-Neil

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-11-23 00:10:13 Re: pgcrypto: Makefile check
Previous Message Tom Lane 2004-11-22 21:30:32 Re: another plperl bug