Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openjdk-multiarch-jdk8u
Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
38918 views
1
/*
2
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
10
*
11
* This code is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* version 2 for more details (a copy is included in the LICENSE file that
15
* accompanied this code).
16
*
17
* You should have received a copy of the GNU General Public License version
18
* 2 along with this work; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
*
21
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
* or visit www.oracle.com if you need additional information or have any
23
* questions.
24
*/
25
26
#ifndef __SOUNDDEFS_INCLUDED__
27
#define __SOUNDDEFS_INCLUDED__
28
29
30
// types for X_PLATFORM
31
#define X_WINDOWS 1
32
#define X_SOLARIS 2
33
#define X_LINUX 3
34
#define X_BSD 4
35
#define X_MACOSX 5
36
37
// types for X_ARCH
38
#define X_I586 1
39
#define X_SPARC 2
40
#define X_SPARCV9 3
41
#define X_IA64 4
42
#define X_AMD64 5
43
#define X_ZERO 6
44
#define X_ARM 7
45
#define X_PPC 8
46
#define X_PPC64 9
47
#define X_PPC64LE 10
48
#define X_AARCH64 11
49
#define X_AARCH32 12
50
51
// **********************************
52
// Make sure you set X_PLATFORM and X_ARCH defines correctly.
53
// Everything depends upon this flag being setup correctly.
54
// **********************************
55
56
#if (X_PLATFORM == X_MACOSX) && !defined(X_ARCH)
57
#if __x86_64__
58
#define X_ARCH X_AMD64
59
#endif
60
#if __i386__
61
#define X_ARCH X_I586
62
#endif
63
#endif
64
65
#if (!defined(X_PLATFORM) || !defined(X_ARCH))
66
#error "You need to define X_PLATFORM and X_ARCH outside of the source. Use the types above."
67
#endif
68
69
70
// following is needed for _LP64
71
#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_MACOSX))
72
#include <sys/types.h>
73
#endif
74
75
#if X_PLATFORM == X_WINDOWS
76
#ifndef WIN32_LEAN_AND_MEAN
77
#define WIN32_LEAN_AND_MEAN
78
#endif
79
#include <windows.h>
80
#endif /* X_PLATFORM == X_WINDOWS */
81
82
83
/*
84
* These types are defined elsewhere for newer 32/64-bit Windows
85
* header files, but not on Solaris/Linux (X_PLATFORM != X_WINDOWS)
86
*/
87
#if (X_PLATFORM != X_WINDOWS)
88
89
typedef unsigned char UINT8;
90
typedef char INT8;
91
typedef short INT16;
92
typedef unsigned short UINT16;
93
#ifdef _LP64
94
typedef int INT32;
95
typedef unsigned int UINT32;
96
typedef unsigned long UINT64;
97
typedef long INT64;
98
#else /* _LP64 */
99
typedef long INT32;
100
typedef unsigned long UINT32;
101
/* generic 64 bit ? */
102
typedef unsigned long long UINT64;
103
typedef long long INT64;
104
#endif /* _LP64 */
105
106
typedef unsigned long UINT_PTR;
107
typedef long INT_PTR;
108
109
#endif /* X_PLATFORM != X_WINDOWS */
110
111
112
typedef unsigned char UBYTE;
113
typedef char SBYTE;
114
115
116
#undef TRUE
117
#undef FALSE
118
119
#ifndef TRUE
120
#define TRUE 1
121
#endif
122
123
#ifndef FALSE
124
#define FALSE 0
125
#endif
126
127
#undef NULL
128
#ifndef NULL
129
#define NULL 0L
130
#endif
131
132
133
134
135
#if X_PLATFORM == X_WINDOWS
136
#include <stdlib.h>
137
#define INLINE _inline
138
#endif
139
140
141
#if X_PLATFORM == X_SOLARIS
142
#define INLINE
143
#endif
144
145
146
#if X_PLATFORM == X_LINUX
147
#define INLINE inline
148
#endif
149
150
151
#if (X_PLATFORM == X_BSD) || (X_PLATFORM == X_MACOSX)
152
#define INLINE inline
153
#endif
154
155
156
#endif // __SOUNDDEFS_INCLUDED__
157
158