From 8fad99e17eeb35234eebd0ca27794f60a77cff31 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 26 Jan 2021 18:19:43 +0000 Subject: [PATCH] satisfy -fno-common by repairing one enum decl ok mortimer --- usr.bin/vi/common/common.h | 4 ++-- usr.bin/vi/common/main.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.bin/vi/common/common.h b/usr.bin/vi/common/common.h index 5eca0f9252a..03ae2f22090 100644 --- a/usr.bin/vi/common/common.h +++ b/usr.bin/vi/common/common.h @@ -1,4 +1,4 @@ -/* $OpenBSD: common.h,v 1.9 2016/08/27 04:07:42 guenther Exp $ */ +/* $OpenBSD: common.h,v 1.10 2021/01/26 18:19:43 deraadt Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -66,7 +66,7 @@ typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t; typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t; /* Program modes. */ -enum { MODE_EX, MODE_VI, MODE_VIEW } pmode; +extern enum pmode { MODE_EX, MODE_VI, MODE_VIEW } pmode; /* * Local includes. diff --git a/usr.bin/vi/common/main.c b/usr.bin/vi/common/main.c index 005973728a8..ee3d10bf858 100644 --- a/usr.bin/vi/common/main.c +++ b/usr.bin/vi/common/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.41 2017/11/10 18:31:36 martijn Exp $ */ +/* $OpenBSD: main.c,v 1.42 2021/01/26 18:19:43 deraadt Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -35,6 +35,8 @@ static void attach(GS *); #endif static int v_obsolete(char *[]); +enum pmode pmode; + /* * editor -- * Main editor routine. -- 2.20.1