From owner-freebsd-bugs@FreeBSD.ORG Sat Oct 25 05:20:12 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C7BE16A4B3 for ; Sat, 25 Oct 2003 05:20:12 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6292643FB1 for ; Sat, 25 Oct 2003 05:20:09 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9PCK9FY071469 for ; Sat, 25 Oct 2003 05:20:09 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9PCK9wW071468; Sat, 25 Oct 2003 05:20:09 -0700 (PDT) (envelope-from gnats) Resent-Date: Sat, 25 Oct 2003 05:20:09 -0700 (PDT) Resent-Message-Id: <200310251220.h9PCK9wW071468@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stefan Farfeleder Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4EAF716A4B3 for ; 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 ; 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: stefan@fafoe.narf.at Subject: kern/58515: [patch] Header fixes for !__GNUC__ compilers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Stefan Farfeleder List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2003 12:20:12 -0000 >Number: 58515 >Category: kern >Synopsis: [patch] Header fixes for !__GNUC__ compilers >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 25 05:20:08 PDT 2003 >Closed-Date: >Last-Modified: >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 /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: >Unformatted: