Discontinue HPUX support

This commit is contained in:
Chase
2022-07-22 21:42:06 -05:00
committed by Jon Trulson
parent bd83b53d56
commit edf4319548
235 changed files with 198 additions and 6290 deletions

View File

@@ -80,10 +80,6 @@
#define SM_FREE(PTR) XtFree(PTR)
#define SM_EXIT(STATUS) SmExit(STATUS)
#ifdef __hpux
#define SM_SETEUID(EUID) setresuid(-1, EUID, -1)
#define SM_SETESUID(UID) setresuid(-1, UID, UID)
#else
#ifndef SVR4
#define SM_SETEUID(EUID) seteuid(EUID)
#define SM_SETESUID(UID) setreuid(UID, UID)
@@ -91,7 +87,6 @@
#define SM_SETEUID(EUID) seteuid(EUID)
#define SM_SETESUID(UID) (setuid(UID), seteuid(UID))
#endif
#endif
/*
* Types of states the session manager can be in

View File

@@ -87,13 +87,6 @@
#ifdef mips
#define GPGSLIM "gpgslim"
#define FREEMEM "freemem"
#else /* not mips */
# ifdef __hpux
# ifdef __hp9000s800
# define GPGSLIM "gpgslim"
# define FREEMEM "freemem"
# endif /* __hp9000s800 */
# endif /* __hpux */
#endif /* mips */
#ifndef GPGSLIM
@@ -163,21 +156,17 @@ GetMemoryUtilization(void)
#if !defined(__linux__)
static int init = 0;
static int kmem;
#if !defined(SVR4) && !defined(hpV4) && !defined(_POWER) && !defined(CSRG_BASED)
#if !defined(SVR4) && !defined(_AIX) && !defined(CSRG_BASED)
extern void nlist();
#endif
int i;
#ifdef __hpux
setresgid(-1, smGD.conMgmtGID, -1);
#else
#ifndef SVR4
setregid(smGD.runningGID, smGD.conMgmtGID);
#else
setgid(smGD.runningGID);
setegid(smGD.conMgmtGID);
#endif
#endif
if(!init)
@@ -191,15 +180,11 @@ GetMemoryUtilization(void)
if (namelist[i].n_type == 0 ||
namelist[i].n_value == 0)
{
#ifdef __hpux
setresgid(-1, smGD.runningGID, -1);
#else
#ifndef SVR4
setregid(smGD.conMgmtGID, smGD.runningGID);
#else
setgid(smGD.conMgmtGID);
setegid(smGD.runningGID);
#endif
#endif
return(MEM_NOT_AVAILABLE);
}
@@ -211,15 +196,11 @@ GetMemoryUtilization(void)
kmem = open(KMEM_FILE, O_RDONLY);
if (kmem < 0)
{
#ifdef __hpux
setresgid(-1, smGD.runningGID, -1);
#else
#ifndef SVR4
setregid(smGD.conMgmtGID, smGD.runningGID);
#else
setgid(smGD.conMgmtGID);
setegid(smGD.runningGID);
#endif
#endif
return(MEM_NOT_AVAILABLE);
}
@@ -247,15 +228,11 @@ GetMemoryUtilization(void)
(void) read(kmem, (char *)&freemem, sizeof(int));
#endif /* mips */
#ifdef __hpux
setresgid(-1, smGD.runningGID, -1);
#else
#ifndef SVR4
setregid(smGD.conMgmtGID, smGD.runningGID);
#else
setgid(smGD.conMgmtGID);
setegid(smGD.runningGID);
#endif
#endif
if(freemem >= gpgslim)

View File

