From 997ef2836f76db6e085234444e128171d978892f Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Tue, 3 Oct 2017 13:33:38 +0300 Subject: [PATCH] libedit: local configuration & mapfile --- lib/libedit/Makefile | 6 +++--- lib/libedit/config.h | 13 ++++++++++--- lib/libedit/mapfile | 44 ++++++++++++++++++++++++++++++++++++++++++++ lib/libedit/sys.h | 9 --------- 4 files changed, 57 insertions(+), 15 deletions(-) create mode 100644 lib/libedit/mapfile diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile index 31d53c032d..117dd5d74a 100644 --- a/lib/libedit/Makefile +++ b/lib/libedit/Makefile @@ -13,8 +13,8 @@ MAN= editline.3 editrc.5 editline.7 LIBEDITDIR?=${.CURDIR} -INCS= histedit.h -INCSDIR=/usr/include +INCS= ${.CURDIR}/histedit.h +SHLIB_LDADD+= -M${.CURDIR}/mapfile -lncurses CLEANFILES+=common.h.tmp emacs.h.tmp fcns.h.tmp func.h.tmp CLEANFILES+=help.h.tmp vi.h.tmp tc1.o tc1 .depend @@ -77,4 +77,4 @@ includes: ${DESTDIR}/usr/include .include -.include +${SOBJS}: ${BUILDFIRST} diff --git a/lib/libedit/config.h b/lib/libedit/config.h index e46383cdf7..0b4163ab67 100644 --- a/lib/libedit/config.h +++ b/lib/libedit/config.h @@ -2,9 +2,9 @@ /* config.h. Generated automatically by configure. */ /* #undef SUNOS */ -#define HAVE_SYS_CDEFS_H 1 +/* #undef HAVE_SYS_CDEFS_H */ #define HAVE_TERMCAP_H 1 -/* #undef HAVE_CURSES_H */ +#define HAVE_CURSES_H 1 /* Define to 1 if you have the `getline' function. */ #define HAVE_GETLINE 1 @@ -20,6 +20,13 @@ #define HAVE_STRVIS 1 #define HAVE_STRUNVIS 1 -#define HAVE_STRUCT_DIRENT_D_NAMLEN 1 +/* #undef HAVE_STRUCT_DIRENT_D_NAMLEN */ + +#ifndef __STDC_ISO_10646__ +#define __STDC_ISO_10646__ +#endif +#ifndef __dso_hidden +#define __dso_hidden __attribute__((__visibility__("hidden"))) +#endif #include "sys.h" diff --git a/lib/libedit/mapfile b/lib/libedit/mapfile new file mode 100644 index 0000000000..39fb44ab71 --- /dev/null +++ b/lib/libedit/mapfile @@ -0,0 +1,44 @@ +$mapfile_version 2 +SYMBOL_SCOPE { +global: +el_init; +el_end; +el_reset; +el_gets; +el_wgets; +el_getc; +el_wgetc; +el_push; +el_wpush; +el_parse; +el_wparse; +el_set; +el_wset; +el_get; +el_wget; +el_source; +el_resize; +el_line; +el_wline; +el_insertstr; +el_winsertstr; +el_deletestr; +history_init; +history_winit; +history_end; +history_wend; +history; +history_w; +tok_init; +tok_winit; +tok_end; +tok_wend; +tok_reset; +tok_wreset; +tok_line; +tok_wline; +tok_str; +tok_wstr; +local: +*; +}; diff --git a/lib/libedit/sys.h b/lib/libedit/sys.h index ec198f4c8d..47c3303a29 100644 --- a/lib/libedit/sys.h +++ b/lib/libedit/sys.h @@ -85,13 +85,4 @@ ssize_t getline(char **line, size_t *len, FILE *fp); #define REGEX /* Use POSIX.2 regular expression functions */ #undef REGEXP /* Use UNIX V8 regular expression functions */ -#if defined(__sun) -extern int tgetent(char *, const char *); -extern int tgetflag(char *); -extern int tgetnum(char *); -extern int tputs(const char *, int, int (*)(int)); -extern char* tgoto(const char*, int, int); -extern char* tgetstr(char*, char**); -#endif - #endif /* _h_sys */ -- 2.11.4.GIT