Module Name:    src
Committed By:   apb
Date:           Tue Aug  6 22:02:50 UTC 2013

Modified Files:
        src/common/lib/libutil: snprintb.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/common/lib/libutil/snprintb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libutil/snprintb.c
diff -u src/common/lib/libutil/snprintb.c:1.8 src/common/lib/libutil/snprintb.c:1.9
--- src/common/lib/libutil/snprintb.c:1.8	Tue Jul  9 16:10:17 2013
+++ src/common/lib/libutil/snprintb.c	Tue Aug  6 22:02:50 2013
@@ -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 @@ __RCSID("$NetBSD: snprintb.c,v 1.8 2013/
 #  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 @@ snprintb(char *buf, size_t buflen, const
 {
 	return snprintb_m(buf, buflen, bitfmt, val, 0);
 }
-#endif
+# endif /* ! HAVE_SNPRINTB_M */
+#endif /* ! _STANDALONE */

Reply via email to