From owner-cvs-src@FreeBSD.ORG Fri May 13 16:27:31 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5004D16A4CE; Fri, 13 May 2005 16:27:31 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B13B43D3F; Fri, 13 May 2005 16:27:31 +0000 (GMT) (envelope-from delphij@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4DGRVdE086066; Fri, 13 May 2005 16:27:31 GMT (envelope-from delphij@repoman.freebsd.org) Received: (from delphij@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4DGRVb4086065; Fri, 13 May 2005 16:27:31 GMT (envelope-from delphij) Message-Id: <200505131627.j4DGRVb4086065@repoman.freebsd.org> From: Xin LI Date: Fri, 13 May 2005 16:27:31 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/include unistd.h src/lib/libc/gen ttyname.3 ttyname.c src/lib/libc_r/uthread pthread_private.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 16:27:31 -0000 delphij 2005-05-13 16:27:31 UTC FreeBSD src repository Modified files: include unistd.h lib/libc/gen ttyname.3 ttyname.c lib/libc_r/uthread pthread_private.h Log: Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightly different from what has been offered in libc_r (the one spotted in the original PR which is found in libthr has already been removed by David's commit, which is rev. 1.44 of lib/libthr/thread/thr_private.h): - Use POSIX standard prototype for ttyname_r, which is, int ttyname_r(int, char *, size_t); Instead of: char *ttyname_r(int, char *, size_t); This is to conform IEEE Std 1003.1, 2004 Edition [1]. - Since we need to use standard errno for return code, include errno.h in ttyname.c - Update ttyname(3) implementation according to reflect the API change. - Document new ttyname_r(3) behavior - Since we already make use of a thread local storage for ttyname(3), remove the BUGS section. - Remove conflicting ttyname_r related declarations found in libc_r. Hopefully this change should not have changed the API/ABI, as the ttyname_r symbol was never introduced before the last unistd.h change which happens a couple of days before. [1] http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html Requested by: Tom McLaughlin Through PR: threads/76938 Patched by: Craig Rodrigues (with minor changes) Prompted by: mezz@ Revision Changes Path 1.78 +1 -1 src/include/unistd.h 1.12 +26 -11 src/lib/libc/gen/ttyname.3 1.18 +15 -11 src/lib/libc/gen/ttyname.c 1.86 +0 -2 src/lib/libc_r/uthread/pthread_private.h