mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +03:00
Add fls() for non-constant values.
This commit is contained in:
@@ -40,17 +40,13 @@ __constant_flsl ( unsigned long x ) {
|
||||
return r;
|
||||
}
|
||||
|
||||
#define __constant_fls(x) __constant_flsl(x)
|
||||
|
||||
/* We don't actually have these functions yet */
|
||||
extern int __fls ( int x );
|
||||
extern int __flsl ( long x );
|
||||
|
||||
#define flsl( x ) \
|
||||
( __builtin_constant_p ( x ) ? __constant_flsl ( x ) : __flsl ( x ) )
|
||||
|
||||
#define fls( x ) \
|
||||
( __builtin_constant_p ( x ) ? __constant_fls ( x ) : __fls ( x ) )
|
||||
#define fls( x ) flsl ( x )
|
||||
|
||||
extern int strcasecmp ( const char *s1, const char *s2 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user