Stable Compile-Time Options
Documentation for compile-time configuration macros. More...
Defines
| Name | |
|---|---|
| MPTAR_USE_STD Enables standard library dependencies, maps no-stdlib built-in functions to stdlib equivalents. |
|
| MPTAR_NO_STD Disable standard library dependencies (-DMPTAR_NO_STD) for freestanding/bare-metal environments. |
|
| MPTAR_NO_STD Disable standard library dependencies (-DMPTAR_NO_STD) for freestanding/bare-metal environments. |
|
| MPTAR_NO_READ Disable read support (-DMPTAR_NO_READ) to strip archive reading functionality and reduce binary size. |
|
| MPTAR_NO_WRITE Disable write support (-DMPTAR_NO_WRITE) to strip archive writing functionality and reduce binary size. |
|
| MPTAR_SUPPORT_SPECIAL Enable support for special TAR entry types (-DMPTAR_SUPPORT_SPECIAL) like long links, PAX headers, and sparse files. |
|
| MPTAR_NO_EXTRA_TIMES Removes extra timestamp support (-DMPTAR_NO_EXTRA_TIMES) to save on binary size. |
|
| mptar_u64toa Override for unsigned 64-bit integer to string conversion. |
|
| mptar_i64toa Override for signed 64-bit integer to string conversion. |
|
| mptar_atou64 Override for string to unsigned 64-bit integer conversion. |
|
| mptar_atoi64 Override for string to signed 64-bit integer conversion. |
|
| mptar_strlen Override for string length calculation. |
|
| mptar_strnlen Override for bounded string length calculation. |
|
| mptar_strncpy Override for bounded string copying. |
|
| mptar_memcpy Override for memory block copying. |
|
| mptar_memset Override for memory block setting. |
|
| mptar_memcmp Override for memory block comparison. |
|
| MPTAR_CUSTOM_U64TOA Legacy override for unsigned 64-bit integer to string. |
|
| MPTAR_CUSTOM_I64TOA Legacy override for signed 64-bit integer to string. |
|
| MPTAR_CUSTOM_ATOU64 Legacy override for string to unsigned 64-bit integer. |
|
| MPTAR_CUSTOM_ATOI64 Legacy override for string to signed 64-bit integer. |
|
| MPTAR_CUSTOM_STRLEN Legacy override for string length calculation. |
|
| MPTAR_CUSTOM_STRNLEN Legacy override for bounded string length calculation. |
|
| MPTAR_CUSTOM_STRNCPY Legacy override for bounded string copying. |
|
| MPTAR_CUSTOM_MEMCPY Legacy override for memory block copying. |
|
| MPTAR_CUSTOM_MEMSET Legacy override for memory block setting. |
|
| MPTAR_CUSTOM_MEMCMP Legacy override for memory block comparison. |
Detailed Description
Documentation for compile-time configuration macros.
Note: Custom function hooks can now be provided directly by defining the exact function name macro (e.g., #define mptar_strlen my_strlen). The legacy MPTAR_CUSTOM_* macros are deprecated but remain supported for backward compatibility.
Par: Default Implementations
When a stable function override is not explicitly defined, minipaxtar may map it to the corresponding standard C library function when the library is available and supported. For example, mptar_strlen maps to strlen when neither mptar_strlen nor the legacy MPTAR_CUSTOM_STRLEN is defined. When MPTAR_NO_STD is defined the functions are mapped to the built-in nostd replacements, by default it is defined unless MPTAR_USE_STD is defined.
The DOXYGEN_DOCS macro is used exclusively by documentation generators like Doxygen. Because minipaxtar enables reading and writing by default, these option macros (such as MPTAR_NO_READ) are not normally defined in the source code. Wrapping them in "#ifdef DOXYGEN_DOCS" allows Doxygen to index and document them without altering actual build configurations.
Stable configuration macros and custom conversion/string hooks.
These options, features, and custom conversion hooks are guaranteed stable and will follow standard deprecation cycles if ever slated for modification or removal.
Macros Documentation
define MPTAR_USE_STD
#define MPTAR_USE_STD
Enables standard library dependencies, maps no-stdlib built-in functions to stdlib equivalents.
It's recommended whenether using stdlib, could reduce size and improve performance.
define MPTAR_NO_STD
#define MPTAR_NO_STD
Disable standard library dependencies (-DMPTAR_NO_STD) for freestanding/bare-metal environments.
It's turned on by default, unless MPTAR_USE_STD is defined.
define MPTAR_NO_STD
#define MPTAR_NO_STD
Disable standard library dependencies (-DMPTAR_NO_STD) for freestanding/bare-metal environments.
It's turned on by default, unless MPTAR_USE_STD is defined.
define MPTAR_NO_READ
#define MPTAR_NO_READ
Disable read support (-DMPTAR_NO_READ) to strip archive reading functionality and reduce binary size.
define MPTAR_NO_WRITE
#define MPTAR_NO_WRITE
Disable write support (-DMPTAR_NO_WRITE) to strip archive writing functionality and reduce binary size.
define MPTAR_SUPPORT_SPECIAL
#define MPTAR_SUPPORT_SPECIAL
Enable support for special TAR entry types (-DMPTAR_SUPPORT_SPECIAL) like long links, PAX headers, and sparse files.
define MPTAR_NO_EXTRA_TIMES
#define MPTAR_NO_EXTRA_TIMES
Removes extra timestamp support (-DMPTAR_NO_EXTRA_TIMES) to save on binary size.
define mptar_u64toa
#define mptar_u64toa mptar_u64toa
Override for unsigned 64-bit integer to string conversion.
define mptar_i64toa
#define mptar_i64toa mptar_i64toa
Override for signed 64-bit integer to string conversion.
define mptar_atou64
#define mptar_atou64 mptar_atou64
Override for string to unsigned 64-bit integer conversion.
define mptar_atoi64
#define mptar_atoi64 mptar_atoi64
Override for string to signed 64-bit integer conversion.
define mptar_strlen
#define mptar_strlen mptar_strlen
Override for string length calculation.
define mptar_strnlen
#define mptar_strnlen mptar_strnlen
Override for bounded string length calculation.
define mptar_strncpy
#define mptar_strncpy mptar_strncpy
Override for bounded string copying.
define mptar_memcpy
#define mptar_memcpy mptar_memcpy
Override for memory block copying.
define mptar_memset
#define mptar_memset mptar_memset
Override for memory block setting.
define mptar_memcmp
#define mptar_memcmp mptar_memcmp
Override for memory block comparison.
define MPTAR_CUSTOM_U64TOA
#define MPTAR_CUSTOM_U64TOA
Legacy override for unsigned 64-bit integer to string.
Deprecated:
Use mptar_u64toa instead.
define MPTAR_CUSTOM_I64TOA
#define MPTAR_CUSTOM_I64TOA
Legacy override for signed 64-bit integer to string.
Deprecated:
Use mptar_i64toa instead.
define MPTAR_CUSTOM_ATOU64
#define MPTAR_CUSTOM_ATOU64
Legacy override for string to unsigned 64-bit integer.
Deprecated:
Use mptar_atou64 instead.
define MPTAR_CUSTOM_ATOI64
#define MPTAR_CUSTOM_ATOI64
Legacy override for string to signed 64-bit integer.
Deprecated:
Use mptar_atoi64 instead.
define MPTAR_CUSTOM_STRLEN
#define MPTAR_CUSTOM_STRLEN
Legacy override for string length calculation.
Deprecated:
Use mptar_strlen instead.
define MPTAR_CUSTOM_STRNLEN
#define MPTAR_CUSTOM_STRNLEN
Legacy override for bounded string length calculation.
Deprecated:
Use mptar_strnlen instead.
define MPTAR_CUSTOM_STRNCPY
#define MPTAR_CUSTOM_STRNCPY
Legacy override for bounded string copying.
Deprecated:
Use mptar_strncpy instead.
define MPTAR_CUSTOM_MEMCPY
#define MPTAR_CUSTOM_MEMCPY
Legacy override for memory block copying.
Deprecated:
Use mptar_memcpy instead.
define MPTAR_CUSTOM_MEMSET
#define MPTAR_CUSTOM_MEMSET
Legacy override for memory block setting.
Deprecated:
Use mptar_memset instead.
define MPTAR_CUSTOM_MEMCMP
#define MPTAR_CUSTOM_MEMCMP
Legacy override for memory block comparison.
Deprecated:
Use mptar_memcmp instead.
Updated on 2026-10-12 at 15:39:00 +0000