@@ -266,13 +266,6 @@ static XtResource saverResources[]=
machineDefault[] =
{
{ 0, 20, 60}, /* Machine independent default */
#ifdef __hpux
{300, 10, 60}, /* HP s300 */
{400, 10, 60}, /* HP s400 */
{600, 5, 60}, /* HP s600 */
{700, 5, 60}, /* HP s700 */
{800, 5, 60}, /* HP s800 */
#endif /* __hpux */
};
#define MACHINEDEFAULTS (sizeof(machineDefault) / sizeof(machineDefault[0]))
@@ -420,38 +413,6 @@ InitSMGlobals( void )
smGD.userSetWaitWmTimeout = True; /* assume it is */
#ifdef __hpux
if (uname(&nameRec) == 0)
{
keyNum = nameRec.machine;
if (firstSlash = strchr(keyNum, '/'))
{
keyNum = ++firstSlash;
if ( keyNum[0] == '3')
{
machineType = 300;
}
else if (keyNum[0] == '4')
{
machineType = 400;
}
else if (keyNum[0] == '6')
{
machineType = 600;
}
else if (keyNum[0] == '7')
{
machineType = 700;
}
else if (keyNum[0] == '8')
{
machineType = 800;
}
}
}
#endif /* __hpux */
/*
* Get application specific resource values
*/
@@ -1385,13 +1346,11 @@ RemoveFiles(
/*
* Set the gid of the process back from bin
*/
#ifndef __hpux
#ifndef SVR4
setregid(smGD.runningGID, smGD.runningGID);
#else
setgid(smGD.runningGID);
setegid(smGD.runningGID);
#endif
#endif
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);
@@ -1490,13 +1449,11 @@ MoveDirectory(
/*
* Set the gid of the process back from bin
*/
#ifndef __hpux
#ifndef SVR4
setregid(smGD.runningGID, smGD.runningGID);
#else
setgid(smGD.runningGID);
setegid(smGD.runningGID);
#endif
#endif
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);

View File

@@ -89,9 +89,6 @@ static int RegisterX11ScreenSaver(Display *display, int *ssEventType);
/*
* Internal Defines
*/
#ifdef __hpux
#define SECURE_SYS_PATH "/.secure/etc/passwd"
#endif
#ifdef _AIX
#define SECURE_SYS_PATH "/etc/security/passwd"
#endif
@@ -218,16 +215,12 @@ main (int argc, char **argv)
(void) putenv (lang);
}
#ifdef __hpux
setresgid(-1, smGD.runningGID, -1);
#else /* _AIX or any other system */
#ifndef SVR4
setregid(smGD.conMgmtGID, smGD.runningGID);
#else
setgid(smGD.conMgmtGID);
setegid(smGD.runningGID);
#endif
#endif /* !hpux */
#endif /* !SVR4 */
/*
* Set up POSIX sigaction structs

View File

@@ -890,7 +890,6 @@ RestoreResources( Boolean errorHandlerInstalled, ... )
{
SetSIGPIPEToDefault ();
#ifndef __hpux
/*
* Set the gid of the process back from bin
*/
@@ -900,7 +899,7 @@ RestoreResources( Boolean errorHandlerInstalled, ... )
setgid(smGD.runningGID);
setegid(smGD.runningGID);
#endif
#endif
#if defined(CSRG_BASED)
setsid();
#else
@@ -3611,7 +3610,6 @@ StartLocalClient (
putenv (strdup (*ppchar));
}
#ifndef __hpux
/*
* Set the gid of the process back from bin
*/
@@ -3620,7 +3618,6 @@ StartLocalClient (
#else
setgid(smGD.runningGID);
setegid(smGD.runningGID);
#endif
#endif
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);
@@ -3765,67 +3762,7 @@ ForkWM( void )
pid_t clientFork;
int execStatus, i;
#ifdef __hpux
/*
* These lines were added to support the builtin
* panacomm dtwm.
*/
char *homeDir;
char *hostName;
char *displayName,*dpy;
hostName = SM_MALLOC(MAXPATHSM);
displayName = SM_MALLOC(MAXPATHSM);
if( gethostname(hostName, (sizeof(hostName) - 1) ) == 0)
{
hostName[MAXPATHSM - 1] = '\0';
dpy = getenv(DISPLAY_NAME);
homeDir = getenv("HOME");
if (dpy && homeDir)
{
strcpy(displayName, dpy);
dpy = strchr(displayName, ':');
if (dpy)
{
*dpy = '\0';
}
sprintf(tmpExecWmFile, "%s/.dt/bin/%s/%s/dtwm", homeDir,
hostName,displayName);
if (access(tmpExecWmFile,X_OK) != 0)
{
strcpy(tmpExecWmFile,CDE_INSTALLATION_TOP "/bin/dtwm");
}
else
{
localWmLaunched = True;
if (!smGD.userSetWaitWmTimeout)
{
smRes.waitWmTimeout = 60000;
}
}
}
else
{
strcpy(tmpExecWmFile,CDE_INSTALLATION_TOP "/bin/dtwm");
}
}
else
{
strcpy(tmpExecWmFile,CDE_INSTALLATION_TOP "/bin/dtwm");
}
SM_FREE(hostName);
SM_FREE(displayName);
/*
* ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^
* End of lines were added to support the builtin
* panacomm dtwm.
*/
#else
strcpy(tmpExecWmFile,CDE_INSTALLATION_TOP "/bin/dtwm");
#endif /* __hpux */
/*
* Fork and exec the client process
@@ -3848,7 +3785,6 @@ ForkWM( void )
{
SetSIGPIPEToDefault ();
#ifndef __hpux
/*
* Set the gid of the process back from bin
*/
@@ -3857,7 +3793,6 @@ ForkWM( void )
#else
setgid(smGD.runningGID);
setegid(smGD.runningGID);
#endif
#endif
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);

