Heikki Linnakangas <hlinnaka@iki.fi> writes:
> Thread-local variables would work too, but I think we'd need to give
> them different names anyway to avoid conflicting with the plain getopt()
> global variables.
Oh, excellent point. I was thinking the change could be purely local to
getopt.c, but that probably wouldn't work because some of them are in
the visible API.
regards, tom lane