Re: Solaris getopt_long and PostgreSQL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Solaris getopt_long and PostgreSQL
Date
Msg-id 22853.1238519456@sss.pgh.pa.us
Whole thread Raw
In response to Re: Solaris getopt_long and PostgreSQL  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Responses Re: Solaris getopt_long and PostgreSQL
List pgsql-hackers
Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
> The main problem what I see here is that getopt and getopt_long works 
> together. Use one from system and one ported is not good idea.

Well, the expected (and pretty-well-tested) case is that your system has
getopt but not getopt_long.  I don't see any reason why using ported
getopt_long in that case is "not good idea".

I agree that substituting getopt without substituting getopt_long is a
tad risky, and probably hasn't been tested anyplace else previously.
It may well be that we should revert to the previous state of affairs
where we don't trust Solaris for either function.

> I think best solution is to port new BSD version into postgreSQL and
> use both function from libc version or ported versin.

I'm not sure which part of "no" you didn't understand.  Changing the
contents of argv[] is going to be system-specific and there is no reason
to believe that a BSD implementation will work everywhere.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: [GENERAL] string_to_array with empty input
Next
From: Alvaro Herrera
Date:
Subject: Re: can't load plpython