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
|
* Copyright (c) 1992, 1993
|
||||||
@ -42,7 +42,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93";
|
static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint && not SCCSID */
|
#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
|
* NB: posix implies that we should enter insert mode, however
|
||||||
* this is against historical precedent...
|
* this is against historical precedent...
|
||||||
*/
|
*/
|
||||||
#ifdef __weak_reference
|
#if defined(__weak_reference)
|
||||||
__weakref_visible char *my_get_alias_text(const char *)
|
# define libedit_weak(a) __weak_reference(a)
|
||||||
__weak_reference(get_alias_text);
|
# define libedit_weak_visible __weakref_visible
|
||||||
|
#elif defined(__weak_extern)
|
||||||
|
# define libedit_weak(a) __weak_extern(a)
|
||||||
|
# define libedit_weak_visible
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef libedit_weak
|
||||||
|
libedit_weak_visible
|
||||||
|
char *my_get_alias_text(const char *) libedit_weak(get_alias_text);
|
||||||
|
#endif
|
||||||
|
|
||||||
protected el_action_t
|
protected el_action_t
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
vi_alias(EditLine *el, Int c __attribute__((__unused__)))
|
vi_alias(EditLine *el, Int c __attribute__((__unused__)))
|
||||||
{
|
{
|
||||||
#ifdef __weak_reference
|
#ifdef libedit_weak
|
||||||
char alias_name[3];
|
char alias_name[3];
|
||||||
char *alias_text;
|
char *alias_text;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user