/*
 * $XConsortium: Xos.h,v 1.24 89/12/18 16:14:23 rws 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.
 *
 * This version is ARM specific (and, indeed, it also depends on facilities
 * first available in RISC iX 1.2).  ANSI standard include files are included
 * using <>, other (system) files use "" to avoid ANSI complaints about non
 * standard include files.  The difference is not material because the directory
 * containing *this* file (ie ".") contains none of the included files.
 */

#ifndef _XOS_H_
#define _XOS_H_

/*
 * Get major data types (esp. caddr_t)
 */
#ifndef __sys_types_h
#include "sys/types.h"
#endif

/*
 * 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.  Now, this causes nice
 * standard conformant systems like RISC iX problems - it is necessary to
 * establish what ``environment'' is in use and define (or not) on the basis
 * of this.
 */
#ifndef _BSD_C
#ifndef __string_h
#include <string.h>
#endif
/*
 * The following has a horrible effect on dbx users (anything called
 * index becomes strchr...)  The compiler will warn if index is
 * redefined by the following operation (nice compiler).
 */
#if !defined(_NO_BSD_STRINGS) && !defined(__STDC__)
#define index strchr
#define rindex strrchr
#define bcopy $bcopy
#define bzero $bzero
#define bcmp memcmp
#endif
#else
#ifndef __strings_h
#include "strings.h"
#endif
#endif


/*
 * Get open(2) constants (and, on RISC iX, function defs)
 */
#ifndef __fcntl_h
#include "fcntl.h"
#endif
#ifndef __sys_file_h
#include "sys/file.h"
#endif
#ifndef __unistd_h
#include "unistd.h"
#endif


/*
 * Get struct timeval
 */
#ifndef __sys_time_h
#include "sys/time.h"
#endif

#endif /* _XOS_H_ */
