initial illumos port
This commit is contained in:
committed by
Jon Trulson
parent
3c14b8b5ce
commit
468d576030
@@ -88,7 +88,7 @@ extern XtPointer _XmStringUngenerate (
|
||||
}
|
||||
|
||||
|
||||
extern int forceUpdate( Widget );
|
||||
extern void forceUpdate( Widget );
|
||||
|
||||
SelectFileCmd::SelectFileCmd (const char * name,
|
||||
const char * label,
|
||||
|
||||
@@ -201,16 +201,16 @@ dispname(const char *hdr)
|
||||
|
||||
if (hdr == 0)
|
||||
return 0;
|
||||
if (((cp = strchr(hdr, '<')) != 0) && (cp > hdr)) {
|
||||
if (((cp = const_cast <char *> (strchr(hdr, '<'))) != 0) && (cp > hdr)) {
|
||||
*cp = 0;
|
||||
if ((*hdr == '"') && ((cp = strrchr(++hdr, '"')) != 0))
|
||||
if ((*hdr == '"') && ((cp = const_cast <char *> (strrchr(++hdr, '"'))) != 0))
|
||||
*cp = 0;
|
||||
return (char *)hdr;
|
||||
} else if ((cp = strchr(hdr, '(')) != 0) {
|
||||
} else if ((cp = const_cast <char *> (strchr(hdr, '('))) != 0) {
|
||||
hdr = ++cp;
|
||||
if ((cp = strchr(hdr, '+')) != 0)
|
||||
if ((cp = const_cast <char *> (strchr(hdr, '+'))) != 0)
|
||||
*cp = 0;
|
||||
if ((cp = strrchr(hdr, ')')) != 0)
|
||||
if ((cp = const_cast <char *> (strrchr(hdr, ')'))) != 0)
|
||||
*cp = 0;
|
||||
return (char *)hdr;
|
||||
}
|
||||
|
||||
@@ -728,7 +728,7 @@ FindDialog::compareMessage(DtMailMessageHandle handle)
|
||||
return(found);
|
||||
}
|
||||
|
||||
#if !defined(CSRG_BASED) && !defined(linux)
|
||||
#if !defined(CSRG_BASED) && !defined(linux) && !defined(sun)
|
||||
//
|
||||
// See if string 'toFind' is anyware in string 'str'.
|
||||
// A case-insensitive version of strstr().
|
||||
|
||||
@@ -957,6 +957,12 @@ Usage(char *progname)
|
||||
|
||||
nl_catd DT_catd = (nl_catd) -1; // catgets file descriptor
|
||||
|
||||
#if defined(reallyoldsun) || defined(USL)
|
||||
#define SA_HANDLER_TYPE void (*)(void)
|
||||
#else
|
||||
#define SA_HANDLER_TYPE void (*)(int)
|
||||
#endif
|
||||
|
||||
void RoamApp::initialize(int *argcp, char **argv)
|
||||
{
|
||||
char **av = argv;
|
||||
@@ -991,11 +997,7 @@ void RoamApp::initialize(int *argcp, char **argv)
|
||||
|
||||
action = &action_buf;
|
||||
memset((void*) action, 0, sizeof(struct sigaction));
|
||||
#ifdef USL
|
||||
action->sa_handler = (void (*)())panicQuitSignalHandler;
|
||||
#else
|
||||
action->sa_handler = panicQuitSignalHandler;
|
||||
#endif
|
||||
action->sa_handler = (SA_HANDLER_TYPE) panicQuitSignalHandler;
|
||||
action->sa_flags = 0;
|
||||
sigaction(SIGHUP, action, NULL);
|
||||
sigaction(SIGINT, action, NULL);
|
||||
|
||||
@@ -143,7 +143,7 @@ extern XtPointer _XmStringUngenerate (
|
||||
#include <sys/file.h>
|
||||
|
||||
|
||||
extern int forceUpdate( Widget );
|
||||
extern void forceUpdate( Widget );
|
||||
|
||||
RoamCmd::RoamCmd
|
||||
(char *name, char *label, int active, RoamMenuWindow *window)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <Xm/Xm.h>
|
||||
#include <Xm/MessageB.h>
|
||||
#include <assert.h>
|
||||
extern int forceUpdate( Widget );
|
||||
extern void forceUpdate( Widget );
|
||||
|
||||
|
||||
RoamInterruptibleCmd::RoamInterruptibleCmd ( char *name,
|
||||
|
||||
@@ -190,16 +190,16 @@ dispname(const char *hdr)
|
||||
|
||||
if (hdr == 0)
|
||||
return 0;
|
||||
if (((cp = strchr(hdr, '<')) != 0) && (cp > hdr)) {
|
||||
if (((cp = const_cast <char *> (strchr(hdr, '<'))) != 0) && (cp > hdr)) {
|
||||
*cp = 0;
|
||||
if ((*hdr == '"') && ((cp = strrchr(++hdr, '"')) != 0))
|
||||
if ((*hdr == '"') && ((cp = const_cast <char *> (strrchr(++hdr, '"'))) != 0))
|
||||
*cp = 0;
|
||||
return (char *)hdr;
|
||||
} else if ((cp = strchr(hdr, '(')) != 0) {
|
||||
} else if ((cp = const_cast <char *> (strchr(hdr, '('))) != 0) {
|
||||
hdr = ++cp;
|
||||
if ((cp = strchr(hdr, '+')) != 0)
|
||||
if ((cp = const_cast <char *> (strchr(hdr, '+'))) != 0)
|
||||
*cp = 0;
|
||||
if ((cp = strrchr(hdr, ')')) != 0)
|
||||
if ((cp = const_cast <char *> (strrchr(hdr, ')'))) != 0)
|
||||
*cp = 0;
|
||||
return (char *)hdr;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class BufferMemory : public Buffer {
|
||||
virtual int getSize(void); // get total size of the buffer
|
||||
|
||||
private:
|
||||
#if !defined(linux) && !defined(CSRG_BASED)
|
||||
#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
|
||||
class Chunk;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ DtMailServer::set_password(char *password)
|
||||
//
|
||||
// len - Length of message.
|
||||
//
|
||||
#if defined(sun) || defined(USL)
|
||||
#if defined(reallyoldsun) || defined(USL)
|
||||
#define SA_HANDLER_TYPE void (*)(void)
|
||||
#else
|
||||
#define SA_HANDLER_TYPE void (*)(int)
|
||||
@@ -231,7 +231,7 @@ DtMailServer::ptrans_retrieve_readandappend(
|
||||
// Determine if we are done with this message.
|
||||
if (proto_is_delimited())
|
||||
{
|
||||
char *s = strrchr((const char *) _msgbuf, (int) '.');
|
||||
char *s = const_cast<char *> (strrchr((const char *) _msgbuf, (int) '.'));
|
||||
|
||||
if (s &&
|
||||
(s == _msgbuf || *(s-1) == '\n') &&
|
||||
|
||||
@@ -783,7 +783,7 @@ DtMail::Session::getRelativePath(DtMailEnv & error, const char * path)
|
||||
free(old_exp);
|
||||
|
||||
// Check to see if the path starts with the folder path.
|
||||
char * matched_path = strstr(path, exp_name);
|
||||
char * matched_path = const_cast<char *>(strstr(path, exp_name));
|
||||
if (matched_path == path) {
|
||||
// Yes it does, make it a relative path to the folder dir.
|
||||
int folder_path_length = strlen(exp_name);
|
||||
|
||||
@@ -938,9 +938,9 @@ MIMEBodyPart::csFromContentType(DtMailValueSeq &value)
|
||||
}
|
||||
}
|
||||
// Get charset value
|
||||
val_ptr = strstr(val, "charset=");
|
||||
val_ptr = const_cast <char *> (strstr(val, "charset="));
|
||||
if ( val_ptr == NULL ) {
|
||||
val_ptr = strstr(val, "CHARSET=");
|
||||
val_ptr = const_cast <char *> (strstr(val, "CHARSET="));
|
||||
}
|
||||
if ( val_ptr == NULL ) {
|
||||
return NULL;
|
||||
|
||||
@@ -122,7 +122,7 @@ getNamedValueString(const char *string, const char *name)
|
||||
results = strdup(&string[offset + nameLen + 1]);
|
||||
if (*results == '"') {
|
||||
results++;
|
||||
stringEnd = strchr(results, '"');
|
||||
stringEnd = const_cast <char *> (strchr(results, '"'));
|
||||
if (stringEnd != NULL) {
|
||||
*stringEnd = '\0';
|
||||
}
|
||||
@@ -420,7 +420,7 @@ RFCMailBox::_assemblePartial(DtMailEnv & error,
|
||||
//
|
||||
embHeader1StLen = (int) length;
|
||||
embHeader1St = (const char *)contents;
|
||||
endHeader = strstr((const char *)contents, "\n\n");
|
||||
endHeader = const_cast <char *> (strstr((const char *)contents, "\n\n"));
|
||||
|
||||
if (endHeader != NULL) {
|
||||
RFCEnvelope embEnv(error,
|
||||
|
||||
@@ -4542,6 +4542,12 @@ RFCMailBox::startAutoSave(DtMailEnv & error,
|
||||
_session->removeEventRoutine(error, PollEntry, this);
|
||||
}
|
||||
|
||||
#if defined(reallyoldsun) || defined(USL)
|
||||
#define SA_HANDLER_TYPE void (*)(void)
|
||||
#else
|
||||
#define SA_HANDLER_TYPE void (*)(int)
|
||||
#endif
|
||||
|
||||
void
|
||||
RFCMailBox::dumpMaps(const char *str)
|
||||
{
|
||||
@@ -4573,11 +4579,7 @@ RFCMailBox::dumpMaps(const char *str)
|
||||
*/
|
||||
(void) sigemptyset(&sig_act.sa_mask);
|
||||
sig_act.sa_flags = 0;
|
||||
#if defined(USL)
|
||||
sig_act.sa_handler = (void(*)())SigBusHandler;
|
||||
#else
|
||||
sig_act.sa_handler = SigBusHandler;
|
||||
#endif /* USL */
|
||||
sig_act.sa_handler = (SA_HANDLER_TYPE) SigBusHandler;
|
||||
sigaction(SIGBUS, &sig_act, &old_sig_act);
|
||||
sigbus_env_valid = 1;
|
||||
if (setjmp(sigbus_env) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user