/* * $XConsortium: Xos.h,v 1.16 89/06/19 11:14:59 jim Exp $ * * Copyright 1987 by the Massachusetts Institute of Technology * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of M.I.T. not be used in advertising * or publicity pertaining to distribution of the software without specific, * written prior permission. M.I.T. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * The X Window System is a Trademark of MIT. * */ /* This is a collection of things to try and minimize system dependencies * in a "signficant" number of source files. */ #ifndef _XOS_H_ #define _XOS_H_ /* * Get major data types (esp. caddr_t) */ #if defined(CRAY) || defined(USG) #ifndef __TYPES__ #define __TYPES__ #include /* forgot to protect it... */ #endif /* __TYPES__ */ #else #include #endif /* CRAY or USG */ /* * Just about everyone needs the strings routines. For uniformity, we use * the BSD-style index() and rindex() in application code, so any systems that * don't provide them need to have #defines here. Unfortunately, we can't * use #if defined() here since makedepend will get confused. * * The list of systems that currently needs System V stings includes: * * hpux * macII * CRAY * USG * * all of which happen to define SYSV as well. */ #ifdef SYSV #include #define index strchr #define rindex strrchr #else #include #endif /* SYSV */ /* * Get open(2) constants */ #ifdef SYSV #ifndef macII #include #endif #endif /* SYSV */ #include /* * Get struct timeval */ #ifdef SYSV #if defined(sgi) || defined(CRAY2) #include /* SYSV && (sgi || CRAY2) */ #else #include /* SYSV */ #endif #ifdef USG #ifdef umips #include /* SYSV && umips */ #else #ifndef __TIMEVAL__ #define __TIMEVAL__ struct timeval { long tv_sec; long tv_usec; }; struct timezone { int tz_minuteswest; int tz_dsttime; }; #endif #endif /* umips or not */ #endif /* USG */ #ifdef macII #include /* SYSV && macII */ #endif #else #include /* bsd */ #endif /* * More BSDisms */ #ifdef SYSV #ifndef macII #define SIGCHLD SIGCLD #endif #endif /* * Put system-specific definitions here */ #ifdef hpux #define sigvec sigvector #endif #ifdef umips #ifdef USG #include #include #endif #endif #endif /* _XOS_H_ */