Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp Since we've added the mdnstries keyword, we...



details:   https://anonhg.NetBSD.org/src/rev/211566b10b1e
branches:  trunk
changeset: 805147:211566b10b1e
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 20 16:52:21 2014 +0000

description:
Since we've added the mdnstries keyword, we need to regenerate the
ntp_parser.[ch] files, otherwise we get syntax errors. Our yacc seems
to be producing a working parser now, so let's use it.

diffstat:

 external/bsd/ntp/bin/ntpd/Makefile      |    11 +-
 external/bsd/ntp/dist/ntpd/ntp_parser.c |  3614 -------------------------------
 external/bsd/ntp/dist/ntpd/ntp_parser.h |   461 ---
 3 files changed, 4 insertions(+), 4082 deletions(-)

diffs (truncated from 4116 to 300 lines):

diff -r 4eceb671d31d -r 211566b10b1e external/bsd/ntp/bin/ntpd/Makefile
--- a/external/bsd/ntp/bin/ntpd/Makefile        Sat Dec 20 16:34:47 2014 +0000
+++ b/external/bsd/ntp/bin/ntpd/Makefile        Sat Dec 20 16:52:21 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.17 2014/12/19 20:43:14 christos Exp $
+#      $NetBSD: Makefile,v 1.18 2014/12/20 16:52:21 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -15,7 +15,7 @@
        ntp_leapsec.c                           \
        ntp_loopfilter.c                        \
        ntp_monitor.c                           \
-       ntp_parser.c                            \
+       ntp_parser.y                            \
        ntp_peer.c                              \
        ntp_prio_q.c                            \
        ntp_proto.c                             \
@@ -80,12 +80,9 @@
 
 DIST=${IDIST}/ntpd
 
-CPPFLAGS+=-I${IDIST}/include -I${IDIST}/sntp/libopts -I${IDIST}/ntpd
+CPPFLAGS+=-I${IDIST}/include -I${IDIST}/sntp/libopts -I${IDIST}/ntpd -I.
 
 .PATH: ${DIST}
+YHEADER=1
 
 .include <bsd.prog.mk>
