Move our own getopt() implementation to _PyOS_GetOpt(), and use it
regardless of whether the system getopt() does what we want. This avoids the
hassle with prototypes and externs, and the check to see if the system
getopt() does what we want. Prefix optind, optarg and opterr with _PyOS_ to
avoid name clashes. Add new include file to define the right symbols. Fix
Demo/pyserv/pyserv.c to include getopt.h itself, instead of relying on
Python to provide it.
diff --git a/Python/Makefile.in b/Python/Makefile.in
index 597cb20..0e4ca27 100644
--- a/Python/Makefile.in
+++ b/Python/Makefile.in
@@ -46,7 +46,7 @@
marshal.o modsupport.o mystrtoul.o \
pyfpe.o pystate.o pythonrun.o \
structmember.o sysmodule.o \
- traceback.o \
+ traceback.o getopt.o \
$(DYNLOADFILE) \
$(LIBOBJS)
OBJS= $(AROBJS) sigcheck.o