diff --git a/app-arch/tar/patches/tar-1.32-gcc2.patchset b/app-arch/tar/patches/tar-1.32-gcc2.patchset deleted file mode 100644 index 68d35943c..000000000 --- a/app-arch/tar/patches/tar-1.32-gcc2.patchset +++ /dev/null @@ -1,3085 +0,0 @@ -From 47f0966e3f0ec873b7d90280a5e89cc251fbf4cb Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Fri, 22 Jun 2018 20:30:40 +0000 -Subject: C89 fixes for gcc2 compatibility - - -diff --git a/gnu/backupfile.c b/gnu/backupfile.c -index 254c086..83f072e 100644 ---- a/gnu/backupfile.c -+++ b/gnu/backupfile.c -@@ -240,6 +240,7 @@ numbered_backup (int dir_fd, char **buffer, size_t buffer_size, size_t filelen, - char *q; - bool all_9s; - size_t versionlen; -+ size_t new_buffer_size; - - if (_D_EXACT_NAMLEN (dp) < baselen + 4) - continue; -@@ -271,12 +272,13 @@ numbered_backup (int dir_fd, char **buffer, size_t buffer_size, size_t filelen, - - versionlenmax = all_9s + versionlen; - result = (all_9s ? BACKUP_IS_LONGER : BACKUP_IS_SAME_LENGTH); -- size_t new_buffer_size = filelen + 2 + versionlenmax + 2; -+ new_buffer_size = filelen + 2 + versionlenmax + 2; - if (buffer_size < new_buffer_size) - { -+ char *new_buf; - if (! xalloc_oversized (new_buffer_size, 2)) - new_buffer_size *= 2; -- char *new_buf = realloc (buf, new_buffer_size); -+ new_buf = realloc (buf, new_buffer_size); - if (!new_buf) - { - *buffer = buf; -@@ -316,28 +318,37 @@ backupfile_internal (int dir_fd, char const *file, - { - ptrdiff_t base_offset = last_component (file) - file; - size_t filelen = base_offset + strlen (file + base_offset); -+ size_t simple_backup_suffix_size; -+ size_t backup_suffix_size_guess; -+ enum { GUESS = sizeof ".~12345~" }; -+ ssize_t ssize; -+ char *s; -+ DIR *dirp; -+ int sdir; -+ size_t base_max; - - if (! simple_backup_suffix) - set_simple_backup_suffix (NULL); - - /* Allow room for simple or ".~N~" backups. The guess must be at - least sizeof ".~1~", but otherwise will be adjusted as needed. */ -- size_t simple_backup_suffix_size = strlen (simple_backup_suffix) + 1; -- size_t backup_suffix_size_guess = simple_backup_suffix_size; -- enum { GUESS = sizeof ".~12345~" }; -+ simple_backup_suffix_size = strlen (simple_backup_suffix) + 1; -+ backup_suffix_size_guess = simple_backup_suffix_size; - if (backup_suffix_size_guess < GUESS) - backup_suffix_size_guess = GUESS; - -- ssize_t ssize = filelen + backup_suffix_size_guess + 1; -- char *s = malloc (ssize); -+ ssize = filelen + backup_suffix_size_guess + 1; -+ s = malloc (ssize); - if (!s) - return s; - -- DIR *dirp = NULL; -- int sdir = -1; -- size_t base_max = 0; -+ dirp = NULL; -+ sdir = -1; -+ base_max = 0; - while (true) - { -+ unsigned flags; -+ int e; - memcpy (s, file, filelen + 1); - - if (backup_type == simple_backups) -@@ -375,10 +386,10 @@ backupfile_internal (int dir_fd, char const *file, - sdir = AT_FDCWD; - base_offset = 0; - } -- unsigned flags = backup_type == simple_backups ? 0 : RENAME_NOREPLACE; -+ flags = backup_type == simple_backups ? 0 : RENAME_NOREPLACE; - if (renameatu (AT_FDCWD, file, sdir, s + base_offset, flags) == 0) - break; -- int e = errno; -+ e = errno; - if (e != EEXIST) - { - if (dirp) -diff --git a/gnu/parse-datetime.y b/gnu/parse-datetime.y -index b264bb7..91793d7 100644 ---- a/gnu/parse-datetime.y -+++ b/gnu/parse-datetime.y -@@ -405,8 +405,9 @@ time_zone_str (int time_zone, char time_zone_buf[TIME_ZONE_BUFSIZE]) - char *p = time_zone_buf; - char sign = time_zone < 0 ? '-' : '+'; - int hour = abs (time_zone / (60 * 60)); -+ int offset_from_hour; - p += sprintf (time_zone_buf, "%c%02d", sign, hour); -- int offset_from_hour = abs (time_zone % (60 * 60)); -+ offset_from_hour = abs (time_zone % (60 * 60)); - if (offset_from_hour != 0) - { - int mm = offset_from_hour / 60; -@@ -477,9 +478,9 @@ debug_print_current_time (char const *item, parser_control *pc) - - if (pc->days_seen && !pc->debug_days_seen) - { -+ char tmp[DBGBUFSIZE]; - if (space) - fputc (' ', stderr); -- char tmp[DBGBUFSIZE]; - fprintf (stderr, _("%s (day ordinal=%"PRIdMAX" number=%d)"), - str_days (pc, tmp, sizeof tmp), - pc->day_ordinal, pc->day_number); -@@ -1414,6 +1415,7 @@ yylex (union YYSTYPE *lvalp, parser_control *pc) - - for (;;) - { -+ ptrdiff_t count; - while (c = *pc->input, c_isspace (c)) - pc->input++; - -@@ -1531,7 +1533,7 @@ yylex (union YYSTYPE *lvalp, parser_control *pc) - if (c != '(') - return to_uchar (*pc->input++); - -- ptrdiff_t count = 0; -+ count = 0; - do - { - c = *pc->input++; -@@ -1610,12 +1612,12 @@ debug_strfdatetime (struct tm const *tm, parser_control const *pc, - if (pc && m < n && pc->zones_seen) - { - int tz = pc->time_zone; -+ char time_zone_buf[TIME_ZONE_BUFSIZE]; - - /* Account for DST if tLOCAL_ZONE was seen. */ - if (pc->local_zones_seen && !pc->zones_seen && 0 < pc->local_isdst) - tz += 60 * 60; - -- char time_zone_buf[TIME_ZONE_BUFSIZE]; - snprintf (&buf[m], n - m, " TZ=%s", time_zone_str (tz, time_zone_buf)); - } - return buf; -@@ -1713,9 +1715,10 @@ parse_datetime (struct timespec *result, char const *p, - { - char const *tzstring = getenv ("TZ"); - timezone_t tz = tzalloc (tzstring); -+ bool ok; - if (!tz) - return false; -- bool ok = parse_datetime2 (result, p, now, 0, tz, tzstring); -+ ok = parse_datetime2 (result, p, now, 0, tz, tzstring); - tzfree (tz); - return ok; - } -@@ -1742,6 +1745,12 @@ parse_datetime2 (struct timespec *result, char const *p, - Use heap allocation if TZ's length exceeds this. */ - enum { TZBUFSIZE = 100 }; - char tz1buf[TZBUFSIZE]; -+ time_t Start; -+ int Start_ns; -+ unsigned char c; -+ timezone_t tz; -+ struct tm tmp; -+ parser_control pc; - - struct timespec gettime_buffer; - if (! now) -@@ -1750,14 +1759,13 @@ parse_datetime2 (struct timespec *result, char const *p, - now = &gettime_buffer; - } - -- time_t Start = now->tv_sec; -- int Start_ns = now->tv_nsec; -+ Start = now->tv_sec; -+ Start_ns = now->tv_nsec; - -- unsigned char c; - while (c = *p, c_isspace (c)) - p++; - -- timezone_t tz = tzdefault; -+ tz = tzdefault; - - /* Store a local copy prior to first "goto". Without this, a prior use - below of RELATIVE_TIME_0 on the RHS might translate to an assignment- -@@ -1807,7 +1815,6 @@ parse_datetime2 (struct timespec *result, char const *p, - } - } - -- struct tm tmp; - if (! localtime_rz (tz, &now->tv_sec, &tmp)) - goto fail; - -@@ -1817,7 +1824,6 @@ parse_datetime2 (struct timespec *result, char const *p, - if (*p == '\0') - p = "0"; - -- parser_control pc; - pc.input = p; - pc.parse_datetime_debug = (flags & PARSE_DATETIME_DEBUG) != 0; - if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) -@@ -1867,11 +1873,12 @@ parse_datetime2 (struct timespec *result, char const *p, - for (quarter = 1; quarter <= 3; quarter++) - { - intmax_t iprobe; -+ time_t probe; -+ struct tm probe_tm; - if (INT_ADD_WRAPV (Start, quarter * (90 * 24 * 60 * 60), &iprobe) - || time_overflow (iprobe)) - break; -- time_t probe = iprobe; -- struct tm probe_tm; -+ probe = iprobe; - if (localtime_rz (tz, &probe, &probe_tm) && probe_tm.tm_zone - && probe_tm.tm_isdst != pc.local_time_zone_table[0].value) - { -@@ -1968,6 +1975,8 @@ parse_datetime2 (struct timespec *result, char const *p, - *result = pc.seconds; - else - { -+ char dbg_ord[DBGBUFSIZE]; -+ - if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen - | (pc.local_zones_seen + pc.zones_seen))) - { -@@ -2060,9 +2069,10 @@ parse_datetime2 (struct timespec *result, char const *p, - by setting TZ="XXX1:00" and try mktime again. */ - - char tz2buf[sizeof "XXX" - 1 + TIME_ZONE_BUFSIZE]; -+ timezone_t tz2; - tz2buf[0] = tz2buf[1] = tz2buf[2] = 'X'; - time_zone_str (pc.time_zone, &tz2buf[3]); -- timezone_t tz2 = tzalloc (tz2buf); -+ tz2 = tzalloc (tz2buf); - if (!tz2) - { - if (pc.parse_datetime_debug) -@@ -2089,8 +2099,6 @@ parse_datetime2 (struct timespec *result, char const *p, - } - } - -- char dbg_ord[DBGBUFSIZE]; -- - if (pc.days_seen && ! pc.dates_seen) - { - intmax_t dayincr; -@@ -2146,6 +2154,7 @@ parse_datetime2 (struct timespec *result, char const *p, - /* Add relative date. */ - if (pc.rel.year | pc.rel.month | pc.rel.day) - { -+ int year, month, day; - if (pc.parse_datetime_debug) - { - if ((pc.rel.year != 0 || pc.rel.month != 0) && tm.tm_mday != 15) -@@ -2158,7 +2167,6 @@ parse_datetime2 (struct timespec *result, char const *p, - "it is recommended to specify noon\n")); - } - -- int year, month, day; - if (INT_ADD_WRAPV (tm.tm_year, pc.rel.year, &year) - || INT_ADD_WRAPV (tm.tm_mon, pc.rel.month, &month) - || INT_ADD_WRAPV (tm.tm_mday, pc.rel.day, &day)) -@@ -2229,9 +2237,9 @@ parse_datetime2 (struct timespec *result, char const *p, - && (tm.tm_mday != day - || (pc.rel.month == 0 && tm.tm_mon != month))) - { -+ char tm_year_buf[TM_YEAR_BUFSIZE]; - dbg_printf (_("warning: month/year adjustment resulted in " - "shifted dates:\n")); -- char tm_year_buf[TM_YEAR_BUFSIZE]; - dbg_printf (_(" adjusted Y M D: %s %02d %02d\n"), - tm_year_str (year, tm_year_buf), month + 1, day); - dbg_printf (_(" normalized Y M D: %s %02d %02d\n"), -@@ -2311,6 +2319,7 @@ parse_datetime2 (struct timespec *result, char const *p, - if (pc.parse_datetime_debug - && (pc.rel.hour | pc.rel.minutes | pc.rel.seconds | pc.rel.ns)) - { -+ struct tm lmt; - dbg_printf (_("after time adjustment (%+"PRIdMAX" hours, " - "%+"PRIdMAX" minutes, " - "%+"PRIdMAX" seconds, %+d ns),\n"), -@@ -2329,7 +2338,6 @@ parse_datetime2 (struct timespec *result, char const *p, - places. - - 'tm.tm_isdst' contains the date after date adjustment. */ -- struct tm lmt; - if (tm.tm_isdst != -1 && localtime_rz (tz, &result->tv_sec, &lmt) - && tm.tm_isdst != lmt.tm_isdst) - dbg_printf (_("warning: daylight saving time changed after " -@@ -2340,6 +2348,10 @@ parse_datetime2 (struct timespec *result, char const *p, - - if (pc.parse_datetime_debug) - { -+ intmax_t sec; -+ int nsec; -+ struct tm gmt, lmt; -+ bool got_utc; - /* Special case: using 'date -u' simply set TZ=UTC0 */ - if (! tzstring) - dbg_printf (_("timezone: system default\n")); -@@ -2348,13 +2360,12 @@ parse_datetime2 (struct timespec *result, char const *p, - else - dbg_printf (_("timezone: TZ=\"%s\" environment value\n"), tzstring); - -- intmax_t sec = result->tv_sec; -- int nsec = result->tv_nsec; -+ sec = result->tv_sec; -+ nsec = result->tv_nsec; - dbg_printf (_("final: %"PRIdMAX".%09d (epoch-seconds)\n"), - sec, nsec); - -- struct tm gmt, lmt; -- bool got_utc = !!gmtime_r (&result->tv_sec, &gmt); -+ got_utc = !!gmtime_r (&result->tv_sec, &gmt); - if (got_utc) - dbg_printf (_("final: %s (UTC)\n"), - debug_strfdatetime (&gmt, NULL, --- -2.19.1 - - -From 2ed2c8945e1df5fee542fe52b3ea13137b487449 Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Tue, 18 Sep 2018 11:40:27 +0000 -Subject: regenerated parse-datetime.c with bison 3.0.5 - - -diff --git a/gnu/parse-datetime.c b/gnu/parse-datetime.c -index 568de6b..4614822 100644 ---- a/gnu/parse-datetime.c -+++ b/gnu/parse-datetime.c -@@ -1,19 +1,19 @@ --/* A Bison parser, made by GNU Bison 2.7. */ -+/* A Bison parser, made by GNU Bison 3.0.5. */ - - /* Bison implementation for Yacc-like parsers in C -- -- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. -- -+ -+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 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 . */ - -@@ -26,7 +26,7 @@ - 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. */ - -@@ -44,7 +44,7 @@ - #define YYBISON 1 - - /* Bison version. */ --#define YYBISON_VERSION "2.7" -+#define YYBISON_VERSION "3.0.5" - - /* Skeleton name. */ - #define YYSKELETON_NAME "yacc.c" -@@ -62,8 +62,7 @@ - - - /* Copy the first part of user declarations. */ --/* Line 371 of yacc.c */ --#line 1 "parse-datetime.y" -+#line 1 "parse-datetime.y" /* yacc.c:339 */ - - /* Parse a string into an internal timestamp. - -@@ -471,8 +470,9 @@ time_zone_str (int time_zone, char time_zone_buf[TIME_ZONE_BUFSIZE]) - char *p = time_zone_buf; - char sign = time_zone < 0 ? '-' : '+'; - int hour = abs (time_zone / (60 * 60)); -+ int offset_from_hour; - p += sprintf (time_zone_buf, "%c%02d", sign, hour); -- int offset_from_hour = abs (time_zone % (60 * 60)); -+ offset_from_hour = abs (time_zone % (60 * 60)); - if (offset_from_hour != 0) - { - int mm = offset_from_hour / 60; -@@ -543,9 +543,9 @@ debug_print_current_time (char const *item, parser_control *pc) - - if (pc->days_seen && !pc->debug_days_seen) - { -+ char tmp[DBGBUFSIZE]; - if (space) - fputc (' ', stderr); -- char tmp[DBGBUFSIZE]; - fprintf (stderr, _("%s (day ordinal=%"PRIdMAX" number=%d)"), - str_days (pc, tmp, sizeof tmp), - pc->day_ordinal, pc->day_number); -@@ -628,14 +628,13 @@ debug_print_relative_time (char const *item, parser_control const *pc) - - - --/* Line 371 of yacc.c */ --#line 633 "parse-datetime.c" -+#line 632 "parse-datetime.c" /* yacc.c:339 */ - --# ifndef YY_NULL -+# ifndef YY_NULLPTR - # if defined __cplusplus && 201103L <= __cplusplus --# define YY_NULL nullptr -+# define YY_NULLPTR nullptr - # else --# define YY_NULL 0 -+# define YY_NULLPTR 0 - # endif - # endif - -@@ -648,7 +647,7 @@ debug_print_relative_time (char const *item, parser_control const *pc) - #endif - - --/* Enabling traces. */ -+/* Debug traces. */ - #ifndef YYDEBUG - # define YYDEBUG 0 - #endif -@@ -656,33 +655,32 @@ debug_print_relative_time (char const *item, parser_control const *pc) - extern int yydebug; - #endif - --/* Tokens. */ -+/* Token type. */ - #ifndef YYTOKENTYPE - # define YYTOKENTYPE -- /* Put the tokens into the symbol table, so that GDB and other debuggers -- know about them. */ -- enum yytokentype { -- tAGO = 258, -- tDST = 259, -- tYEAR_UNIT = 260, -- tMONTH_UNIT = 261, -- tHOUR_UNIT = 262, -- tMINUTE_UNIT = 263, -- tSEC_UNIT = 264, -- tDAY_UNIT = 265, -- tDAY_SHIFT = 266, -- tDAY = 267, -- tDAYZONE = 268, -- tLOCAL_ZONE = 269, -- tMERIDIAN = 270, -- tMONTH = 271, -- tORDINAL = 272, -- tZONE = 273, -- tSNUMBER = 274, -- tUNUMBER = 275, -- tSDECIMAL_NUMBER = 276, -- tUDECIMAL_NUMBER = 277 -- }; -+ enum yytokentype -+ { -+ tAGO = 258, -+ tDST = 259, -+ tYEAR_UNIT = 260, -+ tMONTH_UNIT = 261, -+ tHOUR_UNIT = 262, -+ tMINUTE_UNIT = 263, -+ tSEC_UNIT = 264, -+ tDAY_UNIT = 265, -+ tDAY_SHIFT = 266, -+ tDAY = 267, -+ tDAYZONE = 268, -+ tLOCAL_ZONE = 269, -+ tMERIDIAN = 270, -+ tMONTH = 271, -+ tORDINAL = 272, -+ tZONE = 273, -+ tSNUMBER = 274, -+ tUNUMBER = 275, -+ tSDECIMAL_NUMBER = 276, -+ tUDECIMAL_NUMBER = 277 -+ }; - #endif - /* Tokens. */ - #define tAGO 258 -@@ -706,49 +704,35 @@ extern int yydebug; - #define tSDECIMAL_NUMBER 276 - #define tUDECIMAL_NUMBER 277 - -- -- -+/* Value type. */ - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED --typedef union YYSTYPE -+ -+union YYSTYPE - { --/* Line 387 of yacc.c */ --#line 576 "parse-datetime.y" -+#line 577 "parse-datetime.y" /* yacc.c:355 */ - - intmax_t intval; - textint textintval; - struct timespec timespec; - relative_time rel; - -+#line 720 "parse-datetime.c" /* yacc.c:355 */ -+}; - --/* Line 387 of yacc.c */ --#line 725 "parse-datetime.c" --} YYSTYPE; -+typedef union YYSTYPE YYSTYPE; - # define YYSTYPE_IS_TRIVIAL 1 --# define yystype YYSTYPE /* obsolescent; will be withdrawn */ - # define YYSTYPE_IS_DECLARED 1 - #endif - - --#ifdef YYPARSE_PARAM --#if defined __STDC__ || defined __cplusplus --int yyparse (void *YYPARSE_PARAM); --#else --int yyparse (); --#endif --#else /* ! YYPARSE_PARAM */ --#if defined __STDC__ || defined __cplusplus -+ - int yyparse (parser_control *pc); --#else --int yyparse (); --#endif --#endif /* ! YYPARSE_PARAM */ - - - - /* Copy the second part of user declarations. */ - --/* Line 390 of yacc.c */ --#line 752 "parse-datetime.c" -+#line 736 "parse-datetime.c" /* yacc.c:358 */ - - #ifdef short - # undef short -@@ -762,11 +746,8 @@ typedef unsigned char yytype_uint8; - - #ifdef YYTYPE_INT8 - typedef YYTYPE_INT8 yytype_int8; --#elif (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) --typedef signed char yytype_int8; - #else --typedef short int yytype_int8; -+typedef signed char yytype_int8; - #endif - - #ifdef YYTYPE_UINT16 -@@ -786,8 +767,7 @@ typedef short int yytype_int16; - # define YYSIZE_T __SIZE_TYPE__ - # elif defined size_t - # define YYSIZE_T size_t --# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) -+# elif ! defined YYSIZE_T - # include /* INFRINGES ON USER NAME SPACE */ - # define YYSIZE_T size_t - # else -@@ -809,6 +789,33 @@ typedef short int yytype_int16; - # endif - #endif - -+#ifndef YY_ATTRIBUTE -+# if (defined __GNUC__ \ -+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ -+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -+# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -+# else -+# define YY_ATTRIBUTE(Spec) /* empty */ -+# endif -+#endif -+ -+#ifndef YY_ATTRIBUTE_PURE -+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -+#endif -+ -+#ifndef YY_ATTRIBUTE_UNUSED -+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -+#endif -+ -+#if !defined _Noreturn \ -+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -+# if defined _MSC_VER && 1200 <= _MSC_VER -+# define _Noreturn __declspec (noreturn) -+# else -+# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -+# endif -+#endif -+ - /* Suppress unused-variable warnings by "using" E. */ - #if ! defined lint || defined __GNUC__ - # define YYUSE(E) ((void) (E)) -@@ -816,24 +823,26 @@ typedef short int yytype_int16; - # define YYUSE(E) /* empty */ - #endif - --/* Identity function, used to suppress warnings about constant conditions. */ --#ifndef lint --# define YYID(N) (N) --#else --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) --static int --YYID (int yyi) -+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -+/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ -+ _Pragma ("GCC diagnostic push") \ -+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ -+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ -+ _Pragma ("GCC diagnostic pop") - #else --static int --YYID (yyi) -- int yyi; -+# define YY_INITIAL_VALUE(Value) Value - #endif --{ -- return yyi; --} -+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+# define YY_IGNORE_MAYBE_UNINITIALIZED_END -+#endif -+#ifndef YY_INITIAL_VALUE -+# define YY_INITIAL_VALUE(Value) /* Nothing. */ - #endif - -+ - #if ! defined yyoverflow || YYERROR_VERBOSE - - /* The parser invokes alloca or malloc; define the necessary symbols. */ -@@ -851,8 +860,7 @@ YYID (yyi) - # define alloca _alloca - # else - # define YYSTACK_ALLOC alloca --# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) -+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS - # include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ - # ifndef EXIT_SUCCESS -@@ -864,8 +872,8 @@ YYID (yyi) - # endif - - # ifdef YYSTACK_ALLOC -- /* Pacify GCC's `empty if-body' warning. */ --# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -+ /* Pacify GCC's 'empty if-body' warning. */ -+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) - # ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely -@@ -881,7 +889,7 @@ YYID (yyi) - # endif - # if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ -- && (defined YYFREE || defined free))) -+ && (defined YYFREE || defined free))) - # include /* INFRINGES ON USER NAME SPACE */ - # ifndef EXIT_SUCCESS - # define EXIT_SUCCESS 0 -@@ -889,15 +897,13 @@ YYID (yyi) - # endif - # ifndef YYMALLOC - # define YYMALLOC malloc --# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) -+# if ! defined malloc && ! defined EXIT_SUCCESS - void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ - # endif - # endif - # ifndef YYFREE - # define YYFREE free --# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) -+# if ! defined free && ! defined EXIT_SUCCESS - void free (void *); /* INFRINGES ON USER NAME SPACE */ - # endif - # endif -@@ -907,7 +913,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ - - #if (! defined yyoverflow \ - && (! defined __cplusplus \ -- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) -+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - - /* A type that is properly aligned for any stack member. */ - union yyalloc -@@ -932,16 +938,16 @@ union yyalloc - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ --# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ -- do \ -- { \ -- YYSIZE_T yynewbytes; \ -- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ -- Stack = &yyptr->Stack_alloc; \ -- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ -- yyptr += yynewbytes / sizeof (*yyptr); \ -- } \ -- while (YYID (0)) -+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ -+ do \ -+ { \ -+ YYSIZE_T yynewbytes; \ -+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ -+ Stack = &yyptr->Stack_alloc; \ -+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ -+ yyptr += yynewbytes / sizeof (*yyptr); \ -+ } \ -+ while (0) - - #endif - -@@ -960,7 +966,7 @@ union yyalloc - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ -- while (YYID (0)) -+ while (0) - # endif - # endif - #endif /* !YYCOPY_NEEDED */ -@@ -976,17 +982,19 @@ union yyalloc - #define YYNNTS 26 - /* YYNRULES -- Number of rules. */ - #define YYNRULES 91 --/* YYNRULES -- Number of states. */ -+/* YYNSTATES -- Number of states. */ - #define YYNSTATES 114 - --/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned -+ by yylex, with out-of-bounds checking. */ - #define YYUNDEFTOK 2 - #define YYMAXUTOK 277 - --#define YYTRANSLATE(YYX) \ -+#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - --/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM -+ as returned by yylex, without out-of-bounds checking. */ - static const yytype_uint8 yytranslate[] = - { - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, -@@ -1020,66 +1028,19 @@ static const yytype_uint8 yytranslate[] = - }; - - #if YYDEBUG --/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in -- YYRHS. */ --static const yytype_uint8 yyprhs[] = --{ -- 0, 0, 3, 5, 7, 10, 11, 14, 16, 18, -- 20, 22, 24, 26, 28, 30, 32, 34, 38, 41, -- 46, 53, 55, 58, 63, 70, 71, 73, 76, 78, -- 81, 83, 85, 88, 91, 95, 97, 100, 102, 105, -- 108, 111, 115, 121, 125, 129, 132, 137, 140, 144, -- 146, 150, 153, 155, 157, 160, 163, 165, 168, 171, -- 173, 176, 179, 181, 184, 187, 189, 192, 195, 197, -- 200, 203, 206, 209, 211, 213, 216, 219, 222, 225, -- 228, 231, 233, 235, 237, 239, 241, 243, 245, 247, -- 250, 251 --}; -- --/* YYRHS -- A `-1'-separated list of the rules' RHS. */ --static const yytype_int8 yyrhs[] = --{ -- 29, 0, -1, 30, -1, 31, -1, 23, 48, -1, -- -1, 31, 32, -1, 33, -1, 35, -1, 39, -1, -- 40, -1, 42, -1, 41, -1, 44, -1, 51, -1, -- 52, -1, 34, -1, 43, 24, 36, -1, 20, 15, -- -1, 20, 25, 20, 15, -1, 20, 25, 20, 25, -- 50, 15, -1, 36, -1, 20, 38, -1, 20, 25, -- 20, 37, -1, 20, 25, 20, 25, 50, 37, -1, -- -1, 38, -1, 19, 53, -1, 14, -1, 14, 4, -- -1, 18, -1, 24, -1, 18, 46, -1, 24, 46, -- -1, 18, 19, 53, -1, 13, -1, 18, 4, -1, -- 12, -1, 12, 26, -1, 17, 12, -1, 20, 12, -- -1, 20, 27, 20, -1, 20, 27, 20, 27, 20, -- -1, 20, 16, 19, -1, 16, 19, 19, -1, 16, -- 20, -1, 16, 20, 26, 20, -1, 20, 16, -1, -- 20, 16, 20, -1, 43, -1, 20, 19, 19, -1, -- 45, 3, -1, 45, -1, 47, -1, 17, 5, -1, -- 20, 5, -1, 5, -1, 17, 6, -1, 20, 6, -- -1, 6, -1, 17, 10, -1, 20, 10, -1, 10, -- -1, 17, 7, -1, 20, 7, -1, 7, -1, 17, -- 8, -1, 20, 8, -1, 8, -1, 17, 9, -1, -- 20, 9, -1, 21, 9, -1, 22, 9, -1, 9, -- -1, 46, -1, 19, 5, -1, 19, 6, -1, 19, -- 10, -1, 19, 7, -1, 19, 8, -1, 19, 9, -- -1, 11, -1, 49, -1, 50, -1, 21, -1, 19, -- -1, 22, -1, 20, -1, 20, -1, 20, 46, -1, -- -1, 25, 20, -1 --}; -- --/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ - static const yytype_uint16 yyrline[] = - { -- 0, 603, 603, 604, 608, 616, 618, 622, 627, 632, -- 637, 642, 647, 652, 656, 660, 667, 671, 675, 680, -- 685, 690, 694, 699, 704, 711, 713, 717, 742, 744, -- 754, 756, 758, 763, 768, 771, 773, 778, 783, 788, -- 794, 803, 808, 841, 849, 857, 862, 868, 873, 879, -- 883, 893, 895, 897, 902, 904, 906, 908, 910, 912, -- 914, 917, 920, 922, 924, 926, 928, 930, 932, 934, -- 936, 938, 940, 942, 944, 948, 950, 952, 955, 957, -- 959, 964, 968, 968, 971, 972, 978, 979, 985, 990, -- 1001, 1002 -+ 0, 604, 604, 605, 609, 617, 619, 623, 628, 633, -+ 638, 643, 648, 653, 657, 661, 668, 672, 676, 681, -+ 686, 691, 695, 700, 705, 712, 714, 718, 743, 745, -+ 755, 757, 759, 764, 769, 772, 774, 779, 784, 789, -+ 795, 804, 809, 842, 850, 858, 863, 869, 874, 880, -+ 884, 894, 896, 898, 903, 905, 907, 909, 911, 913, -+ 915, 918, 921, 923, 925, 927, 929, 931, 933, 935, -+ 937, 939, 941, 943, 945, 949, 951, 953, 956, 958, -+ 960, 965, 969, 969, 972, 973, 979, 980, 986, 991, -+ 1002, 1003 - }; - #endif - -@@ -1097,13 +1058,13 @@ static const char *const yytname[] = - "iso_8601_time", "o_zone_offset", "zone_offset", "local_zone", "zone", - "day", "date", "iso_8601_date", "rel", "relunit", "relunit_snumber", - "dayshift", "seconds", "signed_seconds", "unsigned_seconds", "number", -- "hybrid", "o_colon_minutes", YY_NULL -+ "hybrid", "o_colon_minutes", YY_NULLPTR - }; - #endif - - # ifdef YYPRINT --/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to -- token YYLEX-NUM. */ -+/* YYTOKNUM[NUM] -- (External) token number corresponding to the -+ (internal) symbol number NUM (which must be that of a token). */ - static const yytype_uint16 yytoknum[] = - { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, -@@ -1112,66 +1073,18 @@ static const yytype_uint16 yytoknum[] = - }; - # endif - --/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ --static const yytype_uint8 yyr1[] = --{ -- 0, 28, 29, 29, 30, 31, 31, 32, 32, 32, -- 32, 32, 32, 32, 32, 32, 33, 34, 35, 35, -- 35, 35, 36, 36, 36, 37, 37, 38, 39, 39, -- 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, -- 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, -- 43, 44, 44, 44, 45, 45, 45, 45, 45, 45, -- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, -- 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, -- 46, 47, 48, 48, 49, 49, 50, 50, 51, 52, -- 53, 53 --}; -+#define YYPACT_NINF -93 - --/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ --static const yytype_uint8 yyr2[] = --{ -- 0, 2, 1, 1, 2, 0, 2, 1, 1, 1, -- 1, 1, 1, 1, 1, 1, 1, 3, 2, 4, -- 6, 1, 2, 4, 6, 0, 1, 2, 1, 2, -- 1, 1, 2, 2, 3, 1, 2, 1, 2, 2, -- 2, 3, 5, 3, 3, 2, 4, 2, 3, 1, -- 3, 2, 1, 1, 2, 2, 1, 2, 2, 1, -- 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, -- 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, -- 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, -- 0, 2 --}; -+#define yypact_value_is_default(Yystate) \ -+ (!!((Yystate) == (-93))) - --/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. -- Performed when YYTABLE doesn't specify something else to do. Zero -- means the default is an error. */ --static const yytype_uint8 yydefact[] = --{ -- 5, 0, 0, 2, 3, 85, 87, 84, 86, 4, -- 82, 83, 1, 56, 59, 65, 68, 73, 62, 81, -- 37, 35, 28, 0, 0, 30, 0, 88, 0, 0, -- 31, 6, 7, 16, 8, 21, 9, 10, 12, 11, -- 49, 13, 52, 74, 53, 14, 15, 38, 29, 0, -- 45, 54, 57, 63, 66, 69, 60, 39, 36, 90, -- 32, 75, 76, 78, 79, 80, 77, 55, 58, 64, -- 67, 70, 61, 40, 18, 47, 90, 0, 0, 22, -- 89, 71, 72, 33, 0, 51, 44, 0, 0, 34, -- 43, 48, 50, 27, 25, 41, 0, 17, 46, 91, -- 19, 90, 0, 23, 26, 0, 0, 25, 42, 25, -- 20, 24, 0, 25 --}; -+#define YYTABLE_NINF -1 - --/* YYDEFGOTO[NTERM-NUM]. */ --static const yytype_int8 yydefgoto[] = --{ -- -1, 2, 3, 4, 31, 32, 33, 34, 35, 103, -- 104, 36, 37, 38, 39, 40, 41, 42, 43, 44, -- 9, 10, 11, 45, 46, 93 --}; -+#define yytable_value_is_error(Yytable_value) \ -+ 0 - --/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing -- STATE-NUM. */ --#define YYPACT_NINF -93 -+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing -+ STATE-NUM. */ - static const yytype_int8 yypact[] = - { - 38, 27, 77, -93, 46, -93, -93, -93, -93, -93, -@@ -1188,7 +1101,26 @@ static const yytype_int8 yypact[] = - -93, -93, 69, 91 - }; - --/* YYPGOTO[NTERM-NUM]. */ -+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. -+ Performed when YYTABLE does not specify something else to do. Zero -+ means the default is an error. */ -+static const yytype_uint8 yydefact[] = -+{ -+ 5, 0, 0, 2, 3, 85, 87, 84, 86, 4, -+ 82, 83, 1, 56, 59, 65, 68, 73, 62, 81, -+ 37, 35, 28, 0, 0, 30, 0, 88, 0, 0, -+ 31, 6, 7, 16, 8, 21, 9, 10, 12, 11, -+ 49, 13, 52, 74, 53, 14, 15, 38, 29, 0, -+ 45, 54, 57, 63, 66, 69, 60, 39, 36, 90, -+ 32, 75, 76, 78, 79, 80, 77, 55, 58, 64, -+ 67, 70, 61, 40, 18, 47, 90, 0, 0, 22, -+ 89, 71, 72, 33, 0, 51, 44, 0, 0, 34, -+ 43, 48, 50, 27, 25, 41, 0, 17, 46, 91, -+ 19, 90, 0, 23, 26, 0, 0, 25, 42, 25, -+ 20, 24, 0, 25 -+}; -+ -+ /* YYPGOTO[NTERM-NUM]. */ - static const yytype_int8 yypgoto[] = - { - -93, -93, -93, -93, -93, -93, -93, -93, 20, -68, -@@ -1196,10 +1128,17 @@ static const yytype_int8 yypgoto[] = - -93, -93, -92, -93, -93, 43 - }; - --/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If -- positive, shift that token. If negative, reduce the rule which -- number is the opposite. If YYTABLE_NINF, syntax error. */ --#define YYTABLE_NINF -1 -+ /* YYDEFGOTO[NTERM-NUM]. */ -+static const yytype_int8 yydefgoto[] = -+{ -+ -1, 2, 3, 4, 31, 32, 33, 34, 35, 103, -+ 104, 36, 37, 38, 39, 40, 41, 42, 43, 44, -+ 9, 10, 11, 45, 46, 93 -+}; -+ -+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If -+ positive, shift that token. If negative, reduce the rule whose -+ number is the opposite. If YYTABLE_NINF, syntax error. */ - static const yytype_uint8 yytable[] = - { - 79, 67, 68, 69, 70, 71, 72, 58, 73, 100, -@@ -1216,12 +1155,6 @@ static const yytype_uint8 yytable[] = - 101, 0, 88 - }; - --#define yypact_value_is_default(Yystate) \ -- (!!((Yystate) == (-93))) -- --#define yytable_value_is_error(Yytable_value) \ -- YYID (0) -- - static const yytype_int8 yycheck[] = - { - 27, 5, 6, 7, 8, 9, 10, 4, 12, 15, -@@ -1238,8 +1171,8 @@ static const yytype_int8 yycheck[] = - 19, -1, 25 - }; - --/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing -- symbol of state STATE-NUM. */ -+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing -+ symbol of state STATE-NUM. */ - static const yytype_uint8 yystos[] = - { - 0, 23, 29, 30, 31, 19, 20, 21, 22, 48, -@@ -1256,30 +1189,46 @@ static const yytype_uint8 yystos[] = - 15, 37, 25, 50 - }; - --#define yyerrok (yyerrstatus = 0) --#define yyclearin (yychar = YYEMPTY) --#define YYEMPTY (-2) --#define YYEOF 0 -- --#define YYACCEPT goto yyacceptlab --#define YYABORT goto yyabortlab --#define YYERROR goto yyerrorlab -- -- --/* Like YYERROR except do call yyerror. This remains here temporarily -- to ease the transition to the new meaning of YYERROR, for GCC. -- Once GCC version 2 has supplanted version 1, this can go. However, -- YYFAIL appears to be in use. Nevertheless, it is formally deprecated -- in Bison 2.4.2's NEWS entry, where a plan to phase it out is -- discussed. */ -- --#define YYFAIL goto yyerrlab --#if defined YYFAIL -- /* This is here to suppress warnings from the GCC cpp's -- -Wunused-macros. Normally we don't worry about that warning, but -- some users do, and we want to make it easy for users to remove -- YYFAIL uses, which will produce warnings from Bison 2.5. */ --#endif -+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -+static const yytype_uint8 yyr1[] = -+{ -+ 0, 28, 29, 29, 30, 31, 31, 32, 32, 32, -+ 32, 32, 32, 32, 32, 32, 33, 34, 35, 35, -+ 35, 35, 36, 36, 36, 37, 37, 38, 39, 39, -+ 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, -+ 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, -+ 43, 44, 44, 44, 45, 45, 45, 45, 45, 45, -+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, -+ 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, -+ 46, 47, 48, 48, 49, 49, 50, 50, 51, 52, -+ 53, 53 -+}; -+ -+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -+static const yytype_uint8 yyr2[] = -+{ -+ 0, 2, 1, 1, 2, 0, 2, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 3, 2, 4, -+ 6, 1, 2, 4, 6, 0, 1, 2, 1, 2, -+ 1, 1, 2, 2, 3, 1, 2, 1, 2, 2, -+ 2, 3, 5, 3, 3, 2, 4, 2, 3, 1, -+ 3, 2, 1, 1, 2, 2, 1, 2, 2, 1, -+ 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, -+ 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, -+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, -+ 0, 2 -+}; -+ -+ -+#define yyerrok (yyerrstatus = 0) -+#define yyclearin (yychar = YYEMPTY) -+#define YYEMPTY (-2) -+#define YYEOF 0 -+ -+#define YYACCEPT goto yyacceptlab -+#define YYABORT goto yyabortlab -+#define YYERROR goto yyerrorlab -+ - - #define YYRECOVERING() (!!yyerrstatus) - -@@ -1296,28 +1245,16 @@ do \ - else \ - { \ - yyerror (pc, YY_("syntax error: cannot back up")); \ -- YYERROR; \ -- } \ --while (YYID (0)) -+ YYERROR; \ -+ } \ -+while (0) - - /* Error token number */ --#define YYTERROR 1 --#define YYERRCODE 256 -- -+#define YYTERROR 1 -+#define YYERRCODE 256 - --/* This macro is provided for backward compatibility. */ --#ifndef YY_LOCATION_PRINT --# define YY_LOCATION_PRINT(File, Loc) ((void) 0) --#endif - - --/* YYLEX -- calling `yylex' with the right arguments. */ --#ifdef YYLEX_PARAM --# define YYLEX yylex (&yylval, YYLEX_PARAM) --#else --# define YYLEX yylex (&yylval, pc) --#endif -- - /* Enable debugging if requested. */ - #if YYDEBUG - -@@ -1326,58 +1263,47 @@ while (YYID (0)) - # define YYFPRINTF fprintf - # endif - --# define YYDPRINTF(Args) \ --do { \ -- if (yydebug) \ -- YYFPRINTF Args; \ --} while (YYID (0)) -+# define YYDPRINTF(Args) \ -+do { \ -+ if (yydebug) \ -+ YYFPRINTF Args; \ -+} while (0) - --# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ --do { \ -- if (yydebug) \ -- { \ -- YYFPRINTF (stderr, "%s ", Title); \ -- yy_symbol_print (stderr, \ -- Type, Value, pc); \ -- YYFPRINTF (stderr, "\n"); \ -- } \ --} while (YYID (0)) -+/* This macro is provided for backward compatibility. */ -+#ifndef YY_LOCATION_PRINT -+# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -+#endif - - --/*--------------------------------. --| Print this symbol on YYOUTPUT. | --`--------------------------------*/ -+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -+do { \ -+ if (yydebug) \ -+ { \ -+ YYFPRINTF (stderr, "%s ", Title); \ -+ yy_symbol_print (stderr, \ -+ Type, Value, pc); \ -+ YYFPRINTF (stderr, "\n"); \ -+ } \ -+} while (0) -+ -+ -+/*----------------------------------------. -+| Print this symbol's value on YYOUTPUT. | -+`----------------------------------------*/ - --/*ARGSUSED*/ --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) - static void - yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) --#else --static void --yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc) -- FILE *yyoutput; -- int yytype; -- YYSTYPE const * const yyvaluep; -- parser_control *pc; --#endif - { - FILE *yyo = yyoutput; - YYUSE (yyo); -+ YYUSE (pc); - if (!yyvaluep) - return; -- YYUSE (pc); - # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); --# else -- YYUSE (yyoutput); - # endif -- switch (yytype) -- { -- default: -- break; -- } -+ YYUSE (yytype); - } - - -@@ -1385,23 +1311,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc) - | Print this symbol on YYOUTPUT. | - `--------------------------------*/ - --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) - static void - yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) --#else --static void --yy_symbol_print (yyoutput, yytype, yyvaluep, pc) -- FILE *yyoutput; -- int yytype; -- YYSTYPE const * const yyvaluep; -- parser_control *pc; --#endif - { -- if (yytype < YYNTOKENS) -- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -- else -- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); -+ YYFPRINTF (yyoutput, "%s %s (", -+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc); - YYFPRINTF (yyoutput, ")"); -@@ -1412,16 +1326,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, pc) - | TOP (included). | - `------------------------------------------------------------------*/ - --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) - static void - yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) --#else --static void --yy_stack_print (yybottom, yytop) -- yytype_int16 *yybottom; -- yytype_int16 *yytop; --#endif - { - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) -@@ -1432,50 +1338,42 @@ yy_stack_print (yybottom, yytop) - YYFPRINTF (stderr, "\n"); - } - --# define YY_STACK_PRINT(Bottom, Top) \ --do { \ -- if (yydebug) \ -- yy_stack_print ((Bottom), (Top)); \ --} while (YYID (0)) -+# define YY_STACK_PRINT(Bottom, Top) \ -+do { \ -+ if (yydebug) \ -+ yy_stack_print ((Bottom), (Top)); \ -+} while (0) - - - /*------------------------------------------------. - | Report that the YYRULE is going to be reduced. | - `------------------------------------------------*/ - --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) - static void --yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_control *pc) --#else --static void --yy_reduce_print (yyvsp, yyrule, pc) -- YYSTYPE *yyvsp; -- int yyrule; -- parser_control *pc; --#endif -+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, parser_control *pc) - { -+ unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; -- unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", -- yyrule - 1, yylno); -+ yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); -- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], -- &(yyvsp[(yyi + 1) - (yynrhs)]) -- , pc); -+ yy_symbol_print (stderr, -+ yystos[yyssp[yyi + 1 - yynrhs]], -+ &(yyvsp[(yyi + 1) - (yynrhs)]) -+ , pc); - YYFPRINTF (stderr, "\n"); - } - } - --# define YY_REDUCE_PRINT(Rule) \ --do { \ -- if (yydebug) \ -- yy_reduce_print (yyvsp, Rule, pc); \ --} while (YYID (0)) -+# define YY_REDUCE_PRINT(Rule) \ -+do { \ -+ if (yydebug) \ -+ yy_reduce_print (yyssp, yyvsp, Rule, pc); \ -+} while (0) - - /* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -@@ -1489,7 +1387,7 @@ int yydebug; - - - /* YYINITDEPTH -- initial size of the parser's stacks. */ --#ifndef YYINITDEPTH -+#ifndef YYINITDEPTH - # define YYINITDEPTH 200 - #endif - -@@ -1512,15 +1410,8 @@ int yydebug; - # define yystrlen strlen - # else - /* Return the length of YYSTR. */ --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) - static YYSIZE_T - yystrlen (const char *yystr) --#else --static YYSIZE_T --yystrlen (yystr) -- const char *yystr; --#endif - { - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) -@@ -1536,16 +1427,8 @@ yystrlen (yystr) - # else - /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) - static char * - yystpcpy (char *yydest, const char *yysrc) --#else --static char * --yystpcpy (yydest, yysrc) -- char *yydest; -- const char *yysrc; --#endif - { - char *yyd = yydest; - const char *yys = yysrc; -@@ -1575,27 +1458,27 @@ yytnamerr (char *yyres, const char *yystr) - char const *yyp = yystr; - - for (;;) -- switch (*++yyp) -- { -- case '\'': -- case ',': -- goto do_not_strip_quotes; -- -- case '\\': -- if (*++yyp != '\\') -- goto do_not_strip_quotes; -- /* Fall through. */ -- default: -- if (yyres) -- yyres[yyn] = *yyp; -- yyn++; -- break; -- -- case '"': -- if (yyres) -- yyres[yyn] = '\0'; -- return yyn; -- } -+ switch (*++yyp) -+ { -+ case '\'': -+ case ',': -+ goto do_not_strip_quotes; -+ -+ case '\\': -+ if (*++yyp != '\\') -+ goto do_not_strip_quotes; -+ /* Fall through. */ -+ default: -+ if (yyres) -+ yyres[yyn] = *yyp; -+ yyn++; -+ break; -+ -+ case '"': -+ if (yyres) -+ yyres[yyn] = '\0'; -+ return yyn; -+ } - do_not_strip_quotes: ; - } - -@@ -1618,11 +1501,11 @@ static int - yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) - { -- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); -+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ -- const char *yyformat = YY_NULL; -+ const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per -@@ -1630,10 +1513,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - int yycount = 0; - - /* There are many possibilities here to consider: -- - Assume YYFAIL is not used. It's too flawed to consider. See -- -- for details. YYERROR is fine as it does not invoke this -- function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected -@@ -1683,7 +1562,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - } - yyarg[yycount++] = yytname[yyx]; - { -- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); -+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; -@@ -1699,6 +1578,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - case N: \ - yyformat = S; \ - break -+ default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); -@@ -1750,33 +1630,18 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - | Release the memory associated to this symbol. | - `-----------------------------------------------*/ - --/*ARGSUSED*/ --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) - static void - yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_control *pc) --#else --static void --yydestruct (yymsg, yytype, yyvaluep, pc) -- const char *yymsg; -- int yytype; -- YYSTYPE *yyvaluep; -- parser_control *pc; --#endif - { - YYUSE (yyvaluep); - YYUSE (pc); -- - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - -- switch (yytype) -- { -- -- default: -- break; -- } -+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+ YYUSE (yytype); -+ YY_IGNORE_MAYBE_UNINITIALIZED_END - } - - -@@ -1786,56 +1651,18 @@ yydestruct (yymsg, yytype, yyvaluep, pc) - | yyparse. | - `----------*/ - --#ifdef YYPARSE_PARAM --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) --int --yyparse (void *YYPARSE_PARAM) --#else --int --yyparse (YYPARSE_PARAM) -- void *YYPARSE_PARAM; --#endif --#else /* ! YYPARSE_PARAM */ --#if (defined __STDC__ || defined __C99__FUNC__ \ -- || defined __cplusplus || defined _MSC_VER) - int - yyparse (parser_control *pc) --#else --int --yyparse (pc) -- parser_control *pc; --#endif --#endif - { - /* The lookahead symbol. */ - int yychar; - - --#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ --/* Suppress an incorrect diagnostic about yylval being uninitialized. */ --# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ -- _Pragma ("GCC diagnostic push") \ -- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ -- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") --# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ -- _Pragma ("GCC diagnostic pop") --#else -+/* The semantic value of the lookahead symbol. */ - /* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ --static YYSTYPE yyval_default; --# define YY_INITIAL_VALUE(Value) = Value --#endif --#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN --# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN --# define YY_IGNORE_MAYBE_UNINITIALIZED_END --#endif --#ifndef YY_INITIAL_VALUE --# define YY_INITIAL_VALUE(Value) /* Nothing. */ --#endif -- --/* The semantic value of the lookahead symbol. */ --YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); -+YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -+YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - - /* Number of syntax errors so far. */ - int yynerrs; -@@ -1845,8 +1672,8 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - int yyerrstatus; - - /* The stacks and their tools: -- `yyss': related to states. -- `yyvs': related to semantic values. -+ 'yyss': related to states. -+ 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ -@@ -1914,23 +1741,23 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - - #ifdef yyoverflow - { -- /* Give user a chance to reallocate the stack. Use copies of -- these so that the &'s don't force the real ones into -- memory. */ -- YYSTYPE *yyvs1 = yyvs; -- yytype_int16 *yyss1 = yyss; -- -- /* Each stack pointer address is followed by the size of the -- data in use in that stack, in bytes. This used to be a -- conditional around just the two extra args, but that might -- be undefined if yyoverflow is a macro. */ -- yyoverflow (YY_("memory exhausted"), -- &yyss1, yysize * sizeof (*yyssp), -- &yyvs1, yysize * sizeof (*yyvsp), -- &yystacksize); -- -- yyss = yyss1; -- yyvs = yyvs1; -+ /* Give user a chance to reallocate the stack. Use copies of -+ these so that the &'s don't force the real ones into -+ memory. */ -+ YYSTYPE *yyvs1 = yyvs; -+ yytype_int16 *yyss1 = yyss; -+ -+ /* Each stack pointer address is followed by the size of the -+ data in use in that stack, in bytes. This used to be a -+ conditional around just the two extra args, but that might -+ be undefined if yyoverflow is a macro. */ -+ yyoverflow (YY_("memory exhausted"), -+ &yyss1, yysize * sizeof (*yyssp), -+ &yyvs1, yysize * sizeof (*yyvsp), -+ &yystacksize); -+ -+ yyss = yyss1; -+ yyvs = yyvs1; - } - #else /* no yyoverflow */ - # ifndef YYSTACK_RELOCATE -@@ -1938,22 +1765,22 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - # else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) -- goto yyexhaustedlab; -+ goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) -- yystacksize = YYMAXDEPTH; -+ yystacksize = YYMAXDEPTH; - - { -- yytype_int16 *yyss1 = yyss; -- union yyalloc *yyptr = -- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); -- if (! yyptr) -- goto yyexhaustedlab; -- YYSTACK_RELOCATE (yyss_alloc, yyss); -- YYSTACK_RELOCATE (yyvs_alloc, yyvs); -+ yytype_int16 *yyss1 = yyss; -+ union yyalloc *yyptr = -+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); -+ if (! yyptr) -+ goto yyexhaustedlab; -+ YYSTACK_RELOCATE (yyss_alloc, yyss); -+ YYSTACK_RELOCATE (yyvs_alloc, yyvs); - # undef YYSTACK_RELOCATE -- if (yyss1 != yyssa) -- YYSTACK_FREE (yyss1); -+ if (yyss1 != yyssa) -+ YYSTACK_FREE (yyss1); - } - # endif - #endif /* no yyoverflow */ -@@ -1962,10 +1789,10 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", -- (unsigned long int) yystacksize)); -+ (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) -- YYABORT; -+ YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); -@@ -1994,7 +1821,7 @@ yybackup: - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); -- yychar = YYLEX; -+ yychar = yylex (&yylval, pc); - } - - if (yychar <= YYEOF) -@@ -2059,7 +1886,7 @@ yyreduce: - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: -- `$$ = $1'. -+ '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison -@@ -2073,606 +1900,605 @@ yyreduce: - switch (yyn) - { - case 4: --/* Line 1792 of yacc.c */ --#line 609 "parse-datetime.y" -+#line 610 "parse-datetime.y" /* yacc.c:1648 */ - { -- pc->seconds = (yyvsp[(2) - (2)].timespec); -+ pc->seconds = (yyvsp[0].timespec); - pc->timespec_seen = true; - debug_print_current_time (_("number of seconds"), pc); - } -+#line 1910 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 7: --/* Line 1792 of yacc.c */ --#line 623 "parse-datetime.y" -+#line 624 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->times_seen++; pc->dates_seen++; - debug_print_current_time (_("datetime"), pc); - } -+#line 1919 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 8: --/* Line 1792 of yacc.c */ --#line 628 "parse-datetime.y" -+#line 629 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->times_seen++; - debug_print_current_time (_("time"), pc); - } -+#line 1928 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 9: --/* Line 1792 of yacc.c */ --#line 633 "parse-datetime.y" -+#line 634 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->local_zones_seen++; - debug_print_current_time (_("local_zone"), pc); - } -+#line 1937 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 10: --/* Line 1792 of yacc.c */ --#line 638 "parse-datetime.y" -+#line 639 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->zones_seen++; - debug_print_current_time (_("zone"), pc); - } -+#line 1946 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 11: --/* Line 1792 of yacc.c */ --#line 643 "parse-datetime.y" -+#line 644 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->dates_seen++; - debug_print_current_time (_("date"), pc); - } -+#line 1955 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 12: --/* Line 1792 of yacc.c */ --#line 648 "parse-datetime.y" -+#line 649 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->days_seen++; - debug_print_current_time (_("day"), pc); - } -+#line 1964 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 13: --/* Line 1792 of yacc.c */ --#line 653 "parse-datetime.y" -+#line 654 "parse-datetime.y" /* yacc.c:1648 */ - { - debug_print_relative_time (_("relative"), pc); - } -+#line 1972 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 14: --/* Line 1792 of yacc.c */ --#line 657 "parse-datetime.y" -+#line 658 "parse-datetime.y" /* yacc.c:1648 */ - { - debug_print_current_time (_("number"), pc); - } -+#line 1980 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 15: --/* Line 1792 of yacc.c */ --#line 661 "parse-datetime.y" -+#line 662 "parse-datetime.y" /* yacc.c:1648 */ - { - debug_print_relative_time (_("hybrid"), pc); - } -+#line 1988 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 18: --/* Line 1792 of yacc.c */ --#line 676 "parse-datetime.y" -+#line 677 "parse-datetime.y" /* yacc.c:1648 */ - { -- set_hhmmss (pc, (yyvsp[(1) - (2)].textintval).value, 0, 0, 0); -- pc->meridian = (yyvsp[(2) - (2)].intval); -+ set_hhmmss (pc, (yyvsp[-1].textintval).value, 0, 0, 0); -+ pc->meridian = (yyvsp[0].intval); - } -+#line 1997 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 19: --/* Line 1792 of yacc.c */ --#line 681 "parse-datetime.y" -+#line 682 "parse-datetime.y" /* yacc.c:1648 */ - { -- set_hhmmss (pc, (yyvsp[(1) - (4)].textintval).value, (yyvsp[(3) - (4)].textintval).value, 0, 0); -- pc->meridian = (yyvsp[(4) - (4)].intval); -+ set_hhmmss (pc, (yyvsp[-3].textintval).value, (yyvsp[-1].textintval).value, 0, 0); -+ pc->meridian = (yyvsp[0].intval); - } -+#line 2006 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 20: --/* Line 1792 of yacc.c */ --#line 686 "parse-datetime.y" -+#line 687 "parse-datetime.y" /* yacc.c:1648 */ - { -- set_hhmmss (pc, (yyvsp[(1) - (6)].textintval).value, (yyvsp[(3) - (6)].textintval).value, (yyvsp[(5) - (6)].timespec).tv_sec, (yyvsp[(5) - (6)].timespec).tv_nsec); -- pc->meridian = (yyvsp[(6) - (6)].intval); -+ set_hhmmss (pc, (yyvsp[-5].textintval).value, (yyvsp[-3].textintval).value, (yyvsp[-1].timespec).tv_sec, (yyvsp[-1].timespec).tv_nsec); -+ pc->meridian = (yyvsp[0].intval); - } -+#line 2015 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 22: --/* Line 1792 of yacc.c */ --#line 695 "parse-datetime.y" -+#line 696 "parse-datetime.y" /* yacc.c:1648 */ - { -- set_hhmmss (pc, (yyvsp[(1) - (2)].textintval).value, 0, 0, 0); -+ set_hhmmss (pc, (yyvsp[-1].textintval).value, 0, 0, 0); - pc->meridian = MER24; - } -+#line 2024 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 23: --/* Line 1792 of yacc.c */ --#line 700 "parse-datetime.y" -+#line 701 "parse-datetime.y" /* yacc.c:1648 */ - { -- set_hhmmss (pc, (yyvsp[(1) - (4)].textintval).value, (yyvsp[(3) - (4)].textintval).value, 0, 0); -+ set_hhmmss (pc, (yyvsp[-3].textintval).value, (yyvsp[-1].textintval).value, 0, 0); - pc->meridian = MER24; - } -+#line 2033 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 24: --/* Line 1792 of yacc.c */ --#line 705 "parse-datetime.y" -+#line 706 "parse-datetime.y" /* yacc.c:1648 */ - { -- set_hhmmss (pc, (yyvsp[(1) - (6)].textintval).value, (yyvsp[(3) - (6)].textintval).value, (yyvsp[(5) - (6)].timespec).tv_sec, (yyvsp[(5) - (6)].timespec).tv_nsec); -+ set_hhmmss (pc, (yyvsp[-5].textintval).value, (yyvsp[-3].textintval).value, (yyvsp[-1].timespec).tv_sec, (yyvsp[-1].timespec).tv_nsec); - pc->meridian = MER24; - } -+#line 2042 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 27: --/* Line 1792 of yacc.c */ --#line 718 "parse-datetime.y" -+#line 719 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->zones_seen++; -- if (! time_zone_hhmm (pc, (yyvsp[(1) - (2)].textintval), (yyvsp[(2) - (2)].intval))) YYABORT; -+ if (! time_zone_hhmm (pc, (yyvsp[-1].textintval), (yyvsp[0].intval))) YYABORT; - } -+#line 2051 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 28: --/* Line 1792 of yacc.c */ --#line 743 "parse-datetime.y" -- { pc->local_isdst = (yyvsp[(1) - (1)].intval); } -+#line 744 "parse-datetime.y" /* yacc.c:1648 */ -+ { pc->local_isdst = (yyvsp[0].intval); } -+#line 2057 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 29: --/* Line 1792 of yacc.c */ --#line 745 "parse-datetime.y" -+#line 746 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->local_isdst = 1; - pc->dsts_seen++; - } -+#line 2066 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 30: --/* Line 1792 of yacc.c */ --#line 755 "parse-datetime.y" -- { pc->time_zone = (yyvsp[(1) - (1)].intval); } -+#line 756 "parse-datetime.y" /* yacc.c:1648 */ -+ { pc->time_zone = (yyvsp[0].intval); } -+#line 2072 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 31: --/* Line 1792 of yacc.c */ --#line 757 "parse-datetime.y" -+#line 758 "parse-datetime.y" /* yacc.c:1648 */ - { pc->time_zone = HOUR (7); } -+#line 2078 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 32: --/* Line 1792 of yacc.c */ --#line 759 "parse-datetime.y" -- { pc->time_zone = (yyvsp[(1) - (2)].intval); -- if (! apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1)) YYABORT; -+#line 760 "parse-datetime.y" /* yacc.c:1648 */ -+ { pc->time_zone = (yyvsp[-1].intval); -+ if (! apply_relative_time (pc, (yyvsp[0].rel), 1)) YYABORT; - debug_print_relative_time (_("relative"), pc); - } -+#line 2087 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 33: --/* Line 1792 of yacc.c */ --#line 764 "parse-datetime.y" -+#line 765 "parse-datetime.y" /* yacc.c:1648 */ - { pc->time_zone = HOUR (7); -- if (! apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1)) YYABORT; -+ if (! apply_relative_time (pc, (yyvsp[0].rel), 1)) YYABORT; - debug_print_relative_time (_("relative"), pc); - } -+#line 2096 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 34: --/* Line 1792 of yacc.c */ --#line 769 "parse-datetime.y" -- { if (! time_zone_hhmm (pc, (yyvsp[(2) - (3)].textintval), (yyvsp[(3) - (3)].intval))) YYABORT; -- if (INT_ADD_WRAPV (pc->time_zone, (yyvsp[(1) - (3)].intval), &pc->time_zone)) YYABORT; } -+#line 770 "parse-datetime.y" /* yacc.c:1648 */ -+ { if (! time_zone_hhmm (pc, (yyvsp[-1].textintval), (yyvsp[0].intval))) YYABORT; -+ if (INT_ADD_WRAPV (pc->time_zone, (yyvsp[-2].intval), &pc->time_zone)) YYABORT; } -+#line 2103 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 35: --/* Line 1792 of yacc.c */ --#line 772 "parse-datetime.y" -- { pc->time_zone = (yyvsp[(1) - (1)].intval) + 60 * 60; } -+#line 773 "parse-datetime.y" /* yacc.c:1648 */ -+ { pc->time_zone = (yyvsp[0].intval) + 60 * 60; } -+#line 2109 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 36: --/* Line 1792 of yacc.c */ --#line 774 "parse-datetime.y" -- { pc->time_zone = (yyvsp[(1) - (2)].intval) + 60 * 60; } -+#line 775 "parse-datetime.y" /* yacc.c:1648 */ -+ { pc->time_zone = (yyvsp[-1].intval) + 60 * 60; } -+#line 2115 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 37: --/* Line 1792 of yacc.c */ --#line 779 "parse-datetime.y" -+#line 780 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->day_ordinal = 0; -- pc->day_number = (yyvsp[(1) - (1)].intval); -+ pc->day_number = (yyvsp[0].intval); - } -+#line 2124 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 38: --/* Line 1792 of yacc.c */ --#line 784 "parse-datetime.y" -+#line 785 "parse-datetime.y" /* yacc.c:1648 */ - { - pc->day_ordinal = 0; -- pc->day_number = (yyvsp[(1) - (2)].intval); -+ pc->day_number = (yyvsp[-1].intval); - } -+#line 2133 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 39: --/* Line 1792 of yacc.c */ --#line 789 "parse-datetime.y" -+#line 790 "parse-datetime.y" /* yacc.c:1648 */ - { -- pc->day_ordinal = (yyvsp[(1) - (2)].intval); -- pc->day_number = (yyvsp[(2) - (2)].intval); -+ pc->day_ordinal = (yyvsp[-1].intval); -+ pc->day_number = (yyvsp[0].intval); - pc->debug_ordinal_day_seen = true; - } -+#line 2143 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 40: --/* Line 1792 of yacc.c */ --#line 795 "parse-datetime.y" -+#line 796 "parse-datetime.y" /* yacc.c:1648 */ - { -- pc->day_ordinal = (yyvsp[(1) - (2)].textintval).value; -- pc->day_number = (yyvsp[(2) - (2)].intval); -+ pc->day_ordinal = (yyvsp[-1].textintval).value; -+ pc->day_number = (yyvsp[0].intval); - pc->debug_ordinal_day_seen = true; - } -+#line 2153 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 41: --/* Line 1792 of yacc.c */ --#line 804 "parse-datetime.y" -+#line 805 "parse-datetime.y" /* yacc.c:1648 */ - { -- pc->month = (yyvsp[(1) - (3)].textintval).value; -- pc->day = (yyvsp[(3) - (3)].textintval).value; -+ pc->month = (yyvsp[-2].textintval).value; -+ pc->day = (yyvsp[0].textintval).value; - } -+#line 2162 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 42: --/* Line 1792 of yacc.c */ --#line 809 "parse-datetime.y" -+#line 810 "parse-datetime.y" /* yacc.c:1648 */ - { - /* Interpret as YYYY/MM/DD if the first value has 4 or more digits, - otherwise as MM/DD/YY. - The goal in recognizing YYYY/MM/DD is solely to support legacy - machine-generated dates like those in an RCS log listing. If - you want portability, use the ISO 8601 format. */ -- if (4 <= (yyvsp[(1) - (5)].textintval).digits) -+ if (4 <= (yyvsp[-4].textintval).digits) - { - if (pc->parse_datetime_debug) - { -- intmax_t digits = (yyvsp[(1) - (5)].textintval).digits; -+ intmax_t digits = (yyvsp[-4].textintval).digits; - dbg_printf (_("warning: value %"PRIdMAX" has %"PRIdMAX" digits. " - "Assuming YYYY/MM/DD\n"), -- (yyvsp[(1) - (5)].textintval).value, digits); -+ (yyvsp[-4].textintval).value, digits); - } - -- pc->year = (yyvsp[(1) - (5)].textintval); -- pc->month = (yyvsp[(3) - (5)].textintval).value; -- pc->day = (yyvsp[(5) - (5)].textintval).value; -+ pc->year = (yyvsp[-4].textintval); -+ pc->month = (yyvsp[-2].textintval).value; -+ pc->day = (yyvsp[0].textintval).value; - } - else - { - if (pc->parse_datetime_debug) - dbg_printf (_("warning: value %"PRIdMAX" has less than 4 digits. " - "Assuming MM/DD/YY[YY]\n"), -- (yyvsp[(1) - (5)].textintval).value); -+ (yyvsp[-4].textintval).value); - -- pc->month = (yyvsp[(1) - (5)].textintval).value; -- pc->day = (yyvsp[(3) - (5)].textintval).value; -- pc->year = (yyvsp[(5) - (5)].textintval); -+ pc->month = (yyvsp[-4].textintval).value; -+ pc->day = (yyvsp[-2].textintval).value; -+ pc->year = (yyvsp[0].textintval); - } - } -+#line 2199 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 43: --/* Line 1792 of yacc.c */ --#line 842 "parse-datetime.y" -+#line 843 "parse-datetime.y" /* yacc.c:1648 */ - { - /* E.g., 17-JUN-1992. */ -- pc->day = (yyvsp[(1) - (3)].textintval).value; -- pc->month = (yyvsp[(2) - (3)].intval); -- if (INT_SUBTRACT_WRAPV (0, (yyvsp[(3) - (3)].textintval).value, &pc->year.value)) YYABORT; -- pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; -+ pc->day = (yyvsp[-2].textintval).value; -+ pc->month = (yyvsp[-1].intval); -+ if (INT_SUBTRACT_WRAPV (0, (yyvsp[0].textintval).value, &pc->year.value)) YYABORT; -+ pc->year.digits = (yyvsp[0].textintval).digits; - } -+#line 2211 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 44: --/* Line 1792 of yacc.c */ --#line 850 "parse-datetime.y" -+#line 851 "parse-datetime.y" /* yacc.c:1648 */ - { - /* E.g., JUN-17-1992. */ -- pc->month = (yyvsp[(1) - (3)].intval); -- if (INT_SUBTRACT_WRAPV (0, (yyvsp[(2) - (3)].textintval).value, &pc->day)) YYABORT; -- if (INT_SUBTRACT_WRAPV (0, (yyvsp[(3) - (3)].textintval).value, &pc->year.value)) YYABORT; -- pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; -+ pc->month = (yyvsp[-2].intval); -+ if (INT_SUBTRACT_WRAPV (0, (yyvsp[-1].textintval).value, &pc->day)) YYABORT; -+ if (INT_SUBTRACT_WRAPV (0, (yyvsp[0].textintval).value, &pc->year.value)) YYABORT; -+ pc->year.digits = (yyvsp[0].textintval).digits; - } -+#line 2223 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 45: --/* Line 1792 of yacc.c */ --#line 858 "parse-datetime.y" -+#line 859 "parse-datetime.y" /* yacc.c:1648 */ - { -- pc->month = (yyvsp[(1) - (2)].intval); -- pc->day = (yyvsp[(2) - (2)].textintval).value; -+ pc->month = (yyvsp[-1].intval); -+ pc->day = (yyvsp[0].textintval).value; - } -+#line 2232 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 46: --/* Line 1792 of yacc.c */ --#line 863 "parse-datetime.y" -+#line 864 "parse-datetime.y" /* yacc.c:1648 */ - { -- pc->month = (yyvsp[(1) - (4)].intval); -- pc->day = (yyvsp[(2) - (4)].textintval).value; -- pc->year = (yyvsp[(4) - (4)].textintval); -+ pc->month = (yyvsp[-3].intval); -+ pc->day = (yyvsp[-2].textintval).value; -+ pc->year = (yyvsp[0].textintval); - } -+#line 2242 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 47: --/* Line 1792 of yacc.c */ --#line 869 "parse-datetime.y" -+#line 870 "parse-datetime.y" /* yacc.c:1648 */ - { -- pc->day = (yyvsp[(1) - (2)].textintval).value; -- pc->month = (yyvsp[(2) - (2)].intval); -+ pc->day = (yyvsp[-1].textintval).value; -+ pc->month = (yyvsp[0].intval); - } -+#line 2251 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 48: --/* Line 1792 of yacc.c */ --#line 874 "parse-datetime.y" -+#line 875 "parse-datetime.y" /* yacc.c:1648 */ - { -- pc->day = (yyvsp[(1) - (3)].textintval).value; -- pc->month = (yyvsp[(2) - (3)].intval); -- pc->year = (yyvsp[(3) - (3)].textintval); -+ pc->day = (yyvsp[-2].textintval).value; -+ pc->month = (yyvsp[-1].intval); -+ pc->year = (yyvsp[0].textintval); - } -+#line 2261 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 50: --/* Line 1792 of yacc.c */ --#line 884 "parse-datetime.y" -+#line 885 "parse-datetime.y" /* yacc.c:1648 */ - { - /* ISO 8601 format. YYYY-MM-DD. */ -- pc->year = (yyvsp[(1) - (3)].textintval); -- if (INT_SUBTRACT_WRAPV (0, (yyvsp[(2) - (3)].textintval).value, &pc->month)) YYABORT; -- if (INT_SUBTRACT_WRAPV (0, (yyvsp[(3) - (3)].textintval).value, &pc->day)) YYABORT; -+ pc->year = (yyvsp[-2].textintval); -+ if (INT_SUBTRACT_WRAPV (0, (yyvsp[-1].textintval).value, &pc->month)) YYABORT; -+ if (INT_SUBTRACT_WRAPV (0, (yyvsp[0].textintval).value, &pc->day)) YYABORT; - } -+#line 2272 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 51: --/* Line 1792 of yacc.c */ --#line 894 "parse-datetime.y" -- { if (! apply_relative_time (pc, (yyvsp[(1) - (2)].rel), (yyvsp[(2) - (2)].intval))) YYABORT; } -+#line 895 "parse-datetime.y" /* yacc.c:1648 */ -+ { if (! apply_relative_time (pc, (yyvsp[-1].rel), (yyvsp[0].intval))) YYABORT; } -+#line 2278 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 52: --/* Line 1792 of yacc.c */ --#line 896 "parse-datetime.y" -- { if (! apply_relative_time (pc, (yyvsp[(1) - (1)].rel), 1)) YYABORT; } -+#line 897 "parse-datetime.y" /* yacc.c:1648 */ -+ { if (! apply_relative_time (pc, (yyvsp[0].rel), 1)) YYABORT; } -+#line 2284 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 53: --/* Line 1792 of yacc.c */ --#line 898 "parse-datetime.y" -- { if (! apply_relative_time (pc, (yyvsp[(1) - (1)].rel), 1)) YYABORT; } -+#line 899 "parse-datetime.y" /* yacc.c:1648 */ -+ { if (! apply_relative_time (pc, (yyvsp[0].rel), 1)) YYABORT; } -+#line 2290 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 54: --/* Line 1792 of yacc.c */ --#line 903 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].intval); } -+#line 904 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[-1].intval); } -+#line 2296 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 55: --/* Line 1792 of yacc.c */ --#line 905 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; } -+#line 906 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[-1].textintval).value; } -+#line 2302 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 56: --/* Line 1792 of yacc.c */ --#line 907 "parse-datetime.y" -+#line 908 "parse-datetime.y" /* yacc.c:1648 */ - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = 1; } -+#line 2308 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 57: --/* Line 1792 of yacc.c */ --#line 909 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].intval); } -+#line 910 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[-1].intval); } -+#line 2314 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 58: --/* Line 1792 of yacc.c */ --#line 911 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; } -+#line 912 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[-1].textintval).value; } -+#line 2320 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 59: --/* Line 1792 of yacc.c */ --#line 913 "parse-datetime.y" -+#line 914 "parse-datetime.y" /* yacc.c:1648 */ - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = 1; } -+#line 2326 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 60: --/* Line 1792 of yacc.c */ --#line 915 "parse-datetime.y" -+#line 916 "parse-datetime.y" /* yacc.c:1648 */ - { (yyval.rel) = RELATIVE_TIME_0; -- if (INT_MULTIPLY_WRAPV ((yyvsp[(1) - (2)].intval), (yyvsp[(2) - (2)].intval), &(yyval.rel).day)) YYABORT; } -+ if (INT_MULTIPLY_WRAPV ((yyvsp[-1].intval), (yyvsp[0].intval), &(yyval.rel).day)) YYABORT; } -+#line 2333 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 61: --/* Line 1792 of yacc.c */ --#line 918 "parse-datetime.y" -+#line 919 "parse-datetime.y" /* yacc.c:1648 */ - { (yyval.rel) = RELATIVE_TIME_0; -- if (INT_MULTIPLY_WRAPV ((yyvsp[(1) - (2)].textintval).value, (yyvsp[(2) - (2)].intval), &(yyval.rel).day)) YYABORT; } -+ if (INT_MULTIPLY_WRAPV ((yyvsp[-1].textintval).value, (yyvsp[0].intval), &(yyval.rel).day)) YYABORT; } -+#line 2340 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 62: --/* Line 1792 of yacc.c */ --#line 921 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); } -+#line 922 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[0].intval); } -+#line 2346 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 63: --/* Line 1792 of yacc.c */ --#line 923 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].intval); } -+#line 924 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[-1].intval); } -+#line 2352 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 64: --/* Line 1792 of yacc.c */ --#line 925 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; } -+#line 926 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[-1].textintval).value; } -+#line 2358 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 65: --/* Line 1792 of yacc.c */ --#line 927 "parse-datetime.y" -+#line 928 "parse-datetime.y" /* yacc.c:1648 */ - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = 1; } -+#line 2364 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 66: --/* Line 1792 of yacc.c */ --#line 929 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].intval); } -+#line 930 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[-1].intval); } -+#line 2370 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 67: --/* Line 1792 of yacc.c */ --#line 931 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; } -+#line 932 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[-1].textintval).value; } -+#line 2376 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 68: --/* Line 1792 of yacc.c */ --#line 933 "parse-datetime.y" -+#line 934 "parse-datetime.y" /* yacc.c:1648 */ - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = 1; } -+#line 2382 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 69: --/* Line 1792 of yacc.c */ --#line 935 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].intval); } -+#line 936 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[-1].intval); } -+#line 2388 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 70: --/* Line 1792 of yacc.c */ --#line 937 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; } -+#line 938 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[-1].textintval).value; } -+#line 2394 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 71: --/* Line 1792 of yacc.c */ --#line 939 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; } -+#line 940 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[-1].timespec).tv_sec; (yyval.rel).ns = (yyvsp[-1].timespec).tv_nsec; } -+#line 2400 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 72: --/* Line 1792 of yacc.c */ --#line 941 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; } -+#line 942 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[-1].timespec).tv_sec; (yyval.rel).ns = (yyvsp[-1].timespec).tv_nsec; } -+#line 2406 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 73: --/* Line 1792 of yacc.c */ --#line 943 "parse-datetime.y" -+#line 944 "parse-datetime.y" /* yacc.c:1648 */ - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = 1; } -+#line 2412 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 75: --/* Line 1792 of yacc.c */ --#line 949 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; } -+#line 950 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[-1].textintval).value; } -+#line 2418 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 76: --/* Line 1792 of yacc.c */ --#line 951 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; } -+#line 952 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[-1].textintval).value; } -+#line 2424 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 77: --/* Line 1792 of yacc.c */ --#line 953 "parse-datetime.y" -+#line 954 "parse-datetime.y" /* yacc.c:1648 */ - { (yyval.rel) = RELATIVE_TIME_0; -- if (INT_MULTIPLY_WRAPV ((yyvsp[(1) - (2)].textintval).value, (yyvsp[(2) - (2)].intval), &(yyval.rel).day)) YYABORT; } -+ if (INT_MULTIPLY_WRAPV ((yyvsp[-1].textintval).value, (yyvsp[0].intval), &(yyval.rel).day)) YYABORT; } -+#line 2431 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 78: --/* Line 1792 of yacc.c */ --#line 956 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; } -+#line 957 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[-1].textintval).value; } -+#line 2437 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 79: --/* Line 1792 of yacc.c */ --#line 958 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; } -+#line 959 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[-1].textintval).value; } -+#line 2443 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 80: --/* Line 1792 of yacc.c */ --#line 960 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; } -+#line 961 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[-1].textintval).value; } -+#line 2449 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 81: --/* Line 1792 of yacc.c */ --#line 965 "parse-datetime.y" -- { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); } -+#line 966 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[0].intval); } -+#line 2455 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 85: --/* Line 1792 of yacc.c */ --#line 973 "parse-datetime.y" -- { if (time_overflow ((yyvsp[(1) - (1)].textintval).value)) YYABORT; -- (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; } -+#line 974 "parse-datetime.y" /* yacc.c:1648 */ -+ { if (time_overflow ((yyvsp[0].textintval).value)) YYABORT; -+ (yyval.timespec).tv_sec = (yyvsp[0].textintval).value; (yyval.timespec).tv_nsec = 0; } -+#line 2462 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 87: --/* Line 1792 of yacc.c */ --#line 980 "parse-datetime.y" -- { if (time_overflow ((yyvsp[(1) - (1)].textintval).value)) YYABORT; -- (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; } -+#line 981 "parse-datetime.y" /* yacc.c:1648 */ -+ { if (time_overflow ((yyvsp[0].textintval).value)) YYABORT; -+ (yyval.timespec).tv_sec = (yyvsp[0].textintval).value; (yyval.timespec).tv_nsec = 0; } -+#line 2469 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 88: --/* Line 1792 of yacc.c */ --#line 986 "parse-datetime.y" -- { digits_to_date_time (pc, (yyvsp[(1) - (1)].textintval)); } -+#line 987 "parse-datetime.y" /* yacc.c:1648 */ -+ { digits_to_date_time (pc, (yyvsp[0].textintval)); } -+#line 2475 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 89: --/* Line 1792 of yacc.c */ --#line 991 "parse-datetime.y" -+#line 992 "parse-datetime.y" /* yacc.c:1648 */ - { - /* Hybrid all-digit and relative offset, so that we accept e.g., - "YYYYMMDD +N days" as well as "YYYYMMDD N days". */ -- digits_to_date_time (pc, (yyvsp[(1) - (2)].textintval)); -- if (! apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1)) YYABORT; -+ digits_to_date_time (pc, (yyvsp[-1].textintval)); -+ if (! apply_relative_time (pc, (yyvsp[0].rel), 1)) YYABORT; - } -+#line 2486 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 90: --/* Line 1792 of yacc.c */ --#line 1001 "parse-datetime.y" -+#line 1002 "parse-datetime.y" /* yacc.c:1648 */ - { (yyval.intval) = -1; } -+#line 2492 "parse-datetime.c" /* yacc.c:1648 */ - break; - - case 91: --/* Line 1792 of yacc.c */ --#line 1003 "parse-datetime.y" -- { (yyval.intval) = (yyvsp[(2) - (2)].textintval).value; } -+#line 1004 "parse-datetime.y" /* yacc.c:1648 */ -+ { (yyval.intval) = (yyvsp[0].textintval).value; } -+#line 2498 "parse-datetime.c" /* yacc.c:1648 */ - break; - - --/* Line 1792 of yacc.c */ --#line 2676 "parse-datetime.c" -+#line 2502 "parse-datetime.c" /* yacc.c:1648 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires -@@ -2694,7 +2520,7 @@ yyreduce: - - *++yyvsp = yyval; - -- /* Now `shift' the result of the reduction. Determine what state -+ /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - -@@ -2709,9 +2535,9 @@ yyreduce: - goto yynewstate; - - --/*------------------------------------. --| yyerrlab -- here on detecting error | --`------------------------------------*/ -+/*--------------------------------------. -+| yyerrlab -- here on detecting error. | -+`--------------------------------------*/ - yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ -@@ -2762,20 +2588,20 @@ yyerrlab: - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an -- error, discard it. */ -+ error, discard it. */ - - if (yychar <= YYEOF) -- { -- /* Return failure if at end of input. */ -- if (yychar == YYEOF) -- YYABORT; -- } -+ { -+ /* Return failure if at end of input. */ -+ if (yychar == YYEOF) -+ YYABORT; -+ } - else -- { -- yydestruct ("Error: discarding", -- yytoken, &yylval, pc); -- yychar = YYEMPTY; -- } -+ { -+ yydestruct ("Error: discarding", -+ yytoken, &yylval, pc); -+ yychar = YYEMPTY; -+ } - } - - /* Else will try to reuse lookahead token after shifting the error -@@ -2794,7 +2620,7 @@ yyerrorlab: - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - -- /* Do not reclaim the symbols of the rule which action triggered -+ /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; -@@ -2807,29 +2633,29 @@ yyerrorlab: - | yyerrlab1 -- common code for both syntax error and YYERROR. | - `-------------------------------------------------------------*/ - yyerrlab1: -- yyerrstatus = 3; /* Each real token shifted decrements this. */ -+ yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) -- { -- yyn += YYTERROR; -- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) -- { -- yyn = yytable[yyn]; -- if (0 < yyn) -- break; -- } -- } -+ { -+ yyn += YYTERROR; -+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) -+ { -+ yyn = yytable[yyn]; -+ if (0 < yyn) -+ break; -+ } -+ } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) -- YYABORT; -+ YYABORT; - - - yydestruct ("Error: popping", -- yystos[yystate], yyvsp, pc); -+ yystos[yystate], yyvsp, pc); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); -@@ -2880,14 +2706,14 @@ yyreturn: - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, pc); - } -- /* Do not reclaim the symbols of the rule which action triggered -+ /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", -- yystos[*yyssp], yyvsp, pc); -+ yystos[*yyssp], yyvsp, pc); - YYPOPSTACK (1); - } - #ifndef yyoverflow -@@ -2898,13 +2724,9 @@ yyreturn: - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - #endif -- /* Make sure YYID is used. */ -- return YYID (yyresult); -+ return yyresult; - } -- -- --/* Line 2055 of yacc.c */ --#line 1006 "parse-datetime.y" -+#line 1007 "parse-datetime.y" /* yacc.c:1907 */ - - - static table const meridian_table[] = -@@ -3316,6 +3138,7 @@ yylex (union YYSTYPE *lvalp, parser_control *pc) - - for (;;) - { -+ ptrdiff_t count; - while (c = *pc->input, c_isspace (c)) - pc->input++; - -@@ -3433,7 +3256,7 @@ yylex (union YYSTYPE *lvalp, parser_control *pc) - if (c != '(') - return to_uchar (*pc->input++); - -- ptrdiff_t count = 0; -+ count = 0; - do - { - c = *pc->input++; -@@ -3512,12 +3335,12 @@ debug_strfdatetime (struct tm const *tm, parser_control const *pc, - if (pc && m < n && pc->zones_seen) - { - int tz = pc->time_zone; -+ char time_zone_buf[TIME_ZONE_BUFSIZE]; - - /* Account for DST if tLOCAL_ZONE was seen. */ - if (pc->local_zones_seen && !pc->zones_seen && 0 < pc->local_isdst) - tz += 60 * 60; - -- char time_zone_buf[TIME_ZONE_BUFSIZE]; - snprintf (&buf[m], n - m, " TZ=%s", time_zone_str (tz, time_zone_buf)); - } - return buf; -@@ -3615,9 +3438,10 @@ parse_datetime (struct timespec *result, char const *p, - { - char const *tzstring = getenv ("TZ"); - timezone_t tz = tzalloc (tzstring); -+ bool ok; - if (!tz) - return false; -- bool ok = parse_datetime2 (result, p, now, 0, tz, tzstring); -+ ok = parse_datetime2 (result, p, now, 0, tz, tzstring); - tzfree (tz); - return ok; - } -@@ -3644,6 +3468,12 @@ parse_datetime2 (struct timespec *result, char const *p, - Use heap allocation if TZ's length exceeds this. */ - enum { TZBUFSIZE = 100 }; - char tz1buf[TZBUFSIZE]; -+ time_t Start; -+ int Start_ns; -+ unsigned char c; -+ timezone_t tz; -+ struct tm tmp; -+ parser_control pc; - - struct timespec gettime_buffer; - if (! now) -@@ -3652,14 +3482,13 @@ parse_datetime2 (struct timespec *result, char const *p, - now = &gettime_buffer; - } - -- time_t Start = now->tv_sec; -- int Start_ns = now->tv_nsec; -+ Start = now->tv_sec; -+ Start_ns = now->tv_nsec; - -- unsigned char c; - while (c = *p, c_isspace (c)) - p++; - -- timezone_t tz = tzdefault; -+ tz = tzdefault; - - /* Store a local copy prior to first "goto". Without this, a prior use - below of RELATIVE_TIME_0 on the RHS might translate to an assignment- -@@ -3709,7 +3538,6 @@ parse_datetime2 (struct timespec *result, char const *p, - } - } - -- struct tm tmp; - if (! localtime_rz (tz, &now->tv_sec, &tmp)) - goto fail; - -@@ -3719,7 +3547,6 @@ parse_datetime2 (struct timespec *result, char const *p, - if (*p == '\0') - p = "0"; - -- parser_control pc; - pc.input = p; - pc.parse_datetime_debug = (flags & PARSE_DATETIME_DEBUG) != 0; - if (INT_ADD_WRAPV (tmp.tm_year, TM_YEAR_BASE, &pc.year.value)) -@@ -3769,11 +3596,12 @@ parse_datetime2 (struct timespec *result, char const *p, - for (quarter = 1; quarter <= 3; quarter++) - { - intmax_t iprobe; -+ time_t probe; -+ struct tm probe_tm; - if (INT_ADD_WRAPV (Start, quarter * (90 * 24 * 60 * 60), &iprobe) - || time_overflow (iprobe)) - break; -- time_t probe = iprobe; -- struct tm probe_tm; -+ probe = iprobe; - if (localtime_rz (tz, &probe, &probe_tm) && probe_tm.tm_zone - && probe_tm.tm_isdst != pc.local_time_zone_table[0].value) - { -@@ -3870,6 +3698,8 @@ parse_datetime2 (struct timespec *result, char const *p, - *result = pc.seconds; - else - { -+ char dbg_ord[DBGBUFSIZE]; -+ - if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen - | (pc.local_zones_seen + pc.zones_seen))) - { -@@ -3962,9 +3792,10 @@ parse_datetime2 (struct timespec *result, char const *p, - by setting TZ="XXX1:00" and try mktime again. */ - - char tz2buf[sizeof "XXX" - 1 + TIME_ZONE_BUFSIZE]; -+ timezone_t tz2; - tz2buf[0] = tz2buf[1] = tz2buf[2] = 'X'; - time_zone_str (pc.time_zone, &tz2buf[3]); -- timezone_t tz2 = tzalloc (tz2buf); -+ tz2 = tzalloc (tz2buf); - if (!tz2) - { - if (pc.parse_datetime_debug) -@@ -3991,8 +3822,6 @@ parse_datetime2 (struct timespec *result, char const *p, - } - } - -- char dbg_ord[DBGBUFSIZE]; -- - if (pc.days_seen && ! pc.dates_seen) - { - intmax_t dayincr; -@@ -4048,6 +3877,7 @@ parse_datetime2 (struct timespec *result, char const *p, - /* Add relative date. */ - if (pc.rel.year | pc.rel.month | pc.rel.day) - { -+ int year, month, day; - if (pc.parse_datetime_debug) - { - if ((pc.rel.year != 0 || pc.rel.month != 0) && tm.tm_mday != 15) -@@ -4060,7 +3890,6 @@ parse_datetime2 (struct timespec *result, char const *p, - "it is recommended to specify noon\n")); - } - -- int year, month, day; - if (INT_ADD_WRAPV (tm.tm_year, pc.rel.year, &year) - || INT_ADD_WRAPV (tm.tm_mon, pc.rel.month, &month) - || INT_ADD_WRAPV (tm.tm_mday, pc.rel.day, &day)) -@@ -4131,9 +3960,9 @@ parse_datetime2 (struct timespec *result, char const *p, - && (tm.tm_mday != day - || (pc.rel.month == 0 && tm.tm_mon != month))) - { -+ char tm_year_buf[TM_YEAR_BUFSIZE]; - dbg_printf (_("warning: month/year adjustment resulted in " - "shifted dates:\n")); -- char tm_year_buf[TM_YEAR_BUFSIZE]; - dbg_printf (_(" adjusted Y M D: %s %02d %02d\n"), - tm_year_str (year, tm_year_buf), month + 1, day); - dbg_printf (_(" normalized Y M D: %s %02d %02d\n"), -@@ -4213,6 +4042,7 @@ parse_datetime2 (struct timespec *result, char const *p, - if (pc.parse_datetime_debug - && (pc.rel.hour | pc.rel.minutes | pc.rel.seconds | pc.rel.ns)) - { -+ struct tm lmt; - dbg_printf (_("after time adjustment (%+"PRIdMAX" hours, " - "%+"PRIdMAX" minutes, " - "%+"PRIdMAX" seconds, %+d ns),\n"), -@@ -4231,7 +4061,6 @@ parse_datetime2 (struct timespec *result, char const *p, - places. - - 'tm.tm_isdst' contains the date after date adjustment. */ -- struct tm lmt; - if (tm.tm_isdst != -1 && localtime_rz (tz, &result->tv_sec, &lmt) - && tm.tm_isdst != lmt.tm_isdst) - dbg_printf (_("warning: daylight saving time changed after " -@@ -4242,6 +4071,10 @@ parse_datetime2 (struct timespec *result, char const *p, - - if (pc.parse_datetime_debug) - { -+ intmax_t sec; -+ int nsec; -+ struct tm gmt, lmt; -+ bool got_utc; - /* Special case: using 'date -u' simply set TZ=UTC0 */ - if (! tzstring) - dbg_printf (_("timezone: system default\n")); -@@ -4250,13 +4083,12 @@ parse_datetime2 (struct timespec *result, char const *p, - else - dbg_printf (_("timezone: TZ=\"%s\" environment value\n"), tzstring); - -- intmax_t sec = result->tv_sec; -- int nsec = result->tv_nsec; -+ sec = result->tv_sec; -+ nsec = result->tv_nsec; - dbg_printf (_("final: %"PRIdMAX".%09d (epoch-seconds)\n"), - sec, nsec); - -- struct tm gmt, lmt; -- bool got_utc = !!gmtime_r (&result->tv_sec, &gmt); -+ got_utc = !!gmtime_r (&result->tv_sec, &gmt); - if (got_utc) - dbg_printf (_("final: %s (UTC)\n"), - debug_strfdatetime (&gmt, NULL, --- -2.19.1 - - -From d4774dba0a27f8900aa594c63f8ff1900b29a15d Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Sun, 31 Mar 2019 13:33:43 +0200 -Subject: more gcc2 patch. - - -diff --git a/gnu/filenamecat-lgpl.c b/gnu/filenamecat-lgpl.c -index 98b105a..854a4d0 100644 ---- a/gnu/filenamecat-lgpl.c -+++ b/gnu/filenamecat-lgpl.c -@@ -51,6 +51,8 @@ mfile_name_concat (char const *dir, char const *base, char **base_in_result) - size_t dirlen = dirbase - dir + dirbaselen; - size_t baselen = strlen (base); - char sep = '\0'; -+ char *p_concat; -+ char *p; - if (dirbaselen) - { - /* DIR is not a file system root, so separate with / if needed. */ -@@ -67,8 +69,7 @@ mfile_name_concat (char const *dir, char const *base, char **base_in_result) - sep = '.'; - } - -- char *p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); -- char *p; -+ p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); - - if (p_concat == NULL) - return NULL; -diff --git a/gnu/mktime.c b/gnu/mktime.c -index d411aa7..78aa713 100644 ---- a/gnu/mktime.c -+++ b/gnu/mktime.c -@@ -274,6 +274,9 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), - long_int t1 = (*t < mktime_min ? mktime_min - : *t <= mktime_max ? *t : mktime_max); - struct tm *r = convert_time (convert, t1, tp); -+ long_int bad; -+ long_int ok; -+ struct tm oktm; oktm.tm_sec = -1; - if (r) - { - *t = t1; -@@ -282,9 +285,8 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), - if (errno != EOVERFLOW) - return NULL; - -- long_int bad = t1; -- long_int ok = 0; -- struct tm oktm; oktm.tm_sec = -1; -+ bad = t1; -+ ok = 0; - - /* BAD is a known out-of-range value, and OK is a known in-range one. - Use binary search to narrow the range between BAD and OK until -@@ -366,6 +368,8 @@ __mktime_internal (struct tm *tp, - int negative_offset_guess; - - int sec_requested = sec; -+ long_int t0; -+ long_int t, t1, t2; - - if (LEAP_SECONDS_POSSIBLE) - { -@@ -381,18 +385,19 @@ __mktime_internal (struct tm *tp, - time. */ - - INT_SUBTRACT_WRAPV (0, off, &negative_offset_guess); -- long_int t0 = ydhms_diff (year, yday, hour, min, sec, -+ t0 = ydhms_diff (year, yday, hour, min, sec, - EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - negative_offset_guess); -- long_int t = t0, t1 = t0, t2 = t0; -+ t = t0, t1 = t0, t2 = t0; - - /* Repeatedly use the error to improve the guess. */ - - while (true) - { -+ long_int dt; - if (! ranged_convert (convert, &t, &tm)) - return -1; -- long_int dt = tm_diff (year, yday, hour, min, sec, &tm); -+ dt = tm_diff (year, yday, hour, min, sec, &tm); - if (dt == 0) - break; - -@@ -524,13 +529,15 @@ __mktime_internal (struct tm *tp, - time_t - mktime (struct tm *tp) - { -+# if defined _LIBC || NEED_MKTIME_WORKING -+ static mktime_offset_t localtime_offset; -+# endif - /* POSIX.1 8.1.1 requires that whenever mktime() is called, the - time zone names contained in the external variable 'tzname' shall - be set as if the tzset() function had been called. */ - __tzset (); - - # if defined _LIBC || NEED_MKTIME_WORKING -- static mktime_offset_t localtime_offset; - return __mktime_internal (tp, __localtime_r, &localtime_offset); - # else - # undef mktime -diff --git a/gnu/opendirat.c b/gnu/opendirat.c -index ad63131..ddcec78 100644 ---- a/gnu/opendirat.c -+++ b/gnu/opendirat.c -@@ -38,10 +38,11 @@ opendirat (int dir_fd, char const *dir, int extra_flags, int *pnew_fd) - int open_flags = (O_RDONLY | O_CLOEXEC | O_DIRECTORY | O_NOCTTY - | O_NONBLOCK | extra_flags); - int new_fd = openat (dir_fd, dir, open_flags); -+ DIR *dirp; - - if (new_fd < 0) - return NULL; -- DIR *dirp = fdopendir (new_fd); -+ dirp = fdopendir (new_fd); - if (dirp) - *pnew_fd = new_fd; - else -diff --git a/gnu/parse-datetime.c b/gnu/parse-datetime.c -index 4614822..86b9a21 100644 ---- a/gnu/parse-datetime.c -+++ b/gnu/parse-datetime.c -@@ -3475,6 +3475,11 @@ parse_datetime2 (struct timespec *result, char const *p, - struct tm tmp; - parser_control pc; - -+ /* Store a local copy prior to first "goto". Without this, a prior use -+ below of RELATIVE_TIME_0 on the RHS might translate to an assignment- -+ to-temporary, which would trigger a -Wjump-misses-init warning. */ -+ const relative_time rel_time_0 = RELATIVE_TIME_0; -+ - struct timespec gettime_buffer; - if (! now) - { -@@ -3490,11 +3495,6 @@ parse_datetime2 (struct timespec *result, char const *p, - - tz = tzdefault; - -- /* Store a local copy prior to first "goto". Without this, a prior use -- below of RELATIVE_TIME_0 on the RHS might translate to an assignment- -- to-temporary, which would trigger a -Wjump-misses-init warning. */ -- const relative_time rel_time_0 = RELATIVE_TIME_0; -- - if (strncmp (p, "TZ=\"", 4) == 0) - { - char const *tzbase = p + 4; -diff --git a/gnu/parse-datetime.y b/gnu/parse-datetime.y -index 91793d7..a98e78a 100644 ---- a/gnu/parse-datetime.y -+++ b/gnu/parse-datetime.y -@@ -1752,6 +1752,11 @@ parse_datetime2 (struct timespec *result, char const *p, - struct tm tmp; - parser_control pc; - -+ /* Store a local copy prior to first "goto". Without this, a prior use -+ below of RELATIVE_TIME_0 on the RHS might translate to an assignment- -+ to-temporary, which would trigger a -Wjump-misses-init warning. */ -+ const relative_time rel_time_0 = RELATIVE_TIME_0; -+ - struct timespec gettime_buffer; - if (! now) - { -@@ -1767,11 +1772,6 @@ parse_datetime2 (struct timespec *result, char const *p, - - tz = tzdefault; - -- /* Store a local copy prior to first "goto". Without this, a prior use -- below of RELATIVE_TIME_0 on the RHS might translate to an assignment- -- to-temporary, which would trigger a -Wjump-misses-init warning. */ -- const relative_time rel_time_0 = RELATIVE_TIME_0; -- - if (strncmp (p, "TZ=\"", 4) == 0) - { - char const *tzbase = p + 4; -diff --git a/gnu/regexec.c b/gnu/regexec.c -index 21cf791..d800a69 100644 ---- a/gnu/regexec.c -+++ b/gnu/regexec.c -@@ -3302,6 +3302,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) - re_node_set dests_node[SBC_MAX]; - bitset_t dests_ch[SBC_MAX]; - } *dests_alloc; -+ size_t ndests_max; - - /* We build DFA states which corresponds to the destination nodes - from 'state'. 'dests_node[i]' represents the nodes which i-th -@@ -3346,7 +3347,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) - goto out_free; - - /* Avoid arithmetic overflow in size calculation. */ -- size_t ndests_max -+ ndests_max - = ((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) - / (3 * sizeof (re_dfastate_t *))); - if (__glibc_unlikely (ndests_max < ndests)) -diff --git a/lib/wordsplit.h b/lib/wordsplit.h -index ff7f6e3..415814f 100644 ---- a/lib/wordsplit.h -+++ b/lib/wordsplit.h -@@ -61,12 +61,10 @@ struct wordsplit - void (*ws_alloc_die) (wordsplit_t *wsp); - /* [Input] (WRDSF_ALLOC_DIE) Function called when - out of memory. Must not return. */ -- void (*ws_error) (const char *, ...) -- __attribute__ ((__format__ (__printf__, 1, 2))); -+ void (*ws_error) (const char *, ...); - /* [Input] (WRDSF_ERROR) Function used for error - reporting */ -- void (*ws_debug) (const char *, ...) -- __attribute__ ((__format__ (__printf__, 1, 2))); -+ void (*ws_debug) (const char *, ...); - /* [Input] (WRDSF_DEBUG) Function used for debug - output. */ - const char **ws_env; /* [Input] (WRDSF_ENV, !WRDSF_NOVAR) Array of --- -2.19.1 - diff --git a/app-arch/tar/patches/tar-1.32.patchset b/app-arch/tar/patches/tar-1.33.patchset similarity index 79% rename from app-arch/tar/patches/tar-1.32.patchset rename to app-arch/tar/patches/tar-1.33.patchset index 7326f9473..4bd56954d 100644 --- a/app-arch/tar/patches/tar-1.32.patchset +++ b/app-arch/tar/patches/tar-1.33.patchset @@ -1,11 +1,11 @@ -From 25395e3fa0b01a898b6e6ae456c8eef3c66849f1 Mon Sep 17 00:00:00 2001 +From a691dbde5db1ae1cb1c000be7e399e95737b061a Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Thu, 20 Mar 2014 14:52:58 +0100 Subject: Implement replace-hardlinks option diff --git a/src/common.h b/src/common.h -index 501e0d3..60e1ff4 100644 +index 5d07956..c70608f 100644 --- a/src/common.h +++ b/src/common.h @@ -197,6 +197,8 @@ GLOBAL enum old_files old_files_option; @@ -18,7 +18,7 @@ index 501e0d3..60e1ff4 100644 GLOBAL const char *listed_incremental_option; /* Incremental dump level */ diff --git a/src/extract.c b/src/extract.c -index 8276f8f..da0962d 100644 +index d6d98cb..f63ee68 100644 --- a/src/extract.c +++ b/src/extract.c @@ -32,6 +32,8 @@ static bool we_are_root; /* true if our effective uid == 0 */ @@ -30,12 +30,14 @@ index 8276f8f..da0962d 100644 #define ALL_MODE_BITS ((mode_t) ~ (mode_t) 0) #if ! HAVE_FCHMOD && ! defined fchmod -@@ -1336,6 +1338,38 @@ extract_link (char *file_name, int typeflag) +@@ -1458,7 +1460,39 @@ extract_link (char *file_name, int typeflag) char const *link_name; int rc; - -+ if (simulate_hardlinks_option) -+ { + struct delayed_link *dl; +- ++ ++ if (simulate_hardlinks_option) ++ { + /* symlinks have to be normalized */ + const char* f = file_name; + const char* l = current_stat_info.link_name; @@ -43,7 +45,7 @@ index 8276f8f..da0962d 100644 + int p_count = 0; + char *link_name = (char*) xmalloc(strlen(current_stat_info.link_name) * 2); + -+ for (; *f && *l; f++, l++) ++ for (; *f && *l; f++, l++) + { + if (*f != *l) + break; @@ -69,7 +71,7 @@ index 8276f8f..da0962d 100644 link_name = current_stat_info.link_name; if (! absolute_names_option && contains_dot_dot (link_name)) -@@ -1425,6 +1459,13 @@ extract_symlink (char *file_name, int typeflag) +@@ -1551,6 +1585,13 @@ extract_symlink (char *file_name, int typeflag) #else static int warned_once; @@ -84,19 +86,20 @@ index 8276f8f..da0962d 100644 { warned_once = 1; diff --git a/src/tar.c b/src/tar.c -index d66fed8..23027d2 100644 +index 728e38b..21098df 100644 --- a/src/tar.c +++ b/src/tar.c -@@ -449,6 +449,8 @@ static struct argp_option options[] = { +@@ -501,6 +501,9 @@ static struct argp_option options[] = { {"check-device", CHECK_DEVICE_OPTION, NULL, 0, N_("check device numbers when creating incremental archives (default)"), - GRID+1 }, + GRID_MODIFIER }, + {"replace-hardlinks", 'Q', 0, 0, -+ N_("replace hardlinks with corresponding symlink when extracting"), GRID+1 }, - #undef GRID ++ N_("replace hardlinks with corresponding symlink when extracting"), ++ GRID_MODIFIER }, - #define GRID 30 -@@ -1728,6 +1730,10 @@ parse_opt (int key, char *arg, struct argp_state *state) + {NULL, 0, NULL, 0, + N_("Overwrite control:"), GRH_OVERWRITE }, +@@ -1837,6 +1840,10 @@ parse_opt (int key, char *arg, struct argp_state *state) set_archive_format (arg); break; @@ -107,7 +110,7 @@ index d66fed8..23027d2 100644 case INDEX_FILE_OPTION: index_file_name = arg; break; -@@ -2245,6 +2251,7 @@ decode_options (int argc, char **argv) +@@ -2288,6 +2295,7 @@ decode_options (int argc, char **argv) unquote_option = true; tar_sparse_major = 1; tar_sparse_minor = 0; @@ -116,5 +119,5 @@ index d66fed8..23027d2 100644 savedir_sort_order = SAVEDIR_SORT_NONE; -- -2.28.0 +2.30.0 diff --git a/app-arch/tar/tar-1.32.recipe b/app-arch/tar/tar-1.33.recipe similarity index 63% rename from app-arch/tar/tar-1.32.recipe rename to app-arch/tar/tar-1.33.recipe index fc59c1593..b4d69d34e 100644 --- a/app-arch/tar/tar-1.32.recipe +++ b/app-arch/tar/tar-1.33.recipe @@ -12,35 +12,43 @@ archives)." HOMEPAGE="https://www.gnu.org/software/tar/" COPYRIGHT="1990-2018 Free Software Foundation, Inc." LICENSE="GNU GPL v3" -REVISION="2" +REVISION="1" SOURCE_URI="https://ftpmirror.gnu.org/tar/tar-$portVersion.tar.bz2 https://ftp.gnu.org/gnu/tar/tar-$portVersion.tar.bz2" -CHECKSUM_SHA256="e4bb9e08e12e7fa9f11fef544efc85e59ba34538593d9ad38148c7ca2bfbb566" +CHECKSUM_SHA256="85b6953f4bc9666eb7db61b48f150dca21b941d85090171ea8c4f89902e460af" PATCHES="tar-$portVersion.patchset" -if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then - PATCHES+=" - tar-$portVersion-gcc2.patchset + +ARCHITECTURES="!x86_gcc2 x86 x86_64 arm" +SECONDARY_ARCHITECTURES="x86" + +commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +PROVIDES=" + tar$secondaryArchSuffix = $portVersion compat >= 1 + cmd:tar$commandSuffix = $portVersion compat >= 1 + " +REQUIRES=" + haiku$secondaryArchSuffix + " +if [ "$targetArchitecture" = x86_gcc2 ]; then + REPLACES=" + tar " fi -ARCHITECTURES="x86_gcc2 x86 x86_64 arm" - -PROVIDES=" - tar = $portVersion compat >= 1 - cmd:tar = $portVersion compat >= 1 - " -REQUIRES=" - haiku - " - BUILD_REQUIRES=" - haiku_devel + haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" cmd:automake cmd:autoreconf - cmd:gcc - cmd:ld + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix cmd:make cmd:sed " @@ -59,11 +67,11 @@ TEST_REQUIRES+=" " fi -defineDebugInfoPackage tar $binDir/tar +defineDebugInfoPackage tar$secondaryArchSuffix $commandBinDir/tar BUILD() { - runConfigure ./configure \ + runConfigure --omit-dirs binDir ./configure --bindir=$commandBinDir \ --disable-nls \ --disable-gcc-warnings \ LDFLAGS="-lnetwork" CFLAGS="-D_BSD_SOURCE" \ @@ -78,5 +86,7 @@ INSTALL() TEST() { +#x86_64 +#testsuite: 23 24 25 55 98 100 104 105 109 110 112 115 120 123 126 127 132 133 134 137 141 142 154 156 183 failed make check }