diff options
author | peter <peter@FreeBSD.org> | 2002-12-02 03:13:37 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-12-02 03:13:37 +0000 |
commit | 3dc96f7243ece1d1f7f87b03334f840415e0db63 (patch) | |
tree | 15f00bd8ebd718713d8c0a8707ebebfced99c550 /contrib/cvs/lib/getopt.h | |
parent | cf46dfb750863d760d19b9858b0a336b158275da (diff) | |
download | FreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.zip FreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.tar.gz |
Import cvs-1.11.2.1 as of 2002/12/01 onto vendor branch. This fixes all
of the bugs that I know of. We've been running a slightly older version
of this on freefall/repoman, where it was afflicted by a silly merge error
on my part (fixed).
Approved by: re
Diffstat (limited to 'contrib/cvs/lib/getopt.h')
-rw-r--r-- | contrib/cvs/lib/getopt.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/cvs/lib/getopt.h b/contrib/cvs/lib/getopt.h index 7fc2cca..9ba79f2 100644 --- a/contrib/cvs/lib/getopt.h +++ b/contrib/cvs/lib/getopt.h @@ -14,6 +14,30 @@ #ifndef _GETOPT_H #define _GETOPT_H 1 +/* CVS - DRP + * + * If the OS defines this, just redefine the names to avoid namespace + * clashes. In theory, we should be testing the built in functions to + * see if they do what we want and use them if possible, but this is + * easier... + * + * Namely, this was occurring under Mac OS X. This is a Mac OS X (or + * OS X related) bug. + * + * Oops. We avoid compiling this with ifdefs because pretty much all of + * getopt.c is switched on the same macros... this isn't right, but I think + * this isn't our file. Probably best not to mess with it too much. + */ +#if defined (_LIBC) || !defined (__GNU_LIBRARY__) +# ifdef HAVE_GETOPT +# define getopt cvs_getopt +# define optarg cvs_optarg +# define opterr cvs_opterr +# define optind cvs_optind +# define optopt cvs_optopt +# endif /* HAVE_GETOPT */ +#endif /* _LIBC or not __GNU_LIBRARY__. */ + #ifdef __cplusplus extern "C" { #endif |