Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
38918 views
/*1* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#ifndef __SOUNDDEFS_INCLUDED__26#define __SOUNDDEFS_INCLUDED__272829// types for X_PLATFORM30#define X_WINDOWS 131#define X_SOLARIS 232#define X_LINUX 333#define X_BSD 434#define X_MACOSX 53536// types for X_ARCH37#define X_I586 138#define X_SPARC 239#define X_SPARCV9 340#define X_IA64 441#define X_AMD64 542#define X_ZERO 643#define X_ARM 744#define X_PPC 845#define X_PPC64 946#define X_PPC64LE 1047#define X_AARCH64 1148#define X_AARCH32 124950// **********************************51// Make sure you set X_PLATFORM and X_ARCH defines correctly.52// Everything depends upon this flag being setup correctly.53// **********************************5455#if (X_PLATFORM == X_MACOSX) && !defined(X_ARCH)56#if __x86_64__57#define X_ARCH X_AMD6458#endif59#if __i386__60#define X_ARCH X_I58661#endif62#endif6364#if (!defined(X_PLATFORM) || !defined(X_ARCH))65#error "You need to define X_PLATFORM and X_ARCH outside of the source. Use the types above."66#endif676869// following is needed for _LP6470#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_MACOSX))71#include <sys/types.h>72#endif7374#if X_PLATFORM == X_WINDOWS75#ifndef WIN32_LEAN_AND_MEAN76#define WIN32_LEAN_AND_MEAN77#endif78#include <windows.h>79#endif /* X_PLATFORM == X_WINDOWS */808182/*83* These types are defined elsewhere for newer 32/64-bit Windows84* header files, but not on Solaris/Linux (X_PLATFORM != X_WINDOWS)85*/86#if (X_PLATFORM != X_WINDOWS)8788typedef unsigned char UINT8;89typedef char INT8;90typedef short INT16;91typedef unsigned short UINT16;92#ifdef _LP6493typedef int INT32;94typedef unsigned int UINT32;95typedef unsigned long UINT64;96typedef long INT64;97#else /* _LP64 */98typedef long INT32;99typedef unsigned long UINT32;100/* generic 64 bit ? */101typedef unsigned long long UINT64;102typedef long long INT64;103#endif /* _LP64 */104105typedef unsigned long UINT_PTR;106typedef long INT_PTR;107108#endif /* X_PLATFORM != X_WINDOWS */109110111typedef unsigned char UBYTE;112typedef char SBYTE;113114115#undef TRUE116#undef FALSE117118#ifndef TRUE119#define TRUE 1120#endif121122#ifndef FALSE123#define FALSE 0124#endif125126#undef NULL127#ifndef NULL128#define NULL 0L129#endif130131132133134#if X_PLATFORM == X_WINDOWS135#include <stdlib.h>136#define INLINE _inline137#endif138139140#if X_PLATFORM == X_SOLARIS141#define INLINE142#endif143144145#if X_PLATFORM == X_LINUX146#define INLINE inline147#endif148149150#if (X_PLATFORM == X_BSD) || (X_PLATFORM == X_MACOSX)151#define INLINE inline152#endif153154155#endif // __SOUNDDEFS_INCLUDED__156157158