__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.
This commit is contained in:
parent
f903859f35
commit
d257e1e9bd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue