Module Name: src
Committed By: christos
Date: Wed Jun 18 13:03:08 UTC 2014
Modified Files:
src/lib/libedit: vi.c
Log Message:
accomodate FreeBSD's flavor of weak references.
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/lib/libedit/vi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libedit/vi.c
diff -u src/lib/libedit/vi.c:1.43 src/lib/libedit/vi.c:1.44
--- src/lib/libedit/vi.c:1.43 Mon Jan 16 09:57:45 2012
+++ src/lib/libedit/vi.c Wed Jun 18 09:03:08 2014
@@ -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 __att
* 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;