Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 May 2005 16:27:31 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/include unistd.h src/lib/libc/gen ttyname.3 ttyname.c src/lib/libc_r/uthread pthread_private.h
Message-ID:  <200505131627.j4DGRVb4086065@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <tmclaugh sdf lonestar org>
  Through PR:     threads/76938
  Patched by:     Craig Rodrigues <rodrigc crodrigues org> (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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505131627.j4DGRVb4086065>