[postgis-users] Eliminating USE_PG72

Chris Hodgson chodgson at refractions.net
Tue Sep 3 09:32:59 PDT 2002


> > It seems doubly silly since
> > this is easily fixed to be automatic. This patch is only tested with a
couple
> > versions of PostgreSQL though:

Greg, your automatic test was exactly what I was trying to implement in the
first place... I just don't have much shell scripting knowledge, so I had to
fall back to the ugly setup I had.

> I am sorely tempted to move the whole 7.2-or-not switch into a macro in
> the .c file and clean up the atrocious mess which is the Makefile.
> Chris, we had a reason not to do this originally, but I have forgotten
> what it was...

Hmm... I think the reasons were:
- there is a significant amount of code that would be #ifdef'd out, code
which will never be modified again, so why not just leave it in a separate
file
- you still need to do the version check in the makefile, and set the
variable to #ifdef on, so it doesn't really clean up the makefile that much

However, I suppose a cleaner solution would be to always compile both files,
and just #ifdef out the entire file if it is the wrong version... this keeps
the old stuff in its own file, and allows for a somewhat nicer makefile.

I can go ahead and do that if you want...

Chris






More information about the postgis-users mailing list