This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ARM,MIPS,M68K] Header namespace fixes


I noticed that some fixes such as those in 
<http://sourceware.org/ml/libc-hacker/2009-02/msg00000.html> (stopping 
installed headers from using parameter names etc. in the user's namespace, 
so that no problems arise with macros defined by the user before the 
header is included) were also needed for headers installed for ports 
targets.  This patch fixes such cases, including target-specific headers 
and one use of "aligned" (should be __aligned__) as an attribute, for ARM, 
MIPS and M68K.  I've committed the ARM and MIPS parts; OK to commit the 
M68K part?

Index: ChangeLog.arm
===================================================================
RCS file: /cvs/glibc/ports/ChangeLog.arm,v
retrieving revision 1.93
diff -u -r1.93 ChangeLog.arm
--- ChangeLog.arm	3 Mar 2009 23:18:56 -0000	1.93
+++ ChangeLog.arm	15 Mar 2009 16:50:42 -0000
@@ -1,3 +1,9 @@
+2009-03-15  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/bits/link.h: Uglify function parameter names.
+	* sysdeps/unix/sysv/linux/arm/sys/io.h: Likewise.
+	* sysdeps/arm/eabi/bits/setjmp.h: Uglify attribute name.
+
 2009-03-03  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Declare
Index: ChangeLog.m68k
===================================================================
RCS file: /cvs/glibc/ports/ChangeLog.m68k,v
retrieving revision 1.11
diff -u -r1.11 ChangeLog.m68k
--- ChangeLog.m68k	4 Mar 2009 22:49:21 -0000	1.11
+++ ChangeLog.m68k	15 Mar 2009 16:50:42 -0000
@@ -1,3 +1,7 @@
+2009-03-15  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/m68k/bits/link.h: Uglify function parameter names.
+
 2009-03-04  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Declare
Index: ChangeLog.mips
===================================================================
RCS file: /cvs/glibc/ports/ChangeLog.mips,v
retrieving revision 1.74
diff -u -r1.74 ChangeLog.mips
--- ChangeLog.mips	3 Mar 2009 23:19:19 -0000	1.74
+++ ChangeLog.mips	15 Mar 2009 16:50:42 -0000
@@ -1,3 +1,11 @@
+2009-03-15  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/mips/bits/link.h: Uglify function parameter names.
+	* sysdeps/unix/sysv/linux/mips/sys/cachectl.h: Likewise.
+	* sysdeps/unix/sysv/linux/mips/sys/eventfd.h: Likewise.
+	* sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Likewise.
+	* sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise.
+
 2009-03-03  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Declare
Index: sysdeps/arm/bits/link.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/bits/link.h,v
retrieving revision 1.3
diff -u -r1.3 link.h
--- sysdeps/arm/bits/link.h	10 Jun 2005 11:33:52 -0000	1.3
+++ sysdeps/arm/bits/link.h	15 Mar 2009 16:50:42 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -61,6 +61,6 @@
 					uintptr_t *__defcook,
 					const La_arm_regs *__inregs,
 					La_arm_retval *__outregs,
-					const char *symname);
+					const char *__symname);
 
 __END_DECLS
Index: sysdeps/arm/eabi/bits/setjmp.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/bits/setjmp.h,v
retrieving revision 1.4
diff -u -r1.4 setjmp.h
--- sysdeps/arm/eabi/bits/setjmp.h	10 Jan 2006 09:22:15 -0000	1.4
+++ sysdeps/arm/eabi/bits/setjmp.h	15 Mar 2009 16:50:42 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@
    recommends that the buffer contain 64 words.  The first 28 words
    are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr.  (Note
    that d8-15 require 17 words, due to the use of fstmx.)  */
-typedef int __jmp_buf[64] __attribute__((aligned (8)));
+typedef int __jmp_buf[64] __attribute__((__aligned__ (8)));
 #endif
 
 #endif
Index: sysdeps/m68k/bits/link.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/m68k/bits/link.h,v
retrieving revision 1.1
diff -u -r1.1 link.h
--- sysdeps/m68k/bits/link.h	16 Jan 2005 02:07:29 -0000	1.1
+++ sysdeps/m68k/bits/link.h	15 Mar 2009 16:50:43 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -53,6 +53,6 @@
 					 uintptr_t *__defcook,
 					 const La_m68k_regs *__inregs,
 					 La_m68k_retval *__outregs,
-					 const char *symname);
+					 const char *__symname);
 
 __END_DECLS
Index: sysdeps/mips/bits/link.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/mips/bits/link.h,v
retrieving revision 1.1
diff -u -r1.1 link.h
--- sysdeps/mips/bits/link.h	28 Mar 2005 07:43:51 -0000	1.1
+++ sysdeps/mips/bits/link.h	15 Mar 2009 16:50:43 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -79,7 +79,7 @@
 					     uintptr_t *__defcook,
 					     const La_mips_32_regs *__inregs,
 					     La_mips_32_retval *__outregs,
-					     const char *symname);
+					     const char *__symname);
 
 #elif _MIPS_SIM == _ABIN32
 
@@ -95,7 +95,7 @@
 					     uintptr_t *__defcook,
 					     const La_mips_64_regs *__inregs,
 					     La_mips_64_retval *__outregs,
-					     const char *symname);
+					     const char *__symname);
 
 #else
 
@@ -111,7 +111,7 @@
 					     uintptr_t *__defcook,
 					     const La_mips_64_regs *__inregs,
 					     La_mips_64_retval *__outregs,
