mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Sun Jul 21 01:44:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
* locale/programs/locfile.c (write_locale_data): Deal with missing UIO_MAXIOV. * sysdeps/mach/hurd/socket.c (socket): Make TYPE an int. * sysdeps/mach/hurd/socketpair.c (socketpair): Likewise.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
Sun Jul 21 01:44:39 1996 Miles Bader <miles@gnu.ai.mit.edu>
|
||||||
|
|
||||||
|
* locale/programs/locfile.c (write_locale_data): Deal with missing
|
||||||
|
UIO_MAXIOV.
|
||||||
|
|
||||||
|
* sysdeps/mach/hurd/socket.c (socket): Make TYPE an int.
|
||||||
|
* sysdeps/mach/hurd/socketpair.c (socketpair): Likewise.
|
||||||
|
|
||||||
Sat Jul 20 13:28:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
|
Sat Jul 20 13:28:52 1996 Miles Bader <miles@gnu.ai.mit.edu>
|
||||||
|
|
||||||
* sysdeps/mach/hurd/select.c (__select): Don't poll on the last
|
* sysdeps/mach/hurd/select.c (__select): Don't poll on the last
|
||||||
|
@@ -931,7 +931,7 @@ void
|
|||||||
write_locale_data (const char *output_path, const char *category,
|
write_locale_data (const char *output_path, const char *category,
|
||||||
size_t n_elem, struct iovec *vec)
|
size_t n_elem, struct iovec *vec)
|
||||||
{
|
{
|
||||||
size_t cnt, step;
|
size_t cnt, step, maxiov;
|
||||||
int fd;
|
int fd;
|
||||||
char *fname;
|
char *fname;
|
||||||
|
|
||||||
@@ -959,11 +959,19 @@ write_locale_data (const char *output_path, const char *category,
|
|||||||
}
|
}
|
||||||
free (fname);
|
free (fname);
|
||||||
|
|
||||||
|
#ifdef UIO_MAXIOV
|
||||||
|
maxiov = UIO_MAXIOV;
|
||||||
|
#else
|
||||||
|
maxiov = sysconf (_SC_UIO_MAXIOV);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Write the data using writev. But we must take care for the
|
/* Write the data using writev. But we must take care for the
|
||||||
limitation of the implementation. */
|
limitation of the implementation. */
|
||||||
for (cnt = 0; cnt < n_elem; cnt += step)
|
for (cnt = 0; cnt < n_elem; cnt += step)
|
||||||
{
|
{
|
||||||
step = MIN (UIO_MAXIOV, n_elem - cnt);
|
step = n_elem - cnt;
|
||||||
|
if (maxiov > 0)
|
||||||
|
step = MIN (maxiov, step);
|
||||||
|
|
||||||
if (writev (fd, &vec[cnt], step) < 0)
|
if (writev (fd, &vec[cnt], step) < 0)
|
||||||
{
|
{
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -29,7 +29,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
Returns a file descriptor for the new socket, or -1 for errors. */
|
Returns a file descriptor for the new socket, or -1 for errors. */
|
||||||
int
|
int
|
||||||
DEFUN(socket, (domain, type, protocol),
|
DEFUN(socket, (domain, type, protocol),
|
||||||
int domain AND enum __socket_type type AND int protocol)
|
int domain AND int type AND int protocol)
|
||||||
{
|
{
|
||||||
error_t err;
|
error_t err;
|
||||||
socket_t sock, server;
|
socket_t sock, server;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
|
/* Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */
|
|||||||
one will be chosen automatically. Returns 0 on success, -1 for errors. */
|
one will be chosen automatically. Returns 0 on success, -1 for errors. */
|
||||||
int
|
int
|
||||||
DEFUN(socketpair, (domain, type, protocol, fds),
|
DEFUN(socketpair, (domain, type, protocol, fds),
|
||||||
int domain AND enum __socket_type type AND int protocol AND int fds[2])
|
int domain AND int type AND int protocol AND int fds[2])
|
||||||
{
|
{
|
||||||
error_t err;
|
error_t err;
|
||||||
socket_t server, sock1, sock2;
|
socket_t server, sock1, sock2;
|
||||||
|
Reference in New Issue
Block a user