bug-coreutils
[Top][All Lists]
Advanced

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

Coreutils 5.0.1: spurious error from uniq


From: Andreas Schwab
Subject: Coreutils 5.0.1: spurious error from uniq
Date: Wed, 16 Jul 2003 23:04:49 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

$ echo '+:::::
+:::::' | uniq -u
uniq: string comparison failed: No such file or directory
uniq: Set LC_ALL='C' to work around the problem.
uniq: The strings compared were `+:::::' and `+:::::'.

The whole error checking in memcoll and xmemcoll is completely bogus.  The
C standard says in 7.5#3:

    The value of errno may be set to nonzero by a library function call
    whether or not there is an error, provided the use of errno is not
    documented in the description of the function in this International
    Standard.

In section 7.21 (String handling <string.h>) the word errno is mentioned
exactly once, in the description of strerror.  None of the other string
functions are obliged to care about errno in any way.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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