From 98b2d52a6baafc103826471fccc489b1fb953246 Mon Sep 17 00:00:00 2001 From: John Marino Date: Thu, 10 May 2012 22:19:31 +0200 Subject: [PATCH] new libedit: Local modifications to enable build The unmodified libedit source doesn't build on DragonFly without minor modifications to three files. --- contrib/libedit/src/el.c | 4 ---- contrib/libedit/src/sys.h | 4 ---- contrib/libedit/src/vi.c | 7 +++---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/contrib/libedit/src/el.c b/contrib/libedit/src/el.c index b11607aa7d..6defa4471f 100644 --- a/contrib/libedit/src/el.c +++ b/contrib/libedit/src/el.c @@ -41,10 +41,6 @@ __RCSID("$NetBSD: el.c,v 1.70 2012/03/11 21:14:56 christos Exp $"); #endif #endif /* not lint && not SCCSID */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 4096 -#endif - /* * el.c: EditLine interface functions */ diff --git a/contrib/libedit/src/sys.h b/contrib/libedit/src/sys.h index ae4eaaf413..66ed4cfc3b 100644 --- a/contrib/libedit/src/sys.h +++ b/contrib/libedit/src/sys.h @@ -127,10 +127,6 @@ wchar_t *wcsdup(const wchar_t *); typedef unsigned int u_int32_t; #endif -#ifndef SIZE_T_MAX -#define SIZE_T_MAX ((size_t)-1) -#endif - #define REGEX /* Use POSIX.2 regular expression functions */ #undef REGEXP /* Use UNIX V8 regular expression functions */ diff --git a/contrib/libedit/src/vi.c b/contrib/libedit/src/vi.c index ec9abbd70c..87243f6c83 100644 --- a/contrib/libedit/src/vi.c +++ b/contrib/libedit/src/vi.c @@ -918,15 +918,14 @@ 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); +#ifdef __weak_extern +extern char *my_get_alias_text(const char *) __weak_extern(get_alias_text); #endif protected el_action_t /*ARGSUSED*/ vi_alias(EditLine *el, Int c __attribute__((__unused__))) { -#ifdef __weak_reference +#ifdef __weak_extern char alias_name[3]; char *alias_text; -- 2.41.0