From e2d208bd0b52e4362e9e9e47e3bbac91f9308831 Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Mon, 22 Aug 2011 18:33:39 +0000 Subject: - Update to 20110822 Changes: http://savannah.gnu.org/forum/forum.php?forum_id=6912 PR: ports/160002 Submitted by: sunpoet (myself) Approved by: Chris Howey (maintainer) --- sysutils/parallel/files/patch-src__parallel | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'sysutils/parallel/files/patch-src__parallel') diff --git a/sysutils/parallel/files/patch-src__parallel b/sysutils/parallel/files/patch-src__parallel index 55027e8bed62..b1d897a6c96e 100644 --- a/sysutils/parallel/files/patch-src__parallel +++ b/sysutils/parallel/files/patch-src__parallel @@ -1,10 +1,10 @@ ---- ./src/parallel.orig 2011-07-22 07:24:21.000000000 -0500 -+++ ./src/parallel 2011-07-22 07:33:44.000000000 -0500 -@@ -3963,28 +3963,42 @@ +--- src/parallel.orig 2011-08-22 07:17:43.000000000 +0800 ++++ src/parallel 2011-08-22 23:51:57.455272434 +0800 +@@ -4073,28 +4073,42 @@ # Maximal command line length (for -m and -X) sub max_length { -- # Find the max_length of a command line +- # Find the max_length of a command line and cache it - # Returns: - # number of chars on the longest command line allowed + # FreeBSD code: @@ -15,7 +15,12 @@ - } else { - # -s is too long: Find the correct - $Limits::Command::line_max_len = binary_find_max_length(0,$::opt_s); -- } ++ $Limits::Command::line_max_len = `getconf ARG_MAX` - 1024; ++ if ($::opt_s) { ++ if ($::opt_s > $Limits::Command::line_max_len) { ++ print STDERR "$Global::progname: ", ++ "you are setting value for -s greater than $Limits::Command::line_max_len\n"; + } - if($::opt_s <= $Limits::Command::line_max_len) { - $Limits::Command::line_max_len = $::opt_s; - } else { @@ -24,20 +29,13 @@ - } - } else { - $Limits::Command::line_max_len = real_max_length(); -- } -+ $Limits::Command::line_max_len = `getconf ARG_MAX` - 1024; -+ if ($::opt_s) { -+ if ($::opt_s > $Limits::Command::line_max_len) { -+ print STDERR "$Global::progname: ", -+ "you are setting value for -s greater than $Limits::Command::line_max_len\n"; -+ } -+ $Limits::Command::line_max_len = $::opt_s; -+ } ++ $Limits::Command::line_max_len = $::opt_s; + } } return $Limits::Command::line_max_len; + +# ORIGINAL code: -+# # Find the max_length of a command line ++# # Find the max_length of a command line and cache it +# # Returns: +# # number of chars on the longest command line allowed +# if(not $Limits::Command::line_max_len) { -- cgit v1.2.3