summaryrefslogtreecommitdiffstats
path: root/sys/libkern
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1994-11-14 14:56:46 +0000
committerbde <bde@FreeBSD.org>1994-11-14 14:56:46 +0000
commit8332f818bd69473bb342bdbdb95095e8423161c3 (patch)
treec9955a7568dda1e25250b461bc469235d98e25b0 /sys/libkern
parent63ee9096f28a613cf2124ae39365e0761dded25a (diff)
downloadFreeBSD-src-8332f818bd69473bb342bdbdb95095e8423161c3.zip
FreeBSD-src-8332f818bd69473bb342bdbdb95095e8423161c3.tar.gz
Hide the declaration of ffs() if an inline ffs() is implemented.
I couldn't find a better way to avoid compiler warnings about redundant and/or inconsistent declaration of ffs(). I'd like to be able to declare prototypes in general headers without committing to implementing them as `static inline' or `extern', but there seems to be no way to do this with gcc-2.6.1. E.g., int foo(void); static __inline int foo(void) { return 1; } causes a warning about the linkage mismatch, while the opposite order causes a warning about the redundant declaration.
Diffstat (limited to 'sys/libkern')
-rw-r--r--sys/libkern/libkern.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/libkern/libkern.h b/sys/libkern/libkern.h
index 80d9e54..c53fcb3 100644
--- a/sys/libkern/libkern.h
+++ b/sys/libkern/libkern.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)libkern.h 8.1 (Berkeley) 6/10/93
- * $Id: libkern.h,v 1.3 1994/08/30 18:19:47 davidg Exp $
+ * $Id: libkern.h,v 1.4 1994/09/18 23:04:25 bde Exp $
*/
#include <sys/types.h>
@@ -49,7 +49,9 @@ static inline u_long ulmin(u_long a, u_long b) { return (a < b ? a : b); }
/* Prototypes for non-quad routines. */
int bcmp __P((const void *, const void *, size_t));
+#ifndef HAVE_INLINE_FFS
int ffs __P((int));
+#endif
int locc __P((int, char *, u_int));
u_long random __P((void));
char *rindex __P((const char *, int));
OpenPOWER on IntegriCloud