From stefan@fafoe.dyndns.org  Sat Oct 25 05:18:09 2003
Return-Path: <stefan@fafoe.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4EAF716A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 25 Oct 2003 05:18:09 -0700 (PDT)
Received: from fafoe.narf.at (chello212186121237.14.vie.surfer.at [212.186.121.237])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 06D1443FA3
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 25 Oct 2003 05:18:08 -0700 (PDT)
	(envelope-from stefan@fafoe.dyndns.org)
Received: from frog.fafoe.narf.at (frog.fafoe.narf.at [192.168.2.101])
	by fafoe.narf.at (Postfix) with ESMTP
	id 0CE394100; Sat, 25 Oct 2003 14:18:04 +0200 (CEST)
Received: by frog.fafoe.narf.at (Postfix, from userid 1001)
	id 0C69626A; Sat, 25 Oct 2003 14:18:02 +0200 (CEST)
Message-Id: <20031025121802.0C69626A@frog.fafoe.narf.at>
Date: Sat, 25 Oct 2003 14:18:02 +0200 (CEST)
From: Stefan Farfeleder <stefan@fafoe.narf.at>
Reply-To: Stefan Farfeleder <stefan@fafoe.narf.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc: stefan@fafoe.narf.at
Subject: [patch] Header fixes for !__GNUC__ compilers
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58515
>Category:       kern
>Synopsis:       [patch] Header fixes for !__GNUC__ compilers
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    le
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 25 05:20:08 PDT 2003
>Closed-Date:    Sat Mar 06 01:26:40 PST 2004
>Last-Modified:  Sat Mar 06 01:26:40 PST 2004
>Originator:     Stefan Farfeleder
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD frog.fafoe.narf.at 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Fri Oct 24 03:01:17 CEST 2003 freebsd@frog.fafoe.narf.at:/freebsd/frog/obj/freebsd/frog/src/sys/FROG i386


	
>Description:
The patch fixes two problems.  The first one is missing semicolons after
cpu_critical_enter() and cpu_critical_exit() in
<arch>/include/critical.h which leads to a syntax error.  The second
issue is missing const qualifiers in the prototypes of outsb(), outsl()
and outsw().  The addr parameter is const in the __GNUC__ case and
functions like bus_space_write_multi_1() are passing const qualified
arguments to outsb().

>How-To-Repeat:
>Fix:
--- nongnuc.diff begins here ---
Index: src/sys/alpha/include/critical.h
===================================================================
RCS file: /usr/home/ncvs/src/sys/alpha/include/critical.h,v
retrieving revision 1.3
diff -u -r1.3 critical.h
--- src/sys/alpha/include/critical.h	12 Aug 2003 23:24:03 -0000	1.3
+++ src/sys/alpha/include/critical.h	25 Oct 2003 11:28:40 -0000
@@ -81,8 +81,8 @@
 
 #else /* !__GNUC__ */
 
-void cpu_critical_enter(void)
-void cpu_critical_exit(void)
+void cpu_critical_enter(void);
+void cpu_critical_exit(void);
 
 #endif	/* __GNUC__ */
 
Index: src/sys/amd64/include/cpufunc.h
===================================================================
RCS file: /usr/home/ncvs/src/sys/amd64/include/cpufunc.h,v
retrieving revision 1.136
diff -u -r1.136 cpufunc.h
--- src/sys/amd64/include/cpufunc.h	15 May 2003 00:23:40 -0000	1.136
+++ src/sys/amd64/include/cpufunc.h	25 Oct 2003 11:50:44 -0000
@@ -592,9 +592,9 @@
 void	ltr(u_short sel);
 void	outb(u_int port, u_char data);
 void	outl(u_int port, u_int data);
-void	outsb(u_int port, void *addr, size_t cnt);
-void	outsl(u_int port, void *addr, size_t cnt);
-void	outsw(u_int port, void *addr, size_t cnt);
+void	outsb(u_int port, const void *addr, size_t cnt);
+void	outsl(u_int port, const void *addr, size_t cnt);
+void	outsw(u_int port, const void *addr, size_t cnt);
 void	outw(u_int port, u_short data);
 void	ia32_pause(void);
 u_int	rcr0(void);
Index: src/sys/amd64/include/critical.h
===================================================================
RCS file: /usr/home/ncvs/src/sys/amd64/include/critical.h,v
retrieving revision 1.5
diff -u -r1.5 critical.h
--- src/sys/amd64/include/critical.h	12 Aug 2003 23:24:04 -0000	1.5
+++ src/sys/amd64/include/critical.h	25 Oct 2003 11:29:52 -0000
@@ -81,8 +81,8 @@
 
 #else /* !__GNUC__ */
 
