#ifdef BeforeVendorCF
+# define LocalThreadsDefines
+
# include <host.def>
/* CDE uses a .C suffix for C++ source, not the default .cxx */
# define X11ProjectRoot /usr
# elif defined(FreeBSDArchitecture)
# define X11ProjectRoot /usr/local
+# elif defined(SunArchitecture)
+# define X11ProjectRoot /usr
# elif defined(OpenBSDArchitecture)
# define X11ProjectRoot /usr/X11R6
# elif defined(NetBSDArchitecture)
# define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
# endif
# endif
-# if OSMinorVersion > 3
+# if OSMinorVersion > 10
+# define InstallCmd /usr/bin/ginstall
+# elif OSMinorVersion > 3
# define InstallCmd /usr/ucb/install
# endif
# ifdef i386Architecture
#if !defined(UsePamLibrary)
# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
-# define UsePamLibrary YES
+# define UsePamLibrary NO
# endif
#endif
+#if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
+#define SharedLibXau YES
+#define SharedXauRev 6
+#define SharedLibXdmcp YES
+#define SharedXdmcpRev 6
+#endif
+
#define MotifDefines \
-DNO_ISDIR -DNO_REGCOMP -DNO_ALLOCA -DBOGUS_MB_MAX -DNO_CONST
#define PamUnixDefines -DPAM_NIS
UNSHARED_CXXLIB = -static -lC
# elif HasSunCplusplus
# if CplusplusCompilerMajorVersion > 3
-UNSHARED_CXXLIB = -Bstatic -L/opt/SUNWspro/SC4.0/lib -lC -Bdynamic
+UNSHARED_CXXLIB = -lC
# else
UNSHARED_CXXLIB = -Bstatic -lC -Bdynamic -lm -lc -Bstatic
# endif
_DtCvCONTAINER, /* type */
-1, /* link_idx */
{ /* container info */
- { NULL }, /* id */
+ NULL, /* id */
NULL, /* justify_char */
_DtCvDYNAMIC, /* type */
_DtCvBORDER_NONE, /* border */
_DtSvcProcessLock();
pmySUNWProcList = (SUNWHelpProcList *)malloc(sizeof(SUNWHelpProcList));
- libDtHelpHandle = dlopen("libDtHelp.so.1", RTLD_LAZY | RTLD_GLOBAL);
+ libDtHelpHandle = dlopen("libDtHelp.so.2.1", RTLD_LAZY | RTLD_GLOBAL);
if (libDtHelpHandle == NULL) {
char *my_err_msg;
#ifdef SharedDtSvcReqs
#ifdef SunArchitecture
-REQUIREDLIBS = SharedDtSvcReqs -L/opt/SUNWspro/SC4.0/lib -Bstatic -lC
+REQUIREDLIBS = SharedDtSvcReqs -lC -lCrun
SHLIBLDFLAGS = -G
#else
REQUIREDLIBS = SharedDtSvcReqs
#if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED)
#if defined(__STDC__)
-#if !defined(linux) && !defined(__osf__) && !defined(_XFUNCS_H_)
+#if !defined(linux) && !defined(__osf__) && !defined(_XFUNCS_H_) && !defined(sun)
extern void bcopy(char *b1, char *b2, int length);
extern int bcmp(char *b1, char *b2, int length);
extern void bzero(char *b, int length);
#ifdef __cplusplus
char *strtokx(char *&ptr, const char *sep);
-# if !defined(__osf__) && !defined(linux) && !defined(CSRG_BASED)
+# if !defined(__osf__) && !defined(linux) && !defined(sun) && !defined(CSRG_BASED)
char **strsep(const char *str, const char *sep,
boolean whsp = TRUE, int *num = NULL);
# if !defined(__osf__)
#else /* __STDC__ */
char *strtokx(char **ptr, const char *sep);
-# if !defined(linux) && !defined(CSRG_BASED)
+# if !defined(linux) && !defined(sun) && !defined(CSRG_BASED)
char **strsep(const char *str, const char *sep,
boolean whsp, int *num);
#endif
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
#include <unistd.h>
#else
-#if !defined(USL) && !defined(__uxp__)
+#if !defined(USL) && !defined(__uxp__) && !defined(sun)
#include <osfcn.h>
#endif
#endif
#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
#include <unistd.h>
#else
-#if !defined(USL) && !defined(__uxp__)
+#if !defined(USL) && !defined(__uxp__) && !defined(sun)
#include <osfcn.h>
#endif
#endif
extern char *ProgramName;
-#if !defined(linux) && !defined(CSRG_BASED)
+#if !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
extern char *malloc(), *realloc();
#endif
int process_command(), auth_initialize(), auth_finalize();
#define _DB_SERVER_GLOBALS_H
#include <limits.h>
+#if !defined(NGROUPS)
+#define NGROUPS NGROUPS_MAX
+#endif
#if defined(OPT_GARBAGE_THREADS)
#include <synch.h>
#include <stdlib.h>
#include <sys/param.h>
#include <sys/stat.h>
-#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
+#if defined(__osf__) || defined(linux) || defined(sun) || defined(CSRG_BASED)
#include <unistd.h>
#else
-#if !defined(USL) && !defined(__uxp__)
+#if !defined(USL) && !defined(__uxp__) && !defined(sun)
#include <osfcn.h>
#endif
#endif
*/
#include <errno.h>
-#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
+#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) || defined(sun)
#include <unistd.h>
#else
#ifndef USL
*
*/
-#if defined(__osf__) || defined(linux) || defined(CSRG_BASED)
+#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) || defined(sun)
#include <unistd.h>
#else
#if defined (USL) || defined(__uxp__)
#ifdef SharedTtReqs
#ifdef SunArchitecture
-REQUIREDLIBS = SharedTtReqs -L/opt/SUNWspro/SC4.0/lib -Bstatic -lC
+REQUIREDLIBS = SharedTtReqs -lC -lCrun
SHLIBLDFLAGS = -G
#else
REQUIREDLIBS = SharedTtReqs
os << "otype:\t\t" << _otype << "\n";
}
if (! _sender.is_null()) {
- os << "sender:\t\t[" << _uid << "/" << _gid << "] ";
+ os << "sender:\t\t[" << (unsigned long)_uid << "/" << (unsigned long)_gid << "] ";
_sender->print( os );
}
if (_sender_ptype.len() > 0) {
#ifdef __osf__
#include <unistd.h>
#else
-#if !defined(USL) && !defined(__uxp__) && !defined(linux) && !defined(CSRG_BASED)
+#if !defined(USL) && !defined(__uxp__) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#endif
#endif /* __osf */
#ifdef __osf__
#include <unistd.h>
#else
-#if !defined (USL) && !defined(__uxp__) && !defined(linux) && !defined(CSRG_BASED)
+#if !defined (USL) && !defined(__uxp__) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#endif
#endif /* __osf__ */
#ifdef __DECCXX
XDR::xdr_ops ops;
#else
- struct XDR::xdr_ops ops;
+ struct xdr_ops ops;
#endif
};
#ifdef __cplusplus
extern "C" {
#endif
-#if defined(__uxp__) || defined(__hpux) || (defined(sun) && OSMAJORVERSION >= 5 && OSMINORVERSION >= 4)
+#if defined(__uxp__) || defined(__hpux) || (defined(sun) && OSMAJORVERSION >= 5 && OSMINORVERSION >= 4 && OSMINORVERSION <=10 )
extern int putenv(const char *string);
#elif !(defined(__osf__) || defined(__aix) || defined(__NetBSD__))
extern int putenv(char *string);
#include "calctool.h"
#include "ds_common.h"
-#ifdef sun
+#ifdef legacysun
/* Copied from math.h */
struct exception {
#endif
#if defined (SunArchitecture)
-SYS_LIBRARIES = -lm -ldl -L/opt/SUNWspro/SC2.0.1 -lC
+SYS_LIBRARIES = -lm -ldl -lC
#endif /* SunArchitecture */
#if defined (USLArchitecture)
#if defined(SunArchitecture)
EXTRA_DEFINES = -DTCL_LIBRARY=\"${TCL_LIBRARY}\" \
- -DNO_UNION_WAIT -DHAVE_UNISTD_H \
+ -DNO_UNION_WAIT -DHAVE_UNISTD_H -DNEED_MATHERR \
-DTCL_GOT_TIMEZONE
#elif defined(IBMArchitecture)
#ifdef __cplusplus
#include <stdlib.h>
-#if !defined(__DECCXX) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
+#if !defined(__DECCXX) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED) && !defined(sun)
#include <osfcn.h>
#else
#include <unistd.h>
#endif
#if defined(SunArchitecture) && !UsePamLibrary
+/* Unsure when libauth went away */
+# if (OSMajorVersion == 5) && (OSMinorVersion < 5)
PAM_LIB = -lauth
+# else
+PAM_SRCS = pam_svc.c
+PAM_OBJS = pam_svc.o
+PAM_LIB = -lpam
+# endif
#endif
XDMDIR = $(CDE_LOGFILES_TOP)
* on Solaris 2.4 and run on Solaris 2.5. In Solaris 2.4 some of
* libcmd.a functions are also in libauth.so. But on Solaris 2.5
* these Sun private functions have been removed from libauth.so. */
-SYS_LIBRARIES = -lm -ldl -lgen -lresolv -lC -lbsm -lcmd -lauth $(PAM_LIB)
+SYS_LIBRARIES = -lm -ldl -lgen -lresolv -lC -lbsm -lcmd $(PAM_LIB)
+ EXTRA_DEFINES = -DPAM
# if UsePamLibrary
EXTRA_DEFINES = -DPAM
-# else
- EXTRA_DEFINES = -DSUNAUTH
# endif
#endif
return(PAM_AUTH_ERR);
}
-#ifdef sun
+#ifdef legacysun
/* Solaris BSM Audit trail */
audit_login_save_host(display_name);
status = pam_authenticate( pamh, 0 );
pam_auth_trys++;
-#ifdef sun
+#ifdef legacysun
pwd = getpwnam(user);
audit_login_save_pw(pwd);
Debug("PamAccounting: USER_PROCESS open_session error=%d\n",
status);
}
-#ifdef sun
+#ifdef legacysun
if (status == PAM_SUCCESS) audit_login_success();
#endif
session_type = SOLARIS_LOGIN;
if (saved_user_passwd != NULL) {
r->resp = (char *) malloc(strlen(saved_user_passwd)+1);
if (r->resp == NULL) {
- __pam_free_resp(num_msg, *response);
+ /* __pam_free_resp(num_msg, *response); */
*response = NULL;
return (PAM_CONV_ERR);
}
case PAM_SUCCESS:
return(VF_OK);
- case PAM_AUTHTOKEN_REQD:
+ case PAM_NEW_AUTHTOK_REQD:
return(VF_PASSWD_AGED);
default:
}
-extern int forceUpdate( Widget );
+extern void forceUpdate( Widget );
SelectFileCmd::SelectFileCmd (const char * name,
const char * label,
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;
}
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().
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;
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);
#include <sys/file.h>
-extern int forceUpdate( Widget );
+extern void forceUpdate( Widget );
RoamCmd::RoamCmd
(char *name, char *label, int active, RoamMenuWindow *window)
#include <Xm/Xm.h>
#include <Xm/MessageB.h>
#include <assert.h>
-extern int forceUpdate( Widget );
+extern void forceUpdate( Widget );
RoamInterruptibleCmd::RoamInterruptibleCmd ( char *name,
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;
}
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
//
// 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)
// 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') &&
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);
}
}
// 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;
results = strdup(&string[offset + nameLen + 1]);
if (*results == '"') {
results++;
- stringEnd = strchr(results, '"');
+ stringEnd = const_cast <char *> (strchr(results, '"'));
if (stringEnd != NULL) {
*stringEnd = '\0';
}
//
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,
_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)
{
*/
(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) {
#endif
#if defined (SunArchitecture)
-SYS_LIBRARIES = -lintl -L/opt/SUNWspro/SC2.0.1 -lm -lgen -ldl -lC
+SYS_LIBRARIES = -lintl -lm -lgen -ldl -lC
#endif
PROGRAMS = dtpdm
#define boolean boolean_t
#define true B_TRUE
#define false B_FALSE
+#elif defined(sun)
+ #include <sys/types.h>
+ #define boolean boolean_t
+#if defined(__XOPEN_OR_POSIX)
+ #define true _B_TRUE
+ #define false _B_FALSE
+#else
+ #define true B_TRUE
+ #define false B_FALSE
+#endif
#elif defined(linux)
#define false 0
#define true 1
#define boolean boolean_t
#define true B_TRUE
#define false B_FALSE
+#elif defined(sun)
+ #include <sys/types.h>
+ #define boolean boolean_t
+#if defined(__XOPEN_OR_POSIX)
+ #define true _B_TRUE
+ #define false _B_FALSE
+#else
+ #define true B_TRUE
+ #define false B_FALSE
+#endif
#elif defined(linux)
#define false 0
#define true 1
#include <shadow.h>
#define getpwnam getspnam
#endif
-#if !(defined(_AIX) || defined(hpux))
+#if !(defined(_AIX) || defined(hpux) || defined(sun))
# define srandom srand
# define random rand
# define MAXRAND (32767.0)
#include "dtscreen.h"
-#if !defined(_AIX) && !defined(hpV4) && !defined(linux) && !defined(CSRG_BASED)
+#if !defined(_AIX) && !defined(hpV4) && !defined(linux) && !defined(sun) && !defined(CSRG_BASED)
int
usleep(unsigned long usec)
{
int size[MAXCOLORS];
} wormstruct;
-#if !defined(CSRG_BASED)
+#if !defined(CSRG_BASED) && !defined(sun)
int
round(x)
float x;
}
/* init data... */
-#if defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED)
+#if defined(USL) || defined(__uxp__) || defined(linux) || defined(sun) || defined(CSRG_BASED)
(void) memset((void *) &myaddr_in, (int) '\0', sizeof(myaddr_in));
#else
(void) memset(myaddr_in, '\0', sizeof(myaddr_in));