CVS commit: src/bin/df
Module Name:src Committed By: ginsbach Date: Wed Jan 6 20:38:09 UTC 2021 Modified Files: src/bin/df: df.1 Log Message: df: bump man page date To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/bin/df/df.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/df/df.1 diff -u src/bin/df/df.1:1.55 src/bin/df/df.1:1.56 --- src/bin/df/df.1:1.55 Sun Jan 3 01:43:12 2021 +++ src/bin/df/df.1 Wed Jan 6 20:38:09 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: df.1,v 1.55 2021/01/03 01:43:12 ginsbach Exp $ +.\" $NetBSD: df.1,v 1.56 2021/01/06 20:38:09 ginsbach Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)df.1 8.2 (Berkeley) 1/13/92 .\" -.Dd September 23, 2019 +.Dd January 2, 2021 .Dt DF 1 .Os .Sh NAME
CVS commit: src/bin/df
Module Name:src Committed By: ginsbach Date: Sun Jan 3 01:43:13 UTC 2021 Modified Files: src/bin/df: df.1 df.c Log Message: df: add grand total option Add a grand total option, -c, similar to the du(1) -c option. Adapted from the same option (-c) in FreeBSD df(1). To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/bin/df/df.1 cvs rdiff -u -r1.97 -r1.98 src/bin/df/df.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/df/df.1 diff -u src/bin/df/df.1:1.54 src/bin/df/df.1:1.55 --- src/bin/df/df.1:1.54 Mon Sep 23 15:24:44 2019 +++ src/bin/df/df.1 Sun Jan 3 01:43:12 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: df.1,v 1.54 2019/09/23 15:24:44 christos Exp $ +.\" $NetBSD: df.1,v 1.55 2021/01/03 01:43:12 ginsbach Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -37,7 +37,7 @@ .Nd display free disk space .Sh SYNOPSIS .Nm -.Op Fl aglnW +.Op Fl acglnW .Op Fl Ghkm | Fl ihkm | Fl Pk .Op Fl t Ar type .Op Ar file | Ar file_system ... @@ -72,6 +72,8 @@ Show all mount points, including those that were mounted with the .Dv MNT_IGNORE flag. +.It Fl c +Display a grand total for all shown mount points. .It Fl G Display all the fields of the structure(s) returned by .Xr statvfs 2 . Index: src/bin/df/df.c diff -u src/bin/df/df.c:1.97 src/bin/df/df.c:1.98 --- src/bin/df/df.c:1.97 Fri Aug 21 16:41:06 2020 +++ src/bin/df/df.c Sun Jan 3 01:43:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: df.c,v 1.97 2020/08/21 16:41:06 ryo Exp $ */ +/* $NetBSD: df.c,v 1.98 2021/01/03 01:43:12 ginsbach Exp $ */ /* * Copyright (c) 1980, 1990, 1993, 1994 @@ -45,7 +45,7 @@ __COPYRIGHT( #if 0 static char sccsid[] = "@(#)df.c 8.7 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: df.c,v 1.97 2020/08/21 16:41:06 ryo Exp $"); +__RCSID("$NetBSD: df.c,v 1.98 2021/01/03 01:43:12 ginsbach Exp $"); #endif #endif /* not lint */ @@ -67,6 +67,7 @@ __RCSID("$NetBSD: df.c,v 1.97 2020/08/21 #include static char *getmntpt(const char *); +static void addstat(struct statvfs *, const struct statvfs *); static void prtstat(const struct statvfs *, int); static int selected(const char *, size_t); static void maketypelist(char *); @@ -75,7 +76,7 @@ __dead static void usage(void); static void prthumanval(int64_t, int); static void prthuman(const struct statvfs *, int64_t, int64_t); -static int aflag, gflag, hflag, iflag, lflag, nflag, Pflag, Wflag; +static int aflag, cflag, gflag, hflag, iflag, lflag, nflag, Pflag, Wflag; static long usize; static char **typelist; @@ -87,7 +88,7 @@ int main(int argc, char *argv[]) { struct stat stbuf; - struct statvfs *mntbuf; + struct statvfs *mntbuf, totals; int ch, maxwidth, width; size_t i, mntcount; char *mntpt; @@ -95,11 +96,14 @@ main(int argc, char *argv[]) setprogname(argv[0]); (void)setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "aGghiklmnPt:W")) != -1) + while ((ch = getopt(argc, argv, "acGghiklmnPt:W")) != -1) switch (ch) { case 'a': aflag = 1; break; + case 'c': + cflag = 1; + break; case 'g': hflag = 0; usize = 1024 * 1024 * 1024; @@ -207,15 +211,28 @@ main(int argc, char *argv[]) } } + if (cflag) { + memset(&totals, 0, sizeof(totals)); + totals.f_bsize = DEV_BSIZE; + strlcpy(totals.f_mntfromname, "total", + sizeof(totals.f_mntfromname)); + } + maxwidth = 0; for (i = 0; i < mntcount; i++) { width = (int)strlen(Wflag && mntbuf[i].f_mntfromlabel[0] ? mntbuf[i].f_mntfromlabel : mntbuf[i].f_mntfromname); if (width > maxwidth) maxwidth = width; + if (cflag) + addstat(&totals, &mntbuf[i]); } for (i = 0; i < mntcount; i++) prtstat(&mntbuf[i], maxwidth); + + if (cflag) + prtstat(&totals, maxwidth); + return 0; } @@ -361,6 +378,22 @@ prthuman(const struct statvfs *sfsp, int (int64_t)(num) / (int64_t)((bs) / (fsbs)) : \ (int64_t)(num) * (int64_t)((fsbs) / (bs))) +static void +addstat(struct statvfs *totalfsp, const struct statvfs *sfsp) +{ + uint64_t frsize; + + frsize = sfsp->f_frsize / totalfsp->f_frsize; + totalfsp->f_blocks += sfsp->f_blocks * frsize; + totalfsp->f_bfree += sfsp->f_bfree * frsize; + totalfsp->f_bavail += sfsp->f_bavail * frsize; + totalfsp->f_bresvd += sfsp->f_bresvd * frsize; + totalfsp->f_files += sfsp->f_files; + totalfsp->f_ffree += sfsp->f_ffree; + totalfsp->f_favail += sfsp->f_favail; + totalfsp->f_fresvd += sfsp->f_fresvd; +} + /* * Print out status about a filesystem. */
CVS commit: src/usr.bin/nl
Module Name:src Committed By: ginsbach Date: Thu Dec 31 04:07:37 UTC 2020 Modified Files: src/usr.bin/nl: nl.c Log Message: PR/55891 supress displaying separator when numbers supressed Fix based on patch provided by Kobayashi Takashi. This brings nl(1) further in to POSIX compliance. Verified behavior with classic SysV nl(1) and GNU nl(1). There could still be edge cases here not specified by POSIX. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/nl/nl.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.bin/nl/nl.c diff -u src/usr.bin/nl/nl.c:1.14 src/usr.bin/nl/nl.c:1.15 --- src/usr.bin/nl/nl.c:1.14 Wed Dec 30 01:42:31 2020 +++ src/usr.bin/nl/nl.c Thu Dec 31 04:07:37 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nl.c,v 1.14 2020/12/30 01:42:31 ginsbach Exp $ */ +/* $NetBSD: nl.c,v 1.15 2020/12/31 04:07:37 ginsbach Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1999\ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: nl.c,v 1.14 2020/12/30 01:42:31 ginsbach Exp $"); +__RCSID("$NetBSD: nl.c,v 1.15 2020/12/31 04:07:37 ginsbach Exp $"); #endif #include @@ -332,13 +332,13 @@ filter(void) if (donumber) { consumed = snprintf(intbuffer, intbuffersize, format, width, line); - (void)printf("%s", - intbuffer + max(0, consumed - width)); + (void)printf("%s%s", + intbuffer + max(0, consumed - width), sep); line += incr; } else { - (void)printf("%*s", width, ""); + (void)printf("%*s%*s", width, "", (int)strlen(sep), ""); } - (void)printf("%s%s", sep, buffer); + (void)printf("%s", buffer); if (ferror(stdout)) err(EXIT_FAILURE, "output error");
CVS commit: src/usr.bin/nl
Module Name:src Committed By: ginsbach Date: Wed Dec 30 01:42:31 UTC 2020 Modified Files: src/usr.bin/nl: nl.c Log Message: nl: fix -d delim parsing for POSIX POSIX specifies it is possible to specify a one delimiter character. Fix the logic so that both one and two character delimiters are accepted. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/nl/nl.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.bin/nl/nl.c diff -u src/usr.bin/nl/nl.c:1.13 src/usr.bin/nl/nl.c:1.14 --- src/usr.bin/nl/nl.c:1.13 Tue Dec 22 17:50:55 2020 +++ src/usr.bin/nl/nl.c Wed Dec 30 01:42:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nl.c,v 1.13 2020/12/22 17:50:55 ginsbach Exp $ */ +/* $NetBSD: nl.c,v 1.14 2020/12/30 01:42:31 ginsbach Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1999\ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: nl.c,v 1.13 2020/12/22 17:50:55 ginsbach Exp $"); +__RCSID("$NetBSD: nl.c,v 1.14 2020/12/30 01:42:31 ginsbach Exp $"); #endif #include @@ -157,14 +157,15 @@ main(int argc, char *argv[]) case 'd': if (optarg[0] != '\0') delim[0] = optarg[0]; - if (optarg[1] != '\0') + if (optarg[1] != '\0') { delim[1] = optarg[1]; - /* at most two delimiter characters */ - if (optarg[2] != '\0') { -errx(EXIT_FAILURE, -"invalid delim argument -- %s", -optarg); -/* NOTREACHED */ +/* at most two delimiter characters */ +if (optarg[2] != '\0') { + errx(EXIT_FAILURE, + "invalid delim argument -- %s", + optarg); + /* NOTREACHED */ +} } break; case 'f':
CVS commit: src/usr.bin/nl
Module Name:src Committed By: ginsbach Date: Tue Dec 22 17:50:56 UTC 2020 Modified Files: src/usr.bin/nl: nl.c Log Message: nl(1): remove superfluous exit Remove exit(3) call missed when errors were converted to errx(3). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/nl/nl.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.bin/nl/nl.c diff -u src/usr.bin/nl/nl.c:1.12 src/usr.bin/nl/nl.c:1.13 --- src/usr.bin/nl/nl.c:1.12 Tue Sep 17 20:00:50 2013 +++ src/usr.bin/nl/nl.c Tue Dec 22 17:50:55 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nl.c,v 1.12 2013/09/17 20:00:50 wiz Exp $ */ +/* $NetBSD: nl.c,v 1.13 2020/12/22 17:50:55 ginsbach Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1999\ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: nl.c,v 1.12 2013/09/17 20:00:50 wiz Exp $"); +__RCSID("$NetBSD: nl.c,v 1.13 2020/12/22 17:50:55 ginsbach Exp $"); #endif #include @@ -392,7 +392,6 @@ parse_numbering(const char *argstr, int errx(EXIT_FAILURE, "illegal %s line numbering type -- %s", numbering_properties[section].name, argstr); - exit(EXIT_FAILURE); } }
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Mon Sep 21 15:31:54 UTC 2020 Modified Files: src/lib/libc/time: strptime.c Log Message: Correct range for ISO week conversion The %V conversion range for strptime(3) should match the strftime(3) conversion range. A valid ISO week is 1-53. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.62 src/lib/libc/time/strptime.c:1.63 --- src/lib/libc/time/strptime.c:1.62 Thu Aug 24 01:01:09 2017 +++ src/lib/libc/time/strptime.c Mon Sep 21 15:31:54 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.63 2020/09/21 15:31:54 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.63 2020/09/21 15:31:54 ginsbach Exp $"); #endif #include "namespace.h" @@ -424,7 +424,7 @@ literal: continue; case 'V': /* The ISO 8601:1988 week number as decimal */ - bp = conv_num(bp, &i, 0, 53); + bp = conv_num(bp, &i, 1, 53); continue; case 'Y': /* The year. */
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Sat Sep 19 01:43:20 UTC 2020 Modified Files: src/share/misc: acronyms.comp Log Message: CDN, CRTP, FTTH To generate a diff of this commit: cvs rdiff -u -r1.311 -r1.312 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.311 src/share/misc/acronyms.comp:1.312 --- src/share/misc/acronyms.comp:1.311 Sat Aug 22 07:24:40 2020 +++ src/share/misc/acronyms.comp Sat Sep 19 01:43:20 2020 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.311 2020/08/22 07:24:40 nia Exp $ +$NetBSD: acronyms.comp,v 1.312 2020/09/19 01:43:20 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -226,6 +226,7 @@ CD compact disc CDDA compact disc digital audio CDL compiler description language CDMA code division multiple access +CDN content delivery network CDP Cisco Discovery Protocol CDRAM cache dynamic random access memory CER canonical encoding rules @@ -307,6 +308,7 @@ CRL carrier recovery loop CRLF carriage return line feed CSU C start up CRT cathode ray tube +CRTP curiously recurring template pattern CRUD create, read, update, and delete CS cable select CS chip select @@ -610,6 +612,7 @@ FTA fault tree analysis FTL flash translation layer FTP File Transfer Protocol FTPS File Transfer Protocol Secure +FTTH fiber to the home FUS fast user switching FWH firmware hub FWS folding white space
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Tue May 5 01:28:17 UTC 2020 Modified Files: src/share/misc: acronyms.comp Log Message: Add OWASP To generate a diff of this commit: cvs rdiff -u -r1.302 -r1.303 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.302 src/share/misc/acronyms.comp:1.303 --- src/share/misc/acronyms.comp:1.302 Wed Apr 29 22:17:38 2020 +++ src/share/misc/acronyms.comp Tue May 5 01:28:17 2020 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.302 2020/04/29 22:17:38 rtr Exp $ +$NetBSD: acronyms.comp,v 1.303 2020/05/05 01:28:17 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -1117,6 +1117,7 @@ OTP one time password OTP open telecom platform OU organizational unit OUI organizationally unique identifier +OWASP Open Web Application Security Project OWL Web Ontology Language P2P PCI to PCI P2P peer to peer
CVS commit: src/usr.bin/locale
Module Name:src Committed By: ginsbach Date: Tue Apr 28 22:29:32 UTC 2020 Modified Files: src/usr.bin/locale: locale.c Log Message: Fix spelling errors. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/locale/locale.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.bin/locale/locale.c diff -u src/usr.bin/locale/locale.c:1.8 src/usr.bin/locale/locale.c:1.9 --- src/usr.bin/locale/locale.c:1.8 Fri Jan 20 16:31:30 2012 +++ src/usr.bin/locale/locale.c Tue Apr 28 22:29:32 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: locale.c,v 1.8 2012/01/20 16:31:30 joerg Exp $ */ +/* $NetBSD: locale.c,v 1.9 2020/04/28 22:29:32 ginsbach Exp $ */ /*- * Copyright (c) 2002, 2003 Alexey Zelkin @@ -30,7 +30,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: locale.c,v 1.8 2012/01/20 16:31:30 joerg Exp $"); +__RCSID("$NetBSD: locale.c,v 1.9 2020/04/28 22:29:32 ginsbach Exp $"); #endif /* LIBC_SCCS and not lint */ /* @@ -251,7 +251,7 @@ main(int argc, char *argv[]) /* validate arguments */ if (all_locales && all_charmaps) usage(); - if ((all_locales || all_charmaps) && argc > 0) + if ((all_locales || all_charmaps) && argc > 0) usage(); if ((all_locales || all_charmaps) && (prt_categories || prt_keywords)) usage(); @@ -335,8 +335,8 @@ scmp(const void *s1, const void *s2) /* * Output information about all available charmaps * - * XXX this function is doing a task in hackish way, i.e. by scaning - * list of locales, spliting their codeset part and building list of + * XXX this function is doing a task in hackish way, i.e. by scanning + * list of locales, splitting their codeset part and building list of * them. */ void @@ -423,7 +423,7 @@ init_locales_list(void) /* make sure that 'POSIX' and 'C' locales are present in the list. * POSIX 1003.1-2001 requires presence of 'POSIX' name only here, but - * we also list 'C' for constistency + * we also list 'C' for consistency */ if (sl_find(locales, "POSIX") == NULL) sl_add(locales, "POSIX"); @@ -498,10 +498,10 @@ showlocale(void) && strcmp(lang, vval)) { /* * Appropriate environment variable set, its value - * is valid and not overriden by LC_ALL + * is valid and not overridden by LC_ALL * * XXX: possible side effect: if both LANG and - * overriden environment variable are set into same + * overridden environment variable are set into same * value, then it'll be assumed as 'implied' */ printf("%s=\"%s\"\n", lcinfo[i].name, vval);
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Wed Apr 22 15:03:46 UTC 2020 Modified Files: src/share/misc: acronyms Log Message: Add RFI, RFP To generate a diff of this commit: cvs rdiff -u -r1.298 -r1.299 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.298 src/share/misc/acronyms:1.299 --- src/share/misc/acronyms:1.298 Thu Mar 26 18:25:32 2020 +++ src/share/misc/acronyms Wed Apr 22 15:03:46 2020 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.298 2020/03/26 18:25:32 leot Exp $ +$NetBSD: acronyms,v 1.299 2020/04/22 15:03:46 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -472,6 +472,8 @@ RCD residual current device RFC request for comments RFD request for discussion RFE request for enhancements +RFI request for information +RFP request for proposal RIF reduction in force RIP rest in peace RL real life
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Thu Dec 6 14:22:48 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add BUAG, DCIM (2x), and SDP To generate a diff of this commit: cvs rdiff -u -r1.218 -r1.219 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.218 src/share/misc/acronyms.comp:1.219 --- src/share/misc/acronyms.comp:1.218 Wed Dec 5 14:44:54 2018 +++ src/share/misc/acronyms.comp Thu Dec 6 14:22:48 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.218 2018/12/05 14:44:54 sevan Exp $ +$NetBSD: acronyms.comp,v 1.219 2018/12/06 14:22:48 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -179,6 +179,7 @@ BTS bit test [and] set BTS bug tracking system BW bandwidth BWM block-write mode +BUAG big ugly ASCII graphic CA certificate authority CAD computer-aided design CAM computer assisted manufacturing @@ -319,6 +320,8 @@ DCC direct cable connect DCD data carrier detect DCE data control equipment DCE distributed computing environment +DCIM data center infrastructure management +DCIM digital camera images DCL Digital Command Language DCOM distributed component object model DCOP Desktop COmmunication Protocol @@ -1263,6 +1266,7 @@ SDL Simple Declarative Language SDL Simple Direct-media Layer SDLC {software,system,systems} development life cycle SDN software defined networking +SDP Session Description Protocol SDRAM synchronous dynamic random access memory SDS software defined storage SDT syntax-directed translation
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Wed Sep 19 18:53:25 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add AMDD, ASF, MSC, RMCP, SAML, STOMP, and YAML Hyphenate TDD description (grammar) To generate a diff of this commit: cvs rdiff -u -r1.214 -r1.215 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.214 src/share/misc/acronyms.comp:1.215 --- src/share/misc/acronyms.comp:1.214 Mon Aug 13 22:22:59 2018 +++ src/share/misc/acronyms.comp Wed Sep 19 18:53:25 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.214 2018/08/13 22:22:59 alnsn Exp $ +$NetBSD: acronyms.comp,v 1.215 2018/09/19 18:53:25 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -45,6 +45,7 @@ AM access method AM alignment mask AM amplitude modulation AMD Advanced Micro Devices Inc +AMDD Agile model-driven development AMI alternate mark inversion AMP asymmetric multiprocessing AMQP advanced message queuing protocol @@ -83,6 +84,7 @@ ASC advanced smart cache ASCII American Standard Code for Information Interchange ASD agile software development ASE advanced software environment +ASF alert standard format ASIC application-specific integrated circuit ASK amplitude shift keying ASLR address space layout randomization @@ -770,6 +772,7 @@ LSB Linux standards base LSB least significant {bit,byte} LSI large scale integration LSL load segment limit +LSM log structured merge LSN Large Scale NAT LSN log sequence number LSR label switch router @@ -871,6 +874,7 @@ MRU most recently used MS Microsoft MSAN Memory Sanitizer MSB most significant {bit,byte} +MSC message sequence chart MSE mean square error MSF minutes seconds frames MSI message signaled interrupt @@ -1169,6 +1173,7 @@ RLE run length encoding RLL run length limited RLO right-to-left override RM read miss +RMCP Remote Management Control Protocol RMI remote method invocation RMO Relaxed Memory Ordering RMPM rapid memory power management @@ -1216,6 +1221,7 @@ SAD security association database SAL {service,system} abstraction layer SAM serial access memory SAM sum addressed memory +SAML security assertion markup language SAN storage area network SAP service access point SAPIC streamlined advanced programmable interrupt controller @@ -1341,6 +1347,7 @@ SSL secure sockets layer SSP stack smashing protection STC software thermal control STD state transition diagram +STOMP Streaming Text Oriented Messaging Protocol STP Spanning Tree Protocol STP shielded twisted pair SUS Single Unix Specification @@ -1370,7 +1377,7 @@ TCL tool command language TCP Transmission Control Protocol TCQ tagged command queueing TDC time [to] digital converter -TDD test driven development +TDD test-driven development TDD time division duplex TDM time division multiplexing TDMA time division multiple access @@ -1556,6 +1563,7 @@ XSS cross site scripting XT extended technology XUL XML user interface language YACC yet another compiler compiler +YAML YAML ain't markup language YANG yet another next generation YAWPFAPR you are welcome; please file a problem report YP Yellow Pages
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Wed Sep 19 18:50:40 UTC 2018 Modified Files: src/share/misc: acronyms Log Message: Add BDFL and SJW To generate a diff of this commit: cvs rdiff -u -r1.274 -r1.275 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.274 src/share/misc/acronyms:1.275 --- src/share/misc/acronyms:1.274 Fri May 25 00:31:07 2018 +++ src/share/misc/acronyms Wed Sep 19 18:50:39 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.274 2018/05/25 00:31:07 riastradh Exp $ +$NetBSD: acronyms,v 1.275 2018/09/19 18:50:39 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -62,6 +62,7 @@ BBT be back tomorrow BCNU be seeing you BCNUL8R be seeing you later BCP best current practice +BDFL benevolent dictator for life BF best friend BF boyfriend BFF best {friend,friends} forever @@ -473,6 +474,7 @@ SFAICT so far as I can tell SHID slaps head in disgust SIMCA sitting in my chair amused SITD still in the dark +SJW social justice warrior SMAP Soil Moisture Active Passive SMH shaking my head SMLSFB so many losers, so few bullets
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Tue May 29 02:53:24 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add ABRT, AER, BERT, CMC, COS, CPE, CPER, CRUD, EDAC, EINJ, ERST, ESB, GHES, GIC, HATEOAS, HECI, HEST, IPMB, IPMI, ITP, JSON, KCS, MD-SAL, MQTT, (another) MSR, OAM, PCE, (another) SAL, SAX, SDEI, SEA, SLAAC, SMB, SNIA, SVI, TSDB, (another) VID, WAMP, YANG To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.198 src/share/misc/acronyms.comp:1.199 --- src/share/misc/acronyms.comp:1.198 Tue May 29 02:42:34 2018 +++ src/share/misc/acronyms.comp Tue May 29 02:53:24 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.198 2018/05/29 02:42:34 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.199 2018/05/29 02:53:24 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -6,6 +6,7 @@ AAA authentication, authorization, [and] AAT average access time ABI application binary interface ABR available bit rate +ABRT automatic bug reporting tool AC alternating current ACI adjacent channel interferer ACID atomicity, consistency, isolation, durability @@ -26,6 +27,7 @@ ADPCM adaptive differential pulse code m ADS alternate data stream ADSL asymmetric digital subscriber line ADT abstract data type +AER advanced error reporting AES Advanced Encryption Standard AFS Andrew File System AGC automatic gain control @@ -54,6 +56,7 @@ AOS add or subtract AP access point AP application processor API application programming interface +APEI ACPI platform error interface APIC advanced programmable interrupt controller APIPA automatic private IP addressing APM advanced power management @@ -109,6 +112,7 @@ BDUF big design up front BEDO burst extended data output BER basic encoding rules BER bit error {rate,ratio} +BERT boot error record table BFD binary {file,format} descriptor BFKL big fscking kernel lock BFS breadth-first search @@ -219,6 +223,8 @@ CLUT color look-up table CLV constant linear velocity CM configuration management CMA concert multithread architecture +CMC chassis management controller +CMC corrected machine check CMS {configuration,content,course} management system CMI control {management,method} interface CMOS complementary metal-oxide-semiconductor @@ -234,10 +240,13 @@ COFF common object file format COM component object model COMA cache-only memory architecture CORBA common object request broker architecture +COS class of service COW copy-on-write CP continuous pilot CPB core performance boost CPE common phase error +CPE common platform enumeration +CPER common platform error record CPG clock pulse generator CPL current privilege level CPLD complex programmable logic device @@ -250,6 +259,7 @@ CRC cyclic redundancy check CRL carrier recovery loop CRLF carriage return line feed CRT cathode ray tube +CRUD create, read, update, and delete CS cable select CS chip select CS code segment @@ -409,6 +419,7 @@ ECN explicit congestion notification ECP enhanced capability port ECS enhanced chip set ECS extended configuration space +EDAC error detection and correction EDAT enhanced dynamic acceleration technology EdDSA Edwards curve digital signature algorithm EDGE explicit data graph execution @@ -425,6 +436,7 @@ EGP exterior gateway protocol EH extension header EIDE enhanced IDE EISA extended industry standard architecture +EINJ error injection table ELF executable and linking format ELS entry level system EMI electro-magnetic interference @@ -441,6 +453,8 @@ EPROM erasable programmable read only me ERD emergency recovery disk ERD entity relationship diagram ERE extended regular expression +ERST error record serialization table +ESB enterprise service bus ESDRAM enhanced synchronous dynamic random access memory ESS electronic switching system ESS extended service set @@ -511,6 +525,8 @@ GEM graphics environment manager GEM graphics execution manager GENA general event notification architecture GHC Glasgow Haskell compiler +GHES generic hardware error source +GIC generic interrupt controller GID group identifier GIF graphics interchange format GMCH graphics and memory controller hub @@ -534,6 +550,7 @@ GVFSgit virtual file system HA high availability HAL hardware abstraction layer HAT hashed array tree +HATEOAS hypermedia as the engine of application state HBA host bus adapter HCF halt and catch fire HCI host controller interface @@ -544,6 +561,8 @@ HDD hard disk drive HDL hardware description language HDMI High-Definition Multimedia Interface HDTV high-definition television +HECI host embedded controller interface +HEST hardware error source table HF high frequency HFM highest frequency mode HID h
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Tue May 29 02:42:34 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Fix spelling/typos To generate a diff of this commit: cvs rdiff -u -r1.197 -r1.198 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.197 src/share/misc/acronyms.comp:1.198 --- src/share/misc/acronyms.comp:1.197 Sun May 13 18:52:00 2018 +++ src/share/misc/acronyms.comp Tue May 29 02:42:34 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.197 2018/05/13 18:52:00 sevan Exp $ +$NetBSD: acronyms.comp,v 1.198 2018/05/29 02:42:34 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -13,7 +13,7 @@ ACK Amsterdam compiler kit ACK acknowledgement ACL access control list ACL active current loop -ACP auxillary control {process,program} +ACP auxiliary control {process,program} ACPI advanced configuration and power interface ACS access control set ACU automatic calling unit @@ -76,7 +76,7 @@ ASCII American Standard Code for Informa ASD agile software development ASE advanced software environment ASIC application-specific integrated circuit -ASK amplitude shif keying +ASK amplitude shift keying ASLR address space layout randomization ASN autonomous system number ASPM active state power management @@ -181,7 +181,7 @@ CAU control access unit CAV constant angular velocity CBC cipher block chaining CBR constant bit rate -CC carbon coby +CC carbon copy CCD charge coupled device CCI co-channel interferer CCNUMA cache-coherent non-uniform memory access
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Tue May 22 02:46:19 UTC 2018 Modified Files: src/share/misc: acronyms Log Message: Fix spelling To generate a diff of this commit: cvs rdiff -u -r1.271 -r1.272 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.271 src/share/misc/acronyms:1.272 --- src/share/misc/acronyms:1.271 Sun May 13 16:53:04 2018 +++ src/share/misc/acronyms Tue May 22 02:46:19 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.271 2018/05/13 16:53:04 maya Exp $ +$NetBSD: acronyms,v 1.272 2018/05/22 02:46:19 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -206,7 +206,7 @@ GTSY {glad,good} to see you GWS get well soon H8 hate HAND have a nice day -HE how embarrasing +HE how embarrassing HF have fun HHIS hanging head in shame HHOS ha ha, only serious @@ -508,7 +508,7 @@ THNX thanks THX thanks TIA thanks in advance TIAVP this is a volunteer project -TIC tonque in cheek +TIC tongue in cheek TIL today I learned TINC there is no cabal TINLA this is not legal advice
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Tue May 22 02:54:32 UTC 2018 Modified Files: src/share/misc: acronyms Log Message: Add M&O, ROM, and SWOT To generate a diff of this commit: cvs rdiff -u -r1.272 -r1.273 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.272 src/share/misc/acronyms:1.273 --- src/share/misc/acronyms:1.272 Tue May 22 02:46:19 2018 +++ src/share/misc/acronyms Tue May 22 02:54:32 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.272 2018/05/22 02:46:19 ginsbach Exp $ +$NetBSD: acronyms,v 1.273 2018/05/22 02:54:32 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -326,6 +326,7 @@ LOL laughing out loud LP long playing [record] LTNS long time no see LWYL laugh with you later +M&O management & operations M8 mate MAD mutually assured destruction MBA master of business administration @@ -453,6 +454,7 @@ RLC rod length check RMS Richard Matthew Stallman ROFL rolling on floor laughing ROFLMAO rolling on floor laughing my ass off +ROM rough order of magnitude ROI return on investment ROTFL rolling on the floor laughing RP responsible person @@ -490,6 +492,7 @@ SUX2BU sucks to be you SWAG silly, wild-assed guess SWAHBI silly, wild-assed hare-brained idea SWMBO she who must be obeyed +SWOT strength, weaknesses, opportunities, threats SYS see you soon TA teaching assistant TANSTAAFL there ain't no such thing as a free lunch
CVS commit: src/usr.sbin/ypbind
Module Name:src Committed By: ginsbach Date: Thu Mar 15 02:25:31 UTC 2018 Modified Files: src/usr.sbin/ypbind: ypbind.c Log Message: Initialize ypbind_resp before first possible error return condition. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/usr.sbin/ypbind/ypbind.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/ypbind/ypbind.c diff -u src/usr.sbin/ypbind/ypbind.c:1.99 src/usr.sbin/ypbind/ypbind.c:1.100 --- src/usr.sbin/ypbind/ypbind.c:1.99 Wed Aug 9 01:56:42 2017 +++ src/usr.sbin/ypbind/ypbind.c Thu Mar 15 02:25:31 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ypbind.c,v 1.99 2017/08/09 01:56:42 ginsbach Exp $ */ +/* $NetBSD: ypbind.c,v 1.100 2018/03/15 02:25:31 ginsbach Exp $ */ /* * Copyright (c) 1992, 1993 Theo de Raadt @@ -28,7 +28,7 @@ #include #ifndef LINT -__RCSID("$NetBSD: ypbind.c,v 1.99 2017/08/09 01:56:42 ginsbach Exp $"); +__RCSID("$NetBSD: ypbind.c,v 1.100 2018/03/15 02:25:31 ginsbach Exp $"); #endif #include @@ -710,15 +710,15 @@ ypbindproc_domain_2(SVCXPRT *transp, voi DPRINTF("ypbindproc_domain_2 %s\n", arg); + (void)memset(&res, 0, sizeof res); + res.ypbind_status = YPBIND_FAIL_VAL; + /* Reject invalid domains. */ if (_yp_invalid_domain(arg)) { res.ypbind_respbody.ypbind_error = YPBIND_ERR_NOSERV; return &res; } - (void)memset(&res, 0, sizeof res); - res.ypbind_status = YPBIND_FAIL_VAL; - /* * Look for the domain. XXX: Behave erratically if we have * more than 100 domains. The intent here is to avoid allowing
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Thu Mar 1 19:09:33 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add SMEP and additional CSDL and LTO acronyms To generate a diff of this commit: cvs rdiff -u -r1.192 -r1.193 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.192 src/share/misc/acronyms.comp:1.193 --- src/share/misc/acronyms.comp:1.192 Mon Feb 19 20:49:01 2018 +++ src/share/misc/acronyms.comp Thu Mar 1 19:09:33 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.192 2018/02/19 20:49:01 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.193 2018/03/01 19:09:33 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -251,7 +251,7 @@ CS cable select CS chip select CS code segment CS computer science -CSDL common schema definition language +CSDL {common,conceptual} schema definition language CSI channel state information CSI common system interface CSMA carrier sense multiple access @@ -723,6 +723,7 @@ LSN Large Scale NAT LSN log sequence number LSR label switch router LTCC low temperature co-fired ceramic +LTO linear tape-open LTO link time optimization LTR left to right LTR load task register @@ -1205,6 +1206,7 @@ SMAP supervisor mode access prevention SMART self-monitoring analysis and reporting technology SMBIOS System Management BIOS SMC system management controller +SMEP supervisor mode execution protection SMF single mode fiber SMI structure of management information SMI system management interrupt
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Mon Feb 19 20:49:01 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add ANR and another ARC acronyms To generate a diff of this commit: cvs rdiff -u -r1.191 -r1.192 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.191 src/share/misc/acronyms.comp:1.192 --- src/share/misc/acronyms.comp:1.191 Mon Feb 12 20:43:17 2018 +++ src/share/misc/acronyms.comp Mon Feb 19 20:49:01 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.191 2018/02/12 20:43:17 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.192 2018/02/19 20:49:01 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -46,6 +46,7 @@ AMP asymmetric multiprocessing AMQP advanced message queuing protocol AMT active management technology AN Arabic number +ANR application not responding ANSI American National Standards Institute AO analog output AOL Alert-on-LAN @@ -59,6 +60,7 @@ APT advanced persistent threat AQM active queue management ARAT always running APIC timer ARC adaptive replacement cache +ARC automatic reference counting ARM Advanced RISC Machines ARP Address Resolution Protocol ARPA Advanced Research Projects Agency
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Mon Feb 12 20:43:17 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add CSDL To generate a diff of this commit: cvs rdiff -u -r1.190 -r1.191 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.190 src/share/misc/acronyms.comp:1.191 --- src/share/misc/acronyms.comp:1.190 Tue Jan 30 22:45:12 2018 +++ src/share/misc/acronyms.comp Mon Feb 12 20:43:17 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.190 2018/01/30 22:45:12 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.191 2018/02/12 20:43:17 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -249,6 +249,7 @@ CS cable select CS chip select CS code segment CS computer science +CSDL common schema definition language CSI channel state information CSI common system interface CSMA carrier sense multiple access
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Tue Jan 30 22:45:12 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add more "* as a service" and "software defined *" acronyms To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.190 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.189 src/share/misc/acronyms.comp:1.190 --- src/share/misc/acronyms.comp:1.189 Sun Jan 21 14:01:55 2018 +++ src/share/misc/acronyms.comp Tue Jan 30 22:45:12 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.189 2018/01/21 14:01:55 alnsn Exp $ +$NetBSD: acronyms.comp,v 1.190 2018/01/30 22:45:12 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -351,6 +351,7 @@ DPI dots per inch DPL descriptor privilege level DPS Display PostScript DPST display power savings technology +DRAAS disaster recovery as a service DRAM dynamic random access memory DRBG deterministic random bit generator DRI direct rendering infrastructure @@ -560,6 +561,7 @@ HVM hardware virtual machine HZ Hertz I2O intelligent input/output IA information assurance +IAAS infrastructure as a service IANA Internet Assigned Numbers Authority IBC iterated block cipher IBM International Business Machines @@ -840,6 +842,7 @@ NFA nondeterministic finite automaton NFC near-field communication NFCI no functional change intended NFS network file system +NFV network function virtualization NIA next instruction address NIC network information center NIC network interface card @@ -913,6 +916,7 @@ P2P PCI to PCI P2P peer to peer PA phase accumulator PA physical address +PAAS platform as a service PAC phase-amplitude converter PAE physical address extension PAL phase alternating line @@ -1160,7 +1164,9 @@ SDK software development kit SDL Simple Declarative Language SDL Simple Direct-media Layer SDLC {software,system,systems} development life cycle +SDN software defined networking SDRAM synchronous dynamic random access memory +SDS software defined storage SDT syntax-directed translation SEGV segmentation violation SEO search engine optimization
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Dec 22 02:36:46 UTC 2017 Modified Files: src/share/misc: acronyms.comp Log Message: Add board support package - BSP To generate a diff of this commit: cvs rdiff -u -r1.186 -r1.187 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.186 src/share/misc/acronyms.comp:1.187 --- src/share/misc/acronyms.comp:1.186 Thu Sep 21 00:40:10 2017 +++ src/share/misc/acronyms.comp Fri Dec 22 02:36:46 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.186 2017/09/21 00:40:10 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.187 2017/12/22 02:36:46 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -147,6 +147,7 @@ BSD Berkeley Software Distribution BSF bit scan forward BSOD blue screen of death BSP binary space partition +BSP board support package BSP bootstrap processor BSR bit scan reverse BSS basic service set
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Sat Dec 2 01:36:38 UTC 2017 Modified Files: src/share/misc: acronyms Log Message: Fix spelling mistake -- no el -- for previous To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.263 src/share/misc/acronyms:1.264 --- src/share/misc/acronyms:1.263 Fri Dec 1 17:19:01 2017 +++ src/share/misc/acronyms Sat Dec 2 01:36:38 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.263 2017/12/01 17:19:01 ginsbach Exp $ +$NetBSD: acronyms,v 1.264 2017/12/02 01:36:38 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -123,7 +123,7 @@ DTRT do the right thing DTWT do the wrong thing DWIM do what I mean DYK do you know? -EA eary adopter +EA early adopter ECR electronic cash register EDS eternal downward spiral EFT electronic funds transfer
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Dec 1 17:19:01 UTC 2017 Modified Files: src/share/misc: acronyms Log Message: PR misc/52776: Nikolai Lifanov: add definitions for EA, MVP To generate a diff of this commit: cvs rdiff -u -r1.262 -r1.263 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.262 src/share/misc/acronyms:1.263 --- src/share/misc/acronyms:1.262 Wed Nov 1 15:34:28 2017 +++ src/share/misc/acronyms Fri Dec 1 17:19:01 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.262 2017/11/01 15:34:28 khorben Exp $ +$NetBSD: acronyms,v 1.263 2017/12/01 17:19:01 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -123,6 +123,7 @@ DTRT do the right thing DTWT do the wrong thing DWIM do what I mean DYK do you know? +EA eary adopter ECR electronic cash register EDS eternal downward spiral EFT electronic funds transfer @@ -334,6 +335,8 @@ MOTAS member of the appropriate sex MOTOS member of the opposite sex MOTSS member of the same sex MTF more to follow +MVP minimum viable product +MVP most valuable player MYOB mind your own business N/A not {applicable,available} N/M never mind
CVS commit: src/usr.bin/seq
Module Name:src Committed By: ginsbach Date: Sun Oct 29 01:28:46 UTC 2017 Modified Files: src/usr.bin/seq: seq.c Log Message: The sign is optional in an exponent Treat numbers after [Ee] as a positive number rather than an invalid numeric sequence. (Taken from FreeBSD but done differently.) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.bin/seq/seq.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.bin/seq/seq.c diff -u src/usr.bin/seq/seq.c:1.9 src/usr.bin/seq/seq.c:1.10 --- src/usr.bin/seq/seq.c:1.9 Sun Oct 29 00:02:23 2017 +++ src/usr.bin/seq/seq.c Sun Oct 29 01:28:46 2017 @@ -31,7 +31,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 2005\ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: seq.c,v 1.9 2017/10/29 00:02:23 ginsbach Exp $"); +__RCSID("$NetBSD: seq.c,v 1.10 2017/10/29 01:28:46 ginsbach Exp $"); #endif /* not lint */ #include @@ -211,10 +211,10 @@ numeric(const char *s) } if (ISEXP((unsigned char)*s)) { s++; -if (ISSIGN((unsigned char)*s)) { +/* optional sign */ +if (ISSIGN((unsigned char)*s)) s++; - continue; -} +continue; } break; }
CVS commit: src/usr.bin/seq
Module Name:src Committed By: ginsbach Date: Sun Oct 29 00:02:23 UTC 2017 Modified Files: src/usr.bin/seq: seq.c Log Message: Fix typos (from FreeBSD) To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/seq/seq.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.bin/seq/seq.c diff -u src/usr.bin/seq/seq.c:1.8 src/usr.bin/seq/seq.c:1.9 --- src/usr.bin/seq/seq.c:1.8 Mon Sep 5 00:40:29 2016 +++ src/usr.bin/seq/seq.c Sun Oct 29 00:02:23 2017 @@ -31,7 +31,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 2005\ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: seq.c,v 1.8 2016/09/05 00:40:29 sevan Exp $"); +__RCSID("$NetBSD: seq.c,v 1.9 2017/10/29 00:02:23 ginsbach Exp $"); #endif /* not lint */ #include @@ -349,7 +349,7 @@ unescape(char *orig) *orig = c; --cp; continue; - case 'x': /* hexidecimal number */ + case 'x': /* hexadecimal number */ cp++; /* skip 'x' */ for (i = 0, c = 0; isxdigit((unsigned char)*cp) && i < 2; @@ -422,7 +422,7 @@ decimal_places(const char *number) /* * generate_format - create a format string * - * XXX to be bug for bug compatable with Plan9 and GNU return "%g" + * XXX to be bug for bug compatible with Plan9 and GNU return "%g" * when "%g" prints as "%e" (this way no width adjustments are made) */ char *
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Thu Sep 21 00:40:10 UTC 2017 Modified Files: src/share/misc: acronyms.comp Log Message: Add SDLC - software/system(s) development life cycle To generate a diff of this commit: cvs rdiff -u -r1.185 -r1.186 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.185 src/share/misc/acronyms.comp:1.186 --- src/share/misc/acronyms.comp:1.185 Sun Sep 17 21:55:07 2017 +++ src/share/misc/acronyms.comp Thu Sep 21 00:40:10 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.185 2017/09/17 21:55:07 rtr Exp $ +$NetBSD: acronyms.comp,v 1.186 2017/09/21 00:40:10 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -1157,6 +1157,7 @@ SDI symbol deinterleave SDK software development kit SDL Simple Declarative Language SDL Simple Direct-media Layer +SDLC {software,system,systems} development life cycle SDRAM synchronous dynamic random access memory SDT syntax-directed translation SEGV segmentation violation
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Sun Sep 17 00:54:16 UTC 2017 Modified Files: src/share/misc: acronyms Log Message: Add IFF and IFTTT To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.258 src/share/misc/acronyms:1.259 --- src/share/misc/acronyms:1.258 Fri Sep 15 23:08:11 2017 +++ src/share/misc/acronyms Sun Sep 17 00:54:16 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.258 2017/09/15 23:08:11 ginsbach Exp $ +$NetBSD: acronyms,v 1.259 2017/09/17 00:54:16 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -232,6 +232,8 @@ IDK I don't know IDRC I don't really care IDTS I don't think so IDTT I drink to that +IFF if and only if +IFTTT if this then that IHBW I have been wrong IIANM if I am not mistaken IIRC if I {recall,remember} correctly
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Sep 15 23:08:12 UTC 2017 Modified Files: src/share/misc: acronyms Log Message: PR misc/52542: Nikolai Lifanov: add definitions for HME, DME, DMEPOS To generate a diff of this commit: cvs rdiff -u -r1.257 -r1.258 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.257 src/share/misc/acronyms:1.258 --- src/share/misc/acronyms:1.257 Tue Aug 22 02:36:48 2017 +++ src/share/misc/acronyms Fri Sep 15 23:08:11 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.257 2017/08/22 02:36:48 pgoyette Exp $ +$NetBSD: acronyms,v 1.258 2017/09/15 23:08:11 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -107,6 +107,8 @@ DIAFYO did I ask for your opinion? DIY do it yourself DKDC don't know, don't care DM dungeon master +DME durable medical equipment +DMEPOS durable medical equipment, prosthetics, orthotics and supplies DMZ demilitarized zone DND do not disturb DNF did not finish @@ -203,6 +205,7 @@ HF have fun HHIS hanging head in shame HHOS ha ha, only serious HICA here it comes again +HME home medical equipment HNY happy new year HOAS hold on a second HOPS half-operator status
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: ginsbach Date: Sun Sep 10 17:01:07 UTC 2017 Modified Files: src/usr.sbin/syslogd: syslogd.c Log Message: Use looked up remote host for remote message without a hostname An incoming remote message may not necessarily have a hostname between the timestamp and the message. The the source of the remote sender is already looked up so use that hostname/IP address rather than the local hostname. XXX: pullup-8 XXX: pullup-7 XXX: pullup-6 To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/usr.sbin/syslogd/syslogd.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/syslogd/syslogd.c diff -u src/usr.sbin/syslogd/syslogd.c:1.123 src/usr.sbin/syslogd/syslogd.c:1.124 --- src/usr.sbin/syslogd/syslogd.c:1.123 Sat Jun 11 16:55:10 2016 +++ src/usr.sbin/syslogd/syslogd.c Sun Sep 10 17:01:07 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.c,v 1.123 2016/06/11 16:55:10 christos Exp $ */ +/* $NetBSD: syslogd.c,v 1.124 2017/09/10 17:01:07 ginsbach Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -__RCSID("$NetBSD: syslogd.c,v 1.123 2016/06/11 16:55:10 christos Exp $"); +__RCSID("$NetBSD: syslogd.c,v 1.124 2017/09/10 17:01:07 ginsbach Exp $"); #endif #endif /* not lint */ @@ -1277,7 +1277,7 @@ printline_bsdsyslog(const char *hname, c } else if (*p == '[' || (*p == ':' && (*(p+1) == ' ' || *(p+1) == '\0'))) { /* no host in message */ - buffer->host = LocalFQDN; + buffer->host = strdup(hname); buffer->prog = strndup(start, p - start); break; } else {
CVS commit: othersrc/external/bsd/dust/dist
Module Name:othersrc Committed By: ginsbach Date: Wed Aug 30 19:18:31 UTC 2017 Modified Files: othersrc/external/bsd/dust/dist: dust.1 dust.sh Log Message: Add a way to pass -a and -x to du(1). These allow one to 'dust' a filesystem (-x) or see what files are the big offenders (-a) rather than just the big directories (default). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/dust/dist/dust.1 \ othersrc/external/bsd/dust/dist/dust.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/dust/dist/dust.1 diff -u othersrc/external/bsd/dust/dist/dust.1:1.2 othersrc/external/bsd/dust/dist/dust.1:1.3 --- othersrc/external/bsd/dust/dist/dust.1:1.2 Wed Apr 2 08:50:43 2014 +++ othersrc/external/bsd/dust/dist/dust.1 Wed Aug 30 19:18:31 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: dust.1,v 1.2 2014/04/02 08:50:43 wiz Exp $ +.\" $NetBSD: dust.1,v 1.3 2017/08/30 19:18:31 ginsbach Exp $ .\" .\" Copyright (c) 2014 Alistair Crooks .\" All rights reserved. @@ -31,8 +31,9 @@ .Nd print directory listings ordered by size .Sh SYNOPSIS .Nm -.Op Fl rs -.Ar file ... +.Op Fl rx +.Op Fl a | Fl s +.Op Ar file ... .Sh DESCRIPTION The .Nm @@ -42,15 +43,19 @@ to retrieve the sizes on disk of the specified files and directories, and orders them in size order. .Bl -tag -width XrX +.It Fl a +Display an entry for each file in the directory hierarchy. .It Fl r Reverse the order of the output \(em instead of printing -the directory entries in smallest to largest order, +the directory or file entries in smallest to largest order, this argument will print the entries in largest to smallest order. .It Fl s As in .Xr du 1 , perform the listing silently, recursing into directories, but only printing the results at the topmost level of specification. +.It Fl x +Filesystem mounts points are not traversed. .Sh EXIT STATUS .Ex -std dust .Sh EXAMPLES Index: othersrc/external/bsd/dust/dist/dust.sh diff -u othersrc/external/bsd/dust/dist/dust.sh:1.2 othersrc/external/bsd/dust/dist/dust.sh:1.3 --- othersrc/external/bsd/dust/dist/dust.sh:1.2 Wed Aug 30 18:49:31 2017 +++ othersrc/external/bsd/dust/dist/dust.sh Wed Aug 30 19:18:31 2017 @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: dust.sh,v 1.2 2017/08/30 18:49:31 ginsbach Exp $ +# $NetBSD: dust.sh,v 1.3 2017/08/30 19:18:31 ginsbach Exp $ # Copyright (c) 2013 Alistair Crooks # All rights reserved. @@ -26,26 +26,38 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# Usage: dust [-r] [-s] file... +# Usage: dust [-rx] [-a | -s] file... +# -a == list all files, don't summarize by directory # -r == reverse sort, largest first, smallest last # -s == silent execution of du, don't recurse into subdirs +# -x == file system mount points are not traversed +all="" +exclude="" revsort="" silent="" -while getopts "rs" arg; do +while getopts "arsx" arg; do case "$arg" in + a) all="-a" ;; r) revsort="-r" ;; s) silent="-s" ;; - *) echo "Usage: $(basename $0) [-r] [-s] [file ...]"; exit 1 ;; + x) exclude="-x" ;; + *) echo "Usage: $(basename $0) [-rx] [-a | -s] [file ...]" 2>&1 + exit 1 ;; esac done shift $(expr $OPTIND - 1) +if [ -n "${all}" ] && [ -n "${silent}" ]; then + echo "Usage: $(basename $0) [-rx] [-a | -s] [file ...]" 2>&1 + exit 1 +fi + awk=/usr/bin/awk du=/usr/bin/du sort=/usr/bin/sort -${du} -h ${silent} "$@" | ${awk} ' +${du} -h ${all} ${exclude} ${silent} "$@" | ${awk} ' BEGIN { n = 1; sufs = "BKMGT"; for (i = 1 ; i <= length(sufs) ; i++) {
CVS commit: othersrc/external/bsd/dust/dist
Module Name:othersrc Committed By: ginsbach Date: Wed Aug 30 18:49:32 UTC 2017 Modified Files: othersrc/external/bsd/dust/dist: dust.sh Log Message: Fix option handling so options are actually processed. [approved by agc] To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/dust/dist/dust.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/dust/dist/dust.sh diff -u othersrc/external/bsd/dust/dist/dust.sh:1.1.1.1 othersrc/external/bsd/dust/dist/dust.sh:1.2 --- othersrc/external/bsd/dust/dist/dust.sh:1.1.1.1 Wed Apr 2 04:38:22 2014 +++ othersrc/external/bsd/dust/dist/dust.sh Wed Aug 30 18:49:31 2017 @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: dust.sh,v 1.1.1.1 2014/04/02 04:38:22 agc Exp $ +# $NetBSD: dust.sh,v 1.2 2017/08/30 18:49:31 ginsbach Exp $ # Copyright (c) 2013 Alistair Crooks # All rights reserved. @@ -34,11 +34,12 @@ revsort="" silent="" while getopts "rs" arg; do case "$arg" in - -r) revsort="-r" ;; - -s) silent="-s" ;; - *) break; + r) revsort="-r" ;; + s) silent="-s" ;; + *) echo "Usage: $(basename $0) [-r] [-s] [file ...]"; exit 1 ;; esac done +shift $(expr $OPTIND - 1) awk=/usr/bin/awk du=/usr/bin/du
CVS commit: src/usr.sbin/rdate
Module Name:src Committed By: ginsbach Date: Sat Aug 26 19:26:32 UTC 2017 Modified Files: src/usr.sbin/rdate: rdate.8 rdate.c Log Message: Support -4 and -6. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/rdate/rdate.8 cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/rdate/rdate.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/rdate/rdate.8 diff -u src/usr.sbin/rdate/rdate.8:1.12 src/usr.sbin/rdate/rdate.8:1.13 --- src/usr.sbin/rdate/rdate.8:1.12 Sat Aug 26 18:16:05 2017 +++ src/usr.sbin/rdate/rdate.8 Sat Aug 26 19:26:32 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: rdate.8,v 1.12 2017/08/26 18:16:05 ginsbach Exp $ +.\" $NetBSD: rdate.8,v 1.13 2017/08/26 19:26:32 ginsbach Exp $ .\" .\" Copyright (c) 1994 Christos Zoulas .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 30, 1994 +.Dd August 26, 2017 .Dt RDATE 8 .Os .Sh NAME @@ -31,7 +31,7 @@ .Nd set the system's date from a remote host .Sh SYNOPSIS .Nm -.Op Fl aps +.Op Fl 46aps .Ar host .Sh DESCRIPTION .Nm @@ -43,6 +43,14 @@ protocol which is usually implemented as Available options: .Pp .Bl -tag -width indent +.It Fl 4 +Forces +.Nm +to use IPv4 addresses only. +.It Fl 6 +Forces +.Nm +to use IPv6 addresses only. .It Fl a Use the .Xr adjtime 2 Index: src/usr.sbin/rdate/rdate.c diff -u src/usr.sbin/rdate/rdate.c:1.21 src/usr.sbin/rdate/rdate.c:1.22 --- src/usr.sbin/rdate/rdate.c:1.21 Sat Aug 26 18:16:05 2017 +++ src/usr.sbin/rdate/rdate.c Sat Aug 26 19:26:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rdate.c,v 1.21 2017/08/26 18:16:05 ginsbach Exp $ */ +/* $NetBSD: rdate.c,v 1.22 2017/08/26 19:26:32 ginsbach Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -34,7 +34,7 @@ */ #include #ifndef lint -__RCSID("$NetBSD: rdate.c,v 1.21 2017/08/26 18:16:05 ginsbach Exp $"); +__RCSID("$NetBSD: rdate.c,v 1.22 2017/08/26 19:26:32 ginsbach Exp $"); #endif /* lint */ #include @@ -59,7 +59,9 @@ static void usage(void); static void usage(void) { - (void) fprintf(stderr, "usage: %s [-aps] host\n", getprogname()); + (void) fprintf(stderr, "usage: %s [-46aps] host\n", getprogname()); + (void) fprintf(stderr, " -4: use IPv4 addresses only\n"); + (void) fprintf(stderr, " -6: use IPv6 addresses only\n"); (void) fprintf(stderr, " -a: use adjtime instead of instant change\n"); (void) fprintf(stderr, " -p: just print, don't set\n"); (void) fprintf(stderr, " -s: just set, don't print\n"); @@ -78,22 +80,31 @@ main(int argc, char *argv[]) struct addrinfo hints, *res, *res0; int c; int error; + int family = AF_UNSPEC; adjustment = 0; - while ((c = getopt(argc, argv, "psa")) != -1) + while ((c = getopt(argc, argv, "46aps")) != -1) switch (c) { - case 'p': - pr++; + case '4': + family = AF_INET; break; - case 's': - silent++; + case '6': + family = AF_INET6; break; case 'a': slidetime++; break; + case 'p': + pr++; + break; + + case 's': + silent++; + break; + default: usage(); return 1; @@ -106,7 +117,7 @@ main(int argc, char *argv[]) hname = argv[optind]; memset(&hints, 0, sizeof (hints)); - hints.ai_family = PF_UNSPEC; + hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_CANONNAME; error = getaddrinfo(hname, "time", &hints, &res0);
CVS commit: src/usr.sbin/rdate
Module Name:src Committed By: ginsbach Date: Sat Aug 26 18:16:06 UTC 2017 Modified Files: src/usr.sbin/rdate: rdate.8 rdate.c Log Message: Sort options alphabetically. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/rdate/rdate.8 cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/rdate/rdate.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/rdate/rdate.8 diff -u src/usr.sbin/rdate/rdate.8:1.11 src/usr.sbin/rdate/rdate.8:1.12 --- src/usr.sbin/rdate/rdate.8:1.11 Wed Oct 21 01:07:47 2009 +++ src/usr.sbin/rdate/rdate.8 Sat Aug 26 18:16:05 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: rdate.8,v 1.11 2009/10/21 01:07:47 snj Exp $ +.\" $NetBSD: rdate.8,v 1.12 2017/08/26 18:16:05 ginsbach Exp $ .\" .\" Copyright (c) 1994 Christos Zoulas .\" All rights reserved. @@ -31,7 +31,7 @@ .Nd set the system's date from a remote host .Sh SYNOPSIS .Nm -.Op Fl psa +.Op Fl aps .Ar host .Sh DESCRIPTION .Nm @@ -43,15 +43,15 @@ protocol which is usually implemented as Available options: .Pp .Bl -tag -width indent -.It Fl p -Do not set, just print the remote time -.It Fl s -Do not print the time. .It Fl a Use the .Xr adjtime 2 call to gradually skew the local time to the remote time rather than just hopping. +.It Fl p +Do not set, just print the remote time +.It Fl s +Do not print the time. .El .Sh FILES .Bl -tag -width /var/log/wtmp -compact Index: src/usr.sbin/rdate/rdate.c diff -u src/usr.sbin/rdate/rdate.c:1.20 src/usr.sbin/rdate/rdate.c:1.21 --- src/usr.sbin/rdate/rdate.c:1.20 Thu May 4 16:26:09 2017 +++ src/usr.sbin/rdate/rdate.c Sat Aug 26 18:16:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rdate.c,v 1.20 2017/05/04 16:26:09 sevan Exp $ */ +/* $NetBSD: rdate.c,v 1.21 2017/08/26 18:16:05 ginsbach Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -34,7 +34,7 @@ */ #include #ifndef lint -__RCSID("$NetBSD: rdate.c,v 1.20 2017/05/04 16:26:09 sevan Exp $"); +__RCSID("$NetBSD: rdate.c,v 1.21 2017/08/26 18:16:05 ginsbach Exp $"); #endif /* lint */ #include @@ -59,10 +59,10 @@ static void usage(void); static void usage(void) { - (void) fprintf(stderr, "usage: %s [-psa] host\n", getprogname()); + (void) fprintf(stderr, "usage: %s [-aps] host\n", getprogname()); + (void) fprintf(stderr, " -a: use adjtime instead of instant change\n"); (void) fprintf(stderr, " -p: just print, don't set\n"); (void) fprintf(stderr, " -s: just set, don't print\n"); - (void) fprintf(stderr, " -a: use adjtime instead of instant change\n"); } int
CVS commit: src/tests/lib/libpthread
Module Name:src Committed By: ginsbach Date: Fri Aug 25 22:59:47 UTC 2017 Modified Files: src/tests/lib/libpthread: t_once.c Log Message: PR/49003: Ngie Cooper: add To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libpthread/t_once.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/libpthread/t_once.c diff -u src/tests/lib/libpthread/t_once.c:1.1 src/tests/lib/libpthread/t_once.c:1.2 --- src/tests/lib/libpthread/t_once.c:1.1 Fri Jul 16 15:42:53 2010 +++ src/tests/lib/libpthread/t_once.c Fri Aug 25 22:59:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_once.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $ */ +/* $NetBSD: t_once.c,v 1.2 2017/08/25 22:59:47 ginsbach Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,8 +29,9 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_once.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $"); +__RCSID("$NetBSD: t_once.c,v 1.2 2017/08/25 22:59:47 ginsbach Exp $"); +#include #include #include #include
CVS commit: src
Module Name:src Committed By: ginsbach Date: Thu Aug 24 01:01:09 UTC 2017 Modified Files: src/lib/libc/time: strptime.c src/tests/lib/libc/time: t_strptime.c Log Message: The military/nautical time zones were added following RFC 822 and RFC 2822 specifications. Unfortunately they are specified incorrectly in RFC-822 and not very clearly in RFC 2822. RFC 1123 clearly states they are specified incorrectly - counting the wrong way from UTC - in RFC 822. RFC 2822 just states they were implemented in a non-standard way. Mea culpa for not noticing when originally implemented. Fix them so the correct calculations are made. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/lib/libc/time/strptime.c cvs rdiff -u -r1.12 -r1.13 src/tests/lib/libc/time/t_strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.61 src/lib/libc/time/strptime.c:1.62 --- src/lib/libc/time/strptime.c:1.61 Sat Aug 12 03:29:23 2017 +++ src/lib/libc/time/strptime.c Thu Aug 24 01:01:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.61 2017/08/12 03:29:23 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.61 2017/08/12 03:29:23 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $"); #endif #include "namespace.h" @@ -521,11 +521,11 @@ namedzone: /* Argh! No 'J'! */ if (*bp >= 'A' && *bp <= 'I') tm->TM_GMTOFF = - ('A' - 1) - (int)*bp; + (int)*bp - ('A' - 1); else if (*bp >= 'L' && *bp <= 'M') - tm->TM_GMTOFF = 'A' - (int)*bp; + tm->TM_GMTOFF = (int)*bp - 'A'; else if (*bp >= 'N' && *bp <= 'Y') - tm->TM_GMTOFF = (int)*bp - 'M'; + tm->TM_GMTOFF = 'M' - (int)*bp; tm->TM_GMTOFF *= SECSPERHOUR; #endif #ifdef TM_ZONE Index: src/tests/lib/libc/time/t_strptime.c diff -u src/tests/lib/libc/time/t_strptime.c:1.12 src/tests/lib/libc/time/t_strptime.c:1.13 --- src/tests/lib/libc/time/t_strptime.c:1.12 Sat Oct 31 02:25:11 2015 +++ src/tests/lib/libc/time/t_strptime.c Thu Aug 24 01:01:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strptime.c,v 1.12 2015/10/31 02:25:11 christos Exp $ */ +/* $NetBSD: t_strptime.c,v 1.13 2017/08/24 01:01:09 ginsbach Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_strptime.c,v 1.12 2015/10/31 02:25:11 christos Exp $"); +__RCSID("$NetBSD: t_strptime.c,v 1.13 2017/08/24 01:01:09 ginsbach Exp $"); #include #include @@ -126,28 +126,28 @@ static struct { { "+1060", -1 }, { "-1060", -1 }, - { "A",-3600 }, - { "B",-7200 }, - { "C",-10800 }, - { "D",-14400 }, - { "E",-18000 }, - { "F",-21600 }, - { "G",-25200 }, - { "H",-28800 }, - { "I",-32400 }, - { "L",-39600 }, - { "M",-43200 }, - { "N",3600 }, - { "O",7200 }, - { "P",10800 }, - { "Q",14400 }, - { "R",18000 }, - { "T",25200 }, - { "U",28800 }, - { "V",32400 }, - { "W",36000 }, - { "X",39600 }, - { "Y",43200 }, + { "A",3600 }, + { "B",7200 }, + { "C",10800 }, + { "D",14400 }, + { "E",18000 }, + { "F",21600 }, + { "G",25200 }, + { "H",28800 }, + { "I",32400 }, + { "L",39600 }, + { "M",43200 }, + { "N",-3600 }, + { "O",-7200 }, + { "P",-10800 }, + { "Q",-14400 }, + { "R",-18000 }, + { "T",-25200 }, + { "U",-28800 }, + { "V",-32400 }, + { "W",-36000 }, + { "X",-39600 }, + { "Y",-43200 }, { "J",-2 },
CVS commit: src/usr.sbin/rpcbind
Module Name:src Committed By: ginsbach Date: Thu Aug 17 00:08:10 UTC 2017 Modified Files: src/usr.sbin/rpcbind: warmstart.c Log Message: Fix compile warnings. (Restore changes clobbered by merge of FreeBSD changes. Hi christos!) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/rpcbind/warmstart.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/rpcbind/warmstart.c diff -u src/usr.sbin/rpcbind/warmstart.c:1.7 src/usr.sbin/rpcbind/warmstart.c:1.8 --- src/usr.sbin/rpcbind/warmstart.c:1.7 Wed Aug 16 23:38:16 2017 +++ src/usr.sbin/rpcbind/warmstart.c Thu Aug 17 00:08:10 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: warmstart.c,v 1.7 2017/08/16 23:38:16 ginsbach Exp $ */ +/* $NetBSD: warmstart.c,v 1.8 2017/08/17 00:08:10 ginsbach Exp $ */ /* $FreeBSD: head/usr.sbin/rpcbind/warmstart.c 258564 2013-11-25 16:44:02Z hrs $*/ /*- @@ -136,9 +136,9 @@ error: warnx("Will start from scratch"); void write_warmstart(void) { - (void)write_struct(RPCBFILE, xdr_rpcblist_ptr, &list_rbl); + (void)write_struct(RPCBFILE, (xdrproc_t) xdr_rpcblist_ptr, &list_rbl); #ifdef PORTMAP - (void)write_struct(PMAPFILE, xdr_pmaplist_ptr, &list_pml); + (void)write_struct(PMAPFILE, (xdrproc_t) xdr_pmaplist_ptr, &list_pml); #endif } @@ -152,11 +152,11 @@ read_warmstart(void) #endif int ok1, ok2 = TRUE; - ok1 = read_struct(RPCBFILE, xdr_rpcblist_ptr, &tmp_rpcbl); + ok1 = read_struct(RPCBFILE, (xdrproc_t) xdr_rpcblist_ptr, &tmp_rpcbl); if (ok1 == FALSE) return; #ifdef PORTMAP - ok2 = read_struct(PMAPFILE, xdr_pmaplist_ptr, &tmp_pmapl); + ok2 = read_struct(PMAPFILE, (xdrproc_t) xdr_pmaplist_ptr, &tmp_pmapl); #endif if (ok2 == FALSE) { xdr_free((xdrproc_t) xdr_rpcblist_ptr, (char *)&tmp_rpcbl);
CVS commit: src/usr.sbin/rpcbind
Module Name:src Committed By: ginsbach Date: Thu Aug 17 00:06:00 UTC 2017 Modified Files: src/usr.sbin/rpcbind: Makefile Log Message: Revert accidently committed enabling WARMSTART. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/rpcbind/Makefile 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/rpcbind/Makefile diff -u src/usr.sbin/rpcbind/Makefile:1.13 src/usr.sbin/rpcbind/Makefile:1.14 --- src/usr.sbin/rpcbind/Makefile:1.13 Wed Aug 16 23:38:16 2017 +++ src/usr.sbin/rpcbind/Makefile Thu Aug 17 00:06:00 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2017/08/16 23:38:16 ginsbach Exp $ +# $NetBSD: Makefile,v 1.14 2017/08/17 00:06:00 ginsbach Exp $ .include @@ -21,7 +21,6 @@ CPPFLAGS+= -DINET6 # Uncomment these to get any useful output from 'rpcbind -d' # CPPFLAGS+= -DRPCBIND_DEBUG # CPPFLAGS+= -DSVC_RUN_DEBUG -CPPFLAGS+= -DWARMSTART LDADD+= -lwrap -lutil DPADD+= ${LIBWRAP} ${LIBUTIL}
CVS commit: src/usr.sbin/rpcbind
Module Name:src Committed By: ginsbach Date: Wed Aug 16 23:38:16 UTC 2017 Modified Files: src/usr.sbin/rpcbind: Makefile warmstart.c Log Message: Write the "warm start" file to /var/run rather than /tmp. (Restore changes clobbered by merge of FreeBSD changes. Hi christos!) To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/rpcbind/Makefile cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/rpcbind/warmstart.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/rpcbind/Makefile diff -u src/usr.sbin/rpcbind/Makefile:1.12 src/usr.sbin/rpcbind/Makefile:1.13 --- src/usr.sbin/rpcbind/Makefile:1.12 Wed Apr 22 15:23:07 2009 +++ src/usr.sbin/rpcbind/Makefile Wed Aug 16 23:38:16 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2009/04/22 15:23:07 lukem Exp $ +# $NetBSD: Makefile,v 1.13 2017/08/16 23:38:16 ginsbach Exp $ .include @@ -21,6 +21,7 @@ CPPFLAGS+= -DINET6 # Uncomment these to get any useful output from 'rpcbind -d' # CPPFLAGS+= -DRPCBIND_DEBUG # CPPFLAGS+= -DSVC_RUN_DEBUG +CPPFLAGS+= -DWARMSTART LDADD+= -lwrap -lutil DPADD+= ${LIBWRAP} ${LIBUTIL} Index: src/usr.sbin/rpcbind/warmstart.c diff -u src/usr.sbin/rpcbind/warmstart.c:1.6 src/usr.sbin/rpcbind/warmstart.c:1.7 --- src/usr.sbin/rpcbind/warmstart.c:1.6 Wed Aug 16 08:44:40 2017 +++ src/usr.sbin/rpcbind/warmstart.c Wed Aug 16 23:38:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: warmstart.c,v 1.6 2017/08/16 08:44:40 christos Exp $ */ +/* $NetBSD: warmstart.c,v 1.7 2017/08/16 23:38:16 ginsbach Exp $ */ /* $FreeBSD: head/usr.sbin/rpcbind/warmstart.c 258564 2013-11-25 16:44:02Z hrs $*/ /*- @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -61,9 +62,9 @@ /* These files keep the pmap_list and rpcb_list in XDR format */ -#define RPCBFILE "/tmp/rpcbind.file" +#define RPCBFILE _PATH_VARRUN "rpcbind.file" #ifdef PORTMAP -#define PMAPFILE "/tmp/portmap.file" +#define PMAPFILE _PATH_VARRUN "portmap.file" #endif static bool_t write_struct(const char *, xdrproc_t, void *);
CVS commit: src/lib/libc/rpc
Module Name:src Committed By: ginsbach Date: Sun Aug 13 01:08:41 UTC 2017 Modified Files: src/lib/libc/rpc: rpcb_st_xdr.c Log Message: PR lib/15802: Shuuichirou Murata: Add missing xdr_rpcbs_rmtcalllist_ptr There was a missing call to xdr_rpcbs_rmtcalllist_ptr in xdr_rpcb_stat. This fixes issues with RPCBPROC_GETSTAT not working correctly with systems that correctly implement the XDR encode/decode routine. XXX: pullup-8 XXX: pullup-7 XXX: pullup-6 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/rpc/rpcb_st_xdr.c 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/rpc/rpcb_st_xdr.c diff -u src/lib/libc/rpc/rpcb_st_xdr.c:1.11 src/lib/libc/rpc/rpcb_st_xdr.c:1.12 --- src/lib/libc/rpc/rpcb_st_xdr.c:1.11 Wed May 3 21:39:27 2017 +++ src/lib/libc/rpc/rpcb_st_xdr.c Sun Aug 13 01:08:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rpcb_st_xdr.c,v 1.11 2017/05/03 21:39:27 christos Exp $ */ +/* $NetBSD: rpcb_st_xdr.c,v 1.12 2017/08/13 01:08:41 ginsbach Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -42,7 +42,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: rpcb_st_xdr.c,v 1.11 2017/05/03 21:39:27 christos Exp $"); +__RCSID("$NetBSD: rpcb_st_xdr.c,v 1.12 2017/08/13 01:08:41 ginsbach Exp $"); #endif #include "namespace.h" @@ -258,6 +258,9 @@ xdr_rpcb_stat(XDR *xdrs, rpcb_stat *objp if (!xdr_rpcbs_addrlist_ptr(xdrs, &objp->addrinfo)) { return (FALSE); } + if (!xdr_rpcbs_rmtcalllist_ptr(xdrs, &objp->rmtinfo)) { + return (FALSE); + } return (TRUE); }
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Sat Aug 12 03:29:23 UTC 2017 Modified Files: src/lib/libc/time: strptime.c Log Message: Fix a couple comments and a spacing nit. - Change a XXX comment that no longer applies. - Add a clarifying comment. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.60 src/lib/libc/time/strptime.c:1.61 --- src/lib/libc/time/strptime.c:1.60 Sun May 15 20:37:48 2016 +++ src/lib/libc/time/strptime.c Sat Aug 12 03:29:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.60 2016/05/15 20:37:48 christos Exp $ */ +/* $NetBSD: strptime.c,v 1.61 2017/08/12 03:29:23 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.60 2016/05/15 20:37:48 christos Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.61 2017/08/12 03:29:23 ginsbach Exp $"); #endif #include "namespace.h" @@ -382,10 +382,10 @@ literal: case 'U': /* The week of year, beginning on sunday. */ case 'W': /* The week of year, beginning on monday. */ /* - * XXX This is bogus, as we can not assume any valid + * This is bogus, as we can not assume any valid * information present in the tm structure at this - * point to calculate a real value, so just check the - * range for now. + * point to calculate a real value, so save the + * week for now in case it can be used later. */ bp = conv_num(bp, &i, 0, 53); LEGAL_ALT(ALT_O); @@ -516,7 +516,7 @@ namedzone: /* Nautical / Military style */ if (delim(bp[1]) && ((*bp >= 'A' && *bp <= 'I') || -(*bp >= 'L' && *bp <= 'Y'))) { + (*bp >= 'L' && *bp <= 'Y'))) { #ifdef TM_GMTOFF /* Argh! No 'J'! */ if (*bp >= 'A' && *bp <= 'I') @@ -635,6 +635,7 @@ loadzone: bp = zname; continue; } + /* ISO 8601 & RFC 3339 limit to 23:59 max */ if (offs >= (HOURSPERDAY * SECSPERHOUR)) goto out; if (neg)
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: ginsbach Date: Sat Aug 12 01:10:04 UTC 2017 Modified Files: src/lib/libc/stdlib: merge.c Log Message: PR lib/50316: Gracefully handle a zero number of members argument. Taken from FreeBSD (which fixed this same issue long ago). XXX: pullup-8 XXX: pullup-7 XXX: pullup-6 To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/stdlib/merge.c 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/stdlib/merge.c diff -u src/lib/libc/stdlib/merge.c:1.14 src/lib/libc/stdlib/merge.c:1.15 --- src/lib/libc/stdlib/merge.c:1.14 Tue Mar 13 21:13:48 2012 +++ src/lib/libc/stdlib/merge.c Sat Aug 12 01:10:04 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: merge.c,v 1.14 2012/03/13 21:13:48 christos Exp $ */ +/* $NetBSD: merge.c,v 1.15 2017/08/12 01:10:04 ginsbach Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "from: @(#)merge.c 8.2 (Berkeley) 2/14/94"; #else -__RCSID("$NetBSD: merge.c,v 1.14 2012/03/13 21:13:48 christos Exp $"); +__RCSID("$NetBSD: merge.c,v 1.15 2017/08/12 01:10:04 ginsbach Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -125,6 +125,9 @@ mergesort(void *base, size_t nmemb, size return (-1); } + if (nmemb == 0) + return (0); + /* * XXX * Stupid subtraction for the Cray.
CVS commit: src/external/bsd/libpcap/dist
Module Name:src Committed By: ginsbach Date: Sat Aug 12 00:43:25 UTC 2017 Modified Files: src/external/bsd/libpcap/dist: gencode.c Log Message: PR lib/51952: Brad Harder: Apply upstream ada959c9 [From upstream tcpdump] In pcap_compile(), first check whether the pcap_t is activated. Before we allocate or otherwise set up anything, check whether the pcap_t is activated, and set the error message string and return -1 if it's not. That way, we don't go through the cleanup code in that code path - there's nothing to clean up. Fixes the issue in GitHub pull request #552. XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/libpcap/dist/gencode.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/libpcap/dist/gencode.c diff -u src/external/bsd/libpcap/dist/gencode.c:1.9 src/external/bsd/libpcap/dist/gencode.c:1.10 --- src/external/bsd/libpcap/dist/gencode.c:1.9 Tue Jan 24 22:29:28 2017 +++ src/external/bsd/libpcap/dist/gencode.c Sat Aug 12 00:43:25 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: gencode.c,v 1.9 2017/01/24 22:29:28 christos Exp $ */ +/* $NetBSD: gencode.c,v 1.10 2017/08/12 00:43:25 ginsbach Exp $ */ /*#define CHASE_CHAIN*/ /* @@ -23,7 +23,7 @@ */ #include -__RCSID("$NetBSD: gencode.c,v 1.9 2017/01/24 22:29:28 christos Exp $"); +__RCSID("$NetBSD: gencode.c,v 1.10 2017/08/12 00:43:25 ginsbach Exp $"); #ifdef HAVE_CONFIG_H #include "config.h" @@ -669,6 +669,9 @@ int pcap_compile(pcap_t *p, struct bpf_program *program, const char *buf, int optimize, bpf_u_int32 mask) { +#ifdef _WIN32 + static int done = 0; +#endif compiler_state_t cstate; const char * volatile xbuf = buf; yyscan_t scanner = NULL; @@ -676,14 +679,6 @@ pcap_compile(pcap_t *p, struct bpf_progr u_int len; int rc; -#ifdef _WIN32 - static int done = 0; - - if (!done) - pcap_wsockinit(); - done = 1; -#endif - /* * If this pcap_t hasn't been activated, it doesn't have a * link-layer type, so we can't use it. @@ -691,9 +686,14 @@ pcap_compile(pcap_t *p, struct bpf_progr if (!p->activated) { pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "not-yet-activated pcap_t passed to pcap_compile"); - rc = -1; - goto quit; + return -1; } + +#ifdef _WIN32 + if (!done) + pcap_wsockinit(); + done = 1; +#endif initchunks(&cstate); cstate.no_optimize = 0; cstate.ai = NULL;
CVS commit: src/usr.bin/ypwhich
Module Name:src Committed By: ginsbach Date: Fri Aug 11 20:32:34 UTC 2017 Modified Files: src/usr.bin/ypwhich: ypwhich.c Log Message: Remove spurious error(1) inserted compiler error message comments. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/ypwhich/ypwhich.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.bin/ypwhich/ypwhich.c diff -u src/usr.bin/ypwhich/ypwhich.c:1.20 src/usr.bin/ypwhich/ypwhich.c:1.21 --- src/usr.bin/ypwhich/ypwhich.c:1.20 Sat Oct 18 08:33:30 2014 +++ src/usr.bin/ypwhich/ypwhich.c Fri Aug 11 20:32:34 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ypwhich.c,v 1.20 2014/10/18 08:33:30 snj Exp $ */ +/* $NetBSD: ypwhich.c,v 1.21 2017/08/11 20:32:34 ginsbach Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor @@ -306,9 +306,6 @@ find_mapmaster(const char *host, const c * now translate nicknames [unless inhibited] */ if (map && !inhibit) { -/*###325 [cc] error: 'i' undeclared (first use in this function)%%%*/ -/*###325 [cc] error: (Each undeclared identifier is reported only once%%%*/ -/*###325 [cc] error: for each function it appears in.)%%%*/ for (i = 0; ypaliases[i].alias; i++) { if (strcmp(map, ypaliases[i].alias) == 0) { map = ypaliases[i].name;
CVS commit: src/usr.sbin/timed/timed
Module Name:src Committed By: ginsbach Date: Fri Aug 11 16:47:42 UTC 2017 Modified Files: src/usr.sbin/timed/timed: readmsg.c Log Message: PR bin/42464: Timothy McIntosh: Fix timed interoperability Fix is a combination of FreeBSD fix and submitted patch. [From the FreeBSD change] The timed protocol is not implemented in a compatible way by all vendors; the size of the tsp_name field is OS-dependent. 4.3BSD used a 32-byte field, FreeBSD uses MAXHOSTNAMELEN and RedHat apparently uses a 64-byte field. As a result, sanity checking code added a few months ago to detect short packets will fail when interoperating with one of these other vendors. Change the short packet detection code to expect a minimum packet size corresponding to the 4.3BSD implementation, which should be a safe minimum size. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/timed/timed/readmsg.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/timed/timed/readmsg.c diff -u src/usr.sbin/timed/timed/readmsg.c:1.22 src/usr.sbin/timed/timed/readmsg.c:1.23 --- src/usr.sbin/timed/timed/readmsg.c:1.22 Sat Feb 16 07:30:15 2008 +++ src/usr.sbin/timed/timed/readmsg.c Fri Aug 11 16:47:42 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: readmsg.c,v 1.22 2008/02/16 07:30:15 matt Exp $ */ +/* $NetBSD: readmsg.c,v 1.23 2017/08/11 16:47:42 ginsbach Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)readmsg.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: readmsg.c,v 1.22 2008/02/16 07:30:15 matt Exp $"); +__RCSID("$NetBSD: readmsg.c,v 1.23 2017/08/11 16:47:42 ginsbach Exp $"); #endif #endif /* not lint */ @@ -203,15 +203,22 @@ again: continue; } length = sizeof(from); + memset(&msgin, 0, sizeof(msgin)); if ((n = recvfrom(sock, &msgin, sizeof(struct tsp), 0, (struct sockaddr*)(void *)&from, &length)) < 0) { syslog(LOG_ERR, "recvfrom: %m"); exit(EXIT_FAILURE); } - if (n < (ssize_t)sizeof(struct tsp)) { + /* + * The 4.3BSD protocol spec had a 32-byte tsp_name field, and + * this is still OS-dependent. Demand that the packet is at + * least long enough to hold a 4.3BSD packet. + */ + if (n < (ssize_t)(sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) { syslog(LOG_NOTICE, "short packet (%lu/%lu bytes) from %s", - (u_long)n, (u_long)sizeof(struct tsp), + (u_long)n, + (u_long)(sizeof(struct tsp) - MAXHOSTNAMELEN + 32), inet_ntoa(from.sin_addr)); continue; }
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Aug 11 16:03:14 UTC 2017 Modified Files: src/share/misc: acronyms acronyms.comp Log Message: PR/52479: Nikolai Lifanov: Add definitions for CRM and CMS. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.255 -r1.256 src/share/misc/acronyms cvs rdiff -u -r1.183 -r1.184 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.255 src/share/misc/acronyms:1.256 --- src/share/misc/acronyms:1.255 Wed Jun 14 20:56:33 2017 +++ src/share/misc/acronyms Fri Aug 11 16:03:14 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.255 2017/06/14 20:56:33 dholland Exp $ +$NetBSD: acronyms,v 1.256 2017/08/11 16:03:14 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -92,6 +92,7 @@ COB close of business [day] COTS commercial off-the-shelf CPC cost per click CPE customer premises equipment +CRM customer relationship management CTN can't talk now CU see you CUL see you later Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.183 src/share/misc/acronyms.comp:1.184 --- src/share/misc/acronyms.comp:1.183 Fri May 12 21:14:47 2017 +++ src/share/misc/acronyms.comp Fri Aug 11 16:03:14 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.183 2017/05/12 21:14:47 kamil Exp $ +$NetBSD: acronyms.comp,v 1.184 2017/08/11 16:03:14 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -213,8 +213,8 @@ CLUT color look-up table CLV constant linear velocity CM configuration management CMA concert multithread architecture -CMI control management interface -CMI control method interface +CMS {configuration,content,course} management system +CMI control {management,method} interface CMOS complementary metal-oxide-semiconductor CMP chip multi-processing CMS content management system
CVS commit: src/bin/rmdir
Module Name:src Committed By: ginsbach Date: Thu Aug 10 22:52:13 UTC 2017 Modified Files: src/bin/rmdir: rmdir.c Log Message: PR/48182: Fix rmdir -p handling of top-level (root) directory. XXX: pullup-8 XXX: pullup-7 XXX: pullup-6 To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/bin/rmdir/rmdir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/rmdir/rmdir.c diff -u src/bin/rmdir/rmdir.c:1.26 src/bin/rmdir/rmdir.c:1.27 --- src/bin/rmdir/rmdir.c:1.26 Mon Aug 29 14:49:38 2011 +++ src/bin/rmdir/rmdir.c Thu Aug 10 22:52:13 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rmdir.c,v 1.26 2011/08/29 14:49:38 joerg Exp $ */ +/* $NetBSD: rmdir.c,v 1.27 2017/08/10 22:52:13 ginsbach Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)rmdir.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: rmdir.c,v 1.26 2011/08/29 14:49:38 joerg Exp $"); +__RCSID("$NetBSD: rmdir.c,v 1.27 2017/08/10 22:52:13 ginsbach Exp $"); #endif #endif /* not lint */ @@ -103,6 +103,10 @@ rm_path(char *path) /* Ignore trailing '/' on deleted name */ continue; + if (*path == 0) + /* At top level (root) directory */ + break; + if (rmdir(path) < 0) { warn("%s", path); return (1);
CVS commit: src/usr.sbin/ypbind
Module Name:src Committed By: ginsbach Date: Wed Aug 9 01:56:42 UTC 2017 Modified Files: src/usr.sbin/ypbind: ypbind.c Log Message: Make use of the defined YP errors when ypbind encounters one rather than just returning an empty (successful) RPC result. Don't exit when allocating memory for a new bound domain received via a RPC. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/usr.sbin/ypbind/ypbind.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/ypbind/ypbind.c diff -u src/usr.sbin/ypbind/ypbind.c:1.98 src/usr.sbin/ypbind/ypbind.c:1.99 --- src/usr.sbin/ypbind/ypbind.c:1.98 Tue Jun 10 17:19:48 2014 +++ src/usr.sbin/ypbind/ypbind.c Wed Aug 9 01:56:42 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ypbind.c,v 1.98 2014/06/10 17:19:48 dholland Exp $ */ +/* $NetBSD: ypbind.c,v 1.99 2017/08/09 01:56:42 ginsbach Exp $ */ /* * Copyright (c) 1992, 1993 Theo de Raadt @@ -28,7 +28,7 @@ #include #ifndef LINT -__RCSID("$NetBSD: ypbind.c,v 1.98 2014/06/10 17:19:48 dholland Exp $"); +__RCSID("$NetBSD: ypbind.c,v 1.99 2017/08/09 01:56:42 ginsbach Exp $"); #endif #include @@ -314,7 +314,7 @@ domain_create(const char *name) dom = malloc(sizeof *dom); if (dom == NULL) { yp_log(LOG_ERR, "domain_create: Out of memory"); - exit(1); + return NULL; } dom->dom_next = NULL; @@ -483,7 +483,7 @@ rpc_is_valid_response(char *name, struct * * whose meaning isn't entirely clear. */ -static void +static int rpc_received(char *dom_name, struct sockaddr_in *raddrp, int force, int is_ypset) { @@ -498,7 +498,7 @@ rpc_received(char *dom_name, struct sock /* validate some stuff */ if (!rpc_is_valid_response(dom_name, raddrp)) { - return; + return 0; } /* look for the domain */ @@ -509,8 +509,10 @@ rpc_received(char *dom_name, struct sock /* if not found, create it, but only if FORCE; otherwise ignore */ if (dom == NULL) { if (force == 0) - return; + return 0; dom = domain_create(dom_name); + if (dom == NULL) + return 0; } /* the domain needs to know if it's been explicitly ypset */ @@ -536,7 +538,7 @@ rpc_received(char *dom_name, struct sock inet_ntoa(dom->dom_server_addr.sin_addr), dom->dom_name); } - return; + return 0; } /* @@ -563,7 +565,7 @@ rpc_received(char *dom_name, struct sock inet_ntoa(dom->dom_server_addr.sin_addr), dom->dom_name); } - return; + return 0; } #ifdef HEURISTIC @@ -647,7 +649,7 @@ rpc_received(char *dom_name, struct sock (void)close(dom->dom_lockfd); if ((fd = makelock(dom)) == -1) - return; + return 0; dom->dom_lockfd = fd; @@ -672,7 +674,10 @@ rpc_received(char *dom_name, struct sock (void)close(dom->dom_lockfd); removelock(dom); dom->dom_lockfd = -1; + return 0; } + + return 1; } /* @@ -706,8 +711,10 @@ ypbindproc_domain_2(SVCXPRT *transp, voi DPRINTF("ypbindproc_domain_2 %s\n", arg); /* Reject invalid domains. */ - if (_yp_invalid_domain(arg)) - return NULL; + if (_yp_invalid_domain(arg)) { + res.ypbind_respbody.ypbind_error = YPBIND_ERR_NOSERV; + return &res; + } (void)memset(&res, 0, sizeof res); res.ypbind_status = YPBIND_FAIL_VAL; @@ -724,8 +731,10 @@ ypbindproc_domain_2(SVCXPRT *transp, voi for (count = 0, dom = domains; dom != NULL; dom = dom->dom_next, count++) { - if (count > 100) - return NULL; /* prevent denial of service */ + if (count > 100) { + res.ypbind_respbody.ypbind_error = YPBIND_ERR_RESC; + return &res; /* prevent denial of service */ + } if (!strcmp(dom->dom_name, arg)) break; } @@ -742,15 +751,21 @@ ypbindproc_domain_2(SVCXPRT *transp, voi */ if (dom == NULL) { dom = domain_create(arg); - removelock(dom); - check++; - DPRINTF("unknown domain %s\n", arg); - return NULL; + if (dom != NULL) { + removelock(dom); + check++; + DPRINTF("unknown domain %s\n", arg); + res.ypbind_respbody.ypbind_error = YPBIND_ERR_NOSERV; + } else { + res.ypbind_respbody.ypbind_error = YPBIND_ERR_RESC; + } + return &res; } if (dom->dom_state == DOM_NEW) { DPRINTF("new domain %s\n", arg); - return NULL; + res.ypbind_respbody.ypbind_error = YPBIND_ERR_NOSERV; + return &res; } #ifdef HEURISTIC @@ -864,11 +879,12 @@ ypbindproc_setdom_2(SVCXPRT *transp, voi bindsin.sin_len = sizeof(bindsin); bindsin.sin_addr = sd->ypsetdom_addr; bindsin.sin_port = sd->ypsetdom_port; - rpc_received(sd->ypsetdom_domain, &bindsin, 1, 1); + if (rpc_received(sd->ypsetdom_domain, &bindsin, 1, 1)) { + DPRINTF("ypset to %s for domain %s succeeded\n", + inet_ntoa(bindsin.sin_addr), sd->ypsetdom_domain); + res = 1; + } - DPRINTF("ypset to %s for domain %s succeeded\n", - inet_ntoa(bindsin.sin_addr), sd->ypsetdom_domain); - res = 1; return &res; } @@ -1244,7 +1260,7 @@ try_again: raddr.sin_port = htons((uint16_t)rmtcr_port);
CVS commit: src/usr.sbin/rpcbind
Module Name:src Committed By: ginsbach Date: Sun Aug 6 01:55:22 UTC 2017 Modified Files: src/usr.sbin/rpcbind: warmstart.c Log Message: Fix compile warnings. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/rpcbind/warmstart.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/rpcbind/warmstart.c diff -u src/usr.sbin/rpcbind/warmstart.c:1.4 src/usr.sbin/rpcbind/warmstart.c:1.5 --- src/usr.sbin/rpcbind/warmstart.c:1.4 Sun Aug 6 01:02:44 2017 +++ src/usr.sbin/rpcbind/warmstart.c Sun Aug 6 01:55:21 2017 @@ -134,9 +134,9 @@ error: warnx("Will start from scratch"); void write_warmstart(void) { - (void)write_struct(RPCBFILE, xdr_rpcblist_ptr, &list_rbl); + (void)write_struct(RPCBFILE, (xdrproc_t) xdr_rpcblist_ptr, &list_rbl); #ifdef PORTMAP - (void)write_struct(PMAPFILE, xdr_pmaplist_ptr, &list_pml); + (void)write_struct(PMAPFILE, (xdrproc_t) xdr_pmaplist_ptr, &list_pml); #endif } @@ -150,11 +150,11 @@ read_warmstart(void) #endif int ok1, ok2 = TRUE; - ok1 = read_struct(RPCBFILE, xdr_rpcblist_ptr, &tmp_rpcbl); + ok1 = read_struct(RPCBFILE, (xdrproc_t) xdr_rpcblist_ptr, &tmp_rpcbl); if (ok1 == FALSE) return; #ifdef PORTMAP - ok2 = read_struct(PMAPFILE, xdr_pmaplist_ptr, &tmp_pmapl); + ok2 = read_struct(PMAPFILE, (xdrproc_t) xdr_pmaplist_ptr, &tmp_pmapl); #endif if (ok2 == FALSE) { xdr_free((xdrproc_t) xdr_rpcblist_ptr, (char *)&tmp_rpcbl);
CVS commit: src/usr.sbin/rpcbind
Module Name:src Committed By: ginsbach Date: Sun Aug 6 01:02:45 UTC 2017 Modified Files: src/usr.sbin/rpcbind: warmstart.c Log Message: Write the "warm start" file to /var/run rather than /tmp. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/rpcbind/warmstart.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/rpcbind/warmstart.c diff -u src/usr.sbin/rpcbind/warmstart.c:1.3 src/usr.sbin/rpcbind/warmstart.c:1.4 --- src/usr.sbin/rpcbind/warmstart.c:1.3 Fri Oct 12 21:24:01 2007 +++ src/usr.sbin/rpcbind/warmstart.c Sun Aug 6 01:02:44 2017 @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -59,9 +60,9 @@ /* These files keep the pmap_list and rpcb_list in XDR format */ -#define RPCBFILE "/tmp/rpcbind.file" +#define RPCBFILE _PATH_VARRUN "rpcbind.file" #ifdef PORTMAP -#define PMAPFILE "/tmp/portmap.file" +#define PMAPFILE _PATH_VARRUN "portmap.file" #endif static bool_t write_struct(const char *, xdrproc_t, void *);
CVS commit: src/usr.sbin/traceroute6
Module Name:src Committed By: ginsbach Date: Fri Aug 4 02:08:22 UTC 2017 Modified Files: src/usr.sbin/traceroute6: traceroute6.8 Log Message: Expand the traceroute6 man page - Add a proper description paragraph before launching into describing the options. More closely follow format of the traceroute(8) man page. - Improve the wording for some option descriptions. - Add description what what is printed and define what the possible annotations mean. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/traceroute6/traceroute6.8 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/traceroute6/traceroute6.8 diff -u src/usr.sbin/traceroute6/traceroute6.8:1.15 src/usr.sbin/traceroute6/traceroute6.8:1.16 --- src/usr.sbin/traceroute6/traceroute6.8:1.15 Tue Jul 4 07:13:18 2017 +++ src/usr.sbin/traceroute6/traceroute6.8 Fri Aug 4 02:08:21 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: traceroute6.8,v 1.15 2017/07/04 07:13:18 wiz Exp $ +.\" $NetBSD: traceroute6.8,v 1.16 2017/08/04 02:08:21 ginsbach Exp $ .\" $KAME: traceroute6.8,v 1.8 2000/06/12 16:29:18 itojun Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 17, 2005 +.Dd January 18, 2007 .Dt TRACEROUTE6 8 .Os .\" @@ -51,13 +51,27 @@ .Op Ar datalen .\" .Sh DESCRIPTION +.Nm +uses the IPv6 protocol hop limit field to elicit an ICMPv6 +.Dv TIME_EXCEEDED +response from each gateway along the path to some host. +.Pp +The only mandatory parameter is the destination host name or IPv6 address. +The default probe datagram carries 12 bytes of payload, +in addition to the IPv6 header. +The size of the payload can be specified by giving a length +.Po in bytes +.Pc +after the destination host name. +.Pp +Other options are: .Bl -tag -width Ds .It Fl A Turn on AS# lookups and use the given server instead of the default. .It Fl a Turn on AS# lookups for each hop encountered. .It Fl d -Debug mode. +Turn on socket-level debugging. .It Fl f Ar firsthop Specify how many hops to skip in trace. .It Fl g Ar gateway @@ -78,15 +92,32 @@ is not specified, and only numeric addre .Fl n is specified. .It Fl m Ar hoplimit -Specify maximum hoplimit. +Specify maximum +.Ar hoplimit, +up to 255. +The default is 30 hops. .It Fl n Do not resolve numeric address to hostname. .It Fl p Ar port -Set UDP port number to +Set the base UDP port number use in probes to .Ar port . +The default is 33434. +.Nm +hopes that nothing is listening on UDP ports +.Va base +to +.Va base + nhops - 1 +at the destination host (so an ICMPv6 +.Dv PORT_UNREACHABLE +message will be returned to terminate the route tracing). +If something is listening on a port in the default range, +this option can be used to pick an unused port range. .It Fl q Ar probes -Set the number of probe per hop count to +Set the number of probe packets sent per hop count to .Ar probes . +By default, +.Nm +sends three probe packets. .It Fl r Bypass the normal routing tables and send directly to a host on an attached network. @@ -97,12 +128,47 @@ through an interface that has no route t (e.g., after the interface was dropped by .Xr route6d 8 ) . .It Fl s Ar src -.Ar Src -specifies the source IPv6 address to be used. +Use the IPv6 address, +.Ar src , +as the source address in outgoing probe packets. .It Fl v Be verbose. +Received ICMPv6 packets other than +.Dv TIME_EXCEEDED +and +.Dv UNREACHABLEs +are listed. .It Fl w Ar waittime -Specify the delay time between probes. +Use +.Ar waittime +as the delay in seconds, between probes. +The default is 5 seconds. +.El +.Pp +This program prints the route to the given destination +and the round-trip time to each gateway, +in the same manner as traceroute. +.Pp +Here is a list of possible annotations after the +round-trip time for each gateway: +.Pp +.Bl -hang -offset indent +.It !N +Destination Unreachable - No Route to Host. +.It !X +Destination Unreachable - Administratively Prohibited. +.It !S +Destination Unreachable - Not a Neighbour. +.It !H +Destination Unreachable - Address Unreachable. +.It ! +This is printed if the hop limit is <= 1 on a port unreachable message. +This means that the packet got to the destination, +but that the reply had a hop limit that was just +large enough to allow it to get back to the source of the +.Nm . +This was more interesting in the IPv4 case, +where some IP stack bugs could be identified by this behaviour. .El .\" .Sh EXIT STATUS
CVS commit: src/lib/libc/gen
Module Name:src Committed By: ginsbach Date: Fri Aug 4 01:06:22 UTC 2017 Modified Files: src/lib/libc/gen: vis.3 Log Message: There are more than four types of encoding. The combination of VIS_CSTYLE | VIS_OCTAL is different from either separately. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/lib/libc/gen/vis.3 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/gen/vis.3 diff -u src/lib/libc/gen/vis.3:1.47 src/lib/libc/gen/vis.3:1.48 --- src/lib/libc/gen/vis.3:1.47 Sun Apr 23 13:23:02 2017 +++ src/lib/libc/gen/vis.3 Fri Aug 4 01:06:22 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.47 2017/04/23 13:23:02 christos Exp $ +.\" $NetBSD: vis.3,v 1.48 2017/08/04 01:06:22 ginsbach Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -311,7 +311,7 @@ warning on the use of the .Dv VIS_NOSLASH flag below). .Pp -There are four forms of encoding. +There are six forms of encoding. All forms use the backslash character .Ql \e to introduce a special @@ -403,6 +403,9 @@ If .Fa nextc is an octal digit, the latter representation is used to avoid ambiguity. +.Pp +Non-printable characters without C-style +backslash sequences use the default representation. .It Dv VIS_OCTAL Use a three digit octal sequence. The form is @@ -410,6 +413,11 @@ The form is where .Em d represents an octal digit. +.It Dv VIS_CSTYLE \&| Dv VIS_OCTAL +Same as +.Dv VIS_CSTYLE +except that non-printable characters without C-style +backslash sequences use a three digit octal sequence. .It Dv VIS_HTTPSTYLE Use URI encoding as described in RFC 1738. The form is
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri May 5 14:23:47 UTC 2017 Modified Files: src/share/misc: acronyms.comp Log Message: add EEE, MII, RGMII, SGMII To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.179 src/share/misc/acronyms.comp:1.180 --- src/share/misc/acronyms.comp:1.179 Fri Mar 24 12:49:43 2017 +++ src/share/misc/acronyms.comp Fri May 5 14:23:47 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.179 2017/03/24 12:49:43 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.180 2017/05/05 14:23:47 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -406,6 +406,7 @@ EDGE explicit data graph execution EDID extended display identification data EDO extended data out EDS electronical data sheet +EEE energy efficient ethernet EEPROM electrically erasable programmable read only memory EFI extensible firmware interface EFL emitter follower logic @@ -756,6 +757,7 @@ MIC message integrity {check,code} MID mobile Internet device MIDI musical instrument digital interface MIF management information format +MII media independent interface MIM man in the middle MIMD multiple instruction, multiple data MIME Multipurpose Internet Mail Extensions @@ -1064,6 +1066,7 @@ RFI radio frequency interference RFO request for ownership RGB red green blue RGBA red green blue alpha +RGMII reduced gigabit media independent interface RH read hit RHEL Red Hat Enterprise Linux RHL Red Hat Linux @@ -1160,6 +1163,7 @@ SFI software fault isolation SFTP SSH File Transfer Protocol SFTP Serial File Transfer Protocol SFTP Simple File Transfer Protocol +SGMII serial gigabit media independent interface SGRAM synchronous graphics random access memory SHA secure hash algorithm SIDH supersingular isogeny Diffie-Hellman
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Mar 24 12:49:43 UTC 2017 Modified Files: src/share/misc: acronyms.comp Log Message: Add the more prevalent media access control (MAC) in addition to medium access control To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.178 src/share/misc/acronyms.comp:1.179 --- src/share/misc/acronyms.comp:1.178 Mon Mar 13 11:50:06 2017 +++ src/share/misc/acronyms.comp Fri Mar 24 12:49:43 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.178 2017/03/13 11:50:06 leot Exp $ +$NetBSD: acronyms.comp,v 1.179 2017/03/24 12:49:43 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -726,7 +726,7 @@ LVT local vector table LWP light-weight process LZW Lempel Ziv Welch MAC mandatory access control -MAC medium access control +MAC {media,medium} access control MAC message authentication {check,code} MADT multiple APIC descriptor table MB megabyte
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Thu Jan 26 19:00:13 UTC 2017 Modified Files: src/share/misc: acronyms.comp Log Message: Add virtual routing and forwarding To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.173 src/share/misc/acronyms.comp:1.174 --- src/share/misc/acronyms.comp:1.173 Thu Jan 19 19:09:06 2017 +++ src/share/misc/acronyms.comp Thu Jan 26 19:00:13 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.173 2017/01/19 19:09:06 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.174 2017/01/26 19:00:13 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -1385,6 +1385,7 @@ VOD video on demand VPN virtual private network VR virtual reality VRAM video random access memory +VRF virtual routing and forwarding VRM voltage regulator module VRRP Virtual Router Redundancy Protocol VSTP VLAN Spanning Tree Protocol
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Thu Jan 19 19:09:06 UTC 2017 Modified Files: src/share/misc: acronyms.comp Log Message: Add single and multi-mode fiber To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.172 src/share/misc/acronyms.comp:1.173 --- src/share/misc/acronyms.comp:1.172 Thu Jan 19 03:39:16 2017 +++ src/share/misc/acronyms.comp Thu Jan 19 19:09:06 2017 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.172 2017/01/19 03:39:16 riastradh Exp $ +$NetBSD: acronyms.comp,v 1.173 2017/01/19 19:09:06 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -771,6 +771,7 @@ ML maximum likelihood MLC multi-level cell MLD multicast listener discovery MLHP micro loop heat pipe +MMF multi-mode fiber MMIC monolithic microwave integrated circuit MMIO memory mapped input/output MMORPG massive multiplayer online role playing game @@ -1182,6 +1183,7 @@ SMAP supervisor mode access prevention SMART self-monitoring analysis and reporting technology SMBIOS System Management BIOS SMC system management controller +SMF single mode fiber SMI structure of management information SMI system management interrupt SMM system management mode
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Thu Aug 11 02:42:28 UTC 2016 Modified Files: src/share/misc: acronyms.comp Log Message: Add some VLAN related acronyms. To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.166 src/share/misc/acronyms.comp:1.167 --- src/share/misc/acronyms.comp:1.166 Tue May 31 23:15:05 2016 +++ src/share/misc/acronyms.comp Thu Aug 11 02:42:28 2016 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.166 2016/05/31 23:15:05 jnemeth Exp $ +$NetBSD: acronyms.comp,v 1.167 2016/08/11 02:42:28 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -131,6 +131,7 @@ BOM byte order mark BP base pointer BP boot processor BPB BIOS parameter block +BPDU bridge protocol data unit BPF Berkeley Packet Filter BPI bits per inch BPM business process modelling @@ -180,6 +181,7 @@ CD cache disable CD compact disc CDDA compact disc digital audio CDMA code division multiple access +CDP Cisco Discovery Protocol CDRAM cache dynamic random access memory CER canonical encoding rules CF compact flash @@ -349,6 +351,7 @@ DRM digital rights management DRRS display refresh rate switching DS debug store DSA digital signature algorithm +DSAP destination service access point DSB double-sideband modulation DSDT differentiated system descriptor table DSL digital subscriber line @@ -787,6 +790,7 @@ MSI message signaled interrupt MSI modified, shared, invalid MSR machine state register MSS maximum segment size +MSTP Multiple Spanning Tree Protocol MT machine translation MTA mail transfer agent MTBF mean time between failures @@ -994,6 +998,7 @@ PUN physical unit number PV physical volume PVG physical volume group PVI protected-mode virtual interrupt +PVST Per-VLAN Spanning Tree PWM pulse width modulation PXE preboot execution environment QA quality assurance @@ -1059,6 +1064,7 @@ RPKI resource PKI RPL requested privilege level RPM revolutions per minute RPN reverse Polish notation +RPVST Rapid Per-VLAN Spanning Tree RR random replacement RR round robin RS relay station @@ -1067,6 +1073,7 @@ RSIP Realm Specific IP RSN Robust Secure Network RSS really simple syndication RSS residual sum of squares +RSTP Rapid Spanning Tree Protocol RT real time RTC real time clock RTC real time computing @@ -1092,6 +1099,7 @@ SAL system abstraction layer SAM serial access memory SAM sum addressed memory SAN storage area network +SAP service access point SAPIC streamlined advanced programmable interrupt controller SASD structured analysis, structured design SASI Shugart Associates System Interface @@ -1157,6 +1165,7 @@ SMP symmetric multiprocessing SMT simultaneous multithreading SMTP Simple Mail Transfer Protocol SMU system management unit +SNAP Sub-Network Access Protocol SNMP Simple Network Management Protocol SNR signal-to-noise ratio SOA service oriented architecture @@ -1184,6 +1193,7 @@ SRAM static random access memory SRC sample rate conversion SS self-snoop SS stack segment +SSAP source service access point SSB single-sideband modulation SSD solid state drive SSE streaming SIMD extensions @@ -1351,6 +1361,8 @@ VR virtual reality VRAM video random access memory VRM voltage regulator module VRRP Virtual Router Redundancy Protocol +VSTP VLAN Spanning Tree Protocol +VTP VLAN Trunking Protocol W watt W3C World Wide Web Consortium WAN wide area network
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Tue Mar 22 17:41:26 UTC 2016 Modified Files: src/share/misc: acronyms.comp Log Message: +HSM is also hierarchical storage management To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.160 src/share/misc/acronyms.comp:1.161 --- src/share/misc/acronyms.comp:1.160 Tue Mar 22 17:03:02 2016 +++ src/share/misc/acronyms.comp Tue Mar 22 17:41:26 2016 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.160 2016/03/22 17:03:02 dholland Exp $ +$NetBSD: acronyms.comp,v 1.161 2016/03/22 17:41:26 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -526,6 +526,7 @@ HP Hewlett-Packard HPC high performance computing HPET high precision event timer HSM hardware security module +HSM hierarchical storage management HT hyper-threading HTC hardware thermal control HTCC high temperature co-fired ceramic
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Fri Mar 18 12:41:25 UTC 2016 Modified Files: src/lib/libc/time: localtime.c Log Message: Use the correct upper bounds for the types array. The correct upper bound is typecnt not timecnt. Now perpetual 'standard' time zones will work correctly as they have a typecnt of 1 but a timecnt of 0. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/lib/libc/time/localtime.c 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/time/localtime.c diff -u src/lib/libc/time/localtime.c:1.102 src/lib/libc/time/localtime.c:1.103 --- src/lib/libc/time/localtime.c:1.102 Tue Mar 15 15:16:01 2016 +++ src/lib/libc/time/localtime.c Fri Mar 18 12:41:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.102 2016/03/15 15:16:01 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.103 2016/03/18 12:41:25 ginsbach Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -10,7 +10,7 @@ #if 0 static char elsieid[] = "@(#)localtime.c 8.17"; #else -__RCSID("$NetBSD: localtime.c,v 1.102 2016/03/15 15:16:01 christos Exp $"); +__RCSID("$NetBSD: localtime.c,v 1.103 2016/03/18 12:41:25 ginsbach Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -282,7 +282,7 @@ const char * tzgetname(const timezone_t sp, int isdst) { int i; - for (i = 0; i < sp->timecnt; ++i) { + for (i = 0; i < sp->typecnt; ++i) { const struct ttinfo *const ttisp = &sp->ttis[sp->types[i]]; if (ttisp->tt_isdst == isdst) @@ -297,7 +297,7 @@ tzgetgmtoff(const timezone_t sp, int isd { int i; long l = -1; - for (i = 0; i < sp->timecnt; ++i) { + for (i = 0; i < sp->typecnt; ++i) { const struct ttinfo *const ttisp = &sp->ttis[sp->types[i]]; if (ttisp->tt_isdst == isdst) {
CVS commit: src/usr.bin/indent
Module Name:src Committed By: ginsbach Date: Thu Feb 25 13:23:27 UTC 2016 Modified Files: src/usr.bin/indent: indent.c io.c pr_comment.c Log Message: Fix obvious contraction spelling mistakes by adding missing apostrophes. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/indent/indent.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/indent/io.c cvs rdiff -u -r1.9 -r1.10 src/usr.bin/indent/pr_comment.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.bin/indent/indent.c diff -u src/usr.bin/indent/indent.c:1.21 src/usr.bin/indent/indent.c:1.22 --- src/usr.bin/indent/indent.c:1.21 Mon Feb 22 22:01:48 2016 +++ src/usr.bin/indent/indent.c Thu Feb 25 13:23:27 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: indent.c,v 1.21 2016/02/22 22:01:48 ginsbach Exp $ */ +/* $NetBSD: indent.c,v 1.22 2016/02/25 13:23:27 ginsbach Exp $ */ /* * Copyright (c) 1980, 1993 @@ -75,7 +75,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985 Sun #if 0 static char sccsid[] = "@(#)indent.c 5.17 (Berkeley) 6/7/93"; #else -__RCSID("$NetBSD: indent.c,v 1.21 2016/02/22 22:01:48 ginsbach Exp $"); +__RCSID("$NetBSD: indent.c,v 1.22 2016/02/25 13:23:27 ginsbach Exp $"); #endif #endif/* not lint */ @@ -260,7 +260,7 @@ main(int argc, char **argv) } } if (ps.com_ind <= 1) - ps.com_ind = 2; /* dont put normal comments before column 2 */ + ps.com_ind = 2; /* don't put normal comments before column 2 */ if (troff) { if (bodyf.font[0] == 0) parsefont(&bodyf, "R"); @@ -355,7 +355,7 @@ main(int argc, char **argv) case lbrace: /* this is a brace that starts the * compound stmt */ if (sc_end == 0) { /* ignore buffering if a - * comment wasnt stored + * comment wasn't stored * up */ ps.search_brace = false; goto check_type; @@ -420,7 +420,7 @@ main(int argc, char **argv) force_nl = false; if (sc_end == 0) { /* ignore buffering if - * comment wasnt saved + * comment wasn't saved * up */ ps.search_brace = false; goto check_type; @@ -503,7 +503,7 @@ check_type: diag(0, "Line broken"); flushed_nl = false; dump_line(); -ps.want_blank = false; /* dont insert blank at +ps.want_blank = false; /* don't insert blank at * line start */ force_nl = false; } @@ -623,7 +623,7 @@ check_type: ps.last_u_d = true; /* inform lexi that a * following operator is * unary */ -ps.in_stmt = false; /* dont use stmt +ps.in_stmt = false; /* don't use stmt * continuation * indentation */ @@ -785,8 +785,8 @@ check_type: ps.in_decl = (ps.dec_nest > 0); /* if we were in a first * level structure - * declaration, we arent - * any more */ + * declaration, we + * aren't any more */ if ((!sp_sw || hd_type != forstmt) && ps.p_l_follow > 0) { @@ -801,8 +801,8 @@ check_type: * while, etc. with unbalanced * parens */ sp_sw = false; - parse(hd_type); /* dont lose the if, or - * whatever */ + parse(hd_type); /* don't lose the if, + * or whatever */ } } *e_code++ = ';'; @@ -819,7 +819,7 @@ check_type: break; case lbrace: /* got a '{' */ - ps.in_stmt = false; /* dont indent the {} */ + ps.in_stmt = false; /* don't indent the {} */ if (!ps.block_init) force_nl = true; /* force other stuff on * same line as '{' onto @@ -856,7 +856,7 @@ check_type: } } if (s_code == e_code) -ps.ind_stmt = false; /* dont put extra +ps.ind_stmt = false; /* don't put extra * indentation on line * with '{' */ if (ps.in_decl && ps.in_or_st) { /* this is either a @@ -865,9 +865,9 @@ check_type: di_stack[ps.dec_nest++] = dec_ind; /* ? dec_ind = 0; */ } else { -ps.decl_on_line = false; /* we cant be in the +ps.decl_on_line = false; /* we can't be in the * middle of a - * declaration, so dont + * declaration, so don't * do special * indentation of * comments */ @@ -1088,7 +1088,7 @@ check_type: case period: /* treat a period kind of like a binary * operation */ *e_code++ = '.'; /* move the period into line */ - ps.want_blank = false; /* dont put a blank after a + ps.want_blank = false; /* don't put a blank after a * period */ break; @@ -1256,7 +1256,7 @@ check_type: * line here */ flushed_nl = false; dump_line(); -ps.want_blank = false; /* dont insert blank at +ps.want_blank = false; /* don't insert blank at * line start */ force_nl = false; } Index: src/usr.bin/indent/io.c diff -u src/usr.bin/indent/io.c:1.16 src/usr.bin/indent/io.c:1.17 --- src/usr.bin/indent/io.c:1.16 Mon Feb 22 19:04:18 2016 +++ src/usr.bin/indent/io.c Thu Feb 25 13:23:27 2016 @@ -1,4 +1,4 @
CVS commit: src/usr.bin/indent
Module Name:src Committed By: ginsbach Date: Wed Feb 24 17:38:15 UTC 2016 Modified Files: src/usr.bin/indent: indent.1 Log Message: Remove double space before [.,:] in macro arguments. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/indent/indent.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/indent/indent.1 diff -u src/usr.bin/indent/indent.1:1.24 src/usr.bin/indent/indent.1:1.25 --- src/usr.bin/indent/indent.1:1.24 Wed Feb 24 17:13:48 2016 +++ src/usr.bin/indent/indent.1 Wed Feb 24 17:38:15 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: indent.1,v 1.24 2016/02/24 17:13:48 ginsbach Exp $ +.\" $NetBSD: indent.1,v 1.25 2016/02/24 17:38:15 ginsbach Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -115,9 +115,9 @@ according to the switches. The switches which can be specified are described below. They may appear before or after the file names. .Pp -.Sy NOTE : +.Sy NOTE : If you only specify an -.Ar input-file , +.Ar input-file , the formatting is done `in-place', that is, the formatted file is written back into .Ar input-file @@ -136,7 +136,7 @@ If is specified, .Nm checks to make sure it is different from -.Ar input-file . +.Ar input-file . .Pp If no .Ar input-file @@ -144,7 +144,7 @@ is specified input is read from stdin and the formatted file is written to stdout. .Pp The options listed below control the formatting style imposed by -.Nm . +.Nm . .Bl -tag -width Op .It Fl bacc , nbacc If @@ -154,26 +154,26 @@ compilation block. For example, in front of every #ifdef and after every #endif. Other blank lines surrounding such blocks will be swallowed. Default: -.Fl nbacc . +.Fl nbacc . .It Fl bad , nbad If .Fl bad is specified, a blank line is forced after every block of declarations. Default: -.Fl nbad . +.Fl nbad . .It Fl bap , nbap If .Fl bap is specified, a blank line is forced after every procedure body. Default: -.Fl nbap . +.Fl nbap . .It Fl bbb , nbbb If .Fl bbb is specified, a blank line is forced before every block comment. Default: -.Fl nbbb . +.Fl nbbb . .It Fl \&bc , nbc If .Fl \&bc @@ -181,7 +181,7 @@ is specified, then a newline is forced a .Fl nbc turns off this option. Default: -.Fl \&bc . +.Fl \&bc . .It Fl \&br , \&bl Specifying .Fl \&bl @@ -207,11 +207,11 @@ If is specified, a blank is forced after .Ic sizeof . Default: -.Fl nbs . +.Fl nbs . .It Fl c Ns Ar n The column in which comments on code start. Default: -.Fl c33 . +.Fl c33 . .It Fl cd Ns Ar n The column in which comments on declarations start. The default @@ -233,15 +233,15 @@ Rather than like this: This only affects block comments, not comments to the right of code. Default: -.Fl cdb . +.Fl cdb . .It Fl ce , nce Enables (disables) forcing `else's to cuddle up to the immediately preceding `}'. Default: -.Fl \&ce . +.Fl \&ce . .It Fl \&ci Ns Ar n Sets the continuation indent to be -.Ar n . +.Ar n . Continuation lines will be indented that far from the beginning of the first line of the statement. @@ -251,7 +251,7 @@ indicate the nesting, unless is in effect. .Fl \&ci defaults to the same value as -.Fl i . +.Fl i . .It Fl cli Ns Ar n Causes case labels to be indented .Ar n @@ -261,7 +261,7 @@ statement. .Fl cli0.5 causes case labels to be indented half a tab stop. Default: -.Fl cli0 . +.Fl cli0 . .It Fl d Ns Ar n Controls the placement of comments which are not to the right of code. For example, @@ -276,14 +276,14 @@ indentation below. Specifies the indentation, in character positions, from a declaration keyword to the following identifier. Default: -.Fl di16 . +.Fl di16 . .It Fl dj , ndj .Fl \&dj left justifies declarations. .Fl ndj indents declarations the same as code. Default: -.Fl ndj . +.Fl ndj . .It Fl \&ei , nei Enables (disables) special .Ic else-if @@ -296,7 +296,7 @@ will have the same indentation as the pr .Ic \&if statement. Default: -.Fl ei . +.Fl ei . .It Fl eei , neei Enables (disables) extra indentation on continuation lines of the expression part of @@ -306,7 +306,7 @@ and statements. These continuation lines will be indented one extra level. Default: -.Fl neei . +.Fl neei . .It Fl fc1 , nfc1 Enables (disables) the formatting of comments that start in column 1. Often, comments whose leading `/' is in column 1 have been carefully @@ -315,7 +315,7 @@ In such cases, .Fl nfc1 should be used. Default: -.Fl fc1 . +.Fl fc1 . .It Fl i Ns Ar n The number of spaces for one indentation level. Default: @@ -324,11 +324,11 @@ Default: Enables (disables) the indentation of parameter declarations from the left margin. Default: -.Fl \&ip . +.Fl \&ip . .It Fl l Ns Ar n Maximum length of an output line. Default: -.Fl l78 . +.Fl l78 . .It Fl \&lp , nlp Lines up code surrounded by par
CVS commit: src/usr.bin/indent
Module Name:src Committed By: ginsbach Date: Wed Feb 24 17:13:48 UTC 2016 Modified Files: src/usr.bin/indent: indent.1 Log Message: Add the [n]ei and [n]eei options to the synopsis; already documented in description. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/indent/indent.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/indent/indent.1 diff -u src/usr.bin/indent/indent.1:1.23 src/usr.bin/indent/indent.1:1.24 --- src/usr.bin/indent/indent.1:1.23 Thu Sep 4 04:06:07 2014 +++ src/usr.bin/indent/indent.1 Wed Feb 24 17:13:48 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: indent.1,v 1.23 2014/09/04 04:06:07 mrg Exp $ +.\" $NetBSD: indent.1,v 1.24 2016/02/24 17:13:48 ginsbach Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -61,7 +61,7 @@ .\" .\" from: @(#)indent.1 8.1 (Berkeley) 7/1/93 .\" -.Dd September 2, 2014 +.Dd February 24, 2016 .Dt INDENT 1 .Os .Sh NAME @@ -85,6 +85,8 @@ .Op Fl cli Ns Ar n .Op Fl d Ns Ar n .Op Fl \&di Ns Ar n +.Op Fl ei | Fl nei +.Op Fl eei | Fl neei .Op Fl fc1 | Fl nfc1 .Op Fl i Ns Ar n .Op Fl \&ip | Fl nip
CVS commit: src/usr.bin/indent
Module Name:src Committed By: ginsbach Date: Mon Feb 22 22:01:48 UTC 2016 Modified Files: src/usr.bin/indent: indent.c Log Message: Use warnx(3). To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/indent/indent.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.bin/indent/indent.c diff -u src/usr.bin/indent/indent.c:1.20 src/usr.bin/indent/indent.c:1.21 --- src/usr.bin/indent/indent.c:1.20 Mon Feb 22 19:04:18 2016 +++ src/usr.bin/indent/indent.c Mon Feb 22 22:01:48 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: indent.c,v 1.20 2016/02/22 19:04:18 ginsbach Exp $ */ +/* $NetBSD: indent.c,v 1.21 2016/02/22 22:01:48 ginsbach Exp $ */ /* * Copyright (c) 1980, 1993 @@ -75,7 +75,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985 Sun #if 0 static char sccsid[] = "@(#)indent.c 5.17 (Berkeley) 6/7/93"; #else -__RCSID("$NetBSD: indent.c,v 1.20 2016/02/22 19:04:18 ginsbach Exp $"); +__RCSID("$NetBSD: indent.c,v 1.21 2016/02/22 22:01:48 ginsbach Exp $"); #endif #endif/* not lint */ @@ -134,7 +134,7 @@ main(int argc, char **argv) \*---*/ if (!setlocale(LC_ALL, "")) - fprintf(stderr, "indent: can't set locale.\n"); + warnx("can't set locale."); hd_type = 0; ps.p_stack[0] = stmt; /* this is the parser's stack */
CVS commit: src/usr.bin/indent
Module Name:src Committed By: ginsbach Date: Mon Feb 22 21:20:29 UTC 2016 Modified Files: src/usr.bin/indent: args.c Log Message: Stray '\n' in errx(3) format. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/indent/args.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.bin/indent/args.c diff -u src/usr.bin/indent/args.c:1.12 src/usr.bin/indent/args.c:1.13 --- src/usr.bin/indent/args.c:1.12 Mon Feb 22 19:04:18 2016 +++ src/usr.bin/indent/args.c Mon Feb 22 21:20:29 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: args.c,v 1.12 2016/02/22 19:04:18 ginsbach Exp $ */ +/* $NetBSD: args.c,v 1.13 2016/02/22 21:20:29 ginsbach Exp $ */ /* * Copyright (c) 1980, 1993 @@ -68,7 +68,7 @@ #if 0 static char sccsid[] = "@(#)args.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: args.c,v 1.12 2016/02/22 19:04:18 ginsbach Exp $"); +__RCSID("$NetBSD: args.c,v 1.13 2016/02/22 21:20:29 ginsbach Exp $"); #endif #endif/* not lint */ @@ -432,7 +432,7 @@ found: break; default: - errx(1, "set_option: internal error: p_special %d\n", + errx(1, "set_option: internal error: p_special %d", p->p_special); } break;
CVS commit: src/usr.bin/indent
Module Name:src Committed By: ginsbach Date: Mon Feb 22 19:04:18 UTC 2016 Modified Files: src/usr.bin/indent: args.c indent.c io.c Log Message: Use errx(3). To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/indent/args.c cvs rdiff -u -r1.19 -r1.20 src/usr.bin/indent/indent.c cvs rdiff -u -r1.15 -r1.16 src/usr.bin/indent/io.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.bin/indent/args.c diff -u src/usr.bin/indent/args.c:1.11 src/usr.bin/indent/args.c:1.12 --- src/usr.bin/indent/args.c:1.11 Thu Sep 4 04:06:07 2014 +++ src/usr.bin/indent/args.c Mon Feb 22 19:04:18 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: args.c,v 1.11 2014/09/04 04:06:07 mrg Exp $ */ +/* $NetBSD: args.c,v 1.12 2016/02/22 19:04:18 ginsbach Exp $ */ /* * Copyright (c) 1980, 1993 @@ -68,7 +68,7 @@ #if 0 static char sccsid[] = "@(#)args.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: args.c,v 1.11 2014/09/04 04:06:07 mrg Exp $"); +__RCSID("$NetBSD: args.c,v 1.12 2016/02/22 19:04:18 ginsbach Exp $"); #endif #endif/* not lint */ @@ -78,6 +78,7 @@ __RCSID("$NetBSD: args.c,v 1.11 2014/09/ */ #include +#include #include #include #include @@ -396,8 +397,7 @@ set_option(char *arg) for (p = pro; p->p_name; p++) if (*p->p_name == *arg && eqin(p->p_name, arg)) goto found; - fprintf(stderr, "indent: %s: unknown parameter \"%s\"\n", option_source, arg - 1); - exit(1); + errx(1, "%s: unknown parameter \"%s\"", option_source, arg - 1); found: switch (p->p_type) { @@ -432,9 +432,8 @@ found: break; default: - fprintf(stderr, "\ -indent: set_option: internal error: p_special %d\n", p->p_special); - exit(1); + errx(1, "set_option: internal error: p_special %d\n", + p->p_special); } break; @@ -448,9 +447,8 @@ indent: set_option: internal error: p_sp case PRO_INT: if (!isdigit((unsigned char)*param_start)) { need_param: - fprintf(stderr, "indent: %s: ``%s'' requires a parameter\n", - option_source, arg - 1); - exit(1); + errx(1, "%s: ``%s'' requires a parameter", + option_source, arg - 1); } *p->p_obj = atoi(param_start); break; @@ -460,8 +458,6 @@ indent: set_option: internal error: p_sp break; default: - fprintf(stderr, "indent: set_option: internal error: p_type %d\n", - p->p_type); - exit(1); + errx(1, "set_option: internal error: p_type %d", p->p_type); } } Index: src/usr.bin/indent/indent.c diff -u src/usr.bin/indent/indent.c:1.19 src/usr.bin/indent/indent.c:1.20 --- src/usr.bin/indent/indent.c:1.19 Thu Sep 4 04:06:07 2014 +++ src/usr.bin/indent/indent.c Mon Feb 22 19:04:18 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: indent.c,v 1.19 2014/09/04 04:06:07 mrg Exp $ */ +/* $NetBSD: indent.c,v 1.20 2016/02/22 19:04:18 ginsbach Exp $ */ /* * Copyright (c) 1980, 1993 @@ -75,7 +75,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985 Sun #if 0 static char sccsid[] = "@(#)indent.c 5.17 (Berkeley) 6/7/93"; #else -__RCSID("$NetBSD: indent.c,v 1.19 2014/09/04 04:06:07 mrg Exp $"); +__RCSID("$NetBSD: indent.c,v 1.20 2016/02/22 19:04:18 ginsbach Exp $"); #endif #endif/* not lint */ @@ -236,8 +236,7 @@ main(int argc, char **argv) * output file */ if (strcmp(in_name, out_name) == 0) { /* attempt to overwrite * the file */ - fprintf(stderr, "indent: input and output files must be different\n"); - exit(1); + errx(1, "input and output files must be different"); } output = fopen(out_name, "w"); if (output == 0) /* check for create @@ -245,8 +244,7 @@ main(int argc, char **argv) err(1, "%s", out_name); continue; } - fprintf(stderr, "indent: unknown parameter: %s\n", argv[i]); - exit(1); + errx(1, "unknown parameter: %s", argv[i]); } else set_option(argv[i]); } /* end of for */ Index: src/usr.bin/indent/io.c diff -u src/usr.bin/indent/io.c:1.15 src/usr.bin/indent/io.c:1.16 --- src/usr.bin/indent/io.c:1.15 Thu Sep 4 04:06:07 2014 +++ src/usr.bin/indent/io.c Mon Feb 22 19:04:18 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.15 2014/09/04 04:06:07 mrg Exp $ */ +/* $NetBSD: io.c,v 1.16 2016/02/22 19:04:18 ginsbach Exp $ */ /* * Copyright (c) 1980, 1993 @@ -68,7 +68,7 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: io.c,v 1.15 2014/09/04 04:06:07 mrg Exp $"); +__RCSID("$NetBSD: io.c,v 1.16 2016/02/22 19:04:18 ginsbach Exp $"); #endif #endif/* not lint */ @@ -668,8 +668,7 @@ parsefont(struct fstate *f, const char * if (*s == '-') sizedelta--; else { - fprintf(stderr, "indent: bad font specification: %s\n", s0); - exit(1); + errx(1, "bad font specification: %s", s0); } s++; }
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Sat Oct 31 03:42:00 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Don't attempt to set TM_ZONE (name) for 'J' as isdst isn't known. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.57 src/lib/libc/time/strptime.c:1.58 --- src/lib/libc/time/strptime.c:1.57 Sat Oct 31 02:14:08 2015 +++ src/lib/libc/time/strptime.c Sat Oct 31 03:42:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.57 2015/10/31 02:14:08 christos Exp $ */ +/* $NetBSD: strptime.c,v 1.58 2015/10/31 03:42:00 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.57 2015/10/31 02:14:08 christos Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.58 2015/10/31 03:42:00 ginsbach Exp $"); #endif #include "namespace.h" @@ -538,7 +538,7 @@ namedzone: tm->TM_GMTOFF = -timezone; #endif #ifdef TM_ZONE - tm->TM_ZONE = tzname[i]; + tm->TM_ZONE = NULL; /* XXX */ #endif bp++; continue;
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Sat Oct 31 02:09:06 UTC 2015 Modified Files: src/lib/libc/time: strptime.3 Log Message: - Add reference to RFC-3339 - Add J to military / nautical time zone description To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/lib/libc/time/strptime.3 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/time/strptime.3 diff -u src/lib/libc/time/strptime.3:1.33 src/lib/libc/time/strptime.3:1.34 --- src/lib/libc/time/strptime.3:1.33 Thu Oct 29 22:42:55 2015 +++ src/lib/libc/time/strptime.3 Sat Oct 31 02:09:06 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: strptime.3,v 1.33 2015/10/29 22:42:55 wiz Exp $ +.\" $NetBSD: strptime.3,v 1.34 2015/10/31 02:09:06 ginsbach Exp $ .\" .\" Copyright (c) 1997, 1998, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -221,7 +221,7 @@ with \&%C, specifies the year [0,99] wit .It Cm \&%Y the year, including the century (i.e., 1996). .It Cm \&%z -an ISO 8601 or RFC-2822 time zone specification. +an ISO 8601, RFC-2822, or RFC-3339 time zone specification. This is one of the following: .Bl -dash -offset indent -compact .It @@ -295,7 +295,7 @@ or .Pq Dq S time .It -a single letter military time zone specified as: +a single letter military or nautical time zone specified as: .Bl -bullet -offset indent -compact .It .Dq A @@ -304,7 +304,10 @@ through .It .Dq K through -.Dq Y . +.Dq Y +.It +.Dq J +.Pq non-nautical local time zone .El .It An arbirtrary timezone name that can be loaded from the database.
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Fri Oct 30 21:36:25 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Add 'J' (Juliett) as military time zone name meaning the local time zone. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.55 src/lib/libc/time/strptime.c:1.56 --- src/lib/libc/time/strptime.c:1.55 Fri Oct 30 18:20:16 2015 +++ src/lib/libc/time/strptime.c Fri Oct 30 21:36:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.55 2015/10/30 18:20:16 christos Exp $ */ +/* $NetBSD: strptime.c,v 1.56 2015/10/30 21:36:25 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.55 2015/10/30 18:20:16 christos Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.56 2015/10/30 21:36:25 ginsbach Exp $"); #endif #include "namespace.h" @@ -492,9 +492,11 @@ literal: * C[DS]T = Central : -5 | -6 * M[DS]T = Mountain: -6 | -7 * P[DS]T = Pacific : -7 | -8 - * Military + * Nautical/Military * [A-IL-M] = -1 ... -9 (J not used) * [N-Y] = +1 ... +12 + * Note: J maybe used to denote non-nautical + * local time */ while (isspace(*bp)) bp++; @@ -532,7 +534,7 @@ literal: namedzone: bp = zname; -/* Military style */ +/* Nautical / Military style */ if (delim(bp[1]) && ((*bp >= 'A' && *bp <= 'I') || (*bp >= 'L' && *bp <= 'Y'))) { @@ -553,6 +555,17 @@ namedzone: bp++; continue; } +/* 'J' is local time */ +if (delim(bp[1]) && *bp == 'J') { +#ifdef TM_GMTOFF + tm->TM_GMTOFF = -timezone; +#endif +#ifdef TM_ZONE + tm->TM_ZONE = tzname[i]; +#endif + bp++; + continue; +} /* * From our 3 letter hard-coded table
CVS commit: src
Module Name:src Committed By: ginsbach Date: Fri Oct 30 03:18:10 UTC 2015 Modified Files: src/lib/libc/time: strptime.c src/tests/lib/libc/time: t_strptime.c Log Message: ISO 8601 and RFC 3339 specify that an offset can be up to 23:59 and not 12:00 east/west. Just proves that one shouldn't use other implementations as a canonical reference. Thanks to all who pointed this out. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/lib/libc/time/strptime.c cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/time/t_strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.52 src/lib/libc/time/strptime.c:1.53 --- src/lib/libc/time/strptime.c:1.52 Fri Oct 30 01:49:36 2015 +++ src/lib/libc/time/strptime.c Fri Oct 30 03:18:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.52 2015/10/30 01:49:36 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.53 2015/10/30 03:18:10 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.52 2015/10/30 01:49:36 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.53 2015/10/30 03:18:10 ginsbach Exp $"); #endif #include "namespace.h" @@ -626,7 +626,7 @@ loadzone: default: return NULL; } - if (offs > (12 * SECSPERHOUR)) + if (offs >= (HOURSPERDAY * SECSPERHOUR)) return NULL; if (neg) offs = -offs; Index: src/tests/lib/libc/time/t_strptime.c diff -u src/tests/lib/libc/time/t_strptime.c:1.8 src/tests/lib/libc/time/t_strptime.c:1.9 --- src/tests/lib/libc/time/t_strptime.c:1.8 Fri Oct 30 01:51:15 2015 +++ src/tests/lib/libc/time/t_strptime.c Fri Oct 30 03:18:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strptime.c,v 1.8 2015/10/30 01:51:15 ginsbach Exp $ */ +/* $NetBSD: t_strptime.c,v 1.9 2015/10/30 03:18:10 ginsbach Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_strptime.c,v 1.8 2015/10/30 01:51:15 ginsbach Exp $"); +__RCSID("$NetBSD: t_strptime.c,v 1.9 2015/10/30 03:18:10 ginsbach Exp $"); #include @@ -326,6 +326,10 @@ static struct { { "-0403", -14580 }, { "+04:03", 14580 }, { "-04:03", -14580 }, + { "+14:00", 50400 }, + { "-14:00", -50400 }, + { "+23:59", 86340 }, + { "-23:59", -86340 }, { "1",-1 }, { "03",-1 }, @@ -335,8 +339,8 @@ static struct { { "+12345", -1 }, { "+12:345", -1 }, { "+123:45", -1 }, - { "+1430", -1 }, - { "-1430", -1 }, + { "+2400", -1 }, + { "-2400", -1 }, { "+1060", -1 }, { "-1060", -1 },
CVS commit: src/tests/lib/libc/time
Module Name:src Committed By: ginsbach Date: Fri Oct 30 01:51:15 UTC 2015 Modified Files: src/tests/lib/libc/time: t_strptime.c Log Message: Additional tests for timezone offsets. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/time/t_strptime.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/libc/time/t_strptime.c diff -u src/tests/lib/libc/time/t_strptime.c:1.7 src/tests/lib/libc/time/t_strptime.c:1.8 --- src/tests/lib/libc/time/t_strptime.c:1.7 Thu Oct 29 17:48:20 2015 +++ src/tests/lib/libc/time/t_strptime.c Fri Oct 30 01:51:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strptime.c,v 1.7 2015/10/29 17:48:20 christos Exp $ */ +/* $NetBSD: t_strptime.c,v 1.8 2015/10/30 01:51:15 ginsbach Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_strptime.c,v 1.7 2015/10/29 17:48:20 christos Exp $"); +__RCSID("$NetBSD: t_strptime.c,v 1.8 2015/10/30 01:51:15 ginsbach Exp $"); #include @@ -335,6 +335,10 @@ static struct { { "+12345", -1 }, { "+12:345", -1 }, { "+123:45", -1 }, + { "+1430", -1 }, + { "-1430", -1 }, + { "+1060", -1 }, + { "-1060", -1 }, { "A",-3600 }, { "B",-7200 },
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Fri Oct 30 01:49:36 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Reject timezone offsets more than 12 hours (east or west). To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.51 src/lib/libc/time/strptime.c:1.52 --- src/lib/libc/time/strptime.c:1.51 Thu Oct 29 19:18:19 2015 +++ src/lib/libc/time/strptime.c Fri Oct 30 01:49:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.51 2015/10/29 19:18:19 christos Exp $ */ +/* $NetBSD: strptime.c,v 1.52 2015/10/30 01:49:36 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.51 2015/10/29 19:18:19 christos Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.52 2015/10/30 01:49:36 ginsbach Exp $"); #endif #include "namespace.h" @@ -626,6 +626,8 @@ loadzone: default: return NULL; } + if (offs > (12 * SECSPERHOUR)) +return NULL; if (neg) offs = -offs; tm->tm_isdst = 0; /* XXX */
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Wed Jul 29 20:32:54 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Only apply am/pm adjustment to tm_hour when it has actually been parsed. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.47 src/lib/libc/time/strptime.c:1.48 --- src/lib/libc/time/strptime.c:1.47 Wed Jul 22 13:33:59 2015 +++ src/lib/libc/time/strptime.c Wed Jul 29 20:32:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.47 2015/07/22 13:33:59 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.48 2015/07/29 20:32:54 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.47 2015/07/22 13:33:59 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.48 2015/07/29 20:32:54 ginsbach Exp $"); #endif #include "namespace.h" @@ -70,12 +70,14 @@ static const u_char *find_string(const u #define S_YDAY (1 << 2) #define S_MDAY (1 << 3) #define S_WDAY (1 << 4) +#define S_HOUR (1 << 5) #define HAVE_MDAY(s) (s & S_MDAY) #define HAVE_MON(s) (s & S_MON) #define HAVE_WDAY(s) (s & S_WDAY) #define HAVE_YDAY(s) (s & S_YDAY) #define HAVE_YEAR(s) (s & S_YEAR) +#define HAVE_HOUR(s) (s & S_HOUR) static char gmt[] = { "GMT" }; static char utc[] = { "UTC" }; @@ -262,6 +264,7 @@ literal: case 'H': bp = conv_num(bp, &tm->tm_hour, 0, 23); LEGAL_ALT(ALT_O); + state |= S_HOUR; continue; case 'l': /* The hour (12-hour clock representation). */ @@ -272,6 +275,7 @@ literal: if (tm->tm_hour == 12) tm->tm_hour = 0; LEGAL_ALT(ALT_O); + state |= S_HOUR; continue; case 'j': /* The day of year. */ @@ -298,7 +302,7 @@ literal: case 'p': /* The locale's equivalent of AM/PM. */ bp = find_string(bp, &i, _TIME_LOCALE(loc)->am_pm, NULL, 2); - if (tm->tm_hour > 11) + if (HAVE_HOUR(state) && tm->tm_hour > 11) return NULL; tm->tm_hour += i * 12; LEGAL_ALT(0);
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Wed Jul 22 13:33:59 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: More KNF style changes -- consistent use of whitespace in #defines. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.46 src/lib/libc/time/strptime.c:1.47 --- src/lib/libc/time/strptime.c:1.46 Mon Jul 20 14:37:11 2015 +++ src/lib/libc/time/strptime.c Wed Jul 22 13:33:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.46 2015/07/20 14:37:11 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.47 2015/07/22 13:33:59 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.46 2015/07/20 14:37:11 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.47 2015/07/22 13:33:59 ginsbach Exp $"); #endif #include "namespace.h" @@ -63,19 +63,19 @@ static const u_char *find_string(const u */ #define ALT_E 0x01 #define ALT_O 0x02 -#define LEGAL_ALT(x) { if (alt_format & ~(x)) return NULL; } +#define LEGAL_ALT(x) { if (alt_format & ~(x)) return NULL; } -#define S_YEAR (1 << 0) -#define S_MON (1 << 1) -#define S_YDAY (1 << 2) -#define S_MDAY (1 << 3) -#define S_WDAY (1 << 4) - -#define HAVE_MDAY(s) (s & S_MDAY) -#define HAVE_MON(s) (s & S_MON) -#define HAVE_WDAY(s) (s & S_WDAY) -#define HAVE_YDAY(s) (s & S_YDAY) -#define HAVE_YEAR(s) (s & S_YEAR) +#define S_YEAR (1 << 0) +#define S_MON (1 << 1) +#define S_YDAY (1 << 2) +#define S_MDAY (1 << 3) +#define S_WDAY (1 << 4) + +#define HAVE_MDAY(s) (s & S_MDAY) +#define HAVE_MON(s) (s & S_MON) +#define HAVE_WDAY(s) (s & S_WDAY) +#define HAVE_YDAY(s) (s & S_YDAY) +#define HAVE_YEAR(s) (s & S_YEAR) static char gmt[] = { "GMT" }; static char utc[] = { "UTC" };
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Mon Jul 20 14:37:11 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: KNF and additional comments To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.45 src/lib/libc/time/strptime.c:1.46 --- src/lib/libc/time/strptime.c:1.45 Wed Jul 15 13:54:38 2015 +++ src/lib/libc/time/strptime.c Mon Jul 20 14:37:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.45 2015/07/15 13:54:38 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.46 2015/07/20 14:37:11 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.45 2015/07/15 13:54:38 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.46 2015/07/20 14:37:11 ginsbach Exp $"); #endif #include "namespace.h" @@ -50,6 +50,10 @@ __weak_alias(strptime,_strptime) __weak_alias(strptime_l, _strptime_l) #endif +static const u_char *conv_num(const unsigned char *, int *, uint, uint); +static const u_char *find_string(const u_char *, int *, const char * const *, + const char * const *, int); + #define _TIME_LOCALE(loc) \ ((_TimeLocale *)((loc)->part_impl[(size_t)LC_TIME])) @@ -83,12 +87,14 @@ static const char * const nadt[5] = { "EDT","CDT","MDT","PDT","\0\0\0" }; -static const u_char *conv_num(const unsigned char *, int *, uint, uint); -static const u_char *find_string(const u_char *, int *, const char * const *, - const char * const *, int); - +/* + * Table to determine the ordinal date for the start of a month. + * Ref: http://en.wikipedia.org/wiki/ISO_week_date + */ static const int start_of_month[2][13] = { + /* non-leap year */ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, + /* leap year */ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } }; @@ -586,11 +592,13 @@ literal: if (!HAVE_YDAY(state) && HAVE_YEAR(state)) { if (HAVE_MON(state) && HAVE_MDAY(state)) { + /* calculate day of year (ordinal date) */ tm->tm_yday = start_of_month[isleap_sum(tm->tm_year, TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); state |= S_YDAY; } else if (day_offset != -1) { - /* Set the date to the first Sunday (or Monday) + /* + * Set the date to the first Sunday (or Monday) * of the specified week of the year. */ if (!HAVE_WDAY(state)) { @@ -607,7 +615,9 @@ literal: if (HAVE_YDAY(state) && HAVE_YEAR(state)) { int isleap; + if (!HAVE_MON(state)) { + /* calculate month of day of year */ i = 0; isleap = isleap_sum(tm->tm_year, TM_YEAR_BASE); while (tm->tm_yday >= start_of_month[isleap][i]) @@ -620,13 +630,17 @@ literal: tm->tm_mon = i - 1; state |= S_MON; } + if (!HAVE_MDAY(state)) { + /* calculate day of month */ isleap = isleap_sum(tm->tm_year, TM_YEAR_BASE); tm->tm_mday = tm->tm_yday - start_of_month[isleap][tm->tm_mon] + 1; state |= S_MDAY; } + if (!HAVE_WDAY(state)) { + /* calculate day of week */ i = 0; week_offset = first_wday_of(tm->tm_year); while (i++ <= tm->tm_yday) {
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Wed Jul 15 13:54:38 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Don't set state when parsing any timezone (%z) information. The '+' in this case isn't the same as the FreeBSD '%+' str[fp]time() (GNU) extension. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.44 src/lib/libc/time/strptime.c:1.45 --- src/lib/libc/time/strptime.c:1.44 Tue Jul 14 18:07:17 2015 +++ src/lib/libc/time/strptime.c Wed Jul 15 13:54:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.44 2015/07/14 18:07:17 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.45 2015/07/15 13:54:38 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.44 2015/07/14 18:07:17 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.45 2015/07/15 13:54:38 ginsbach Exp $"); #endif #include "namespace.h" @@ -480,7 +480,6 @@ literal: continue; case '+': neg = 0; -state |= S_WDAY | S_MON | S_MDAY | S_YEAR; break; case '-': neg = 1;
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Tue Jul 14 18:07:17 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Set S_WDAY state for %u (same as it is set for %w). To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.43 src/lib/libc/time/strptime.c:1.44 --- src/lib/libc/time/strptime.c:1.43 Mon Jul 13 17:45:16 2015 +++ src/lib/libc/time/strptime.c Tue Jul 14 18:07:17 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.43 2015/07/13 17:45:16 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.44 2015/07/14 18:07:17 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.43 2015/07/13 17:45:16 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.44 2015/07/14 18:07:17 ginsbach Exp $"); #endif #include "namespace.h" @@ -363,6 +363,7 @@ literal: bp = conv_num(bp, &i, 1, 7); tm->tm_wday = i % 7; LEGAL_ALT(ALT_O); + state |= S_WDAY; continue; case 'g': /* The year corresponding to the ISO week
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Mon Jul 13 17:45:16 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Switch to using isleap() and isleap_sum() macros from to be consistent with strftime.c and localtime.c. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.42 src/lib/libc/time/strptime.c:1.43 --- src/lib/libc/time/strptime.c:1.42 Wed Jul 8 19:48:20 2015 +++ src/lib/libc/time/strptime.c Mon Jul 13 17:45:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.42 2015/07/08 19:48:20 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.43 2015/07/13 17:45:16 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,13 +31,12 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.42 2015/07/08 19:48:20 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.43 2015/07/13 17:45:16 ginsbach Exp $"); #endif #include "namespace.h" #include #include -#include #include #include #include @@ -104,7 +103,7 @@ static int first_wday_of(int yr) { return ((2 * (3 - (yr / 100) % 4)) + (yr % 100) + ((yr % 100) / 4) + - (is_leap_year(yr) ? 6 : 0) + 1) % 7; + (isleap(yr) ? 6 : 0) + 1) % 7; } char * @@ -587,7 +586,7 @@ literal: if (!HAVE_YDAY(state) && HAVE_YEAR(state)) { if (HAVE_MON(state) && HAVE_MDAY(state)) { - tm->tm_yday = start_of_month[is_leap_year(tm->tm_year + + tm->tm_yday = start_of_month[isleap_sum(tm->tm_year, TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); state |= S_YDAY; } else if (day_offset != -1) { @@ -610,7 +609,7 @@ literal: int isleap; if (!HAVE_MON(state)) { i = 0; - isleap = is_leap_year(tm->tm_year + TM_YEAR_BASE); + isleap = isleap_sum(tm->tm_year, TM_YEAR_BASE); while (tm->tm_yday >= start_of_month[isleap][i]) i++; if (i > 12) { @@ -622,7 +621,7 @@ literal: state |= S_MON; } if (!HAVE_MDAY(state)) { - isleap = is_leap_year(tm->tm_year + TM_YEAR_BASE); + isleap = isleap_sum(tm->tm_year, TM_YEAR_BASE); tm->tm_mday = tm->tm_yday - start_of_month[isleap][tm->tm_mon] + 1; state |= S_MDAY;
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Wed Jul 8 19:48:20 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Add macros to clarify what (parse) state is needed to calculate 'missing' tm fields. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.41 src/lib/libc/time/strptime.c:1.42 --- src/lib/libc/time/strptime.c:1.41 Wed Jul 8 18:44:09 2015 +++ src/lib/libc/time/strptime.c Wed Jul 8 19:48:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.41 2015/07/08 18:44:09 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.42 2015/07/08 19:48:20 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.41 2015/07/08 18:44:09 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.42 2015/07/08 19:48:20 ginsbach Exp $"); #endif #include "namespace.h" @@ -68,6 +68,12 @@ __weak_alias(strptime_l, _strptime_l) #define S_MDAY (1 << 3) #define S_WDAY (1 << 4) +#define HAVE_MDAY(s) (s & S_MDAY) +#define HAVE_MON(s) (s & S_MON) +#define HAVE_WDAY(s) (s & S_WDAY) +#define HAVE_YDAY(s) (s & S_YDAY) +#define HAVE_YEAR(s) (s & S_YEAR) + static char gmt[] = { "GMT" }; static char utc[] = { "UTC" }; /* RFC-822/RFC-2822 */ @@ -161,8 +167,7 @@ literal: */ case 'c': /* Date and time, using the locale's format. */ new_fmt = _TIME_LOCALE(loc)->d_t_fmt; - state |= S_WDAY | S_MON | S_MDAY | - S_YEAR; + state |= S_WDAY | S_MON | S_MDAY | S_YEAR; goto recurse; case 'D': /* The date as "%m/%d/%y". */ @@ -475,8 +480,7 @@ literal: continue; case '+': neg = 0; -state |= S_WDAY | S_MON | S_MDAY | -S_YEAR; +state |= S_WDAY | S_MON | S_MDAY | S_YEAR; break; case '-': neg = 1; @@ -581,8 +585,8 @@ literal: } } - if (!(state & S_YDAY) && (state & S_YEAR)) { - if ((state & (S_MON | S_MDAY)) == (S_MON | S_MDAY)) { + if (!HAVE_YDAY(state) && HAVE_YEAR(state)) { + if (HAVE_MON(state) && HAVE_MDAY(state)) { tm->tm_yday = start_of_month[is_leap_year(tm->tm_year + TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); state |= S_YDAY; @@ -590,7 +594,7 @@ literal: /* Set the date to the first Sunday (or Monday) * of the specified week of the year. */ - if (!(state & S_WDAY)) { + if (!HAVE_WDAY(state)) { tm->tm_wday = day_offset; state |= S_WDAY; } @@ -602,9 +606,9 @@ literal: } } - if ((state & (S_YEAR | S_YDAY)) == (S_YEAR | S_YDAY)) { + if (HAVE_YDAY(state) && HAVE_YEAR(state)) { int isleap; - if (!(state & S_MON)) { + if (!HAVE_MON(state)) { i = 0; isleap = is_leap_year(tm->tm_year + TM_YEAR_BASE); while (tm->tm_yday >= start_of_month[isleap][i]) @@ -617,13 +621,13 @@ literal: tm->tm_mon = i - 1; state |= S_MON; } - if (!(state & S_MDAY)) { + if (!HAVE_MDAY(state)) { isleap = is_leap_year(tm->tm_year + TM_YEAR_BASE); tm->tm_mday = tm->tm_yday - start_of_month[isleap][tm->tm_mon] + 1; state |= S_MDAY; } - if (!(state & S_WDAY)) { + if (!HAVE_WDAY(state)) { i = 0; week_offset = first_wday_of(tm->tm_year); while (i++ <= tm->tm_yday) {
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Wed Jul 8 18:44:09 UTC 2015 Modified Files: src/lib/libc/time: strptime.c To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/libc/time/strptime.c 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/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.40 src/lib/libc/time/strptime.c:1.41 --- src/lib/libc/time/strptime.c:1.40 Fri Jul 3 13:06:54 2015 +++ src/lib/libc/time/strptime.c Wed Jul 8 18:44:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.40 2015/07/03 13:06:54 christos Exp $ */ +/* $NetBSD: strptime.c,v 1.41 2015/07/08 18:44:09 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.40 2015/07/03 13:06:54 christos Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.41 2015/07/08 18:44:09 ginsbach Exp $"); #endif #include "namespace.h" @@ -62,11 +62,11 @@ __weak_alias(strptime_l, _strptime_l) #define ALT_O 0x02 #define LEGAL_ALT(x) { if (alt_format & ~(x)) return NULL; } -#define FLAG_YEAR (1 << 0) -#define FLAG_MONTH (1 << 1) -#define FLAG_YDAY (1 << 2) -#define FLAG_MDAY (1 << 3) -#define FLAG_WDAY (1 << 4) +#define S_YEAR (1 << 0) +#define S_MON (1 << 1) +#define S_YDAY (1 << 2) +#define S_MDAY (1 << 3) +#define S_WDAY (1 << 4) static char gmt[] = { "GMT" }; static char utc[] = { "UTC" }; @@ -112,7 +112,7 @@ strptime_l(const char *buf, const char * { unsigned char c; const unsigned char *bp, *ep; - int alt_format, i, split_year = 0, neg = 0, flags = 0, + int alt_format, i, split_year = 0, neg = 0, state = 0, day_offset = -1, week_offset = 0, offs; const char *new_fmt; @@ -161,20 +161,20 @@ literal: */ case 'c': /* Date and time, using the locale's format. */ new_fmt = _TIME_LOCALE(loc)->d_t_fmt; - flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | - FLAG_YEAR; + state |= S_WDAY | S_MON | S_MDAY | + S_YEAR; goto recurse; case 'D': /* The date as "%m/%d/%y". */ new_fmt = "%m/%d/%y"; LEGAL_ALT(0); - flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; + state |= S_MON | S_MDAY | S_YEAR; goto recurse; case 'F': /* The date as "%Y-%m-%d". */ new_fmt = "%Y-%m-%d"; LEGAL_ALT(0); - flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; + state |= S_MON | S_MDAY | S_YEAR; goto recurse; case 'R': /* The time as "%H:%M". */ @@ -198,7 +198,7 @@ literal: case 'x': /* The date, using the locale's format. */ new_fmt = _TIME_LOCALE(loc)->d_fmt; - flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; + state |= S_MON | S_MDAY | S_YEAR; recurse: bp = (const u_char *)strptime((const char *)bp, new_fmt, tm); @@ -213,7 +213,7 @@ literal: bp = find_string(bp, &tm->tm_wday, _TIME_LOCALE(loc)->day, _TIME_LOCALE(loc)->abday, 7); LEGAL_ALT(0); - flags |= FLAG_WDAY; + state |= S_WDAY; continue; case 'B': /* The month, using the locale's form. */ @@ -223,7 +223,7 @@ literal: _TIME_LOCALE(loc)->mon, _TIME_LOCALE(loc)->abmon, 12); LEGAL_ALT(0); - flags |= FLAG_MONTH; + state |= S_MON; continue; case 'C': /* The century number. */ @@ -236,14 +236,14 @@ literal: split_year = 1; tm->tm_year = i; LEGAL_ALT(ALT_E); - flags |= FLAG_YEAR; + state |= S_YEAR; continue; case 'd': /* The day of month. */ case 'e': bp = conv_num(bp, &tm->tm_mday, 1, 31); LEGAL_ALT(ALT_O); - flags |= FLAG_MDAY; + state |= S_MDAY; continue; case 'k': /* The hour (24-hour clock representation). */ @@ -269,7 +269,7 @@ literal: bp = conv_num(bp, &i, 1, 366); tm->tm_yday = i - 1; LEGAL_ALT(0); - flags |= FLAG_YDAY; + state |= S_YDAY; continue; case 'M': /* The minute. */ @@ -282,7 +282,7 @@ literal: bp = conv_num(bp, &i, 1, 12); tm->tm_mon = i - 1; LEGAL_ALT(ALT_O); - flags |= FLAG_MONTH; + state |= S_MON; continue; case 'p': /* The locale's equivalent of AM/PM. */ @@ -327,8 +327,8 @@ literal: if (localtime_r(&sse, tm) == NULL) bp = NULL; else - flags |= FLAG_YDAY | FLAG_WDAY | - FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; + state |= S_YDAY | S_WDAY | + S_MON | S_MDAY | S_YEAR; } continue; @@ -352,7 +352,7 @@ literal: case 'w': /* The day of week, beginning on sunday. */ bp = conv_num(bp, &tm->tm_wday, 0, 6); LEGAL_ALT(ALT_O); - flags |= FLAG_WDAY; + state |= S_WDAY; continue; case 'u': /* The day of week, monday = 1. */ @@ -384,7 +384,7 @@ literal: bp = conv_num(bp, &i, 0, ); tm->tm_year = i - TM_YEAR_BASE; LEGAL_ALT(ALT_E); - flags |= FLAG_YEAR; + state |= S_YEAR; continue; case 'y': /* The year within 100 years of the epoch. */ @@ -402,7 +402,7 @@ literal: i =
CVS commit: src/tests/lib/libc/time
Module Name:src Committed By: ginsbach Date: Tue Apr 28 16:06:09 UTC 2015 Modified Files: src/tests/lib/libc/time: t_strptime.c Log Message: Add hour tests as a standalone test case. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/time/t_strptime.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/libc/time/t_strptime.c diff -u src/tests/lib/libc/time/t_strptime.c:1.4 src/tests/lib/libc/time/t_strptime.c:1.5 --- src/tests/lib/libc/time/t_strptime.c:1.4 Wed Apr 22 13:15:30 2015 +++ src/tests/lib/libc/time/t_strptime.c Tue Apr 28 16:06:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strptime.c,v 1.4 2015/04/22 13:15:30 ginsbach Exp $ */ +/* $NetBSD: t_strptime.c,v 1.5 2015/04/28 16:06:09 ginsbach Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_strptime.c,v 1.4 2015/04/22 13:15:30 ginsbach Exp $"); +__RCSID("$NetBSD: t_strptime.c,v 1.5 2015/04/28 16:06:09 ginsbach Exp $"); #include @@ -158,6 +158,28 @@ ATF_TC_BODY(day, tc) h_fail("SaturDay", "%OA"); } +ATF_TC(hour); + +ATF_TC_HEAD(hour, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks strptime(3) hour conversions [IH]"); +} + +ATF_TC_BODY(hour, tc) +{ + + h_fail("00", "%I"); + h_fail("13", "%I"); + + h_pass("00", "%H", 2, -1, -1, 0, -1, -1, -1, -1, -1); + h_pass("12", "%H", 2, -1, -1, 12, -1, -1, -1, -1, -1); + h_pass("23", "%H", 2, -1, -1, 23, -1, -1, -1, -1, -1); + h_fail("24", "%H"); +} + + ATF_TC(month); ATF_TC_HEAD(month, tc) @@ -274,6 +296,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, common); ATF_TP_ADD_TC(tp, day); + ATF_TP_ADD_TC(tp, hour); ATF_TP_ADD_TC(tp, month); ATF_TP_ADD_TC(tp, seconds); ATF_TP_ADD_TC(tp, year);
CVS commit: src/tests/lib/libc/time
Module Name:src Committed By: ginsbach Date: Wed Apr 22 13:15:30 UTC 2015 Modified Files: src/tests/lib/libc/time: t_strptime.c Log Message: Make century and year conversion tests a standalone test case rather than part of the "common" test case. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/time/t_strptime.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/libc/time/t_strptime.c diff -u src/tests/lib/libc/time/t_strptime.c:1.3 src/tests/lib/libc/time/t_strptime.c:1.4 --- src/tests/lib/libc/time/t_strptime.c:1.3 Tue Apr 21 17:39:50 2015 +++ src/tests/lib/libc/time/t_strptime.c Wed Apr 22 13:15:30 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strptime.c,v 1.3 2015/04/21 17:39:50 ginsbach Exp $ */ +/* $NetBSD: t_strptime.c,v 1.4 2015/04/22 13:15:30 ginsbach Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_strptime.c,v 1.3 2015/04/21 17:39:50 ginsbach Exp $"); +__RCSID("$NetBSD: t_strptime.c,v 1.4 2015/04/22 13:15:30 ginsbach Exp $"); #include @@ -103,16 +103,6 @@ ATF_TC_BODY(common, tc) 21, 34, 5, 20, 4, 2, 105, 5, -1); h_pass("Fri Mar 4 20:05:34 2005", "%c", 24, 34, 5, 20, 4, 2, 105, 5, -1); - - h_pass("x20y", "x%Cy", 4, -1, -1, -1, -1, -1, 100, -1, -1); - h_pass("x84y", "x%yy", 4, -1, -1, -1, -1, -1, 84, -1, -1); - h_pass("x2084y", "x%C%yy", 6, -1, -1, -1, -1, -1, 184, -1, -1); - h_pass("x8420y", "x%y%Cy", 6, -1, -1, -1, -1, -1, 184, -1, -1); - h_pass("%20845", "%%%C%y5", 6, -1, -1, -1, -1, -1, 184, -1, -1); - h_fail("%", "%E%"); - - h_pass("1980", "%Y", 4, -1, -1, -1, -1, -1, 80, -1, -1); - h_pass("1980", "%EY", 4, -1, -1, -1, -1, -1, 80, -1, -1); } ATF_TC(day); @@ -256,6 +246,29 @@ ATF_TC_BODY(seconds, tc) h_fail("62", "%S"); } +ATF_TC(year); + +ATF_TC_HEAD(year, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks strptime(3) century/year conversions [CyY]"); +} + +ATF_TC_BODY(year, tc) +{ + + h_pass("x20y", "x%Cy", 4, -1, -1, -1, -1, -1, 100, -1, -1); + h_pass("x84y", "x%yy", 4, -1, -1, -1, -1, -1, 84, -1, -1); + h_pass("x2084y", "x%C%yy", 6, -1, -1, -1, -1, -1, 184, -1, -1); + h_pass("x8420y", "x%y%Cy", 6, -1, -1, -1, -1, -1, 184, -1, -1); + h_pass("%20845", "%%%C%y5", 6, -1, -1, -1, -1, -1, 184, -1, -1); + h_fail("%", "%E%"); + + h_pass("1980", "%Y", 4, -1, -1, -1, -1, -1, 80, -1, -1); + h_pass("1980", "%EY", 4, -1, -1, -1, -1, -1, 80, -1, -1); +} + ATF_TP_ADD_TCS(tp) { @@ -263,6 +276,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, day); ATF_TP_ADD_TC(tp, month); ATF_TP_ADD_TC(tp, seconds); + ATF_TP_ADD_TC(tp, year); return atf_no_error(); }
CVS commit: src/tests/lib/libc/time
Module Name:src Committed By: ginsbach Date: Tue Apr 21 17:39:50 UTC 2015 Modified Files: src/tests/lib/libc/time: t_strptime.c Log Message: Make seconds conversion tests a standalone test case rather than part of the "common" test case. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/time/t_strptime.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/libc/time/t_strptime.c diff -u src/tests/lib/libc/time/t_strptime.c:1.2 src/tests/lib/libc/time/t_strptime.c:1.3 --- src/tests/lib/libc/time/t_strptime.c:1.2 Fri Apr 17 15:13:47 2015 +++ src/tests/lib/libc/time/t_strptime.c Tue Apr 21 17:39:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strptime.c,v 1.2 2015/04/17 15:13:47 ginsbach Exp $ */ +/* $NetBSD: t_strptime.c,v 1.3 2015/04/21 17:39:50 ginsbach Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_strptime.c,v 1.2 2015/04/17 15:13:47 ginsbach Exp $"); +__RCSID("$NetBSD: t_strptime.c,v 1.3 2015/04/21 17:39:50 ginsbach Exp $"); #include @@ -113,12 +113,6 @@ ATF_TC_BODY(common, tc) h_pass("1980", "%Y", 4, -1, -1, -1, -1, -1, 80, -1, -1); h_pass("1980", "%EY", 4, -1, -1, -1, -1, -1, 80, -1, -1); - - h_pass("0", "%S", 1, 0, -1, -1, -1, -1, -1, -1, -1); - h_pass("59", "%S", 2, 59, -1, -1, -1, -1, -1, -1, -1); - h_pass("60", "%S", 2, 60, -1, -1, -1, -1, -1, -1, -1); - h_pass("61", "%S", 2, 61, -1, -1, -1, -1, -1, -1, -1); - h_fail("62", "%S"); } ATF_TC(day); @@ -243,12 +237,32 @@ ATF_TC_BODY(month, tc) h_pass("septembe", "%B", 3, -1, -1, -1, -1, 8, -1, -1, -1); } +ATF_TC(seconds); + +ATF_TC_HEAD(seconds, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks strptime(3) seconds conversions [S]"); +} + +ATF_TC_BODY(seconds, tc) +{ + + h_pass("0", "%S", 1, 0, -1, -1, -1, -1, -1, -1, -1); + h_pass("59", "%S", 2, 59, -1, -1, -1, -1, -1, -1, -1); + h_pass("60", "%S", 2, 60, -1, -1, -1, -1, -1, -1, -1); + h_pass("61", "%S", 2, 61, -1, -1, -1, -1, -1, -1, -1); + h_fail("62", "%S"); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, common); ATF_TP_ADD_TC(tp, day); ATF_TP_ADD_TC(tp, month); + ATF_TP_ADD_TC(tp, seconds); return atf_no_error(); }
CVS commit: src/tests/lib/libc/time
Module Name:src Committed By: ginsbach Date: Fri Apr 17 15:13:47 UTC 2015 Modified Files: src/tests/lib/libc/time: t_strptime.c Log Message: Add more detail to test descriptions. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/time/t_strptime.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/libc/time/t_strptime.c diff -u src/tests/lib/libc/time/t_strptime.c:1.1 src/tests/lib/libc/time/t_strptime.c:1.2 --- src/tests/lib/libc/time/t_strptime.c:1.1 Thu Jan 13 00:14:10 2011 +++ src/tests/lib/libc/time/t_strptime.c Fri Apr 17 15:13:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strptime.c,v 1.1 2011/01/13 00:14:10 pgoyette Exp $ */ +/* $NetBSD: t_strptime.c,v 1.2 2015/04/17 15:13:47 ginsbach Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_strptime.c,v 1.1 2011/01/13 00:14:10 pgoyette Exp $"); +__RCSID("$NetBSD: t_strptime.c,v 1.2 2015/04/17 15:13:47 ginsbach Exp $"); #include @@ -126,7 +126,8 @@ ATF_TC(day); ATF_TC_HEAD(day, tc) { - atf_tc_set_md_var(tc, "descr", "Checks strptime(3): day names"); + atf_tc_set_md_var(tc, "descr", + "Checks strptime(3) day name conversions [aA]"); } ATF_TC_BODY(day, tc) @@ -178,7 +179,8 @@ ATF_TC(month); ATF_TC_HEAD(month, tc) { - atf_tc_set_md_var(tc, "descr", "Checks strptime(3): month names"); + atf_tc_set_md_var(tc, "descr", + "Checks strptime(3) month name conversions [bB]"); } ATF_TC_BODY(month, tc)
CVS commit: src
Module Name:src Committed By: ginsbach Date: Thu Apr 9 16:47:57 UTC 2015 Modified Files: src/distrib/sets/lists/tests: mi src/tests/lib/libc/inet: Makefile t_inet_network.c Added Files: src/tests/lib/libc/inet: t_inet_addr.c Log Message: Split inet_addr(3) tests from t_inet_network into stand-alone t_inet_addr, so that t_inet_network only contains tests for inet_network(3). To generate a diff of this commit: cvs rdiff -u -r1.615 -r1.616 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/inet/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/inet/t_inet_addr.c cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/inet/t_inet_network.c 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.615 src/distrib/sets/lists/tests/mi:1.616 --- src/distrib/sets/lists/tests/mi:1.615 Sun Apr 5 06:37:25 2015 +++ src/distrib/sets/lists/tests/mi Thu Apr 9 16:47:57 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.615 2015/04/05 06:37:25 martin Exp $ +# $NetBSD: mi,v 1.616 2015/04/09 16:47:57 ginsbach Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2454,6 +2454,7 @@ ./usr/tests/lib/libc/inet tests-lib-tests ./usr/tests/lib/libc/inet/Atffile tests-lib-tests atf ./usr/tests/lib/libc/inet/Kyuafile tests-lib-tests atf,kyua +./usr/tests/lib/libc/inet/t_inet_addr tests-lib-tests atf ./usr/tests/lib/libc/inet/t_inet_network tests-lib-tests atf ./usr/tests/lib/libc/locale tests-lib-tests ./usr/tests/lib/libc/locale/Atffile tests-lib-tests atf Index: src/tests/lib/libc/inet/Makefile diff -u src/tests/lib/libc/inet/Makefile:1.1 src/tests/lib/libc/inet/Makefile:1.2 --- src/tests/lib/libc/inet/Makefile:1.1 Thu Jan 13 13:53:49 2011 +++ src/tests/lib/libc/inet/Makefile Thu Apr 9 16:47:56 2015 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.1 2011/01/13 13:53:49 pgoyette Exp $ +# $NetBSD: Makefile,v 1.2 2015/04/09 16:47:56 ginsbach Exp $ .include TESTSDIR= ${TESTSBASE}/lib/libc/inet -TESTS_C+= t_inet_network +TESTS_C+= t_inet_addr t_inet_network .include Index: src/tests/lib/libc/inet/t_inet_network.c diff -u src/tests/lib/libc/inet/t_inet_network.c:1.3 src/tests/lib/libc/inet/t_inet_network.c:1.4 --- src/tests/lib/libc/inet/t_inet_network.c:1.3 Fri Jul 15 11:27:23 2011 +++ src/tests/lib/libc/inet/t_inet_network.c Thu Apr 9 16:47:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_inet_network.c,v 1.3 2011/07/15 11:27:23 jruoho Exp $ */ +/* $NetBSD: t_inet_network.c,v 1.4 2015/04/09 16:47:56 ginsbach Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -32,79 +32,17 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_inet_network.c,v 1.3 2011/07/15 11:27:23 jruoho Exp $"); +__RCSID("$NetBSD: t_inet_network.c,v 1.4 2015/04/09 16:47:56 ginsbach Exp $"); #include #include -#include -#include #define H_REQUIRE(input, expected) \ ATF_REQUIRE_EQ_MSG(inet_network(input), (in_addr_t) expected, \ "inet_network(%s) returned: 0x%08X, expected: %s", #input, \ inet_network(input), #expected) -ATF_TC(inet_addr_basic); -ATF_TC_HEAD(inet_addr_basic, tc) -{ - atf_tc_set_md_var(tc, "descr", "Checks inet_addr(3)"); -} - -ATF_TC_BODY(inet_addr_basic, tc) -{ - static const char *addrs[] = { - "127.0.0.1", "99.99.99.99", "0.0.0.0", "255.255.255.255" }; - - struct in_addr ia; - const char *ian; - in_addr_t addr; - size_t i; - - for (i = 0; i < __arraycount(addrs); i++) { - - (void)fprintf(stderr, "checking %s\n", addrs[i]);; - - addr = inet_addr(addrs[i]); - ia.s_addr = addr; - ian = inet_ntoa(ia); - - ATF_REQUIRE(ian != NULL); - ATF_CHECK(strcmp(ian, addrs[i]) == 0); - } -} - -ATF_TC(inet_addr_err); -ATF_TC_HEAD(inet_addr_err, tc) -{ - atf_tc_set_md_var(tc, "descr", "Invalid addresses with inet_addr(3)"); -} - -ATF_TC_BODY(inet_addr_err, tc) -{ - static const char *addrs[] = { - ". . . .", "1.2.3.", "0.0.0.256", "255.255.255.256", - "", - "a.b.c.d", "0x0.0x1.0x2.0x3", "-1.-1.-1.-1", "", " "}; - - struct in_addr ia; - const char *ian; - in_addr_t addr; - size_t i; - - for (i = 0; i < __arraycount(addrs); i++) { - - (void)fprintf(stderr, "checking %s\n", addrs[i]);; - - addr = inet_addr(addrs[i]); - ia.s_addr = addr; - ian = inet_ntoa(ia); - - ATF_REQUIRE(ian != NULL); - ATF_CHECK(strcmp(ian, addrs[i]) != 0); - } -} - ATF_TC(inet_network_basic); ATF_TC_HEAD(inet_network_basic, tc) { @@ -161,8 +99,6 @@ ATF_TC_BODY(inet_network_err, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, inet_addr_basic); - ATF_TP_ADD_TC(tp, inet_addr_err); ATF_TP_ADD_TC(tp, inet_network_basic); ATF_TP_ADD_TC(tp, inet_network_err); Added files: Index: src/tests/lib/libc/inet/t_inet_addr.c diff -u /dev/null src/tests/lib/libc/ine
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Mon Apr 6 14:38:22 UTC 2015 Modified Files: src/lib/libc/time: strptime.3 strptime.c Log Message: Add UTC as a synonym for GMT (%Z). [from FreeBSD] To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/lib/libc/time/strptime.3 cvs rdiff -u -r1.38 -r1.39 src/lib/libc/time/strptime.c 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/time/strptime.3 diff -u src/lib/libc/time/strptime.3:1.30 src/lib/libc/time/strptime.3:1.31 --- src/lib/libc/time/strptime.3:1.30 Fri Apr 3 15:52:50 2015 +++ src/lib/libc/time/strptime.3 Mon Apr 6 14:38:22 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: strptime.3,v 1.30 2015/04/03 15:52:50 ginsbach Exp $ +.\" $NetBSD: strptime.3,v 1.31 2015/04/06 14:38:22 ginsbach Exp $ .\" .\" Copyright (c) 1997, 1998, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -26,7 +26,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 3, 2015 +.Dd April 6, 2015 .Dt STRPTIME 3 .Os .Sh NAME @@ -335,8 +335,10 @@ The .Cm \&%Z format specifier only accepts time zone abbreviations of the local time zone, -or the value -.Dq GMT . +or the values +.Dq GMT +or +.Dq UTC . This limitation is caused by the ambiguity of overloaded time zone abbreviations, for example EST is both Eastern Standard Index: src/lib/libc/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.38 src/lib/libc/time/strptime.c:1.39 --- src/lib/libc/time/strptime.c:1.38 Fri May 17 12:55:57 2013 +++ src/lib/libc/time/strptime.c Mon Apr 6 14:38:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.38 2013/05/17 12:55:57 joerg Exp $ */ +/* $NetBSD: strptime.c,v 1.39 2015/04/06 14:38:22 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.38 2013/05/17 12:55:57 joerg Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.39 2015/04/06 14:38:22 ginsbach Exp $"); #endif #include "namespace.h" @@ -357,7 +357,8 @@ literal: case 'Z': tzset(); - if (strncmp((const char *)bp, gmt, 3) == 0) { + if (strncmp((const char *)bp, gmt, 3) == 0 || + strncmp((const char *)bp, utc, 3) == 0) { tm->tm_isdst = 0; #ifdef TM_GMTOFF tm->TM_GMTOFF = 0;
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Fri Apr 3 15:52:51 UTC 2015 Modified Files: src/lib/libc/time: strptime.3 Log Message: Fix spelling; time zone is two words not one. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/lib/libc/time/strptime.3 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/time/strptime.3 diff -u src/lib/libc/time/strptime.3:1.29 src/lib/libc/time/strptime.3:1.30 --- src/lib/libc/time/strptime.3:1.29 Tue Apr 12 08:40:34 2011 +++ src/lib/libc/time/strptime.3 Fri Apr 3 15:52:50 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: strptime.3,v 1.29 2011/04/12 08:40:34 jruoho Exp $ +.\" $NetBSD: strptime.3,v 1.30 2015/04/03 15:52:50 ginsbach Exp $ .\" .\" Copyright (c) 1997, 1998, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -26,7 +26,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 12, 2011 +.Dd April 3, 2015 .Dt STRPTIME 3 .Os .Sh NAME @@ -221,7 +221,7 @@ with \&%C, specifies the year [0,99] wit .It Cm \&%Y the year, including the century (i.e., 1996). .It Cm \&%z -an ISO 8601 or RFC-2822 timezone specification. +an ISO 8601 or RFC-2822 time zone specification. This is one of the following: the offset from Coordinated Universal Time @@ -240,7 +240,7 @@ specified as: or .Dq Z .Pq Ql Zulu Time ; -a three character US timezone specified as: +a three character US time zone specified as: .Dq EDT , .Dq EST , .Dq CDT , @@ -271,7 +271,7 @@ or .Ql Standard .Pq Dq S time; -a single letter military timezone specified as: +a single letter military time zone specified as: .Dq A through .Dq I @@ -285,7 +285,7 @@ A extension. .Pc .It Cm \&%Z -timezone name or no characters when time zone information is unavailable. +time zone name or no characters when time zone information is unavailable. .Po A .Nx @@ -333,11 +333,11 @@ function conforms to .Sh BUGS The .Cm \&%Z -format specifier only accepts timezone -abbreviations of the local timezone, +format specifier only accepts time zone +abbreviations of the local time zone, or the value .Dq GMT . This limitation is caused by the ambiguity -of overloaded timezone abbreviations, +of overloaded time zone abbreviations, for example EST is both Eastern Standard Time and Eastern Australia Summer Time.
CVS commit: src/lib/libc/gen
Module Name:src Committed By: ginsbach Date: Fri Feb 6 17:35:46 UTC 2015 Modified Files: src/lib/libc/gen: getdomainname.3 Log Message: PR/49642: change processor to host Use the wording used by FreeBSD, IRIX, and MacOSX (as a sample) rather suggested wording in PR from Henning Petersen. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/getdomainname.3 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/gen/getdomainname.3 diff -u src/lib/libc/gen/getdomainname.3:1.15 src/lib/libc/gen/getdomainname.3:1.16 --- src/lib/libc/gen/getdomainname.3:1.15 Thu Aug 7 16:42:49 2003 +++ src/lib/libc/gen/getdomainname.3 Fri Feb 6 17:35:46 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: getdomainname.3,v 1.15 2003/08/07 16:42:49 agc Exp $ +.\" $NetBSD: getdomainname.3,v 1.16 2015/02/06 17:35:46 ginsbach Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -46,7 +46,7 @@ .Fn setdomainname "const char *name" "size_t namelen" .Sh DESCRIPTION .Fn getdomainname -returns the standard domain name for the current processor, as +returns the standard domain name for the current host, as previously set by .Fn setdomainname . The parameter
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Feb 6 14:48:24 UTC 2015 Modified Files: src/share/misc: acronyms.comp Log Message: PR/49646: Nikolai Lifanov: Add LLDP - 802.1ab link layer discovery protocol To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.147 src/share/misc/acronyms.comp:1.148 --- src/share/misc/acronyms.comp:1.147 Fri Feb 6 14:39:14 2015 +++ src/share/misc/acronyms.comp Fri Feb 6 14:48:24 2015 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.147 2015/02/06 14:39:14 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.148 2015/02/06 14:48:24 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -660,6 +660,7 @@ LKML Linux kernel mailing list LL load linked LL/SC load linked/store conditional LLC logical link control +LLDP link layer discovery protocol LLF low level format LLMNR link-local multicast name resolution LLVM Low Level Virtual Machine
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Feb 6 14:39:15 UTC 2015 Modified Files: src/share/misc: acronyms.comp Log Message: Add Port Control Protocol (RFC 6887) To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.146 src/share/misc/acronyms.comp:1.147 --- src/share/misc/acronyms.comp:1.146 Thu Jan 29 06:53:28 2015 +++ src/share/misc/acronyms.comp Fri Feb 6 14:39:14 2015 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.146 2015/01/29 06:53:28 plunky Exp $ +$NetBSD: acronyms.comp,v 1.147 2015/02/06 14:39:14 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -884,6 +884,7 @@ PCI peripheral component interconnect PCM phase change memory PCM pulse code modulation PCMCIA Personal Computer Memory Card International Association +PCP Port Control Protocol PD public domain PDA personal digital assistant PDA pushdown automaton
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Fri Dec 12 19:36:22 UTC 2014 Modified Files: src/share/misc: acronyms.comp Log Message: Add one from the security realm. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.143 src/share/misc/acronyms.comp:1.144 --- src/share/misc/acronyms.comp:1.143 Wed Aug 20 16:05:03 2014 +++ src/share/misc/acronyms.comp Fri Dec 12 19:36:22 2014 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.143 2014/08/20 16:05:03 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.144 2014/12/12 19:36:22 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -53,6 +53,7 @@ AP application processor API application programming interface APIC advanced programmable interrupt controller APIPA automatic private IP addressing +APT advanced persistant threat AQM active queue management ARAT always running APIC timer ARC adaptive replacement cache
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Wed Aug 20 16:05:03 UTC 2014 Modified Files: src/share/misc: acronyms.comp Log Message: Add one more RAS To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.142 src/share/misc/acronyms.comp:1.143 --- src/share/misc/acronyms.comp:1.142 Sat Jun 14 02:05:38 2014 +++ src/share/misc/acronyms.comp Wed Aug 20 16:05:03 2014 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.142 2014/06/14 02:05:38 jnemeth Exp $ +$NetBSD: acronyms.comp,v 1.143 2014/08/20 16:05:03 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -985,6 +985,7 @@ RA router advertisement RAD rapid application development RAID redundant array of {independent,inexpensive} disks RAM random access memory +RAS reliability, availability and serviceability RAS remote access service RAS restartable atomic sequence RAS row address strobe
CVS commit: src/usr.bin/getaddrinfo
Module Name:src Committed By: ginsbach Date: Tue Apr 22 02:23:03 UTC 2014 Modified Files: src/usr.bin/getaddrinfo: getaddrinfo.1 getaddrinfo.c Log Message: Add optional method for specifying protocol as part of the service option. This is similar to how the port number and protocol name are specified in services(5). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/getaddrinfo/getaddrinfo.1 \ src/usr.bin/getaddrinfo/getaddrinfo.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.bin/getaddrinfo/getaddrinfo.1 diff -u src/usr.bin/getaddrinfo/getaddrinfo.1:1.3 src/usr.bin/getaddrinfo/getaddrinfo.1:1.4 --- src/usr.bin/getaddrinfo/getaddrinfo.1:1.3 Wed Mar 19 18:21:39 2014 +++ src/usr.bin/getaddrinfo/getaddrinfo.1 Tue Apr 22 02:23:03 2014 @@ -1,4 +1,4 @@ -.\" $NetBSD: getaddrinfo.1,v 1.3 2014/03/19 18:21:39 riastradh Exp $ +.\" $NetBSD: getaddrinfo.1,v 1.4 2014/04/22 02:23:03 ginsbach Exp $ .\" .\" Copyright (c) 2013 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -38,7 +38,7 @@ .Op Fl cNnP .Op Fl f Ar family .Op Fl p Ar protocol -.Op Fl s Ar service +.Op Fl s Ar service Ns Op Ns / Ns Ar protocol .Op Fl t Ar socktype .Op Ar hostname .Sh DESCRIPTION @@ -119,8 +119,11 @@ or Specify a protocol. Protocols may be numeric, or symbolic as listed in .Xr protocols 5 . -.It Fl s Ar service +.It Fl s Ar service Ns Op Ns / Ns Ar protocol Specify a service to look up. +Services may be symbolic or numeric with an optional +protocol suffix as listed in +.Xr services 5 . If no service is specified, a hostname must be specified. .It Fl t Ar socktype Specify a socket type. Index: src/usr.bin/getaddrinfo/getaddrinfo.c diff -u src/usr.bin/getaddrinfo/getaddrinfo.c:1.3 src/usr.bin/getaddrinfo/getaddrinfo.c:1.4 --- src/usr.bin/getaddrinfo/getaddrinfo.c:1.3 Wed Mar 19 01:24:32 2014 +++ src/usr.bin/getaddrinfo/getaddrinfo.c Tue Apr 22 02:23:03 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: getaddrinfo.c,v 1.3 2014/03/19 01:24:32 ginsbach Exp $ */ +/* $NetBSD: getaddrinfo.c,v 1.4 2014/04/22 02:23:03 ginsbach Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: getaddrinfo.c,v 1.3 2014/03/19 01:24:32 ginsbach Exp $"); +__RCSID("$NetBSD: getaddrinfo.c,v 1.4 2014/04/22 02:23:03 ginsbach Exp $"); #include #include @@ -132,6 +132,24 @@ main(int argc, char **argv) if (argc == 1) hostname = argv[0]; + if (service != NULL) { + char *p; + + if ((p = strchr(service, '/')) != NULL) { + if (hints.ai_protocol != 0) { +warnx("protocol already specified"); +usage(); + } + *p = '\0'; + p++; + + if (!parse_protocol(p, &hints.ai_protocol)) { +warnx("invalid protocol: %s", p); +usage(); + } + } + } + error = getaddrinfo(hostname, service, &hints, &addrinfo); if (error) errx(1, "%s", gai_strerror(error));
CVS commit: src
Module Name:src Committed By: ginsbach Date: Tue Apr 15 22:09:27 UTC 2014 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/man: mi src/usr.bin: Makefile Log Message: Hook getaddrinfo(1) into the build. Hi riastradh! To generate a diff of this commit: cvs rdiff -u -r1.1065 -r1.1066 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1468 -r1.1469 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.216 -r1.217 src/usr.bin/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/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1065 src/distrib/sets/lists/base/mi:1.1066 --- src/distrib/sets/lists/base/mi:1.1065 Tue Apr 1 21:40:46 2014 +++ src/distrib/sets/lists/base/mi Tue Apr 15 22:09:27 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1065 2014/04/01 21:40:46 christos Exp $ +# $NetBSD: mi,v 1.1066 2014/04/15 22:09:27 ginsbach Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -491,6 +491,7 @@ ./usr/bin/ftp base-netutil-bin ./usr/bin/gcpp base-util-bin gcccmds ./usr/bin/gencatbase-locale-bin +./usr/bin/getaddrinfobase-netutil-bin ./usr/bin/getcapbase-util-bin ./usr/bin/getconfbase-util-bin ./usr/bin/getentbase-util-bin Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1468 src/distrib/sets/lists/man/mi:1.1469 --- src/distrib/sets/lists/man/mi:1.1468 Sun Apr 6 17:59:39 2014 +++ src/distrib/sets/lists/man/mi Tue Apr 15 22:09:27 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1468 2014/04/06 17:59:39 kardel Exp $ +# $NetBSD: mi,v 1.1469 2014/04/15 22:09:27 ginsbach Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -178,6 +178,7 @@ ./usr/share/man/cat1/g711conv.0 man-obsolete obsolete ./usr/share/man/cat1/gcpp.0 man-util-catman gcccmds,.cat ./usr/share/man/cat1/gencat.0 man-locale-catman .cat +./usr/share/man/cat1/getaddrinfo.0 man-netutil-catman .cat ./usr/share/man/cat1/getcap.0 man-util-catman .cat ./usr/share/man/cat1/getconf.0 man-util-catman .cat ./usr/share/man/cat1/getent.0 man-util-catman .cat @@ -3292,6 +3293,7 @@ ./usr/share/man/html1/ftp.html man-netutil-htmlman html ./usr/share/man/html1/gcpp.html man-util-htmlman gcccmds,html ./usr/share/man/html1/gencat.html man-locale-htmlman html +./usr/share/man/html1/getaddrinfo.html man-netutil-htmlman html ./usr/share/man/html1/getcap.html man-util-htmlman html ./usr/share/man/html1/getconf.html man-util-htmlman html ./usr/share/man/html1/getent.html man-util-htmlman html @@ -6020,6 +6022,7 @@ ./usr/share/man/man1/g711conv.1 man-obsolete obsolete ./usr/share/man/man1/gcpp.1 man-util-man gcccmds,.man ./usr/share/man/man1/gencat.1 man-locale-man .man +./usr/share/man/man1/getaddrinfo.1 man-netutil-man .man ./usr/share/man/man1/getcap.1 man-util-man .man ./usr/share/man/man1/getconf.1 man-util-man .man ./usr/share/man/man1/getent.1 man-util-man .man Index: src/usr.bin/Makefile diff -u src/usr.bin/Makefile:1.216 src/usr.bin/Makefile:1.217 --- src/usr.bin/Makefile:1.216 Thu Jan 16 01:54:47 2014 +++ src/usr.bin/Makefile Tue Apr 15 22:09:27 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.216 2014/01/16 01:54:47 pooka Exp $ +# $NetBSD: Makefile,v 1.217 2014/04/15 22:09:27 ginsbach Exp $ # from: @(#)Makefile 8.3 (Berkeley) 1/7/94 .include @@ -11,7 +11,8 @@ SUBDIR= apply asa at audio audiocfg \ deroff db dirname du \ eject elf2aout elf2ecoff env error expand extattr \ false fdformat fgen fincore find finger flock fmt fold fpr from \ - fsplit fstat ftp gcore genassym gencat getconf getent getopt gprof \ + fsplit fstat ftp gcore genassym gencat getaddrinfo getconf getent \ + getopt gprof \ head hexdump iconv id indent infocmp innetgr ipcrm ipcs join jot \ kdump ktrace ktruss lam last lastcomm ldd leave \ locale locate lock logger login logname look lorder m4 \
CVS commit: src/usr.bin/getaddrinfo
Module Name:src Committed By: ginsbach Date: Wed Mar 19 01:24:32 UTC 2014 Modified Files: src/usr.bin/getaddrinfo: getaddrinfo.c Log Message: Add missing include files. Don't rely on them bein pulled in as a side effect of other includes. Fixes build errors when getaddrinfo(1) is added to the usr.bin tree. - need for address family (AF_*) and socket type (SOCK_*) - need for printf() and friends To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/getaddrinfo/getaddrinfo.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.bin/getaddrinfo/getaddrinfo.c diff -u src/usr.bin/getaddrinfo/getaddrinfo.c:1.2 src/usr.bin/getaddrinfo/getaddrinfo.c:1.3 --- src/usr.bin/getaddrinfo/getaddrinfo.c:1.2 Fri Mar 14 13:17:18 2014 +++ src/usr.bin/getaddrinfo/getaddrinfo.c Wed Mar 19 01:24:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: getaddrinfo.c,v 1.2 2014/03/14 13:17:18 ginsbach Exp $ */ +/* $NetBSD: getaddrinfo.c,v 1.3 2014/03/19 01:24:32 ginsbach Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,10 @@ */ #include -__RCSID("$NetBSD: getaddrinfo.c,v 1.2 2014/03/14 13:17:18 ginsbach Exp $"); +__RCSID("$NetBSD: getaddrinfo.c,v 1.3 2014/03/19 01:24:32 ginsbach Exp $"); + +#include +#include #include #include @@ -40,6 +43,7 @@ __RCSID("$NetBSD: getaddrinfo.c,v 1.2 20 #include #include #include +#include #include #include #include
CVS commit: src/usr.bin/getaddrinfo
Module Name:src Committed By: ginsbach Date: Fri Mar 14 13:17:18 UTC 2014 Modified Files: src/usr.bin/getaddrinfo: getaddrinfo.c Log Message: add missing break To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/getaddrinfo/getaddrinfo.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.bin/getaddrinfo/getaddrinfo.c diff -u src/usr.bin/getaddrinfo/getaddrinfo.c:1.1 src/usr.bin/getaddrinfo/getaddrinfo.c:1.2 --- src/usr.bin/getaddrinfo/getaddrinfo.c:1.1 Mon Sep 30 06:19:22 2013 +++ src/usr.bin/getaddrinfo/getaddrinfo.c Fri Mar 14 13:17:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: getaddrinfo.c,v 1.1 2013/09/30 06:19:22 riastradh Exp $ */ +/* $NetBSD: getaddrinfo.c,v 1.2 2014/03/14 13:17:18 ginsbach Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: getaddrinfo.c,v 1.1 2013/09/30 06:19:22 riastradh Exp $"); +__RCSID("$NetBSD: getaddrinfo.c,v 1.2 2014/03/14 13:17:18 ginsbach Exp $"); #include #include @@ -101,6 +101,7 @@ main(int argc, char **argv) warnx("invalid protocol: %s", optarg); usage(); } + break; case 'P': hints.ai_flags |= AI_PASSIVE;
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Wed Mar 5 03:51:25 UTC 2014 Modified Files: src/share/misc: acronyms Log Message: Add yet another TLA. To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms diff -u src/share/misc/acronyms:1.221 src/share/misc/acronyms:1.222 --- src/share/misc/acronyms:1.221 Sat Sep 28 17:58:53 2013 +++ src/share/misc/acronyms Wed Mar 5 03:51:25 2014 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.221 2013/09/28 17:58:53 dholland Exp $ +$NetBSD: acronyms,v 1.222 2014/03/05 03:51:25 ginsbach Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -93,6 +93,7 @@ CNP continued [in my] next post COB close of business [day] COTS commercial off-the-shelf CPC cost per click +CPE customer premises equipment CTN can't talk now CU see you CUL see you later
CVS commit: src/usr.bin/getaddrinfo
Module Name:src Committed By: ginsbach Date: Thu Feb 27 01:17:13 UTC 2014 Modified Files: src/usr.bin/getaddrinfo: tables.awk Log Message: AF_MAX isn't an address family so don't include it in the generated table. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/getaddrinfo/tables.awk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/getaddrinfo/tables.awk diff -u src/usr.bin/getaddrinfo/tables.awk:1.1 src/usr.bin/getaddrinfo/tables.awk:1.2 --- src/usr.bin/getaddrinfo/tables.awk:1.1 Mon Sep 30 06:19:22 2013 +++ src/usr.bin/getaddrinfo/tables.awk Thu Feb 27 01:17:13 2014 @@ -1,6 +1,6 @@ #!/usr/bin/awk -f -# $NetBSD: tables.awk,v 1.1 2013/09/30 06:19:22 riastradh Exp $ +# $NetBSD: tables.awk,v 1.2 2014/02/27 01:17:13 ginsbach Exp $ # Copyright (c) 2013 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,7 +38,7 @@ BEGIN { next } -$2 ~ /^AF_[A-Z0-9_]*$/ { +($2 ~ /^AF_[A-Z0-9_]*$/) && ($2 != "AF_MAX") { afs[n_afs++] = substr($2, 4) }
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Tue Apr 16 14:03:34 UTC 2013 Modified Files: src/share/misc: acronyms.comp Log Message: AMQP OTP To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.132 src/share/misc/acronyms.comp:1.133 --- src/share/misc/acronyms.comp:1.132 Fri Feb 22 08:19:50 2013 +++ src/share/misc/acronyms.comp Tue Apr 16 14:03:33 2013 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.132 2013/02/22 08:19:50 plunky Exp $ +$NetBSD: acronyms.comp,v 1.133 2013/04/16 14:03:33 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -41,6 +41,7 @@ AM access method AM alignment mask AM amplitude modulation AMI alternate mark inversion +AMQP advanced message queuing protocol AMT active management technology AN Arabic number ANSI American National Standards Institute @@ -803,6 +804,7 @@ OSS open sound system OSS open source software OSVW operating system visible workarounds OTP one time password +OTP open telecom platform OU organizational unit OUI organizationally unique identifier OWL Web Ontology Language
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Thu Oct 11 18:00:25 UTC 2012 Modified Files: src/share/misc: acronyms.comp Log Message: A few natty acronyms. To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.129 src/share/misc/acronyms.comp:1.130 --- src/share/misc/acronyms.comp:1.129 Fri Sep 21 14:10:14 2012 +++ src/share/misc/acronyms.comp Thu Oct 11 18:00:25 2012 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.129 2012/09/21 14:10:14 ginsbach Exp $ +$NetBSD: acronyms.comp,v 1.130 2012/10/11 18:00:25 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation @@ -182,6 +182,7 @@ CFG control-flow graph CG control gate CGA color graphics {array,adapter} CGI common gateway interface +CGN carrier grade NAT CHAP challenge-handshake authentication protocol CHS cylinder/head/sector CI {common, component} interface @@ -646,6 +647,7 @@ LSB least significant bit [or: byte] LSB Linux standards base LSI large scale integration LSL load segment limit +LSN large scale NAT LSR label switch router LTCC low temperature co-fired ceramic LTR left to right @@ -739,6 +741,7 @@ MWE module width encoding MX mail exchange NACK negative acknowledgement NAN not a number +NAPT network address [and] port translation NAS network attached storage NAT network address translation NAV network allocation vector @@ -975,6 +978,7 @@ RR round robin RR random replacement RS relay station RSA Rivest, Shamir and Adleman +RSIP realm specific Internet Protocol RSS really simple syndication RSS residual sum of squares RT real time