In gnumach,
3e1702a65fb3 ("add rpc_versions for vm types") changed the type
of vm_size_t, making it always a unsigned long. This made it incompatible on
x86 with size_t. Even if we may want to revert it to unsigned int, it's
better to fix the types of parameters according to the .defs files.
const void *buf, size_t *nbytes, loff_t offset)
{
error_t err;
- mach_msg_type_number_t wrote;
+ vm_size_t wrote;
error_t writefd (io_t port)
{
static ssize_t
writeio (void *cookie, const char *buf, size_t n)
{
- mach_msg_type_number_t wrote;
+ vm_size_t wrote;
error_t err;
if (err = __io_write ((io_t) cookie, buf, n, -1, &wrote))
{
error_t err;
char *data;
- mach_msg_type_number_t nread, more;
+ mach_msg_type_number_t nread;
+ vm_size_t more;
file_t config;
err = __hurd_file_name_lookup (&_hurd_ports_use, &__getdport, 0,
case FIONREAD:
{
- mach_msg_type_number_t navail;
+ vm_size_t navail;
err = HURD_DPORT_USE (fd, __io_readable (port, &navail));
if (!err)
*arg = (int) navail;
_hurd_set_host_config (const char *item, const char *value, size_t valuelen)
{
error_t err;
- mach_msg_type_number_t nwrote;
+ vm_size_t nwrote;
file_t new, dir;
char *name;
static ssize_t
do_write (void *cookie, const char *buf, size_t n)
{
- error_t error = __io_write ((io_t) cookie, buf, n, -1,
- (mach_msg_type_number_t *) &n);
+ vm_size_t amount = n;
+ error_t error = __io_write ((io_t) cookie, buf, n, -1, &amount);
if (error)
return __hurd_fail (error);
return n;
__write (int fd, const void *buf, size_t nbytes)
{
error_t err;
- mach_msg_type_number_t nwrote;
+ vm_size_t nwrote;
assert (fd < _hurd_init_dtablesize);
{
char buf[total], *bufp = buf;
error_t err;
- mach_msg_type_number_t nwrote;
+ vm_size_t nwrote;
for (i = 0; i < niov; ++i)
bufp = (memcpy (bufp, iov[i].iov_base, iov[i].iov_len)
{
/* Read the pages containing the addressed range. */
error_t err;
+ mach_msg_type_number_t nread;
*size = round_page (addr + data) - trunc_page (addr);
- err = __vm_read (task, trunc_page (addr), *size, ourpage, size);
+ err = __vm_read (task, trunc_page (addr), *size, ourpage, &nread);
+ if (!err)
+ *size = nread;
return err;
}
__send (int fd, const void *buf, size_t n, int flags)
{
error_t err;
- size_t wrote;
+ vm_size_t wrote;
int cancel_oldtype;
cancel_oldtype = LIBC_CANCEL_ASYNC();
count));
if (err == 0)
{
- size_t nwrote;
+ vm_size_t nwrote;
if (datalen == 0)
return 0;
err = HURD_DPORT_USE (out_fd, __io_write (port, data, datalen,
} data = { .ptr = NULL };
char data_buf[2048];
mach_msg_type_number_t len;
- mach_msg_type_number_t amount;
+ vm_size_t amount;
int dealloc = 0;
int socketrpc = 0;
int i;
{
addr_port_t aport = MACH_PORT_NULL;
error_t err;
- size_t wrote;
+ vm_size_t wrote;
/* Get an address port for the desired destination address. */
error_t create_address_port (io_t port,