View File

@@ -80,11 +80,6 @@ XCOMM endif
*ttyModes: erase ^H intr ^C kill ^U start ^Q stop ^S swtch ^@ susp ^Z
*promptDialog.bboard.frame.form.text.columns: %|nls-3-#45#|
#ifdef __hpux
Hpterm*backgroundIsSelect: True
Hpterm*makeColors: shadow
#endif
dtsession*saverTimeout: 10
dtsession*lockTimeout: 30
dtsession*cycleTimeout: 3
@@ -160,44 +155,6 @@ XCOMM endif
*enableDragIcon: True
*enableCDEColorFactors: True
#ifdef __hpux
!#################################################################
!#
!# CDE translations for the text widget and text field widget
!#
!# - provides more intuitive "clear line", "insert line" and
!# "delete line" behavior
!# - provides basic EMACS editor functionality
!#
!#################################################################
*XmText*Translations:#override\n\
<Key>hpClearLine: delete-to-end-of-line()\n\
~m ~a <Key>osfPrimaryPaste:beginning-of-line()\
newline-and-backup()\n\
<Key>osfQuickPaste: beginning-of-line()\
insert-string(\" \")\
beginning-of-line()\
delete-to-end-of-line()\
delete-next-character()\n\
Ctrl<Key>u:delete-to-start-of-line()\n\
Ctrl<Key>k:delete-to-end-of-line()\n\
Ctrl<Key>a:beginning-of-line()\n\
Ctrl<Key>e:end-of-line()\n\
Ctrl<Key>p:process-up()\n\
Ctrl<Key>b:backward-character()\n\
Ctrl<Key>n:process-down()\n\
Ctrl<Key>f:forward-character()
*XmTextField*Translations:#override\n\
<Key>hpClearLine: delete-to-end-of-line()\n\
<Key>osfQuickPaste: beginning-of-line()\
delete-to-end-of-line()\n\
Ctrl<Key>u:delete-to-start-of-line()\n\
Ctrl<Key>k:delete-to-end-of-line()\n\
Ctrl<Key>a:beginning-of-line()\n\
Ctrl<Key>e:end-of-line()\n\
Ctrl<Key>b:backward-character()\n\
Ctrl<Key>f:forward-character()
#else
!#################################################################
!#
!# CDE translations for the text widget and text field widget
@@ -221,7 +178,6 @@ XCOMM endif
Ctrl<Key>e:end-of-line()\n\
Ctrl<Key>b:backward-character()\n\
Ctrl<Key>f:forward-character()
#endif
!#################################################################
!#