accomodate FreeBSD's flavor of weak references.
This commit is contained in:
parent
10c5c9874c
commit
0bd5e60967
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vi.c,v 1.43 2012/01/16 14:57:45 christos Exp $ */
|
||||
/* $NetBSD: vi.c,v 1.44 2014/06/18 13:03:08 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -42,7 +42,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: vi.c,v 1.43 2012/01/16 14:57:45 christos Exp $");
|
||||
__RCSID("$NetBSD: vi.c,v 1.44 2014/06/18 13:03:08 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint && not SCCSID */
|
||||
|
||||
@ -918,15 +918,24 @@ vi_comment_out(EditLine *el, Int c __attribute__((__unused__)))
|
||||
* NB: posix implies that we should enter insert mode, however
|
||||
* this is against historical precedent...
|
||||
*/
|
||||
#ifdef __weak_reference
|
||||
__weakref_visible char *my_get_alias_text(const char *)
|
||||
__weak_reference(get_alias_text);
|
||||
#if defined(__weak_reference)
|
||||
# define libedit_weak(a) __weak_reference(a)
|
||||
# define libedit_weak_visible __weakref_visible
|
||||
#elif defined(__weak_extern)
|
||||
# define libedit_weak(a) __weak_extern(a)
|
||||
# define libedit_weak_visible
|
||||
#endif
|
||||
|
||||
#ifdef libedit_weak
|
||||
libedit_weak_visible
|
||||
char *my_get_alias_text(const char *) libedit_weak(get_alias_text);
|
||||
#endif
|
||||
|
||||
protected el_action_t
|
||||
/*ARGSUSED*/
|
||||
vi_alias(EditLine *el, Int c __attribute__((__unused__)))
|
||||
{
|
||||
#ifdef __weak_reference
|
||||
#ifdef libedit_weak
|
||||
char alias_name[3];
|
||||
char *alias_text;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user