CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Tue Dec 20 07:48:04 UTC 2016 Modified Files: src/doc [netbsd-7]: CHANGES-7.1 Log Message: amend #1312 To generate a diff of this commit: cvs rdiff -u -r1.1.2.135 -r1.1.2.136 src/doc/CHANGES-7.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1 diff -u src/doc/CHANGES-7.1:1.1.2.135 src/doc/CHANGES-7.1:1.1.2.136 --- src/doc/CHANGES-7.1:1.1.2.135 Sun Dec 18 08:27:59 2016 +++ src/doc/CHANGES-7.1 Tue Dec 20 07:48:04 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1,v 1.1.2.135 2016/12/18 08:27:59 snj Exp $ +# $NetBSD: CHANGES-7.1,v 1.1.2.136 2016/12/20 07:48:04 snj Exp $ A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1 release: @@ -7617,7 +7617,7 @@ external/bsd/nvi/dist/common/key.h 1.3 external/bsd/nvi/dist/common/vi_db1.c 1.8 external/bsd/nvi/dist/docs/vi.man/vi.1 1.3, 1.4 external/bsd/nvi/dist/ex/ex_map.c 1.4 -external/bsd/nvi/dist/ex/ex_script.c 1.5, 1.6 +external/bsd/nvi/dist/ex/ex_script.c 1.5-1.7 external/bsd/nvi/usr.bin/nvi/Makefile 1.7 nvi: @@ -7625,7 +7625,9 @@ external/bsd/nvi/usr.bin/nvi/Makefile 1 - Fix the script command of vi(1). PR/50484 - Fix > 1024 char lines in script. - Fix synopsis for :tagprev. PR 51446. - [riastradh, ticket #1312] + - sscr_insert(): sh_prompt should be compared with t, not p + - replace strnstr(3) with memcmp(3) + [riastradh/rin, ticket #1312] usr.sbin/paxctl/paxctl.8 1.15
CVS commit: [netbsd-7-0] src/common/lib/libc/stdlib
Module Name:src Committed By: snj Date: Tue Dec 20 06:16:25 UTC 2016 Modified Files: src/common/lib/libc/stdlib [netbsd-7-0]: _strtoul.h Log Message: Pull up following revision(s) (requested by riastradh in ticket #1310): common/lib/libc/stdlib/_strtoul.h: revision 1.10 Set *endptr in all paths out of strtoul and family. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.8.1 src/common/lib/libc/stdlib/_strtoul.h 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/libc/stdlib/_strtoul.h diff -u src/common/lib/libc/stdlib/_strtoul.h:1.7 src/common/lib/libc/stdlib/_strtoul.h:1.7.8.1 --- src/common/lib/libc/stdlib/_strtoul.h:1.7 Fri May 17 12:55:56 2013 +++ src/common/lib/libc/stdlib/_strtoul.h Tue Dec 20 06:16:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: _strtoul.h,v 1.7 2013/05/17 12:55:56 joerg Exp $ */ +/* $NetBSD: _strtoul.h,v 1.7.8.1 2016/12/20 06:16:25 snj Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -67,7 +67,10 @@ INT_FUNCNAME(_int_, _FUNCNAME, _l)(const if (base && (base < 2 || base > 36)) { #if !defined(_KERNEL) && !defined(_STANDALONE) errno = EINVAL; - return(0); + if (endptr != NULL) + /* LINTED interface specification */ + *endptr = __UNCONST(nptr); + return 0; #else panic("%s: invalid base %d", __func__, base); #endif
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Tue Dec 20 06:16:43 UTC 2016 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: 1310 To generate a diff of this commit: cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.14 src/doc/CHANGES-7.0.3:1.1.2.15 --- src/doc/CHANGES-7.0.3:1.1.2.14 Sun Dec 18 08:48:09 2016 +++ src/doc/CHANGES-7.0.3 Tue Dec 20 06:16:43 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.14 2016/12/18 08:48:09 snj Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.15 2016/12/20 06:16:43 snj Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -216,3 +216,8 @@ sbin/ping/ping.c1.113 enough. [dholland, ticket #1333] +common/lib/libc/stdlib/_strtoul.h 1.10 + + Set *endptr in all paths out of strtoul and family. + [riastradh, ticket #1310] +
CVS commit: src/tests/lib/libm
Module Name:src Committed By: maya Date: Tue Dec 20 06:13:19 UTC 2016 Modified Files: src/tests/lib/libm: Makefile Log Message: define __TEST_FENV in the makefile for t_fe_round should fix vax build (it doesn't have fenv.h) To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/tests/lib/libm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libm/Makefile diff -u src/tests/lib/libm/Makefile:1.41 src/tests/lib/libm/Makefile:1.42 --- src/tests/lib/libm/Makefile:1.41 Mon Dec 19 17:38:24 2016 +++ src/tests/lib/libm/Makefile Tue Dec 20 06:13:19 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.41 2016/12/19 17:38:24 maya Exp $ +# $NetBSD: Makefile,v 1.42 2016/12/20 06:13:19 maya Exp $ .include @@ -9,6 +9,7 @@ COPTS+= -mfloat-ieee -mieee-with-inexact .endif CPPFLAGS.t_fenv.c+= -D__TEST_FENV +CPPFLAGS.t_fe_round.c+= -D__TEST_FENV CPPFLAGS.t_ilogb.c+= -D__TEST_FENV CPPFLAGS.t_fmod.c+= -I${.CURDIR}/../libc/gen
CVS commit: src/tests/lib/libm
Module Name:src Committed By: maya Date: Tue Dec 20 06:07:38 UTC 2016 Modified Files: src/tests/lib/libm: t_fe_round.c Log Message: use labs for absolute value of long should fix arm build To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libm/t_fe_round.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libm/t_fe_round.c diff -u src/tests/lib/libm/t_fe_round.c:1.1 src/tests/lib/libm/t_fe_round.c:1.2 --- src/tests/lib/libm/t_fe_round.c:1.1 Mon Dec 19 17:38:24 2016 +++ src/tests/lib/libm/t_fe_round.c Tue Dec 20 06:07:38 2016 @@ -79,7 +79,7 @@ ATF_TC_BODY(fe_round, tc) received = lrint(values[i].input); ATF_CHECK_MSG( - (abs(received - values[i].expected) < EPSILON), + (labs(received - values[i].expected) < EPSILON), "lrint rounding wrong, difference too large\n" "input: %f (index %d): got %ld, expected %ld\n", values[i].input, i, received, values[i].expected);
CVS commit: [netbsd-7] src/external/bsd/nvi/dist/ex
Module Name:src Committed By: snj Date: Tue Dec 20 05:25:26 UTC 2016 Modified Files: src/external/bsd/nvi/dist/ex [netbsd-7]: ex_script.c Log Message: Pull up following revision(s) (requested by rin in ticket #1312): external/bsd/nvi/dist/ex/ex_script.c: revision 1.7 improve logic related to sh_prompt: - sscr_insert(): sh_prompt should be compared with t, not p - replace strnstr(3) with memcmp(3) now, nvi is free from strnstr(3); it can be safely pulled-up into netbsd-7 To generate a diff of this commit: cvs rdiff -u -r1.4.6.1 -r1.4.6.2 src/external/bsd/nvi/dist/ex/ex_script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/nvi/dist/ex/ex_script.c diff -u src/external/bsd/nvi/dist/ex/ex_script.c:1.4.6.1 src/external/bsd/nvi/dist/ex/ex_script.c:1.4.6.2 --- src/external/bsd/nvi/dist/ex/ex_script.c:1.4.6.1 Sun Dec 18 06:37:30 2016 +++ src/external/bsd/nvi/dist/ex/ex_script.c Tue Dec 20 05:25:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ex_script.c,v 1.4.6.1 2016/12/18 06:37:30 snj Exp $ */ +/* $NetBSD: ex_script.c,v 1.4.6.2 2016/12/20 05:25:26 snj Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. @@ -19,7 +19,7 @@ static const char sccsid[] = "Id: ex_script.c,v 10.38 2001/06/25 15:19:19 skimo Exp (Berkeley) Date: 2001/06/25 15:19:19 "; #endif /* not lint */ #else -__RCSID("$NetBSD: ex_script.c,v 1.4.6.1 2016/12/18 06:37:30 snj Exp $"); +__RCSID("$NetBSD: ex_script.c,v 1.4.6.2 2016/12/20 05:25:26 snj Exp $"); #endif #include @@ -274,7 +274,7 @@ sscr_exec(SCR *sp, db_recno_t lno) return (1); INT2CHAR(sp, ip, ilen, p, last_len); if (last_len == sc->sh_prompt_len && - strnstr(p, sc->sh_prompt, last_len) == p) { + memcmp(p, sc->sh_prompt, last_len) == 0) { matchprompt = 1; GET_SPACE_RETC(sp, bp, blen, last_len + 128); memmove(bp, p, last_len); @@ -294,7 +294,8 @@ sscr_exec(SCR *sp, db_recno_t lno) INT2CHAR(sp, ip, ilen, p, len); /* Delete any prompt. */ - if (strnstr(p, sc->sh_prompt, len) == p) { + if (len >= sc->sh_prompt_len && + memcmp(p, sc->sh_prompt, sc->sh_prompt_len) == 0) { len -= sc->sh_prompt_len; if (len == 0) { empty: msgq(sp, M_BERR, "151|No command to execute"); @@ -473,7 +474,7 @@ more: switch (nr = read(sc->sh_master, e */ len = p - t; if (sc->sh_prompt == NULL || len != sc->sh_prompt_len || - strnstr(p, sc->sh_prompt, len) == NULL) { + memcmp(t, sc->sh_prompt, len) != 0) { tv.tv_sec = 0; tv.tv_usec = 10; FD_ZERO(&rdfd); @@ -509,7 +510,7 @@ more: switch (nr = read(sc->sh_master, e /* * sscr_setprompt -- * - * Set the prompt to the last line we got from the shell. + * Set the prompt in external ("char") encoding. * */ static int
CVS commit: src/sbin/routed
Module Name:src Committed By: ozaki-r Date: Tue Dec 20 03:35:13 UTC 2016 Modified Files: src/sbin/routed: table.c Log Message: Fix that routed deletes local routes routed previousely ignored local routes, which have RTF_LOCAL flag, because such routes have RTF_LLINFO and routed ignored routes having the flag. When we obsoleted RTF_LLINFO, we removed the ignoring logic from routed, then routed started removing local routes unexpectedly. Fix this behavior by teaching local routes to routed to ignore them. kardel@ reported the issue and helped testing, thanks! To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sbin/routed/table.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/routed/table.c diff -u src/sbin/routed/table.c:1.26 src/sbin/routed/table.c:1.27 --- src/sbin/routed/table.c:1.26 Fri Oct 7 22:32:50 2016 +++ src/sbin/routed/table.c Tue Dec 20 03:35:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: table.c,v 1.26 2016/10/07 22:32:50 joerg Exp $ */ +/* $NetBSD: table.c,v 1.27 2016/12/20 03:35:12 ozaki-r Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -36,7 +36,7 @@ #include "defs.h" #ifdef __NetBSD__ -__RCSID("$NetBSD: table.c,v 1.26 2016/10/07 22:32:50 joerg Exp $"); +__RCSID("$NetBSD: table.c,v 1.27 2016/12/20 03:35:12 ozaki-r Exp $"); #elif defined(__FreeBSD__) __RCSID("$FreeBSD$"); #else @@ -778,6 +778,7 @@ static struct khash { #define KS_DYNAMIC 0x080 /* result of redirect */ #define KS_DELETED 0x100 /* already deleted from kernel */ #define KS_CHECK 0x200 +#define KS_LOCAL 0x400 time_t k_keep; #define K_KEEP_LIM 30 time_t k_redirect_time; /* when redirected route 1st seen */ @@ -924,11 +925,13 @@ rtm_add(struct rt_msghdr *rtm, } k->k_state &= ~(KS_DELETE | KS_ADD | KS_CHANGE | KS_DEL_ADD | KS_DELETED | KS_GATEWAY | KS_STATIC - | KS_NEW | KS_CHECK); + | KS_NEW | KS_CHECK | KS_LOCAL); if (rtm->rtm_flags & RTF_GATEWAY) k->k_state |= KS_GATEWAY; if (rtm->rtm_flags & RTF_STATIC) k->k_state |= KS_STATIC; + if (rtm->rtm_flags & RTF_LOCAL) + k->k_state |= KS_LOCAL; if (0 != (rtm->rtm_flags & (RTF_DYNAMIC | RTF_MODIFIED))) { if (INFO_AUTHOR(info) != 0 @@ -964,7 +967,7 @@ rtm_add(struct rt_msghdr *rtm, /* If it is not a static route, quit until the next comparison * between the kernel and daemon tables, when it will be deleted. */ - if (!(k->k_state & KS_STATIC)) { + if (!(k->k_state & KS_STATIC) && !(k->k_state & KS_LOCAL)) { k->k_state |= KS_DELETE; LIM_SEC(need_kern, k->k_keep); return; @@ -1363,7 +1366,7 @@ kern_out(struct ag_info *ag) return; } - if (k->k_state & KS_STATIC) + if ((k->k_state & KS_STATIC) || (k->k_state & KS_LOCAL)) return; /* modify existing kernel entry if necessary */ @@ -1512,6 +1515,12 @@ fix_kern(void) continue; } + /* Do not touch local routes */ + if (k->k_state & KS_LOCAL) { +pk = &k->k_next; +continue; + } + /* check hold on routes deleted by the operator */ if (k->k_keep > now.tv_sec) { /* ensure we check when the hold is over */
CVS commit: src/external/bsd/nvi/dist/ex
Module Name:src Committed By: rin Date: Mon Dec 19 17:51:40 UTC 2016 Modified Files: src/external/bsd/nvi/dist/ex: ex_script.c Log Message: improve logic related to sh_prompt: - sscr_insert(): sh_prompt should be compared with t, not p - replace strnstr(3) with memcmp(3) now, nvi is free from strnstr(3); it can be safely pulled-up into netbsd-7 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/nvi/dist/ex/ex_script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/nvi/dist/ex/ex_script.c diff -u src/external/bsd/nvi/dist/ex/ex_script.c:1.6 src/external/bsd/nvi/dist/ex/ex_script.c:1.7 --- src/external/bsd/nvi/dist/ex/ex_script.c:1.6 Sun Nov 29 17:09:33 2015 +++ src/external/bsd/nvi/dist/ex/ex_script.c Mon Dec 19 17:51:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ex_script.c,v 1.6 2015/11/29 17:09:33 christos Exp $ */ +/* $NetBSD: ex_script.c,v 1.7 2016/12/19 17:51:40 rin Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. @@ -19,7 +19,7 @@ static const char sccsid[] = "Id: ex_script.c,v 10.38 2001/06/25 15:19:19 skimo Exp (Berkeley) Date: 2001/06/25 15:19:19 "; #endif /* not lint */ #else -__RCSID("$NetBSD: ex_script.c,v 1.6 2015/11/29 17:09:33 christos Exp $"); +__RCSID("$NetBSD: ex_script.c,v 1.7 2016/12/19 17:51:40 rin Exp $"); #endif #include @@ -274,7 +274,7 @@ sscr_exec(SCR *sp, db_recno_t lno) return (1); INT2CHAR(sp, ip, ilen, p, last_len); if (last_len == sc->sh_prompt_len && - strnstr(p, sc->sh_prompt, last_len) == p) { + memcmp(p, sc->sh_prompt, last_len) == 0) { matchprompt = 1; GET_SPACE_RETC(sp, bp, blen, last_len + 128); memmove(bp, p, last_len); @@ -294,7 +294,8 @@ sscr_exec(SCR *sp, db_recno_t lno) INT2CHAR(sp, ip, ilen, p, len); /* Delete any prompt. */ - if (strnstr(p, sc->sh_prompt, len) == p) { + if (len >= sc->sh_prompt_len && + memcmp(p, sc->sh_prompt, sc->sh_prompt_len) == 0) { len -= sc->sh_prompt_len; if (len == 0) { empty: msgq(sp, M_BERR, "151|No command to execute"); @@ -473,7 +474,7 @@ more: switch (nr = read(sc->sh_master, e */ len = p - t; if (sc->sh_prompt == NULL || len != sc->sh_prompt_len || - strnstr(p, sc->sh_prompt, len) == NULL) { + memcmp(t, sc->sh_prompt, len) != 0) { tv.tv_sec = 0; tv.tv_usec = 10; FD_ZERO(&rdfd); @@ -509,7 +510,7 @@ more: switch (nr = read(sc->sh_master, e /* * sscr_setprompt -- * - * Set the prompt to the last line we got from the shell. + * Set the prompt in external ("char") encoding. * */ static int
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: maya Date: Mon Dec 19 17:38:39 UTC 2016 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi Log Message: adjust set lists for t_fe_round To generate a diff of this commit: cvs rdiff -u -r1.187 -r1.188 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.709 -r1.710 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.187 src/distrib/sets/lists/debug/mi:1.188 --- src/distrib/sets/lists/debug/mi:1.187 Wed Dec 14 19:29:31 2016 +++ src/distrib/sets/lists/debug/mi Mon Dec 19 17:38:38 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.187 2016/12/14 19:29:31 rjs Exp $ +# $NetBSD: mi,v 1.188 2016/12/19 17:38:38 maya Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -2131,6 +2131,7 @@ ./usr/libdata/debug/usr/tests/lib/libm/t_erf.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libm/t_exp.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libm/t_fenv.debug tests-lib-debug debug,atf,compattestfile +./usr/libdata/debug/usr/tests/lib/libm/t_fe_round.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libm/t_floor.debug tests-obsolete obsolete,compattestfile ./usr/libdata/debug/usr/tests/lib/libm/t_fmod.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libm/t_hypot.debug tests-lib-debug debug,atf,compattestfile Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.709 src/distrib/sets/lists/tests/mi:1.710 --- src/distrib/sets/lists/tests/mi:1.709 Thu Dec 15 12:56:52 2016 +++ src/distrib/sets/lists/tests/mi Mon Dec 19 17:38:38 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.709 2016/12/15 12:56:52 kre Exp $ +# $NetBSD: mi,v 1.710 2016/12/19 17:38:38 maya Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2954,6 +2954,7 @@ ./usr/tests/lib/libm/t_erf tests-lib-tests compattestfile,atf ./usr/tests/lib/libm/t_exp tests-lib-tests compattestfile,atf ./usr/tests/lib/libm/t_fenv tests-lib-tests compattestfile,atf +./usr/tests/lib/libm/t_fe_round tests-lib-tests compattestfile,atf ./usr/tests/lib/libm/t_floor tests-obsolete obsolete ./usr/tests/lib/libm/t_fmod tests-lib-tests compattestfile,atf ./usr/tests/lib/libm/t_hypot tests-lib-tests compattestfile,atf
CVS commit: src/tests/lib/libm
Module Name:src Committed By: maya Date: Mon Dec 19 17:38:24 UTC 2016 Modified Files: src/tests/lib/libm: Makefile Added Files: src/tests/lib/libm: t_fe_round.c Log Message: add test for fesetround/fegetround that uses lrint (and tests it a bunch). It doesn't fail on amd64. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/tests/lib/libm/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libm/t_fe_round.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libm/Makefile diff -u src/tests/lib/libm/Makefile:1.40 src/tests/lib/libm/Makefile:1.41 --- src/tests/lib/libm/Makefile:1.40 Wed Aug 31 14:05:10 2016 +++ src/tests/lib/libm/Makefile Mon Dec 19 17:38:24 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.40 2016/08/31 14:05:10 maya Exp $ +# $NetBSD: Makefile,v 1.41 2016/12/19 17:38:24 maya Exp $ .include @@ -23,6 +23,7 @@ TESTS_C+= t_cosh TESTS_C+= t_erf TESTS_C+= t_exp TESTS_C+= t_fenv +TESTS_C+= t_fe_round TESTS_C+= t_fmod TESTS_C+= t_hypot TESTS_C+= t_ilogb Added files: Index: src/tests/lib/libm/t_fe_round.c diff -u /dev/null src/tests/lib/libm/t_fe_round.c:1.1 --- /dev/null Mon Dec 19 17:38:24 2016 +++ src/tests/lib/libm/t_fe_round.c Mon Dec 19 17:38:24 2016 @@ -0,0 +1,124 @@ +/* + * Written by Maya Rashish + * Public domain. + * + * Testing IEEE-754 rounding modes (and lrint) + */ + +#include +#include +#ifdef __HAVE_FENV +#include +#include +#include + +/*#pragma STDC FENV_ACCESS ON gcc?? */ + +#define INT 9223L + +#define EPSILON 0.001 + +static const struct { + int round_mode; + double input; + long int expected; +} values[] = { + { FE_DOWNWARD, 3.7, 3}, + { FE_DOWNWARD, -3.7, -4}, + { FE_DOWNWARD, +0, 0}, + { FE_DOWNWARD, -INT-0.01, -INT-1}, + { FE_DOWNWARD, +INT-0.01, INT-1}, + { FE_DOWNWARD, -INT+0.01, -INT}, + { FE_DOWNWARD, +INT+0.01, INT}, +#if 0 /* cpu bugs? */ + { FE_DOWNWARD, -0, -1}, + + { FE_UPWARD, +0, 1}, +#endif + { FE_UPWARD, -0, 0}, + { FE_UPWARD, -123.7, -123}, + { FE_UPWARD, 123.999, 124}, + { FE_UPWARD, -INT-0.01, -INT}, + { FE_UPWARD, +INT-0.01, INT}, + { FE_UPWARD, -INT+0.01, -INT+1}, + { FE_UPWARD, +INT+0.01, INT+1}, + + { FE_TOWARDZERO, 1.99, 1}, + { FE_TOWARDZERO, -1.99, -1}, + { FE_TOWARDZERO, 0.2, 0}, + { FE_TOWARDZERO, INT+0.01, INT}, + { FE_TOWARDZERO, INT-0.01, INT - 1}, + { FE_TOWARDZERO, -INT+0.01, -INT + 1}, + { FE_TOWARDZERO, +0, 0}, + { FE_TOWARDZERO, -0, 0}, + + { FE_TONEAREST, -INT-0.01, -INT}, + { FE_TONEAREST, +INT-0.01, INT}, + { FE_TONEAREST, -INT+0.01, -INT}, + { FE_TONEAREST, +INT+0.01, INT}, + { FE_TONEAREST, -INT-0.501, -INT-1}, + { FE_TONEAREST, +INT-0.501, INT-1}, + { FE_TONEAREST, -INT+0.501, -INT+1}, + { FE_TONEAREST, +INT+0.501, INT+1}, + { FE_TONEAREST, +0, 0}, + { FE_TONEAREST, -0, 0}, +}; + +ATF_TC(fe_round); +ATF_TC_HEAD(fe_round, tc) +{ + atf_tc_set_md_var(tc, "descr","Checking IEEE 754 rounding modes using lrint"); +} + +ATF_TC_BODY(fe_round, tc) +{ + long int received; + + for (unsigned int i = 0; i < __arraycount(values); i++) { + fesetround(values[i].round_mode); + + received = lrint(values[i].input); + ATF_CHECK_MSG( + (abs(received - values[i].expected) < EPSILON), + "lrint rounding wrong, difference too large\n" + "input: %f (index %d): got %ld, expected %ld\n", + values[i].input, i, received, values[i].expected); + + /* Do we get the same rounding mode out? */ + ATF_CHECK_MSG( + (fegetround() == values[i].round_mode), + "Didn't get the same rounding mode out!\n" + "(index %d) fed in %d rounding mode, got %d out\n", + i, fegetround(), values[i].round_mode); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, fe_round); + + return atf_no_error(); +} +#else +ATF_TC(t_nofe_round); + +ATF_TC_HEAD(t_nofe_round, tc) +{ + atf_tc_set_md_var(tc, "descr", + "dummy test case - no fenv.h support"); +} + + +ATF_TC_BODY(t_nofe_round, tc) +{ + atf_tc_skip("no fenv.h support on this architecture"); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, t_nofe_round); + return atf_no_error(); +} + +#endif
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Mon Dec 19 17:31:47 UTC 2016 Modified Files: src/external/gpl2/xcvs/dist/src: update.c Log Message: fix the usage message To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/gpl2/xcvs/dist/src/update.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/update.c diff -u src/external/gpl2/xcvs/dist/src/update.c:1.9 src/external/gpl2/xcvs/dist/src/update.c:1.10 --- src/external/gpl2/xcvs/dist/src/update.c:1.9 Sun Dec 18 23:54:49 2016 +++ src/external/gpl2/xcvs/dist/src/update.c Mon Dec 19 12:31:47 2016 @@ -38,7 +38,7 @@ * as well. */ #include -__RCSID("$NetBSD: update.c,v 1.9 2016/12/19 04:54:49 christos Exp $"); +__RCSID("$NetBSD: update.c,v 1.10 2016/12/19 17:31:47 christos Exp $"); #include "cvs.h" #include @@ -127,12 +127,12 @@ static const char *const update_usage[] "\t-l\tLocal directory only, no recursion.\n", "\t-R\tProcess directories recursively.\n", "\t-p\tSend updates to standard output (avoids stickiness).\n", +"\t-t\tPreserve timestamps on update.\n", "\t-k kopt\tUse RCS kopt -k option on checkout. (is sticky)\n", "\t-r rev\tUpdate using specified revision/tag (is sticky).\n", "\t-D date\tSet date to update from (is sticky).\n", "\t-j rev\tMerge in changes made between current revision and rev.\n", "\t-I ign\tMore files to ignore (! to reset).\n", -"\t-t Preserve timestamps on update.\n", "\t-W spec\tWrappers specification line.\n", "(Specify the --help global option for a list of other help options)\n", NULL
CVS commit: src/distrib/evbarm/instkernel/sshramdisk
Module Name:src Committed By: christos Date: Mon Dec 19 16:23:10 UTC 2016 Modified Files: src/distrib/evbarm/instkernel/sshramdisk: Makefile Log Message: give it a bit more room. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/distrib/evbarm/instkernel/sshramdisk/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbarm/instkernel/sshramdisk/Makefile diff -u src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.10 src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.11 --- src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.10 Mon Dec 19 10:50:13 2016 +++ src/distrib/evbarm/instkernel/sshramdisk/Makefile Mon Dec 19 11:23:10 2016 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.10 2016/12/19 15:50:13 christos Exp $ +# $NetBSD: Makefile,v 1.11 2016/12/19 16:23:10 christos Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" IMAGE= sshramdisk.fs -IMAGESIZE= 19000k +IMAGESIZE= 2k MAKEFS_FLAGS= -f 15 WARNS= 1
CVS commit: src/distrib/evbarm/instkernel/sshramdisk
Module Name:src Committed By: christos Date: Mon Dec 19 15:50:13 UTC 2016 Modified Files: src/distrib/evbarm/instkernel/sshramdisk: Makefile Log Message: grow so that new intel firmware fits. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/distrib/evbarm/instkernel/sshramdisk/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbarm/instkernel/sshramdisk/Makefile diff -u src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.9 src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.10 --- src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.9 Wed Jul 15 07:24:03 2015 +++ src/distrib/evbarm/instkernel/sshramdisk/Makefile Mon Dec 19 10:50:13 2016 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.9 2015/07/15 11:24:03 martin Exp $ +# $NetBSD: Makefile,v 1.10 2016/12/19 15:50:13 christos Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" IMAGE= sshramdisk.fs -IMAGESIZE= 14848k +IMAGESIZE= 19000k MAKEFS_FLAGS= -f 15 WARNS= 1
CVS commit: src/share/man/man4
Module Name:src Committed By: ryoon Date: Mon Dec 19 15:09:38 UTC 2016 Modified Files: src/share/man/man4: axe.4 Log Message: Add UE-200TX-G To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/axe.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/axe.4 diff -u src/share/man/man4/axe.4:1.11 src/share/man/man4/axe.4:1.12 --- src/share/man/man4/axe.4:1.11 Mon Dec 19 15:08:03 2016 +++ src/share/man/man4/axe.4 Mon Dec 19 15:09:38 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: axe.4,v 1.11 2016/12/19 15:08:03 ryoon Exp $ +.\" $NetBSD: axe.4,v 1.12 2016/12/19 15:09:38 ryoon Exp $ .\" .\" Copyright (c) 2003-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -99,6 +99,7 @@ driver supports the following adapters: .It Netgear FA120 .It Nintendo Wii USB Lan Ethernet Adapter RVL-015 .It OQO model 01+ Ethernet +.It Planex UE-200TX-G .It Sitecom LN-029 .It SMC 2209USB/ETH .It SnapPort USB 2.0 LAN Adapter
CVS commit: src/share/man/man4
Module Name:src Committed By: ryoon Date: Mon Dec 19 15:08:03 UTC 2016 Modified Files: src/share/man/man4: axe.4 Log Message: Add LAN-TXU2C and LAN-TXU2H3A To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/axe.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/axe.4 diff -u src/share/man/man4/axe.4:1.10 src/share/man/man4/axe.4:1.11 --- src/share/man/man4/axe.4:1.10 Mon Dec 19 14:55:32 2016 +++ src/share/man/man4/axe.4 Mon Dec 19 15:08:03 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: axe.4,v 1.10 2016/12/19 14:55:32 ryoon Exp $ +.\" $NetBSD: axe.4,v 1.11 2016/12/19 15:08:03 ryoon Exp $ .\" .\" Copyright (c) 2003-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -94,6 +94,8 @@ driver supports the following adapters: .It Linksys USB200M .It Linksys USB1000 .It Logitec LAN-GTJ/U2 +.It Logitec LAN-TXU2C +.It Logitec LAN-TXU2H3A .It Netgear FA120 .It Nintendo Wii USB Lan Ethernet Adapter RVL-015 .It OQO model 01+ Ethernet
CVS commit: src/share/man/man4
Module Name:src Committed By: ryoon Date: Mon Dec 19 15:03:59 UTC 2016 Modified Files: src/share/man/man4: cdce.4 Log Message: Add Anker A7611 and DIEWU USB-DW8152, and bump date To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/cdce.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/cdce.4 diff -u src/share/man/man4/cdce.4:1.12 src/share/man/man4/cdce.4:1.13 --- src/share/man/man4/cdce.4:1.12 Mon Jan 5 10:48:40 2015 +++ src/share/man/man4/cdce.4 Mon Dec 19 15:03:59 2016 @@ -25,9 +25,9 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $NetBSD: cdce.4,v 1.12 2015/01/05 10:48:40 jmcneill Exp $ +.\" $NetBSD: cdce.4,v 1.13 2016/12/19 15:03:59 ryoon Exp $ .\" -.Dd January 5, 2015 +.Dd December 19, 2016 .Dt CDCE 4 .Os .Sh NAME @@ -47,6 +47,10 @@ including the following: .It Acer Labs USB 2.0 Data Link .It +Anker A7611 +.It +DIEWU USB-DW8152 +.It G.Mate YP3X00 .It Motorola USBNET
CVS commit: src/share/man/man4
Module Name:src Committed By: ryoon Date: Mon Dec 19 14:55:32 UTC 2016 Modified Files: src/share/man/man4: axe.4 Log Message: Add LUA3-U2-ATX and bump date To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/axe.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/axe.4 diff -u src/share/man/man4/axe.4:1.9 src/share/man/man4/axe.4:1.10 --- src/share/man/man4/axe.4:1.9 Sun Dec 4 11:31:55 2016 +++ src/share/man/man4/axe.4 Mon Dec 19 14:55:32 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: axe.4,v 1.9 2016/12/04 11:31:55 skrll Exp $ +.\" $NetBSD: axe.4,v 1.10 2016/12/19 14:55:32 ryoon Exp $ .\" .\" Copyright (c) 2003-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -60,7 +60,7 @@ .\" $FreeBSD: /repoman/r/ncvs/src/share/man/man4/axe.4,v 1.3 2003/05/29 21:28:35 ru Exp $ .\" $OpenBSD: axe.4,v 1.37 2009/11/08 20:25:29 jasper Exp $ .\" -.Dd December 4, 2016 +.Dd December 19, 2016 .Dt AXE 4 .Os .Sh NAME @@ -81,6 +81,7 @@ driver supports the following adapters: .It Billionton Systems USB2AR .It Buffalo(MELCO) LUA-U2-GT .It Buffalo(MELCO) LUA-U2-KTX +.It Buffalo(MELCO) LUA3-U2-ATX .It Corega FEther USB2-TX .It D-Link DUB-E100 .It Good Way GWUSB2E
CVS commit: src/lib/libc/arch/powerpc/string
Module Name:src Committed By: christos Date: Mon Dec 19 14:30:23 UTC 2016 Modified Files: src/lib/libc/arch/powerpc/string: bzero.S Log Message: PR/50228: Christian Groessler: fix bzero(ptr, 0) on ppc. Check for 0 length before jumping to cb_memset like memset does. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/arch/powerpc/string/bzero.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/powerpc/string/bzero.S diff -u src/lib/libc/arch/powerpc/string/bzero.S:1.14 src/lib/libc/arch/powerpc/string/bzero.S:1.15 --- src/lib/libc/arch/powerpc/string/bzero.S:1.14 Thu Sep 12 11:36:15 2013 +++ src/lib/libc/arch/powerpc/string/bzero.S Mon Dec 19 09:30:23 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bzero.S,v 1.14 2013/09/12 15:36:15 joerg Exp $ */ +/* $NetBSD: bzero.S,v 1.15 2016/12/19 14:30:23 christos Exp $ */ /*- * Copyright (C) 2001 Martin J. Laubach @@ -32,7 +32,7 @@ #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: bzero.S,v 1.14 2013/09/12 15:36:15 joerg Exp $") +__RCSID("$NetBSD: bzero.S,v 1.15 2016/12/19 14:30:23 christos Exp $") #endif /* LIBC_SCCS && !lint */ #include "assym.h" @@ -54,6 +54,8 @@ __RCSID("$NetBSD: bzero.S,v 1.14 2013/09 .align 4 ENTRY(bzero) li r_val, 0 /* Value to stuff in */ + cmplwi %cr1, %r4, 0 /* Zero length? */ + beqlr- %cr1 /* Yes, do nothing */ b cb_memset END(bzero)
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: abhinav Date: Mon Dec 19 14:10:57 UTC 2016 Modified Files: src/usr.sbin/makemandb: makemandb.c Log Message: Escape hyphen when parsing .Nd To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/makemandb/makemandb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/makemandb.c diff -u src/usr.sbin/makemandb/makemandb.c:1.45 src/usr.sbin/makemandb/makemandb.c:1.46 --- src/usr.sbin/makemandb/makemandb.c:1.45 Sat Dec 17 17:04:38 2016 +++ src/usr.sbin/makemandb/makemandb.c Mon Dec 19 14:10:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: makemandb.c,v 1.45 2016/12/17 17:04:38 abhinav Exp $ */ +/* $NetBSD: makemandb.c,v 1.46 2016/12/19 14:10:57 abhinav Exp $ */ /* * Copyright (c) 2011 Abhinav Upadhyay * Copyright (c) 2011 Kristaps Dzonsons @@ -17,7 +17,7 @@ */ #include -__RCSID("$NetBSD: makemandb.c,v 1.45 2016/12/17 17:04:38 abhinav Exp $"); +__RCSID("$NetBSD: makemandb.c,v 1.46 2016/12/19 14:10:57 abhinav Exp $"); #include #include @@ -996,6 +996,8 @@ pmdoc_Nd(const struct roff_node *n, mand { if (n->type == ROFFT_BODY) deroff(&rec->name_desc, n); + if (rec->name_desc) + replace_hyph(rec->name_desc); }
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Dec 19 13:45:57 UTC 2016 Modified Files: src/share/man/man9: uvm_hotplug.9 Log Message: Various improvements. New sentence, new line. Better punctuation. More appropriate macros. More markup. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/uvm_hotplug.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/uvm_hotplug.9 diff -u src/share/man/man9/uvm_hotplug.9:1.1 src/share/man/man9/uvm_hotplug.9:1.2 --- src/share/man/man9/uvm_hotplug.9:1.1 Mon Dec 19 12:21:29 2016 +++ src/share/man/man9/uvm_hotplug.9 Mon Dec 19 13:45:57 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: uvm_hotplug.9,v 1.1 2016/12/19 12:21:29 cherry Exp $ +.\" $NetBSD: uvm_hotplug.9,v 1.2 2016/12/19 13:45:57 wiz Exp $ .\" .\" Copyright (c) 2016 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -75,39 +75,44 @@ .Fn uvm_physseg_unplug "paddr_t pfn" "size_t npages" .Sh DESCRIPTION These utility routines provide the ability to tell -.Pq Xr uvm 9 +.Xr uvm 9 about system memory segments. When the kernel is compiled with -.Cd 'options UVM_HOTPLUG' -, memory segments are handled in a dynamic data structure +.Cd 'options UVM_HOTPLUG' , +memory segments are handled in a dynamic data structure .Pq Xr rbtree 3 -compared to a static array when not. This enables kernel code to add +compared to a static array when not. +This enables kernel code to add or remove information about memory segments at any point after boot - thus "hotplug". .Pp -.Fn uvm_page_physload -.Fn uvm_page_physunload +.Fn uvm_page_physload , +.Fn uvm_page_physunload , and .Fn uvm_page_physunload_force -are legacy interfaces which may be removed in the future. They must +are legacy interfaces which may be removed in the future. +They must never be used after -.Pq Xr uvm_init 9 +.Xr uvm_init 9 . .Pp -WARNING: This is an experimental feature and should not be used in production -environments. Furthermore, attempting to "hotplug" without +.Em WARNING: +This is an experimental feature and should not be used in production +environments. +Furthermore, attempting to "hotplug" without .Cd 'options UVM_HOTPLUG' after boot will almost certainly end in a -.Pq Xr panic 9 +.Xr panic 9 . .Sh USAGE .Ss INITIALIZING HOTPLUG The function .Fn uvm_physseg_init -initializes the hotplug subsystem. This is expected to happen exactly +initializes the hotplug subsystem. +This is expected to happen exactly once, at boot time, and from MD code. .Ss PLUGGING IN MEMORY .Fn uvm_page_physload registers -.Pq Xr uvm 9 +.Xr uvm 9 with a memory segment span, and on a specified .Fa free_list. It must be called at system boot time as part of setting up memory @@ -128,7 +133,7 @@ Available starting page frame number of .It Fa avail_end Available ending page frame number of the physical memory segments. .It Fa free_list -The free list type are defined in the Machine Dependent code. +The free list types are defined in the Machine Dependent code. .El .Pp This function returns a valid @@ -139,15 +144,16 @@ when the plug fails. .Pp .Fn uvm_physseg_plug registers -.Pq Xr uvm 9 +.Xr uvm 9 with a memory segment span. It can also be called to initiate a hotplug and register a newly -"hotplugged" physical memory range into the VM. Unlike +"hotplugged" physical memory range into the VM. +Unlike .Fn uvm_page_physload this function can, if .Cd 'options UVM_HOTPLUG' is enabled at compile time, be used after -.Pq Xr uvm_init 9 +.Xr uvm_init 9 . The arguments describe the start page frame, the number of pages to plug starting from the start page frame and an optional return variable, which points to a valid @@ -160,31 +166,31 @@ Starting page frame number of the physic Total number of pages from the starting page frame number to plug in. .It Fa upmp If upmp is not -.Fa NULL , +.Dv NULL , then on a successful plug, a valid pointer to the uvm_physseg_t handle for the segment which was plugged is returned. .El .Pp This function returns .Fa true -when a successful plug occurs, +when a successful plug occurs, .Fa false otherwise. .Ss UNPLUGGING MEMORY The functions -.Fn uvm_page_physunload -, -.Fn uvm_page_physunload_force +.Fn uvm_page_physunload , +.Fn uvm_page_physunload_force , and .Fn uvm_physseg_unplug make -.Pq Xr uvm 9 +.Xr uvm 9 forget about previously registered memory segments or portions of such. .Pp .Fn uvm_page_physunload unloads pages from a segment (from the front or from the back) -depending on its availability. When the last page is removed, the +depending on its availability. +When the last page is removed, the segment handle is invalidated and supporting metadata is freed. .Pp Note: This function can only be used during boot time. Pages, once unloaded, are unregistered from uvm and are therefore @@ -197,7 +203,7 @@ The arguments are: .It Fa upm The handle
CVS commit: src/sys/kern
Module Name:src Committed By: cherry Date: Mon Dec 19 13:02:15 UTC 2016 Modified Files: src/sys/kern: subr_extent.c Log Message: panic() must be able to take varargs - in userspace testing too. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/kern/subr_extent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_extent.c diff -u src/sys/kern/subr_extent.c:1.79 src/sys/kern/subr_extent.c:1.80 --- src/sys/kern/subr_extent.c:1.79 Mon Aug 24 22:50:32 2015 +++ src/sys/kern/subr_extent.c Mon Dec 19 13:02:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_extent.c,v 1.79 2015/08/24 22:50:32 pooka Exp $ */ +/* $NetBSD: subr_extent.c,v 1.80 2016/12/19 13:02:14 cherry Exp $ */ /*- * Copyright (c) 1996, 1998, 2007 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_extent.c,v 1.79 2015/08/24 22:50:32 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_extent.c,v 1.80 2016/12/19 13:02:14 cherry Exp $"); #ifdef _KERNEL #ifdef _KERNEL_OPT @@ -81,7 +81,7 @@ pool_get(pool, flags) kmem_alloc((pool) #define \ pool_put(pool, rp) kmem_free(rp,0) #define \ -panic(a) printf(a) +panic(a ...) printf(a) #define mutex_init(a, b, c) #define mutex_destroy(a) #define mutex_enter(l)
CVS commit: src/sys/net
Module Name:src Committed By: roy Date: Mon Dec 19 11:17:00 UTC 2016 Modified Files: src/sys/net: route.h Log Message: Fix gcc complaining about int to unsigned long conversion issues by explictly marking as unsigned in RT_ROUNDUP2. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/net/route.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/route.h diff -u src/sys/net/route.h:1.110 src/sys/net/route.h:1.111 --- src/sys/net/route.h:1.110 Fri Dec 16 20:11:52 2016 +++ src/sys/net/route.h Mon Dec 19 11:17:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: route.h,v 1.110 2016/12/16 20:11:52 christos Exp $ */ +/* $NetBSD: route.h,v 1.111 2016/12/19 11:17:00 roy Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -286,7 +286,7 @@ struct rt_msghdr { #define RTAX_TAG 8 /* route tag */ #define RTAX_MAX 9 /* size of array to allocate */ -#define RT_ROUNDUP2(a, n) ((a) > 0 ? (1 + (((a) - 1) | ((n) - 1))) : (n)) +#define RT_ROUNDUP2(a, n) ((a) > 0 ? (1 + (((a) - 1U) | ((n) - 1))) : (n)) #define RT_ROUNDUP(a) RT_ROUNDUP2((a), sizeof(uint64_t)) #define RT_ADVANCE(x, n) (x += RT_ROUNDUP((n)->sa_len))