Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 May 2005 01:50:52 +0800
From:      Xin LI <delphij@frontfree.net>
To:        freebsd-ports@FreeBSD.org
Subject:   [HEADSUP] ttyname_r(3) changes [Was delphij@FreeBSD.org: cvs commit: src/include unistd.h src/lib/libc/gen ttyname.3 ttyname.c src/lib/libc_r/uthread pthread_private.h]
Message-ID:  <20050513175052.GA30231@frontfree.net>

next in thread | raw e-mail | index | archive | help

--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Dear porters,

A commit has been made to make ttyname_r(3) available through unistd.h,
and provide a POSIX standard interface.  This change may have some side
effects if your port is linked against libc_r, libthr (older versions),
or libc using old ttyname_r(3) interface (you may have added some hacks
to work around the difference between the old FreeBSD and POSIX standard
interfaces, which is no longer necessary).

For -HEAD, it is possible to detect whether the system have the change
at the point of __FreeBSD_version 600028.

Please let me know if odd things happen :-)

----- Forwarded message from Xin LI <delphij@FreeBSD.org> -----

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
X-Sieve: CMU Sieve 2.2
Delivered-To: delphij@freebsd.org
Delivered-To: src-committers@freebsd.org
X-FreeBSD-CVS-Branch: HEAD
Precedence: bulk
X-Loop: FreeBSD.ORG
X-Virus-Scanned: by amavisd-new at frontfree.net

delphij     2005-05-13 16:27:31 UTC

  FreeBSD src repository

  Modified files:
    include              unistd.h=20
    lib/libc/gen         ttyname.3 ttyname.c=20
    lib/libc_r/uthread   pthread_private.h=20
  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.
 =20
  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.
 =20
  [1] http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html
 =20
  Requested by:   Tom McLaughlin <tmclaugh sdf lonestar org>
  Through PR:     threads/76938
  Patched by:     Craig Rodrigues <rodrigc crodrigues org> (with minor chan=
ges)
  Prompted by:    mezz@
 =20
  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

----- End forwarded message -----

Cheers,
--=20
Xin LI <delphij frontfree net>	http://www.delphij.net/
See complete headers for GPG key and other information.


--YiEDa0DAkWCtVeE4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFChOj8/cVsHxFZiIoRAoKlAJ9Fq/OwnoUR8gCHgxLVpvSxK4w6NACeOzQe
SJUE+CGjabRfUWrRQ7+sub8=
=L5Hi
-----END PGP SIGNATURE-----

--YiEDa0DAkWCtVeE4--



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