This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v6 3/6] linux ttyname: Change return type of is_pty from int to bool
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Luke Shumaker <lukeshu at lukeshu dot com>
- Cc: libc-alpha at sourceware dot org, christian dot brauner at mailbox dot org
- Date: Sun, 12 Nov 2017 08:38:38 +0100
- Subject: Re: [PATCH v6 3/6] linux ttyname: Change return type of is_pty from int to bool
- Authentication-results: sourceware.org; auth=none
- References: <20171110200827.32265-1-lukeshu@lukeshu.com> <20171110200827.32265-4-lukeshu@lukeshu.com>
* Luke Shumaker:
> --- a/sysdeps/unix/sysv/linux/ttyname.h
> +++ b/sysdeps/unix/sysv/linux/ttyname.h
> @@ -23,7 +23,7 @@
> /* Return true if this is a UNIX98 pty device, as defined in
> linux/Documentation/devices.txt (on linux < 4.10) or
> linux/Documentation/admin-guide/devices.txt (on linux >= 4.10). */
> -static inline int
> +static inline bool
> is_pty (struct stat64 *sb)
> {
> #ifdef _STATBUF_ST_RDEV
The file does not include <stdbool.h>, so bool might not be available.
Either include it, or use _Bool.