[Glibc-bsd-commits] r4204 - in trunk/kfreebsd-kernel-headers: debian debian/patches test

Robert Millan rmh at alioth.debian.org
Wed Apr 18 21:15:37 UTC 2012


Author: rmh
Date: 2012-04-18 21:15:37 +0000 (Wed, 18 Apr 2012)
New Revision: 4204

Modified:
   trunk/kfreebsd-kernel-headers/debian/changelog
   trunk/kfreebsd-kernel-headers/debian/patches/cpufunc.diff
   trunk/kfreebsd-kernel-headers/debian/rules
   trunk/kfreebsd-kernel-headers/test/cpufunc.c
Log:
Do not remove out[bwl] from <machine/cpufunc.h>, rename them instead (and rename their users) to avoid conflict with glibc <sys/io.h>.  This will help un-breaking <machine/bus.h>.

Modified: trunk/kfreebsd-kernel-headers/debian/changelog
===================================================================
--- trunk/kfreebsd-kernel-headers/debian/changelog	2012-04-18 20:45:56 UTC (rev 4203)
+++ trunk/kfreebsd-kernel-headers/debian/changelog	2012-04-18 21:15:37 UTC (rev 4204)
@@ -1,8 +1,11 @@
 kfreebsd-kernel-headers (0.79) UNRELEASED; urgency=low
 
   * Add sed rule to replace __printflike.
+  * Do not remove out[bwl] from <machine/cpufunc.h>, rename them instead
+    (and rename their users) to avoid conflict with glibc <sys/io.h>.
+    This will help un-breaking <machine/bus.h>.
 
- -- Robert Millan <rmh at debian.org>  Sat, 07 Apr 2012 23:08:55 +0200
+ -- Robert Millan <rmh at debian.org>  Wed, 18 Apr 2012 23:08:39 +0200
 
 kfreebsd-kernel-headers (0.78) unstable; urgency=low
 

Modified: trunk/kfreebsd-kernel-headers/debian/patches/cpufunc.diff
===================================================================
--- trunk/kfreebsd-kernel-headers/debian/patches/cpufunc.diff	2012-04-18 20:45:56 UTC (rev 4203)
+++ trunk/kfreebsd-kernel-headers/debian/patches/cpufunc.diff	2012-04-18 21:15:37 UTC (rev 4204)
@@ -13,115 +13,6 @@
  #ifndef _SYS_CDEFS_H
  #error this file needs sys/cdefs.h as a prerequisite
  #endif
