From 67b353c9ce039b254ba2e92cd6f842c505a8bd21 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 24 Sep 2009 10:49:08 +0000 Subject: Update following packages: - xproto-7.0.16 - libXdmcp-1.0.3 - bdftopcf-1.0.2 - xorg-server-1.6.99.902 --- X11/Xos.h | 280 +++++++++++++++----------------------------------------------- 1 file changed, 66 insertions(+), 214 deletions(-) (limited to 'X11/Xos.h') diff --git a/X11/Xos.h b/X11/Xos.h index 67bf67924..646716b4f 100644 --- a/X11/Xos.h +++ b/X11/Xos.h @@ -1,8 +1,5 @@ /* - * $XdotOrg: proto/X11/Xos.h,v 1.8 2005/11/08 06:33:25 jkj Exp $ - * $Xorg: Xos.h,v 1.6 2001/02/09 02:03:22 xorgcvs Exp $ - * - * + * Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its @@ -28,53 +25,26 @@ in this Software without prior written authorization from The Open Group. * The X Window System is a Trademark of The Open Group. * */ -/* $XFree86: xc/include/Xos.h,v 3.41tsi Exp $ */ /* This is a collection of things to try and minimize system dependencies * in a "significant" number of source files. */ #ifndef _XOS_H_ -#define _XOS_H_ +# define _XOS_H_ -#include +# include /* * Get major data types (esp. caddr_t) */ -#ifdef USG -#ifndef __TYPES__ -#ifdef CRAY -#define word word_t -#endif /* CRAY */ -#include /* forgot to protect it... */ -#define __TYPES__ -#endif /* __TYPES__ */ -#else /* USG */ -#if defined(_POSIX_SOURCE) && defined(MOTOROLA) -#undef _POSIX_SOURCE -#include -#define _POSIX_SOURCE -#else # include -#endif -#endif /* USG */ -#ifndef sgi -#if defined(__SCO__) || defined(__UNIXWARE__) -#include -#endif -#endif +# if defined(__SCO__) || defined(__UNIXWARE__) +# include +# endif -#ifdef _SEQUENT_ -/* - * in_systm.h compatibility between SysV and BSD types u_char u_short u_long - * select.h for typedef of args to select, fd_set, may use SVR4 later - */ -#include -#include -#endif /* _SEQUENT_ */ /* * Just about everyone needs the strings routines. We provide both forms here, @@ -89,208 +59,90 @@ in this Software without prior written authorization from The Open Group. * which can be really inconvenient. :-( */ -#ifndef X_NOT_STDC_ENV - -#include -#if defined(__SCO__) || defined(__UNIXWARE__) -#include -#else -#if (defined(sun) && defined(__SVR4)) -#include -#endif -#ifdef __STDC__ -#ifndef index -#define index(s,c) (strchr((s),(c))) -#endif -#ifndef rindex -#define rindex(s,c) (strrchr((s),(c))) -#endif -#else -#ifndef index -#define index strchr -#endif -#ifndef rindex -#define rindex strrchr -#endif -#endif -#endif - -#else - -#ifdef SYSV -#if defined(clipper) || defined(__clipper__) -#include -#endif -#include -#define index strchr -#define rindex strrchr -#else -#include -#define strchr index -#define strrchr rindex -#endif - -#endif /* X_NOT_STDC_ENV */ - -/* - * strerror() - */ -#if (defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4)) || defined(macII)) && !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 +# include +# if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) +# include +# else +# ifndef index +# define index(s,c) (strchr((s),(c))) +# endif +# ifndef rindex +# define rindex(s,c) (strrchr((s),(c))) +# endif +# endif /* * Get open(2) constants */ -#if defined(X_NOT_POSIX) -#include -#if defined(USL) || defined(CRAY) || defined(MOTOROLA) || (defined(__i386__) && (defined(SYSV) || defined(SVR4))) || defined(__sxg__) -#include -#endif -#ifdef WIN32 -#include -#else -#include -#endif -#else /* X_NOT_POSIX */ -#if !defined(_POSIX_SOURCE) && defined(macII) -#define _POSIX_SOURCE -#include -#include -#undef _POSIX_SOURCE -#else -#include -#include -#endif -#endif /* X_NOT_POSIX else */ +# if defined(X_NOT_POSIX) +# include +# if defined(USL) || defined(__i386__) && (defined(SYSV) || defined(SVR4)) +# include +# endif +# ifdef WIN32 +# include +# else +# include +# endif +# else /* X_NOT_POSIX */ +# include +# include +# endif /* X_NOT_POSIX else */ /* * Get struct timeval and struct tm */ -#if defined(SYSV) && !defined(_SEQUENT_) - -#ifndef USL -#include -#endif -#include -#ifdef CRAY -#undef word -#endif /* CRAY */ -#if defined(USG) && !defined(CRAY) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__) && !defined(clipper) && !defined(__clipper__) -struct timeval { - long tv_sec; - long tv_usec; -}; -#ifndef USL_SHARELIB -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; -#endif /* USL_SHARELIB */ -#endif /* USG */ - -#ifdef _SEQUENT_ -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; -#endif /* _SEQUENT_ */ - -#else /* not SYSV */ - -#if defined(_POSIX_SOURCE) && defined(SVR4) +# if defined(_POSIX_SOURCE) && defined(SVR4) /* need to omit _POSIX_SOURCE in order to get what we want in SVR4 */ -#undef _POSIX_SOURCE -#include -#define _POSIX_SOURCE -#elif defined(WIN32) -#include -#if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL) +# undef _POSIX_SOURCE +# include +# define _POSIX_SOURCE +# elif defined(WIN32) +# include +# if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL) struct timeval { long tv_sec; /* seconds */ long tv_usec; /* and microseconds */ }; -#define _TIMEVAL_DEFINED -#endif -#include -#define gettimeofday(t) \ +# define _TIMEVAL_DEFINED +# endif +# include +# define gettimeofday(t) \ { \ struct _timeb _gtodtmp; \ _ftime (&_gtodtmp); \ (t)->tv_sec = _gtodtmp.time; \ (t)->tv_usec = _gtodtmp.millitm * 1000; \ } -#elif defined(_SEQUENT_) || defined(Lynx) -#include -#elif defined (__QNX__) -typedef unsigned long fd_mask; -/* Make sure we get 256 bit select masks */ -#define FD_SETSIZE 256 -#include -#include -#include -#else -#include -#include -#endif /* defined(_POSIX_SOURCE) && defined(SVR4) */ - -#endif /* SYSV */ +# else +# include +# include +# endif /* defined(_POSIX_SOURCE) && defined(SVR4) */ /* define X_GETTIMEOFDAY macro, a portable gettimeofday() */ -#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(VMS) || defined(WIN32) -#define X_GETTIMEOFDAY(t) gettimeofday(t) -#else -#define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0) -#endif -#endif /* XPG4 else */ - -#ifdef __UNIXOS2__ -typedef unsigned long fd_mask; -#include -#define MAX_PATH _POSIX_PATH_MAX -#endif - -#ifdef __GNU__ -#define PATH_MAX 4096 -#define MAXPATHLEN 4096 -#define OPEN_MAX 256 /* We define a reasonable limit. */ -#endif +# 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(__SVR4) || defined(WIN32) +# define X_GETTIMEOFDAY(t) gettimeofday(t) +# else +# define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0) +# endif +# endif /* XPG4 else */ + + +# ifdef __GNU__ +# define PATH_MAX 4096 +# define MAXPATHLEN 4096 +# define OPEN_MAX 256 /* We define a reasonable limit. */ +# endif /* use POSIX name for signal */ -#if defined(X_NOT_POSIX) && defined(SYSV) && !defined(SIGCHLD) && !defined(ISC) -#define SIGCHLD SIGCLD -#endif - -#ifdef ISC -#include -#include -#define NGROUPS 16 -#endif - -#if defined(ISC) || defined(__UNIXOS2__) || \ - (defined(__linux__) && !defined(__GLIBC__)) || \ - (defined(__QNX__) && !defined(UNIXCONN)) -/* - * Some OS's may not have this - */ - -#define X_NO_SYS_UN 1 - -struct sockaddr_un { - short sun_family; - char sun_path[108]; -}; -#endif +# if defined(X_NOT_POSIX) && defined(SYSV) && !defined(SIGCHLD) +# define SIGCHLD SIGCLD +# endif -#include +# include #endif /* _XOS_H_ */ -- cgit v1.2.3