Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libutil If HAVE_SNPRINTB_M is defined, then do no...
details: https://anonhg.NetBSD.org/src/rev/3e2f87a1a59e
branches: trunk
changeset: 789111:3e2f87a1a59e
user: apb <apb%NetBSD.org@localhost>
date: Tue Aug 06 22:02:50 2013 +0000
description:
If HAVE_SNPRINTB_M is defined, then do not define the snprintb() and
snprintb_m() functions. This should allow this file to be compiled
from a tools build regardless of whether or not the host defines these
functions.
diffstat:
common/lib/libutil/snprintb.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (45 lines):
diff -r 7e8159a0a624 -r 3e2f87a1a59e common/lib/libutil/snprintb.c
--- a/common/lib/libutil/snprintb.c Tue Aug 06 21:58:46 2013 +0000
+++ b/common/lib/libutil/snprintb.c Tue Aug 06 22:02:50 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: snprintb.c,v 1.8 2013/07/09 16:10:17 uwe Exp $ */
+/* $NetBSD: snprintb.c,v 1.9 2013/08/06 22:02:50 apb Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
# include <sys/cdefs.h>
# if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: snprintb.c,v 1.8 2013/07/09 16:10:17 uwe Exp $");
+__RCSID("$NetBSD: snprintb.c,v 1.9 2013/08/06 22:02:50 apb Exp $");
# endif
# include <sys/types.h>
@@ -49,15 +49,16 @@
# include <stdio.h>
# include <util.h>
# include <errno.h>
-# else
+# else /* ! _KERNEL */
# include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.8 2013/07/09 16:10:17 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snprintb.c,v 1.9 2013/08/06 22:02:50 apb Exp $");
# include <sys/param.h>
# include <sys/inttypes.h>
# include <sys/systm.h>
# include <lib/libkern/libkern.h>
-# endif
+# endif /* ! _KERNEL */
+# ifndef HAVE_SNPRINTB_M
int
snprintb_m(char *buf, size_t buflen, const char *bitfmt, uint64_t val,
size_t l_max)
@@ -278,4 +279,5 @@
{
return snprintb_m(buf, buflen, bitfmt, val, 0);
}
-#endif
+# endif /* ! HAVE_SNPRINTB_M */
+#endif /* ! _STANDALONE */
Home |
Main Index |
Thread Index |
Old Index