I’m good with this. -- arcf...@sacrideo.us | http://www.sacrideo.us | Skype: arcfide
From: Daniel Dickman Sent: Sunday, November 4, 2018 2:05 PM To: Aaron W. Hsu Cc: ports@openbsd.org Subject: nn -- build without sbrk news/nn uses sbrk(2) to print some memory diagnostics. Delete this code to eliminate use of sbrk. ok? Index: Makefile =================================================================== RCS file: /cvs/ports/news/nn/Makefile,v retrieving revision 1.16 diff -u -p -u -r1.16 Makefile --- Makefile 15 Apr 2017 14:11:35 -0000 1.16 +++ Makefile 4 Nov 2018 20:02:48 -0000 @@ -2,7 +2,7 @@ COMMENT = menu-based Usenet newsreader DISTNAME = nn-6.7.3 -REVISION = 3 +REVISION = 4 CATEGORIES = news HOMEPAGE = http://www.nndev.org Index: patches/patch-init_c =================================================================== RCS file: patches/patch-init_c diff -N patches/patch-init_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-init_c 4 Nov 2018 20:02:48 -0000 @@ -0,0 +1,25 @@ +$OpenBSD$ + +eliminate use of sbrk(2) + +Index: init.c +--- init.c.orig ++++ init.c +@@ -566,17 +566,8 @@ print_debug_info(void) + struct mallinfo mallinfo(), mi; + #endif + +- static long prev_mem = 0; +- long cur_mem; +- + clrdisp(); + tprintf("group=%s, nart=%ld\n\r", current_group->group_name, n_articles); +- +- cur_mem = (((long) sbrk(0)) - initial_memory_break) / 1024; +- +- tprintf("\nMemory usage: %ldk, previous: %ldk, change: %ldk\n\r", +- cur_mem, prev_mem, cur_mem - prev_mem); +- prev_mem = cur_mem; + + #ifdef USE_MALLOC_H + mi = mallinfo(); Index: patches/patch-nn_c =================================================================== RCS file: patches/patch-nn_c diff -N patches/patch-nn_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-nn_c 4 Nov 2018 20:02:48 -0000 @@ -0,0 +1,15 @@ +$OpenBSD$ + +eliminate use of sbrk(2) + +Index: nn.c +--- nn.c.orig ++++ nn.c +@@ -745,7 +745,6 @@ main(int argc, char *argv[]) + int say_welcome = 0, cmd; + flag_type access_mode = 0; + char *mask = NULL; +- initial_memory_break = (long) sbrk(0); + + #ifdef USE_MALLOC_H +