diff options
author | guenther <> | 2015-09-19 04:02:21 +0000 |
---|---|---|
committer | guenther <> | 2015-09-19 04:02:21 +0000 |
commit | 1114c94d117964c9db5457af4afc03dc27a3c33b (patch) | |
tree | 73d27de6ee2eb20c9a20a3fbddc148c3cae3eccd | |
parent | 4fdb8cf7a66cb94037297860a53c51df4b381d59 (diff) | |
download | openbsd-1114c94d117964c9db5457af4afc03dc27a3c33b.tar.gz openbsd-1114c94d117964c9db5457af4afc03dc27a3c33b.tar.bz2 openbsd-1114c94d117964c9db5457af4afc03dc27a3c33b.zip |
Don't wrap initialized variables: binutils appears to be mishandling them
on arm and m88k
problems with optind observed by jsg@
-rw-r--r-- | src/lib/libc/stdlib/getopt_long.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/getopt_long.c b/src/lib/libc/stdlib/getopt_long.c index 21407824dd..fe4565526a 100644 --- a/src/lib/libc/stdlib/getopt_long.c +++ b/src/lib/libc/stdlib/getopt_long.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getopt_long.c,v 1.27 2015/09/12 14:48:14 guenther Exp $ */ | 1 | /* $OpenBSD: getopt_long.c,v 1.28 2015/09/19 04:02:21 guenther Exp $ */ |
2 | /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ | 2 | /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ |
3 | 3 | ||
4 | /* | 4 | /* |
@@ -61,10 +61,12 @@ int optopt = '?'; /* character checked for validity */ | |||
61 | int optreset; /* reset getopt */ | 61 | int optreset; /* reset getopt */ |
62 | char *optarg; /* argument associated with option */ | 62 | char *optarg; /* argument associated with option */ |
63 | 63 | ||
64 | #if 0 | ||
64 | /* DEF_* only work on initialized (non-COMMON) variables */ | 65 | /* DEF_* only work on initialized (non-COMMON) variables */ |
65 | DEF_WEAK(opterr); | 66 | DEF_WEAK(opterr); |
66 | DEF_WEAK(optind); | 67 | DEF_WEAK(optind); |
67 | DEF_WEAK(optopt); | 68 | DEF_WEAK(optopt); |
69 | #endif | ||
68 | 70 | ||
69 | #define PRINT_ERROR ((opterr) && (*options != ':')) | 71 | #define PRINT_ERROR ((opterr) && (*options != ':')) |
70 | 72 | ||