rename to a mor general name

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/genlink@2460 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2010-10-03 09:25:35 +00:00
commit 2ec1bbf0be
403 changed files with 32261 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
http://bugs.gentoo.org/301116
tweaked a little to avoid regenerating autotools
2009-07-29 Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
* configure.in: Check for sys/user.h and linux/binfmts.h
headers.
* job.c: Include them if available.
(construct_command_argv_internal): When constructing the command
line with 'sh -c', use multiple arguments together with eval
expansion to evade the Linux per-argument length limit
MAX_ARG_STRLEN if it is defined.
Problem reported against Automake by Xan Lopez <xan <at> gnome.org>.
--- job.c.orig 2010-01-15 18:36:53.000000000 +0200
+++ job.c 2010-01-15 18:41:09.000000000 +0200
@@ -29,6 +29,11 @@
#include <string.h>
+#if defined(__linux__) /* defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H) */
+#include <sys/user.h>
+#include <linux/binfmts.h>
+#endif
+
/* Default shell to use. */
#ifdef WINDOWS32
#include <windows.h>
@@ -2697,9 +2702,19 @@
#endif
unsigned int line_len = strlen (line);
+#ifdef MAX_ARG_STRLEN
+ static char eval_line[] = "eval\\ \\\"set\\ x\\;\\ shift\\;\\ ";
+#define ARG_NUMBER_DIGITS 5
+#define EVAL_LEN (sizeof(eval_line)-1 + shell_len + 4 \
+ + (7 + ARG_NUMBER_DIGITS) * 2 * line_len / (MAX_ARG_STRLEN - 2))
+#else
+#define EVAL_LEN 0
+#endif
char *new_line = (char *) alloca (shell_len + (sizeof (minus_c) - 1)
- + (line_len * 2) + 1);
+ + (line_len*2) + 1 + EVAL_LEN);
+
char *command_ptr = NULL; /* used for batch_mode_shell mode */
+ char *args_ptr;
# ifdef __EMX__ /* is this necessary? */
if (!unixy_shell)
@@ -2712,6 +2727,30 @@
bcopy (minus_c, ap, sizeof (minus_c) - 1);
ap += sizeof (minus_c) - 1;
command_ptr = ap;
+
+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
+ if (unixy_shell && line_len > MAX_ARG_STRLEN)
+ {
+ unsigned j;
+ memcpy (ap, eval_line, sizeof (eval_line) - 1);
+ ap += sizeof (eval_line) - 1;
+ for (j = 1; j <= 2 * line_len / (MAX_ARG_STRLEN - 2); j++)
+ ap += sprintf (ap, "\\$\\{%u\\}", j);
+ *ap++ = '\\';
+ *ap++ = '"';
+ *ap++ = ' ';
+ /* Copy only the first word of SHELL to $0. */
+ for (p = shell; *p != '\0'; ++p)
+ {
+ if (isspace ((unsigned char)*p))
+ break;
+ *ap++ = *p;
+ }
+ *ap++ = ' ';
+ }
+#endif
+ args_ptr = ap;
+
for (p = line; *p != '\0'; ++p)
{
if (restp != NULL && *p == '\n')
@@ -2760,6 +2799,14 @@
}
#endif
*ap++ = *p;
+
+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
+ if (unixy_shell && line_len > MAX_ARG_STRLEN && (ap - args_ptr > MAX_ARG_STRLEN - 2))
+ {
+ *ap++ = ' ';
+ args_ptr = ap;
+ }
+#endif
}
if (ap == new_line + shell_len + sizeof (minus_c) - 1)
/* Line was empty. */

View File

@@ -0,0 +1,55 @@
Fix from upstream for running tests when LC_ALL is set to non-C
http://bugs.gentoo.org/149147
Index: make/tests/run_make_tests.pl
===================================================================
RCS file: /cvsroot/make/make/tests/run_make_tests.pl,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -p -r1.22 -r1.23
--- make/tests/run_make_tests.pl 8 Mar 2006 20:15:09 -0000 1.22
+++ make/tests/run_make_tests.pl 1 Oct 2006 05:38:38 -0000 1.23
@@ -228,11 +228,6 @@ sub set_more_defaults
local($string);
local($index);
- # Make sure we're in the C locale for those systems that support it,
- # so sorting, etc. is predictable.
- #
- $ENV{LANG} = 'C';
-
# find the type of the port. We do this up front to have a single
# point of change if it needs to be tweaked.
#
Index: make/tests/test_driver.pl
===================================================================
RCS file: /cvsroot/make/make/tests/test_driver.pl,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- make/tests/test_driver.pl 10 Mar 2006 02:20:45 -0000 1.19
+++ make/tests/test_driver.pl 1 Oct 2006 05:38:38 -0000 1.20
@@ -78,9 +78,9 @@ sub resetENV
sub toplevel
{
# Pull in benign variables from the user's environment
- #
+
foreach (# UNIX-specific things
- 'TZ', 'LANG', 'TMPDIR', 'HOME', 'USER', 'LOGNAME', 'PATH',
+ 'TZ', 'TMPDIR', 'HOME', 'USER', 'LOGNAME', 'PATH',
# Purify things
'PURIFYOPTIONS',
# Windows NT-specific stuff
@@ -92,6 +92,10 @@ sub toplevel
$makeENV{$_} = $ENV{$_} if $ENV{$_};
}
+ # Make sure our compares are not foiled by locale differences
+
+ $makeENV{LC_ALL} = 'C';
+
# Replace the environment with the new one
#
%origENV = %ENV;