cvs commit: src/include unistd.h src/lib/libc/gen ttyname.3 ttyname.c src/lib/libc_r/uthread pthread_private.h

Xin LI delphij at
Fri May 13 09:27:31 PDT 2005

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 
  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
          - 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.
  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

More information about the cvs-src mailing list