mirror of
https://gitlab.freedesktop.org/xorg/proto/xorgproto.git
synced 2025-12-20 04:40:10 +01:00
Drop support for SunOS 4 and Solaris releases older than 2.5 (1995)
Includes changing remaining sun ifdef's to check for standard-conformant / non-namespace-polluting #ifdef __sun instead of older #ifdef sun. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
This commit is contained in:
parent
5bad478221
commit
5aaec3c7a5
8 changed files with 19 additions and 61 deletions
|
|
@ -88,7 +88,7 @@ from The Open Group.
|
|||
* Test is easy, the new one is named __builtin_alloca and comes
|
||||
* from alloca.h which #defines alloca.
|
||||
*/
|
||||
# if defined(sun) || defined(alloca)
|
||||
# if defined(__sun) || defined(alloca)
|
||||
/*
|
||||
* Some System V boxes extract alloca.o from /lib/libPW.a; if you
|
||||
* decide that you don't want to use alloca, you might want to fix it here.
|
||||
|
|
|
|||
8
Xarch.h
8
Xarch.h
|
|
@ -39,10 +39,8 @@
|
|||
|
||||
# else
|
||||
|
||||
# ifdef SVR4
|
||||
# if !defined(sun)
|
||||
# include <sys/byteorder.h>
|
||||
# endif
|
||||
# if defined(SVR4) || defined(__SVR4)
|
||||
# include <sys/byteorder.h>
|
||||
# elif defined(CSRG_BASED)
|
||||
# if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# include <sys/types.h>
|
||||
|
|
@ -75,7 +73,7 @@
|
|||
# define LITTLE_ENDIAN 1234
|
||||
# define BIG_ENDIAN 4321
|
||||
|
||||
# if defined(sun) && defined(SVR4)
|
||||
# if defined(__sun) && defined(__SVR4)
|
||||
# include <sys/isa_defs.h>
|
||||
# ifdef _LITTLE_ENDIAN
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
|
|
|
|||
37
Xfuncs.h
37
Xfuncs.h
|
|
@ -37,53 +37,28 @@ void bcopy();
|
|||
void bzero();
|
||||
int bcmp();
|
||||
# else
|
||||
# if defined(SYSV) && !defined(__SCO__) && !defined(sun) && !defined(__UNIXWARE__)
|
||||
# if defined(SYSV) && !defined(__SCO__) && !defined(__sun) && !defined(__UNIXWARE__)
|
||||
# include <memory.h>
|
||||
void bcopy();
|
||||
# define bzero(b,len) memset(b, 0, len)
|
||||
# define bcmp(b1,b2,len) memcmp(b1, b2, len)
|
||||
# else
|
||||
# include <string.h>
|
||||
# if defined(__SCO__) || defined(sun) || defined(__UNIXWARE__)
|
||||
# if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__)
|
||||
# include <strings.h>
|
||||
# endif
|
||||
# define _XFUNCS_H_INCLUDED_STRING_H
|
||||
# if defined(sun)
|
||||
# define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
|
||||
# define bzero(b,len) memset(b, 0, (size_t)(len))
|
||||
# define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
|
||||
# endif
|
||||
# endif
|
||||
# endif /* X_USEBFUNCS */
|
||||
|
||||
/* the new Xfuncs.h */
|
||||
|
||||
# if (!defined(sun) || defined(SVR4))
|
||||
/* the ANSI C way */
|
||||
# ifndef _XFUNCS_H_INCLUDED_STRING_H
|
||||
# include <string.h>
|
||||
# endif
|
||||
# undef bzero
|
||||
# define bzero(b,len) memset(b,0,len)
|
||||
# else
|
||||
# if defined(SYSV) || defined(sun)
|
||||
# include <memory.h>
|
||||
# define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
|
||||
# if defined(SYSV) && defined(_XBCOPYFUNC)
|
||||
# undef memmove
|
||||
# define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len))
|
||||
# define _XNEEDBCOPYFUNC
|
||||
# endif
|
||||
# else /* else vanilla BSD */
|
||||
# define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
|
||||
# define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
|
||||
# define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len))
|
||||
# endif /* SYSV else */
|
||||
# endif
|
||||
|
||||
# if (defined(sun) && !defined(SVR4))
|
||||
# define atexit(f) on_exit(f, 0)
|
||||
# ifndef _XFUNCS_H_INCLUDED_STRING_H
|
||||
# include <string.h>
|
||||
# endif
|
||||
# undef bzero
|
||||
# define bzero(b,len) memset(b,0,len)
|
||||
|
||||
# if defined WIN32 && defined __MINGW32__
|
||||
# define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
|
||||
|
|
|
|||
2
Xmd.h
2
Xmd.h
|
|
@ -53,7 +53,7 @@ SOFTWARE.
|
|||
/*
|
||||
* Special per-machine configuration flags.
|
||||
*/
|
||||
# if defined(sun) && defined(__SVR4)
|
||||
# if defined(__sun) && defined(__SVR4)
|
||||
# include <sys/isa_defs.h> /* Solaris: defines _LP64 if necessary */
|
||||
# endif
|
||||
|
||||
|
|
|
|||
19
Xos.h
19
Xos.h
|
|
@ -67,12 +67,9 @@ in this Software without prior written authorization from The Open Group.
|
|||
*/
|
||||
|
||||
# include <string.h>
|
||||
# if defined(__SCO__) || defined(__UNIXWARE__)
|
||||
# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun)
|
||||
# include <strings.h>
|
||||
# else
|
||||
# if (defined(sun) && defined(__SVR4))
|
||||
# include <strings.h>
|
||||
# endif
|
||||
# ifndef index
|
||||
# define index(s,c) (strchr((s),(c)))
|
||||
# endif
|
||||
|
|
@ -81,18 +78,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
# endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* strerror()
|
||||
*/
|
||||
# if (defined(sun) && !defined(SVR4)) && !defined(__GLIBC__)
|
||||
# ifndef strerror
|
||||
extern char *sys_errlist[];
|
||||
extern int sys_nerr;
|
||||
# define strerror(n) \
|
||||
(((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error")
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Get open(2) constants
|
||||
*/
|
||||
|
|
@ -170,7 +155,7 @@ struct timeval {
|
|||
# if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */
|
||||
# define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
|
||||
# else
|
||||
# if defined(SVR4) || defined(WIN32)
|
||||
# if defined(SVR4) || defined(__SVR4) || defined(WIN32)
|
||||
# define X_GETTIMEOFDAY(t) gettimeofday(t)
|
||||
# else
|
||||
# define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
|
||||
|
|
|
|||
6
Xos_r.h
6
Xos_r.h
|
|
@ -192,7 +192,7 @@ extern void XtProcessUnlock(
|
|||
* uses the older SVR4 thread-safe functions unless the POSIX ones
|
||||
* are specifically requested. Fix the feature test macro.
|
||||
*/
|
||||
#if defined(sun) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && \
|
||||
#if defined(__sun) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && \
|
||||
(_POSIX_C_SOURCE - 0 < 199506L) && !defined(_POSIX_PTHREAD_SEMANTICS)
|
||||
# undef _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
#endif
|
||||
|
|
@ -915,7 +915,7 @@ typedef struct tm _Xltimeparams;
|
|||
# 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
|
||||
*
|
||||
* extern char *asctime_r(const struct tm *tm,char *buf, int buflen);
|
||||
|
|
@ -1038,7 +1038,7 @@ typedef struct {
|
|||
(_Xos_processUnlock), \
|
||||
(p).pgrp )
|
||||
|
||||
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(sun)
|
||||
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(__sun)
|
||||
/* Non-POSIX API. Solaris.
|
||||
*
|
||||
* extern struct group *getgrgid_r(gid_t, struct group *, char *, int);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
# ifdef __i386__
|
||||
# ifdef SYSV
|
||||
# if !defined(__SCO__) && \
|
||||
!defined(__UNIXWARE__) && !defined(sun)
|
||||
!defined(__UNIXWARE__) && !defined(__sun)
|
||||
# if !defined(_POSIX_SOURCE)
|
||||
# define X_NOT_POSIX
|
||||
# endif
|
||||
|
|
@ -51,7 +51,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef sun
|
||||
# ifdef __sun
|
||||
/* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4
|
||||
* This check allows non-Imake configured programs to build correctly.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ extern xthread_t (*_x11_thr_self)();
|
|||
# define xthread_yield() thr_yield()
|
||||
# define xthread_exit(v) thr_exit(v)
|
||||
# define xthread_key_create(kp,d) thr_keycreate(kp,d)
|
||||
# ifdef sun
|
||||
# ifdef __sun
|
||||
# define xthread_key_delete(k) 0
|
||||
# else
|
||||
# define xthread_key_delete(k) thr_keydelete(k)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue