]> sourceware.org Git - glibc.git/commitdiff
Avoid handling long-obsolete old BSD PTY handling in ptsname.
authorUlrich Drepper <drepper@redhat.com>
Thu, 26 Nov 2009 16:47:56 +0000 (08:47 -0800)
committerUlrich Drepper <drepper@redhat.com>
Thu, 26 Nov 2009 16:47:56 +0000 (08:47 -0800)
Support for this type of PTY was removed in the 2.1.115 kernel.  Just
use __LINUX_KERNEL_VERSION to determine when we can drop the compat code.

ChangeLog
sysdeps/unix/sysv/linux/ptsname.c

index 000a535f1dde7cf2fff8628bab8772cd4d1c16e0..1b487ec2643589a7f50d1561313e6e5bd49f0c7a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-26  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_internal): Avoid code
+       only used on truly ancient kernel if configuration requires a more
+       recent kernel.
+
 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
 
        [BZ #3662]
index ba7c791c9f7f2f1722d2435b466aaef72cf5a676..129d09085e190d2284bc7af538a02dbd67371c4a 100644 (file)
@@ -128,10 +128,12 @@ __ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp)
        }
 
       ptyno = minor (stp->st_rdev);
+#if __LINUX_KERNEL_VERSION >= 131443
       /* This is for the old BSD pseudo terminals.  As of Linux
         2.1.115 these are no longer supported.  */
       if (major (stp->st_rdev) == 4)
        ptyno -= 128;
+#endif
 
       if (ptyno / 16 >= strlen (__libc_ptyname1))
        {
This page took 0.05857 seconds and 5 git commands to generate.