Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/ChangeLog,v
retrieving revision 1.1596
diff -u -r1.1596 ChangeLog
--- ChangeLog	15 Jun 2006 10:14:38 -0000	1.1596
+++ ChangeLog	6 Jul 2006 08:23:09 -0000
@@ -1,3 +1,9 @@
+2006-07-06  Jeff Cai  <jeff.cai@sun.com>
+
+	* configure.in: If host is solaris system, define a preprocessor
+	macro SOLARIS.
+	Fix bug 346443.
+
 2006-06-15  Tor Lillqvist  <tml@novell.com>
 
 	* plugin.mk: Must expand also @GETTEXT_PACKAGE@ and @LOCALEDIR@,
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.903
diff -u -r1.903 configure.in
--- configure.in	14 Jun 2006 09:59:42 -0000	1.903
+++ configure.in	6 Jul 2006 08:23:09 -0000
@@ -14,6 +14,12 @@
 AC_CANONICAL_HOST
 AC_DEFINE_UNQUOTED(VERSION_COMMENT, "", [Define if you want a comment appended to the version number])
 
+case $host in
+*solaris*)
+	AC_DEFINE(SOLARIS, 1, [Define if it is solaris])
+	;;
+esac
+
 dnl Put the ACLOCAL flags in the Makefile
 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
 
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1582
diff -u -r1.1582 ChangeLog
--- shell/ChangeLog	6 Jul 2006 02:56:36 -0000	1.1582
+++ shell/ChangeLog	6 Jul 2006 08:23:10 -0000
@@ -1,3 +1,9 @@
+2006-07-06  Jeff Cai  <jeff.cai@sun.com>
+
+	* main.c: (main): Set number of file descriptors that a process
+	may create to 512 for Solaris platform.
+	Fix for #346443.
+
 2006-07-05  Li Yuan  <li.yuan@sun.com>
 
 	* e-shell-window.c: (setup_widgets):
Index: shell/main.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/main.c,v
retrieving revision 1.184
diff -u -r1.184 main.c
--- shell/main.c	17 Jun 2006 15:18:38 -0000	1.184
+++ shell/main.c	6 Jul 2006 08:23:10 -0000
@@ -87,6 +87,10 @@
 
 #include "e-util/e-plugin.h"
 
+#ifdef SOLARIS
+#include <sys/resource.h>
+#endif
+
 static EShell *shell = NULL;
 
 /* Command-line options.  */
@@ -511,6 +515,21 @@
 	bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
+
+#ifdef SOLARIS
+	// Boost Solaris file descriptors
+	{
+	#define NOFILES 512
+	struct rlimit rl;
+
+	if (getrlimit(RLIMIT_NOFILE, &rl) == 0)
+		if (rl.rlim_cur < NOFILES) {
+			rl.rlim_cur = NOFILES;
+			if (setrlimit(RLIMIT_NOFILE, &rl) < 0 )
+				g_warning ("setrlimit(RLIMIT_NOFILE)\n");
+		}
+	}
+#endif
 
 	context = g_option_context_new (_("- The Evolution PIM and Email Client"));
 
