View | Details | Raw Unified | Return to bug 174645
Collapse All | Expand All

(-)parallel/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD: ports/sysutils/parallel/Makefile,v 1.30 2012/12/04 23:45:36 svnexp Exp $
2
# $FreeBSD: ports/sysutils/parallel/Makefile,v 1.30 2012/12/04 23:45:36 svnexp Exp $
3
3
4
PORTNAME=	parallel
4
PORTNAME=	parallel
5
PORTVERSION=	20121122
5
PORTVERSION=	20121222
6
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
7
MASTER_SITES=	GNU
7
MASTER_SITES=	GNU
8
8
(-)parallel/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (parallel-20121122.tar.bz2) = 0315336141612ba2ec1f76e6c8c58a72f4531777c96b79b91ef64b3980be584f
1
SHA256 (parallel-20121222.tar.bz2) = 0ce96ad4e36734baae7ce6c8d99d004810fbfdf5209d6f86d5b5fc9a92dc17f8
2
SIZE (parallel-20121122.tar.bz2) = 236294
2
SIZE (parallel-20121222.tar.bz2) = 237603
(-)parallel/files/patch-src__parallel (-21 / +38 lines)
Lines 1-28 Link Here
1
--- ./src/parallel.orig	2012-08-22 21:25:08.000000000 -0500
1
--- ./src/parallel.orig	2012-12-22 14:56:17.000000000 -0600
2
+++ ./src/parallel	2012-08-22 21:25:24.000000000 -0500
2
+++ ./src/parallel	2012-12-22 14:58:55.000000000 -0600
3
@@ -4571,21 +4571,15 @@
3
@@ -4790,29 +4790,19 @@
4
     # Returns:
4
 package Limits::Command;
5
     #   number of chars on the longest command line allowed
5
 
6
     if(not $Limits::Command::line_max_len) {
6
 # Maximal command line length (for -m and -X)
7
+	$Limits::Command::line_max_len = `getconf ARG_MAX` - 1024;
7
-sub max_length {
8
 	if($::opt_s) {
8
-    # Find the max_length of a command line and cache it
9
-	    if(is_acceptable_command_line_length($::opt_s)) {
9
-    # Returns:
10
-		$Limits::Command::line_max_len = $::opt_s;
10
-    #   number of chars on the longest command line allowed
11
-    if(not $Limits::Command::line_max_len) {
12
-	if($opt::s) {
13
-	    if(is_acceptable_command_line_length($opt::s)) {
14
-		$Limits::Command::line_max_len = $opt::s;
11
-	    } else {
15
-	    } else {
12
-		# -s is too long: Find the correct
16
-		# -s is too long: Find the correct
13
-		$Limits::Command::line_max_len = binary_find_max_length(0,$::opt_s);
17
-		$Limits::Command::line_max_len = binary_find_max_length(0,$opt::s);
14
+	    if($::opt_s > $Limits::Command::line_max_len) {
18
-	    }
15
+	     	print STDERR "$Global::progname: ",
19
-	    if($opt::s <= $Limits::Command::line_max_len) {
16
+	     	"you are setting value for -s greater than $Limits::Command::line_max_len\n";
20
-		$Limits::Command::line_max_len = $opt::s;
17
 	    }
18
 	    if($::opt_s <= $Limits::Command::line_max_len) {
19
 		$Limits::Command::line_max_len = $::opt_s;
20
-	    } else {
21
-	    } else {
21
-		::warning("Value for -s option ",
22
-		::warning("Value for -s option ",
22
-			  "should be < $Limits::Command::line_max_len.\n");
23
-			  "should be < $Limits::Command::line_max_len.\n");
23
 	    }
24
-	    }
24
-	} else {
25
-	} else {
25
-	    $Limits::Command::line_max_len = real_max_length();
26
-	    $Limits::Command::line_max_len = real_max_length();
26
 	}
27
-	}
27
     }
28
-    }
28
     return $Limits::Command::line_max_len;
29
-    return $Limits::Command::line_max_len;
30
+sub max_length {                                                                 
31
+    # FreeBSD code:                                                                 
32
+    if(not $Limits::Command::line_max_len) {                                        
33
+    	$Limits::Command::line_max_len = `getconf ARG_MAX` - 1024;                      
34
+    	if ($opt::s) {                                                                 
35
+        	if ($opt::s > $Limits::Command::line_max_len) {                            
36
+         		print STDERR "$Global::progname: ",                                        
37
+         		"you are setting value for -s greater than $Limits::Command::line_max_len\n";
38
+        	}                                                                           
39
+        	$Limits::Command::line_max_len = $opt::s;                                  
40
+    	}                                                                               
41
+    }                                                                               
42
+    return $Limits::Command::line_max_len;                                          
43
 }
44
 
45
 sub real_max_length {

Return to bug 174645