Re: Build on Solaris

Alex S Moore <[email protected]>
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
DINH Viet Hoa wrote:
> On 23 Jul 2005, at 19:06, Alex S Moore wrote:
> 
>> ---
>>  cc -c -I../../include -I../.. -I. -fast -xarch=v8 -I/opt/csw/bdb4/ 
>> include -I/opt/csw/include -D_REENTRANT -DHAVE_CONFIG_H  mailstream.c  
>> -KPIC -DPIC -o .libs/mailstream.o
>> "mailstream.c", line 402: syntax error before or at: .
>> cc: acomp failed for mailstream.c
>> *** Error code 1
>> make: Fatal error: Command failed for target `mailstream.lo'
>> Current working directory /export/medusa/asmoore/build/ 
>> libetpan-0.38/src/data-types
>> *** Error code 1
>> ---
> 
> 
> You will see much problems like this. They will be surrounded by such  
> defines.
> 
> #ifdef _MSC_VER
> #else
> #endif
> 
> Just replace "#ifdef _MSC_VER" with "#if 1".
> 
> You may try to use gcc to compile.
> However, I'll try to find write some fix for Sun Compiler.
> 
> Whenever there is constant structures defined this way, you may use  
> _MSC_VER alternative.
> And tell about the result.
> 

The compiler complained about "#if 1" not being an identifier.  Setting
_MSC_VER = 1 did not work at all.  Mainly from problems with includes.
I am on Solaris.

What I did was patch the source to use a new defines where needed.  The
patch file is attached.  I manually added the defines to config.h and am
not sure of the changes required to make the new defines end up
in config.h.  I have not been able to test the new library, but it
compiled just fine.  I will be testing the library over the next week or
so with the sylpheed-claws application.  But my testing probably will
not hit all of the combinations of tests needed.

There were a couple of other files that did not have _MSC_VER defined,
but I had to add it.  I add the defines for _MSC_VER to these files. 
Maybe the code is already in cvs.

Can you add this patchlist to your source and add the code needed
for the __SUNPRO_CC defines?

Thanks, Alex
patches-sunpro.diff (text/x-patch, 21.6 KB)
--- ./src/data-types/orig-mailstream.c	2005-07-25 18:02:59.633937000 -0400
+++ ./src/data-types/mailstream.c	2005-07-25 18:18:07.520198000 -0400
@@ -394,7 +394,7 @@
   return s->read_buffer_len;
 }
 
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC) 
 struct timeval mailstream_network_delay =
 {  DEFAULT_NETWORK_TIMEOUT, 0 };
 #else
--- ./src/data-types/orig-mailstream_socket.c	2005-07-25 18:03:30.738048000 -0400
+++ ./src/data-types/mailstream_socket.c	2005-07-25 18:19:00.671903000 -0400
@@ -71,7 +71,7 @@
 static int mailstream_low_socket_get_fd(mailstream_low * s);
 
 static mailstream_low_driver local_mailstream_socket_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
 	/* SEB */
 	mailstream_low_socket_read,
 	mailstream_low_socket_write,
--- ./src/data-types/orig-mailstream_ssl.c	2005-07-25 18:03:50.322504000 -0400
+++ ./src/data-types/mailstream_ssl.c	2005-07-25 18:25:13.011134000 -0400
@@ -100,12 +100,21 @@
 static void mailstream_low_ssl_free(mailstream_low * s);
 static int mailstream_low_ssl_get_fd(mailstream_low * s);
 
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
+static mailstream_low_driver local_mailstream_ssl_driver = {
+  /* mailstream_read */ mailstream_low_ssl_read,
+  /* mailstream_write */ mailstream_low_ssl_write,
+  /* mailstream_close */ mailstream_low_ssl_close,
+  /* mailstream_free */ mailstream_low_ssl_free,
+  /* mailstream_get_fd */ mailstream_low_ssl_get_fd,
+#else
 static mailstream_low_driver local_mailstream_ssl_driver = {
   mailstream_read: mailstream_low_ssl_read,
   mailstream_write: mailstream_low_ssl_write,
   mailstream_close: mailstream_low_ssl_close,
   mailstream_free: mailstream_low_ssl_free,
   mailstream_get_fd: mailstream_low_ssl_get_fd,
+#endif
 };
 
 mailstream_low_driver * mailstream_ssl_driver = &local_mailstream_ssl_driver;
--- ./src/driver/implementation/data-message/orig-data_message_driver.c	2005-07-25 18:04:26.012749000 -0400
+++ ./src/driver/implementation/data-message/data_message_driver.c	2005-07-25 18:27:27.943458000 -0400
@@ -62,7 +62,7 @@
 
 
 static mailmessage_driver local_data_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "data",
   
   /* msg_initialize */ mailmessage_generic_initialize,
--- ./src/driver/implementation/db/orig-dbdriver.c	2005-07-25 18:05:13.559026000 -0400
+++ ./src/driver/implementation/db/dbdriver.c	2005-07-25 18:30:53.331314000 -0400
@@ -87,7 +87,7 @@
     const char * uid, mailmessage ** result);
 
 static mailsession_driver local_db_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "db",
 
   /* sess_initialize */ initialize,
--- ./src/driver/implementation/db/orig-dbdriver_message.c	2005-07-25 18:05:30.132379000 -0400
+++ ./src/driver/implementation/db/dbdriver_message.c	2005-07-25 18:31:34.190405000 -0400
@@ -63,7 +63,7 @@
 static void check(mailmessage * msg_info);
 
 static mailmessage_driver local_db_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "db",
 
   /* msg_initialize */ initialize,
--- ./src/driver/implementation/db/orig-dbstorage.c	2005-07-25 18:05:39.134462000 -0400
+++ ./src/driver/implementation/db/dbstorage.c	2005-07-25 18:32:01.273494000 -0400
@@ -53,7 +53,7 @@
 static void db_mailstorage_uninitialize(struct mailstorage * storage);
 
 static mailstorage_driver db_mailstorage_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sto_name               */ "db",
   /* sto_connect            */ db_mailstorage_connect,
   /* sto_get_folder_session */ db_mailstorage_get_folder_session,
--- ./src/driver/implementation/imap/orig-imapdriver.c	2005-07-25 18:05:57.306840000 -0400
+++ ./src/driver/implementation/imap/imapdriver.c	2005-07-25 18:33:10.266021000 -0400
@@ -127,7 +127,7 @@
     mailmessage ** result);
 
 static mailsession_driver local_imap_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "imap",
 
   /* sess_initialize */ imapdriver_initialize,
--- ./src/driver/implementation/imap/orig-imapdriver_cached.c	2005-07-25 18:06:10.740940000 -0400
+++ ./src/driver/implementation/imap/imapdriver_cached.c	2005-07-25 18:33:35.211834000 -0400
@@ -137,7 +137,7 @@
     mailmessage ** result);
 
 static mailsession_driver local_imap_cached_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "imap-cached",
 
   /* sess_initialize */ imapdriver_cached_initialize,
--- ./src/driver/implementation/imap/orig-imapstorage.c	2005-07-25 18:06:24.356162000 -0400
+++ ./src/driver/implementation/imap/imapstorage.c	2005-07-25 18:34:35.106613000 -0400
@@ -56,7 +56,7 @@
 static void imap_mailstorage_uninitialize(struct mailstorage * storage);
 
 static mailstorage_driver imap_mailstorage_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sto_name               */ "imap",
   /* sto_connect            */ imap_mailstorage_connect,
   /* sto_get_folder_session */ imap_mailstorage_get_folder_session,
--- ./src/driver/implementation/imap/orig-imapdriver_message.c	2005-07-25 18:06:58.240793000 -0400
+++ ./src/driver/implementation/imap/imapdriver_message.c	2005-07-25 18:34:58.241874000 -0400
@@ -97,7 +97,7 @@
 static void imap_check(mailmessage * msg_info);
 
 static mailmessage_driver local_imap_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "imap",
   
   /* msg_initialize */ imap_initialize,
--- ./src/driver/implementation/imap/orig-imapdriver_cached_message.c	2005-07-25 18:07:13.332169000 -0400
+++ ./src/driver/implementation/imap/imapdriver_cached_message.c	2005-07-25 18:35:25.215567000 -0400
@@ -102,7 +102,7 @@
 			  struct mail_flags ** result);
 
 static mailmessage_driver local_imap_cached_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "imap-cached",
 
   /* msg_initialize */ imap_initialize,
--- ./src/driver/implementation/maildir/orig-maildirdriver.c	2005-07-25 18:07:32.357585000 -0400
+++ ./src/driver/implementation/maildir/maildirdriver.c	2005-07-25 18:36:37.057060000 -0400
@@ -105,7 +105,7 @@
 
 static mailsession_driver local_maildir_session_driver = {
 
-#ifdef _MSC_VER 
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
 	
    /* sess_name */ "maildir",
 
--- ./src/driver/implementation/maildir/orig-maildirdriver_cached.c	2005-07-25 18:07:51.439133000 -0400
+++ ./src/driver/implementation/maildir/maildirdriver_cached.c	2005-07-25 18:37:29.361619000 -0400
@@ -106,7 +106,7 @@
     const char * uid, mailmessage ** result);
 
 static mailsession_driver local_maildir_cached_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
    /* sess_name */ "maildir-cached",
 
   /* sess_initialize */ initialize,
--- ./src/driver/implementation/maildir/orig-maildirdriver_cached_message.c	2005-07-25 18:08:00.913835000 -0400
+++ ./src/driver/implementation/maildir/maildirdriver_cached_message.c	2005-07-25 18:37:57.241957000 -0400
@@ -74,7 +74,7 @@
 static void check(mailmessage * msg_info);
 
 static mailmessage_driver local_maildir_cached_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "maildir-cached",
 
   /* msg_initialize */ initialize,
--- ./src/driver/implementation/maildir/orig-maildirdriver_message.c	2005-07-25 18:08:18.191777000 -0400
+++ ./src/driver/implementation/maildir/maildirdriver_message.c	2005-07-25 18:38:20.491291000 -0400
@@ -74,7 +74,7 @@
 static void check(mailmessage * msg_info);
 
 static mailmessage_driver local_maildir_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "maildir",
 
   /* msg_initialize */ initialize,
--- ./src/driver/implementation/maildir/orig-maildirstorage.c	2005-07-25 18:08:31.535007000 -0400
+++ ./src/driver/implementation/maildir/maildirstorage.c	2005-07-25 18:38:46.573850000 -0400
@@ -54,7 +54,7 @@
 static void maildir_mailstorage_uninitialize(struct mailstorage * storage);
 
 static mailstorage_driver maildir_mailstorage_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sto_name               */ "maildir",
   /* sto_connect            */ maildir_mailstorage_connect,
   /* sto_get_folder_session */ maildir_mailstorage_get_folder_session,
--- ./src/driver/implementation/mbox/orig-mboxdriver.c	2005-07-25 18:08:50.483044000 -0400
+++ ./src/driver/implementation/mbox/mboxdriver.c	2005-07-25 18:40:17.281932000 -0400
@@ -101,7 +101,7 @@
     mailmessage ** result);
 
 static mailsession_driver local_mbox_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "mbox",
 
   /* sess_initialize */ mboxdriver_initialize,
--- ./src/driver/implementation/mbox/orig-mboxdriver_cached.c	2005-07-25 18:09:03.157619000 -0400
+++ ./src/driver/implementation/mbox/mboxdriver_cached.c	2005-07-25 18:40:49.641536000 -0400
@@ -112,7 +112,7 @@
     mailmessage ** result);
 
 static mailsession_driver local_mbox_cached_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "mbox-cached",
 
   /* sess_initialize */ mboxdriver_cached_initialize,
--- ./src/driver/implementation/mbox/orig-mboxdriver_cached_message.c	2005-07-25 18:09:16.695352000 -0400
+++ ./src/driver/implementation/mbox/mboxdriver_cached_message.c	2005-07-25 18:41:09.172580000 -0400
@@ -78,7 +78,7 @@
 			     size_t * result_len);
 
 static mailmessage_driver local_mbox_cached_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "mbox-cached",
 
   /* msg_initialize */ mbox_initialize,
--- ./src/driver/implementation/mbox/orig-mboxdriver_message.c	2005-07-25 18:09:31.410085000 -0400
+++ ./src/driver/implementation/mbox/mboxdriver_message.c	2005-07-25 18:41:40.377929000 -0400
@@ -66,7 +66,7 @@
 			     size_t * result_len);
 
 static mailmessage_driver local_mbox_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "mbox",
 
   /* msg_initialize */ mbox_initialize,
--- ./src/driver/implementation/mbox/orig-mboxstorage.c	2005-07-25 18:09:44.020033000 -0400
+++ ./src/driver/implementation/mbox/mboxstorage.c	2005-07-25 18:42:02.082849000 -0400
@@ -53,7 +53,7 @@
 static void mbox_mailstorage_uninitialize(struct mailstorage * storage);
 
 static mailstorage_driver mbox_mailstorage_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sto_name               */ "mbox",
   /* sto_connect            */ mbox_mailstorage_connect,
   /* sto_get_folder_session */ mbox_mailstorage_get_folder_session,
--- ./src/driver/implementation/mh/orig-mhdriver.c	2005-07-25 18:10:17.721670000 -0400
+++ ./src/driver/implementation/mh/mhdriver.c	2005-07-25 18:42:43.934242000 -0400
@@ -112,7 +112,7 @@
     mailmessage ** result);
 
 static mailsession_driver local_mh_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "mh",
 
   /* sess_initialize */ mhdriver_initialize,
--- ./src/driver/implementation/mh/orig-mhdriver_cached.c	2005-07-25 18:10:31.677849000 -0400
+++ ./src/driver/implementation/mh/mhdriver_cached.c	2005-07-25 18:42:59.144444000 -0400
@@ -139,7 +139,7 @@
     mailmessage ** result);
 
 static mailsession_driver local_mh_cached_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "mh-cached",
 
   /* sess_initialize */ mhdriver_cached_initialize,
--- ./src/driver/implementation/mh/orig-mhdriver_cached_message.c	2005-07-25 18:10:47.078841000 -0400
+++ ./src/driver/implementation/mh/mhdriver_cached_message.c	2005-07-25 18:43:43.865274000 -0400
@@ -78,7 +78,7 @@
 			   size_t * result_len);
 
 static mailmessage_driver local_mh_cached_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "mh-cached",
 
   /* msg_initialize */ mh_initialize,
--- ./src/driver/implementation/mh/orig-mhdriver_message.c	2005-07-25 18:11:01.763872000 -0400
+++ ./src/driver/implementation/mh/mhdriver_message.c	2005-07-25 18:43:58.775051000 -0400
@@ -66,7 +66,7 @@
 			   size_t * result_len);
 
 static mailmessage_driver local_mh_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "mh",
 
   /* msg_initialize */ mh_initialize,
--- ./src/driver/implementation/mh/orig-mhstorage.c	2005-07-25 18:11:14.579692000 -0400
+++ ./src/driver/implementation/mh/mhstorage.c	2005-07-25 18:44:25.887853000 -0400
@@ -50,7 +50,7 @@
 static void mh_mailstorage_uninitialize(struct mailstorage * storage);
 
 static mailstorage_driver mh_mailstorage_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sto_name               */ "mh",
   /* sto_connect            */ mh_mailstorage_connect,
   /* sto_get_folder_session */ mh_mailstorage_get_folder_session,
--- ./src/driver/implementation/mime-message/orig-mime_message_driver.c	2005-07-25 18:11:32.241438000 -0400
+++ ./src/driver/implementation/mime-message/mime_message_driver.c	2005-07-25 18:44:52.128053000 -0400
@@ -890,7 +890,7 @@
 
 
 static mailmessage_driver local_mime_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "mime",
   
   /* msg_initialize */ initialize,
--- ./src/driver/implementation/nntp/orig-nntpdriver.c	2005-07-25 18:11:52.841504000 -0400
+++ ./src/driver/implementation/nntp/nntpdriver.c	2005-07-25 18:45:51.799217000 -0400
@@ -100,7 +100,7 @@
 static int nntpdriver_noop(mailsession * session);
 
 static mailsession_driver local_nntp_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "nntp",
 
   /* sess_initialize */ nntpdriver_initialize,
--- ./src/driver/implementation/nntp/orig-nntpdriver_cached.c	2005-07-25 18:12:14.866756000 -0400
+++ ./src/driver/implementation/nntp/nntpdriver_cached.c	2005-07-25 18:52:20.630763000 -0400
@@ -140,7 +140,7 @@
     mailmessage ** result);
 
 static mailsession_driver local_nntp_cached_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "nntp-cached",
 
   /* sess_initialize */ nntpdriver_cached_initialize,
--- ./src/driver/implementation/nntp/orig-nntpstorage.c	2005-07-25 18:12:26.076706000 -0400
+++ ./src/driver/implementation/nntp/nntpstorage.c	2005-07-25 18:52:36.910632000 -0400
@@ -55,7 +55,7 @@
 static void nntp_mailstorage_uninitialize(struct mailstorage * storage);
 
 static mailstorage_driver nntp_mailstorage_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sto_name               */ "nntp",
   /* sto_connect            */ nntp_mailstorage_connect,
   /* sto_get_folder_session */ nntp_mailstorage_get_folder_session,
--- ./src/driver/implementation/nntp/orig-nntpdriver_cached_message.c	2005-07-25 18:12:36.999074000 -0400
+++ ./src/driver/implementation/nntp/nntpdriver_cached_message.c	2005-07-25 18:52:57.746672000 -0400
@@ -71,7 +71,7 @@
 			  struct mail_flags ** result);
 
 static mailmessage_driver local_nntp_cached_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "nntp-cached",
 
   /* msg_initialize */ nntp_initialize,
--- ./src/driver/implementation/nntp/orig-nntpdriver_message.c	2005-07-25 18:12:49.874378000 -0400
+++ ./src/driver/implementation/nntp/nntpdriver_message.c	2005-07-25 18:53:20.463140000 -0400
@@ -56,7 +56,7 @@
 			   size_t * result);
 
 static mailmessage_driver local_nntp_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
 
   /* msg_name */ "nntp",
 
--- ./src/driver/implementation/pop3/orig-pop3driver.c	2005-07-25 18:13:08.071396000 -0400
+++ ./src/driver/implementation/pop3/pop3driver.c	2005-07-25 18:53:40.846651000 -0400
@@ -77,7 +77,7 @@
 				  uint32_t num, mailmessage ** result);
 
 static mailsession_driver local_pop3_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
 	
   /* sess_name */ "pop3",
 
--- ./src/driver/implementation/pop3/orig-pop3driver_cached.c	2005-07-25 18:13:18.409919000 -0400
+++ ./src/driver/implementation/pop3/pop3driver_cached.c	2005-07-25 18:54:00.032419000 -0400
@@ -116,7 +116,7 @@
     const char * uid, mailmessage ** result);
 
 static mailsession_driver local_pop3_cached_session_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sess_name */ "pop3-cached",
 
   /* sess_initialize */ pop3driver_cached_initialize,
--- ./src/driver/implementation/pop3/orig-pop3storage.c	2005-07-25 18:13:36.594981000 -0400
+++ ./src/driver/implementation/pop3/pop3storage.c	2005-07-25 18:54:30.168561000 -0400
@@ -53,7 +53,7 @@
 static void pop3_mailstorage_uninitialize(struct mailstorage * storage);
 
 static mailstorage_driver pop3_mailstorage_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* sto_name               */ "pop3",
   /* sto_connect            */ pop3_mailstorage_connect,
   /* sto_get_folder_session */ pop3_mailstorage_get_folder_session,
--- ./src/driver/implementation/pop3/orig-pop3driver_cached_message.c	2005-07-25 18:13:48.986489000 -0400
+++ ./src/driver/implementation/pop3/pop3driver_cached_message.c	2005-07-25 18:54:58.425203000 -0400
@@ -71,7 +71,7 @@
 static void pop3_uninitialize(mailmessage * msg_info);
 
 static mailmessage_driver local_pop3_cached_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "pop3-cached",
 
   /* msg_initialize */ pop3_initialize,
--- ./src/driver/implementation/pop3/orig-pop3driver_message.c	2005-07-25 18:13:58.414464000 -0400
+++ ./src/driver/implementation/pop3/pop3driver_message.c	2005-07-25 18:55:22.311313000 -0400
@@ -56,7 +56,7 @@
 			   size_t * result);
 
 static mailmessage_driver local_pop3_message_driver = {
-#ifdef _MSC_VER
+#if defined (_MSC_VER) || defined (__SUNPRO_CC)
   /* msg_name */ "pop3",
 
   /* msg_initialize */ pop3_initialize,
--- ./src/engine/orig-mailprivacy_gnupg.c	2005-07-25 18:14:16.846860000 -0400
+++ ./src/engine/mailprivacy_gnupg.c	2005-07-25 18:57:52.470957000 -0400
@@ -2540,7 +2540,56 @@
   return res;
 }
 
+#if defined (_MSC_VER) || defined ( __SUNPRO_CC)
+static struct mailprivacy_encryption pgp_encryption_tab[] = {
+  /* PGP signed part */
+  {
+    /* name */ "signed",
+    /* description */ "PGP signed part",
+    /* encrypt */ pgp_sign_mime,
+  },
+  
+  /* pgp encrypted part */
+  
+  {
+    /* name */ "encrypted",
+    /* description */ "PGP encrypted part",
+    /* encrypt */ pgp_encrypt_mime,
+  },
+  
+  /* PGP signed & encrypted part */
+  
+  {
+    /* name */ "signed-encrypted",
+    /* description */ "PGP signed & encrypted part",
+    /* encrypt */ pgp_sign_encrypt_mime,
+  },
+
+  /* PGP clear signed part */
+  
+  {
+    /* name */ "clear-signed",
+    /* description */ "PGP clear signed part",
+    /* encrypt */ pgp_clear_sign,
+  },
 
+  /* PGP armor encrypted part */
+  
+  {
+    /* name */ "encrypted-armor",
+    /* description */ "PGP ASCII armor encrypted part",
+    /* encrypt */ pgp_armor_encrypt,
+  },
+
+  /* PGP armor signed & encrypted part */
+  
+  {
+    /* name */ "signed-encrypted-armor",
+    /* description */ "PGP ASCII armor signed & encrypted part",
+    /* encrypt */ pgp_armor_sign_encrypt,
+  },
+};
+#else
 static struct mailprivacy_encryption pgp_encryption_tab[] = {
   /* PGP signed part */
   {
@@ -2549,7 +2598,7 @@
     .encrypt = pgp_sign_mime,
   },
   
-  /* PGP encrypted part */
+  /* pgp encrypted part */
   
   {
     .name = "encrypted",
@@ -2589,7 +2638,22 @@
     .encrypt = pgp_armor_sign_encrypt,
   },
 };
+#endif
 
+#if defined (_MSC_VER) || defined ( __SUNPRO_CC)
+static struct mailprivacy_protocol pgp_protocol = {
+  /* name */ "pgp",
+  /* description */ "OpenPGP",
+  
+  /* is_encrypted */ pgp_test_encrypted,
+  /* decrypt */ pgp_handler,
+  
+  /* encryption_count */
+  (sizeof(pgp_encryption_tab) / sizeof(pgp_encryption_tab[0])),
+  
+  /* encryption_tab */ pgp_encryption_tab,
+};
+#else
 static struct mailprivacy_protocol pgp_protocol = {
   .name = "pgp",
   .description = "OpenPGP",
@@ -2602,6 +2666,7 @@
   
   .encryption_tab = pgp_encryption_tab,
 };
+#endif
 
 int mailprivacy_gnupg_init(struct mailprivacy * privacy)
 {
--- ./src/engine/orig-mailprivacy_smime.c	2005-07-25 18:14:29.157518000 -0400
+++ ./src/engine/mailprivacy_smime.c	2005-07-25 18:57:52.541104000 -0400
@@ -1312,7 +1312,32 @@
 }
 
 
+#if defined (_MSC_VER) || defined ( __SUNPRO_CC)
+static struct mailprivacy_encryption smime_encryption_tab[] = {
+  /* S/MIME signed part */
+  {
+    /* name */ "signed",
+    /* description */ "S/MIME signed part",
+    /* encrypt */ smime_sign,
+  },
+  
+  /* S/MIME encrypted part */
+  
+  {
+    /* name */ "encrypted",
+    /* description */ "S/MIME encrypted part",
+    /* encrypt */ smime_encrypt,
+  },
 
+  /* S/MIME signed & encrypted part */
+  
+  {
+    /* name */ "signed-encrypted",
+    /* description */ "S/MIME signed & encrypted part",
+    /* encrypt */ smime_sign_encrypt,
+  },
+};
+#else
 static struct mailprivacy_encryption smime_encryption_tab[] = {
   /* S/MIME signed part */
   {
@@ -1337,7 +1362,22 @@
     .encrypt = smime_sign_encrypt,
   },
 };
+#endif
 
+#if defined (_MSC_VER) || defined ( __SUNPRO_CC)
+static struct mailprivacy_protocol smime_protocol = {
+  /* name */ "smime",
+  /* description */ "S/MIME",
+  
+  /* is_encrypted */ smime_test_encrypted,
+  /* decrypt */ smime_handler,
+  
+  /* encryption_count */
+  (sizeof(smime_encryption_tab) / sizeof(smime_encryption_tab[0])),
+  
+  /* encryption_tab */ smime_encryption_tab,
+};
+#else
 static struct mailprivacy_protocol smime_protocol = {
   .name = "smime",
   .description = "S/MIME",
@@ -1350,6 +1390,7 @@
   
   .encryption_tab = smime_encryption_tab,
 };
+#endif
 
 int mailprivacy_smime_init(struct mailprivacy * privacy)
 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.