[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/20] bsd-user: style tweak: move extern to header file
From: |
Warner Losh |
Subject: |
[PULL 06/20] bsd-user: style tweak: move extern to header file |
Date: |
Wed, 12 May 2021 11:17:06 -0600 |
extern char **environ has no standard home, so move the declaration from the .c
file to a handy .h file. Since this is a standard, old-school UNIX interface
dating from the 5th edition, it's not quite the same issue that the rule is
supposed to protect against, though.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/main.c | 1 -
bsd-user/qemu.h | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index cd1c26516b..71bfe17f38 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -47,7 +47,6 @@ unsigned long reserved_va;
static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
const char *qemu_uname_release;
-extern char **environ;
enum BSDType bsd_type;
/*
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 7ccc8ad397..5a82722281 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -27,6 +27,8 @@
#include "exec/user/abitypes.h"
+extern char **environ;
+
enum BSDType {
target_freebsd,
target_netbsd,
--
2.22.1
- [PULL 00/20] bsd-user style tweaks and start cleanup, Warner Losh, 2021/05/12
- [PULL 01/20] bsd-user: whitespace changes, Warner Losh, 2021/05/12
- [PULL 03/20] bsd-user: style tweak: Remove #if 0'd code, Warner Losh, 2021/05/12
- [PULL 02/20] bsd-user: style tweak: use C not C++ comments, Warner Losh, 2021/05/12
- [PULL 10/20] bsd-user: style tweak: use {} for all if statements, format else correctly, Warner Losh, 2021/05/12
- [PULL 06/20] bsd-user: style tweak: move extern to header file,
Warner Losh <=
- [PULL 07/20] bsd-user: style tweak: remove spacing after '*' and add after }, Warner Losh, 2021/05/12
- [PULL 09/20] bsd-user: style tweak: don't assign in if statements, Warner Losh, 2021/05/12
- [PULL 13/20] bsd-user: whitespace changes, Warner Losh, 2021/05/12
- [PULL 04/20] bsd-user: style tweak: Use preferred block comments, Warner Losh, 2021/05/12
- [PULL 05/20] bsd-user: Remove commented out code, Warner Losh, 2021/05/12
- [PULL 08/20] bsd-user: style tweak: Use preferred block comments, Warner Losh, 2021/05/12
- [PULL 15/20] bsd-user: style tweak: keyword space (, Warner Losh, 2021/05/12
- [PULL 11/20] bsd-user: style tweak: use {} consistently in for / if / else statements, Warner Losh, 2021/05/12
- [PULL 18/20] bsd-user: remove target_signal.h, it's unused, Warner Losh, 2021/05/12
- [PULL 14/20] bsd-user: style tweak: keyword space (, Warner Losh, 2021/05/12