ecpg -? option doesn't work in windows - Mailing list pgsql-hackers

From Haribabu Kommi
Subject ecpg -? option doesn't work in windows
Date
Msg-id CAJrrPGfnRXvmCzxq6Dy=stAWebfNHxiL+Y_z7uqksZUCkW_waQ@mail.gmail.com
Whole thread Raw
Responses Re: ecpg -? option doesn't work in windows  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
ecpg option --help alternative -? doesn't work in windows.
In windows, the PG provided getopt_long function is used
for reading the provided options.

The getopt_long function returns '?' for invalid characters
also but it sets optopt option to 0 in case if the character
itself is a '?'. But this works for Linux and others, whereas
for windows, optopt is not 0. Because of this reason it is
failing.

I feel, from this commit 5b88b85c on wards, it is not working.
I feel instead of fixing the getopt_long function to reset optopt
parameter to zero whenever it is returning '?', I prefer fixing
the ecpg in handling the version and help options seperate.

Patch is attached. Any one prefers the getopt_long function
fix, I can produce the patch for the same.

Regards,
Hari Babu
Fujitsu Australia

Attachment

pgsql-hackers by date:

Previous
From: Andrew Borodin
Date:
Subject: GiST penalty functions [PoC]
Next
From: Michael Paquier
Date:
Subject: Re: Renaming of pg_xlog and pg_clog