summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Munroe <munroesj@us.ibm.com>2009-07-31 14:25:58 -0500
committerRyan Arnold <ryanarn@etna.rchland.ibm.com>2009-07-31 14:52:42 -0500
commit8b06a408445a9b0fb5a9f774e5c994f4583d3d30 (patch)
tree43b29ba84c434cda8c2cf958c4c42f0485b0b012
parent4b137bd5fc6be539f99df76c32093df36a146439 (diff)
downloadglibc-8b06a408445a9b0fb5a9f774e5c994f4583d3d30.tar.gz
This patch corrects compile errors when we build -maltivec
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.
-rw-r--r--misc/readv.c4
-rw-r--r--misc/writev.c4
-rw-r--r--sysdeps/posix/readv.c10
-rw-r--r--sysdeps/posix/writev.c10
-rw-r--r--sysdeps/unix/sysv/linux/readv.c14
-rw-r--r--sysdeps/unix/sysv/linux/writev.c14
6 files changed, 28 insertions, 28 deletions
diff --git a/misc/readv.c b/misc/readv.c
index b33444c036..f170b7b859 100644
--- a/misc/readv.c
+++ b/misc/readv.c
@@ -26,9 +26,9 @@
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);
diff --git a/misc/writev.c b/misc/writev.c
index d424c72143..ae1c17bea9 100644
--- a/misc/writev.c
+++ b/misc/writev.c
@@ -26,9 +26,9 @@
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);
diff --git a/sysdeps/posix/readv.c b/sysdeps/posix/readv.c
index f0e78e6662..8d709e3ef2 100644
--- a/sysdeps/posix/readv.c
+++ b/sysdeps/posix/readv.c
@@ -31,7 +31,7 @@
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;
@@ -45,12 +45,12 @@ __libc_readv (int fd, const struct iovec *vector, int count)
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
@@ -80,9 +80,9 @@ __libc_readv (int fd, const struct iovec *vector, int count)
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;
diff --git a/sysdeps/posix/writev.c b/sysdeps/posix/writev.c
index a347cc2eac..cf642db340 100644
--- a/sysdeps/posix/writev.c
+++ b/sysdeps/posix/writev.c
@@ -31,7 +31,7 @@
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;
@@ -45,12 +45,12 @@ __libc_writev (int fd, const struct iovec *vector, int count)
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
@@ -75,9 +75,9 @@ __libc_writev (int fd, const struct iovec *vector, int count)
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)
diff --git a/sysdeps/unix/sysv/linux/readv.c b/sysdeps/unix/sysv/linux/readv.c
index 250c00a075..8de3720565 100644
--- a/sysdeps/unix/sysv/linux/readv.c
+++ b/sysdeps/unix/sysv/linux/readv.c
@@ -39,31 +39,31 @@ static ssize_t __atomic_readv_replacement (int, __const struct iovec *,
/* 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);
diff --git a/sysdeps/unix/sysv/linux/writev.c b/sysdeps/unix/sysv/linux/writev.c
index 05978665fa..d6dbdaabc4 100644
--- a/sysdeps/unix/sysv/linux/writev.c
+++ b/sysdeps/unix/sysv/linux/writev.c
@@ -39,30 +39,30 @@ static ssize_t __atomic_writev_replacement (int, const struct iovec *,
/* 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);