threads/76938: include/unistd.h: ttyname_r prototype missing

Craig Rodrigues rodrigc at crodrigues.org
Tue Feb 1 09:40:30 PST 2005


The following reply was made to PR threads/76938; it has been noted by GNATS.

From: Craig Rodrigues <rodrigc at crodrigues.org>
To: Tom McLaughlin <tmclaugh at sdf.lonestar.org>
Cc: FreeBSD gnats submit <FreeBSD-gnats-submit at freebsd.org>
Subject: Re: threads/76938: include/unistd.h: ttyname_r prototype missing
Date: Tue, 1 Feb 2005 12:37:24 -0500

 Hi,
 
 One slight problem with adding the prototype for ttyname_r() to
 unistd.h...the implementation of ttyname_r() in FreeBSD is
 not POSIX-compliant.
 
 According to:
 http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html
 
 the prototype should be:
 int ttyname_r(int fildes, char *name, size_t namesize);
 
 In src/lib/libc/gen/ttyname.c, we have:
 char *ttyname_r(int fd, char *buf, size_t len);
 
 I don't think it would be a big deal to fix this.
 
 It might be useful to reassign this PR to standards at .
 
 -- 
 Craig Rodrigues        
 rodrigc at crodrigues.org


More information about the freebsd-threads mailing list