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