I just built Cyrus IMAP 2.3.0 on Solaris 10 using the Sun Studio 11
compilers (both Solaris and the compilers are free now).
The new flushseenstate option is very welcome.
I had to make the following changes to get it to compile and link. I
don't know if the problem is with the code using extensions to the C
standard or with the Sun compiler not accepting things which should be
legal.
I found some discussion about the problems with the gcc inline extension
realtive to the C99 standard here:
http://www.greenend.org.uk/rjk/2003/03/inline.html
http://gcc.gnu.org/onlinedocs/gcc/Inline.html
The error messages from mbdump.c were:
"mbdump.c", line 152: non-constant initializer involving a cast
"mbdump.c", line 153: non-constant initializer involving a cast
"mbdump.c", line 154: non-constant initializer involving a cast
I am not enough of a language lawyer to know if the code is leagal.
Regards
Nick
--- cyrus-imapd-2.3.0/sieve/bc_emit.c~ 2005-10-05 16:56:21.000000000 +0100
+++ cyrus-imapd-2.3.0/sieve/bc_emit.c 2005-12-13 13:38:35.620026000 +0000
@@ -45,7 +45,7 @@
void dump(bytecode_info_t *d);
#endif
-inline int write_int (int fd, int x)
+int write_int (int fd, int x)
{
int y=htonl(x);
return (write(fd, &y, sizeof(int)));
--- cyrus-imapd-2.3.0/imap/mbdump.c~ 2004-08-11 19:18:47.000000000 +0100
+++ cyrus-imapd-2.3.0/imap/mbdump.c 2005-12-13 14:07:19.638020000 +0000
@@ -148,10 +148,15 @@
unsigned long flag;
};
+
+static const char fname_header[] = FNAME_HEADER;
+static const char fname_index[] = FNAME_INDEX;
+static const char fname_cache[] = FNAME_CACHE;
+
static struct data_file data_files[] = {
- { FNAME_HEADER+1, IMAP_ENUM_METAPARTITION_FILES_HEADER },
- { FNAME_INDEX+1, IMAP_ENUM_METAPARTITION_FILES_INDEX },
- { FNAME_CACHE+1, IMAP_ENUM_METAPARTITION_FILES_CACHE },
+ { &fname_header[1], IMAP_ENUM_METAPARTITION_FILES_HEADER },
+ { &fname_index[1], IMAP_ENUM_METAPARTITION_FILES_INDEX },
+ { &fname_cache[1], IMAP_ENUM_METAPARTITION_FILES_CACHE },
/* XXX For two-phase expunge, we also need to copy cyrus.expunge */
{ NULL, 0 }
};
--- cyrus-imapd-2.3.0/imap/proxy.c~ 2005-05-04 20:26:29.000000000 +0100
+++ cyrus-imapd-2.3.0/imap/proxy.c 2005-12-13 14:09:29.667300000 +0000
@@ -213,7 +213,7 @@
* If serverout is NULL:
* - returns 1 if input from clientin is pending, otherwise returns 0.
*/
-inline int proxy_check_input(struct protgroup *protin,
+int proxy_check_input(struct protgroup *protin,
struct protstream *clientin,
struct protstream *clientout,
struct protstream *serverin,
----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html