>Number:         176300
>Category:       bin
>Synopsis:       __CTASSERT() missing from <sys/cdefs.h>
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 20 20:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     J.R. Oldroyd
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD xx.opal.com 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r244985: Tue Jan 
8 10:51:13 EST 2013 j...@xx.opal.com:/usr/src/sys/amd64/compile/GENERIC amd64
>Description:
NetBSD has declarations of __CTASSERT() in <sys/cdefs.h>.  We only have it in
<sys/systm.h> which is a kernel space header.  Since we are mirroring code from
NetBSD that might use __CTASSERT() in user space, e.g., vis(3), we need to add
or move __CTASSERT().
>How-To-Repeat:
n/a
>Fix:
The NetBSD code in <sys/cdefs.h> is:
/*
 * Compile Time Assertion.
 */
#ifdef __COUNTER__
#define __CTASSERT(x)           __CTASSERT0(x, __ctassert, __COUNTER__)
#else
#define __CTASSERT(x)           __CTASSERT0(x, __ctassert, __LINE__)
#endif
#define __CTASSERT0(x, y, z)    __CTASSERT1(x, y, z)
#define __CTASSERT1(x, y, z)    typedef char y ## z[(x) ? 1 : -1];
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to