From nobody Fri Dec 08 23:31:05 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sn6pL1DSZz53c8k; Fri, 8 Dec 2023 23:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sn6pL0kmtz3DtB; Fri, 8 Dec 2023 23:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702078266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9lrnCPpBbEBtOaBIuhaext1ZQYsdyqtq6HwmaBTNFQ=; b=Eek25F1ThWo9JQMxxlPR2kDtItn6WO1l9aCdBx8aWI8/yShZ7umrO3k21AW9L/mqUiQP0W CSTv4lRUoZnrSOzFLqzpSJoCESfyvPzK2XowJGnwKYxMbjfAxeOBao9V4GJ/zzj72z9LTK jSWhjc2qI5ql77oPqBz9fyBEzku7sinAkaJk3U1o9ILDPpoUZhTIVOJpidv7dgQwEHan7o Ki7IYV0Bw6IerqbnaHbrcuL3kZ4+ejqbX3Rw1+99qtv1UyJdGsYznZ+OSjUyd7/Mrh4Sm7 PxCaqos1IHXSxf9ZK2TXlG8A20Kj81wO78aWu+daudGj6OsMUeYp7+ufxduLOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702078266; a=rsa-sha256; cv=none; b=q0YaeJsfAI7EeIXoGl/C76F09Y5dH92n0OtVn3Hvp5Mgjb/06CbG/CYPd58AQnKPls9mCZ DQDWEfPUctuWnfH9xvcrLewdt39DYsTqYoEzMCrLwWwCRtNIG1BE32AcPhfM2cAOYrHOUk SlBoHqMNsvzxUTOdRgYcPKs03EIIUvc8S7IwhO5Rc9CY6LmSbbDfGzqXnqTZ5DxP4Fz60c iMc5DEPZAnWKkNcbJCP+cPauXuBYLFnH2CRAVVv58FXiuMvWg5LbOLMKSsQW8ENhs9MYUh zKSCt1IrH7qM/lBGamGg5SOYkTs3Vfzg1HKef0jWHqxXPfLA2qWWB7hdF/p0Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702078266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9lrnCPpBbEBtOaBIuhaext1ZQYsdyqtq6HwmaBTNFQ=; b=dF06aq74YS4yy0MQhRRZkL8WW0w9VKZBFE0zU/64IE8FMIu2QD++5h65H/EI47XLxzbdy4 lu5ptwZdl+c3oi/NyhK5hNXoNYs5je9ukvkZDIyYJ1BxJ8oikGtMxbRFQzzVKVJwtWVXmD 3PRSy6GsL1OXobyFSAvstgePhhJls87DpZMrBEl8DiaFwmLIXn9n3S3LUsE3spUx3VYsuM sAU35vC/k9h9QijWW2oWc8FsgskOiPQwvU8UTrWOHAj5MMCE4PQSD2bbwTQorRJAlsGnW1 J4nfhYXkRqgo5R2iZLfyt/GSQcpp8Htq32uzKGneGp6yOWOE+BsGufcKMbdPqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sn6pK6w0fzgbG; Fri, 8 Dec 2023 23:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3B8NV51r067556; Fri, 8 Dec 2023 23:31:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B8NV5iW067553; Fri, 8 Dec 2023 23:31:05 GMT (envelope-from git) Date: Fri, 8 Dec 2023 23:31:05 GMT Message-Id: <202312082331.3B8NV5iW067553@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Brooks Davis Subject: git: 9aff84db2839 - main - sysutils/LPRng: remove needless sbrk use List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9aff84db283960642a10347a0e531226ff76466e Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/ports/commit/?id=9aff84db283960642a10347a0e531226ff76466e commit 9aff84db283960642a10347a0e531226ff76466e Author: Brooks Davis AuthorDate: 2023-12-08 20:02:23 +0000 Commit: Brooks Davis CommitDate: 2023-12-08 23:29:39 +0000 sysutils/LPRng: remove needless sbrk use Move malloc_area global under defined(DEMALLOC) which contains all consumers. Delete unused Brk_check_size function. --- sysutils/LPRng/Makefile | 5 +---- sysutils/LPRng/files/patch-src__common__lpd.c | 25 ++++++++++++++++++++-- sysutils/LPRng/files/patch-src_common_utilities.c | 25 ++++++++++++++++++++++ sysutils/LPRng/files/patch-src_include_utilities.h | 10 +++++++++ 4 files changed, 59 insertions(+), 6 deletions(-) diff --git a/sysutils/LPRng/Makefile b/sysutils/LPRng/Makefile index c822adc90691..36ae870cb4bb 100644 --- a/sysutils/LPRng/Makefile +++ b/sysutils/LPRng/Makefile @@ -1,6 +1,6 @@ PORTNAME= LPRng PORTVERSION= 3.8.C -PORTREVISION= 5 +PORTREVISION= 6 PORTEPOCH= 1 CATEGORIES= sysutils print MASTER_SITES= SF/${PORTNAME:tl}/${PORTNAME:tl} @@ -13,9 +13,6 @@ WWW= https://lprng.sourceforge.net/ LICENSE= ART10 GPLv2 LICENSE_COMB= dual -BROKEN_aarch64= Fails to link: missing sbrk -BROKEN_riscv64= Fails to link: missing sbrk - LIB_DEPENDS= libgdbm.so:databases/gdbm USES= gmake ssl diff --git a/sysutils/LPRng/files/patch-src__common__lpd.c b/sysutils/LPRng/files/patch-src__common__lpd.c index d04b67598230..2ac7b2462566 100644 --- a/sysutils/LPRng/files/patch-src__common__lpd.c +++ b/sysutils/LPRng/files/patch-src__common__lpd.c @@ -1,6 +1,27 @@ --- src/common/lpd.c.orig +++ src/common/lpd.c -@@ -979,7 +979,6 @@ +@@ -64,7 +64,9 @@ + * + ****************************************************************************/ + ++#ifdef DMALLOC + static char *malloc_area; ++#endif + + int main(int argc, char *argv[], char *envp[]) + { +@@ -359,9 +361,9 @@ + first_scan = 0; + } + ++#ifdef DMALLOC + malloc_area = sbrk(0); + +-#ifdef DMALLOC + DEBUG1( "lpd: LOOP START - sbrk 0x%lx", (long)malloc_area ); + { + extern int dmalloc_outfile_fd; +@@ -979,7 +981,6 @@ * libwrap/tcp_wrappers: * draht@suse.de, Mon Jan 28 2002 */ @@ -8,7 +29,7 @@ struct request_info wrap_req; request_init(&wrap_req, RQ_DAEMON, "lpd" , RQ_FILE, newsock, NULL); -@@ -993,7 +992,6 @@ +@@ -993,7 +994,6 @@ close( newsock ); return; } diff --git a/sysutils/LPRng/files/patch-src_common_utilities.c b/sysutils/LPRng/files/patch-src_common_utilities.c new file mode 100644 index 000000000000..553042f6d6fe --- /dev/null +++ b/sysutils/LPRng/files/patch-src_common_utilities.c @@ -0,0 +1,25 @@ +--- src/common/utilities.c.orig ++++ src/common/utilities.c +@@ -600,22 +600,6 @@ + return( n ); + } + +- +-char *Brk_check_size( void ) +-{ +- static char b[128]; +- static char* Top_of_mem; /* top of allocated memory */ +- char *s = sbrk(0); +- int v = s - Top_of_mem; +- if( Top_of_mem == 0 ){ +- plp_snprintf(b, sizeof(b), "BRK: initial value 0x%lx", Cast_ptr_to_long(s) ); +- } else { +- plp_snprintf(b, sizeof(b), "BRK: new value 0x%lx, increment %d", Cast_ptr_to_long(s), v ); +- } +- Top_of_mem = s; +- return(b); +-} +- + char *mystrncat( char *s1, const char *s2, int len ) + { + int size; diff --git a/sysutils/LPRng/files/patch-src_include_utilities.h b/sysutils/LPRng/files/patch-src_include_utilities.h new file mode 100644 index 000000000000..cbeacfeac350 --- /dev/null +++ b/sysutils/LPRng/files/patch-src_include_utilities.h @@ -0,0 +1,10 @@ +--- src/include/utilities.h.orig ++++ src/include/utilities.h +@@ -54,7 +54,6 @@ + int plp_sleep( int i ); + int Get_max_servers( void ); + int Get_max_fd( void ); +-char *Brk_check_size( void ); + char *mystrncat( char *s1, const char *s2, int len ); + char *mystrncpy( char *s1, const char *s2, int len ); + int Get_nonblock_io( int fd );