This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Declare cuserid in unistd.h for UNIX98 and before (bug 20043)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Wed, 4 May 2016 15:48:42 +0000
- Subject: Declare cuserid in unistd.h for UNIX98 and before (bug 20043)
- Authentication-results: sourceware.org; auth=none
For UNIX98 and older X/Open standards, unistd.h should have a
declaration of the legacy cuserid function, but such a declaration is
missing. This patch adds that missing declaration.
Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).
2016-05-04 Joseph Myers <joseph@codesourcery.com>
[BZ #20043]
* posix/unistd.h [__USE_XOPEN && !__USE_XOPEN2K] (cuserid): New
prototype.
diff --git a/posix/unistd.h b/posix/unistd.h
index 405638c..f2ced41 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -1138,11 +1138,14 @@ extern void swab (const void *__restrict __from, void *__restrict __to,
#endif
-/* The Single Unix specification demands this prototype to be here.
- It is also found in <stdio.h>. */
+/* The Single Unix specification demands these prototype to be here.
+ They are also found in <stdio.h>. */
#if defined __USE_XOPEN && !defined __USE_XOPEN2K
/* Return the name of the controlling terminal. */
extern char *ctermid (char *__s) __THROW;
+
+/* Return the name of the current user. */
+extern char *cuserid (char *__s);
#endif
--
Joseph S. Myers
joseph@codesourcery.com