1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
Description: Use C99 fixed-size integer types
This fixes runtime assertion on 64bit architectures
other than amd64 and alpha.
Author: Adrian Bunk <bunk@debian.org>
Bug-Debian: https://bugs.debian.org/956927
--- wav2cdr-2.3.4.orig/chelp.h
+++ wav2cdr-2.3.4/chelp.h
@@ -76,6 +76,7 @@ HISTORY:
#ifndef CHELP_H
#define CHELP_H
+#include <stdint.h>
/* Mnemonics for logical and bit-wise operators
*/
@@ -166,32 +167,18 @@ typedef char string;
*/
#ifndef HAS_FIXEDSIZES
#define HAS_FIXEDSIZES
-typedef unsigned char UINT8, byte; /* 8 bits */
-typedef unsigned short UINT16, dbyte, word; /* 16 bits */
-#if defined(__alpha) OR defined(__x86_64__)
- typedef unsigned int UINT32,
+typedef uint8_t UINT8, byte; /* 8 bits */
+typedef uint16_t UINT16, dbyte, word; /* 16 bits */
+typedef uint32_t UINT32,
qbyte, dword, lword; /* 32 bits */
-#else
- typedef unsigned long UINT32,
- qbyte, dword, lword; /* 32 bits */
-#endif
-typedef signed char SINT8; /* 8 bits signed */
-typedef signed short SINT16; /* 16 bits signed */
-#if defined(__alpha) OR defined(__x86_64__)
- typedef signed int SINT32; /* 32 bits signed */
-#else
- typedef signed long SINT32; /* 32 bits signed */
-#endif
+typedef int8_t SINT8; /* 8 bits signed */
+typedef int16_t SINT16; /* 16 bits signed */
+typedef int32_t SINT32; /* 32 bits signed */
#ifdef ANSIEXT
-#ifdef __alpha
- typedef unsigned long UINT64, llword; /* 64 bits */
- typedef signed long SINT64; /* 64 bits signed */
-#else
- typedef unsigned long long UINT64, llword; /* 64 bits */
- typedef signed long long SINT64; /* 64 bits signed */
-#endif
+ typedef uint64_t UINT64, llword; /* 64 bits */
+ typedef int64_t SINT64; /* 64 bits signed */
#endif
/* check the sizes here? then we would depend on limits.h
better to require the user to use assert():
|