1 2 /* 3 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 #ifndef COM_DTYPES_H 21 #define COM_DTYPES_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 #ifdef T_WINNT 28 #ifndef WIN32 29 #define WIN32 30 #endif 31 #include <stdlib.h> 32 #endif 33 34 #ifdef TRUE 35 #undef TRUE 36 #endif 37 38 #ifdef FALSE 39 #undef FALSE 40 #endif 41 42 #define TRUE 1 43 #define FALSE 0 44 45 #define ON 1 46 #define OFF 0 47 48 #ifndef NULL 49 #define NULL 0 50 #endif 51 52 #ifndef _ARM_ASM_ 53 #ifndef _BOOLEAN_DEFINED 54 55 typedef unsigned char boolean; 56 #define _BOOLEAN_DEFINED 57 #endif 58 59 #if defined(DALSTDDEF_H) 60 #define _BOOLEAN_DEFINED 61 #define _UINT32_DEFINED 62 #define _UINT16_DEFINED 63 #define _UINT8_DEFINED 64 #define _INT32_DEFINED 65 #define _INT16_DEFINED 66 #define _INT8_DEFINED 67 #define _UINT64_DEFINED 68 #define _INT64_DEFINED 69 #define _BYTE_DEFINED 70 #endif 71 72 #ifndef _UINT32_DEFINED 73 74 typedef unsigned long int uint32; 75 #define _UINT32_DEFINED 76 #endif 77 78 #ifndef _UINT16_DEFINED 79 80 typedef unsigned short uint16; 81 #define _UINT16_DEFINED 82 #endif 83 84 #ifndef _UINT8_DEFINED 85 86 typedef unsigned char uint8; 87 #define _UINT8_DEFINED 88 #endif 89 90 #ifndef _INT32_DEFINED 91 92 typedef signed long int int32; 93 #define _INT32_DEFINED 94 #endif 95 96 #ifndef _INT16_DEFINED 97 98 typedef signed short int16; 99 #define _INT16_DEFINED 100 #endif 101 102 #ifndef _INT8_DEFINED 103 104 typedef signed char int8; 105 #define _INT8_DEFINED 106 #endif 107 108 #ifndef _BYTE_DEFINED 109 110 typedef unsigned char byte; 111 #define _BYTE_DEFINED 112 #endif 113 114 typedef unsigned short word; 115 116 typedef unsigned long dword; 117 118 typedef unsigned char uint1; 119 120 typedef unsigned short uint2; 121 122 typedef unsigned long uint4; 123 124 typedef signed char int1; 125 126 typedef signed short int2; 127 128 typedef long int int4; 129 130 typedef signed long sint31; 131 132 typedef signed short sint15; 133 134 typedef signed char sint7; 135 136 typedef uint16 UWord16 ; 137 typedef uint32 UWord32 ; 138 typedef int32 Word32 ; 139 typedef int16 Word16 ; 140 typedef uint8 UWord8 ; 141 typedef int8 Word8 ; 142 typedef int32 Vect32 ; 143 144 #if (! defined T_WINNT) && (! defined __GNUC__) 145 146 #ifndef _INT64_DEFINED 147 148 typedef long long int64; 149 #define _INT64_DEFINED 150 #endif 151 #ifndef _UINT64_DEFINED 152 153 typedef unsigned long long uint64; 154 #define _UINT64_DEFINED 155 #endif 156 #else 157 158 #if (defined __GNUC__) 159 #ifndef _INT64_DEFINED 160 typedef long long int64; 161 #define _INT64_DEFINED 162 #endif 163 #ifndef _UINT64_DEFINED 164 typedef unsigned long long uint64; 165 #define _UINT64_DEFINED 166 #endif 167 #else 168 typedef __int64 int64; 169 #ifndef _UINT64_DEFINED 170 typedef unsigned __int64 uint64; 171 #define _UINT64_DEFINED 172 #endif 173 #endif 174 #endif 175 176 #endif 177 178 #ifdef __cplusplus 179 } 180 #endif 181 182 #endif 183