From 8609f86bc8a81dff488c5ca4dc9b3bc388197803 Mon Sep 17 00:00:00 2001 From: guenther <> Date: Sat, 19 Sep 2015 04:02:21 +0000 Subject: [PATCH] Don't wrap initialized variables: binutils appears to be mishandling them on arm and m88k problems with optind observed by jsg@ --- src/lib/libc/stdlib/getopt_long.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/libc/stdlib/getopt_long.c b/src/lib/libc/stdlib/getopt_long.c index 21407824..fe456552 100644 --- a/src/lib/libc/stdlib/getopt_long.c +++ b/src/lib/libc/stdlib/getopt_long.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getopt_long.c,v 1.27 2015/09/12 14:48:14 guenther Exp $ */ +/* $OpenBSD: getopt_long.c,v 1.28 2015/09/19 04:02:21 guenther Exp $ */ /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ /* @@ -61,10 +61,12 @@ int optopt = '?'; /* character checked for validity */ int optreset; /* reset getopt */ char *optarg; /* argument associated with option */ +#if 0 /* DEF_* only work on initialized (non-COMMON) variables */ DEF_WEAK(opterr); DEF_WEAK(optind); DEF_WEAK(optopt); +#endif #define PRINT_ERROR ((opterr) && (*options != ':'))