jdk/src/share/native/com/sun/media/sound/SoundDefs.h
author gbenson
Thu, 15 Oct 2009 13:27:59 +0100
changeset 4111 ffc9c33335f4
parent 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
6891677: java/build integrate zero assembler JDK changes Summary: Build changes for the Zero assembler port Reviewed-by: ohair, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#ifndef __SOUNDDEFS_INCLUDED__
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
#define __SOUNDDEFS_INCLUDED__
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
// types for X_PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#define X_WINDOWS       1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#define X_SOLARIS       2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#define X_LINUX         3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
// types for X_ARCH
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#define X_I586          1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#define X_SPARC         2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
#define X_SPARCV9       3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#define X_IA64          4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#define X_AMD64         5
4111
ffc9c33335f4 6891677: java/build integrate zero assembler JDK changes
gbenson
parents: 2
diff changeset
    41
#define X_ZERO          6
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
// **********************************
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
// Make sure you set X_PLATFORM and X_ARCH defines correctly.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
// Everything depends upon this flag being setup correctly.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
// **********************************
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#if (!defined(X_PLATFORM) || !defined(X_ARCH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
#error "You need to define X_PLATFORM and X_ARCH outside of the source. Use the types above."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
// following is needed for _LP64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX))
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
#include <sys/types.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
#if X_PLATFORM == X_WINDOWS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
#ifndef WIN32_LEAN_AND_MEAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
#define WIN32_LEAN_AND_MEAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
#include <windows.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
#endif /* X_PLATFORM == X_WINDOWS */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
* These types are defined elsewhere for newer 32/64-bit Windows
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
* header files, but not on Solaris/Linux (X_PLATFORM != X_WINDOWS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#if (X_PLATFORM != X_WINDOWS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
typedef unsigned char           UINT8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
typedef char                    INT8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
typedef short                   INT16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
typedef unsigned short          UINT16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#ifdef _LP64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
typedef int                     INT32;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
typedef unsigned int            UINT32;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
typedef unsigned long           UINT64;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
typedef long                    INT64;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
#else /* _LP64 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
typedef long                    INT32;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
typedef unsigned long           UINT32;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
/* generic 64 bit ? */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
typedef unsigned long long      UINT64;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
typedef long long               INT64;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#endif /* _LP64 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
typedef unsigned long           UINT_PTR;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
typedef long                    INT_PTR;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
#endif /* X_PLATFORM != X_WINDOWS */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
typedef unsigned char   UBYTE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
typedef char            SBYTE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
#undef TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
#undef FALSE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
#ifndef TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
#define TRUE    1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
#ifndef FALSE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
#define FALSE   0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
#undef NULL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
#ifndef NULL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
#define NULL    0L
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
#if X_PLATFORM == X_WINDOWS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
#include <stdlib.h>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
#define INLINE          _inline
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
#if X_PLATFORM == X_SOLARIS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
#define INLINE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
#if X_PLATFORM == X_LINUX
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
#define INLINE          inline
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
#endif  // __SOUNDDEFS_INCLUDED__