This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2417] New: getcwd() uses ENAMETOOLONG instead of ERANGE
- From: "aurelien at aurel32 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 5 Mar 2006 16:52:58 -0000
- Subject: [Bug libc/2417] New: getcwd() uses ENAMETOOLONG instead of ERANGE
- Reply-to: sourceware-bugzilla at sourceware dot org
A call to getcwd() with a buffer smaller than the actual path returns an error
ENAMETOOLONG on all architectures but ia64, whereas POSIX and the *GNU libc
manual* say ERANGE. Actually this is the value returned by the kernel.
IMHO the kernel has to be fixed, but the GNU libc should also correct the
number. That's the purpose of the attached patch.
--
Summary: getcwd() uses ENAMETOOLONG instead of ERANGE
Product: glibc
Version: 2.3.6
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: aurelien at aurel32 dot net
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=2417
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.