summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-22 00:26:59 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-22 00:26:59 +0000
commitee9ac35fc20294e2950f811f1998a72b1aa20254 (patch)
tree16f6d37494ff6ac8d60297fcfb1e88117bfb1cdf /defines.h
parentf102bf6e50325f9c94143569c4f0241de08424f8 (diff)
- (bal) getopt now can be staticly compiled on those platforms missing
optreset. Patch by binder@arago.de
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/defines.h b/defines.h
index 1f52c545c..90825f6b9 100644
--- a/defines.h
+++ b/defines.h
@@ -1,7 +1,7 @@
#ifndef _DEFINES_H
#define _DEFINES_H
-/* $Id: defines.h,v 1.90 2002/06/07 03:19:36 mouring Exp $ */
+/* $Id: defines.h,v 1.91 2002/06/22 00:27:00 mouring Exp $ */
/* Constants */
@@ -417,7 +417,18 @@ struct winsize {
#endif
#ifndef HAVE_GETOPT_OPTRESET
-#define getopt(ac, av, o) BSDgetopt(ac, av, o)
+# undef getopt
+# undef opterr
+# undef optind
+# undef optopt
+# undef optreset
+# undef optarg
+# define getopt(ac, av, o) BSDgetopt(ac, av, o)
+# define opterr BSDopterr
+# define optind BSDoptind
+# define optopt BSDoptopt
+# define optreset BSDoptreset
+# define optarg BSDoptarg
#endif
/* In older versions of libpam, pam_strerror takes a single argument */