Commit a9c30796 authored by Mike Gabriel's avatar Mike Gabriel

drop platform support: unifdef __osf__.

Fixes ArcticaProject/nx-libs#288.
parent 4b178918
...@@ -703,22 +703,6 @@ ...@@ -703,22 +703,6 @@
# define ConvexArchitecture # define ConvexArchitecture
#endif /* _convex_ */ #endif /* _convex_ */
#ifdef __osf__
# define MacroIncludeFile <osf1.cf>
# define MacroFile osf1.cf
# define OSF1Architecture
# undef __osf__
# ifdef __mips__
# undef __mips__
# define MipsArchitecture
# define MipselArchitecture
# endif
# ifdef __alpha
# undef __alpha
# define AlphaArchitecture
# endif
#endif /* __osf__ */
#ifdef Oki #ifdef Oki
# define MacroIncludeFile <Oki.cf> # define MacroIncludeFile <Oki.cf>
# define MacroFile Oki.cf # define MacroFile Oki.cf
......
...@@ -1516,21 +1516,21 @@ TCLIBDIR = TclLibDir ...@@ -1516,21 +1516,21 @@ TCLIBDIR = TclLibDir
#define LibManSuffix 3 /* use just one tab or cpp will die */ #define LibManSuffix 3 /* use just one tab or cpp will die */
#endif #endif
#ifndef FileManSuffix #ifndef FileManSuffix
#if SystemV || SystemV4 || defined(OSF1Architecture) #if SystemV || SystemV4
#define FileManSuffix 4 /* use just one tab or cpp will die */ #define FileManSuffix 4 /* use just one tab or cpp will die */
#else #else
#define FileManSuffix 5 /* use just one tab or cpp will die */ #define FileManSuffix 5 /* use just one tab or cpp will die */
#endif #endif
#endif #endif
#ifndef MiscManSuffix #ifndef MiscManSuffix
#if SystemV || SystemV4 || defined(OSF1Architecture) #if SystemV || SystemV4
#define MiscManSuffix 5 /* use just one tab or cpp will die */ #define MiscManSuffix 5 /* use just one tab or cpp will die */
#else #else
#define MiscManSuffix 7 /* use just one tab or cpp will die */ #define MiscManSuffix 7 /* use just one tab or cpp will die */
#endif #endif
#endif #endif
#ifndef DriverManSuffix #ifndef DriverManSuffix
#if SystemV || SystemV4 || defined(OSF1Architecture) #if SystemV || SystemV4
#define DriverManSuffix 7 /* use just one tab or cpp will die */ #define DriverManSuffix 7 /* use just one tab or cpp will die */
#else #else
#define DriverManSuffix 4 /* use just one tab or cpp will die */ #define DriverManSuffix 4 /* use just one tab or cpp will die */
......
...@@ -37,9 +37,8 @@ in this Software without prior written authorization from The Open Group. ...@@ -37,9 +37,8 @@ in this Software without prior written authorization from The Open Group.
* *
* If you are on a platform that defines XTHREADS but does not have * If you are on a platform that defines XTHREADS but does not have
* MT-safe system API (e.g. UnixWare) you must define _Xos_processLock * MT-safe system API (e.g. UnixWare) you must define _Xos_processLock
* and _Xos_processUnlock macros before including this header. If * and _Xos_processUnlock macros before including this header.
* you are on OSF/1 V3.2 and plan to use readdir(), you must also define * For convenience XOS_USE_XLIB_LOCKING or
* _Xos_isThreadsInitialized. For convenience XOS_USE_XLIB_LOCKING or
* XOS_USE_XT_LOCKING may be defined to obtain either Xlib-only or * XOS_USE_XT_LOCKING may be defined to obtain either Xlib-only or
* Xt-based versions of these macros. These macros won't result in * Xt-based versions of these macros. These macros won't result in
* truly thread-safe calls, but they are better than nothing. If you * truly thread-safe calls, but they are better than nothing. If you
...@@ -320,7 +319,7 @@ static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) ...@@ -320,7 +319,7 @@ static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p)
(p).pwp ) (p).pwp )
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__) && !defined(__DARWIN__) #elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__) && !defined(__DARWIN__)
/* SVR4 threads and OSF/1 3.2 and earlier pthreads */ /* SVR4 threads */
# define X_NEEDS_PWPARAMS # define X_NEEDS_PWPARAMS
typedef struct { typedef struct {
struct passwd pws; struct passwd pws;
...@@ -340,11 +339,6 @@ typedef struct { ...@@ -340,11 +339,6 @@ typedef struct {
#else /* _POSIX_THREAD_SAFE_FUNCTIONS */ #else /* _POSIX_THREAD_SAFE_FUNCTIONS */
/* Digital UNIX 4.0, but not (beta) T4.0-1 */ /* Digital UNIX 4.0, but not (beta) T4.0-1 */
# if defined(__osf__)
/* OSF/1 V4.0 <pwd.h> doesn't declare the _P routines, breaking under C++. */
extern int _Pgetpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);
extern int _Pgetpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **);
# endif
# define X_NEEDS_PWPARAMS # define X_NEEDS_PWPARAMS
typedef struct { typedef struct {
struct passwd pws; struct passwd pws;
...@@ -467,9 +461,7 @@ typedef struct { ...@@ -467,9 +461,7 @@ typedef struct {
*/ */
# ifdef _POSIX_REENTRANT_FUNCTIONS # ifdef _POSIX_REENTRANT_FUNCTIONS
# ifndef _POSIX_THREAD_SAFE_FUNCTIONS # ifndef _POSIX_THREAD_SAFE_FUNCTIONS
# if defined(__osf__) # define X_POSIX_THREAD_SAFE_FUNCTIONS 1
# define X_POSIX_THREAD_SAFE_FUNCTIONS 1
# endif
# endif # endif
# endif # endif
# ifdef _POSIX_THREAD_SAFE_FUNCTIONS # ifdef _POSIX_THREAD_SAFE_FUNCTIONS
...@@ -607,28 +599,8 @@ typedef struct { ...@@ -607,28 +599,8 @@ typedef struct {
# if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || \ # if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || \
defined(__APPLE__) || defined(__DARWIN__) defined(__APPLE__) || defined(__DARWIN__)
/* POSIX final API, returns (int)0 on success. */ /* POSIX final API, returns (int)0 on success. */
# if defined(__osf__)
/* OSF/1 V4.0 <dirent.h> doesn't declare _Preaddir_r, breaking under C++. */
extern int _Preaddir_r(DIR *, struct dirent *, struct dirent **);
# endif
# define _XReaddir(d,p) \ # define _XReaddir(d,p) \
(readdir_r((d), &((p).dir_entry), &((p).result)) ? NULL : (p).result) (readdir_r((d), &((p).dir_entry), &((p).result)) ? NULL : (p).result)
# elif defined(_POSIX_REENTRANT_FUNCTIONS) && defined(__osf__)
/*
* OSF/1 V3.2 readdir_r() will SEGV if the main program is not
* explicitly linked with -lc_r. The library REQUIREDLIBS don't help.
* Assume that if threads have been initialized we're linked properly.
*/
# define _XReaddir(d,p) \
( (_Xos_isThreadInitialized) ? \
(readdir_r((d), &((p).dir_entry)) ? NULL : &((p).dir_entry)) : \
((_Xos_processLock), \
(((p).result = readdir((d))) ? \
(memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \
((p).result = &(p).dir_entry), 0) : \
0), \
(_Xos_processUnlock), \
(p).result) )
# elif defined(_POSIX_REENTRANT_FUNCTIONS) # elif defined(_POSIX_REENTRANT_FUNCTIONS)
/* POSIX draft API, returns (int)0 on success. */ /* POSIX draft API, returns (int)0 on success. */
# define _XReaddir(d,p) \ # define _XReaddir(d,p) \
...@@ -926,28 +898,6 @@ typedef struct { ...@@ -926,28 +898,6 @@ typedef struct {
(_Xos_processUnlock), \ (_Xos_processUnlock), \
(p).result ) (p).result )
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && (defined(__osf__)
/* Returns (int)0 on success. OSF/1 v3.2
*
* extern int asctime_r(const struct tm *timeptr, char *buffer, int buflen);
* extern int ctime_r(const time_t *timer, char *buffer, int buflen);
* extern int gmtime_r(const time_t *timer, struct tm *result);
* extern int localtime_r(const time_t *timer, struct tm *result);
*/
# ifdef TIMELEN
typedef char _Xatimeparams[TIMELEN];
typedef char _Xctimeparams[TIMELEN];
# else
typedef char _Xatimeparams[26];
typedef char _Xctimeparams[26];
# endif
typedef struct tm _Xgtimeparams;
typedef struct tm _Xltimeparams;
# define _XAsctime(t,p) (asctime_r((t),(p),sizeof((p))) ? NULL : (p))
# define _XCtime(t,p) (ctime_r((t),(p),sizeof((p))) ? NULL : (p))
# define _XGmtime(t,p) (gmtime_r((t),&(p)) ? NULL : &(p))
# define _XLocaltime(t,p) (localtime_r((t),&(p)) ? NULL : &(p))
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(sun) #elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(sun)
/* Returns NULL on failure. Solaris 2.5 /* Returns NULL on failure. Solaris 2.5
* *
...@@ -978,12 +928,6 @@ typedef struct tm _Xltimeparams; ...@@ -978,12 +928,6 @@ typedef struct tm _Xltimeparams;
* extern struct tm *gmtime_r(const time_t *timer, struct tm *result); * extern struct tm *gmtime_r(const time_t *timer, struct tm *result);
* extern struct tm *localtime_r(const time_t *timer, struct tm *result); * extern struct tm *localtime_r(const time_t *timer, struct tm *result);
*/ */
# if defined(__osf__)
/* OSF/1 V4.0 <time.h> doesn't declare the _P routines, breaking under C++. */
extern char *_Pasctime_r(const struct tm *, char *);
extern char *_Pctime_r(const time_t *, char *);
extern struct tm *_Plocaltime_r(const time_t *, struct tm *);
# endif
# ifdef TIMELEN # ifdef TIMELEN
typedef char _Xatimeparams[TIMELEN]; typedef char _Xatimeparams[TIMELEN];
typedef char _Xctimeparams[TIMELEN]; typedef char _Xctimeparams[TIMELEN];
...@@ -1078,7 +1022,7 @@ typedef struct { ...@@ -1078,7 +1022,7 @@ typedef struct {
(_Xos_processUnlock), \ (_Xos_processUnlock), \
(p).pgrp ) (p).pgrp )
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && (defined(sun) || defined(__osf__)) #elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(sun)
/* Non-POSIX API. Solaris, DEC v3.2. /* Non-POSIX API. Solaris, DEC v3.2.
* *
* extern struct group *getgrgid_r(gid_t, struct group *, char *, int); * extern struct group *getgrgid_r(gid_t, struct group *, char *, int);
...@@ -1112,11 +1056,6 @@ typedef struct { ...@@ -1112,11 +1056,6 @@ typedef struct {
* int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); * int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
* int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); * int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
*/ */
# if defined(__osf__)
/* OSF/1 V4.0 <grp.h> doesn't declare the _P routines, breaking under C++. */
extern int _Pgetgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
extern int _Pgetgrnam_r(const char *, struct group *, char *, size_t, struct group **);
# endif
typedef struct { typedef struct {
struct group grp; struct group grp;
char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */ char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */
......
...@@ -102,7 +102,7 @@ _XlcMapOSLocaleName( ...@@ -102,7 +102,7 @@ _XlcMapOSLocaleName(
/* FIXME: correct indentation levels after ancient platform clean-up */ /* FIXME: correct indentation levels after ancient platform clean-up */
#if defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(ultrix) || defined(WIN32) || defined(linux) #if defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(ultrix) || defined(WIN32) || defined(linux)
# ifdef ultrix # ifdef ultrix
# define SKIPCOUNT 2 # define SKIPCOUNT 2
# define STARTCHAR '\001' # define STARTCHAR '\001'
...@@ -114,10 +114,6 @@ _XlcMapOSLocaleName( ...@@ -114,10 +114,6 @@ _XlcMapOSLocaleName(
# define ENDCHAR ';' # define ENDCHAR ';'
# define WHITEFILL # define WHITEFILL
# else # else
# if defined(__osf__)
# define STARTCHAR ' '
# define ENDCHAR ' '
# else
# if defined(linux) # if defined(linux)
# define STARTSTR "LC_CTYPE=" # define STARTSTR "LC_CTYPE="
# define ENDCHAR ';' # define ENDCHAR ';'
...@@ -127,7 +123,6 @@ _XlcMapOSLocaleName( ...@@ -127,7 +123,6 @@ _XlcMapOSLocaleName(
# define ENDCHAR '/' # define ENDCHAR '/'
# endif # endif
# endif # endif
# endif
# endif # endif
# endif # endif
......
...@@ -136,7 +136,7 @@ from the copyright holders. ...@@ -136,7 +136,7 @@ from the copyright holders.
#ifndef NO_TCP_H #ifndef NO_TCP_H
#if defined(linux) || defined(__GLIBC__) #if defined(linux) || defined(__GLIBC__)
#include <sys/param.h> #include <sys/param.h>
#endif /* osf */ #endif /* linux || __GLIBC__ */
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
#include <sys/param.h> #include <sys/param.h>
#include <machine/endian.h> #include <machine/endian.h>
......
...@@ -38,12 +38,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -38,12 +38,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbsrv.h> #include <xkbsrv.h>
#include <nx-X11/extensions/XI.h> #include <nx-X11/extensions/XI.h>
#if (defined(__osf__) && defined(__alpha))
#include <sys/sysinfo.h>
#include <alpha/hal_sysinfo.h>
#include <alpha/prom.h>
#endif
/*#define FALLING_TONE 1*/ /*#define FALLING_TONE 1*/
/*#define RISING_TONE 1*/ /*#define RISING_TONE 1*/
#define FALLING_TONE 10 #define FALLING_TONE 10
...@@ -115,32 +109,9 @@ _XkbDDXBeepInitAtoms(void) ...@@ -115,32 +109,9 @@ _XkbDDXBeepInitAtoms(void)
stickyLock= MAKE_ATOM(STICKY_LOCK); stickyLock= MAKE_ATOM(STICKY_LOCK);
stickyUnlock= MAKE_ATOM(STICKY_UNLOCK); stickyUnlock= MAKE_ATOM(STICKY_UNLOCK);
bounceReject= MAKE_ATOM(BOUNCE_REJECT); bounceReject= MAKE_ATOM(BOUNCE_REJECT);
#if (defined(__osf__) && defined(__alpha))
/* [[[ WDW - Some bells do not allow for pitch changes.
* Maybe this could become part of the keymap? ]]]
*/
{
char keyboard[8];
/* Find the class of keyboard being used.
*/
keyboard[0] = '\0';
if (-1 == getsysinfo(GSI_KEYBOARD,
keyboard, sizeof(keyboard),
0, NULL))
keyboard[0] = '\0';
if ((strcmp(keyboard,"LK201") == 0) ||
(strcmp(keyboard,"LK401") == 0) ||
(strcmp(keyboard,"LK421") == 0) ||
(strcmp(keyboard,"LK443") == 0))
doesPitch = 0;
}
#else
#if defined(sun) #if defined(sun)
doesPitch = 0; doesPitch = 0;
#endif #endif
#endif
return; return;
} }
......
...@@ -53,7 +53,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -53,7 +53,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <nx-X11/extensions/XI.h> #include <nx-X11/extensions/XI.h>
#include "xkb.h" #include "xkb.h"
#if defined(CSRG_BASED) || defined(linux) || defined(__sgi) || defined(__osf__) || defined(__GNU__) #if defined(CSRG_BASED) || defined(linux) || defined(__sgi) || defined(__GNU__)
#include <paths.h> #include <paths.h>
#endif #endif
......
...@@ -61,7 +61,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -61,7 +61,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define PHYS_LEDS 0x7f #define PHYS_LEDS 0x7f
#define LED_COMPOSE 8 #define LED_COMPOSE 8
#else #else
#if defined(ultrix) || defined(__osf__) || defined(__alpha) || defined(__alpha__) #if defined(ultrix) || defined(__alpha) || defined(__alpha__)
#define LED_COMPOSE 2 #define LED_COMPOSE 2
#define LED_CAPS 3 #define LED_CAPS 3
#define LED_SCROLL 4 #define LED_SCROLL 4
......
...@@ -51,12 +51,8 @@ int XkbDisableLockActions = 0; ...@@ -51,12 +51,8 @@ int XkbDisableLockActions = 0;
/***====================================================================***/ /***====================================================================***/
#ifndef RETURN_SHOULD_REPEAT #ifndef RETURN_SHOULD_REPEAT
#if (defined(__osf__) && defined(__alpha))
#define RETURN_SHOULD_REPEAT 1
#else
#define RETURN_SHOULD_REPEAT 0 #define RETURN_SHOULD_REPEAT 0
#endif #endif
#endif
/***====================================================================***/ /***====================================================================***/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment