From d257e1e9bdc305def93ee9bf40399b9160901771 Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 22 Oct 2006 07:48:13 +0000 Subject: [PATCH] __weakref__ attribute can not be applied to anything when inside function scope, so, move the extern of get_alias_text outside vi_alias(). fixes build problems with GCC 4.1-20061021. --- lib/libedit/vi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libedit/vi.c b/lib/libedit/vi.c index 04c699c2f04b..5107bd2ec1e4 100644 --- a/lib/libedit/vi.c +++ b/lib/libedit/vi.c @@ -1,4 +1,4 @@ -/* $NetBSD: vi.c,v 1.26 2006/05/18 17:54:19 christos Exp $ */ +/* $NetBSD: vi.c,v 1.27 2006/10/22 07:48:13 mrg Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: vi.c,v 1.26 2006/05/18 17:54:19 christos Exp $"); +__RCSID("$NetBSD: vi.c,v 1.27 2006/10/22 07:48:13 mrg Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -915,6 +915,9 @@ vi_comment_out(EditLine *el, int c) * NB: posix implies that we should enter insert mode, however * this is against historical precedent... */ +#ifdef __weak_reference +extern char *get_alias_text(const char *) __weak_reference(get_alias_text); +#endif protected el_action_t /*ARGSUSED*/ vi_alias(EditLine *el, int c) @@ -922,8 +925,6 @@ vi_alias(EditLine *el, int c) #ifdef __weak_reference char alias_name[3]; char *alias_text; - extern char *get_alias_text(const char *) - __weak_reference(get_alias_text); if (get_alias_text == 0) { return CC_ERROR;