--- old/src/java.desktop/unix/native/common/awt/X11Color.c 2020-05-20 18:02:42.777199224 -0700 +++ new/src/java.desktop/unix/native/common/awt/X11Color.c 2020-05-20 18:02:42.441192773 -0700 @@ -89,59 +89,7 @@ #define CMAP_ALLOC_DEFAULT 200 /* default number of colors in cmap */ #define CMAP_ALLOC_MAX 245 /* maximum number of colors in cmap */ -#ifdef __solaris__ -#include - -struct { - char *machine; - int cubesize; -} machinemap[] = { - { "i86pc", LOOKUPSIZE / 4 }, /* BugTraq ID 4102599 */ - { "sun4c", LOOKUPSIZE / 4 }, - { "sun4m", LOOKUPSIZE / 2 }, - { "sun4d", LOOKUPSIZE / 2 }, - { "sun4u", LOOKUPSIZE / 1 }, -}; - -#define MACHMAPSIZE (sizeof(machinemap) / sizeof(machinemap[0])) - -int getVirtCubeSize() { - struct utsname name; - int i, ret; - - ret = uname(&name); - if (ret < 0) { -#ifdef DEBUG -#include - jio_fprintf(stderr, "uname errno = %d, using default cubesize %d\n", - errno, LOOKUPSIZE); -#endif - return LOOKUPSIZE; - } - - for (i = 0; i < MACHMAPSIZE; i++) { - if (strcmp(name.machine, machinemap[i].machine) == 0) { -#ifdef DEBUG - if (debug_colormap) { - jio_fprintf(stderr, "'%s'.cubesize = '%d'\n", - machinemap[i].machine, machinemap[i].cubesize); - } -#endif - return machinemap[i].cubesize; - } - } - -#ifdef DEBUG - if (debug_colormap) { - jio_fprintf(stderr, "unknown machine '%s' using cubesize %d\n", - name.machine, LOOKUPSIZE); - } -#endif - return LOOKUPSIZE; -} -#else /* __solaris__ */ #define getVirtCubeSize() (LOOKUPSIZE) -#endif /* __solaris__ */ unsigned char img_bwgamma[256]; uns_ordered_dither_array img_oda_alpha;