From 1d5b702239ef1fbfbb372c52c83abad99a94fe76 Mon Sep 17 00:00:00 2001 From: jperkin Date: Tue, 21 Apr 2020 13:07:01 +0000 Subject: [PATCH] editline: Remove bogus SunOS-specific extern prototypes. These will differ in const handling depending on whether you use native curses or ncurses, and currently break ncurses. --- devel/editline/distinfo | 4 +++- devel/editline/patches/patch-src_sys.h | 20 +++++++++++++++++++ devel/editline/patches/patch-src_terminal.h | 22 +++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 devel/editline/patches/patch-src_sys.h create mode 100644 devel/editline/patches/patch-src_terminal.h diff --git a/devel/editline/distinfo b/devel/editline/distinfo index 9c0bd5c43cee..d02a66420185 100644 --- a/devel/editline/distinfo +++ b/devel/editline/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2020/03/22 22:32:11 tnn Exp $ +$NetBSD: distinfo,v 1.11 2020/04/21 13:07:01 jperkin Exp $ SHA1 (libedit-20191231-3.1.tar.gz) = 44891b6ceb0429fec0a118a1245c605410571d7d RMD160 (libedit-20191231-3.1.tar.gz) = a0e32d4bbb896b6f7e6567902e4205f2e435cd26 @@ -8,3 +8,5 @@ SHA1 (patch-Makefile.am) = c9c49476fcff0da3363874795fcf4b6ebd0f59de SHA1 (patch-ab) = 18297f76965ecd56834c94f6c9f780d3e05a44d8 SHA1 (patch-ac) = 666403d5ef03fea39081d7a657aefaa91746f788 SHA1 (patch-src_chartype.h) = ec6ff8c8417464b54cffcbf8752f07a599067685 +SHA1 (patch-src_sys.h) = 3c1f69b520b382e3a0308e7f8ffaddca65d91a8d +SHA1 (patch-src_terminal.h) = 5d658f7b7c3b88c0c3122a1be740f3a72d7d2370 diff --git a/devel/editline/patches/patch-src_sys.h b/devel/editline/patches/patch-src_sys.h new file mode 100644 index 000000000000..fb9f7cc53ffc --- /dev/null +++ b/devel/editline/patches/patch-src_sys.h @@ -0,0 +1,20 @@ +$NetBSD: patch-src_sys.h,v 1.1 2020/04/21 13:07:01 jperkin Exp $ + +Remove conflicting and unnecessary SunOS-specific defines. + +--- src/sys.h.orig 2018-05-25 17:50:45.000000000 +0000 ++++ src/sys.h +@@ -115,13 +115,4 @@ typedef unsigned int u_int32_t; + #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 */ diff --git a/devel/editline/patches/patch-src_terminal.h b/devel/editline/patches/patch-src_terminal.h new file mode 100644 index 000000000000..3efac2a01bc7 --- /dev/null +++ b/devel/editline/patches/patch-src_terminal.h @@ -0,0 +1,22 @@ +$NetBSD: patch-src_terminal.h,v 1.1 2020/04/21 13:07:01 jperkin Exp $ + +Remove conflicting and unnecessary SunOS-specific defines. + +--- src/terminal.h.orig 2018-05-25 17:50:45.000000000 +0000 ++++ src/terminal.h +@@ -80,15 +80,6 @@ typedef struct { + #define A_K_DE 6 + #define A_K_NKEYS 7 + +-#ifdef __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 +- + libedit_private void terminal_move_to_line(EditLine *, int); + libedit_private void terminal_move_to_char(EditLine *, int); + libedit_private void terminal_clear_EOL(EditLine *, int);