-void cpu_critical_enter(void)
-void cpu_critical_exit(void)
+void cpu_critical_enter(void);
+void cpu_critical_exit(void);
 
 #endif	/* __GNUC__ */
 
Index: src/sys/i386/include/cpufunc.h
===================================================================
RCS file: /usr/home/ncvs/src/sys/i386/include/cpufunc.h,v
retrieving revision 1.135
diff -u -r1.135 cpufunc.h
--- src/sys/i386/include/cpufunc.h	6 Aug 2003 18:21:27 -0000	1.135
+++ src/sys/i386/include/cpufunc.h	25 Oct 2003 11:28:32 -0000
@@ -650,9 +650,9 @@
 void	ltr(u_short sel);
 void	outb(u_int port, u_char data);
 void	outl(u_int port, u_int data);
-void	outsb(u_int port, void *addr, size_t cnt);
-void	outsl(u_int port, void *addr, size_t cnt);
-void	outsw(u_int port, void *addr, size_t cnt);
+void	outsb(u_int port, const void *addr, size_t cnt);
+void	outsl(u_int port, const void *addr, size_t cnt);
+void	outsw(u_int port, const void *addr, size_t cnt);
 void	outw(u_int port, u_short data);
 void	ia32_pause(void);
 u_int	rcr0(void);
Index: src/sys/i386/include/critical.h
===================================================================
RCS file: /usr/home/ncvs/src/sys/i386/include/critical.h,v
retrieving revision 1.4
diff -u -r1.4 critical.h
--- src/sys/i386/include/critical.h	12 Aug 2003 23:24:04 -0000	1.4
+++ src/sys/i386/include/critical.h	25 Oct 2003 11:28:32 -0000
@@ -92,8 +92,8 @@
 
 #else /* !__GNUC__ */
 
-void cpu_critical_enter(void)
-void cpu_critical_exit(void)
+void cpu_critical_enter(void);
+void cpu_critical_exit(void);
 
 #endif	/* __GNUC__ */
 
Index: src/sys/ia64/include/critical.h
===================================================================
RCS file: /usr/home/ncvs/src/sys/ia64/include/critical.h,v
retrieving revision 1.3
diff -u -r1.3 critical.h
--- src/sys/ia64/include/critical.h	12 Aug 2003 23:24:04 -0000	1.3
+++ src/sys/ia64/include/critical.h	25 Oct 2003 11:30:17 -0000
@@ -82,8 +82,8 @@
 
 #else /* !__GNUC__ */
 
-void cpu_critical_enter(void)
-void cpu_critical_exit(void)
+void cpu_critical_enter(void);
+void cpu_critical_exit(void);
 
 #endif	/* __GNUC__ */
 
Index: src/sys/powerpc/include/critical.h
===================================================================
RCS file: /usr/home/ncvs/src/sys/powerpc/include/critical.h,v
retrieving revision 1.4
diff -u -r1.4 critical.h
--- src/sys/powerpc/include/critical.h	12 Aug 2003 23:24:04 -0000	1.4
+++ src/sys/powerpc/include/critical.h	25 Oct 2003 11:35:08 -0000
@@ -85,8 +85,8 @@
 
 #else /* !__GNUC__ */
 
-void cpu_critical_enter(void)
-void cpu_critical_exit(void)
+void cpu_critical_enter(void);
+void cpu_critical_exit(void);
 
 #endif	/* __GNUC__ */
 
Index: src/sys/sparc64/include/critical.h
===================================================================
RCS file: /usr/home/ncvs/src/sys/sparc64/include/critical.h,v
retrieving revision 1.3
diff -u -r1.3 critical.h
--- src/sys/sparc64/include/critical.h	12 Aug 2003 23:24:05 -0000	1.3
+++ src/sys/sparc64/include/critical.h	25 Oct 2003 11:35:18 -0000
@@ -85,8 +85,8 @@
 
 #else /* !__GNUC__ */
 
-void cpu_critical_enter(void)
-void cpu_critical_exit(void)
+void cpu_critical_enter(void);
+void cpu_critical_exit(void);
 
 #endif	/* __GNUC__ */
 
--- nongnuc.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->le 
Responsible-Changed-By: le 
Responsible-Changed-When: Thu Mar 4 09:18:12 PST 2004 
Responsible-Changed-Why:  
I'll handle this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58515 
State-Changed-From-To: open->closed 
State-Changed-By: le 
State-Changed-When: Sat Mar 6 01:25:58 PST 2004 
State-Changed-Why:  
Patch committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58515 
>Unformatted:
