From 19edfab7857c158b0925a373531680be78879a61 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 15 Nov 2016 19:20:13 +0100 Subject: drop platform support: unifdef Lynx. Fixes ArcticaProject/nx-libs#272. --- nx-X11/config/cf/Imake.cf | 28 ---------------------------- nx-X11/config/cf/xorg.cf | 2 +- nx-X11/include/Xarch.h | 16 +--------------- nx-X11/include/Xos.h | 2 +- nx-X11/include/Xos_r.h | 21 +++------------------ nx-X11/lib/X11/ConnDis.c | 4 ---- nx-X11/lib/X11/ImUtil.c | 4 ---- nx-X11/lib/X11/PutImage.c | 4 ---- nx-X11/lib/X11/lcDefConv.c | 2 +- nx-X11/lib/X11/lcGenConv.c | 2 +- nx-X11/programs/Xserver/Imakefile | 5 ++--- nx-X11/programs/Xserver/Xext/shm.c | 5 ----- nx-X11/programs/Xserver/Xext/sync.c | 2 +- nx-X11/programs/Xserver/Xext/xvmc.c | 5 ----- nx-X11/programs/Xserver/include/servermd.h | 5 ----- nx-X11/programs/Xserver/os/access.c | 8 -------- nx-X11/programs/Xserver/os/connection.c | 8 -------- nx-X11/programs/Xserver/os/io.c | 4 ---- nx-X11/programs/Xserver/os/osinit.c | 4 ++-- nx-X11/programs/Xserver/os/utils.c | 6 +----- nx-X11/programs/Xserver/os/xdmcp.c | 4 ---- nx-X11/programs/Xserver/xkb/xkbAccessX.c | 2 +- 22 files changed, 15 insertions(+), 128 deletions(-) diff --git a/nx-X11/config/cf/Imake.cf b/nx-X11/config/cf/Imake.cf index 54c7d0aee..69c3a0670 100644 --- a/nx-X11/config/cf/Imake.cf +++ b/nx-X11/config/cf/Imake.cf @@ -1006,34 +1006,6 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686 # endif #endif /* linux || __GLIBC__ */ -#if (defined(__Lynx__) || defined(Lynx)) && (defined(i386) || defined(__i386__) || defined(__x86__) || defined(__powerpc__) || defined(__sparc__) || defined(sparc)) -# define MacroIncludeFile -# define MacroFile lynx.cf -# define LynxOSArchitecture -# undef __Lynx__ -# undef Lynx -# undef lynx -# if defined(i386) || defined(__i386__) || defined(__x86__) -# define i386Architecture -# undef i386 -# undef __i386__ -# undef __x86__ -# endif -# ifdef __powerpc__ -# define PpcArchitecture -# undef __powerpc__ -# endif -# if defined(sparc) || defined(__sparc__) -# define SparcArchitecture -# undef sparc -# undef __sparc__ -# endif -/* for compatibility with 3.3.x */ -# ifdef PpcArchitecture -# define PowerPCArchitecture -# endif -#endif /* LynxOS AT/PPC/microSPARC */ - #ifdef __uxp__ # define MacroIncludeFile # define MacroFile fujitsu.cf diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf index 63ea21264..fbec1b0d1 100644 --- a/nx-X11/config/cf/xorg.cf +++ b/nx-X11/config/cf/xorg.cf @@ -512,7 +512,7 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 #ifndef BuildScanpci # if SystemV || SystemV4 || \ (defined(LinuxArchitecture) && !defined(Mc68020Architecture)) || \ - defined(i386BsdArchitecture) || defined(LynxOSArchitecture) || \ + defined(i386BsdArchitecture) || \ defined(GNUMachArchitecture) || \ (defined(KFreeBSDArchitecture) && defined(i386Architecture)) # define BuildScanpci YES diff --git a/nx-X11/include/Xarch.h b/nx-X11/include/Xarch.h index 94a673d1f..d68b0493a 100644 --- a/nx-X11/include/Xarch.h +++ b/nx-X11/include/Xarch.h @@ -73,13 +73,6 @@ #if !defined(BYTE_ORDER) && defined(__BYTE_ORDER) #define BYTE_ORDER __BYTE_ORDER #endif -#elif defined(Lynx) -#if 0 -/* LynxOS 2.4.0 has wrong defines in bsd/ip.h */ -#include -#include -#include -#endif #endif #ifndef BYTE_ORDER @@ -98,14 +91,7 @@ #endif #endif -#ifdef Lynx -#if defined(i386) || defined(__i386__) || defined(__x86__) -#define BYTE_ORDER LITTLE_ENDIAN -#else -#define BYTE_ORDER BIG_ENDIAN -#endif -#endif -#if (defined(sun) && defined(SVR4)) && !defined(Lynx) +#if (defined(sun) && defined(SVR4)) #include #ifdef _LITTLE_ENDIAN #define BYTE_ORDER LITTLE_ENDIAN diff --git a/nx-X11/include/Xos.h b/nx-X11/include/Xos.h index 10b3a225f..8a7fface1 100644 --- a/nx-X11/include/Xos.h +++ b/nx-X11/include/Xos.h @@ -219,7 +219,7 @@ struct timeval { (t)->tv_sec = _gtodtmp.time; \ (t)->tv_usec = _gtodtmp.millitm * 1000; \ } -#elif defined(_SEQUENT_) || defined(Lynx) +#elif defined(_SEQUENT_) #include #elif defined (__QNX__) typedef unsigned long fd_mask; diff --git a/nx-X11/include/Xos_r.h b/nx-X11/include/Xos_r.h index bafbefcb3..44a3690ba 100644 --- a/nx-X11/include/Xos_r.h +++ b/nx-X11/include/Xos_r.h @@ -197,14 +197,6 @@ extern void XtProcessUnlock( # undef _POSIX_THREAD_SAFE_FUNCTIONS #endif -/* - * LynxOS 3.1 defines _POSIX_THREAD_SAFE_FUNCTIONS but - * getpwuid_r has different semantics than defined by POSIX - */ -#if defined(Lynx) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) -# undef _POSIX_THREAD_SAFE_FUNCTIONS -#endif - /***** wrappers *****/ @@ -334,18 +326,11 @@ typedef struct { struct passwd pws; char pwbuf[X_LINE_MAX]; } _Xgetpwparams; -# if defined(_POSIX_REENTRANT_FUNCTIONS) || !defined(SVR4) || defined(Lynx) -# ifndef Lynx -# define _XGetpwuid(u,p) \ +# if defined(_POSIX_REENTRANT_FUNCTIONS) || !defined(SVR4) +# define _XGetpwuid(u,p) \ ((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws) -# define _XGetpwnam(u,p) \ +# define _XGetpwnam(u,p) \ ((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws) -# else /* Lynx */ -# define _XGetpwuid(u,p) \ -((getpwuid_r(&(p).pws,(u),(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws) -# define _XGetpwnam(u,p) \ -((getpwnam_r(&(p).pws,(u),(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws) -# endif # else /* SVR4 */ # define _XGetpwuid(u,p) \ ((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == NULL) ? NULL : &(p).pws) diff --git a/nx-X11/lib/X11/ConnDis.c b/nx-X11/lib/X11/ConnDis.c index 660b67645..dfc0227fe 100644 --- a/nx-X11/lib/X11/ConnDis.c +++ b/nx-X11/lib/X11/ConnDis.c @@ -67,12 +67,8 @@ in this Software without prior written authorization from The Open Group. #include #if !defined(WIN32) -#ifndef Lynx #include #else -#include -#endif -#else #include #endif diff --git a/nx-X11/lib/X11/ImUtil.c b/nx-X11/lib/X11/ImUtil.c index b0d421680..79ba80ecc 100644 --- a/nx-X11/lib/X11/ImUtil.c +++ b/nx-X11/lib/X11/ImUtil.c @@ -238,10 +238,6 @@ static void _putbits( * */ -#if defined(Lynx) && defined(ROUNDUP) -#undef ROUNDUP -#endif - #define ROUNDUP(nbytes, pad) ((((nbytes) + ((pad)-1)) / (pad)) * ((pad)>>3)) #define XYNORMALIZE(bp, img) \ diff --git a/nx-X11/lib/X11/PutImage.c b/nx-X11/lib/X11/PutImage.c index de085bcde..daf172cf0 100644 --- a/nx-X11/lib/X11/PutImage.c +++ b/nx-X11/lib/X11/PutImage.c @@ -39,10 +39,6 @@ in this Software without prior written authorization from The Open Group. #define RConst const #endif -#if defined(Lynx) && defined(ROUNDUP) -#undef ROUNDUP -#endif - /* assumes pad is a power of 2 */ #define ROUNDUP(nbytes, pad) (((nbytes) + ((pad) - 1)) & ~(long)((pad) - 1)) diff --git a/nx-X11/lib/X11/lcDefConv.c b/nx-X11/lib/X11/lcDefConv.c index 51ad2f8e7..2096d871b 100644 --- a/nx-X11/lib/X11/lcDefConv.c +++ b/nx-X11/lib/X11/lcDefConv.c @@ -44,7 +44,7 @@ #define MB_LEN_MAX 6 #endif -#if !defined(Lynx_22) && !defined(X_LOCALE) +#if !defined(X_LOCALE) #define STDCVT #endif diff --git a/nx-X11/lib/X11/lcGenConv.c b/nx-X11/lib/X11/lcGenConv.c index eede76807..799f49a30 100644 --- a/nx-X11/lib/X11/lcGenConv.c +++ b/nx-X11/lib/X11/lcGenConv.c @@ -53,7 +53,7 @@ #include "XlcGeneric.h" #include -#if !defined(Lynx_22) && !defined(X_LOCALE) +#if !defined(X_LOCALE) #define STDCVT #endif diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 9a7462c7a..d13b6b79d 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -248,8 +248,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ hw/nxagent/NXmiexpose.o \ hw/nxagent/NXresource.o \ hw/nxagent/NXdamage.o -#elif !defined(LynxOSArchitecture) && \ - !defined(Win32Architecture) && \ +#elif !defined(Win32Architecture) && \ !defined(QNX4Architecture) NXAGENTOBJS = hw/nxagent/miinitext.o \ hw/nxagent/NXwindow.o \ @@ -516,7 +515,7 @@ ServerTarget(NXWin,$(NXWINDIRS),$(NXWINOBJS), \ MIEXTDIRS = $(SHADOWDIR) $(LAYERDIR) $(ROOTLESSDIR) $(MIDAMAGEDIR) IPLANDIRS = $(IPLAN2P2DIR) $(IPLAN2P4DIR) $(IPLAN2P8DIR) -DDXDIRS = $(DECWSDDXDIR) $(SUNDDXDIR) $(LYNXDDXDIR) \ +DDXDIRS = $(DECWSDDXDIR) $(SUNDDXDIR) \ $(HPDDXDIR) $(XFREE86DDXDIR) \ $(NXAGENTDDXDIR) $(NXWINDDXDIR) SUBDIRS = $(STDDIRS) \ diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index c70f52b6a..dc8bbf97b 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -34,13 +34,8 @@ in this Software without prior written authorization from The Open Group. #endif #include -#ifndef Lynx #include #include -#else -#include -#include -#endif #include #include #include diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index 4f24d5b54..e1580b3a3 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -71,7 +71,7 @@ PERFORMANCE OF THIS SOFTWARE. #include "protocol-versions.h" #include -#if !defined(WIN32) && !defined(Lynx) +#if !defined(WIN32) #include #endif diff --git a/nx-X11/programs/Xserver/Xext/xvmc.c b/nx-X11/programs/Xserver/Xext/xvmc.c index 710101d07..0a43baa22 100644 --- a/nx-X11/programs/Xserver/Xext/xvmc.c +++ b/nx-X11/programs/Xserver/Xext/xvmc.c @@ -22,14 +22,9 @@ #include "xvmcext.h" #ifdef HAS_XVMCSHM -#ifndef Lynx #include #include #include -#else -#include -#include -#endif /* Lynx */ #endif /* HAS_XVMCSHM */ diff --git a/nx-X11/programs/Xserver/include/servermd.h b/nx-X11/programs/Xserver/include/servermd.h index 76f28e9ed..4f2dc27f8 100644 --- a/nx-X11/programs/Xserver/include/servermd.h +++ b/nx-X11/programs/Xserver/include/servermd.h @@ -128,11 +128,6 @@ SOFTWARE. #define BITMAP_BIT_ORDER MSBFirst #define GLYPHPADBYTES 4 -/* XXX Should this be for Lynx only? */ -#ifdef Lynx -#define BITMAP_SCANLINE_UNIT 8 -#endif - #endif /* PowerPC */ #if defined(__sh__) diff --git a/nx-X11/programs/Xserver/os/access.c b/nx-X11/programs/Xserver/os/access.c index c775952e2..286e978ba 100644 --- a/nx-X11/programs/Xserver/os/access.c +++ b/nx-X11/programs/Xserver/os/access.c @@ -76,11 +76,7 @@ SOFTWARE. #include #include #ifndef WIN32 -#ifndef Lynx #include -#else -#include -#endif #include #include @@ -173,11 +169,7 @@ SOFTWARE. #endif /* WIN32 */ #ifndef PATH_MAX -#ifndef Lynx #include -#else -#include -#endif #ifndef PATH_MAX #ifdef MAXPATHLEN #define PATH_MAX MAXPATHLEN diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c index e38e94c67..41234e231 100644 --- a/nx-X11/programs/Xserver/os/connection.c +++ b/nx-X11/programs/Xserver/os/connection.c @@ -80,11 +80,7 @@ SOFTWARE. #include #ifndef WIN32 -#if defined(Lynx) -#include -#else #include -#endif #ifdef hpux #include @@ -125,11 +121,7 @@ SOFTWARE. # include #endif -#ifndef Lynx #include -#else -#include -#endif #endif /* WIN32 */ #include "misc.h" #include "osdep.h" diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c index 8439a3edd..3771d40fb 100644 --- a/nx-X11/programs/Xserver/os/io.c +++ b/nx-X11/programs/Xserver/os/io.c @@ -71,11 +71,7 @@ SOFTWARE. #include #include #if !defined(WIN32) -#ifndef Lynx #include -#else -#include -#endif #endif #include #include diff --git a/nx-X11/programs/Xserver/os/osinit.c b/nx-X11/programs/Xserver/os/osinit.c index 81429a462..025fd104c 100644 --- a/nx-X11/programs/Xserver/os/osinit.c +++ b/nx-X11/programs/Xserver/os/osinit.c @@ -67,11 +67,11 @@ SOFTWARE. #endif #endif -#if defined(Lynx) || defined(__SCO__) +#if defined(__SCO__) #include #endif -#if !defined(SYSV) && !defined(WIN32) && !defined(Lynx) && !defined(QNX4) +#if !defined(SYSV) && !defined(WIN32) && !defined(QNX4) #include #endif diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index fca5ae2fd..5070eea8d 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -113,7 +113,7 @@ OR PERFORMANCE OF THIS SOFTWARE. #ifndef WIN32 #include #endif -#if !defined(SYSV) && !defined(WIN32) && !defined(Lynx) && !defined(QNX4) +#if !defined(SYSV) && !defined(WIN32) && !defined(QNX4) #include #endif #include @@ -329,11 +329,7 @@ OsSignal(sig, handler) #endif #ifndef PATH_MAX -#ifndef Lynx #include -#else -#include -#endif #ifndef PATH_MAX #ifdef MAXPATHLEN #define PATH_MAX MAXPATHLEN diff --git a/nx-X11/programs/Xserver/os/xdmcp.c b/nx-X11/programs/Xserver/os/xdmcp.c index 5daf1cbbf..31f013296 100644 --- a/nx-X11/programs/Xserver/os/xdmcp.c +++ b/nx-X11/programs/Xserver/os/xdmcp.c @@ -28,12 +28,8 @@ #include #if !defined(WIN32) -#ifndef Lynx #include #include -#else -#include -#endif #include #include #endif diff --git a/nx-X11/programs/Xserver/xkb/xkbAccessX.c b/nx-X11/programs/Xserver/xkb/xkbAccessX.c index 307673db7..27e56c05a 100644 --- a/nx-X11/programs/Xserver/xkb/xkbAccessX.c +++ b/nx-X11/programs/Xserver/xkb/xkbAccessX.c @@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "inputstr.h" #include -#if !defined(WIN32) && !defined(Lynx) +#if !defined(WIN32) #include #endif -- cgit v1.2.3