+Mon Mar 20 03:19:23 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * stdio/vfscanf.c (%n): Use READ_IN - 1, so as not to count the
+ read-ahead character.
+
Sat Mar 18 14:07:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+ * hurd/dtable.c, hurd/getdport.c, hurd/hurd.h, hurd/hurdexec.c,
+ hurd/hurdinit.c, hurd/hurdprio.c, hurd/hurdsock.c,
+ hurd/ports-get.c, hurd/ports-set.c, hurd/setauth.c,
+ hurd/setuids.c, sysdeps/mach/hurd/i386/trampoline.c:
+ Get anal with unsigned to pacify compiler.
+
* stdio/vfscanf.c: Grok positional parameter specs (i.e. %3$d
means %d from 3rd arg).
static void
init_dtable (void)
{
- register size_t i;
+ int i;
__mutex_init (&_hurd_dtable_lock);
__libc_fatal ("hurd: Can't allocate file descriptor table\n");
/* Initialize the descriptor table. */
- for (i = 0; i < _hurd_init_dtablesize; ++i)
+ for (i = 0; (unsigned int) i < _hurd_init_dtablesize; ++i)
{
if (_hurd_init_dtable[i] == MACH_PORT_NULL)
/* An unused descriptor is marked by a null pointer. */
/* Never had a descriptor table. */
return EBADF;
- if (fd < 0 || fd > _hurd_init_dtablesize ||
+ if (fd < 0 || (unsigned int) fd > _hurd_init_dtablesize ||
_hurd_init_dtable[fd] == MACH_PORT_NULL)
{
errno = EBADF;
/* Calls to get and set basic ports. */
-extern error_t _hurd_ports_get (int which, mach_port_t *result);
-extern error_t _hurd_ports_set (int which, mach_port_t newport);
+extern error_t _hurd_ports_get (unsigned int which, mach_port_t *result);
+extern error_t _hurd_ports_set (unsigned int which, mach_port_t newport);
extern process_t getproc (void);
extern file_t getcwdir (void), getcrdir (void);
mach_port_t ports[_hurd_nports];
struct hurd_userlink ulink_ports[_hurd_nports];
file_t *dtable;
- int dtablesize;
+ unsigned int dtablesize, i;
struct hurd_port **dtable_cells;
struct hurd_userlink *ulink_dtable;
- int i;
char *const *p;
struct hurd_sigstate *ss;
mach_port_t *please_dealloc, *pdp;
mach_port_t *portarray, size_t portarraysize,
int *intarray, size_t intarraysize)
{
- int i;
+ size_t i;
_hurd_exec_flags = flags;
(vm_address_t) oldpi, oldpisize * sizeof pi[0]);
pip = (struct procinfo *) pi;
- if (pip->owner != who)
+ if (pip->owner != (uid_t) who)
continue;
}
else
static void
init (void)
{
- size_t i;
+ int i;
__mutex_init (&lock);
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
};
error_t
-_hurd_ports_get (int which, mach_port_t *result)
+_hurd_ports_get (unsigned int which, mach_port_t *result)
{
- if (which < 0 || which >= _hurd_nports)
+ if (which >= _hurd_nports)
return EINVAL;
if (which >= INIT_PORT_MAX || _hurd_ports_getters[which] == NULL)
return HURD_PORT_USE (&_hurd_ports[which],
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
error_t
-_hurd_ports_set (int which, mach_port_t newport)
+_hurd_ports_set (unsigned int which, mach_port_t newport)
{
error_t err;
- if (which < 0 || which >= _hurd_nports)
+ if (which >= _hurd_nports)
return EINVAL;
if (err = __mach_port_mod_refs (__mach_task_self (), newport,
MACH_PORT_RIGHT_SEND, 1))
_hurd_setauth (auth_t new)
{
error_t err;
- int d;
+ unsigned int d;
mach_port_t newport, ref;
/* Give the new send right a user reference.
{
error_t err;
auth_t newauth;
- size_t i;
+ int i;
gid_t new[n];
/* Fault before taking locks. */
case 'n': /* Answer number of assignments done. */
if (do_assign)
- *ARG (int *) = read_in;
+ *ARG (int *) = read_in - 1; /* Don't count the read-ahead. */
break;
case 'c': /* Match characters. */
if (_hurdsig_catch_fault (SIGSEGV))
assert (_hurdsig_fault_sigcode >= (long int) pc &&
- _hurdsig_fault_sigcode < (long int) pc + sizeof syscall);
+ _hurdsig_fault_sigcode < (long int) (pc + sizeof syscall));
else
{
int rcving = (state->basic.eax == MACH_RCV_INTERRUPTED &&