Solaris 8 doesn't have a round function and keeps rgb.txt in a different
place. The attached patch addresses both these issues for Solaris.
Brian Lindholm
diff -dru imlib2-1.4.0-orig/src/lib/color_helpers.h imlib2-1.4.0/src/lib/color_helpers.h
--- imlib2-1.4.0-orig/src/lib/color_helpers.h 2006-09-04 20:37:06.000000000 -0400
+++ imlib2-1.4.0/src/lib/color_helpers.h 2007-08-21 11:23:48.810000719 -0400
@@ -1,6 +1,10 @@
#ifndef __COLOR_HELPERS
#define __COLOR_HELPERS 1
+#if (defined (sun) || defined (__sun__))
+# define round(x) ((x)>=0?(int)((x)+0.5):(int)((x)-0.5))
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff -dru imlib2-1.4.0-orig/src/modules/loaders/loader_xpm.c imlib2-1.4.0/src/modules/loaders/loader_xpm.c
--- imlib2-1.4.0-orig/src/modules/loaders/loader_xpm.c 2007-04-09 18:40:40.000000000 -0400
+++ imlib2-1.4.0/src/modules/loaders/loader_xpm.c 2007-08-21 11:23:48.810000719 -0400
@@ -51,10 +51,14 @@
}
/* look in rgb txt database */
if (!rgb_txt)
-#ifndef __EMX__
- rgb_txt = fopen("/usr/X11R6/lib/X11/rgb.txt", "r");
-#else
+#ifdef __EMX__
rgb_txt = fopen(__XOS2RedirRoot("/XFree86/lib/X11/rgb.txt"), "rt");
+#else
+# if (defined (sun) || defined (__sun__))
+ rgb_txt = fopen("/usr/openwin/lib/X11/rgb.txt", "r");
+# else
+ rgb_txt = fopen("/usr/X11R6/lib/X11/rgb.txt", "r");
+# endif
#endif
if (!rgb_txt)
return;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel