This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] linux ttyname and ttyname_r: return link if appropriate
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: "Serge E. Hallyn" <serge at hallyn dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org, Stéphane Graber <stgraber at ubuntu dot com>
- Date: Mon, 03 Oct 2016 09:28:48 +0200
- Subject: Re: [PATCH] linux ttyname and ttyname_r: return link if appropriate
- Authentication-results: sourceware.org; auth=none
- References: <20160420185141.GA31095@ubuntumail> <20160727165711.GA27815@altlinux.org> <20160806020855.GA19897@mail.hallyn.com> <20160806084559.GS6702@vapier.lan> <20160806150002.GA24315@mail.hallyn.com> <20160809211841.GB2566@altlinux.org> <20160809213937.GA3392@mail.hallyn.com> <b4f86770-9dbe-99aa-ac84-d4c6cc753189@redhat.com> <20160810230351.GA20138@mail.hallyn.com> <20160810231818.GA20183@altlinux.org> <20161003061602.GA5257@mail.hallyn.com>
On Okt 03 2016, "Serge E. Hallyn" <serge@hallyn.com> wrote:
> @@ -170,12 +184,19 @@ ttyname (int fd)
> #ifdef _STATBUF_ST_RDEV
> && S_ISCHR (st1.st_mode)
> && st1.st_rdev == st.st_rdev
> -#else
> +#endif
> && st1.st_ino == st.st_ino
> && st1.st_dev == st.st_dev
> -#endif
> )
Please unfold the paren.
> @@ -152,12 +166,20 @@ __ttyname_r (int fd, char *buf, size_t buflen)
> #ifdef _STATBUF_ST_RDEV
> && S_ISCHR (st1.st_mode)
> && st1.st_rdev == st.st_rdev
> -#else
> +#endif
> && st1.st_ino == st.st_ino
> && st1.st_dev == st.st_dev
> -#endif
> )
Likewise.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."