pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/editors/hnb editors/hnb: Fixed segfault in amd64 builds.
details: https://anonhg.NetBSD.org/pkgsrc/rev/ab9edcc06e02
branches: trunk
changeset: 387806:ab9edcc06e02
user: fox <fox%pkgsrc.org@localhost>
date: Mon Nov 26 09:15:53 2018 +0000
description:
editors/hnb: Fixed segfault in amd64 builds.
diffstat:
editors/hnb/Makefile | 5 +-
editors/hnb/distinfo | 39 ++++-
editors/hnb/patches/patch-aa | 27 ---
editors/hnb/patches/patch-ab | 27 ---
editors/hnb/patches/patch-ac | 4 +-
editors/hnb/patches/patch-src_actions.c | 55 ++++++
editors/hnb/patches/patch-src_cal.c | 64 +++++++
editors/hnb/patches/patch-src_cli__macro.c | 47 +++++
editors/hnb/patches/patch-src_clipboard.c | 55 ++++++
editors/hnb/patches/patch-src_evilloop.c | 24 ++
editors/hnb/patches/patch-src_expanded.c | 72 ++++++++
editors/hnb/patches/patch-src_file.c | 42 ++++
editors/hnb/patches/patch-src_file__ascii.c | 65 +++++++
editors/hnb/patches/patch-src_file__help.c | 51 +++++
editors/hnb/patches/patch-src_file__hnb.c | 69 +++++++
editors/hnb/patches/patch-src_file__html.c | 65 +++++++
editors/hnb/patches/patch-src_file__opml.c | 69 +++++++
editors/hnb/patches/patch-src_file__ps.c | 38 ++++
editors/hnb/patches/patch-src_file__xml.c | 74 ++++++++
editors/hnb/patches/patch-src_libcli_cli.c | 104 ++++++++++++
editors/hnb/patches/patch-src_libcli_cli.h | 43 ++++
editors/hnb/patches/patch-src_libcli_cli__tokenize.c | 24 ++
editors/hnb/patches/patch-src_node.c | 79 +++++++++
editors/hnb/patches/patch-src_query.c | 29 +++
editors/hnb/patches/patch-src_search.c | 54 ++++++
editors/hnb/patches/patch-src_spell.c | 29 +++
editors/hnb/patches/patch-src_statcmds.c | 65 +++++++
editors/hnb/patches/patch-src_state.c | 42 ++++
editors/hnb/patches/patch-src_tree__misc.c | 164 +++++++++++++++++++
editors/hnb/patches/patch-src_tree__sort.c | 29 +++
editors/hnb/patches/patch-src_tree__todo.c | 48 +++++
editors/hnb/patches/patch-src_ui__binding.c | 68 +++++++
editors/hnb/patches/patch-src_ui__cli.c | 153 +++++++++++++++++
editors/hnb/patches/patch-src_ui__draw.c | 38 ++++
editors/hnb/patches/patch-src_ui__edit.c | 38 ++++
editors/hnb/patches/patch-src_ui__menu.c | 33 +++
editors/hnb/patches/patch-src_ui__overlay.c | 43 ++++
editors/hnb/patches/patch-src_ui__style.c | 47 +++++
38 files changed, 1961 insertions(+), 61 deletions(-)
diffs (truncated from 2194 to 300 lines):
diff -r f97535778d1a -r ab9edcc06e02 editors/hnb/Makefile
--- a/editors/hnb/Makefile Mon Nov 26 09:09:53 2018 +0000
+++ b/editors/hnb/Makefile Mon Nov 26 09:15:53 2018 +0000
@@ -1,14 +1,15 @@
-# $NetBSD: Makefile,v 1.27 2015/09/08 11:57:49 jperkin Exp $
+# $NetBSD: Makefile,v 1.28 2018/11/26 09:15:53 fox Exp $
#
DISTNAME= hnb-1.9.17
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=hnb/}
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://hnb.sourceforge.net/
COMMENT= Hierarchical data organizer
+LICENSE= gnu-gpl-v2
USE_TOOLS+= gmake
diff -r f97535778d1a -r ab9edcc06e02 editors/hnb/distinfo
--- a/editors/hnb/distinfo Mon Nov 26 09:09:53 2018 +0000
+++ b/editors/hnb/distinfo Mon Nov 26 09:15:53 2018 +0000
@@ -1,9 +1,40 @@
-$NetBSD: distinfo,v 1.6 2015/11/03 03:32:17 agc Exp $
+$NetBSD: distinfo,v 1.7 2018/11/26 09:15:53 fox Exp $
SHA1 (hnb-1.9.17.tar.gz) = b5204a9bda13b42ef04921e71f52e5bfe5412f13
RMD160 (hnb-1.9.17.tar.gz) = 1363eac8a785a3bad2ac319ae38726cd826268cf
SHA512 (hnb-1.9.17.tar.gz) = 48ca89336027b54ddec31064294595498f10927d9b69a115bfbdecf79ebc720873c0cc70dc646422f196cff7aa4fda68fc2f68f4ddacfac53d4363ed295d2e7a
Size (hnb-1.9.17.tar.gz) = 143700 bytes
-SHA1 (patch-aa) = f44cef4b2a3ccf20513420a1f57946e342aa2ee3
-SHA1 (patch-ab) = 9c87fbe5ddfb7525941cb8e1d66d377fbe726811
-SHA1 (patch-ac) = 88778957d3a52aa6c8b9811133dfe4f2ceca213e
+SHA1 (patch-ac) = d750eae0a0fbb61a75fce3d427bf2afdbeb806c6
+SHA1 (patch-src_actions.c) = 5c2f340e205c982d759415385f6f0038ee7ca404
+SHA1 (patch-src_cal.c) = 162a4acfa9a388ec5a1b1e9d8b5ac69f93715745
+SHA1 (patch-src_cli__macro.c) = 593bfaf56dd083ef0da45c3f320af095cd411bd1
+SHA1 (patch-src_clipboard.c) = 4dde4765825e5362f66c8b7c63ba40c1e154c63c
+SHA1 (patch-src_evilloop.c) = 4f55e0dabdeede6f33cebeb18d5c6b64c51bfbf7
+SHA1 (patch-src_expanded.c) = 772d71db739164ce59c9fe3d3b93b862063f3ee3
+SHA1 (patch-src_file.c) = 884445d3b5a2d9590ea6e1e0a1e6df98cf69bdab
+SHA1 (patch-src_file__ascii.c) = 7b523b941791b6337a13c11ce1a70c99a170b707
+SHA1 (patch-src_file__help.c) = 7a9604126a1fb4af182a1236eb5a873b82ae1690
+SHA1 (patch-src_file__hnb.c) = c2549af8b806eaef4fc760712657860d4f7b31ca
+SHA1 (patch-src_file__html.c) = 162f68b3e417b2eeb7a889ad23836dc4c79b2049
+SHA1 (patch-src_file__opml.c) = 588e1b339f0991c105d30fe077a8fa95bbdf6f9d
+SHA1 (patch-src_file__ps.c) = 7789097bd9e5ca1950e53295903a2edcb47a983e
+SHA1 (patch-src_file__xml.c) = 1bcda1d25bd1aa22e10c7eea40c7e99c05377f75
+SHA1 (patch-src_libcli_cli.c) = baabda1de8c8e24f370d06efbd9b0bd09262224d
+SHA1 (patch-src_libcli_cli.h) = c6b2ace10000bfd176418e2ecbcd8a2abb04a1e1
+SHA1 (patch-src_libcli_cli__tokenize.c) = 503d4cdd51a40773b75fe2fa8bbbafc3d1e16941
+SHA1 (patch-src_node.c) = cd6541ab5a2da5759106126d5e36e59b8b12e600
+SHA1 (patch-src_query.c) = 8f55f91444f9691655c54163c25ccb6bbad16bd0
+SHA1 (patch-src_search.c) = c7a88b365eb489a0e27d9badb1c67477aaa39b1c
+SHA1 (patch-src_spell.c) = eb05674a5c2c48e779412ba011b76a774a8087a0
+SHA1 (patch-src_statcmds.c) = 439c85247d7c2a3622cd5e09683932aac251bef6
+SHA1 (patch-src_state.c) = 24d5c9d710c8b90447f4aa2ea9431d9f2f571bed
+SHA1 (patch-src_tree__misc.c) = e8bbc96c577d77614d37f2d73ec8373304cdd245
+SHA1 (patch-src_tree__sort.c) = 95780063a609fa7b9dd1c3230e2d23dfb96ad8b5
+SHA1 (patch-src_tree__todo.c) = 43837efeddab88b4f03caa54d983f68042bda35e
+SHA1 (patch-src_ui__binding.c) = 334b952a2851d84a2e39d7256a68a584691534ca
+SHA1 (patch-src_ui__cli.c) = aa8663c7244122aac7f92f6c73369d31f41e36ad
+SHA1 (patch-src_ui__draw.c) = 637fc52cd1c44574a7f7342d92800be40e1092d6
+SHA1 (patch-src_ui__edit.c) = 6f01ecd0c0f9eaf9b05fa679b912de2ffeafb00d
+SHA1 (patch-src_ui__menu.c) = b6a7136b364f6c8f5e1afc01876601ad4f93dbf5
+SHA1 (patch-src_ui__overlay.c) = a8684a61bb97ebe85f4c3eec76ae77bcaa3c70b7
+SHA1 (patch-src_ui__style.c) = 0dbe1533587cb2bda9e077884a16df275269746e
diff -r f97535778d1a -r ab9edcc06e02 editors/hnb/patches/patch-aa
--- a/editors/hnb/patches/patch-aa Mon Nov 26 09:09:53 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-$NetBSD: patch-aa,v 1.3 2005/03/11 21:22:24 rillig Exp $
-
-In NetBSD-1.6.2, the <stdlib.h> header uses the word bufsize as a
-parameter name in a function prototype. The "file.h" header #defines
-bufsize to 4096, which leads to a parser error.
-
---- src/cal.c.orig Sun Mar 9 19:18:01 2003
-+++ src/cal.c Fri Mar 11 20:07:15 2005
-@@ -19,14 +19,14 @@
- */
-
- /**************/
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <time.h>
-+
- #include "tree.h"
- #include "cli.h"
- #include "ui.h"
- #include "file.h"
--
--#include <stdlib.h>
--#include <stdio.h>
--#include <time.h>
-
- static char *const wday[] =
- { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", " "};
diff -r f97535778d1a -r ab9edcc06e02 editors/hnb/patches/patch-ab
--- a/editors/hnb/patches/patch-ab Mon Nov 26 09:09:53 2018 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2005/03/11 21:22:24 rillig Exp $
-
-In NetBSD-1.6.2, the <stdlib.h> header uses the word bufsize as a
-parameter name in a function prototype. The "file.h" header #defines
-bufsize to 4096, which leads to a parser error.
-
---- src/ui_cli.c.orig Fri Mar 14 05:55:14 2003
-+++ src/ui_cli.c Fri Mar 11 20:19:55 2005
-@@ -22,14 +22,15 @@
- #include <config.h>
- #endif
-
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+
- #include "tree.h"
- #include "file.h"
- #include "path.h"
- #include "prefs.h"
- #include "cli.h"
--#include <stdio.h>
--#include <stdlib.h>
--#include <string.h>
- #include "ui_cli.h"
-
-
diff -r f97535778d1a -r ab9edcc06e02 editors/hnb/patches/patch-ac
--- a/editors/hnb/patches/patch-ac Mon Nov 26 09:09:53 2018 +0000
+++ b/editors/hnb/patches/patch-ac Mon Nov 26 09:15:53 2018 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-ac,v 1.1 2005/10/01 18:52:03 kristerw Exp $
+$NetBSD: patch-ac,v 1.2 2018/11/26 09:15:53 fox Exp $
+
+Added the curses library path for pkgsrc.
--- src/Makefile.orig Sat Oct 1 20:43:07 2005
+++ src/Makefile Sat Oct 1 20:43:40 2005
diff -r f97535778d1a -r ab9edcc06e02 editors/hnb/patches/patch-src_actions.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/hnb/patches/patch-src_actions.c Mon Nov 26 09:15:53 2018 +0000
@@ -0,0 +1,55 @@
+$NetBSD: patch-src_actions.c,v 1.1 2018/11/26 09:15:53 fox Exp $
+
+1. Replaced int with uint64_t to avoid truncating pointer to (32bit)
+ int by using a wider type.
+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to
+ help convert the pointer to uint64_t.
+
+This prevents the segfault on startup in amd64 systems.
+
+--- src/actions.c.orig 2003-03-14 01:06:36.000000000 +0000
++++ src/actions.c
+@@ -32,7 +32,7 @@
+ static char web_command[255] = "galeon -n *";
+ static char mail_command[255] = "rxvt -rv +sb -e mutt *";
+
+-static int cmd_system(int argc, char **argv, void *data){
++static uint64_t cmd_system(int argc, char **argv, void *data){
+ Node *pos=(Node *)data;
+ int ui_was_inited = ui_inited;
+ if (argc>1) {
+@@ -42,7 +42,7 @@
+ if (ui_was_inited)
+ ui_init ();
+ }
+- return (int)pos;
++ return PTR_TO_UINT64(pos);
+ }
+
+ static int action_node (Node *node)
+@@ -136,21 +136,21 @@
+ * url/email address substring,.. and launches an app based on that?
+ *
+ */
+-static int cmd_action (int argc, char **argv, void *data)
++static uint64_t cmd_action (int argc, char **argv, void *data)
+ {
+ Node *pos = (Node *) data;
+ Node *node = node_right (pos);
+
+ while (node) {
+ if (!action_node (node))
+- return (int) pos;
++ return PTR_TO_UINT64(pos);
+ node = node_down (node);
+ }
+ if (!action_node (pos)) {
+- return (int) pos;
++ return PTR_TO_UINT64(pos);
+ } else {
+ cli_outfunf ("nothing to do");
+- return (int) pos;
++ return PTR_TO_UINT64(pos);
+ }
+
+ /***
diff -r f97535778d1a -r ab9edcc06e02 editors/hnb/patches/patch-src_cal.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/hnb/patches/patch-src_cal.c Mon Nov 26 09:15:53 2018 +0000
@@ -0,0 +1,64 @@
+$NetBSD: patch-src_cal.c,v 1.1 2018/11/26 09:15:53 fox Exp $
+
+In NetBSD-1.6.2, the <stdlib.h> header uses the word bufsize as a
+parameter name in a function prototype. The "file.h" header #defines
+bufsize to 4096, which leads to a parser error.
+
+Above fix made by rilling on 2005/03/11
+
+1. Replaced int with uint64_t to avoid truncating pointer to (32bit)
+ int by using a wider type.
+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to
+ help convert the pointer to uint64_t.
+
+This prevents the segfault on startup in amd64 systems.
+
+--- src/cal.c.orig 2003-03-14 01:06:36.000000000 +0000
++++ src/cal.c
+@@ -19,15 +19,15 @@
+ */
+
+ /**************/
++#include <stdlib.h>
++#include <stdio.h>
++#include <time.h>
++
+ #include "tree.h"
+ #include "cli.h"
+ #include "ui.h"
+ #include "file.h"
+
+-#include <stdlib.h>
+-#include <stdio.h>
+-#include <time.h>
+-
+ static char *const wday[] =
+ { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", " "};
+
+@@ -35,7 +35,7 @@
+ "", "January", "February", "March", "April", "May" ,"June", "July",
+ "August", "September", "October", "November" , "December"};
+
+-static int insert_cal(int argc, char **argv, void *data){
++static uint64_t insert_cal(int argc, char **argv, void *data){
+ Node *pos=(void *)data;
+
+ int year;
+@@ -44,7 +44,7 @@
+
+ if( (argc!=3) || (atoi(argv[1])>12 )){
+ cli_outfunf("usage: %s <month> <year>", argv[0]);
+- return (int)data;
++ return PTR_TO_UINT64(data);
+ }
+
+ month=atoi(argv[1]);
+@@ -96,7 +96,7 @@
+ }
+ }
+
+- return (int)pos;
++ return PTR_TO_UINT64(pos);
+ }
+
+ /*
diff -r f97535778d1a -r ab9edcc06e02 editors/hnb/patches/patch-src_cli__macro.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/hnb/patches/patch-src_cli__macro.c Mon Nov 26 09:15:53 2018 +0000
@@ -0,0 +1,47 @@
+$NetBSD: patch-src_cli__macro.c,v 1.1 2018/11/26 09:15:53 fox Exp $
+
+1. Replaced int with uint64_t to avoid truncating pointer to (32bit)
+ int by using a wider type.
+2. Replaced pointer to int type cast with a macro PTR_TO_UINT64(x) to
+ help convert the pointer to uint64_t.
+
+This prevents the segfault on startup in amd64 systems.
+
+--- src/cli_macro.c.orig 2003-03-09 20:44:27.000000000 +0000
++++ src/cli_macro.c
+@@ -80,7 +80,7 @@
+ return pos;
+ }
+
+-static int cmd_macro (int argc, char **argv, void *data)
++static uint64_t cmd_macro (int argc, char **argv, void *data)
+ {
+ Node *pos=(Node *)data;
+ if(argc==1){
+@@ -88,7 +88,7 @@
+ } else if(argc==2){
+ MacroT *tmacro=lookup_macro(argv[1]);
+ if(tmacro){
+- return (int)do_macro(tmacro,pos);
++ return PTR_TO_UINT64(do_macro(tmacro,pos));
+ } else {
Home |
Main Index |
Thread Index |
Old Index