mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-06-05 04:15:49 +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);
|
||||
void *bsearch(const void *, const void *, size_t,
|
||||
size_t, int (*)(const void *, const void *));
|
||||
#ifndef __rtems__
|
||||
#ifndef HAVE_INLINE_FFS
|
||||
int ffs(int);
|
||||
#endif
|
||||
#ifndef HAVE_INLINE_FFSL
|
||||
int ffsl(long);
|
||||
#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
|
||||
int fls(int);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user