Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-05 Thread Bernd Petrovitsch
On Son, 2009-01-04 at 22:50 -0600, Rob Landley wrote: On Sunday 04 January 2009 18:15:30 Bernd Petrovitsch wrote: [...] ACK. A bash can IMHO be expected. Even going for `dash` is IMHO somewhat too extreme. I have yet to encounter a system that uses dash _without_ bash. (All ubuntu Hmm,

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-05 Thread Bernd Petrovitsch
On Mon, 2009-01-05 at 02:23 +, Jamie Lokier wrote: Bernd Petrovitsch wrote: (I have 850 Linux boxes on my network with a bourne shell which doesn't do $((...)). I won't be building kernels on them though :-) Believe it or not, but there are folks out there who build the firmware

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-05 Thread Rob Landley
On Monday 05 January 2009 09:01:56 Jamie Lokier wrote: Bernd Petrovitsch wrote: I assume that the NFS-mounted root filesystem is a real distribution. Not unless you call uClinux (MMU-less) a real distribution, no. I want things to be orthogonal. The following should be completely separate

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread Michal Jaegermann
On Sat, Jan 03, 2009 at 07:36:04PM -0600, Rob Landley wrote: On Saturday 03 January 2009 06:28:22 Ingo Oeser wrote: +for i in MSEC 1000 USEC 100 +do + NAME=$(echo $i | awk '{print $1}') cut -d' ' -f1 does the same + PERIOD=$(echo $i | awk '{print $2}') cut -d' ' -f2

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread Alan Cox
I note that sed and printf and such are all susv3. I have an explicit test for 32 bit math in the script that cares, and this worked in Red Hat 9 circa 2003. If you are trying to do arbitary precision maths using standard posix tools just use dc. That way the standard is explicit about what

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread H. Peter Anvin
Alan Cox wrote: I note that sed and printf and such are all susv3. I have an explicit test for 32 bit math in the script that cares, and this worked in Red Hat 9 circa 2003. If you are trying to do arbitary precision maths using standard posix tools just use dc. That way the standard is

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread Rob Landley
On Sunday 04 January 2009 06:07:35 Alan Cox wrote: I note that sed and printf and such are all susv3. I have an explicit test for 32 bit math in the script that cares, and this worked in Red Hat 9 circa 2003. If you are trying to do arbitary precision maths using standard posix tools

Re: PATCH [1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh (v2)

2009-01-04 Thread Rob Landley
On Saturday 03 January 2009 20:48:21 David Vrabel wrote: Rob Landley wrote: From: Rob Landley r...@landley.net Replace kernel/timeconst.pl with kernel/timeconst.sh. The new shell script is much simpler, about 1/4 the size, and runs on Red Hat 9 from 2003. It requires a shell which

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread H. Peter Anvin
Rob Landley wrote: C) The only calculation which can overflow 64 bits (the ADJ32 one) turns out not to need arbitrary precision math, just 72 bits, and if it ever uses more than 32 then bottom 32 are all zero before the divide so you can do it in three lines. ... for the current code

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread Jamie Lokier
Rob Landley wrote: In a private email, Bernd Petrovitsch suggested set -- $i and then using NAME=$1; PERIOD=$2. (I keep getting private email responses to these sort of threads, and then getting dismissed as the only one who cares about the issue. Less so this time around, but still...)

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread Bernd Petrovitsch
On Son, 2009-01-04 at 22:13 +, Jamie Lokier wrote: Rob Landley wrote: In a private email, Bernd Petrovitsch suggested set -- $i and then using NAME=$1; PERIOD=$2. (I keep getting private email responses to these sort of threads, and then getting dismissed as the only one who cares

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread Ray Lee
On Fri, Jan 2, 2009 at 12:13 AM, Rob Landley r...@landley.net wrote: Replace kernel/timeconst.pl with kernel/timeconst.sh. The new shell script is much simpler, about 1/4 the size, and runs on Red Hat 9 from 2003. Peter Anvin added this perl to 2.6.25. Before that, the kernel had never

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread Jamie Lokier
Bernd Petrovitsch wrote: (I have 850 Linux boxes on my network with a bourne shell which doesn't do $((...)). I won't be building kernels on them though :-) Believe it or not, but there are folks out there who build the firmware on ARM 200 MHz NFS-mounted systems natively (and not simply

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread Rob Landley
On Sunday 04 January 2009 18:15:30 Bernd Petrovitsch wrote: On Son, 2009-01-04 at 22:13 +, Jamie Lokier wrote: Rob Landley wrote: In a private email, Bernd Petrovitsch suggested set -- $i and then using NAME=$1; PERIOD=$2. (I keep getting private email responses to these sort of

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-04 Thread Rob Landley
On Sunday 04 January 2009 18:41:15 Ray Lee wrote: On Fri, Jan 2, 2009 at 12:13 AM, Rob Landley r...@landley.net wrote: Replace kernel/timeconst.pl with kernel/timeconst.sh. The new shell script is much simpler, about 1/4 the size, and runs on Red Hat 9 from 2003. Peter Anvin added this

PATCH [1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh (v2)

2009-01-03 Thread Rob Landley
From: Rob Landley r...@landley.net Replace kernel/timeconst.pl with kernel/timeconst.sh. The new shell script is much simpler, about 1/4 the size, and runs on Red Hat 9 from 2003. It requires a shell which can do 64 bit math, such as bash, busybox ash, or dash running on a 64 bit host. Changes

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-03 Thread Rob Landley
On Friday 02 January 2009 13:33:02 H. Peter Anvin wrote: Rob Landley wrote: You mean The new shell script is much simpler, about 1/4 the size, runs on Red Hat 9 from 2003, and isn't perl? :) And introduces unclear environment dependencies depending on how external utilities are

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-03 Thread H. Peter Anvin
Rob Landley wrote: I consider this a step up from code with an implicit dependency on a CPAN library. There is no CPAN library in use. Math::BigInt is a standard part of Perl, and the canned values is there only to support extremely old versions of Perl, or weird system configurations, as

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-03 Thread Rob Landley
On Saturday 03 January 2009 06:28:22 Ingo Oeser wrote: +for i in MSEC 1000 USEC 100 +do + NAME=$(echo $i | awk '{print $1}') cut -d' ' -f1 does the same + PERIOD=$(echo $i | awk '{print $2}') cut -d' ' -f2 does the same From a standards perspective

Re: PATCH [1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh (v2)

2009-01-03 Thread David Vrabel
Rob Landley wrote: From: Rob Landley r...@landley.net Replace kernel/timeconst.pl with kernel/timeconst.sh. The new shell script is much simpler, about 1/4 the size, and runs on Red Hat 9 from 2003. It requires a shell which can do 64 bit math, such as bash, busybox ash, or dash running on a

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-03 Thread Valdis . Kletnieks
On Sat, 03 Jan 2009 19:36:04 CST, Rob Landley said: On Saturday 03 January 2009 06:28:22 Ingo Oeser wrote: +for i in MSEC 1000 USEC 100 +do + NAME=$(echo $i | awk '{print $1}') cut -d' ' -f1 does the same + PERIOD=$(echo $i | awk '{print $2}') cut -d' ' -f2 does the

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-03 Thread Rob Landley
On Saturday 03 January 2009 23:07:55 valdis.kletni...@vt.edu wrote: On Sat, 03 Jan 2009 19:36:04 CST, Rob Landley said: On Saturday 03 January 2009 06:28:22 Ingo Oeser wrote: +for i in MSEC 1000 USEC 100 +do + NAME=$(echo $i | awk '{print $1}') cut -d' ' -f1 does

[PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-02 Thread Rob Landley
From: Rob Landley r...@landley.net Replace kernel/timeconst.pl with kernel/timeconst.sh. The new shell script is much simpler, about 1/4 the size, and runs on Red Hat 9 from 2003. Peter Anvin added this perl to 2.6.25. Before that, the kernel had never required perl to build. Signed-off-by:

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-02 Thread Rob Landley
On Friday 02 January 2009 03:04:39 Sam Ravnborg wrote: Hi Rob. On Fri, Jan 02, 2009 at 02:13:30AM -0600, Rob Landley wrote: From: Rob Landley r...@landley.net Replace kernel/timeconst.pl with kernel/timeconst.sh. The new shell script is much simpler, about 1/4 the size, and runs on Red

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-02 Thread H. Peter Anvin
Rob Landley wrote: You mean The new shell script is much simpler, about 1/4 the size, runs on Red Hat 9 from 2003, and isn't perl? :) And introduces unclear environment dependencies depending on how external utilities are implemented. The whole point of why that script was written in Perl

Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh

2009-01-02 Thread Harvey Harrison
On Fri, 2009-01-02 at 06:00 -0600, Rob Landley wrote: On Friday 02 January 2009 03:04:39 Sam Ravnborg wrote: +# Output start of header file + +cat EOF +/* Automatically generated by kernel/timeconst.sh */ +/* Conversion constants for HZ == $HZ */ + +#ifndef