mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-27 20:55:28 +08:00
Provide ffs() and ffsl() via builtins
This commit is contained in:
parent
293fefa43e
commit
524990c2ab
@ -88,12 +88,17 @@ void arc4rand(void *ptr, u_int len, int reseed);
|
|||||||
int bcmp(const void *, const void *, size_t);
|
int bcmp(const void *, const void *, size_t);
|
||||||
void *bsearch(const void *, const void *, size_t,
|
void *bsearch(const void *, const void *, size_t,
|
||||||
size_t, int (*)(const void *, const void *));
|
size_t, int (*)(const void *, const void *));
|
||||||
|
#ifndef __rtems__
|
||||||
#ifndef HAVE_INLINE_FFS
|
#ifndef HAVE_INLINE_FFS
|
||||||
int ffs(int);
|
int ffs(int);
|
||||||
#endif
|
#endif
|
||||||
#ifndef HAVE_INLINE_FFSL
|
#ifndef HAVE_INLINE_FFSL
|
||||||
int ffsl(long);
|
int ffsl(long);
|
||||||
#endif
|
#endif
|
||||||
|
#else /* __rtems__ */
|
||||||
|
#define ffs(_x) __builtin_ffs((unsigned int)(_x))
|
||||||
|
#define ffsl(_x) __builtin_ffsl((unsigned long)(_x))
|
||||||
|
#endif /* __rtems__ */
|
||||||
#ifndef HAVE_INLINE_FLS
|
#ifndef HAVE_INLINE_FLS
|
||||||
int fls(int);
|
int fls(int);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user