]> sourceware.org Git - glibc.git/commitdiff
Declare cuserid in unistd.h for UNIX98 and before (bug 20043).
authorJoseph Myers <joseph@codesourcery.com>
Tue, 10 May 2016 14:56:49 +0000 (14:56 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 10 May 2016 14:56:49 +0000 (14:56 +0000)
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).

[BZ #20043]
* posix/unistd.h [__USE_XOPEN && !__USE_XOPEN2K] (cuserid): New
prototype.

ChangeLog
posix/unistd.h

index 516be8a96cef96e054c7bc09a13947cb8c5700a7..55319d88488ffdaed1bb43c5aae7d207f98f27dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-05-10  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #20043]
+       * posix/unistd.h [__USE_XOPEN && !__USE_XOPEN2K] (cuserid): New
+       prototype.
+
 2016-05-10  Florian Weimer  <fweimer@redhat.com>
 
        [BZ #20017]
index 405638ce79ffce78ffc739baa843625c87bb4683..4722f7fc5c3cf994fed3cfa06fba5620b93ce833 100644 (file)
@@ -1138,11 +1138,15 @@ 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>.  */
+/* Prior to Issue 6, the Single Unix Specification required these
+   prototypes to appear in this header.  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
 
 
This page took 0.17574 seconds and 5 git commands to generate.