[comp.sources.d] "faces" bugfix for sunview.c in SunOS 3.5

mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) (12/16/88)

cpp in SunOS 3.5 botches a #define in <suntool/sunview.h>, which
actually reads:

> #define SUNVIEW.H

but appears to be interpreted as:

> #define SUNVIEW H

so that when faces/sunview.c tries in init_ws_type(), line 191, to set

> 	gtype = SUNVIEW ;

it turns into

> 	gtype = H ;

and the compiler barfs because it doesn't know what "H" is.

I used the following workaround:

> #ifdef SUNVIEW
> #define MYFOO	SUNVIEW
> #undef SUNVIEW
> #endif
> 	gtype = SUNVIEW ;
> #ifdef MYFOO
> #define SUNVIEW	MYFOO
> #undef MYFOO
> #endif

Mike Khaw
-- 
internet: mkhaw@teknowledge.arpa
uucp:	  {uunet|sun|ucbvax|decwrl|ames|hplabs}!mkhaw%teknowledge.arpa
hardcopy: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303

guy@auspex.UUCP (Guy Harris) (12/17/88)

 >cpp in SunOS 3.5 botches a #define in <suntool/sunview.h>, which
 >actually reads:
 >
 >> #define SUNVIEW.H

The #define is botched already; "#define SUNVIEW.H" ain't legal C.  It
was changed to "#define SUNVIEW_H" or somesuch in 4.0.