Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Nov 2002 13:17:38 -0500 (EST)
From:      Mikhail Teterin <mi@aldan.algebra.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/45488: sys/ipc.h refers to ushort, which may not be known
Message-ID:  <200211191817.gAJIHcv1036071@corbulon.video-collage.com>

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

>Number:         45488
>Category:       bin
>Synopsis:       sys/ipc.h refers to ushort, which may not be known
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 19 10:20:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Mikhail Teterin
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Virtual Estates, Inc.
>Environment:
System: FreeBSD misha.murex.com 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Wed Oct 30 09:37:57 EST 2002 mteterin@misha.murex.com:/misha/obj/misha/src/sys/Misha-g i386


>Description:

	On -current, ushort is only defined by <sys/types.h> if
	__BSD_VISIBLE is turned on. But sys/ipc.h uses ushort for
	definition of the ipc_perm structure. The most prominent
	thing broken by this is, probably, ImageMagick (on -current).

>How-To-Repeat:
	cd /usr/ports/graphics/ImageMagick
	make
	[...]
	In file included from ../magick/xwindow.h:46,
			 from dps.c:60:
	/usr/include/sys/ipc.h:80: syntax error before "ushort"
	gmake[1]: *** [dps.lo] Error 1
	gmake[1]: Leaving directory `/misha/ports/graphics/ImageMagick/work/ImageMagick-5.5.1/coders'
	gmake: *** [all-recursive] Error 1
	[...]

>Fix:

	The following helps. But the ipc_perm's definition is prepended
	with an XXX claiming most of the types are wrong... May be this
	patch will make them right or, at least, "less wrong". It definetly
	help ImageMagick build.

Index: ipc.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/ipc.h,v
retrieving revision 1.21
diff -U2 -r1.21 ipc.h
--- ipc.h	14 Oct 2002 20:50:41 -0000	1.21
+++ ipc.h	19 Nov 2002 18:14:11 -0000
@@ -78,11 +78,11 @@
  */
 struct ipc_perm {
-	ushort	cuid;	/* creator user id */
-	ushort	cgid;	/* creator group id */
-	ushort	uid;	/* user id */
-	ushort	gid;	/* group id */
-	ushort	mode;	/* r/w permission */
-	ushort	seq;	/* sequence # (to generate unique msg/sem/shm id) */
-	key_t	key;	/* user specified msg/sem/shm key */
+	unsigned short	cuid;	/* creator user id */
+	unsigned short	cgid;	/* creator group id */
+	unsigned short	uid;	/* user id */
+	unsigned short	gid;	/* group id */
+	unsigned short	mode;	/* r/w permission */
+	unsigned short	seq;	/* sequence # (for unique msg/sem/shm ids) */
+	key_t		key;	/* user specified msg/sem/shm key */
 };
 
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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