Fix compilation with Altivec

View: New views
4 Messages — Rating Filter:   Alert me  

Fix compilation with Altivec

by Petr Baudis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(This is essentially the same as Andreas Schwab's similar change in Oct
2004. glibc-2.11 fails to build with -mcpu=cell, where __vector is
gcc-reserved keyword.)

2009-11-06  Petr Baudis <pasky@...>

        * include/sys/uio.h: Change __vector to __iovec to avoid clash
        with altivec.

diff --git a/include/sys/uio.h b/include/sys/uio.h
index 8c2b016..bfaec59 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -2,12 +2,12 @@
 #include <misc/sys/uio.h>
 
 /* Now define the internal interfaces.  */
-extern ssize_t __readv (int __fd, __const struct iovec *__vector,
+extern ssize_t __readv (int __fd, __const struct iovec *__iovec,
  int __count);
-extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector,
+extern ssize_t __libc_readv (int __fd, __const struct iovec *__iovec,
      int __count);
-extern ssize_t __writev (int __fd, __const struct iovec *__vector,
+extern ssize_t __writev (int __fd, __const struct iovec *__iovec,
  int __count);
-extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector,
+extern ssize_t __libc_writev (int __fd, __const struct iovec *__iovec,
       int __count);
 #endif


Re: Fix compilation with Altivec

by Ulrich Drepper :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11/06/2009 03:03 AM, Petr Baudis wrote:
> 2009-11-06  Petr Baudis<pasky@...>
>
> * include/sys/uio.h: Change __vector to __iovec to avoid clash
> with altivec.

Bollocks.  Tell these braindead idiots at IBM that they cannot steal
commonly used keywords.

--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

Re: Fix compilation with Altivec

by Ryan Arnold-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 2009-11-06 at 23:34 -0800, Ulrich Drepper wrote:
> On 11/06/2009 03:03 AM, Petr Baudis wrote:
> > 2009-11-06  Petr Baudis<pasky@...>
> >
> > * include/sys/uio.h: Change __vector to __iovec to avoid clash
> > with altivec.
>
> Bollocks.  Tell these braindead idiots at IBM that they cannot steal
> commonly used keywords.
>

Good grief.  Is it necessary to be so reactionary over something so
trivial?

This change from Petr should be non-controversial since it's simply
changing the un-required variable name in a function prototype.  

The existing usage in include/sys/uio.h is NOW in-fact a keyword usage
violation since "__vector" is now an actual keyword recognized by the
compiler.

Despite this, Michael Meissner pushed a GCC patch which continues to
allow the use of __vector as a variable name if it isn't followed by a
qualifier which WOULD identify it as a keyword:

http://gcc.gnu.org/ml/gcc-patches/2009-05/msg00026.html

Apparently this was pushed to a version of GCC later than that used by
Petr when he identified this problem.

Ryan S. Arnold
IBM Linux Technology Center


Re: Fix compilation with Altivec

by David Miller-13 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Ulrich Drepper <drepper@...>
Date: Fri, 06 Nov 2009 23:34:26 -0800

> Bollocks.  Tell these braindead idiots at IBM that they cannot steal
> commonly used keywords.

Thanks for the personal attacks, Ulrich.