/*
* Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1992 by David Dawes <dawes@XFree86.org>
* Copyright 1992 by Jim Tsillas <jtsilla@damon.ccs.northeastern.edu>
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1992 by Robert Baron <Robert.Baron@ernst.mach.cs.cmu.edu>
* Copyright 1992 by Orest Zborowski <obz@eskimo.com>
* Copyright 1993 by Vrije Universiteit, The Netherlands
* Copyright 1993 by David Wexelblat <dwex@XFree86.org>
* Copyright 1994, 1996 by Holger Veit <Holger.Veit@gmd.de>
* Copyright 1997 by Takis Psarogiannakopoulos <takis@dpmms.cam.ac.uk>
* Copyright 1994-2003 by The XFree86 Project, Inc
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, 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 names of the above listed copyright holders
* not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. The above listed
* copyright holders make no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
* DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/*
* The ARM32 code here carries the following copyright:
*
* Copyright 1997
* Digital Equipment Corporation. All rights reserved.
* This software is furnished under license and may be used and copied only in
* accordance with the following terms and conditions. Subject to these
* conditions, you may download, copy, install, use, modify and distribute
* transferred hereby.
*
* 1) Any source code used, modified or distributed must reproduce and retain
* this copyright notice and list of conditions as they appear in the
* source file.
*
* 2) No right is granted to use any trade name, trademark, or logo of Digital
* Equipment Corporation. Neither the "Digital Equipment Corporation"
* name nor any trademark or logo of Digital Equipment Corporation may be
* used to endorse or promote products derived from this software without
* the prior written permission of Digital Equipment Corporation.
*
* 3) This software is provided "AS-IS" and any express or implied warranties,
* including but not limited to, any implied warranties of merchantability,
* fitness for a particular purpose, or non-infringement are disclaimed.
* In no event shall DIGITAL be liable for any damages whatsoever, and in
* particular, DIGITAL shall not be liable for special, indirect,
* consequential, or incidental damages or damages for lost profits, loss
* of revenue or loss of use, whether such damages arise in contract,
* negligence, tort, under statute, in equity, at law or otherwise, even
* if advised of the possibility of such damage.
*
*/
/*
* This is private, and should not be included by any drivers. Drivers
* may include xf86_OSproc.h to get prototypes for public interfaces.
*/
#ifndef _XF86_OSLIB_H
#define _XF86_OSLIB_H
#include <X11/Xfuncproto.h>
#include <stdio.h>
#include <ctype.h>
#include <stddef.h>
/**************************************************************************/
/* SYSV386 (SVR3, SVR4), including Solaris */
/**************************************************************************/
# ifdef SCO325
# ifndef _SVID3
# define _SVID3
# endif
# ifndef _NO_STATIC
# define _NO_STATIC
# endif
# endif
# include <signal.h>
# include <termio.h>
# if defined(__SCO__)
# endif
# include <errno.h>
# if defined(_NEED_SYSI86)
# endif
# endif /* SVR4 && !sun */
# if !defined(V86SC_IOPL) /* Solaris 7 or later? */
# endif
# endif
# endif /* _NEED_SYSI86 */
# if defined(HAS_SVR3_MMAPDRV)
# include <sys/sysmacros.h>
# if !defined(_NEED_SYSI86)
# endif
# endif
# if !defined(sun) || defined(HAVE_SYS_VT_H)
# define HAS_USL_VTS
# endif
# if !defined(sun)
# endif
# if defined(SCO325)
# elif defined(HAS_USL_VTS)
# if !defined(sun)
# endif
# endif
# if defined(sun)
definitions in parser/xf86tokens.h */
# endif /* sun */
# if !defined(VT_ACKACQ)
# endif /* !VT_ACKACQ */
# if defined(__SCO__)
# include <sys/sysmacros.h>
# define POSIX_TTY
# endif /* __SCO__ */
# endif
# ifdef SCO325
# endif
# define CLEARDTR_SUPPORT
# define POSIX_TTY
# endif /* SVR4 */
# if defined(sun) && defined(HAS_USL_VTS)
# define USE_VT_SYSREQ
# endif
#endif /* (SYSV || SVR4) */
/**************************************************************************/
/* Linux or Glibc-based system */
/**************************************************************************/
# include <signal.h>
# include <stdlib.h>
# include <assert.h>
# ifdef __linux__
# include <termio.h>
# else /* __GLIBC__ */
# include <termios.h>
# endif
# ifdef __sparc__
# endif
# include <errno.h>
# ifdef __linux__
# define HAS_USL_VTS
# define CLEARDTR_SUPPORT
# define USE_VT_SYSREQ
# endif
# define POSIX_TTY
#endif /* __linux__ || __GLIBC__ */
/**************************************************************************/
/* 386BSD and derivatives, BSD/386 */
/**************************************************************************/
#endif
#ifdef CSRG_BASED
# include <signal.h>
# include <termios.h>
# define POSIX_TTY
# include <errno.h>
# if defined(__bsdi__)
# if (_BSDI_VERSION < 199510)
# endif
# endif /* __bsdi__ */
#endif /* CSRG_BASED */
/**************************************************************************/
/* Kernel of *BSD */
/**************************************************************************/
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
# if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version)
# endif
# if !defined(LINKKIT)
/* Don't need this stuff for the Link Kit */
# if defined(__bsdi__)
# else /* __bsdi__ */
# if defined(__OpenBSD__)
# ifdef PCCONS_SUPPORT
# endif
# endif
# ifdef SYSCONS_SUPPORT
# define COMPAT_SYSCONS
# if defined(__NetBSD__) || defined(__OpenBSD__)
# else
# else
# endif /* FreeBSD 4.1 RELEASE or lator */
# else
# endif
# endif
# endif /* SYSCONS_SUPPORT */
# if defined(PCVT_SUPPORT)
# if !defined(SYSCONS_SUPPORT)
/* no syscons, so include pcvt specific header file */
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# include <machine/pcvt_ioctl.h>
# else
# if defined(__NetBSD__) || defined(__OpenBSD__)
# if !defined(WSCONS_SUPPORT)
# include <machine/pcvt_ioctl.h>
# endif /* WSCONS_SUPPORT */
# else
# include <sys/pcvt_ioctl.h>
# endif /* __NetBSD__ */
# endif /* __FreeBSD_kernel__ || __OpenBSD__ */
# else /* pcvt and syscons: hard-code the ID magic */
struct pcvtid {
};
# endif /* PCVT_SUPPORT && SYSCONS_SUPPORT */
# endif /* PCVT_SUPPORT */
# ifdef WSCONS_SUPPORT
# endif /* WSCONS_SUPPORT */
# else
# endif
# endif
/* Include these definitions in case ioctl_pc.h didn't get included */
# ifndef CONSOLE_X_MODE_ON
# endif
# ifndef CONSOLE_X_MODE_OFF
# endif
# ifndef CONSOLE_X_BELL
# endif
# ifndef CONSOLE_X_TV_ON
# define XMODE_RGB 0
# endif
# ifndef CONSOLE_X_TV_OFF
# endif
#ifndef CONSOLE_GET_LINEAR_INFO
#endif
#ifndef CONSOLE_GET_IO_INFO
#endif
#ifndef CONSOLE_GET_MEM_INFO
#endif
# endif /* __bsdi__ */
# endif /* !LINKKIT */
#if defined(USE_I386_IOPL) || defined(USE_AMD64_IOPL)
#endif
# define CLEARDTR_SUPPORT
# define USE_VT_SYSREQ
# endif
#endif
/* __FreeBSD_kernel__ || __NetBSD__ || __OpenBSD__ || __bsdi__ */
/**************************************************************************/
/* IRIX */
/**************************************************************************/
/**************************************************************************/
/* Generic */
/**************************************************************************/
/*
* Hack originally for ISC 2.2 POSIX headers, but may apply elsewhere,
* and it's safe, so just do it.
*/
#if !defined(O_NDELAY) && defined(O_NONBLOCK)
#endif /* !O_NDELAY && O_NONBLOCK */
#if !defined(MAXHOSTNAMELEN)
#endif /* !MAXHOSTNAMELEN */
#if defined(_POSIX_SOURCE)
# include <limits.h>
#else
# define _POSIX_SOURCE
# include <limits.h>
#endif /* _POSIX_SOURCE */
#if !defined(PATH_MAX)
# if defined(MAXPATHLEN)
# else
# endif /* MAXPATHLEN */
#endif /* !PATH_MAX */
#ifndef DEV_MEM
#endif
#ifndef VT_SYSREQ_DEFAULT
#endif
#define XF86_OS_PRIVS
#include "xf86_OSproc.h"
#ifndef NO_COMPILER_H
#include "compiler.h"
#endif
#endif /* _XF86_OSLIB_H */