]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
This patch corrects compile errors when we build -maltivec
authorSteven Munroe <munroesj@us.ibm.com>
Fri, 31 Jul 2009 19:25:58 +0000 (14:25 -0500)
committerRyan Arnold <ryanarn@etna.rchland.ibm.com>
Fri, 31 Jul 2009 19:52:42 +0000 (14:52 -0500)
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.

misc/readv.c
misc/writev.c
sysdeps/posix/readv.c
sysdeps/posix/writev.c
sysdeps/unix/sysv/linux/readv.c
sysdeps/unix/sysv/linux/writev.c

index b33444c036e51ccef280d26897a220cf7af91189..f170b7b859b644e8fd5e367f480c8ed85c4e78ae 100644 (file)
@@ -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);
index d424c72143f6769159d1eed1083048643369648e..ae1c17bea96e3a4b96220d0866e0655b44b624d1 100644 (file)
@@ -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);
index f0e78e66629971c628d67ccc71bf03856d3715b2..8d709e3ef22fc2b76df349a550bd5e3365c286b9 100644 (file)
@@ -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;
index a347cc2eac87a4f5e84aec54350cd5327a8fafe8..cf642db340303d71ef8208e8fbcd82e67a0eeb44 100644 (file)
@@ -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)
index 250c00a075bdc2aea2dff9fd0fc5e512bc05e894..8de37205658f050bd65daf6852c2fdeda5408198 100644 (file)
@@ -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);
 
index 05978665fa91e37ce8d70ef29c5cb0454692dbe0..d6dbdaabc4de14319ebd62175d6ed1a0f7d8ee79 100644 (file)
@@ -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);