Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Oct 2014 18:57:40 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272901 - head/contrib/netbsd-tests/lib/libc/gen
Message-ID:  <201410101857.s9AIve3K035257@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Fri Oct 10 18:57:39 2014
New Revision: 272901
URL: https://svnweb.freebsd.org/changeset/base/272901

Log:
  Disable tests that don't pass on FreeBSD due to missing support in
  humanize_number(3). Bringing in additional revisions from NetBSD's
  humanize_number(3) will fix the tests
  
  Account for the fact that util.h on NetBSD is libutil.h on FreeBSD
  
  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c	Fri Oct 10 18:57:12 2014	(r272900)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c	Fri Oct 10 18:57:39 2014	(r272901)
@@ -34,7 +34,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#if defined(__FreeBSD__)
+#include <libutil.h>
+#else
 #include <util.h>
+#endif
 
 const struct hnopts {
 	size_t ho_len;
@@ -78,6 +82,7 @@ const struct hnopts {
 	/*
 	 * Truncated output.  Rev. 1.7 produces "1.0 K".
 	 */
+#if !defined(__FreeBSD__)
 	{ 6, 1000, "A", HN_AUTOSCALE, HN_DECIMAL, -1, "" },
 
 	/*
@@ -90,6 +95,7 @@ const struct hnopts {
 	/* Similar case it prints 1000 where it shouldn't */
 	{ 5, 1023488, "",
 	  HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL, 4, "1.0M" },
+#endif
 	{ 5, 1023999, "",
 	  HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL, 4, "1.0M" },
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410101857.s9AIve3K035257>