compile errors with /usr/include/sys/types.h

Garry M. Paxinos pax at megasys.COM
Thu Mar 8 02:08:12 AEST 1990


In article <1990Mar1.022620.23226 at ice9.uucp> bgh at ice9.uucp (barry hannigan) writes:
   the following lines are excerpted from /usr/include/sys/types.h in ISC 2.0.2

   typedef	struct { int r[1]; }	*	physadr;
   typedef	char	*		caddr_t;	/* ?<core address> type */
   typedef	char *		faddr_t;	/* same as caddr_t for 8086/386 */

   they cause syntax errors when used.

   the program being compiled is Xloadimage, patchlevel 3.

   any ideas?

Yes, the problem is sys/types.h is being include more than once (generaly
inside the X11/*.h files..)  What I've done is to #ifdef the sys/*.h files
so they only get parsed once.

ie :

#ifndef _h_sys_types
#define _h_sys_types

<... standard text of sys/types.h ...>

#endif /* _h_sys_types */
-- 
Internet : work - pax at megasys.com     home - pax at ankh.ftl.fl.us
USNail   : Megasystems, Inc.  2055 South Congress Ave, Delray Beach, FL 33445
UUCP     : {gatech!uflorida!novavax!ankh,   mthvax,   attmail}!megasys!pax
Voice    : 407-243-2405 Data: 407-243-2407 Fax: 407-243-2408 Telex: 156281499



More information about the Comp.unix.i386 mailing list