Hoi,
Jim Meyering wrote:
Elbert Pol<[EMAIL PROTECTED]> wrote:
Hello Jim,
Thank you! You've just uncovered a bug!
Fixed by the patch below.
However, that problem is independent of the libgmp issue,
so if you apply the patch, your build should get farther.
Actually, there's another: after a failed fork, timeout is
documented to exit with status 125 (EXIT_CANCELED), not errno.
From 15f4d612df8eed7014f76825ad986fb8c769ec5d Mon Sep 17 00:00:00 2001
From: Jim Meyering<[EMAIL PROTECTED]>
Date: Fri, 3 Oct 2008 18:29:39 +0200
Subject: [PATCH] timeout.c: don't use perror; exit 125 upon failed fork
* src/timeout.c (main): Use "error", not perror.
Elbert Pol noticed a build failure on OS/2.
* src/timeout.c (main): Exit 125 (not errno) upon failed fork.
Make the failed fork diagnostic match the one from install.c.
---
src/timeout.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/timeout.c b/src/timeout.c
index 37bed3c..8b506f0 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -284,8 +284,8 @@ main (int argc, char **argv)
monitored_pid = fork ();
if (monitored_pid == -1)
{
- perror ("fork");
- return errno;
+ error (0, errno, _("fork system call failed"));
+ return EXIT_CANCELED;
}
else if (monitored_pid == 0)
{ /* child */
@@ -299,7 +299,7 @@ main (int argc, char **argv)
/* exit like sh, env, nohup, ... */
exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE);
- perror (argv[0]);
+ error (0, errno, _("cannot run command %s"), quote (argv[0]));
return exit_status;
}
else
--
1.6.0.2.307.gc427
I apply patch and come further but now i get this error......
make.exe[2]: Entering directory `U:/coreutils-6.12.208-2441/man'
Updating man page timeout.1
Array found where operator expected at ./help2man line 48, at end of line
(Missing operator before ?)
syntax error at ./help2man line 48, near "gettext @_ "
syntax error at ./help2man line 59, near "gettext shift"
Execution of ./help2man aborted due to compilation errors.
make.exe[2]: *** [timeout.1] Error 255
make.exe[2]: Leaving directory `U:/coreutils-6.12.208-2441/man'
make.exe[1]: *** [all-recursive] Error 1
make.exe[1]: Leaving directory `U:/coreutils-6.12.208-2441'
make.exe: *** [all] Error 2
You're making progress.
What version of Perl are you using?
Run perl -v
Then try this patch:
diff --git a/man/help2man b/man/help2man
index cbdaf06..911edc9 100755
--- a/man/help2man
+++ b/man/help2man
@@ -40,8 +40,8 @@ BEGIN {
unless ($have_gettext)
{
- *gettext = sub { $_[0] };
- *textdomain = sub {};
+ eval 'sub gettext { $_[0] }';
+ eval 'sub textdomain {}';
}
}
------------------------
If that doesn't help, try putting parentheses around
each argument to gettext.
[u:\]perl -v
This is perl, v5.10.0 built for os2
Copyright 1987-2007, Larry Wall
The patch don't help, and also the PArentheses don't fix it.
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils