bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

split-fail test problem on 32-bit-only host


From: Paul Eggert
Subject: split-fail test problem on 32-bit-only host
Date: Sun, 20 Feb 2005 23:14:52 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

split-fail currently assumes that the host supports integers wider
than 32 bits.  This isn't true for Solaris 8 c89, and probably for
others.

There's also what appears to be a typo in a comment describing a
related 64-bit int issue.

I installed this:

2005-02-20  Paul Eggert  <address@hidden>

        * tests/misc/split-fail: Don't assume that the current host
        supports integers wider than 32 bits.  Fix comment typo.

--- split-fail  21 Dec 2004 21:11:58 -0000      1.8
+++ split-fail  21 Feb 2005 07:12:37 -0000      1.9
@@ -36,10 +36,12 @@ _POSIX2_VERSION=199209 split -1 in 2> /d
 # Then make sure that -0 evokes a failure.
 _POSIX2_VERSION=199209 split -0 in 2> /dev/null && fail=1
 
-# Ensure that split --lines=N and --bytes=N work for N=2^32.
-_4gb=4294967296
-split --lines=$_4gb in || fail=1
-split --bytes=$_4gb in || fail=1
+# Ensure that split --lines=N and --bytes=N work for N=2^32,
+# assuming our host supports integers that wide.
+if _4gb=`expr 4294967296 + 0 2>/dev/null`; then
+  split --lines=$_4gb in || fail=1
+  split --bytes=$_4gb in || fail=1
+fi
 
 # Currently (coreutils-5.0.1) split --line-bytes=M fails
 # with `invalid number of bytes' for M=2^32 or larger.  Actually,
@@ -55,7 +57,7 @@ env -u _POSIX2_VERSION split -9999999999
 #   split: line count option -9999999999... is too large
 # while on most, we get this:
 #   split: line count option -99999999999999999991... is too large
-# so map them both to -99*1...
+# so map them both to -99*.
 sed 's/99[19]*/99*/' out > out-t
 mv -f out-t out
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]