sanity.h revision ea2e1124fb80418789e774cefba7dbacb5f99f02
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * IPRT - Setup Sanity Checks, C and C++.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Copyright (C) 2007 Sun Microsystems, Inc.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * available from http://www.virtualbox.org. This file is free software;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * you can redistribute it and/or modify it under the terms of the GNU
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * General Public License (GPL) as published by the Free Software
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * The contents of this file may alternatively be used under the terms
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * of the Common Development and Distribution License Version 1.0
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * VirtualBox OSE distribution, in which case the provisions of the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * CDDL are applicable instead of those of the GPL.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * You may elect to license modified versions of this file under the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * terms and conditions of either the GPL or the CDDL or both.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * additional information or have any questions.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Check that the IN_[RING3|RING0|GC] and [|R3_|R0_|GC_]ARCH_BITS
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * match up correctly.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * IPRT assumes r0 and r3 to has the same bit count.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync# error "defined(IN_RING3) && ARCH_BITS != R3_ARCH_BITS"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync# error "defined(IN_RING0) && ARCH_BITS != R0_ARCH_BITS"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#if (defined(IN_RING0) || defined(IN_RING3)) && HC_ARCH_BITS != ARCH_BITS
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync# error "(defined(IN_RING0) || defined(IN_RING3)) && HC_ARCH_BITS != ARCH_BITS"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#if defined(IN_RC) && GC_ARCH_BITS != 64 && GC_ARCH_BITS != ARCH_BITS
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync# error "defined(IN_RC) && GC_ARCH_BITS != ARCH_BITS"
# ifdef IN_RC
/* Hack alert: there is no such thing as a GC context when GC_ARCH_BITS == 64; it's still 32 bits */
# ifdef IN_RC