From owner-svn-src-stable-10@freebsd.org Sat Feb 11 07:35:29 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27B43CDB3BA; Sat, 11 Feb 2017 07:35:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C82C61C8F; Sat, 11 Feb 2017 07:35:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1B7ZRCF028650; Sat, 11 Feb 2017 07:35:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1B7ZROH028648; Sat, 11 Feb 2017 07:35:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702110735.v1B7ZROH028648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 11 Feb 2017 07:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313632 - in stable/10/contrib/netbsd-tests/lib/libc/gen: . posix_spawn X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2017 07:35:29 -0000 Author: ngie Date: Sat Feb 11 07:35:27 2017 New Revision: 313632 URL: https://svnweb.freebsd.org/changeset/base/313632 Log: MFC r312102,r312108: r312102: Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD r312108: Delete trailing whitespace and use __arraycount instead of nitems in contrib code Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Feb 11 07:14:45 2017 (r313631) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c Sat Feb 11 07:35:27 2017 (r313632) @@ -60,16 +60,16 @@ get_different_scheduler(void) /* get current schedule policy */ scheduler = sched_getscheduler(0); - for (i = 0; i < nitems(schedulers); i++) { + for (i = 0; i < __arraycount(schedulers); i++) { if (schedulers[i] == scheduler) break; } - ATF_REQUIRE_MSG(i < nitems(schedulers), + ATF_REQUIRE_MSG(i < __arraycount(schedulers), "Unknown current scheduler %d", scheduler); - + /* new scheduler */ i++; - if (i >= nitems(schedulers)) + if (i >= __arraycount(schedulers)) i = 0; return schedulers[i]; } @@ -85,7 +85,7 @@ get_different_priority(int scheduler) sched_getparam(0, ¶m); priority = param.sched_priority; - + /* * Change numerical value of the priority, to ensure that it * was set for the spawned child. @@ -127,7 +127,7 @@ ATF_TC_BODY(t_spawnattr, tc) scheduler = get_different_scheduler(); priority = get_different_priority(scheduler); sp.sched_priority = priority; - + sigemptyset(&sig); sigaddset(&sig, SIGUSR1); Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Feb 11 07:14:45 2017 (r313631) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_sleep.c Sat Feb 11 07:35:27 2017 (r313632) @@ -27,6 +27,7 @@ */ #ifdef __FreeBSD__ +/* kqueue(2) on FreeBSD requires sys/types.h for uintptr_t; NetBSD doesn't. */ #include #endif #include