[postgis-devel] getopt.h

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Mon Dec 21 06:44:07 PST 2009


Paul Ramsey wrote:

> Don't want to get into a reversion war here... I want to remove the
> getopt custom junk in loader. I know I broke MinGW, but the solution
> isn't to add pgis_getopt back in, it's to find a system getopt for
> MinGW, and it turns out there is one, you just have to test for
> HAVE_UNISTD and if it isn't there, include <getopt.h> and minGW works
> fine.
> 
> The old getopt stuff dates back to almost the beginning of PostGIS,
> when Dave dumped it in there rather than figure out an incompatibility
> between the Solaris getopt and the linux getopt. So when I ripped it
> out, I tested on Solaris and everything worked fine.
> 
> P.

If we don't care about broken Solaris anymore, I think the correct way 
to do this would be to create a directory full of functions that may not 
be available on every platform, and then use autoconf's AC_LIBOBJ and 
friends so that all the magic happens behind the scenes.


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-devel mailing list