remove OSF1 support

This commit is contained in:
chase
2018-05-24 14:50:03 -05:00
committed by Jon Trulson
parent 3c1736f077
commit 164e695cd0
325 changed files with 290 additions and 9980 deletions

View File

@@ -857,22 +857,14 @@ DefineSelf (int fd, FILE *file, Xauth *auth)
#else /* WINTCP */
#ifdef SIOCGIFCONF
#ifdef __osf__
#define DECnetInstalled (0 == access("/usr/shlib/libdnet.so", F_OK))
#else
/* think of something... */
#define DECnetInstalled True
#endif /* __osf __ */
/* Define this host for access control. Find all the hosts the OS knows about
* for this fd and add them to the selfhosts list.
*/
static void
#ifdef __osf__
DefineSelf (fd, file, auth, addr_family)
#else
DefineSelf (fd, file, auth)
#endif /* __osf__*/
int fd;
FILE *file;
Xauth *auth;
@@ -889,27 +881,7 @@ DefineSelf (fd, file, auth)
ifc.ifc_buf = buf;
if (ioctl (fd, SIOCGIFCONF, (char *) &ifc) < 0)
#ifdef __osf__
switch (addr_family)
{
#ifdef TCPCONN
case AF_INET:
perror("xdm");
LogError ((unsigned char *)"Trouble getting Internet network interface configuration\n");
break;
#endif
#ifdef DNETCONN
case AF_DECnet:
if (DECnetInstalled)
LogError ((unsigned char *)"Trouble getting DECnet network interface configuration\n");
break;
#endif
default:
LogError ((unsigned char *)"Trouble getting network interface configuration\n");
}
#else
LogError ((unsigned char *)"Trouble getting network interface configuration");
#endif /* __osf__ */
for (ifr = ifc.ifc_req
#if defined(BSD44SOCKETS) || defined(CSRG_BASED)

View File

@@ -56,19 +56,15 @@ Dtlogin.accessFile: Xaccess
#if defined (_NO_CONSOLE)
Dtlogin.servers: Xservers.nc
#else
#if defined (__osf__)
Dtlogin.servers: Xservers.con
#else
Dtlogin.servers: Xservers
#endif
#endif
Dtlogin*resources: %L/Xresources
Dtlogin*startup: Xstartup
Dtlogin*reset: Xreset
Dtlogin*setup: Xsetup
#if defined (__hpux) || defined (_AIX) || defined (sun) || defined (__osf__) || defined(CSRG_BASED) || defined(linux)
#if defined (__hpux) || defined (_AIX) || defined (sun) || defined(CSRG_BASED) || defined(linux)
Dtlogin*failsafeClient: Xfailsafe
#else
Dtlogin*failsafeClient: /usr/bin/X11/xterm
@@ -117,11 +113,6 @@ XCOMM #
XCOMM # Dtlogin*ignoreLocales: <lang_pattern1> <lang_pattern2>
XCOMM #
#if defined (__osf__)
Dtlogin*ignoreLocales: *.88591* *@ucs4 *@chuyin *@pinyin *@radical *@stroke \
ca_ES cs_CZ hu_HU iw_IL lt_LT pl_PL ru_RU sk_SK sl_SI
#endif
XCOMM #########################################################################
XCOMM To specify global environment variables for the X-server and all users

View File

@@ -65,11 +65,7 @@ XCOMM
XCOMM dtdbcache file's directory should match
XCOMM _DTDTSMMTEMPDIR in DtSvc/DtUtil1/DtsMM.h
#ifdef __osf__
DTDBFILE=/var/tmp/dtdbcache_$DISPLAY
#else
DTDBFILE=/tmp/dtdbcache_$DISPLAY
#endif
if [ -f $DTDBFILE ]
then
DTDBFILEOWNER=`/bin/ls -l $DTDBFILE | /bin/awk '{print $3}'`

View File

@@ -392,67 +392,6 @@ Dtlogin*zh_TW.ccdc.languageName: %|nls-356-##|
#endif /* __hpux */
#if defined (__osf__)
!!######################################################################
!!
!! LANGUAGE MENU NAME MAPPINGS
\#undef C
Dtlogin*C.languageName: %|nls-400-#C#|
Dtlogin*POSIX.languageName: %|nls-401-#POSIX#|
Dtlogin*ca_ES.ISO8859-1.languageName: %|nls-448-#Catalan#|
Dtlogin*zh_CN.languageName: %|nls-402-#Chinese China#|
Dtlogin*zh_CN.dechanzi.languageName: %|nls-403-#Chinese China (DEC Hanzi)#|
Dtlogin*zh_HK.big5.languageName: %|nls-404-#Chinese Hong Kong (Big 5)#|
Dtlogin*zh_HK.eucTW.languageName: %|nls-405-#Chinese Hong Kong (EUC Taiwan)#|
Dtlogin*zh_HK.dechanyu.languageName: %|nls-406-#Chinese Hong Kong (DEC Hanyu)#|
Dtlogin*zh_HK.dechanzi.languageName: %|nls-407-#Chinese Hong Kong (DEC Hanzi)#|
Dtlogin*zh_TW.languageName: %|nls-408-#Chinese Taiwan#|
Dtlogin*zh_TW.big5.languageName: %|nls-409-#Chinese Taiwan (Big5)#|
Dtlogin*zh_TW.dechanyu.languageName: %|nls-410-#Chinese Taiwan (DEC Hanyu)#|
Dtlogin*zh_TW.eucTW.languageName: %|nls-411-#Chinese Taiwan (EUC)#|
Dtlogin*cs_CZ.ISO8859-2.languageName: %|nls-412-#Czech#|
Dtlogin*da_DK.ISO8859-1.languageName: %|nls-413-#Danish#|
Dtlogin*nl_NL.ISO8859-1.languageName: %|nls-414-#Dutch#|
Dtlogin*nl_BE.ISO8859-1.languageName: %|nls-415-#Dutch Belgian#|
Dtlogin*en_GB.ISO8859-1.languageName: %|nls-416-#English (Great Britain)#|
Dtlogin*en_US.ISO8859-1.languageName: %|nls-417-#English (United States)#|
Dtlogin*fi_FI.ISO8859-1.languageName: %|nls-418-#Finnish#|
Dtlogin*fr_FR.ISO8859-1.languageName: %|nls-419-#French#|
Dtlogin*fr_CA.ISO8859-1.languageName: %|nls-420-#French-Canadian#|
Dtlogin*fr_BE.ISO8859-1.languageName: %|nls-421-#French-Belgian#|
Dtlogin*de_DE.ISO8859-1.languageName: %|nls-422-#German#|
Dtlogin*el_GR.ISO8859-7.languageName: %|nls-423-#Greek#|
Dtlogin*iw_IL.ISO8859-8.languageName: %|nls-424-#Hebrew#|
Dtlogin*hu_HU.ISO8859-2.languageName: %|nls-425-#Hungarian#|
Dtlogin*is_IS.ISO8859-1.languageName: %|nls-426-#Icelandic#|
Dtlogin*it_IT.ISO8859-1.languageName: %|nls-427-#Italian#|
Dtlogin*ja_JP.languageName: %|nls-428-#Japanese#|
Dtlogin*ja_JP.deckanji.languageName: %|nls-429-#Japanese (DEC Kanji)#|
Dtlogin*ja_JP.eucJP.languageName: %|nls-430-#Japanese (EUC)#|
Dtlogin*ja_JP.sdeckanji.languageName: %|nls-431-#Japanese (Super DEC Kanji)#|
Dtlogin*ja_JP.SJIS.languageName: %|nls-432-#Japanese (Shift JIS)#|
Dtlogin*ko_KR.languageName: %|nls-433-#Korean#|
Dtlogin*ko_KR.deckorean.languageName: %|nls-434-#Korean (DEC Korean)#|
Dtlogin*ko_KR.eucKR.languageName: %|nls-435-#Korean (EUC)#|
Dtlogin*lt_LT.ISO8859-4.languageName: %|nls-450-#Lithuanian#|
Dtlogin*no_NO.ISO8859-1.languageName: %|nls-436-#Norwegian#|
Dtlogin*pl_PL.ISO8859-2.languageName: %|nls-437-#Polish#|
Dtlogin*pt_PT.ISO8859-1.languageName: %|nls-438-#Portugese#|
Dtlogin*ru_RU.ISO8859-5.languageName: %|nls-439-#Russian#|
Dtlogin*sk_SK.ISO8859-2.languageName: %|nls-440-#Slovak#|
Dtlogin*sl_SI.ISO8859-2.languageName: %|nls-449-#Slovene#|
Dtlogin*es_ES.ISO8859-1.languageName: %|nls-441-#Spanish#|
Dtlogin*sv_SE.ISO8859-1.languageName: %|nls-442-#Swedish#|
Dtlogin*fr_CH.ISO8859-1.languageName: %|nls-443-#Swiss-french#|
Dtlogin*de_CH.ISO8859-1.languageName: %|nls-444-#Swiss-German#|
Dtlogin*th_TH.languageName: %|nls-445-#Thai#|
Dtlogin*th_TH.TACTIS.languageName: %|nls-446-#Thai (TACTIS)#|
Dtlogin*tr_TR.ISO8859-9.languageName: %|nls-447-#Turkish#|
#endif /* __osf__ */
!!######################################################################
!!
!! CHOOSER

View File

@@ -99,12 +99,6 @@ XCOMM ##########################################################################
:0 Local local@console /usr/bin/X11/X -T -force :0
#elif defined (sun)
:0 Local local_uid@console root /usr/openwin/bin/X :0 -nobanner
#elif defined (__osf__)
#if defined (_NO_CONSOLE)
XCOMM * Local local_uid@console root /usr/bin/X11/X :0 -nice -2
#else
:0 Local local_uid@console root /usr/bin/X11/X :0 -nice -2
#endif
#elif defined (__hpux)
* Local local@console /usr/bin/X11/X :0
#elif defined (_NO_CONSOLE)

View File

@@ -239,25 +239,6 @@ then
unset LC_MESSAGES
fi
#endif
#if defined (__osf__)
HASH
HASH Set XFILESEARCHPATH if necessary
HASH
if [ -z "$XFILESEARCHPATH" ]
then
export XFILESEARCHPATH="%D"
fi
HASH
HASH check if network is configured. If not, set environment variable
HASH so that tooltalk will use localhost/loopback rather than system
HASH name
RCMGR=/usr/sbin/rcmgr
NUM_NETCONFIG=`$RCMGR get NUM_NETCONFIG`
if [ "$NUM_NETCONFIG" = '' -o "$NUM_NETCONFIG" = 0 ]; then
export DTNONETWORK=true
fi
#endif
#if defined (__hpux)
HASH
@@ -346,11 +327,7 @@ XCOMM ##########################################################################
HASH dtdbcache file's directory should match
HASH _DTDTSMMTEMPDIR in DtSvc/DtUtil1/DtsMM.h
HASH
#ifdef __osf__
dtdbcacherm="rm -f /var/tmp/dtdbcache_$DISPLAY"
#else
dtdbcacherm="rm -f /tmp/dtdbcache_$DISPLAY"
#endif
dtstart_appgather="$DT_BINPATH/dtappgather &"
#if defined(sun)
dtstart_dsdm="$DT_BINPATH/dsdm &"
@@ -399,17 +376,6 @@ XCOMM ##########################################################################
#include "_common.ksh.src"
#undef cpp_Xsession
#if defined (__osf__)
XCOMM
XCOMM Bring up the sysman checklist if it hasn't been run before
XCOMM
if [ -f /usr/sbin/start_checklist ]
then
Log "Starting the checklist setup"
/usr/sbin/start_checklist&
fi
#endif
XCOMM ##########################################################################
XCOMM
XCOMM Source user's desktop profile

View File

@@ -42,11 +42,7 @@ XCOMM
XCOMM dtdbcache file's directory should match
XCOMM _DTDTSMMTEMPDIR in DtSvc/DtUtil1/DtsMM.h
#ifdef __osf__
DTDBFILE=/var/tmp/dtdbcache_$DISPLAY
#else
DTDBFILE=/tmp/dtdbcache_$DISPLAY
#endif
if [ -f $DTDBFILE ]
then
/bin/rm -f $DTDBFILE

View File

@@ -32,7 +32,7 @@
HASH
HASH Determine Xsession parent
HASH
#if defined (__osf__) || defined(__OpenBSD__) || defined(__NetBSD__)
#if defined(__OpenBSD__) || defined(__NetBSD__)
pexec=$(LC_TIME=C ps -p $PPID | awk 'NR==2 {print $5}')
#elif defined(linux)
pexec=$(LC_TIME=C /bin/ps -p $PPID 2>/dev/null | awk 'NR==2 {print $4}')
@@ -172,172 +172,6 @@ ADDFONTPATH() {
fi
#endif
#if defined (__osf__)
#ifdef cpp_Xsetup
if [ "$DTXSERVERLOCATION" != "remote" ]; then
HASH
HASH We can only modify the font path or the keymap if the X server is
HASH local.
HASH
HASH Since X server is local, optimize by checking local desktop
HASH font directories and making one call to xset.
HASH
HASH
HASH
HASH check if the system has a Low or High Resolution Monitor
HASH - High Resolution (1280 x 1024) uses 100 dpi fonts.
HASH - Medium Resolution (1024 x 864 ) uses 75 dpi fonts.
HASH - Low Resolution (1024 x 768 or lower) uses 75 dpi fonts.
HASH This will only switch to 75dpi fonts if there is a low or medium
HASH resolution monitor found.
HASH
HASH
fd=""
prefplist=""
appfplist=""
setfont="No"
FONTLIB="/usr/lib/X11/fonts"
I18N="/usr/i18n/lib/X11/fonts/decwin"
pixwidth=`/usr/sbin/sizer -gr | awk -Fx ' { print $1 } ' `
if [ ${pixwidth} -lt 1280 ]
then
nat_res="75dpi"
alt_res="100dpi"
else
nat_res="100dpi"
alt_res="75dpi"
fi
HASH
HASH Add scalable fonts to the font path, based on
HASH screen resolution
HASH
if [ ${pixwidth} -lt 1024 ]
then
HASH
HASH Prepend fontpaths
HASH
prefplist="${FONTLIB}/Speedo ${FONTLIB}/Type1 ${FONTLIB}/Type1Adobe"
else
HASH
HASH Append fontpaths
HASH
appfplist="${FONTLIB}/Type1Adobe"
fi
HASH
HASH Append fontpaths
HASH add optional extra fonts
HASH
cde_configuration_top=CDE_CONFIGURATION_TOP
cde_installation_top=CDE_INSTALLATION_TOP
appfplist="${appfplist} ${FONTLIB}/user/${nat_res} ${FONTLIB}/user/misc"
if [ "${LANG-C}" != "C" ]; then
appfplist="${appfplist} $cde_configuration_top/config/xfonts/$LANG/$nat_res"
appfplist="${appfplist} $cde_configuration_top/config/xfonts/$LANG/$alt_res"
fi
appfplist="${appfplist} $cde_configuration_top/config/xfonts/C"
appfplist="${appfplist} $cde_configuration_top/config/xfonts/C/$nat_res"
appfplist="${appfplist} $cde_configuration_top/config/xfonts/C/$alt_res"
if [ "${LANG-C}" != "C" ]; then
appfplist="${appfplist} $cde_installation_top/config/xfonts/$LANG/$nat_res"
appfplist="${appfplist} $cde_installation_top/config/xfonts/$LANG/$alt_res"
fi
appfplist="${appfplist} $cde_installation_top/config/xfonts/C"
appfplist="${appfplist} $cde_installation_top/config/xfonts/C/$nat_res"
appfplist="${appfplist} $cde_installation_top/config/xfonts/C/$alt_res"
HASH
HASH Prepend fontpaths
HASH add i18n fonts if they exist
HASH
prefplist="${I18N}/${nat_res} ${I18N}/${alt_res} ${prefplist}"
HASH
HASH Prepend to fontpath
HASH
for i in ${prefplist}
do
if [ -f ${i}/fonts.dir ]
then
if [ $fd ]
then
fd="${fd},${i}/"
else
fd="${i}/"
setfont="Yes"
fi
fi
done
if [ ${setfont} = Yes ]
then
$XDIR/xset +fp ${fd}
if [ $? -ne 0 ]
then
HASH
HASH set the old slow way.....
HASH
for i in ${prefplist}
do
if [ -f ${i}/fonts.dir ]
then
$XDIR/xset +fp ${i}
fi
done
fi
HASH
HASH End of the setting the old slow way.........
HASH
fd=""
setfont='No'
fi
HASH
HASH Append to fontpath
HASH
for i in ${appfplist}
do
if [ -f ${i}/fonts.dir ]
then
if [ $fd ]
then
fd="${fd},${i}/"
else
fd="${i}/"
setfont="Yes"
fi
fi
done
if [ ${setfont} = Yes ]
then
$XDIR/xset fp+ ${fd}
if [ $? -ne 0 ]
then
HASH
HASH set the old slow way.....
HASH
for i in ${appfplist}
do
if [ -f ${i}/fonts.dir ]
then
$XDIR/xset fp+ ${i}
fi
done
fi
HASH
HASH End of the setting the old slow way.........
HASH
fi
fi
#endif
#endif
#if defined (_AIX)
XCOMM ##########################################################################
XCOMM

View File

@@ -77,16 +77,11 @@ BecomeDaemon( void )
* Close standard file descriptors and get rid of controlling tty
*/
#ifdef __osf__
/* use setsid() instead of setpgrp() */
setsid();
#else
#if defined(SYSV) || defined (SVR4) || defined(linux)
setpgrp ();
#else
setpgrp (0, getpid());
#endif
#endif /* __osf__ */
close (0);
close (1);

View File

@@ -273,7 +273,7 @@ main( int argc, char **argv )
ScanServers ();
StartDisplays ();
(void) signal (SIGHUP, RescanNotify);
#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined (__osf__) || defined(linux)
#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(linux)
(void) signal (SIGCHLD, ChildNotify);
#endif
while (AnyWellKnownSockets() || AnyDisplaysLeft ())
@@ -286,7 +286,7 @@ main( int argc, char **argv )
TrimErrorFile();
#if defined(SYSV) && !defined(hpux) && !defined(_AIX) && !defined (__osf__) && !defined(linux)
#if defined(SYSV) && !defined(hpux) && !defined(_AIX) && !defined(linux)
WaitForChild ();
#else
WaitForSomething ();
@@ -500,7 +500,7 @@ StopAll( int arg )
int ChildReady = 0;
#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined (__osf__) || defined(linux) || defined(CSRG_BASED)
#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(linux) || defined(CSRG_BASED)
static SIGVAL
ChildNotify( int arg )
{
@@ -1313,10 +1313,11 @@ StorePid( void )
if (pidFd == -1 && errno == ENOENT)
{
/*
* HP OSF/1 will not allow an fdopen
* A Legacy OS wouldn't allow an fdopen
* of a file descriptor handed back by creat(2).
* The workaround is to close the created file, and
* open it Read/Write. This will be transparent to HP-UX.
* This code needs to be cleaned up - 05/22/18 - C
*/
pidFd = creat (pidFile, 0644);
if(pidFd != -1) {
@@ -1477,7 +1478,7 @@ SetTitle( char *name, char *ptr )
*
*****************************************************************************/
#if defined (_AIX) && defined (_POWER) || defined (__osf__)
#if defined (_AIX) && defined (_POWER)
#define GETTYPATH "/usr/sbin/getty"
#elif defined(__OpenBSD__)
#define GETTYPATH "/usr/libexec/getty"

View File

@@ -113,7 +113,7 @@
/*
* Default directories containing locale information.
*/
#if defined(_AIX) || defined (__osf__)
#if defined(_AIX)
#define DEF_NLS_DIR "/usr/lib/nls/loc"
#elif defined(hpV4)
#define DEF_NLS_DIR "/usr/lib/nls/msg"
@@ -508,9 +508,6 @@ extern int langListTimeout;
#ifdef DEF_NETWORK_DEV
extern char *networkDev;
#endif
#if defined(__osf__)
extern char *ignoreLocales;
#endif
#if !defined (ENABLE_DYNAMIC_LANGLIST)
extern char languageList[]; /* util.c */

View File

@@ -749,13 +749,8 @@ MakeDialog( DialogType dtype )
case copyright:
if ((fp = fopen(COPYRIGHT,"r")) == NULL)
#if defined( __hp_osf )
xmstr = XmStringCreate("Cannot open copyright file '/usr/X11/copyright'.",
XmFONTLIST_DEFAULT_TAG);
#else
xmstr = XmStringCreate("Cannot open copyright file '/etc/copyright'.",
XmFONTLIST_DEFAULT_TAG);
#endif
else {
xmstr = (XmString) NULL;

View File

@@ -90,9 +90,6 @@ int langListTimeout;
#ifdef DEF_NETWORK_DEV
char *networkDev;
#endif
#if defined(__osf__)
char *ignoreLocales;
#endif
/*
* Dtlogin will accept both Dtlogin and XDM resources. The string variable
@@ -222,12 +219,6 @@ static char AppName[16] = DTLOGIN;
# ifdef __apollo
# define DEF_LANG "C"
# endif
# ifdef __osf__
# define DEF_LANG "C"
# endif
# ifdef __hp_osf
# define DEF_LANG "en_US.88591"
# endif
# ifdef sun /* default language under Solaris */
# define DEF_LANG "C"
# endif
@@ -290,10 +281,6 @@ struct dmResources {
"networkDevice","NetworkDevice",DM_STRING, &networkDev,
DEF_NETWORK_DEV,
#endif
#if defined(__osf__)
"ignoreLocales", "IgnoreLocales", DM_STRING, &ignoreLocales,
"",
#endif
};
# define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0])

View File

@@ -1484,7 +1484,7 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp )
* the "setgroups()" call instead...
*/
# if (defined(__hpux) || defined(__osf__))
# if defined(__hpux)
initgroups(user, -1);
# else
setgroups (verify->ngroups, verify->groups);
@@ -2030,9 +2030,6 @@ RunGreeter( struct display *d, struct greet_info *greet,
if((path = getenv("NLSPATH")) != NULL)
env = setEnv(env, "NLSPATH", path);
#ifdef __hp_osf
env = setEnv(env, "NLSPATH", "/usr/lib/nls/msg/%L/%N.cat");
#endif
/*

View File

@@ -65,7 +65,6 @@
**
** __hpux HP-UX OS only
** __apollo Domain OS only
** __hp_osf HP OSF/1 OS only
** sun SUN OS only
** SVR4 SUN OS et al.
** _AIX AIX only
@@ -116,17 +115,10 @@
/*
* Define as generic those without platform specific code.
*/
#if !(defined(__hpux) || \
defined(__apollo) || \
defined(_AIX) || \
defined(sun))
#if !(defined(__hpux) || defined(__apollo) || defined(_AIX) || defined(sun))
#define generic
#endif
#ifdef __osf__
#include <sys/sysinfo.h>
#endif
#if defined(linux)
# include <shadow.h>
#endif

View File

@@ -344,17 +344,12 @@ CleanUpChild( void )
* has also gotten rid of the controlling terminal there is no great
* harm in not making the sub-daemons as leaders.
*/
#ifdef __osf__
setsid();
sigsetmask(0);
#else
#if defined (SYSV) || defined (SVR4) || defined(linux)
setpgrp ();
#else
setpgrp (0, getpid ());
sigsetmask (0);
#endif
#endif /* __osf__ */
#ifdef SIGCHLD
(void) signal (SIGCHLD, SIG_DFL);
#endif
@@ -675,8 +670,7 @@ static int
MatchesFileSuffix(const char *filename, const char *suffix)
{
int retval = 0;
#if defined(_AIX) || defined(SVR4) || defined (__osf__) || defined(linux) || \
defined(CSRG_BASED)
#if defined(_AIX) || defined(SVR4) || defined(linux) || defined(CSRG_BASED)
int different = 1;
/*
@@ -837,119 +831,7 @@ ScanNLSDir(char *dirname)
}
}
#elif defined(__osf__)
#if defined(__osf__obsoleted)
#define LANGUAGE_LIST_CMD "/bin/locale -a"
/*
* Scan for installed locales on DEC platform
*/
{
FILE *f;
char locale[MAXPATHLEN];
if (NULL == (f = popen(LANGUAGE_LIST_CMD, "r")))
return;
while (NULL != fgets(locale, sizeof(locale), f))
{
if (locale[0] != '.' &&
LANGLISTSIZE > (int) (strlen(languageList) + strlen(locale) + 2))
{
int len = strlen(locale);
if ('\n' == locale[len-1])
locale[len-1] = '\0';
strcat(languageList, " ");
strcat(languageList, locale);
}
}
pclose(f);
}
#else
{
#include <fnmatch.h>
char *str, *p;
char **ignore = NULL;
int num_ignore = 0;
int max_ignore = 0;
int listlen = 0;
const char *delim = " \t";
DIR *dirp;
struct dirent *entp;
/*
* Convert the string of locale patterns to an array. It will
* be easier to loop through when we start matching locales.
*/
if (!(str = strdup(ignoreLocales)))
return;
for (p = strtok(str, delim); p; p = strtok(NULL, delim)) {
if (num_ignore >= max_ignore) {
max_ignore += 16;
if (!(ignore = realloc(ignore, max_ignore * sizeof(char *)))) {
free(str);
return;
}
}
ignore[num_ignore++] = p;
}
/*
* Assume that each file of the form ??_??* is a locale. If
* the locale doesn't match any of the ignore patterns, add it
* to the language list with a space separator.
*
* Seed the list with C and POSIX. They're built into libc
* and don't have locale files. Checking ignoreLocales for them
* isn't worth the effort.
*/
strcpy(languageList, "C POSIX");
listlen = strlen(languageList);
if (dirp = opendir(dirname)) {
while (entp = readdir(dirp)) {
int namelen = strlen(entp->d_name);
if (namelen >= 5 && entp->d_name[2] == '_') {
int i, match = 0;
for (i = 0; i < num_ignore; i++) {
if (!fnmatch(ignore[i], entp->d_name, 0)) {
match = 1;
break;
}
}
if (match)
continue;
/* 1 for space-separator, 1 for null-terminator */
if (listlen + 1 + namelen + 1 > LANGLISTSIZE)
break;
languageList[listlen++] = ' ';
strcpy(&languageList[listlen], entp->d_name);
listlen += namelen;
}
}
languageList[listlen++] = '\0';
closedir(dirp);
}
free(ignore);
free(str);
}
#endif /* __osf__obsoleted__ */
#else /* !_AIX && !hpV4 && !__osf__ !sun */
#else /* !_AIX && !hpV4 */
/*
* Scan for installed locales on generic platform
*/

View File

@@ -240,12 +240,6 @@ Verify(
Debug ("System environment:\n");
printEnv (verify->systemEnviron);
Debug ("End of environments\n");
#ifdef __osf__
if (setlogin(greet->name) == -1) {
Debug ("setlogin failed for %s, errno = %d\n", greet->name,
errno);
}
#endif /* __osf__ */
return 1;
}
@@ -615,7 +609,7 @@ getGroups(
* this code...
*/
#if !(defined(__hpux) || defined(__osf__))
#if !(defined(__hpux))
while ( (g = getgrent()) != NULL ) {
/*
* make the list unique

View File

@@ -90,11 +90,7 @@ extern int errno;
#if defined( _SUN_OS )
# define COPYRIGHT "/usr/lib/X11/dt/etc/copyright"
#else
# if defined( __hp_osf )
# define COPYRIGHT "/usr/X11/copyright"
# else
# define COPYRIGHT "/etc/copyright"
# endif
# define COPYRIGHT "/etc/copyright"
#endif
#define NO_LOGIN_FILE "/etc/nologin"

View File

@@ -65,7 +65,6 @@
**
** __hpux HP-UX OS only
** __apollo Domain OS only
** __hp_osf HP OSF/1 OS only
** sun SUN OS only
** SVR4 SUN OS et al.
** _AIX AIX only

View File

@@ -95,11 +95,7 @@
static XtResource logoResources[] = {
{"bitmapFile", "BitmapFile",
XtRString, sizeof(char *), XtOffset(LogoInfoPtr, bitmapFile),
#ifdef __osf__
XtRString, "DECDtlogo" },
#else
XtRString, "Dtlogo" },
#endif
};

View File

@@ -1315,13 +1315,8 @@ MakeDialog( DialogType dtype )
case copyright:
if ((fp = fopen(COPYRIGHT,"r")) == NULL)
#if defined( __hp_osf )
xmstr = XmStringCreate("Cannot open copyright file '/usr/X11/copyright'.",
XmFONTLIST_DEFAULT_TAG);
#else
xmstr = XmStringCreate("Cannot open copyright file '/etc/copyright'.",
XmFONTLIST_DEFAULT_TAG);
#endif
else {
xmstr = (XmString) NULL;