earle@poseur.jpl.nasa.gov (Greg Earle - Sun JPL) (07/22/90)
The reason those 4 things come up as undefined is as follows. The sunCG3C.c file was originally derived from the sunCG4C.c file. Those particular #define's are only relevant to the CG4, since it has an overlay plane and a monochrome plane in addition to the color plane, as you probably well know. The CG3 does not have this (the overlay plane or the monochrome plane), so all of those references should be ripped out completely. At worst, just #define them to be 0. The reason that this was not tripped over before: the first instance of the sunCG3C.c file was in X11 R3. At the time, the only CG3 framebuffer extant was used in a Sun386i, and the entire file was framed inside of a `#ifdef sun386'/`#endif' combo. Thus, anyone building X11 R3 on a SunOS 3.x system was not compiling it on a Sun386i, so the code was not compiled and no one hit this problem. Along comes X11 R4, and the sunCG3C.c file was extended to support the new CG3 frame buffer (same interface as the Sun386i frame buffer) that comes with the SPARCstation-1's. Thus, the `#ifdef sun386' was removed. Since no machine running a CG3 (SPARCstation-1 or Sun386i) will *ever* run SunOS 3.x, again this code causes no problems. It is only because the lack of `#ifdef sun386' now means that all Suns, no matter what OS release, will compile this module, that the problem arises on SunOS 3.x machines. There is no problem in removing the references to those 4 #defines completely, because that code - although compiled - will *never* be referenced by any SunOS 3.x Sun, living or dead. Lots of people have suggested using the correct values from the proper include file, but it is a waste of time. The `proper' fix is either to rip out that whole `#ifndef MAP_NEW' section completely, or else drag in the X11 `OSMajorVersion' macro stuff from the config file and use that to #ifdef it all away. - Greg Earle Sun Microsystems, Inc. - JPL on-site Software Support earle@poseur.JPL.NASA.GOV