CVS commit: src/external/bsd/ntp/dist/sntp/libopts
Module Name:src Committed By: christos Date: Mon May 25 20:54:08 UTC 2020 Modified Files: src/external/bsd/ntp/dist/sntp/libopts: boolean.c configfile.c Log Message: Add FALLTHROUGH To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/libopts/boolean.c cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/sntp/libopts/configfile.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/ntp/dist/sntp/libopts/boolean.c diff -u src/external/bsd/ntp/dist/sntp/libopts/boolean.c:1.5 src/external/bsd/ntp/dist/sntp/libopts/boolean.c:1.6 --- src/external/bsd/ntp/dist/sntp/libopts/boolean.c:1.5 Mon May 25 16:47:34 2020 +++ src/external/bsd/ntp/dist/sntp/libopts/boolean.c Mon May 25 16:54:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: boolean.c,v 1.5 2020/05/25 20:47:34 christos Exp $ */ +/* $NetBSD: boolean.c,v 1.6 2020/05/25 20:54:07 christos Exp $ */ /** @@ -66,8 +66,8 @@ optionBooleanVal(tOptions * opts, tOptDe long val = strtol(od->optArg.argString, , 0); if ((val != 0) || (*pz != NUL)) break; -/* FALLTHROUGH */ } +/*FALLTHROUGH*/ case 'N': case 'n': case 'F': Index: src/external/bsd/ntp/dist/sntp/libopts/configfile.c diff -u src/external/bsd/ntp/dist/sntp/libopts/configfile.c:1.9 src/external/bsd/ntp/dist/sntp/libopts/configfile.c:1.10 --- src/external/bsd/ntp/dist/sntp/libopts/configfile.c:1.9 Mon May 25 16:47:34 2020 +++ src/external/bsd/ntp/dist/sntp/libopts/configfile.c Mon May 25 16:54:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: configfile.c,v 1.9 2020/05/25 20:47:34 christos Exp $ */ +/* $NetBSD: configfile.c,v 1.10 2020/05/25 20:54:07 christos Exp $ */ /** * \file configfile.c @@ -468,7 +468,7 @@ file_preset(tOptions * opts, char const ftext = strchr(ftext + 2, '>'); if (ftext++ != NULL) break; - + /*FALLTHROUGH*/ default: ftext = NULL; }
CVS commit: src/external/bsd/ntp/dist/sntp/libopts
Module Name:src Committed By: christos Date: Mon May 25 20:54:08 UTC 2020 Modified Files: src/external/bsd/ntp/dist/sntp/libopts: boolean.c configfile.c Log Message: Add FALLTHROUGH To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/libopts/boolean.c cvs rdiff -u -r1.9 -r1.10 src/external/bsd/ntp/dist/sntp/libopts/configfile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: dholland Date: Sun Jan 27 04:28:19 UTC 2019 Modified Files: src/external/bsd/ntp/dist/sntp: crypto.c Log Message: fix duplicated chunk from merge To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/dist/sntp/crypto.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: dholland Date: Sun Jan 27 04:28:19 UTC 2019 Modified Files: src/external/bsd/ntp/dist/sntp: crypto.c Log Message: fix duplicated chunk from merge To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/bsd/ntp/dist/sntp/crypto.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/ntp/dist/sntp/crypto.c diff -u src/external/bsd/ntp/dist/sntp/crypto.c:1.16 src/external/bsd/ntp/dist/sntp/crypto.c:1.17 --- src/external/bsd/ntp/dist/sntp/crypto.c:1.16 Sun Jan 27 02:08:34 2019 +++ src/external/bsd/ntp/dist/sntp/crypto.c Sun Jan 27 04:28:18 2019 @@ -1,12 +1,4 @@ -/* $NetBSD: crypto.c,v 1.16 2019/01/27 02:08:34 pgoyette Exp $ */ - -/* - * HMS: we need to test: - * - OpenSSL versions, if we are building with them - * - our versions - * - * We may need to test with(out) OPENSSL separately. - */ +/* $NetBSD: crypto.c,v 1.17 2019/01/27 04:28:18 dholland Exp $ */ /* * HMS: we need to test:
CVS commit: src/external/bsd/ntp/dist/sntp/libopts
Module Name:src Committed By: he Date: Mon Nov 30 10:37:25 UTC 2015 Modified Files: src/external/bsd/ntp/dist/sntp/libopts: enum.c Log Message: As far as I (and my compiler) can tell, there's no need to cast the arg to strncmp(). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/libopts/enum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/ntp/dist/sntp/libopts
Module Name:src Committed By: he Date: Mon Nov 30 10:37:25 UTC 2015 Modified Files: src/external/bsd/ntp/dist/sntp/libopts: enum.c Log Message: As far as I (and my compiler) can tell, there's no need to cast the arg to strncmp(). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/libopts/enum.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/ntp/dist/sntp/libopts/enum.c diff -u src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.5 src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.6 --- src/external/bsd/ntp/dist/sntp/libopts/enum.c:1.5 Fri Jul 10 14:20:35 2015 +++ src/external/bsd/ntp/dist/sntp/libopts/enum.c Mon Nov 30 10:37:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: enum.c,v 1.5 2015/07/10 14:20:35 christos Exp $ */ +/* $NetBSD: enum.c,v 1.6 2015/11/30 10:37:25 he Exp $ */ /** @@ -217,7 +217,7 @@ find_name(char const * name, tOptions * * Multiple partial matches means we have an ambiguous match. */ for (idx = 0; idx < name_ct; idx++) { -if (strncmp(paz_names[idx], (const char *)name, len) == 0) { +if (strncmp(paz_names[idx], name, len) == 0) { if (paz_names[idx][len] == NUL) return idx; /* full match */
CVS commit: src/external/bsd/ntp/dist/sntp/libopts
Module Name:src Committed By: christos Date: Fri Dec 19 20:48:55 UTC 2014 Modified Files: src/external/bsd/ntp/dist/sntp/libopts: autoopts.h Log Message: I will let others decide if we should grow this wart... To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/sntp/libopts/autoopts.h 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/ntp/dist/sntp/libopts/autoopts.h diff -u src/external/bsd/ntp/dist/sntp/libopts/autoopts.h:1.6 src/external/bsd/ntp/dist/sntp/libopts/autoopts.h:1.7 --- src/external/bsd/ntp/dist/sntp/libopts/autoopts.h:1.6 Fri Dec 19 15:43:19 2014 +++ src/external/bsd/ntp/dist/sntp/libopts/autoopts.h Fri Dec 19 15:48:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: autoopts.h,v 1.6 2014/12/19 20:43:19 christos Exp $ */ +/* $NetBSD: autoopts.h,v 1.7 2014/12/19 20:48:55 christos Exp $ */ /* @@ -34,7 +34,11 @@ #ifndef AUTOGEN_AUTOOPTS_H #define AUTOGEN_AUTOOPTS_H +#if 0 #include stdnoreturn.h +#else +#define noreturn __dead +#endif #define AO_NAME_LIMIT 127 #define AO_NAME_SIZE((size_t)(AO_NAME_LIMIT + 1))
CVS commit: src/external/bsd/ntp/dist/sntp/libopts
Module Name:src Committed By: christos Date: Fri Dec 19 20:48:55 UTC 2014 Modified Files: src/external/bsd/ntp/dist/sntp/libopts: autoopts.h Log Message: I will let others decide if we should grow this wart... To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/sntp/libopts/autoopts.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/ntp/dist/sntp/libopts
Module Name:src Committed By: joerg Date: Sun Nov 23 01:47:59 UTC 2014 Modified Files: src/external/bsd/ntp/dist/sntp/libopts: init.c src/external/bsd/ntp/dist/sntp/libopts/autoopts: options.h Log Message: Replace very question pointer games to override const, mark the member writeable when inside the guts of the library. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/sntp/libopts/init.c cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/ntp/dist/sntp/libopts/autoopts/options.h 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/ntp/dist/sntp/libopts/init.c diff -u src/external/bsd/ntp/dist/sntp/libopts/init.c:1.2 src/external/bsd/ntp/dist/sntp/libopts/init.c:1.3 --- src/external/bsd/ntp/dist/sntp/libopts/init.c:1.2 Sat Dec 28 03:20:15 2013 +++ src/external/bsd/ntp/dist/sntp/libopts/init.c Sun Nov 23 01:47:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.2 2013/12/28 03:20:15 christos Exp $ */ +/* $NetBSD: init.c,v 1.3 2014/11/23 01:47:59 joerg Exp $ */ /** * \file initialize.c @@ -103,20 +103,17 @@ validate_struct(tOptions * opts, char co */ if (opts-pzProgName == NULL) { char const * pz = strrchr(pname, DIRCH); -char const ** pp = -(char const **)(void **)(intptr_t)(opts-pzProgName); if (pz != NULL) -*pp = pz+1; +opts-pzProgName = pz+1; else -*pp = pname; +opts-pzProgName = pname; pz = pathfind(getenv(PATH), (char *)(intptr_t)pname, rx); if (pz != NULL) pname = (void *)(intptr_t)pz; -pp = (char const **)(void **)(intptr_t)(opts-pzProgPath); -*pp = pname; +opts-pzProgPath = pname; /* * when comparing long names, these are equivalent Index: src/external/bsd/ntp/dist/sntp/libopts/autoopts/options.h diff -u src/external/bsd/ntp/dist/sntp/libopts/autoopts/options.h:1.6 src/external/bsd/ntp/dist/sntp/libopts/autoopts/options.h:1.7 --- src/external/bsd/ntp/dist/sntp/libopts/autoopts/options.h:1.6 Sat Dec 28 03:20:15 2013 +++ src/external/bsd/ntp/dist/sntp/libopts/autoopts/options.h Sun Nov 23 01:47:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: options.h,v 1.6 2013/12/28 03:20:15 christos Exp $ */ +/* $NetBSD: options.h,v 1.7 2014/11/23 01:47:59 joerg Exp $ */ /* -*- buffer-read-only: t -*- vi: set ro: * @@ -602,9 +602,17 @@ struct options { char * pzCurOpt; /// current option text /// Public, the full path of the program +#if AUTOOPTS_INTERNAL +char const *pzProgPath; +#else char const * const pzProgPath; +#endif /// Public, the name of the executable, without any path +#if AUTOOPTS_INTERNAL +char const *pzProgName; +#else char const * const pzProgName; +#endif /// Public, the upper-cased, shell variable syntax-ed program name char const * const pzPROGNAME; /// the name of the rc file (configuration file)
CVS commit: src/external/bsd/ntp/dist/sntp/libopts
Module Name:src Committed By: joerg Date: Sun Nov 23 01:47:59 UTC 2014 Modified Files: src/external/bsd/ntp/dist/sntp/libopts: init.c src/external/bsd/ntp/dist/sntp/libopts/autoopts: options.h Log Message: Replace very question pointer games to override const, mark the member writeable when inside the guts of the library. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/sntp/libopts/init.c cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/ntp/dist/sntp/libopts/autoopts/options.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: christos Date: Sun Dec 29 03:26:07 UTC 2013 Modified Files: src/external/bsd/ntp/dist/sntp: main.c Log Message: not all characters are born signed. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/sntp/main.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/ntp/dist/sntp/main.c diff -u src/external/bsd/ntp/dist/sntp/main.c:1.8 src/external/bsd/ntp/dist/sntp/main.c:1.9 --- src/external/bsd/ntp/dist/sntp/main.c:1.8 Fri Dec 27 22:20:15 2013 +++ src/external/bsd/ntp/dist/sntp/main.c Sat Dec 28 22:26:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.8 2013/12/28 03:20:15 christos Exp $ */ +/* $NetBSD: main.c,v 1.9 2013/12/29 03:26:07 christos Exp $ */ #include config.h @@ -1398,7 +1398,7 @@ set_li_vn_mode ( leap = 3; } - if (version 0 || version 7) { + if ((unsigned char)version 7) { msyslog(LOG_DEBUG, set_li_vn_mode: version 0 or 7, using 4); version = 4; }
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: christos Date: Sun Dec 29 03:26:07 UTC 2013 Modified Files: src/external/bsd/ntp/dist/sntp: main.c Log Message: not all characters are born signed. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/ntp/dist/sntp/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: christos Date: Fri Feb 3 21:35:55 UTC 2012 Modified Files: src/external/bsd/ntp/dist/sntp: main.c Log Message: don't bother with ifdef's, just grab the biggest type you can. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/main.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/ntp/dist/sntp/main.c diff -u src/external/bsd/ntp/dist/sntp/main.c:1.5 src/external/bsd/ntp/dist/sntp/main.c:1.6 --- src/external/bsd/ntp/dist/sntp/main.c:1.5 Fri Feb 3 11:33:10 2012 +++ src/external/bsd/ntp/dist/sntp/main.c Fri Feb 3 16:35:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.5 2012/02/03 16:33:10 christos Exp $ */ +/* $NetBSD: main.c,v 1.6 2012/02/03 21:35:55 christos Exp $ */ #include config.h @@ -203,7 +203,6 @@ handle_pkt ( double offset, precision, root_dispersion; char addr_buf[INET6_ADDRSTRLEN]; char *p_SNTP_PRETEND_TIME; - time_t pretend_time; if(rpktl 0) sw_case = 1; @@ -251,14 +250,9 @@ handle_pkt ( p_SNTP_PRETEND_TIME = getenv(SNTP_PRETEND_TIME); if (p_SNTP_PRETEND_TIME) { -#if SIZEOF_TIME_T == 4 - sscanf(p_SNTP_PRETEND_TIME, %ld, pretend_time); -#elif SIZEOF_TIME_T == 8 - sscanf(p_SNTP_PRETEND_TIME, %zd, pretend_time); -#else -# include GRONK: unexpected value for SIZEOF_TIME_T -#endif - tv_dst.tv_sec = pretend_time; + long long input_time; + sscanf(p_SNTP_PRETEND_TIME, %lld, input_time); + tv_dst.tv_sec = (time_t)input_time; } offset_calculation(rpkt, rpktl, tv_dst, offset,
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: christos Date: Fri Feb 3 21:35:55 UTC 2012 Modified Files: src/external/bsd/ntp/dist/sntp: main.c Log Message: don't bother with ifdef's, just grab the biggest type you can. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/sntp/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: kardel Date: Sat Aug 28 15:38:55 UTC 2010 Modified Files: src/external/bsd/ntp/dist/sntp: kod_management.c Log Message: remove uncondition #define DEBUG To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/sntp/kod_management.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/ntp/dist/sntp/kod_management.c diff -u src/external/bsd/ntp/dist/sntp/kod_management.c:1.1.1.1 src/external/bsd/ntp/dist/sntp/kod_management.c:1.2 --- src/external/bsd/ntp/dist/sntp/kod_management.c:1.1.1.1 Sun Dec 13 16:57:10 2009 +++ src/external/bsd/ntp/dist/sntp/kod_management.c Sat Aug 28 15:38:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kod_management.c,v 1.1.1.1 2009/12/13 16:57:10 kardel Exp $ */ +/* $NetBSD: kod_management.c,v 1.2 2010/08/28 15:38:55 kardel Exp $ */ #include string.h #include sys/types.h @@ -8,7 +8,6 @@ #include log.h #include sntp-opts.h #include ntp_stdlib.h -#define DEBUG int kod_init = 0, kod_db_cnt = 0; const char *kod_db_file;
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: kardel Date: Sat Aug 28 15:39:25 UTC 2010 Modified Files: src/external/bsd/ntp/dist/sntp: networking.c Log Message: fix DEBUG compilation To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/sntp/networking.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/ntp/dist/sntp/networking.c diff -u src/external/bsd/ntp/dist/sntp/networking.c:1.1.1.1 src/external/bsd/ntp/dist/sntp/networking.c:1.2 --- src/external/bsd/ntp/dist/sntp/networking.c:1.1.1.1 Sun Dec 13 16:57:11 2009 +++ src/external/bsd/ntp/dist/sntp/networking.c Sat Aug 28 15:39:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: networking.c,v 1.1.1.1 2009/12/13 16:57:11 kardel Exp $ */ +/* $NetBSD: networking.c,v 1.2 2010/08/28 15:39:25 kardel Exp $ */ #include networking.h @@ -62,6 +62,8 @@ free(logmsg); } else { #ifdef DEBUG + struct addrinfo *dres; + for (dres = tres[resc]; dres; dres = dres-ai_next) { getnameinfo(dres-ai_addr, dres-ai_addrlen, adr_buf, sizeof(adr_buf), NULL, 0, NI_NUMERICHOST); STDLINE @@ -160,7 +162,7 @@ pkt_output((struct pkt *) rdata, recvc, stdout); } else { - saved_errno = errno; + int saved_errno = errno; printf(recvfrom error %d (%s)\n, errno, strerror(errno)); errno = saved_errno; }
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: kardel Date: Sat Aug 28 20:54:24 UTC 2010 Modified Files: src/external/bsd/ntp/dist/sntp: networking.c Log Message: using a char * as timeout value is a unique concept - atol() the string To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/sntp/networking.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/ntp/dist/sntp/networking.c diff -u src/external/bsd/ntp/dist/sntp/networking.c:1.2 src/external/bsd/ntp/dist/sntp/networking.c:1.3 --- src/external/bsd/ntp/dist/sntp/networking.c:1.2 Sat Aug 28 15:39:25 2010 +++ src/external/bsd/ntp/dist/sntp/networking.c Sat Aug 28 20:54:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: networking.c,v 1.2 2010/08/28 15:39:25 kardel Exp $ */ +/* $NetBSD: networking.c,v 1.3 2010/08/28 20:54:24 kardel Exp $ */ #include networking.h @@ -280,7 +280,7 @@ FD_SET(rsock, bcst_fd); if(ENABLED_OPT(TIMEOUT)) - timeout_tv.tv_sec = (int) OPT_ARG(TIMEOUT); + timeout_tv.tv_sec = atol(OPT_ARG(TIMEOUT)); else timeout_tv.tv_sec = 68; /* ntpd broadcasts every 64s */
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: kardel Date: Sat Aug 28 15:38:55 UTC 2010 Modified Files: src/external/bsd/ntp/dist/sntp: kod_management.c Log Message: remove uncondition #define DEBUG To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/sntp/kod_management.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: kardel Date: Sat Aug 28 15:39:25 UTC 2010 Modified Files: src/external/bsd/ntp/dist/sntp: networking.c Log Message: fix DEBUG compilation To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/sntp/networking.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/ntp/dist/sntp
Module Name:src Committed By: kardel Date: Sat Aug 28 20:54:24 UTC 2010 Modified Files: src/external/bsd/ntp/dist/sntp: networking.c Log Message: using a char * as timeout value is a unique concept - atol() the string To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/sntp/networking.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.