-					     const char *symname);
+					     const char *__symname);
 
 #endif
 
Index: sysdeps/unix/sysv/linux/arm/sys/io.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/arm/sys/io.h,v
retrieving revision 1.3
diff -u -r1.3 io.h
--- sysdeps/unix/sysv/linux/arm/sys/io.h	6 Jul 2001 04:56:13 -0000	1.3
+++ sysdeps/unix/sysv/linux/arm/sys/io.h	15 Mar 2009 16:50:43 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1998, 1999, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -35,13 +35,13 @@
 extern int iopl (int __level) __THROW;
 
 /* The functions that actually perform reads and writes.  */
-extern unsigned char inb (unsigned long int port) __THROW;
-extern unsigned short int inw (unsigned long int port) __THROW;
-extern unsigned long int inl (unsigned long int port) __THROW;
-
-extern void outb (unsigned char value, unsigned long int port) __THROW;
-extern void outw (unsigned short value, unsigned long int port) __THROW;
-extern void outl (unsigned long value, unsigned long int port) __THROW;
+extern unsigned char inb (unsigned long int __port) __THROW;
+extern unsigned short int inw (unsigned long int __port) __THROW;
+extern unsigned long int inl (unsigned long int __port) __THROW;
+
+extern void outb (unsigned char __value, unsigned long int __port) __THROW;
+extern void outw (unsigned short __value, unsigned long int __port) __THROW;
+extern void outl (unsigned long __value, unsigned long int __port) __THROW;
 
 __END_DECLS
 
Index: sysdeps/unix/sysv/linux/mips/sys/cachectl.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/mips/sys/cachectl.h,v
retrieving revision 1.3
diff -u -r1.3 cachectl.h
--- sysdeps/unix/sysv/linux/mips/sys/cachectl.h	6 Jul 2001 04:56:18 -0000	1.3
+++ sysdeps/unix/sysv/linux/mips/sys/cachectl.h	15 Mar 2009 16:50:43 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,13 +29,13 @@
 __BEGIN_DECLS
 
 #ifdef __USE_MISC
-extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW;
+extern int cachectl (void *__addr, __const int __nbytes, __const int __op) __THROW;
 #endif
-extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW;
+extern int __cachectl (void *__addr, __const int __nbytes, __const int __op) __THROW;
 #ifdef __USE_MISC
-extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW;
+extern int cacheflush (void *__addr, __const int __nbytes, __const int __op) __THROW;
 #endif
-extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW;
+extern int _flush_cache (char *__addr, __const int __nbytes, __const int __op) __THROW;
 
 __END_DECLS
 
Index: sysdeps/unix/sysv/linux/mips/sys/eventfd.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/mips/sys/eventfd.h,v
retrieving revision 1.1
diff -u -r1.1 eventfd.h
--- sysdeps/unix/sysv/linux/mips/sys/eventfd.h	19 Aug 2008 16:12:35 -0000	1.1
+++ sysdeps/unix/sysv/linux/mips/sys/eventfd.h	15 Mar 2009 16:50:43 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -45,7 +45,7 @@
 extern int eventfd_read (int __fd, eventfd_t *__value);
 
 /* Increment event counter.  */
-extern int eventfd_write (int __fd, eventfd_t value);
+extern int eventfd_write (int __fd, eventfd_t __value);
 
 __END_DECLS
 
Index: sysdeps/unix/sysv/linux/mips/sys/sysmips.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/mips/sys/sysmips.h,v
retrieving revision 1.4
diff -u -r1.4 sysmips.h
--- sysdeps/unix/sysv/linux/mips/sys/sysmips.h	15 Oct 2001 11:56:11 -0000	1.4
+++ sysdeps/unix/sysv/linux/mips/sys/sysmips.h	15 Mar 2009 16:50:43 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 2000, 2001, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@
 
 __BEGIN_DECLS
 
-extern int sysmips (__const int cmd, ...) __THROW;
+extern int sysmips (__const int __cmd, ...) __THROW;
 
 __END_DECLS
 
Index: sysdeps/unix/sysv/linux/mips/sys/tas.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/mips/sys/tas.h,v
retrieving revision 1.15
diff -u -r1.15 tas.h
--- sysdeps/unix/sysv/linux/mips/sys/tas.h	28 Mar 2008 17:41:20 -0000	1.15
+++ sysdeps/unix/sysv/linux/mips/sys/tas.h	15 Mar 2009 16:50:43 -0000
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004, 2007, 2009
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
 
@@ -25,7 +26,7 @@
 
 __BEGIN_DECLS
 
-extern int _test_and_set (int *p, int v) __THROW;
+extern int _test_and_set (int *__p, int __v) __THROW;
 
 #ifdef __USE_EXTERN_INLINES
 
@@ -34,9 +35,9 @@
 # endif
 
 _EXTERN_INLINE int
-__NTH (_test_and_set (int *p, int v))
+__NTH (_test_and_set (int *__p, int __v))
 {
-  int r, t;
+  int __r, __t;
 
   __asm__ __volatile__
     ("/* Inline test and set */\n"
@@ -55,11 +56,11 @@
      ".set	pop\n\t"
      "2:\n\t"
      "/* End test and set */"
-     : "=&r" (r), "=&r" (t), "=m" (*p)
-     : "m" (*p), "r" (v)
+     : "=&r" (__r), "=&r" (__t), "=m" (*__p)
+     : "m" (*__p), "r" (__v)
      : "memory");
 
-  return r;
+  return __r;
 }
 
 #endif /* __USE_EXTERN_INLINES */

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]