[comp.sys.ibm.pc.rt] Problems compiling X11R2 for IBM RT/AOS 4.3

keith@nih-csl.UUCP (keith gorlen) (04/29/88)

I'm having difficulty getting X11R2 to compile for the IBM RT 
with AOS 4.3.  First, I ran into problems because hc (the High C) 
compiler defines __STDC__ when it is not in fact using an ANSI 
cpp.  Thanks to a posting from Jon Greenblatt, adding the 
following lines to the beginning of ./lib/X/Xlibint.h solved the problem:

#ifdef __HIGHC__
#undef __STDC__
#endif

Next, I ran into minor problems compiling ./lib/Xt/{Destroy.c,Manage.c}, 
which are easily fixed.

The problem I'm having now is that many modules in ./lib/Xt fail to 
compile with the error:

"Must be a compile- or load-time computable expression."

These are caused by the definition of the XtOffset macro:

#define XtOffset(type,field)    ((unsigned int)&(((type)NULL)->field))

which works under pcc, but not hc.  Does anyone have a work-around for this?

The bigger question is why am I having all these problems?  I thought the
X11R2 distribution had been tested on an RT.  Do I need to get a newer
version of High C (I have 1.4r)?  Any help would be appreciated.


-- 
	Keith Gorlen			phone: (301) 496-5363
	Building 12A, Room 2017		uucp: uunet!nih-csl!keith
	National Institutes of Health	Internet: keith%nih-csl@ncifcrf.gov
	Bethesda, MD 20892