X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fttyname_r.c;h=6005c9d8d1e4b7251cc98b09e031f03ec7387000;hb=88236bad53d1dd5e6b8a592a724736bbd9db7851;hp=5b59547cad84333b6d4cf908464fc8a321e25b16;hpb=64ee0bacb33ac4112f353a0d0771ff4f497d8fe3;p=gnulib.git diff --git a/lib/ttyname_r.c b/lib/ttyname_r.c index 5b59547ca..6005c9d8d 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-2012 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 =