where gcc-4.3 takes vector as a key word.
2009-07-31 Steven Munroe <munroesj@us.ibm.com>
* misc/readv.c (__libc_readv): Change vector to io_vector to
avoid -altivec keyword.
* misc/writev.c (__libc_writev): Ditto.
* sysdeps/posix/readv.c (__libc_readv): Ditto.
* sysdeps/posix/writev.c (__libc_writev): Ditto.
* sysdeps/unix/sysv/linux/readv.c (do_readv, __libc_readv):
Ditto.
* sysdeps/unix/sysv/linux/writev.c (do_writev, __libc_writev):
Ditto.
Operates just like `read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
ssize_t
-__libc_readv (fd, vector, count)
+__libc_readv (fd, io_vector, count)
int fd;
- const struct iovec *vector;
+ const struct iovec *io_vector;
int count;
{
__set_errno (ENOSYS);
Operates just like `write' (see <unistd.h>) except that the data
are taken from VECTOR instead of a contiguous buffer. */
ssize_t
-__libc_writev (fd, vector, count)
+__libc_writev (fd, io_vector, count)
int fd;
- const struct iovec *vector;
+ const struct iovec *io_vector;
int count;
{
__set_errno (ENOSYS);
Operates just like `read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
ssize_t
-__libc_readv (int fd, const struct iovec *vector, int count)
+__libc_readv (int fd, const struct iovec *io_vector, int count)
{
char *buffer;
char *buffer_start;
for (i = 0; i < count; ++i)
{
/* Check for ssize_t overflow. */
- if (SSIZE_MAX - bytes < vector[i].iov_len)
+ if (SSIZE_MAX - bytes < io_vector[i].iov_len)
{
__set_errno (EINVAL);
return -1;
}
- bytes += vector[i].iov_len;
+ bytes += io_vector[i].iov_len;
}
/* Allocate a temporary buffer to hold the data. We should normally
buffer_start = buffer;
for (i = 0; i < count; ++i)
{
- size_t copy = MIN (vector[i].iov_len, bytes);
+ size_t copy = MIN (io_vector[i].iov_len, bytes);
- (void) memcpy ((void *) vector[i].iov_base, (void *) buffer, copy);
+ (void) memcpy ((void *) io_vector[i].iov_base, (void *) buffer, copy);
buffer += copy;
bytes -= copy;
Operates just like `write' (see <unistd.h>) except that the data
are taken from VECTOR instead of a contiguous buffer. */
ssize_t
-__libc_writev (int fd, const struct iovec *vector, int count)
+__libc_writev (int fd, const struct iovec *io_vector, int count)
{
char *buffer;
register char *bp;
for (i = 0; i < count; ++i)
{
/* Check for ssize_t overflow. */
- if (SSIZE_MAX - bytes < vector[i].iov_len)
+ if (SSIZE_MAX - bytes < io_vector[i].iov_len)
{
__set_errno (EINVAL);
return -1;
}
- bytes += vector[i].iov_len;
+ bytes += io_vector[i].iov_len;
}
/* Allocate a temporary buffer to hold the data. We should normally
bp = buffer;
for (i = 0; i < count; ++i)
{
- size_t copy = MIN (vector[i].iov_len, to_copy);
+ size_t copy = MIN (io_vector[i].iov_len, to_copy);
- bp = __mempcpy ((void *) bp, (void *) vector[i].iov_base, copy);
+ bp = __mempcpy ((void *) bp, (void *) io_vector[i].iov_base, copy);
to_copy -= copy;
if (to_copy == 0)
/* We should deal with kernel which have a smaller UIO_FASTIOV as well
as a very big count. */
static ssize_t
-do_readv (int fd, const struct iovec *vector, int count)
+do_readv (int fd, const struct iovec *io_vector, int count)
{
ssize_t bytes_read;
- bytes_read = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
+ bytes_read = INLINE_SYSCALL (readv, 3, fd, CHECK_N (io_vector, count), count);
if (bytes_read >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
return bytes_read;
- return __atomic_readv_replacement (fd, vector, count);
+ return __atomic_readv_replacement (fd, io_vector, count);
}
ssize_t
-__libc_readv (fd, vector, count)
+__libc_readv (fd, io_vector, count)
int fd;
- const struct iovec *vector;
+ const struct iovec *io_vector;
int count;
{
if (SINGLE_THREAD_P)
- return do_readv (fd, vector, count);
+ return do_readv (fd, io_vector, count);
int oldtype = LIBC_CANCEL_ASYNC ();
- int result = do_readv (fd, vector, count);
+ int result = do_readv (fd, io_vector, count);
LIBC_CANCEL_RESET (oldtype);
/* We should deal with kernel which have a smaller UIO_FASTIOV as well
as a very big count. */
static ssize_t
-do_writev (int fd, const struct iovec *vector, int count)
+do_writev (int fd, const struct iovec *io_vector, int count)
{
ssize_t bytes_written;
- bytes_written = INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
+ bytes_written = INLINE_SYSCALL (writev, 3, fd, CHECK_N (io_vector, count), count);
if (bytes_written >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
return bytes_written;
- return __atomic_writev_replacement (fd, vector, count);
+ return __atomic_writev_replacement (fd, io_vector, count);
}
ssize_t
-__libc_writev (fd, vector, count)
+__libc_writev (fd, io_vector, count)
int fd;
- const struct iovec *vector;
+ const struct iovec *io_vector;
int count;
{
if (SINGLE_THREAD_P)
- return do_writev (fd, vector, count);
+ return do_writev (fd, io_vector, count);
int oldtype = LIBC_CANCEL_ASYNC ();
- ssize_t result = do_writev (fd, vector, count);
+ ssize_t result = do_writev (fd, io_vector, count);
LIBC_CANCEL_RESET (oldtype);