]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/hwinfo/src/x86emu/include/x86emu/types.h
Signierten GPG-Schluessel importiert.
[people/pmueller/ipfire-2.x.git] / src / hwinfo / src / x86emu / include / x86emu / types.h
CommitLineData
93afd047
MT
1/****************************************************************************
2*
3* Realmode X86 Emulator Library
4*
5* Copyright (C) 1996-1999 SciTech Software, Inc.
6* Copyright (C) David Mosberger-Tang
7* Copyright (C) 1999 Egbert Eich
8*
9* ========================================================================
10*
11* Permission to use, copy, modify, distribute, and sell this software and
12* its documentation for any purpose is hereby granted without fee,
13* provided that the above copyright notice appear in all copies and that
14* both that copyright notice and this permission notice appear in
15* supporting documentation, and that the name of the authors not be used
16* in advertising or publicity pertaining to distribution of the software
17* without specific, written prior permission. The authors makes no
18* representations about the suitability of this software for any purpose.
19* It is provided "as is" without express or implied warranty.
20*
21* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
22* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
23* EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
24* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
25* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
26* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27* PERFORMANCE OF THIS SOFTWARE.
28*
29* ========================================================================
30*
31* Language: ANSI C
32* Environment: Any
33* Developer: Kendall Bennett
34*
35* Description: Header file for x86 emulator type definitions.
36*
37****************************************************************************/
38
39/* $XFree86: xc/extras/x86emu/include/x86emu/types.h,v 1.6 2003/06/12 14:12:26 eich Exp $ */
40
41#ifndef __X86EMU_TYPES_H
42#define __X86EMU_TYPES_H
43
44#ifndef IN_MODULE
45#include <sys/types.h>
46#endif
47
48/*
49 * The following kludge is an attempt to work around typedef conflicts with
50 * <sys/types.h>.
51 */
52#define u8 x86emuu8
53#define u16 x86emuu16
54#define u32 x86emuu32
55#define u64 x86emuu64
56#define s8 x86emus8
57#define s16 x86emus16
58#define s32 x86emus32
59#define s64 x86emus64
60#define uint x86emuuint
61#define sint x86emusint
62
63/*---------------------- Macros and type definitions ----------------------*/
64
65/* Currently only for Linux/32bit */
66#undef __HAS_LONG_LONG__
67#if defined(__GNUC__) && !defined(NO_LONG_LONG)
68#define __HAS_LONG_LONG__
69#endif
70
71/* Taken from Xmd.h */
72#undef NUM32
73#if defined (_LP64) || \
74 defined(__alpha) || defined(__alpha__) || \
75 defined(__ia64__) || defined(ia64) || \
76 defined(__sparc64__) || \
77 defined(__s390x__) || \
78 (defined(__hppa__) && defined(__LP64)) || \
79 defined(__AMD64__) || defined(AMD64) || \
80 (defined(__sgi) && (_MIPS_SZLONG == 64))
81#define NUM32 int
82#else
83#define NUM32 long
84#endif
85
86typedef unsigned char u8;
87typedef unsigned short u16;
88typedef unsigned NUM32 u32;
89#ifdef __HAS_LONG_LONG__
90typedef unsigned long long u64;
91#endif
92
93typedef char s8;
94typedef short s16;
95typedef NUM32 s32;
96#ifdef __HAS_LONG_LONG__
97typedef long long s64;
98#endif
99
100typedef unsigned int uint;
101typedef int sint;
102
103typedef u16 X86EMU_pioAddr;
104
105#undef NUM32
106
107#endif /* __X86EMU_TYPES_H */