Hi list ! The REPLACE_GETOPT symbol seems to have been introduced for smoothing the transition from an old implementation of getopt(3) and the current one. It is now defined unconditionnaly in the source file and the old implementation has been removed 6 years ago.
The appended diff gets rid of the said symbol. Cheers ! hyjial. Index: getopt_long.c =================================================================== RCS file: /cvs/src/lib/libc/stdlib/getopt_long.c,v retrieving revision 1.23 diff -u getopt_long.c --- getopt_long.c B B B 31 Oct 2007 12:34:57 -0000 B B B 1.23 +++ getopt_long.c B B B 21 Apr 2010 16:02:26 -0000 @@ -55,15 +55,11 @@ B #include <stdlib.h> B #include <string.h> -#define B B B B REPLACE_GETOPT B B B B B /* use this getopt as the system getopt(3) */ - -#ifdef REPLACE_GETOPT B int B B opterr = 1; B B B B B B /* if error message should be printed */ B int B B optind = 1; B B B B B B /* index into parent argv vector */ B int B B optopt = '?'; B B B B B /* character checked for validity */ B int B B optreset; B B B B B B B /* reset getopt */ B char B B *optarg; B B B B B B B /* argument associated with option */ -#endif B #define PRINT_ERROR B B ((opterr) && (*options != ':')) @@ -467,7 +463,6 @@ B B B B return (optchar); B } -#ifdef REPLACE_GETOPT B /* B * getopt -- B * B B Parse argc/argv argument vector. @@ -488,7 +483,6 @@ B B B B */ B B B B return (getopt_internal(nargc, nargv, options, NULL, NULL, 0)); B } -#endif /* REPLACE_GETOPT */ B /* B * getopt_long --