This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Add x86-64 ffsl alias only if __LP64__ is defined
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 16 Mar 2012 10:42:02 -0700
- Subject: PATCH: Add x86-64 ffsl alias only if __LP64__ is defined
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
When __LP64__ isn't defined, ffsll != ffsl. This patch adds the check
for __LP64__ when making ffsl alias. OK to install?
Thanks.
H.J.
---
2012-03-16 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/ffsll.c: Add ffsl alias only if __LP64__ is
defined.
diff --git a/sysdeps/x86_64/ffsll.c b/sysdeps/x86_64/ffsll.c
index 2808770..36b3e1b 100644
--- a/sysdeps/x86_64/ffsll.c
+++ b/sysdeps/x86_64/ffsll.c
@@ -1,7 +1,8 @@
/* ffsll -- find first set bit in a word, counted from least significant end.
For AMD x86-64.
This file is part of the GNU C Library.
- Copyright (C) 1991,92,93,94,97,98,2001 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,93,94,97,98,2001,2012
+ Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@cygnus.com>.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,5 +37,7 @@ ffsll (long long int x)
return cnt + 1;
}
+#ifdef __LP64__
#undef ffsl
weak_alias (ffsll, ffsl)
+#endif
--
1.7.6.5