-@@ -173,108 +176,6 @@
- 	__asm __volatile("hlt");
- }
- 
--static __inline u_char
--inb(unsigned int port)
--{
--	unsigned char	data;
--
--	__asm __volatile("inb %w1, %0" : "=a" (data) : "Nd" (port));
--	return (data);
--}
--
--static __inline u_int
--inl(unsigned int port)
--{
--	unsigned int	data;
--
--	__asm __volatile("inl %w1, %0" : "=a" (data) : "Nd" (port));
--	return (data);
--}
--
--static __inline void
--insb(unsigned int port, void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; insb"
--			 : "+D" (addr), "+c" (count)
--			 : "d" (port)
--			 : "memory");
--}
--
--static __inline void
--insw(unsigned int port, void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; insw"
--			 : "+D" (addr), "+c" (count)
--			 : "d" (port)
--			 : "memory");
--}
--
--static __inline void
--insl(unsigned int port, void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; insl"
--			 : "+D" (addr), "+c" (count)
--			 : "d" (port)
--			 : "memory");
--}
--
--static __inline void
--invd(void)
--{
--	__asm __volatile("invd");
--}
--
--static __inline u_short
--inw(unsigned int port)
--{
--	unsigned short	data;
--
--	__asm __volatile("inw %w1, %0" : "=a" (data) : "Nd" (port));
--	return (data);
--}
--
--static __inline void
--outb(unsigned int port, unsigned char data)
--{
--	__asm __volatile("outb %0, %w1" : : "a" (data), "Nd" (port));
--}
--
--static __inline void
--outl(unsigned int port, unsigned int data)
--{
--	__asm __volatile("outl %0, %w1" : : "a" (data), "Nd" (port));
--}
--
--static __inline void
--outsb(unsigned int port, const void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; outsb"
--			 : "+S" (addr), "+c" (count)
--			 : "d" (port));
--}
--
--static __inline void
--outsw(unsigned int port, const void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; outsw"
--			 : "+S" (addr), "+c" (count)
--			 : "d" (port));
--}
--
--static __inline void
--outsl(unsigned int port, const void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; outsl"
--			 : "+S" (addr), "+c" (count)
--			 : "d" (port));
--}
--
--static __inline void
--outw(unsigned int port, unsigned short data)
--{
--	__asm __volatile("outw %0, %w1" : : "a" (data), "Nd" (port));
--}
--
- static __inline void
- mfence(void)
- {
 --- a/sys/mips/include/cpufunc.h
 +++ b/sys/mips/include/cpufunc.h
 @@ -60,6 +60,7 @@
@@ -165,112 +56,3 @@
  #ifndef _SYS_CDEFS_H
  #error this file needs sys/cdefs.h as a prerequisite
  #endif
-@@ -188,108 +191,6 @@
- 	__asm __volatile("hlt");
- }
- 
--static __inline u_char
--inb(unsigned int port)
--{
--	unsigned char	data;
--
--	__asm __volatile("inb %w1, %0" : "=a" (data) : "Nd" (port));
--	return (data);
--}
--
--static __inline u_int
--inl(unsigned int port)
--{
--	unsigned int	data;
--
--	__asm __volatile("inl %w1, %0" : "=a" (data) : "Nd" (port));
--	return (data);
--}
--
--static __inline void
--insb(unsigned int port, void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; insb"
--			 : "+D" (addr), "+c" (count)
--			 : "d" (port)
--			 : "memory");
--}
--
--static __inline void
--insw(unsigned int port, void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; insw"
--			 : "+D" (addr), "+c" (count)
--			 : "d" (port)
--			 : "memory");
--}
--
--static __inline void
--insl(unsigned int port, void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; insl"
--			 : "+D" (addr), "+c" (count)
--			 : "d" (port)
--			 : "memory");
--}
--
--static __inline void
--invd(void)
--{
--	__asm __volatile("invd");
--}
--
--static __inline u_short
--inw(unsigned int port)
--{
--	unsigned short	data;
--
--	__asm __volatile("inw %w1, %0" : "=a" (data) : "Nd" (port));
--	return (data);
--}
--
--static __inline void
--outb(unsigned int port, unsigned char data)
--{
--	__asm __volatile("outb %0, %w1" : : "a" (data), "Nd" (port));
--}
--
--static __inline void
--outl(unsigned int port, unsigned int data)
--{
--	__asm __volatile("outl %0, %w1" : : "a" (data), "Nd" (port));
--}
--
--static __inline void
--outsb(unsigned int port, const void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; outsb"
--			 : "+S" (addr), "+c" (count)
--			 : "d" (port));
--}
--
--static __inline void
--outsw(unsigned int port, const void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; outsw"
--			 : "+S" (addr), "+c" (count)
--			 : "d" (port));
--}
--
--static __inline void
--outsl(unsigned int port, const void *addr, size_t count)
--{
--	__asm __volatile("cld; rep; outsl"
--			 : "+S" (addr), "+c" (count)
--			 : "d" (port));
--}
--
--static __inline void
--outw(unsigned int port, unsigned short data)
--{
--	__asm __volatile("outw %0, %w1" : : "a" (data), "Nd" (port));
--}
--
- static __inline void
- ia32_pause(void)
- {

Modified: trunk/kfreebsd-kernel-headers/debian/rules
===================================================================
--- trunk/kfreebsd-kernel-headers/debian/rules	2012-04-18 20:45:56 UTC (rev 4203)
+++ trunk/kfreebsd-kernel-headers/debian/rules	2012-04-18 21:15:37 UTC (rev 4204)
@@ -65,6 +65,8 @@
 		-e 's/\(\s\|^\|(\)u_\(char\|int\|short\|long\)\(\s\)/\1unsigned \2\3/g' \
 		-e 's/__printflike(\([0-9]\+\),\s*\([0-9]\+\))/__attribute__((__format__ (__printf__, \1, \2)))/g' \
 		\
+		-e 's/\(\s\|^\|(\)\(out[bwl]\)\(\s*(\)/\1__bsd_\2\3/g' \
+		\
 		-e 's/defined\s*(\s*_SYS_CDEFS_H_\s*)/defined(_SYS_CDEFS_H)/g' \
 		-e 's/#\s*ifdef\s*_SYS_CDEFS_H_\(\s\|$$\)/#ifdef _SYS_CDEFS_H/g' \
 		-e 's/#\s*ifndef\s*_SYS_CDEFS_H_\(\s\|$$\)/#ifndef _SYS_CDEFS_H/g' \

Modified: trunk/kfreebsd-kernel-headers/test/cpufunc.c
===================================================================
--- trunk/kfreebsd-kernel-headers/test/cpufunc.c	2012-04-18 20:45:56 UTC (rev 4203)
+++ trunk/kfreebsd-kernel-headers/test/cpufunc.c	2012-04-18 21:15:37 UTC (rev 4204)
@@ -1,7 +1,4 @@
 #include <sys/types.h>
 
-/* Include potentially conflicting declarations: inb(), inw(), outb(), etc. */
-#include <sys/io.h>
-
 /* Include <machine/cpufunc.h> WITHOUT explicit <stdint.h>. */
 #include <machine/cpufunc.h>




More information about the Glibc-bsd-commits mailing list