2009-10-29 Ulrich Drepper <drepper@redhat.com>
+ [BZ #10784]
+ * sysdeps/unix/sysv/linux/ttyname.c (getttyname): Always copy name
+ of the directory we look at into the static buffer if there is one
+ at the start of the loop.
+
[BZ #10789]
* sysdeps/generic/netinet/ip.h: Define IPTOS_ENC* and IPTOS_DSCP*
- macros. Patch by Philip Prindeville <philipp@redfish-solutions.com>.
+ macros. Patch by Philip Prindeville <philipp@redfish-solutions.com>.
[BZ #10840]
* sysdeps/unix/sysv/linux/kernel-features.h: Define
-/* Copyright (C) 1991,92,93,1996-2002,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,1996-2002,2006,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
return NULL;
}
+ /* Prepare for the loop. If we already have a buffer copy the directory
+ name we look at into it. */
+ if (devlen < namelen)
+ *((char *) __mempcpy (getttyname_name, dev, devlen - 1)) = '/';
+
while ((d = __readdir64 (dirstream)) != NULL)
if ((d->d_fileno == myino || *dostat)
&& strcmp (d->d_name, "stdin")