@@ -342,6 +342,3 @@ test-xfail-XPG4/ndbm.h/linknamespace = yes
test-xfail-UNIX98/ndbm.h/linknamespace = yes
test-xfail-XOPEN2K/ndbm.h/linknamespace = yes
test-xfail-XOPEN2K8/ndbm.h/linknamespace = yes
-
-# Unsorted expected failures.
-test-xfail-XPG3/unistd.h/linknamespace = yes
@@ -2,8 +2,14 @@
#include <resource/sys/resource.h>
#ifndef _ISOMAC
-libc_hidden_proto (getpriority)
-libc_hidden_proto (setpriority)
+/* Prototypes repeated instead of using __typeof because
+ sys/resource.h is included in C++ tests, and declaring functions
+ with __typeof and __THROW doesn't work for C++. */
+extern int __getpriority (__priority_which_t __which, id_t __who) __THROW;
+libc_hidden_proto (__getpriority)
+extern int __setpriority (__priority_which_t __which, id_t __who, int __prio)
+ __THROW;
+libc_hidden_proto (__setpriority)
libc_hidden_proto (getrlimit64)
extern __typeof (getrlimit64) __getrlimit64;
libc_hidden_proto (__getrlimit64);
@@ -23,13 +23,14 @@
or user (as specified by WHO) is used. A lower priority number means higher
priority. Priorities range from PRIO_MIN to PRIO_MAX. */
int
-getpriority (which, who)
+__getpriority (which, who)
enum __priority_which which;
id_t who;
{
__set_errno (ENOSYS);
return -1;
}
-libc_hidden_def (getpriority)
+libc_hidden_def (__getpriority)
+weak_alias (__getpriority, getpriority)
stub_warning (getpriority)
@@ -21,7 +21,7 @@
/* Set the priority of all processes specified by WHICH and WHO
to PRIO. Returns 0 on success, -1 on errors. */
int
-setpriority (which, who, prio)
+__setpriority (which, who, prio)
enum __priority_which which;
id_t who;
int prio;
@@ -29,6 +29,7 @@ setpriority (which, who, prio)
__set_errno (ENOSYS);
return -1;
}
-libc_hidden_def (setpriority)
+libc_hidden_def (__setpriority)
+weak_alias (__setpriority, setpriority)
stub_warning (setpriority)
@@ -24,7 +24,7 @@
or user (as specified by WHO) is used. A lower priority number means higher
priority. Priorities range from PRIO_MIN to PRIO_MAX. */
int
-getpriority (enum __priority_which which, id_t who)
+__getpriority (enum __priority_which which, id_t who)
{
error_t err, onerr;
int maxpri = INT_MIN;
@@ -81,4 +81,5 @@ getpriority (enum __priority_which which, id_t who)
return MACH_PRIORITY_TO_NICE (maxpri);
}
-libc_hidden_def (getpriority)
+libc_hidden_def (__getpriority)
+weak_alias (__getpriority, getpriority)
@@ -21,7 +21,7 @@
/* Set the priority of all processes specified by WHICH and WHO
to PRIO. Returns 0 on success, -1 on errors. */
int
-setpriority (enum __priority_which which, id_t who, int prio)
+__setpriority (enum __priority_which which, id_t who, int prio)
{
error_t err;
error_t pidloser, priloser;
@@ -94,4 +94,5 @@ setpriority (enum __priority_which which, id_t who, int prio)
return err ? __hurd_fail (err) : 0;
}
-libc_hidden_def (setpriority)
+libc_hidden_def (__setpriority)
+weak_alias (__setpriority, setpriority)
@@ -31,7 +31,7 @@ nice (int incr)
/* -1 is a valid priority, so we use errno to check for an error. */
save = errno;
__set_errno (0);
- prio = getpriority (PRIO_PROCESS, 0);
+ prio = __getpriority (PRIO_PROCESS, 0);
if (prio == -1)
{
if (errno != 0)
@@ -40,12 +40,12 @@ nice (int incr)
__set_errno (save);
}
- result = setpriority (PRIO_PROCESS, 0, prio + incr);
+ result = __setpriority (PRIO_PROCESS, 0, prio + incr);
if (result == -1)
{
if (errno == EACCES)
errno = EPERM;
return -1;
}
- return getpriority (PRIO_PROCESS, 0);
+ return __getpriority (PRIO_PROCESS, 0);
}
@@ -29,7 +29,7 @@ gethostname - gethostname i:bn __gethostname gethostname
getitimer - getitimer i:ip __getitimer getitimer
getpeername - getpeername i:ibN __getpeername getpeername
getpid - getpid Ei: __getpid getpid
-getpriority - getpriority i:ii getpriority
+getpriority - getpriority i:ii __getpriority getpriority
getrlimit - getrlimit i:ip __getrlimit getrlimit
getrusage - getrusage i:ip __getrusage getrusage
getsockname - getsockname i:ibN __getsockname getsockname
@@ -72,7 +72,7 @@ sethostid - sethostid i:i sethostid
sethostname - sethostname i:pi sethostname
setitimer - setitimer i:ipp __setitimer setitimer
setpgid - setpgrp i:ii __setpgid setpgid
-setpriority - setpriority i:iii setpriority
+setpriority - setpriority i:iii __setpriority setpriority
setregid - setregid i:ii __setregid setregid
setreuid - setreuid i:ii __setreuid setreuid
setrlimit - setrlimit i:ip __setrlimit setrlimit
@@ -32,7 +32,7 @@
priority. Priorities range from PRIO_MIN to PRIO_MAX. */
int
-getpriority (enum __priority_which which, id_t who)
+__getpriority (enum __priority_which which, id_t who)
{
int res;
@@ -41,4 +41,5 @@ getpriority (enum __priority_which which, id_t who)
res = PZERO - res;
return res;
}
-libc_hidden_def (getpriority)
+libc_hidden_def (__getpriority)
+weak_alias (__getpriority, getpriority)