X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fttyname_r.c;h=3379f1cbd8aa494d268f5f80ab16ca41cb813b13;hb=4f6a7ef5f2097b501ddeac9db94d02306e4546d0;hp=5b59547cad84333b6d4cf908464fc8a321e25b16;hpb=64ee0bacb33ac4112f353a0d0771ff4f497d8fe3;p=gnulib.git diff --git a/lib/ttyname_r.c b/lib/ttyname_r.c index 5b59547ca..3379f1cbd 100644 --- a/lib/ttyname_r.c +++ b/lib/ttyname_r.c @@ -1,6 +1,6 @@ /* Determine name of a terminal. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,8 +32,9 @@ ttyname_r (int fd, char *buf, size_t buflen) /* When ttyname_r exists, use it. */ #if HAVE_TTYNAME_R /* This code is multithread-safe. */ - /* On Solaris, ttyname_r always fails if buflen < 128. So provide a buffer - that is large enough. */ + /* On Solaris, ttyname_r always fails if buflen < 128. On OSF/1 5.1, + ttyname_r ignores the buffer size and assumes the buffer is large enough. + So provide a buffer that is large enough. */ char largerbuf[512]; # if HAVE_POSIXDECL_TTYNAME_R int err =