Loading...
--- Libc/Libc-1725.40.4/stdlib/grantpt.3
+++ Libc/Libc-1698.140.3/stdlib/grantpt.3
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/stdlib/grantpt.3,v 1.3 2003/09/14 13:41:57 ru Exp $
 .\"
-.Dd June 17, 2025
+.Dd February 2, 2005
 .Os
 .Dt GRANTPT 3
 .Sh NAME
@@ -97,7 +97,9 @@
 .Pp
 The
 .Fn ptsname
-function returns a pointer to the full pathname of the replica device
+and
+.Fn ptsname_r
+functions return the full pathname of the replica device
 counterpart to the primary device specified with
 .Fa fildes .
 This value can be used
@@ -105,18 +107,11 @@
 .Fn posix_openpt
 and
 .Fn grantpt
-have been called.
-The
+have been called. The
 .Fn ptsname
-function is not guaranteed to be reentrant or thread safe.
-The
-.Fn ptsname_r
-function stores the full pathname of the replica device in the
-buffer pointed to by its
-.Fa buffer
-argument, up to a maximum length of
-.Fa buflen
-including the terminating NUL.
+function is not guaranteed to be reentrant or thread safe. The
+.Fn ptsname_r
+function takes a buffer and length as arguments to avoid this problem.
 .Pp
 The
 .Fn unlockpt
@@ -154,8 +149,7 @@
 .Pp
 The
 .Fn ptsname_r
-function returns 0 if successful.
-On failure, it returns -1 and the global variable
+function returns 0 if successful.  On failure, it returns -1 and the global variable
 .Va errno
 is set to indicate the error.
 .Pp
@@ -190,16 +184,14 @@
 .Bl -tag -width Er
 .It Bq Er EINVAL
 The
-.Fa buffer
-argument is
-.Dv NULL .
+.Va buffer
+argument is NULL.
 .El
 .Bl -tag -width Er
 .It Bq Er ERANGE
 The
-.Fa buflen
-argument is smaller than the length of the string to be returned,
-including the terminating NUL.
+.Va bufsize
+argument is smaller than the length of the string to be returned.
 .El
 .Pp
 In addition, the