Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit accomodate FreeBSD's flavor of weak references.
details: https://anonhg.NetBSD.org/src/rev/8a581d3e3b8b
branches: trunk
changeset: 330032:8a581d3e3b8b
user: christos <christos%NetBSD.org@localhost>
date: Wed Jun 18 13:03:08 2014 +0000
description:
accomodate FreeBSD's flavor of weak references.
diffstat:
lib/libedit/vi.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diffs (47 lines):
diff -r ebdd9a53e680 -r 8a581d3e3b8b lib/libedit/vi.c
--- a/lib/libedit/vi.c Wed Jun 18 10:51:03 2014 +0000
+++ b/lib/libedit/vi.c Wed Jun 18 13:03:08 2014 +0000
@@ -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 @@
* 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;
Home |
Main Index |
Thread Index |
Old Index