Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2003 11:29:11 -0700 (PDT)
From:      Darren Reed <darrenr@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/55846: <sys/systm.h> and <sys/types.h> conflict for major()
Message-ID:  <20030821182911.E059F16A4C0@hub.freebsd.org>
Resent-Message-ID: <200308211830.h7LIULcp070928@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         55846
>Category:       bin
>Synopsis:       <sys/systm.h> and <sys/types.h> conflict for major()
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 21 11:30:21 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Darren Reed
>Release:        FreeBSD 4.8-RC i386
>Organization:
FreeBSD
>Environment:
System: FreeBSD hub.freebsd.org 4.8-RC FreeBSD 4.8-RC #1: Sat Aug 16 06:09:47 PDT 2003 root@:/g/src/sys/compile/HUB i386


>Description:
Including <sys/types.h> and <sys/systm.h> for non-kernel compiles
causes the following problem:
/usr/include/sys/systm.h:346: syntax error before `int'
/usr/include/sys/systm.h:347: syntax error before `int'
/usr/include/sys/systm.h:348: syntax error before `('

These lines of code look like this after going through cpp:
int ((int)(((u_int)( dev_t x ) >> 8)&0xff)) ;
int ((int)(( dev_t x )&0xffff00ff)) ;
dev_t ((dev_t)((( int x ) << 8) | (  int y ))) ;

Problem is there is no #ifdef _KERNEL around the declarations for
these functions in <sys/systm.h>
>How-To-Repeat:
	
>Fix:

	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030821182911.E059F16A4C0>