mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-12 16:20:06 +00:00
hurd: Use proper integer types
Fix a few more cases of build errors caused by mismatched types. This is a
continuation of f4315054b4
.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230218203717.373211-3-bugaevc@gmail.com>
This commit is contained in:
parent
e48f33e76b
commit
32fff41bde
@ -430,8 +430,8 @@ _hurdsig_abort_rpcs (struct hurd_sigstate *ss, int signo, int sigthread,
|
|||||||
receive completes immediately or aborts. */
|
receive completes immediately or aborts. */
|
||||||
abort_thread (ss, state, reply);
|
abort_thread (ss, state, reply);
|
||||||
|
|
||||||
if (state->basic.PC >= (natural_t) &_hurd_intr_rpc_msg_about_to
|
if (state->basic.PC >= (uintptr_t) &_hurd_intr_rpc_msg_about_to
|
||||||
&& state->basic.PC < (natural_t) &_hurd_intr_rpc_msg_in_trap)
|
&& state->basic.PC < (uintptr_t) &_hurd_intr_rpc_msg_in_trap)
|
||||||
{
|
{
|
||||||
/* The thread is about to do the RPC, but hasn't yet entered
|
/* The thread is about to do the RPC, but hasn't yet entered
|
||||||
mach_msg. Mutate the thread's state so it knows not to try
|
mach_msg. Mutate the thread's state so it knows not to try
|
||||||
@ -442,7 +442,7 @@ _hurdsig_abort_rpcs (struct hurd_sigstate *ss, int signo, int sigthread,
|
|||||||
state->basic.SYSRETURN = MACH_SEND_INTERRUPTED;
|
state->basic.SYSRETURN = MACH_SEND_INTERRUPTED;
|
||||||
*state_change = 1;
|
*state_change = 1;
|
||||||
}
|
}
|
||||||
else if (state->basic.PC == (natural_t) &_hurd_intr_rpc_msg_in_trap
|
else if (state->basic.PC == (uintptr_t) &_hurd_intr_rpc_msg_in_trap
|
||||||
/* The thread was blocked in the system call. After thread_abort,
|
/* The thread was blocked in the system call. After thread_abort,
|
||||||
the return value register indicates what state the RPC was in
|
the return value register indicates what state the RPC was in
|
||||||
when interrupted. */
|
when interrupted. */
|
||||||
|
@ -30,7 +30,7 @@ __getpriority (enum __priority_which which, id_t who)
|
|||||||
int maxpri = INT_MIN;
|
int maxpri = INT_MIN;
|
||||||
struct procinfo *pip; /* Just for sizeof. */
|
struct procinfo *pip; /* Just for sizeof. */
|
||||||
int pibuf[sizeof *pip + 2 * sizeof (pip->threadinfos[0])], *pi = pibuf;
|
int pibuf[sizeof *pip + 2 * sizeof (pip->threadinfos[0])], *pi = pibuf;
|
||||||
size_t pisize = sizeof pibuf / sizeof pibuf[0];
|
mach_msg_type_number_t pisize = sizeof pibuf / sizeof pibuf[0];
|
||||||
|
|
||||||
error_t getonepriority (pid_t pid, struct procinfo *pip)
|
error_t getonepriority (pid_t pid, struct procinfo *pip)
|
||||||
{
|
{
|
||||||
@ -39,9 +39,9 @@ __getpriority (enum __priority_which which, id_t who)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int *oldpi = pi;
|
int *oldpi = pi;
|
||||||
size_t oldpisize = pisize;
|
mach_msg_type_number_t oldpisize = pisize;
|
||||||
char *tw = 0;
|
char *tw = 0;
|
||||||
size_t twsz = 0;
|
mach_msg_type_number_t twsz = 0;
|
||||||
int flags = PI_FETCH_TASKINFO;
|
int flags = PI_FETCH_TASKINFO;
|
||||||
onerr = __USEPORT (PROC, __proc_getprocinfo (port, pid, &flags,
|
onerr = __USEPORT (PROC, __proc_getprocinfo (port, pid, &flags,
|
||||||
&pi, &pisize,
|
&pi, &pisize,
|
||||||
|
@ -99,7 +99,7 @@ __if_nameindex (void)
|
|||||||
nifs = 0;
|
nifs = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size_t len = sizeof data;
|
mach_msg_type_number_t len = sizeof data;
|
||||||
err = __pfinet_siocgifconf (server, -1, &ifc.ifc_buf, &len);
|
err = __pfinet_siocgifconf (server, -1, &ifc.ifc_buf, &len);
|
||||||
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
|
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *data = NULL;
|
char *data = NULL;
|
||||||
size_t len = 0;
|
mach_msg_type_number_t len = 0;
|
||||||
error_t err = __pfinet_siocgifconf (server, -1, &data, &len);
|
error_t err = __pfinet_siocgifconf (server, -1, &data, &len);
|
||||||
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
|
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
|
||||||
{
|
{
|
||||||
|
@ -43,12 +43,13 @@ __readdir64 (DIR *dirp)
|
|||||||
/* We've emptied out our buffer. Refill it. */
|
/* We've emptied out our buffer. Refill it. */
|
||||||
|
|
||||||
char *data = dirp->__data;
|
char *data = dirp->__data;
|
||||||
|
mach_msg_type_number_t data_size = dirp->__size;
|
||||||
int nentries;
|
int nentries;
|
||||||
error_t err;
|
error_t err;
|
||||||
|
|
||||||
if (err = HURD_FD_PORT_USE (dirp->__fd,
|
if (err = HURD_FD_PORT_USE (dirp->__fd,
|
||||||
__dir_readdir (port,
|
__dir_readdir (port,
|
||||||
&data, &dirp->__size,
|
&data, &data_size,
|
||||||
dirp->__entry_ptr,
|
dirp->__entry_ptr,
|
||||||
-1, 0, &nentries)))
|
-1, 0, &nentries)))
|
||||||
{
|
{
|
||||||
@ -57,6 +58,7 @@ __readdir64 (DIR *dirp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dirp->__size = data_size;
|
||||||
/* DATA now corresponds to entry index DIRP->__entry_ptr. */
|
/* DATA now corresponds to entry index DIRP->__entry_ptr. */
|
||||||
dirp->__entry_data = dirp->__entry_ptr;
|
dirp->__entry_data = dirp->__entry_ptr;
|
||||||
|
|
||||||
|
@ -45,11 +45,12 @@ __readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
|
|||||||
/* We've emptied out our buffer. Refill it. */
|
/* We've emptied out our buffer. Refill it. */
|
||||||
|
|
||||||
char *data = dirp->__data;
|
char *data = dirp->__data;
|
||||||
|
mach_msg_type_number_t data_size = dirp->__size;
|
||||||
int nentries;
|
int nentries;
|
||||||
|
|
||||||
if (err = HURD_FD_PORT_USE (dirp->__fd,
|
if (err = HURD_FD_PORT_USE (dirp->__fd,
|
||||||
__dir_readdir (port,
|
__dir_readdir (port,
|
||||||
&data, &dirp->__size,
|
&data, &data_size,
|
||||||
dirp->__entry_ptr,
|
dirp->__entry_ptr,
|
||||||
-1, 0, &nentries)))
|
-1, 0, &nentries)))
|
||||||
{
|
{
|
||||||
@ -58,6 +59,7 @@ __readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dirp->__size = data_size;
|
||||||
/* DATA now corresponds to entry index DIRP->__entry_ptr. */
|
/* DATA now corresponds to entry index DIRP->__entry_ptr. */
|
||||||
dirp->__entry_data = dirp->__entry_ptr;
|
dirp->__entry_data = dirp->__entry_ptr;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user