Changeset 3550 for trunk/kStuff/include/k
- Timestamp:
- Aug 26, 2007, 3:13:35 AM (18 years ago)
- Location:
- trunk/kStuff/include/k
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kStuff/include/k/kDbg.h
r3541 r3550 23 23 */ 24 24 25 #ifndef ___kDbg_h___ 26 #define ___kDbg_h___ 27 28 #include "kDbgBase.h" 25 #ifndef ___k_kDbg_h___ 26 #define ___k_kDbg_h___ 27 28 #include <k/kDefs.h> 29 #include <k/kTypes.h> 30 #include <k/kRdr.h> 29 31 30 32 #ifdef __cplusplus … … 36 38 */ 37 39 38 /** The max filename path length used by the debug reader. */ 39 #define KDBG_PATH_MAX 260 40 41 /** The max symbol name length used by the debug reader. */ 42 #define KDBG_SYMBOL_MAX 384 40 /** @def KDBG_DECL 41 * Declares a kDbg function according to build context. 42 * @param type The return type. 43 */ 44 #if defined(KDBG_BUILDING_DYNAMIC) 45 # define KDBG_DECL(type) K_DECL_EXPORT(type) 46 #elif defined(KDBG_BUILT_DYNAMIC) 47 # define KDBG_DECL(type) K_DECL_IMPORT(type) 48 #else 49 # define KDBG_DECL(type) type 50 #endif 51 52 53 /** The kDbg address type. */ 54 typedef KU64 KDBGADDR; 55 /** Pointer to a kDbg address. */ 56 typedef KDBGADDR *PKDBGADDR; 57 /** Pointer to a const kDbg address. */ 58 typedef const KDBGADDR *PCKDBGADDR; 59 /** @def KDBGADDR_PRI 60 * printf format type. */ 61 #define KDBGADDR_PRI KX64_PRI 62 /** @def KDBGADDR_MAX 63 * Max kDbg address value. */ 64 #define KDBGADDR_MAX KU64_C(0xfffffffffffffffe) 65 /** @def KDBGADDR_C 66 * kDbg address constant. 67 * @param c The constant value. */ 68 #define KDBGADDR_C(c) KU64_C(c) 69 /** NIL address. */ 70 #define NIL_KDBGADDR KU64_MAX 71 43 72 44 73 /** @name Special Segments … … 47 76 * The specified offset is relative to the image base. The image base is the lowest memory 48 77 * address used by the image when loaded with the address assignments indicated in the image. */ 49 #define KDBGSEG_RVA (-1)78 #define KDBGSEG_RVA (-1) 50 79 /** Absolute segment. The offset isn't relative to anything. */ 51 #define KDBGSEG_ABS (-2)80 #define KDBGSEG_ABS (-2) 52 81 /** @} */ 53 82 83 84 /** The max filename path length used by the debug reader. */ 85 #define KDBG_PATH_MAX 260 54 86 55 87 /** … … 63 95 KDBGADDR offSegment; 64 96 /** The segment number. */ 65 int32_tiSegment;97 KI32 iSegment; 66 98 /** The Line number. */ 67 uint32_t iLine; 99 KU32 iLine; 100 /** The actual size of this structure. */ 101 KU16 cbSelf; 68 102 /** The length of the filename. */ 69 uint16_tcchFile;103 KU16 cchFile; 70 104 /** The name of the file this line number relates to. */ 71 105 char szFile[KDBG_PATH_MAX]; … … 105 139 * @{ */ 106 140 /** The symbol is weak. */ 107 #define KDBGSYM_FLAGS_WEAK UINT32_C(0x00000000)141 #define KDBGSYM_FLAGS_WEAK KU32_C(0x00000000) 108 142 /** The symbol is absolute. 109 143 * (This also indicated by the segment number.) */ 110 #define KDBGSYM_FLAGS_ABS UINT32_C(0x00000001)144 #define KDBGSYM_FLAGS_ABS KU32_C(0x00000001) 111 145 /** The symbol is exported. */ 112 #define KDBGSYM_FLAGS_EXPORTED UINT32_C(0x00000002)146 #define KDBGSYM_FLAGS_EXPORTED KU32_C(0x00000002) 113 147 /** The symbol is a function/method/procedure/whatever-executable-code. */ 114 #define KDBGSYM_FLAGS_CODE UINT32_C(0x00000004)148 #define KDBGSYM_FLAGS_CODE KU32_C(0x00000004) 115 149 /** The symbol is some kind of data. */ 116 #define KDBGSYM_FLAGS_DATA UINT32_C(0x00000008)150 #define KDBGSYM_FLAGS_DATA KU32_C(0x00000008) 117 151 /** @} */ 152 153 /** The max symbol name length used by the debug reader. */ 154 #define KDBG_SYMBOL_MAX 384 118 155 119 156 /** … … 130 167 KDBGADDR offSegment; 131 168 /** The segment number. */ 132 int32_tiSegment;169 KI32 iSegment; 133 170 /** The symbol flags. */ 134 uint32_tfFlags;171 KU32 fFlags; 135 172 /** @todo type info? */ 173 /** The actual size of this structure. */ 174 KU16 cbSelf; 136 175 /** The length of the symbol name. */ 137 uint16_tcchName;176 KU16 cchName; 138 177 /** The symbol name. */ 139 178 char szName[KDBG_SYMBOL_MAX]; … … 170 209 171 210 172 /** Pointer to a kDbgHlp file structure (abstract). */ 173 typedef struct KDBGHLPFILE *PKDBGHLPFILE; 174 175 /** A debug module handle. */ 211 /** Pointer to a debug module. */ 176 212 typedef struct KDBGMOD *PKDBGMOD; 177 178 /** 179 * The debug module method table. 180 */ 181 typedef struct KDBGMODOPS 182 { 183 /** The name of the reader. */ 184 const char *pszName; 185 186 /** Pointer to the next debug module readers. 187 * This is only used for dynamically registered readers. */ 188 struct KDBGMODOPS *pNext; 189 190 /** 191 * Tries to open the module. 192 * 193 * @returns 0 on success, KDBG_ERR on failure. 194 * @param pFile The file 195 * @param ppMod Where to store the module that's been opened. 196 * @param off The file offset of the debug info. This is 0 if there isn't 197 * any specfic debug info section and the reader should start 198 * looking for debug info at the start of the file. 199 * @param cb The size of the debug info in the file. INT64_MAX if we don't 200 * know or there isn't any particular debug info section in the file. 201 * @param pLdrMod The associated loader module. This can be NULL. 202 * 203 * @remark This is NULL for the builtin readers. 204 */ 205 int (*pfnOpen)(PKDBGMOD *ppMod, PKDBGHLPFILE pFile, KFOFF off, KFOFF cb, struct KLDRMOD *pLdrMod); 206 207 /** 208 * Closes the module. 209 * 210 * This should free all resources associated with the module 211 * except the pMod which is freed by the caller. 212 * 213 * @returns IPRT status code. 214 * @param pMod The module. 215 */ 216 int (*pfnClose)(PKDBGMOD pMod); 217 218 /** 219 * Gets a symbol by segment:offset. 220 * This will be approximated to the nearest symbol if there is no exact match. 221 * 222 * @returns 0 on success. KLDR_ERR_* on failure. 223 * @param pMod The module. 224 * @param iSegment The segment this offset is relative to. 225 * The -1 segment is special, it means that the addres is relative to 226 * the image base. The image base is where the first bit of the image 227 * is mapped during load. 228 * @param off The offset into the segment. 229 * @param pSym Where to store the symbol details. 230 */ 231 int (*pfnQuerySymbol)(PKDBGMOD pMod, KI32 iSegment, KDBGADDR off, PKDBGSYMBOL pSym); 232 233 /** 234 * Gets a line number entry by segment:offset. 235 * This will be approximated to the nearest line number there is no exact match. 236 * 237 * @returns 0 on success. KLDR_ERR_* on failure. 238 * @param pMod The module. 239 * @param iSegment The segment this offset is relative to. 240 * The -1 segment is special, it means that the addres is relative to 241 * the image base. The image base is where the first bit of the image 242 * is mapped during load. 243 * @param off The offset into the segment. 244 * @param pLine Where to store the line number details. 245 */ 246 int (*pfnQueryLine)(PKDBGMOD pMod, KI32 iSegment, KDBGADDR uOffset, PKDBGLINE pLine); 247 248 /** This is just to make sure you've initialized all the fields. 249 * Must be identical to pszName. */ 250 const char *pszName2; 251 } KDBGMODOPS; 252 /** Pointer to a module method table. */ 253 typedef KDBGMODOPS *PKDBGMODOPS; 254 /** Pointer to a const module method table. */ 255 typedef const KDBGMODOPS *PCKDBGMODOPS; 256 257 /** 258 * Register a debug module reader with the kDbgModule component. 259 * 260 * Dynamically registered readers are kept in FIFO order, and external 261 * readers will be tried after the builtin ones. 262 * 263 * @returns 0 on success. 264 * @returns KERR_INVALID_POINTER if pOps is missing bits. 265 * @returns KERR_INVALID_PARAMETER if pOps is already in the list. 266 * @param pOps The reader method table, kDbg takes owner ship of 267 * this. This must be writeable as the pNext pointer 268 * will be update. It must also stick around for as 269 * long as kDbg is in use. 270 */ 271 KDBG_DECL(int) kDbgModuleRegisterReader(PKDBGMODOPS pOps) 272 ; 273 274 275 276 /** 277 * Internal representation of a debug module. 278 */ 279 typedef struct KDBGMOD 280 { 281 /** Magic value (KDBGMOD_MAGIC). */ 282 KI32 u32Magic; 283 /** The handle to the module. (If closed, this is NIL_RTFILE.) */ 284 PKDBGHLPFILE pFile; 285 /** Pointer to the method table. */ 286 PCKDBGMODOPS pOps; 287 } KDBGMOD; 288 289 290 /** The magic value for the debug module structure. (Some dead english writer) */ 291 #define KDBGMOD_MAGIC 0x19200501 292 /** The magic value of a dead module structure. */ 293 #define KDBGMOD_MAGIC_DEAD 0x19991231 294 295 296 /** 297 * Opens the debug info for a specified executable module. 298 * 299 * @returns IPRT status code. 300 * @param pszModulePath The path to the executable module. 301 * @param ppDbgMod Where to store the debug module handle. 302 */ 303 KDBG_DECL(int) kDbgModuleOpen(const char *pszModulePath, PKDBGMOD *ppDbgMod); 304 305 /** 306 * Closes the module. 307 * 308 * @returns IPRT status code. 309 * @param pMod The module handle. 310 */ 213 /** Pointer to a debug module pointer. */ 214 typedef PKDBGMOD *PPKDBGMOD; 215 216 217 KDBG_DECL(int) kDbgModuleOpen(PPKDBGMOD ppDbgMod, const char *pszFilename, struct KLDRMOD *pLdrMod); 218 KDBG_DECL(int) kDbgModuleOpenFile(PPKDBGMOD ppDbgMod, PKRDR pRdr, struct KLDRMOD *pLdrMod); 219 KDBG_DECL(int) kDbgModuleOpenFilePart(PPKDBGMOD ppDbgMod, PKRDR pRdr, KFOFF off, KFOFF cb, struct KLDRMOD *pLdrMod); 311 220 KDBG_DECL(int) kDbgModuleClose(PKDBGMOD pMod); 312 313 /**314 * Gets a symbol by segment:offset.315 * This will be approximated to the nearest symbol if there is no exact match.316 *317 * @returns IPRT status code.318 * @param pMod The module.319 * @param iSegment The segment this offset is relative to.320 * The -1 segment is special, it means that the addres is relative to321 * the image base. The image base is where the first bit of the image322 * is mapped during load.323 * @param off The offset into the segment.324 * @param pSym Where to store the symbol details.325 */326 221 KDBG_DECL(int) kDbgModuleQuerySymbol(PKDBGMOD pMod, KI32 iSegment, KDBGADDR off, PKDBGSYMBOL pSym); 327 328 /**329 * Gets & allocates a symbol by segment:offset.330 * This will be approximated to the nearest symbol if there is no exact match.331 *332 * @returns IPRT status code.333 * @param pMod The module.334 * @param iSegment The segment this offset is relative to.335 * The -1 segment is special, it means that the addres is relative to336 * the image base. The image base is where the first bit of the image337 * is mapped during load.338 * @param off The offset into the segment.339 * @param ppSym Where to store the pointer to the symbol info.340 * Free the returned symbol using kDbgSymbolFree().341 */342 222 KDBG_DECL(int) kDbgModuleQuerySymbolA(PKDBGMOD pMod, KI32 iSegment, KDBGADDR off, PPKDBGSYMBOL ppSym); 343 344 /**345 * Gets a line number entry by segment:offset.346 * This will be approximated to the nearest line number there is no exact match.347 *348 * @returns IPRT status code.349 * @param pMod The module.350 * @param iSegment The segment this offset is relative to.351 * The -1 segment is special, it means that the addres is relative to352 * the image base. The image base is where the first bit of the image353 * is mapped during load.354 * @param off The offset into the segment.355 * @param pLine Where to store the line number details.356 */357 223 KDBG_DECL(int) kDbgModuleQueryLine(PKDBGMOD pMod, KI32 iSegment, KDBGADDR off, PKDBGLINE pLine); 358 359 /**360 * Gets & allocates a line number entry by segment:offset.361 * This will be approximated to the nearest line number there is no exact match.362 *363 * @returns IPRT status code.364 * @param pMod The module.365 * @param iSegment The segment this offset is relative to.366 * The -1 segment is special, it means that the addres is relative to367 * the image base. The image base is where the first bit of the image368 * is mapped during load.369 * @param off The offset into the segment.370 * @param ppLine Where to store the pointer to the line number info.371 * Free the returned line number using kDbgLineFree().372 */373 224 KDBG_DECL(int) kDbgModuleQueryLineA(PKDBGMOD pMod, KI32 iSegment, KDBGADDR off, PPKDBGLINE ppLine); 374 225 -
trunk/kStuff/include/k/kDefs.h
r3545 r3550 450 450 /** @} */ 451 451 452 /** @} */ 453 454 #endif 455 452 /** @def NULL 453 * The nil pointer value. */ 454 #ifndef NULL 455 # ifdef __cplusplus 456 # define NULL 0 457 # else 458 # define NULL ((void *)0) 459 # endif 460 #endif 461 462 /** @} */ 463 464 #endif 465 -
trunk/kStuff/include/k/kErrors.h
r3548 r3550 87 87 /** The (module) format isn't supported by this kDbg build. */ 88 88 #define KDBG_ERR_FORMAT_NOT_SUPPORTED (KDBG_ERR_BASE + 1) 89 /** The (module) format isn't supported by this kDbg build. */ 90 #define KDBG_ERR_BAD_EXE_FORMAT (KDBG_ERR_BASE + 2) 89 91 /** A specified address or an address found in the debug info is invalid. */ 90 #define KDBG_ERR_INVALID_ADDRESS (KDBG_ERR_BASE + 2)92 #define KDBG_ERR_INVALID_ADDRESS (KDBG_ERR_BASE + 3) 91 93 /** The dbghelp.dll is too old or something like that. */ 92 #define KDBG_ERR_DBGHLP_VERSION_MISMATCH (KDBG_ERR_BASE + 3)94 #define KDBG_ERR_DBGHLP_VERSION_MISMATCH (KDBG_ERR_BASE + 4) 93 95 /** @} */ 94 96 … … 96 98 * @{ */ 97 99 /** the base of the kRdr specific status codes. */ 98 #define KRDR_ERR_BASE (KDBG_ERR_BASE + 4)100 #define KRDR_ERR_BASE (KDBG_ERR_BASE + 5) 99 101 /** The file reader can't take more concurrent mappings. */ 100 102 #define KRDR_ERR_TOO_MANY_MAPPINGS (KRDR_ERR_BASE + 0) -
trunk/kStuff/include/k/kHlpAlloc.h
r3545 r3550 52 52 void * kHlpAlloc(KSIZE cb); 53 53 void * kHlpAllocZ(KSIZE cb); 54 void * kHlpDup( void *pv, KSIZE cb);55 void *kHlpStrDup(const char *psz);54 void * kHlpDup(const void *pv, KSIZE cb); 55 const char *kHlpStrDup(const char *psz); 56 56 void * kHlpRealloc(void *pv, KSIZE cb); 57 57 void kHlpFree(void *pv); -
trunk/kStuff/include/k/kHlpAssert.h
r3543 r3550 73 73 } while (0) 74 74 75 # define kHlpAssertReturnVoid(expr) \ 76 do { \ 77 if (!(expr)) \ 78 { \ 79 kHlpAssertMsg1(#expr, __FILE__, __LINE__, __FUNCTION__); \ 80 kHlpAssertBreakpoint(); \ 81 return; \ 82 } 83 } while (0) 84 75 85 # define kHlpAssertMsg(expr, msg) \ 76 86 do { \ … … 94 104 } while (0) 95 105 106 # define kHlpAssertMsgReturnVoid(expr, msg) \ 107 do { \ 108 if (!(expr)) \ 109 { \ 110 kHlpAssertMsg1(#expr, __FILE__, __LINE__, __FUNCTION__); \ 111 kHlpAssertMsg2 msg; \ 112 kHlpAssertBreakpoint(); \ 113 return; \ 114 } 115 } while (0) 116 96 117 #else /* !K_STRICT */ 97 118 # define kHlpAssert(expr) do { } while (0) 98 119 # define kHlpAssertReturn(expr, rcRet) do { if (!(expr)) return (rcRet); } while (0) 120 # define kHlpAssertReturnVoid(expr) do { if (!(expr)) return; } while (0) 99 121 # define kHlpAssertMsg(expr, msg) do { } while (0) 100 122 # define kHlpAssertMsgReturn(expr, msg, rcRet) do { if (!(expr)) return (rcRet); } while (0) 123 # define kHlpAssertMsgReturnVoid(expr, msg) do { if (!(expr)) return; } while (0) 101 124 #endif /* !K_STRICT */ 102 125 103 126 #define kHlpAssertPtr(ptr) kHlpAssertMsg(K_VALID_PTR(ptr), ("%s = %p\n", #ptr, (ptr))) 104 127 #define kHlpAssertPtrReturn(ptr, rcRet) kHlpAssertMsgReturn(K_VALID_PTR(ptr), ("%s = %p -> %d\n", #ptr, (ptr), (rcRet)), (rcRet)) 128 #define kHlpAssertPtrReturnVoid(ptr) kHlpAssertMsgReturnVoid(K_VALID_PTR(ptr), ("%s = %p -> %d\n", #ptr, (ptr), (rcRet))) 105 129 #define kHlpAssertPtrNull(ptr) kHlpAssertMsg(!(ptr) || K_VALID_PTR(ptr), ("%s = %p\n", #ptr, (ptr))) 106 130 #define kHlpAssertPtrNullReturn(ptr, rcRet) kHlpAssertMsgReturn(!(ptr) || K_VALID_PTR(ptr), ("%s = %p -> %d\n", #ptr, (ptr), (rcRet)), (rcRet)) 131 #define kHlpAssertPtrNullReturnVoid(ptr) kHlpAssertMsgReturnVoid(!(ptr) || K_VALID_PTR(ptr), ("%s = %p -> %d\n", #ptr, (ptr), (rcRet))) 107 132 #define kHlpAssertRC(rc) kHlpAssertMsg((rc) == 0, ("%s = %d\n", #rc, (rc))) 108 133 #define kHlpAssertRCReturn(rc, rcRet) kHlpAssertMsgReturn((rc) == 0, ("%s = %d -> %d\n", #rc, (rc), (rcRet)), (rcRet)) 134 #define kHlpAssertRCReturnVoid(rc) kHlpAssertMsgReturnVoid((rc) == 0, ("%s = %d -> %d\n", #rc, (rc), (rcRet))) 109 135 #define kHlpAssertFailed() kHlpAssert(0) 110 136 #define kHlpAssertFailedReturn(rcRet) kHlpAssertReturn(0, (rcRet)) 137 #define kHlpAssertFailedReturnVoid() kHlpAssertReturnVoid(0) 111 138 #define kHlpAssertMsgFailed(msg) kHlpAssertMsg(0, msg) 112 139 #define kHlpAssertMsgFailedReturn(msg, rcRet) kHlpAssertMsgReturn(0, msg, (rcRet)) 140 #define kHlpAssertMsgFailedReturnVoid(msg) kHlpAssertMsgReturnVoid(0, msg)) 113 141 114 142 /** -
trunk/kStuff/include/k/kHlpString.h
r3546 r3550 85 85 int kHlpMemIComp(const void *pv1, const void *pv2, KSIZE cb); 86 86 87 #ifndef kHlpStrCat 88 char *kHlpStrCat(char *psz1, const char *psz2); 89 #endif 90 #ifndef kHlpStrNCat 91 char *kHlpStrNCat(char *psz1, const char *psz2, KSIZE cb); 92 #endif 87 93 #ifndef kHlpStrChr 88 94 char *kHlpStrChr(const char *psz, int ch); 95 #endif 96 #ifndef kHlpStrRChr 97 char *kHlpStrRChr(const char *psz, int ch); 89 98 #endif 90 99 #ifndef kHlpStrComp … … 93 102 #ifndef kHlpStrNComp 94 103 int kHlpStrNComp(const char *psz1, const char *psz2, KSIZE cch); 104 #endif 105 #ifndef kHlpStrCopy 106 char *kHlpStrCopy(char *psz1, const char *psz2); 107 #endif 108 #ifndef kHlpStrNCopy 109 char *kHlpStrNCopy(char *psz1, const char *psz2, KSIZE cb); 95 110 #endif 96 111 #ifndef kHlpStrLen -
trunk/kStuff/include/k/kMagics.h
r3543 r3550 30 30 31 31 /** The magic for KRDR::u32Magic. (Katsu Aki (Katsuaki Nakamura)) 32 * @ingroup grp_kRdrAll */ 33 #define KRDR_MAGIC 0x19610919 34 /** The magic value for the debug module structure. (Some manga artist) 32 35 * @ingroup grp_kDbgAll */ 33 #define KRDR_MAGIC 0x19610919 34 36 #define KDBGMOD_MAGIC 0x19200501 35 37 36 38 #endif -
trunk/kStuff/include/k/kRdr.h
r3548 r3550 65 65 KRDR_DECL(KIPTR) kRdrNativeFH( PKRDR pRdr); 66 66 KRDR_DECL(KSIZE) kRdrPageSize( PKRDR pRdr); 67 #if ndef ___k_kLdr___67 #ifdef ___k_kLdr___ 68 68 KRDR_DECL(int) kRdrMap( PKRDR pRdr, void **ppvBase, KU32 cSegments, PCKLDRSEG paSegments, KBOOL fFixed); 69 69 KRDR_DECL(int) kRdrRefresh( PKRDR pRdr, void *pvBase, KU32 cSegments, PCKLDRSEG paSegments); … … 71 71 KRDR_DECL(int) kRdrUnmap( PKRDR pRdr, void *pvBase, KU32 cSegments, PCKLDRSEG paSegments); 72 72 #endif /* !___k_kLdr___ */ 73 KRDR_DECL(void) kRdrDone( PKRDR pRdr);73 KRDR_DECL(void) kRdrDone( PKRDR pRdr); 74 74 75 75 KRDR_DECL(int) kRdrBufOpen(PPKRDR ppRdr, const char *pszFilename); 76 KRDR_DECL(int) kRdrBufWrap(PPKRDR ppRdr, PKRDR pRdr); 77 KRDR_DECL(int) kRdrBufLine( PKRDR pRdr, char *pszLine, KSIZE cbLine); 76 KRDR_DECL(int) kRdrBufWrap(PPKRDR ppRdr, PKRDR pRdr, KBOOL fCloseIt); 77 KRDR_DECL(KBOOL) kRdrBufIsBuffered(PKRDR pRdr); 78 KRDR_DECL(int) kRdrBufLine(PKRDR pRdr, char *pszLine, KSIZE cbLine); 78 79 KRDR_DECL(int) kRdrBufLineEx(PKRDR pRdr, char *pszLine, KSIZE *pcbLine); 79 80 KRDR_DECL(const char *) kRdrBufLineQ(PKRDR pRdr); -
trunk/kStuff/include/k/kRdrAll.h
r3546 r3550 1 1 /* $Id$ */ 2 2 /** @file 3 * kRdr - The File Provider, All De pendencies Included.3 * kRdr - The File Provider, All Details and Dependencies Included. 4 4 */ 5 5 … … 25 25 */ 26 26 27 #ifndef ___k RdrAll_h___28 #define ___k RdrAll_h___27 #ifndef ___k_kRdrAll_h___ 28 #define ___k_kRdrAll_h___ 29 29 30 30 #include <k/kDefs.h> -
trunk/kStuff/include/k/kTypes.h
r3545 r3550 166 166 typedef signed char KI8; 167 167 typedef unsigned char KU8; 168 #define KI64_C(c) (c ## ULL)169 #define KU64_C(c) (c ## LL)168 #define KI64_C(c) (c ## LL) 169 #define KU64_C(c) (c ## ULL) 170 170 #define KI32_C(c) (c) 171 171 #define KU32_C(c) (c) … … 224 224 # define KX64_PRI "llx" 225 225 # endif 226 # define KI64_C(c) (c ## ULL)227 # define KU64_C(c) (c ## LL)226 # define KI64_C(c) (c ## LL) 227 # define KU64_C(c) (c ## ULL) 228 228 # else 229 229 typedef signed long int KI64; 230 230 typedef unsigned long int KU64; 231 # define KI64_C(c) (c ## UL)232 # define KU64_C(c) (c ## L)231 # define KI64_C(c) (c ## L) 232 # define KU64_C(c) (c ## UL) 233 233 # define KI64_PRI "ld" 234 234 # define KU64_PRI "lu"
Note:
See TracChangeset
for help on using the changeset viewer.