diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-19 04:02:22 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-19 04:02:22 +0000 |
commit | 1892ffe471a1a6daeba5187eb37c5fe9cb48cf3e (patch) | |
tree | e7b042ed001666cc8e0588591c4154d826c86fda /lib/libc | |
parent | c9d092ae2ea91f9e4835850570601efad99c667d (diff) |
Don't wrap initialized variables: binutils appears to be mishandling them
on arm and m88k
problems with optind observed by jsg@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/ctype_.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/errlist.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/siglist.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/signame.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/tolower_.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/toupper_.c | 4 | ||||
-rw-r--r-- | lib/libc/hidden/ctype.h | 4 | ||||
-rw-r--r-- | lib/libc/hidden/errno.h | 4 | ||||
-rw-r--r-- | lib/libc/hidden/getopt.h | 4 | ||||
-rw-r--r-- | lib/libc/hidden/signal.h | 4 | ||||
-rw-r--r-- | lib/libc/hidden/stdio.h | 4 | ||||
-rw-r--r-- | lib/libc/hidden/stdlib.h | 4 | ||||
-rw-r--r-- | lib/libc/hidden/time.h | 4 | ||||
-rw-r--r-- | lib/libc/locale/__mb_cur_max.c | 4 | ||||
-rw-r--r-- | lib/libc/stdlib/getopt_long.c | 4 | ||||
-rw-r--r-- | lib/libc/time/localtime.c | 4 |
16 files changed, 48 insertions, 18 deletions
diff --git a/lib/libc/gen/ctype_.c b/lib/libc/gen/ctype_.c index ba61e1a541a..89722443351 100644 --- a/lib/libc/gen/ctype_.c +++ b/lib/libc/gen/ctype_.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ctype_.c,v 1.11 2015/09/13 11:38:08 guenther Exp $ */ +/* $OpenBSD: ctype_.c,v 1.12 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. @@ -74,4 +74,6 @@ const char _C_ctype_[1 + CTYPE_NUM_CHARS] = { }; const char *_ctype_ = _C_ctype_; +#if 0 DEF_STRONG(_ctype_); +#endif diff --git a/lib/libc/gen/errlist.c b/lib/libc/gen/errlist.c index cd957e4024d..8f142d8e541 100644 --- a/lib/libc/gen/errlist.c +++ b/lib/libc/gen/errlist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: errlist.c,v 1.16 2015/09/06 20:26:20 guenther Exp $ */ +/* $OpenBSD: errlist.c,v 1.17 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 1982, 1985, 1993 * The Regents of the University of California. All rights reserved. @@ -143,9 +143,11 @@ const char *const sys_errlist[] = { "No message of desired type", /* 90 - ENOMSG */ "Not supported", /* 91 - ENOTSUP */ }; -DEF_WEAK(sys_errlist); const int sys_nerr = { sizeof sys_errlist/sizeof sys_errlist[0] }; +#if 0 +DEF_WEAK(sys_errlist); DEF_WEAK(sys_nerr); +#endif __strong_alias(_sys_errlist, sys_errlist); __strong_alias(_sys_nerr, sys_nerr); diff --git a/lib/libc/gen/siglist.c b/lib/libc/gen/siglist.c index 1fb94722101..98143ab9229 100644 --- a/lib/libc/gen/siglist.c +++ b/lib/libc/gen/siglist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siglist.c,v 1.7 2015/09/06 20:26:20 guenther Exp $ */ +/* $OpenBSD: siglist.c,v 1.8 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -65,5 +65,7 @@ const char *const sys_siglist[NSIG] = { "User defined signal 2", /* SIGUSR2 */ "Thread AST", /* SIGTHR */ }; +#if 0 DEF_WEAK(sys_siglist); +#endif __strong_alias(_sys_siglist, sys_siglist); diff --git a/lib/libc/gen/signame.c b/lib/libc/gen/signame.c index 79d2fe743d0..ce3c755e66f 100644 --- a/lib/libc/gen/signame.c +++ b/lib/libc/gen/signame.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signame.c,v 1.6 2015/09/06 20:26:20 guenther Exp $ */ +/* $OpenBSD: signame.c,v 1.7 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. @@ -66,4 +66,6 @@ const char *const sys_signame[NSIG] = { "USR2", /* SIGUSR2 */ "THR", /* SIGTHR */ }; +#if 0 DEF_WEAK(sys_signame); +#endif diff --git a/lib/libc/gen/tolower_.c b/lib/libc/gen/tolower_.c index c1599969270..2402c42fcf6 100644 --- a/lib/libc/gen/tolower_.c +++ b/lib/libc/gen/tolower_.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tolower_.c,v 1.10 2015/09/13 11:38:08 guenther Exp $ */ +/* $OpenBSD: tolower_.c,v 1.11 2015/09/19 04:02:21 guenther Exp $ */ /* * Written by J.T. Conklin <jtc@netbsd.org>. * Public domain. @@ -46,7 +46,9 @@ const short _C_tolower_[1 + CTYPE_NUM_CHARS] = { }; const short *_tolower_tab_ = _C_tolower_; +#if 0 DEF_STRONG(_tolower_tab_); +#endif #undef tolower int diff --git a/lib/libc/gen/toupper_.c b/lib/libc/gen/toupper_.c index 9e2c6c7b14c..8408f9e0e7a 100644 --- a/lib/libc/gen/toupper_.c +++ b/lib/libc/gen/toupper_.c @@ -1,4 +1,4 @@ -/* $OpenBSD: toupper_.c,v 1.11 2015/09/13 11:38:08 guenther Exp $ */ +/* $OpenBSD: toupper_.c,v 1.12 2015/09/19 04:02:21 guenther Exp $ */ /* * Written by J.T. Conklin <jtc@netbsd.org>. * Public domain. @@ -47,7 +47,9 @@ const short _C_toupper_[1 + CTYPE_NUM_CHARS] = { }; const short *_toupper_tab_ = _C_toupper_; +#if 0 DEF_STRONG(_toupper_tab_); +#endif #undef toupper int diff --git a/lib/libc/hidden/ctype.h b/lib/libc/hidden/ctype.h index 3f6efc7e5d5..8d8bda65eb0 100644 --- a/lib/libc/hidden/ctype.h +++ b/lib/libc/hidden/ctype.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ctype.h,v 1.1 2015/09/13 11:38:08 guenther Exp $ */ +/* $OpenBSD: ctype.h,v 1.2 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> * @@ -20,9 +20,11 @@ #include_next <ctype.h> +#if 0 extern PROTO_NORMAL(_ctype_); extern PROTO_NORMAL(_tolower_tab_); extern PROTO_NORMAL(_toupper_tab_); +#endif PROTO_NORMAL(isalnum); PROTO_NORMAL(isalpha); diff --git a/lib/libc/hidden/errno.h b/lib/libc/hidden/errno.h index 7af2858746f..d54317ff4c9 100644 --- a/lib/libc/hidden/errno.h +++ b/lib/libc/hidden/errno.h @@ -1,4 +1,4 @@ -/* $OpenBSD: errno.h,v 1.2 2015/09/10 18:13:46 guenther Exp $ */ +/* $OpenBSD: errno.h,v 1.3 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> * @@ -26,8 +26,10 @@ extern const int sys_nerr; extern const char *const sys_errlist[]; +#if 0 extern PROTO_NORMAL(sys_nerr); extern PROTO_NORMAL(sys_errlist); +#endif /*PROTO_OVERRIDABLE(__errno);*/ diff --git a/lib/libc/hidden/getopt.h b/lib/libc/hidden/getopt.h index 167af2db749..69bbe9244fc 100644 --- a/lib/libc/hidden/getopt.h +++ b/lib/libc/hidden/getopt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: getopt.h,v 1.1 2015/09/12 14:48:14 guenther Exp $ */ +/* $OpenBSD: getopt.h,v 1.2 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> * @@ -20,11 +20,11 @@ #include_next <getopt.h> +#if 0 extern PROTO_NORMAL(opterr); extern PROTO_NORMAL(optind); extern PROTO_NORMAL(optopt); -#if 0 /* alas, COMMON symbols alias differently */ extern PROTO_NORMAL(optarg); extern PROTO_NORMAL(optreset); diff --git a/lib/libc/hidden/signal.h b/lib/libc/hidden/signal.h index 78222d449cf..53b4998f9d9 100644 --- a/lib/libc/hidden/signal.h +++ b/lib/libc/hidden/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.6 2015/09/13 07:36:58 guenther Exp $ */ +/* $OpenBSD: signal.h,v 1.7 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> * @@ -24,8 +24,10 @@ __BEGIN_HIDDEN_DECLS extern sigset_t __sigintr; __END_HIDDEN_DECLS +#if 0 extern PROTO_NORMAL(sys_siglist); extern PROTO_NORMAL(sys_signame); +#endif PROTO_DEPRECATED(bsd_signal); PROTO_NORMAL(kill); /* wrap to ban SIGTHR? */ diff --git a/lib/libc/hidden/stdio.h b/lib/libc/hidden/stdio.h index 4d589438836..5d33bd3b98c 100644 --- a/lib/libc/hidden/stdio.h +++ b/lib/libc/hidden/stdio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdio.h,v 1.4 2015/09/11 15:38:33 guenther Exp $ */ +/* $OpenBSD: stdio.h,v 1.5 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> * @@ -30,8 +30,10 @@ __END_HIDDEN_DECLS extern const int sys_nerr; extern const char *const sys_errlist[]; +#if 0 extern PROTO_NORMAL(sys_nerr); extern PROTO_NORMAL(sys_errlist); +#endif PROTO_NORMAL(__srget); PROTO_NORMAL(__swbuf); diff --git a/lib/libc/hidden/stdlib.h b/lib/libc/hidden/stdlib.h index 3b63f4004ae..9d0e771f4bb 100644 --- a/lib/libc/hidden/stdlib.h +++ b/lib/libc/hidden/stdlib.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdlib.h,v 1.3 2015/09/13 20:29:23 guenther Exp $ */ +/* $OpenBSD: stdlib.h,v 1.4 2015/09/19 04:02:21 guenther Exp $ */ /* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */ /*- @@ -41,8 +41,10 @@ __BEGIN_HIDDEN_DECLS char *__findenv(const char *, int, int *); __END_HIDDEN_DECLS +#if 0 extern PROTO_NORMAL(__mb_cur_max); /*extern PROTO_NORMAL(suboptarg);*/ +#endif PROTO_STD_DEPRECATED(_Exit); PROTO_DEPRECATED(a64l); diff --git a/lib/libc/hidden/time.h b/lib/libc/hidden/time.h index 188f40c8a60..ec118c393ac 100644 --- a/lib/libc/hidden/time.h +++ b/lib/libc/hidden/time.h @@ -1,4 +1,4 @@ -/* $OpenBSD: time.h,v 1.2 2015/09/12 14:35:40 guenther Exp $ */ +/* $OpenBSD: time.h,v 1.3 2015/09/19 04:02:21 guenther Exp $ */ /* * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> * @@ -20,7 +20,9 @@ #include_next <time.h> +#if 0 extern PROTO_NORMAL(tzname); +#endif PROTO_NORMAL(asctime); PROTO_NORMAL(asctime_r); diff --git a/lib/libc/locale/__mb_cur_max.c b/lib/libc/locale/__mb_cur_max.c index 8849a23c681..42fbcad68dc 100644 --- a/lib/libc/locale/__mb_cur_max.c +++ b/lib/libc/locale/__mb_cur_max.c @@ -1,4 +1,4 @@ -/* $OpenBSD: __mb_cur_max.c,v 1.3 2015/09/13 08:31:47 guenther Exp $ */ +/* $OpenBSD: __mb_cur_max.c,v 1.4 2015/09/19 04:02:21 guenther Exp $ */ /* $NetBSD: __mb_cur_max.c,v 1.2 2001/01/25 01:25:06 itojun Exp $ */ /*- @@ -32,4 +32,6 @@ size_t __mb_cur_max = 1; size_t __mb_len_max_runtime = MB_LEN_MAX; +#if 0 DEF_STRONG(__mb_cur_max); +#endif diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c index 21407824ddf..fe4565526ac 100644 --- a/lib/libc/stdlib/getopt_long.c +++ b/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 != ':')) diff --git a/lib/libc/time/localtime.c b/lib/libc/time/localtime.c index c84649affcb..eaf989741a0 100644 --- a/lib/libc/time/localtime.c +++ b/lib/libc/time/localtime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: localtime.c,v 1.53 2015/09/12 14:35:40 guenther Exp $ */ +/* $OpenBSD: localtime.c,v 1.54 2015/09/19 04:02:21 guenther Exp $ */ /* ** This file is in the public domain, so clarified as of ** 1996-06-05 by Arthur David Olson. @@ -195,7 +195,9 @@ char * tzname[2] = { wildabbr, wildabbr }; +#if 0 DEF_WEAK(tzname); +#endif /* ** Section 4.12.3 of X3.159-1989 requires that |