Path: blob/master/src/java.desktop/share/native/libjsound/SoundDefs.h
41149 views
/*1* Copyright (c) 2007, 2020, 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_LINUX 232#define X_BSD 333#define X_MACOSX 43435// **********************************36// Make sure you set X_PLATFORM defines correctly.37// Everything depends upon this flag being setup correctly.38// **********************************3940#if (!defined(X_PLATFORM))41#error "You need to define X_PLATFORM outside of the source. Use the types above."42#endif434445// following is needed for _LP6446#if ((X_PLATFORM == X_LINUX) || (X_PLATFORM == X_MACOSX))47#include <sys/types.h>48#endif4950#if X_PLATFORM == X_WINDOWS51#ifndef WIN32_LEAN_AND_MEAN52#define WIN32_LEAN_AND_MEAN53#endif54#include <windows.h>55#endif /* X_PLATFORM == X_WINDOWS */565758/*59* These types are defined elsewhere for newer 32/64-bit Windows60* header files, but not on Solaris/Linux (X_PLATFORM != X_WINDOWS)61*/62#if (X_PLATFORM != X_WINDOWS)6364typedef unsigned char UINT8;65typedef char INT8;66typedef short INT16;67typedef unsigned short UINT16;68#ifdef _LP6469typedef int INT32;70typedef unsigned int UINT32;71typedef unsigned long UINT64;72typedef long INT64;73#else /* _LP64 */74typedef long INT32;75typedef unsigned long UINT32;76/* generic 64 bit ? */77typedef unsigned long long UINT64;78typedef long long INT64;79#endif /* _LP64 */8081typedef unsigned long UINT_PTR;82typedef long INT_PTR;8384#endif /* X_PLATFORM != X_WINDOWS */858687typedef unsigned char UBYTE;88typedef char SBYTE;899091#undef TRUE92#undef FALSE9394#ifndef TRUE95#define TRUE 196#endif9798#ifndef FALSE99#define FALSE 0100#endif101102#undef NULL103#ifndef NULL104#define NULL 0L105#endif106107108109110#if X_PLATFORM == X_WINDOWS111#include <stdlib.h>112#define INLINE _inline113#endif114115116#if X_PLATFORM == X_LINUX117#define INLINE inline118#endif119120121#if (X_PLATFORM == X_BSD) || (X_PLATFORM == X_MACOSX)122#define INLINE inline123#endif124125126#endif // __SOUNDDEFS_INCLUDED__127128129