Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164295980
D40966.id124589.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40966.id124589.diff
View Options
diff --git a/lib/libc/string/ffs.c b/lib/libc/string/ffs.c
--- a/lib/libc/string/ffs.c
+++ b/lib/libc/string/ffs.c
@@ -47,5 +47,5 @@
int
ffs(int mask)
{
- return (__builtin_ffs(mask));
+ return (mask == 0 ? 0 : __builtin_ctz(mask) + 1);
}
diff --git a/lib/libc/string/ffsl.c b/lib/libc/string/ffsl.c
--- a/lib/libc/string/ffsl.c
+++ b/lib/libc/string/ffsl.c
@@ -44,5 +44,5 @@
int
ffsl(long mask)
{
- return (__builtin_ffsl(mask));
+ return (mask == 0 ? 0 : __builtin_ctzl(mask) + 1);
}
diff --git a/lib/libc/string/ffsll.c b/lib/libc/string/ffsll.c
--- a/lib/libc/string/ffsll.c
+++ b/lib/libc/string/ffsll.c
@@ -44,5 +44,5 @@
int
ffsll(long long mask)
{
- return (__builtin_ffsll(mask));
+ return (mask == 0 ? 0 : __builtin_ctzll(mask) + 1);
}
diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -124,3 +124,11 @@
"$OBJTOP"/obj-lib32/secure/lib/libcrypto \
"$OBJTOP"/obj-lib32/secure/lib/libssl
fi
+
+# 20230707 ee8b0c436d72 ffs/fls replaced
+clean_dep lib/libc ffs S
+clean_dep lib/libc ffsl S
+clean_dep lib/libc ffsll S
+clean_dep lib/libc fls S
+clean_dep lib/libc flsl S
+clean_dep lib/libc flsll S
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 31, 12:21 PM (17 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35783937
Default Alt Text
D40966.id124589.diff (1 KB)
Attached To
Mode
D40966: lib/libc/string/ffs*.c: fix problems introduced with D40730
Attached
Detach File
Event Timeline
Log In to Comment