It does not attempt to emulate 64-bit integer support on compilers that do not have this capability natively.
You can test for the presence of 64-bit integer support by checking to see if POSH_64BIT_INTEGER is defined.
Types
POSH exports a signed and unsigned 64-bit type, posh_s64_t and posh_u64_t.
64-bit Constants
Different compilers require different ways to specify a 64-bit constant. POSH solves this by providing the cross-platform macros POSH_U64() and POSH_I64() to define unsigned and signed 64-bit constant values respectively.
Byte Swapping
64-bit version of the standard POSH byte swapping functions are available and documented on this page.
Serialization
64-bit versions of the standard POSH serialization functions are available and documented on this page.
Defines | |
| #define | POSH_I64_PRINTF_PREFIX |
| Constant string suitable for use as a printf modifier, e.g. | |
| #define | POSH_I64(x) |
| Macro to make a constant signed 64-bit value. | |
| #define | POSH_U64(x) |
| Macro to make a constant unsigned 64-bit value. | |
| #define | POSH_LittleU64(x) (x) |
| Convert native to 64-bit unsigned little-endian. | |
| #define | POSH_LittleI64(x) (x) |
| Convert native to 64-bit signed little-endian. | |
| #define | POSH_BigU64(x) POSH_SwapU64(x) |
| Convert native to 64-bit unsigned big-endian. | |
| #define | POSH_BigI64(x) POSH_SwapI64(x) |
| Convert native to 64-bit signed big-endian. | |
Functions | |
| posh_u64_t | POSH_SwapU64 (posh_u64_t v) |
| Byte swaps a 64-bit unsigned value. | |
| posh_i64_t | POSH_SwapI64 (posh_i64_t v) |
| Byte swaps a 64-bit signed value. | |
| posh_u64_t * | POSH_WriteU64ToLittle (void *dst, posh_u64_t value) |
| Writes an unsigned 64-bit value to a little-endian buffer. | |
| posh_i64_t * | POSH_WriteI64ToLittle (void *dst, posh_i64_t value) |
| Writes a signed 64-bit value to a little-endian buffer. | |
| posh_u64_t * | POSH_WriteU64ToBig (void *dst, posh_u64_t value) |
| Writes an unsigned 64-bit value to a big-endian buffer. | |
| posh_i64_t * | POSH_WriteI64ToBig (void *dst, posh_i64_t value) |
| Writes a signed 64-bit value to a big-endian buffer. | |
|
|
Macro to make a constant signed 64-bit value. This is a compiler specific type definition for a 64-bit constant value. You can test for the presence of this macro by seeing if POSH_64BIT_INTEGER is defined. |
|
|
Constant string suitable for use as a printf modifier, e.g.
printf( "%"POSH_I64_PRINTF_PREFIX"i |
|
|
Macro to make a constant unsigned 64-bit value. This is a compiler specific type definition for a 64-bit constant value. You can test for the presence of this macro by seeing if POSH_64BIT_INTEGER is defined. |
|
|
Byte swaps a 64-bit signed value.
Definition at line 386 of file posh.c. References posh_i64_t, POSH_SwapU64(), and posh_u64_t. |
|
|
Byte swaps a 64-bit unsigned value.
Definition at line 360 of file posh.c. References posh_byte_t, and posh_u64_t. Referenced by POSH_SwapI64(). |
|
||||||||||||
|
Writes a signed 64-bit value to a big-endian buffer.
Definition at line 623 of file posh.c. References posh_i64_t, posh_u64_t, and POSH_WriteU64ToBig(). |
|
||||||||||||
|
Writes a signed 64-bit value to a little-endian buffer.
Definition at line 584 of file posh.c. References posh_i64_t, posh_u64_t, and POSH_WriteU64ToLittle(). |
|
||||||||||||
|
Writes an unsigned 64-bit value to a big-endian buffer.
Definition at line 599 of file posh.c. References posh_byte_t, and posh_u64_t. Referenced by POSH_WriteI64ToBig(). |
|
||||||||||||
|
Writes an unsigned 64-bit value to a little-endian buffer.
Definition at line 560 of file posh.c. References posh_byte_t, and posh_u64_t. Referenced by POSH_WriteI64ToLittle(). |
1.3.7