-
-# kill default .y.c rule - to rebuild ntp_parser.c we need bison which is not part of the toolchain
-.y.c:
-
diff -r 4eceb671d31d -r 211566b10b1e external/bsd/ntp/dist/ntpd/ntp_parser.c
--- a/external/bsd/ntp/dist/ntpd/ntp_parser.c   Sat Dec 20 16:34:47 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,3614 +0,0 @@
-/*     $NetBSD: ntp_parser.c,v 1.9 2014/12/19 20:43:17 christos Exp $  */
-
-/* A Bison parser, made by GNU Bison 3.0.2.  */
-
-/* Bison implementation for Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Bison version.  */
-#define YYBISON_VERSION "3.0.2"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
-
-
-
-/* Copy the first part of user declarations.  */
-#line 14 "ntp_parser.y" /* yacc.c:339  */
-
-  #ifdef HAVE_CONFIG_H
-  # include <config.h>
-  #endif
-
-  #include "ntp.h"
-  #include "ntpd.h"
-  #include "ntp_machine.h"
-  #include "ntp_stdlib.h"
-  #include "ntp_filegen.h"
-  #include "ntp_scanner.h"
-  #include "ntp_config.h"
-  #include "ntp_crypto.h"
-
-  #include "ntpsim.h"          /* HMS: Do we really want this all the time? */
-                               /* SK: It might be a good idea to always
-                                  include the simulator code. That way
-                                  someone can use the same configuration file
-                                  for both the simulator and the daemon
-                               */
-
-  #define YYMALLOC     emalloc
-  #define YYFREE       free
-  #define YYERROR_VERBOSE
-  #define YYMAXDEPTH   1000    /* stop the madness sooner */
-  void yyerror(struct FILE_INFO *ip_file, const char *msg);
-
-  #ifdef SIM
-  #  define ONLY_SIM(a)        (a)
-  #else
-  #  define ONLY_SIM(a)        NULL
-  #endif
-
-#line 100 "../../ntpd/ntp_parser.c" /* yacc.c:339  */
-
-# ifndef YY_NULLPTR
-#  if defined __cplusplus && 201103L <= __cplusplus
-#   define YY_NULLPTR nullptr
-#  else
-#   define YY_NULLPTR 0
-#  endif
-# endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* In a future release of Bison, this section will be replaced
-   by #include "y.tab.h".  */
-#ifndef YY_YY_Y_TAB_H_INCLUDED
-# define YY_YY_Y_TAB_H_INCLUDED
-/* Debug traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 1
-#endif
-#if YYDEBUG
-extern int yydebug;
-#endif
-
-/* Token type.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-  enum yytokentype
-  {
-    T_Abbrev = 258,
-    T_Age = 259,
-    T_All = 260,
-    T_Allan = 261,
-    T_Allpeers = 262,
-    T_Auth = 263,
-    T_Autokey = 264,
-    T_Automax = 265,
-    T_Average = 266,
-    T_Bclient = 267,
-    T_Beacon = 268,
-    T_Broadcast = 269,
-    T_Broadcastclient = 270,
-    T_Broadcastdelay = 271,
-    T_Burst = 272,
-    T_Calibrate = 273,
-    T_Ceiling = 274,
-    T_Clockstats = 275,
-    T_Cohort = 276,
-    T_ControlKey = 277,
-    T_Crypto = 278,
-    T_Cryptostats = 279,
-    T_Ctl = 280,
-    T_Day = 281,
-    T_Default = 282,
-    T_Digest = 283,
-    T_Disable = 284,
-    T_Discard = 285,
-    T_Dispersion = 286,
-    T_Double = 287,
-    T_Driftfile = 288,
-    T_Drop = 289,
-    T_Ellipsis = 290,
-    T_Enable = 291,
-    T_End = 292,
-    T_False = 293,
-    T_File = 294,
-    T_Filegen = 295,
-    T_Filenum = 296,
-    T_Flag1 = 297,
-    T_Flag2 = 298,
-    T_Flag3 = 299,
-    T_Flag4 = 300,
-    T_Flake = 301,
-    T_Floor = 302,
-    T_Freq = 303,
-    T_Fudge = 304,
-    T_Host = 305,
-    T_Huffpuff = 306,
-    T_Iburst = 307,
-    T_Ident = 308,
-    T_Ignore = 309,
-    T_Incalloc = 310,
-    T_Incmem = 311,
-    T_Initalloc = 312,
-    T_Initmem = 313,
-    T_Includefile = 314,
-    T_Integer = 315,
-    T_Interface = 316,
-    T_Intrange = 317,
-    T_Io = 318,
-    T_Ipv4 = 319,
-    T_Ipv4_flag = 320,
-    T_Ipv6 = 321,
-    T_Ipv6_flag = 322,
-    T_Kernel = 323,
-    T_Key = 324,
-    T_Keys = 325,
-    T_Keysdir = 326,
-    T_Kod = 327,
-    T_Mssntp = 328,
-    T_Leapfile = 329,
-    T_Limited = 330,
-    T_Link = 331,
-    T_Listen = 332,
-    T_Logconfig = 333,
-    T_Logfile = 334,
-    T_Loopstats = 335,
-    T_Lowpriotrap = 336,
-    T_Manycastclient = 337,
-    T_Manycastserver = 338,
-    T_Mask = 339,
-    T_Maxage = 340,
-    T_Maxclock = 341,
-    T_Maxdepth = 342,
-    T_Maxdist = 343,
-    T_Maxmem = 344,
-    T_Maxpoll = 345,
-    T_Mem = 346,
-    T_Memlock = 347,
-    T_Minclock = 348,
-    T_Mindepth = 349,
-    T_Mindist = 350,
-    T_Minimum = 351,
-    T_Minpoll = 352,
-    T_Minsane = 353,
-    T_Mode = 354,
-    T_Mode7 = 355,
-    T_Monitor = 356,
-    T_Month = 357,
-    T_Mru = 358,
-    T_Multicastclient = 359,
-    T_Nic = 360,
-    T_Nolink = 361,
-    T_Nomodify = 362,
-    T_Nomrulist = 363,
-    T_None = 364,
-    T_Nonvolatile = 365,
-    T_Nopeer = 366,
-    T_Noquery = 367,
-    T_Noselect = 368,
-    T_Noserve = 369,
-    T_Notrap = 370,
-    T_Notrust = 371,
-    T_Ntp = 372,
-    T_Ntpport = 373,
-    T_NtpSignDsocket = 374,
-    T_Orphan = 375,
-    T_Orphanwait = 376,
-    T_Panic = 377,
-    T_Peer = 378,
-    T_Peerstats = 379,
-    T_Phone = 380,
-    T_Pid = 381,
-    T_Pidfile = 382,
-    T_Pool = 383,
-    T_Port = 384,
-    T_Preempt = 385,



Home | Main Index | Thread Index | Old Index