liblzma: Omit simple coder init functions if they are disabled.

This commit is contained in:
Lasse Collin 2022-11-25 18:04:37 +02:00
parent 5cd9f0df78
commit 90caaded2d
6 changed files with 24 additions and 0 deletions

View File

@ -53,6 +53,7 @@ arm_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
}
#ifdef HAVE_ENCODER_ARM
extern lzma_ret
lzma_simple_arm_encoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -60,8 +61,10 @@ lzma_simple_arm_encoder_init(lzma_next_coder *next,
{
return arm_coder_init(next, allocator, filters, true);
}
#endif
#ifdef HAVE_DECODER_ARM
extern lzma_ret
lzma_simple_arm_decoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -69,3 +72,4 @@ lzma_simple_arm_decoder_init(lzma_next_coder *next,
{
return arm_coder_init(next, allocator, filters, false);
}
#endif

View File

@ -58,6 +58,7 @@ armthumb_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
}
#ifdef HAVE_ENCODER_ARMTHUMB
extern lzma_ret
lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -65,8 +66,10 @@ lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
{
return armthumb_coder_init(next, allocator, filters, true);
}
#endif
#ifdef HAVE_DECODER_ARMTHUMB
extern lzma_ret
lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -74,3 +77,4 @@ lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
{
return armthumb_coder_init(next, allocator, filters, false);
}
#endif

View File

@ -94,6 +94,7 @@ ia64_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
}
#ifdef HAVE_ENCODER_IA64
extern lzma_ret
lzma_simple_ia64_encoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -101,8 +102,10 @@ lzma_simple_ia64_encoder_init(lzma_next_coder *next,
{
return ia64_coder_init(next, allocator, filters, true);
}
#endif
#ifdef HAVE_DECODER_IA64
extern lzma_ret
lzma_simple_ia64_decoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -110,3 +113,4 @@ lzma_simple_ia64_decoder_init(lzma_next_coder *next,
{
return ia64_coder_init(next, allocator, filters, false);
}
#endif

View File

@ -58,6 +58,7 @@ powerpc_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
}
#ifdef HAVE_ENCODER_POWERPC
extern lzma_ret
lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -65,8 +66,10 @@ lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
{
return powerpc_coder_init(next, allocator, filters, true);
}
#endif
#ifdef HAVE_DECODER_POWERPC
extern lzma_ret
lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -74,3 +77,4 @@ lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
{
return powerpc_coder_init(next, allocator, filters, false);
}
#endif

View File

@ -65,6 +65,7 @@ sparc_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
}
#ifdef HAVE_ENCODER_SPARC
extern lzma_ret
lzma_simple_sparc_encoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -72,8 +73,10 @@ lzma_simple_sparc_encoder_init(lzma_next_coder *next,
{
return sparc_coder_init(next, allocator, filters, true);
}
#endif
#ifdef HAVE_DECODER_SPARC
extern lzma_ret
lzma_simple_sparc_decoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -81,3 +84,4 @@ lzma_simple_sparc_decoder_init(lzma_next_coder *next,
{
return sparc_coder_init(next, allocator, filters, false);
}
#endif

View File

@ -141,6 +141,7 @@ x86_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
}
#ifdef HAVE_ENCODER_X86
extern lzma_ret
lzma_simple_x86_encoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -148,8 +149,10 @@ lzma_simple_x86_encoder_init(lzma_next_coder *next,
{
return x86_coder_init(next, allocator, filters, true);
}
#endif
#ifdef HAVE_DECODER_X86
extern lzma_ret
lzma_simple_x86_decoder_init(lzma_next_coder *next,
const lzma_allocator *allocator,
@ -157,3 +160,4 @@ lzma_simple_x86_decoder_init(lzma_next_coder *next,
{
return x86_coder_init(next, allocator, filters, false);
}
#endif