This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Do not declare grantpt, ptsname, unlockpt in stdlib.h for XPG3 (bug 20094)

stdlib.h declares grantpt, ptsname, unlockpt for __USE_XOPEN.  This
patch corrects the condition to __USE_XOPEN_EXTENDED (these functions
are new in XPG4).

Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).

[Presume that whichever goes in last of this patch, and the rand_r
patch <>
that is pending review, will get the removal of the conformtest XFAIL
for stdlib.h for XPG3 removed added to the patch.]

2016-05-13  Joseph Myers  <>

	[BZ #20094]
	* stdlib/stdlib.h (grantpt): Declare if [__USE_XOPEN_EXTENDED],
	not [__USE_XOPEN].
	(unlockpt): Likewise.
	(ptsname): Likewise.

diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index d0c78fa..e1de4d9 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -876,7 +876,7 @@ extern void setkey (const char *__key) __THROW __nonnull ((1));
 extern int posix_openpt (int __oflag) __wur;
-#ifdef __USE_XOPEN
 /* The next four functions all take a master pseudo-tty fd and
    perform an operation on the associated slave:  */

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]