Switch off -Wmissing-prototypes for libgcc math functions
spl-generic.c defines some of the libgcc integer library functions on 32-bit. Don't bother checking -Wmissing-prototypes since nothing should directly call these functions from C code. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Closes #10470
This commit is contained in:
parent
eebba5d8f4
commit
c0673571d0
|
@ -929,32 +929,4 @@ void luaV_execute (lua_State *L) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* this can live in SPL
|
||||
*/
|
||||
#if BITS_PER_LONG == 32
|
||||
#if defined(_KERNEL) && !defined(SPL_HAS_MODDI3)
|
||||
extern uint64_t __umoddi3(uint64_t dividend, uint64_t divisor);
|
||||
|
||||
/* 64-bit signed modulo for 32-bit machines. */
|
||||
int64_t
|
||||
__moddi3(int64_t n, int64_t d)
|
||||
{
|
||||
int64_t q;
|
||||
boolean_t nn = B_FALSE;
|
||||
|
||||
if (n < 0) {
|
||||
nn = B_TRUE;
|
||||
n = -n;
|
||||
}
|
||||
if (d < 0)
|
||||
d = -d;
|
||||
|
||||
q = __umoddi3(n, d);
|
||||
|
||||
return (nn ? -q : q);
|
||||
}
|
||||
EXPORT_SYMBOL(__moddi3);
|
||||
#endif
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
|
|
@ -173,6 +173,7 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len)
|
|||
EXPORT_SYMBOL(random_get_pseudo_bytes);
|
||||
|
||||
#if BITS_PER_LONG == 32
|
||||
|
||||
/*
|
||||
* Support 64/64 => 64 division on a 32-bit platform. While the kernel
|
||||
* provides a div64_u64() function for this we do not use it because the
|
||||
|
@ -219,6 +220,14 @@ __div_u64(uint64_t u, uint32_t v)
|
|||
return (u);
|
||||
}
|
||||
|
||||
/*
|
||||
* Turn off missing prototypes warning for these functions. They are
|
||||
* replacements for libgcc-provided functions and will never be called
|
||||
* directly.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
||||
|
||||
/*
|
||||
* Implementation of 64-bit unsigned division for 32-bit machines.
|
||||
*
|
||||
|
@ -294,6 +303,26 @@ __umoddi3(uint64_t dividend, uint64_t divisor)
|
|||
}
|
||||
EXPORT_SYMBOL(__umoddi3);
|
||||
|
||||
/* 64-bit signed modulo for 32-bit machines. */
|
||||
int64_t
|
||||
__moddi3(int64_t n, int64_t d)
|
||||
{
|
||||
int64_t q;
|
||||
boolean_t nn = B_FALSE;
|
||||
|
||||
if (n < 0) {
|
||||
nn = B_TRUE;
|
||||
n = -n;
|
||||
}
|
||||
if (d < 0)
|
||||
d = -d;
|
||||
|
||||
q = __umoddi3(n, d);
|
||||
|
||||
return (nn ? -q : q);
|
||||
}
|
||||
EXPORT_SYMBOL(__moddi3);
|
||||
|
||||
/*
|
||||
* Implementation of 64-bit unsigned division/modulo for 32-bit machines.
|
||||
*/
|
||||
|
@ -397,6 +426,9 @@ __aeabi_ldivmod(int64_t u, int64_t v)
|
|||
}
|
||||
EXPORT_SYMBOL(__aeabi_ldivmod);
|
||||
#endif /* __arm || __arm__ */
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#endif /* BITS_PER_LONG */
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue