author | phh |
Sat, 30 Nov 2019 14:33:05 -0800 | |
changeset 59330 | 5b96c12f909d |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
29261
ea6e20f98dfa
8072665: SoundLibraries.gmk and SoundDefs.h: remove isSigned8() dead code
serb
parents:
25859
diff
changeset
|
2 |
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
* |
|
5506 | 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. |
|
2 | 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 |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
8796
diff
changeset
|
34 |
#define X_BSD 4 |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
8796
diff
changeset
|
35 |
#define X_MACOSX 5 |
2 | 36 |
|
37 |
// ********************************** |
|
29261
ea6e20f98dfa
8072665: SoundLibraries.gmk and SoundDefs.h: remove isSigned8() dead code
serb
parents:
25859
diff
changeset
|
38 |
// Make sure you set X_PLATFORM defines correctly. |
2 | 39 |
// Everything depends upon this flag being setup correctly. |
40 |
// ********************************** |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
8796
diff
changeset
|
41 |
|
29261
ea6e20f98dfa
8072665: SoundLibraries.gmk and SoundDefs.h: remove isSigned8() dead code
serb
parents:
25859
diff
changeset
|
42 |
#if (!defined(X_PLATFORM)) |
ea6e20f98dfa
8072665: SoundLibraries.gmk and SoundDefs.h: remove isSigned8() dead code
serb
parents:
25859
diff
changeset
|
43 |
#error "You need to define X_PLATFORM outside of the source. Use the types above." |
2 | 44 |
#endif |
45 |
||
46 |
||
47 |
// following is needed for _LP64 |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
8796
diff
changeset
|
48 |
#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_MACOSX)) |
2 | 49 |
#include <sys/types.h> |
50 |
#endif |
|
51 |
||
52 |
#if X_PLATFORM == X_WINDOWS |
|
53 |
#ifndef WIN32_LEAN_AND_MEAN |
|
54 |
#define WIN32_LEAN_AND_MEAN |
|
55 |
#endif |
|
56 |
#include <windows.h> |
|
57 |
#endif /* X_PLATFORM == X_WINDOWS */ |
|
58 |
||
59 |
||
60 |
/* |
|
61 |
* These types are defined elsewhere for newer 32/64-bit Windows |
|
62 |
* header files, but not on Solaris/Linux (X_PLATFORM != X_WINDOWS) |
|
63 |
*/ |
|
64 |
#if (X_PLATFORM != X_WINDOWS) |
|
65 |
||
66 |
typedef unsigned char UINT8; |
|
67 |
typedef char INT8; |
|
68 |
typedef short INT16; |
|
69 |
typedef unsigned short UINT16; |
|
70 |
#ifdef _LP64 |
|
71 |
typedef int INT32; |
|
72 |
typedef unsigned int UINT32; |
|
73 |
typedef unsigned long UINT64; |
|
74 |
typedef long INT64; |
|
75 |
#else /* _LP64 */ |
|
76 |
typedef long INT32; |
|
77 |
typedef unsigned long UINT32; |
|
78 |
/* generic 64 bit ? */ |
|
79 |
typedef unsigned long long UINT64; |
|
80 |
typedef long long INT64; |
|
81 |
#endif /* _LP64 */ |
|
82 |
||
83 |
typedef unsigned long UINT_PTR; |
|
84 |
typedef long INT_PTR; |
|
85 |
||
86 |
#endif /* X_PLATFORM != X_WINDOWS */ |
|
87 |
||
88 |
||
89 |
typedef unsigned char UBYTE; |
|
90 |
typedef char SBYTE; |
|
91 |
||
92 |
||
93 |
#undef TRUE |
|
94 |
#undef FALSE |
|
95 |
||
96 |
#ifndef TRUE |
|
97 |
#define TRUE 1 |
|
98 |
#endif |
|
99 |
||
100 |
#ifndef FALSE |
|
101 |
#define FALSE 0 |
|
102 |
#endif |
|
103 |
||
104 |
#undef NULL |
|
105 |
#ifndef NULL |
|
106 |
#define NULL 0L |
|
107 |
#endif |
|
108 |
||
109 |
||
110 |
||
111 |
||
112 |
#if X_PLATFORM == X_WINDOWS |
|
113 |
#include <stdlib.h> |
|
114 |
#define INLINE _inline |
|
115 |
#endif |
|
116 |
||
117 |
||
118 |
#if X_PLATFORM == X_SOLARIS |
|
119 |
#define INLINE |
|
120 |
#endif |
|
121 |
||
122 |
||
123 |
#if X_PLATFORM == X_LINUX |
|
124 |
#define INLINE inline |
|
125 |
#endif |
|
126 |
||
127 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
8796
diff
changeset
|
128 |
#if (X_PLATFORM == X_BSD) || (X_PLATFORM == X_MACOSX) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
8796
diff
changeset
|
129 |
#define INLINE inline |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
8796
diff
changeset
|
130 |
#endif |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
8796
diff
changeset
|
131 |
|
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
8796
diff
changeset
|
132 |
|
2 | 133 |
#endif // __SOUNDDEFS_INCLUDED__ |