* Avoid implementation-defined overflows during unsigned to signed casts */
| 59 | * Avoid implementation-defined overflows during unsigned to signed casts |
| 60 | */ |
| 61 | static inline char UIntToByte(unsigned i) |
| 62 | { |
| 63 | #if CHAR_MIN == 0 |
| 64 | return i; |
| 65 | #else |
| 66 | CharU2SConverter converter; |
| 67 | |
| 68 | converter.u = i; |
| 69 | return converter.s; |
| 70 | #endif |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Append the given int as big-endian 64-bit unsigned int |