See patch.
>From 2ec9c4b8b1368229eaf4e458808d6121d882595a Mon Sep 17 00:00:00 2001
From: Pascal Stumpf <pascal.stu...@cubes.de>
Date: Sat, 11 Aug 2012 13:57:26 +0200
Subject: [PATCH] Current state of my dtmail work.
Mostly #ifdefs and casts; also, do not redefine strcasestr(). This will
probably be needed for Linux too when compiling without -fpermissive.
---
cde/programs/dtmail/MotifApp/InterruptibleCmd.C | 2 +-
cde/programs/dtmail/MotifApp/MainWindow.C | 2 +-
cde/programs/dtmail/MotifApp/MenuBar.C | 24 ++++++------
cde/programs/dtmail/MotifApp/SelectFileCmd.C | 2 +-
cde/programs/dtmail/dtmail/DmxPrintSetup.C | 2 +-
cde/programs/dtmail/dtmail/FindDialog.C | 2 +
cde/programs/dtmail/dtmail/MsgScrollingList.C | 2 +-
cde/programs/dtmail/dtmail/RoamApp.C | 4 +-
cde/programs/dtmail/dtmail/RoamCmds.C | 4 +-
cde/programs/dtmail/dtmail/RoamInterruptibleCmd.C | 2 +-
cde/programs/dtmail/dtmail/SendMsgDialog.C | 2 +-
cde/programs/dtmail/dtmail/Sort.C | 1 +
cde/programs/dtmail/include/DtMail/Buffer.hh | 2 +-
cde/programs/dtmail/include/DtMail/DtMail.h | 2 +-
cde/programs/dtmail/include/DtMail/Threads.hh | 2 +-
cde/programs/dtmail/libDtMail/Common/DtMailRc.C | 3 ++
cde/programs/dtmail/libDtMail/Common/HashTable.C | 9 +++--
cde/programs/dtmail/libDtMail/Common/IO.C | 2 +-
cde/programs/dtmail/libDtMail/Common/NotDynamic.C | 4 +-
cde/programs/dtmail/libDtMail/RFC/RFCFormat.C | 6 ++-
cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C | 40 ++++++++++----------
cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C | 11 +++++-
cde/programs/dtmail/libDtMail/RFC/RFCTransport.C | 2 +-
23 files changed, 75 insertions(+), 57 deletions(-)
diff --git a/cde/programs/dtmail/MotifApp/InterruptibleCmd.C
b/cde/programs/dtmail/MotifApp/InterruptibleCmd.C
index 49a3f63..3fe82cf 100644
--- a/cde/programs/dtmail/MotifApp/InterruptibleCmd.C
+++ b/cde/programs/dtmail/MotifApp/InterruptibleCmd.C
@@ -69,7 +69,7 @@
#include <Xm/MessageB.h>
#include <assert.h>
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
extern forceUpdate( Widget );
#endif
diff --git a/cde/programs/dtmail/MotifApp/MainWindow.C
b/cde/programs/dtmail/MotifApp/MainWindow.C
index 80061ed..1065b33 100644
--- a/cde/programs/dtmail/MotifApp/MainWindow.C
+++ b/cde/programs/dtmail/MotifApp/MainWindow.C
@@ -150,7 +150,7 @@ MainWindow::initialize( )
/* install callback */
// XtAddCallback(_main, XmNhelpCallback, HelpCB, helpId);
XtAddCallback(_main, XmNhelpCallback,
- HelpCB, "_HOMETOPIC");
+ HelpCB, (void *)"_HOMETOPIC");
// Called derived class to create the work area
diff --git a/cde/programs/dtmail/MotifApp/MenuBar.C
b/cde/programs/dtmail/MotifApp/MenuBar.C
index e305cf4..5d41b8c 100644
--- a/cde/programs/dtmail/MotifApp/MenuBar.C
+++ b/cde/programs/dtmail/MotifApp/MenuBar.C
@@ -191,22 +191,22 @@ MenuBar::createPulldown (
helpId = XtName(*cascade);
if (helpId == "Mailbox") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILCONTAINERMENUID);
+ HelpCB, (void *)DTMAILCONTAINERMENUID);
} else if (helpId == "Edit") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILEDITMENUID);
+ HelpCB, (void *)DTMAILEDITMENUID);
} else if (helpId == "Message") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILMESSAGEMENUID);
+ HelpCB, (void *)DTMAILMESSAGEMENUID);
} else if (helpId == "Attachments") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILATTACHMENUID);
+ HelpCB, (void *)DTMAILATTACHMENUID);
} else if (helpId == "View") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILVIEWMENUID);
+ HelpCB, (void *)DTMAILVIEWMENUID);
} else if (helpId == "Compose") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILCOMPOSEMENUID);
+ HelpCB, (void *)DTMAILCOMPOSEMENUID);
}
}
} else
@@ -323,22 +323,22 @@ MenuBar::createPulldown (
helpId = XtName(cascade);
if (helpId == "Mailbox") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILCONTAINERMENUID);
+ HelpCB, (void *)DTMAILCONTAINERMENUID);
} else if (helpId == "Edit") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILEDITMENUID);
+ HelpCB, (void *)DTMAILEDITMENUID);
} else if (helpId == "Message") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILMESSAGEMENUID);
+ HelpCB, (void *)DTMAILMESSAGEMENUID);
} else if (helpId == "Attachments") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILATTACHMENUID);
+ HelpCB, (void *)DTMAILATTACHMENUID);
} else if (helpId == "View") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILVIEWMENUID);
+ HelpCB, (void *)DTMAILVIEWMENUID);
} else if (helpId == "Compose") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILCOMPOSEMENUID);
+ HelpCB, (void *)DTMAILCOMPOSEMENUID);
}
} else
pulldown = _w;
diff --git a/cde/programs/dtmail/MotifApp/SelectFileCmd.C
b/cde/programs/dtmail/MotifApp/SelectFileCmd.C
index 60a2cbe..b346e2a 100644
--- a/cde/programs/dtmail/MotifApp/SelectFileCmd.C
+++ b/cde/programs/dtmail/MotifApp/SelectFileCmd.C
@@ -88,7 +88,7 @@ extern XtPointer _XmStringUngenerate (
}
-extern forceUpdate( Widget );
+extern int forceUpdate( Widget );
SelectFileCmd::SelectFileCmd (const char * name,
const char * label,
diff --git a/cde/programs/dtmail/dtmail/DmxPrintSetup.C
b/cde/programs/dtmail/dtmail/DmxPrintSetup.C
index 9687be4..a7a555a 100644
--- a/cde/programs/dtmail/dtmail/DmxPrintSetup.C
+++ b/cde/programs/dtmail/dtmail/DmxPrintSetup.C
@@ -325,7 +325,7 @@ DmxPrintSetup::createPrintSetupDialog (Widget parent)
widgets->dtprint_setup,
XmNhelpCallback,
HelpCB,
- DTMAILPRINTSETUPDIALOG);
+ (void *)DTMAILPRINTSETUPDIALOG);
XtAddCallback(
widgets->dtprint_setup,
diff --git a/cde/programs/dtmail/dtmail/FindDialog.C
b/cde/programs/dtmail/dtmail/FindDialog.C
index de5e964..4696c42 100644
--- a/cde/programs/dtmail/dtmail/FindDialog.C
+++ b/cde/programs/dtmail/dtmail/FindDialog.C
@@ -728,6 +728,7 @@ FindDialog::compareMessage(DtMailMessageHandle
handle)
return(found);
}
+#if !defined(CSRG_BASED)
//
// See if string 'toFind' is anyware in string 'str'.
// A case-insensitive version of strstr().
@@ -762,6 +763,7 @@ strcasestr(const char *str, const char *toFind)
}
return(result);
}
+#endif
Boolean
FindDialog::compareHeader(DtMailEnv & error,
diff --git a/cde/programs/dtmail/dtmail/MsgScrollingList.C
b/cde/programs/dtmail/dtmail/MsgScrollingList.C
index d5e5f23..22d041c 100644
--- a/cde/programs/dtmail/dtmail/MsgScrollingList.C
+++ b/cde/programs/dtmail/dtmail/MsgScrollingList.C
@@ -65,7 +65,7 @@
#include <X11/IntrinsicP.h> // Include for moving X location of titles
-extern force( Widget );
+extern int force( Widget );
MsgScrollingList::MsgScrollingList(
RoamMenuWindow *menuwindow,
diff --git a/cde/programs/dtmail/dtmail/RoamApp.C
b/cde/programs/dtmail/dtmail/RoamApp.C
index ab36d16..e7213e2 100644
--- a/cde/programs/dtmail/dtmail/RoamApp.C
+++ b/cde/programs/dtmail/dtmail/RoamApp.C
@@ -70,7 +70,7 @@
#include <unistd.h>
#include <wchar.h>
-#if defined(USL) || defined(__uxp__) || defined(linux)
+#if defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED)
#define wcswcs wcsstr
#include <wctype.h> // iswspace is defined in this header on USL */
#endif
@@ -2015,7 +2015,7 @@ char *formatPropPair(char * key, void * data)
int m_size;
if (data == NULL)
- data = "";
+ data = (void *)"";
// figure out whitespace for formatting
// assume 13 for normal sized alias name
diff --git a/cde/programs/dtmail/dtmail/RoamCmds.C
b/cde/programs/dtmail/dtmail/RoamCmds.C
index 7fb83ed..46d130f 100644
--- a/cde/programs/dtmail/dtmail/RoamCmds.C
+++ b/cde/programs/dtmail/dtmail/RoamCmds.C
@@ -143,7 +143,7 @@ extern XtPointer _XmStringUngenerate (
#include <sys/file.h>
-extern forceUpdate( Widget );
+extern int forceUpdate( Widget );
RoamCmd::RoamCmd
(char *name, char *label, int active, RoamMenuWindow *window)
@@ -1548,7 +1548,7 @@ MoveCopyCmd::doit()
_copy_button,
XmNhelpCallback,
HelpCB,
- "dtmailViewmainWindowWork-AreapanedWform2RowColumnMoveCopy");
+ (void
*)"dtmailViewmainWindowWork-AreapanedWform2RowColumnMoveCopy");
XtAddCallback(
_copy_button,
XmNactivateCallback,
diff --git a/cde/programs/dtmail/dtmail/RoamInterruptibleCmd.C
b/cde/programs/dtmail/dtmail/RoamInterruptibleCmd.C
index c290d00..81177c1 100644
--- a/cde/programs/dtmail/dtmail/RoamInterruptibleCmd.C
+++ b/cde/programs/dtmail/dtmail/RoamInterruptibleCmd.C
@@ -48,7 +48,7 @@
#include <Xm/Xm.h>
#include <Xm/MessageB.h>
#include <assert.h>
-extern forceUpdate( Widget );
+extern int forceUpdate( Widget );
RoamInterruptibleCmd::RoamInterruptibleCmd ( char *name,
diff --git a/cde/programs/dtmail/dtmail/SendMsgDialog.C
b/cde/programs/dtmail/dtmail/SendMsgDialog.C
index aa70554..3eac634 100644
--- a/cde/programs/dtmail/dtmail/SendMsgDialog.C
+++ b/cde/programs/dtmail/dtmail/SendMsgDialog.C
@@ -1374,7 +1374,7 @@ SendMsgDialog::createWorkArea ( Widget parent )
printHelpId("form", _main_form);
/* add help callback */
- XtAddCallback(_main_form, XmNhelpCallback, HelpCB, DTMAILCOMPOSEWINDOW);
+ XtAddCallback(_main_form, XmNhelpCallback, HelpCB, (void
*)DTMAILCOMPOSEWINDOW);
XtVaSetValues(_main_form, XmNallowResize, True, NULL);
diff --git a/cde/programs/dtmail/dtmail/Sort.C
b/cde/programs/dtmail/dtmail/Sort.C
index 76713dd..2f676c0 100644
--- a/cde/programs/dtmail/dtmail/Sort.C
+++ b/cde/programs/dtmail/dtmail/Sort.C
@@ -398,6 +398,7 @@ Sort::sortMessages(MsgScrollingList *displayList,
#define Record(i) (base + (width * (i)))
#define Link(i) (*((int *) (Record(i) + offset)))
+int
Sort::_msort (char * base,
int nel,
int width,
diff --git a/cde/programs/dtmail/include/DtMail/Buffer.hh
b/cde/programs/dtmail/include/DtMail/Buffer.hh
index 3db90f7..0d6c68c 100644
--- a/cde/programs/dtmail/include/DtMail/Buffer.hh
+++ b/cde/programs/dtmail/include/DtMail/Buffer.hh
@@ -103,7 +103,7 @@ class BufferMemory : public Buffer {
virtual int getSize(void); // get total size of the buffer
private:
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
class Chunk;
#endif
diff --git a/cde/programs/dtmail/include/DtMail/DtMail.h
b/cde/programs/dtmail/include/DtMail/DtMail.h
index d07902c..c02df6b 100644
--- a/cde/programs/dtmail/include/DtMail/DtMail.h
+++ b/cde/programs/dtmail/include/DtMail/DtMail.h
@@ -284,7 +284,7 @@ extern "C" {
extern const char ** DtMailTransportEnumerate(DtMailSession,
DtMailEnv *);
- extern DtMailTransportSubmit(DtMailTransport,
+ extern int DtMailTransportSubmit(DtMailTransport,
DtMailEnv *,
DtMailMessage);
diff --git a/cde/programs/dtmail/include/DtMail/Threads.hh
b/cde/programs/dtmail/include/DtMail/Threads.hh
index 9c609b0..20e6b9b 100644
--- a/cde/programs/dtmail/include/DtMail/Threads.hh
+++ b/cde/programs/dtmail/include/DtMail/Threads.hh
@@ -120,7 +120,7 @@ class Condition : public DtCPlusPlusAllocator {
int state(void);
int operator=(int);
- operator += (int);
+ int operator += (int);
operator int(void);
void wait(void);
diff --git a/cde/programs/dtmail/libDtMail/Common/DtMailRc.C
b/cde/programs/dtmail/libDtMail/Common/DtMailRc.C
index dc0e8bc..9a372d7 100644
--- a/cde/programs/dtmail/libDtMail/Common/DtMailRc.C
+++ b/cde/programs/dtmail/libDtMail/Common/DtMailRc.C
@@ -156,6 +156,8 @@ struct cmd cmdtab[] = {
#define SYSTEM_MAILRC "/usr/share/lib/mailx.rc"
#elif defined(__uxp__)
#define SYSTEM_MAILRC "/etc/mail/mailx.rc"
+#elif defined(CSRG_BASED)
+#define SYSTEM_MAILRC "/etc/mail.rc"
#endif
// constructor
@@ -1072,6 +1074,7 @@ int DtMail::MailRc::execute(char linebuf[])
* include the newline at the end.
*/
+int
DtMail::MailRc::readline(FILE *ibuf, char *linebuf)
{
register char *cp;
diff --git a/cde/programs/dtmail/libDtMail/Common/HashTable.C
b/cde/programs/dtmail/libDtMail/Common/HashTable.C
index c56c042..4374f7d 100644
--- a/cde/programs/dtmail/libDtMail/Common/HashTable.C
+++ b/cde/programs/dtmail/libDtMail/Common/HashTable.C
@@ -78,13 +78,14 @@ void *
HashTableImpl::lookup(ObjectKey & key)
{
short hash_key = key.hashValue();
+ HashEntry *chain;
int slot = hash_key % _table_size;
// Search the slot looking for the value. Return NULL if there
// are no objects matching this key.
//
- for (HashEntry * chain = &_hash_table[slot]; chain; chain = chain->next) {
+ for (chain = &_hash_table[slot]; chain; chain = chain->next) {
if (chain->key && key == *(chain->key)) {
break;
}
@@ -102,6 +103,7 @@ HashTableImpl::set(ObjectKey & key, void * value)
{
short hash_key = key.hashValue();
int slot = hash_key % _table_size;
+ HashEntry *chain;
// See if we have already filled the slot.
//
@@ -116,7 +118,7 @@ HashTableImpl::set(ObjectKey & key, void * value)
// We either have a collision or a duplicate. In the case of duplicates
// we simply replace the value.
//
- for (HashEntry * chain = &_hash_table[slot]; chain->next; chain =
chain->next) {
+ for (chain = &_hash_table[slot]; chain->next; chain = chain->next) {
// If this item is already stored then update the value.
//
if (key == *(chain->key)) {
@@ -139,6 +141,7 @@ HashTableImpl::remove(ObjectKey & key)
short hash_val = key.hashValue();
int slot = hash_val % _table_size;
void * removed_val = NULL;
+ HashEntry *chain;
// See if we even have this object.
//
@@ -151,7 +154,7 @@ HashTableImpl::remove(ObjectKey & key)
// Try to find it in the chain.
//
HashEntry * last = NULL;
- for (HashEntry * chain = &_hash_table[slot]; chain; chain = chain->next) {
+ for (chain = &_hash_table[slot]; chain; chain = chain->next) {
if (key == *(chain->key)) {
break;
}
diff --git a/cde/programs/dtmail/libDtMail/Common/IO.C
b/cde/programs/dtmail/libDtMail/Common/IO.C
index 0046ac6..7310d1f 100644
--- a/cde/programs/dtmail/libDtMail/Common/IO.C
+++ b/cde/programs/dtmail/libDtMail/Common/IO.C
@@ -819,7 +819,7 @@ GetPasswordEntry(passwd & result)
memcpy(&passwordEntry, tresult, sizeof(struct passwd));
passwordEntry.pw_name = strdup(passwordEntry.pw_name);
passwordEntry.pw_passwd = strdup(passwordEntry.pw_passwd);
-#if !defined(_AIX) && !defined(linux)
+#if !defined(_AIX) && !defined(linux) && !defined(CSRG_BASED)
#ifndef __osf__
passwordEntry.pw_age = strdup(passwordEntry.pw_age);
#endif
diff --git a/cde/programs/dtmail/libDtMail/Common/NotDynamic.C
b/cde/programs/dtmail/libDtMail/Common/NotDynamic.C
index 2fd7708..792d556 100644
--- a/cde/programs/dtmail/libDtMail/Common/NotDynamic.C
+++ b/cde/programs/dtmail/libDtMail/Common/NotDynamic.C
@@ -66,8 +66,8 @@ extern "C" void * RFCMetaFactory(const char * op);
extern "C" void * V3MetaFactory(const char * op);
static const SymTable symbol_table[] = {
-{ "RFCMetaFactory", RFCMetaFactory },
-{ "V3MetaFactory", V3MetaFactory },
+{ "RFCMetaFactory", (void *)RFCMetaFactory },
+{ "V3MetaFactory", (void *)V3MetaFactory },
{ NULL, NULL }
};
diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCFormat.C
b/cde/programs/dtmail/libDtMail/RFC/RFCFormat.C
index 8a8edd2..afd927f 100644
--- a/cde/programs/dtmail/libDtMail/RFC/RFCFormat.C
+++ b/cde/programs/dtmail/libDtMail/RFC/RFCFormat.C
@@ -169,7 +169,8 @@ RFCFormat::writeHeaders(DtMailEnv & error,
hnd && !error.isSet();
value.clear(), hnd = env->getNextHeader(error, hnd, &name, value)) {
- for (const char ** hdr = suppress_headers; *hdr; hdr++) {
+ const char **hdr;
+ for (hdr = suppress_headers; *hdr; hdr++) {
if (strcasecmp(name, *hdr) == 0)
break;
}
@@ -185,7 +186,8 @@ RFCFormat::writeHeaders(DtMailEnv & error,
for (int val = 0; val < value.length(); val++) {
//
// If the value is null or empty do not emit this field
- for (const char *valPtr = *(value[val]);
+ const char *valPtr;
+ for (valPtr = *(value[val]);
*valPtr && (isspace((unsigned char)*valPtr));
valPtr++)
{}
diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C
b/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C
index 687fe36..b0be2f2 100644
--- a/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C
+++ b/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C
@@ -63,7 +63,7 @@
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/uio.h>
-#if !defined(__aix) && !defined(__hpux) && !defined(linux)
+#if !defined(__aix) && !defined(__hpux) && !defined(linux) &&
!defined(CSRG_BASED)
#include <sys/systeminfo.h>
#endif
#include <sys/wait.h>
@@ -112,7 +112,7 @@ extern "C" ssize_t pread(int, void *, size_t, off_t);
#define LCL_SIG_HANDLER_SIGNATURE
#elif defined(__hpux)
#define LCL_SIG_HANDLER_SIGNATURE __harg
-#elif defined(__aix) || defined(__alpha) || defined(linux)
+#elif defined(__aix) || defined(__alpha) || defined(linux) ||
defined(CSRG_BASED)
#define LCL_SIG_HANDLER_SIGNATURE int
#elif defined(__uxp__)
#define LCL_SIG_HANDLER_SIGNATURE
@@ -674,7 +674,7 @@ RFCMailBox::append(DtMailEnv &error, char *buf, int len)
path, errno, error.errnoMessage(errno));
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
@@ -3011,7 +3011,7 @@ RFCMailBox::createTemporaryMailboxFile(DtMailEnv & error,
char *tmp_name)
error.setError(DTME_CannotCreateTemporaryMailboxFile_NoSuchFile);
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
@@ -3336,7 +3336,7 @@ RFCMailBox::writeMailBox(DtMailEnv &error, DtMailBoolean
hide_access)
DTME_CannotWriteToTemporaryMailboxFile_ProcessLimitsExceeded);
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
@@ -3696,7 +3696,7 @@ RFCMailBox::generateUniqueLockId(void)
char theId[128];
char hwserialbuf[64];
-#if !defined(__aix) && !defined(__hpux) && !defined(__osf__) && !defined(linux)
+#if !defined(__aix) && !defined(__hpux) && !defined(__osf__) &&
!defined(linux) && !defined(CSRG_BASED)
if (sysinfo(SI_HW_SERIAL, (char *)hwserialbuf, sizeof(hwserialbuf)-1) == -1)
#endif
strcpy(hwserialbuf, "dtmail");
@@ -3832,7 +3832,7 @@ RFCMailBox::linkLockFile(DtMailEnv & error, char
*tempLockFileName)
error.setError(DTME_CannotCreateMailboxLockFile_NoSuchFile);
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
@@ -4200,7 +4200,7 @@ RFCMailBox::dotDtmailLock(DtMailEnv & error)
case ENOENT:
error.setError(DTME_CannotCreateMailboxLockFile_NoSuchFile);
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
@@ -4814,27 +4814,27 @@ extern "C" void *
RFCMetaFactory(const char * op)
{
if (strcmp(op, QueryImplEntryOp) == 0) {
- return(RFCQueryImpl);
+ return((void *)RFCQueryImpl);
}
if (strcmp(op, QueryOpenEntryOp) == 0) {
- return(RFCQueryOpen);
+ return((void *)RFCQueryOpen);
}
if (strcmp(op, MailBoxConstructEntryOp) == 0) {
- return(RFCMailBoxConstruct);
+ return((void *)RFCMailBoxConstruct);
}
if (strcmp(op, QueryMessageEntryOp) == 0) {
- return(RFCMessageQuery);
+ return((void *)RFCMessageQuery);
}
if (strcmp(op, MessageConstructEntryOp) == 0) {
- return(RFCMessageConstruct);
+ return((void *)RFCMessageConstruct);
}
if (strcmp(op, TransportConstructEntryOp) == 0) {
- return(RFCMIMETransportConstruct);
+ return((void *)RFCMIMETransportConstruct);
}
return(NULL);
@@ -4873,27 +4873,27 @@ extern "C" void *
V3MetaFactory(const char * op)
{
if (strcmp(op, QueryImplEntryOp) == 0) {
- return(RFCQueryImpl);
+ return((void *)RFCQueryImpl);
}
if (strcmp(op, QueryOpenEntryOp) == 0) {
- return(RFCQueryOpen);
+ return((void *)RFCQueryOpen);
}
if (strcmp(op, MailBoxConstructEntryOp) == 0) {
- return(V3MailBoxConstruct);
+ return((void *)V3MailBoxConstruct);
}
if (strcmp(op, QueryMessageEntryOp) == 0) {
- return(RFCMessageQuery);
+ return((void *)RFCMessageQuery);
}
if (strcmp(op, MessageConstructEntryOp) == 0) {
- return(RFCMessageConstruct);
+ return((void *)RFCMessageConstruct);
}
if (strcmp(op, TransportConstructEntryOp) == 0) {
- return(RFCV3TransportConstruct);
+ return((void *)RFCV3TransportConstruct);
}
return(NULL);
diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C
b/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C
index 2d41ee3..00965d7 100644
--- a/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C
+++ b/cde/programs/dtmail/libDtMail/RFC/RFCMailValues.C
@@ -51,6 +51,7 @@
#include <strings.h>
#endif
#include <ctype.h>
+#include <stdint.h>
#include <DtMail/IO.hh>
#include "RFCImpl.hh"
@@ -490,7 +491,9 @@ RFCValue::toDate(void)
new_time.tm_isdst = -1;
date.dtm_date = SafeMktime(&new_time);
- date.dtm_tz_offset_secs = (int) timezone;
+#ifdef SVR4
+ date.dtm_tz_offset_secs = timezone;
+#endif
}
else {
// In this format, we should have a day of the month.
@@ -536,15 +539,19 @@ RFCValue::toDate(void)
time_t offset = parseTZ(token_begin[this_token], token_end[this_token]);
- time_t orig_zone = (time_t) timezone;
+#ifdef SVR4
+ time_t orig_zone = timezone;
timezone = offset;
+#endif
// Tell "mktime" to figure "dst" on or not.
new_time.tm_isdst = -1;
date.dtm_date = SafeMktime(&new_time);
date.dtm_tz_offset_secs = offset;
+#ifdef SVR4
timezone = orig_zone;
+#endif
}
return(date);
diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C
b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C
index c51636b..eab791c 100644
--- a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C
+++ b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C
@@ -973,7 +973,7 @@ RFCTransport::signalRegister(void)
initialized = 1;
#if defined(hpux) || defined(_aix) || defined(__osf__) || defined(linux) || \
- (defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4)
+ (defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4) ||
defined(CSRG_BASED)
// SunOS 5.5 and above defined prototype for signal handler
act.sa_handler = (void (*)(int))&RFCTransport::childHandler;
#else
--
1.7.6
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel