summaryrefslogtreecommitdiff
path: root/libmisc
diff options
context:
space:
mode:
Diffstat (limited to 'libmisc')
-rw-r--r--libmisc/Makefile.in52
-rw-r--r--libmisc/copydir.c3
-rw-r--r--libmisc/getdate.c411
-rw-r--r--libmisc/utmp.c10
4 files changed, 205 insertions, 271 deletions
diff --git a/libmisc/Makefile.in b/libmisc/Makefile.in
index c6c0eb5..4891360 100644
--- a/libmisc/Makefile.in
+++ b/libmisc/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,23 @@
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -85,12 +102,17 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+ --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS)
YLWRAP = $(top_srcdir)/ylwrap
SOURCES = $(libmisc_a_SOURCES)
DIST_SOURCES = $(libmisc_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -109,6 +131,7 @@ CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -154,6 +177,7 @@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
@@ -178,7 +202,6 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-U = @U@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
@@ -193,6 +216,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -225,7 +249,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -343,7 +366,7 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libmisc.a: $(libmisc_a_OBJECTS) $(libmisc_a_DEPENDENCIES)
+libmisc.a: $(libmisc_a_OBJECTS) $(libmisc_a_DEPENDENCIES) $(EXTRA_libmisc_a_DEPENDENCIES)
-rm -f libmisc.a
$(libmisc_a_AR) libmisc.a $(libmisc_a_OBJECTS) $(libmisc_a_LIBADD)
$(RANLIB) libmisc.a
@@ -539,10 +562,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/libmisc/copydir.c b/libmisc/copydir.c
index 3b6ed9c..958b710 100644
--- a/libmisc/copydir.c
+++ b/libmisc/copydir.c
@@ -32,7 +32,7 @@
#include <config.h>
-#ident "$Id: copydir.c 3655 2011-12-09 22:13:02Z nekral-guest $"
+#ident "$Id: copydir.c 3706 2012-02-13 19:16:29Z nekral-guest $"
#include <assert.h>
#include <sys/stat.h>
@@ -46,6 +46,7 @@
#include <selinux/selinux.h>
#endif /* WITH_SELINUX */
#if defined(WITH_ACL) || defined(WITH_ATTR)
+#include <stdarg.h>
#include <attr/error_context.h>
#endif /* WITH_ACL || WITH_ATTR */
#ifdef WITH_ACL
diff --git a/libmisc/getdate.c b/libmisc/getdate.c
index 9d5a0ce..f637522 100644
--- a/libmisc/getdate.c
+++ b/libmisc/getdate.c
@@ -1,23 +1,24 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+
+ 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.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -28,7 +29,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. */
@@ -46,7 +47,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -54,20 +55,57 @@
/* Pure parsers. */
#define YYPURE 0
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
/* Using locations. */
#define YYLSP_NEEDED 0
-/* Copy the first part of user declarations. */
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ tAGO = 258,
+ tDAY = 259,
+ tDAY_UNIT = 260,
+ tDAYZONE = 261,
+ tDST = 262,
+ tHOUR_UNIT = 263,
+ tID = 264,
+ tMERIDIAN = 265,
+ tMINUTE_UNIT = 266,
+ tMONTH = 267,
+ tMONTH_UNIT = 268,
+ tSEC_UNIT = 269,
+ tSNUMBER = 270,
+ tUNUMBER = 271,
+ tYEAR_UNIT = 272,
+ tZONE = 273
+ };
+#endif
+/* Tokens. */
+#define tAGO 258
+#define tDAY 259
+#define tDAY_UNIT 260
+#define tDAYZONE 261
+#define tDST 262
+#define tHOUR_UNIT 263
+#define tID 264
+#define tMERIDIAN 265
+#define tMINUTE_UNIT 266
+#define tMONTH 267
+#define tMONTH_UNIT 268
+#define tSEC_UNIT 269
+#define tSNUMBER 270
+#define tUNUMBER 271
+#define tYEAR_UNIT 272
+#define tZONE 273
+
-/* Line 189 of yacc.c */
+
+
+/* Copy the first part of user declarations. */
#line 1 "getdate.y"
/*
@@ -240,9 +278,6 @@ static int yyRelYear;
-/* Line 189 of yacc.c */
-#line 245 "getdate.c"
-
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -261,78 +296,28 @@ static int yyRelYear;
# define YYTOKEN_TABLE 0
#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- tAGO = 258,
- tDAY = 259,
- tDAY_UNIT = 260,
- tDAYZONE = 261,
- tDST = 262,
- tHOUR_UNIT = 263,
- tID = 264,
- tMERIDIAN = 265,
- tMINUTE_UNIT = 266,
- tMONTH = 267,
- tMONTH_UNIT = 268,
- tSEC_UNIT = 269,
- tSNUMBER = 270,
- tUNUMBER = 271,
- tYEAR_UNIT = 272,
- tZONE = 273
- };
-#endif
-/* Tokens. */
-#define tAGO 258
-#define tDAY 259
-#define tDAY_UNIT 260
-#define tDAYZONE 261
-#define tDST 262
-#define tHOUR_UNIT 263
-#define tID 264
-#define tMERIDIAN 265
-#define tMINUTE_UNIT 266
-#define tMONTH 267
-#define tMONTH_UNIT 268
-#define tSEC_UNIT 269
-#define tSNUMBER 270
-#define tUNUMBER 271
-#define tYEAR_UNIT 272
-#define tZONE 273
-
-
-
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-{
-
-/* Line 214 of yacc.c */
#line 172 "getdate.y"
-
+{
int Number;
enum _MERIDIAN Meridian;
-
-
-
-/* Line 214 of yacc.c */
-#line 324 "getdate.c"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
+}
+/* Line 187 of yacc.c. */
+#line 308 "getdate.c"
+ YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
+
/* Copy the second part of user declarations. */
-/* Line 264 of yacc.c */
-#line 336 "getdate.c"
+/* Line 216 of yacc.c. */
+#line 321 "getdate.c"
#ifdef short
# undef short
@@ -407,14 +392,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int yyi)
+YYID (int i)
#else
static int
-YYID (yyi)
- int yyi;
+YYID (i)
+ int i;
#endif
{
- return yyi;
+ return i;
}
#endif
@@ -495,9 +480,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
+ yytype_int16 yyss;
+ YYSTYPE yyvs;
+ };
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -531,12 +516,12 @@ 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) \
+# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -952,20 +937,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
+yy_stack_print (bottom, top)
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
+ for (; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -999,11 +981,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
- YYFPRINTF (stderr, "\n");
+ fprintf (stderr, "\n");
}
}
@@ -1283,8 +1265,10 @@ yydestruct (yymsg, yytype, yyvaluep)
break;
}
}
+
/* Prevent warnings from -Wmissing-prototypes. */
+
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1300,10 +1284,11 @@ int yyparse ();
#endif /* ! YYPARSE_PARAM */
-/* The lookahead symbol. */
+
+/* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
@@ -1311,9 +1296,9 @@ int yynerrs;
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
+/*----------.
+| yyparse. |
+`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1337,68 +1322,66 @@ yyparse ()
#endif
#endif
{
+
+ int yystate;
+ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
- YYSIZE_T yystacksize;
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
+
yyssp = yyss;
yyvsp = yyvs;
@@ -1428,6 +1411,7 @@ yyparse ()
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
@@ -1435,6 +1419,7 @@ yyparse ()
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
+
&yystacksize);
yyss = yyss1;
@@ -1457,8 +1442,9 @@ yyparse ()
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1469,6 +1455,7 @@ yyparse ()
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
+
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -1478,9 +1465,6 @@ yyparse ()
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- if (yystate == YYFINAL)
- YYACCEPT;
-
goto yybackup;
/*-----------.
@@ -1489,16 +1473,16 @@ yyparse ()
yybackup:
/* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
+ look-ahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1530,16 +1514,20 @@ yybackup:
goto yyreduce;
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the lookahead token. */
+ /* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token. */
- yychar = YYEMPTY;
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -1579,8 +1567,6 @@ yyreduce:
switch (yyn)
{
case 4:
-
-/* Line 1455 of yacc.c */
#line 192 "getdate.y"
{
yyHaveTime++;
@@ -1588,8 +1574,6 @@ yyreduce:
break;
case 5:
-
-/* Line 1455 of yacc.c */
#line 195 "getdate.y"
{
yyHaveZone++;
@@ -1597,8 +1581,6 @@ yyreduce:
break;
case 6:
-
-/* Line 1455 of yacc.c */
#line 198 "getdate.y"
{
yyHaveDate++;
@@ -1606,8 +1588,6 @@ yyreduce:
break;
case 7:
-
-/* Line 1455 of yacc.c */
#line 201 "getdate.y"
{
yyHaveDay++;
@@ -1615,8 +1595,6 @@ yyreduce:
break;
case 8:
-
-/* Line 1455 of yacc.c */
#line 204 "getdate.y"
{
yyHaveRel++;
@@ -1624,8 +1602,6 @@ yyreduce:
break;
case 10:
-
-/* Line 1455 of yacc.c */
#line 210 "getdate.y"
{
yyHour = (yyvsp[(1) - (2)].Number);
@@ -1636,8 +1612,6 @@ yyreduce:
break;
case 11:
-
-/* Line 1455 of yacc.c */
#line 216 "getdate.y"
{
yyHour = (yyvsp[(1) - (4)].Number);
@@ -1648,8 +1622,6 @@ yyreduce:
break;
case 12:
-
-/* Line 1455 of yacc.c */
#line 222 "getdate.y"
{
yyHour = (yyvsp[(1) - (4)].Number);
@@ -1663,8 +1635,6 @@ yyreduce:
break;
case 13:
-
-/* Line 1455 of yacc.c */
#line 231 "getdate.y"
{
yyHour = (yyvsp[(1) - (6)].Number);
@@ -1675,8 +1645,6 @@ yyreduce:
break;
case 14:
-
-/* Line 1455 of yacc.c */
#line 237 "getdate.y"
{
yyHour = (yyvsp[(1) - (6)].Number);
@@ -1691,8 +1659,6 @@ yyreduce:
break;
case 15:
-
-/* Line 1455 of yacc.c */
#line 249 "getdate.y"
{
yyTimezone = (yyvsp[(1) - (1)].Number);
@@ -1700,8 +1666,6 @@ yyreduce:
break;
case 16:
-
-/* Line 1455 of yacc.c */
#line 252 "getdate.y"
{
yyTimezone = (yyvsp[(1) - (1)].Number) - 60;
@@ -1709,8 +1673,6 @@ yyreduce:
break;
case 17:
-
-/* Line 1455 of yacc.c */
#line 256 "getdate.y"
{
yyTimezone = (yyvsp[(1) - (2)].Number) - 60;
@@ -1718,8 +1680,6 @@ yyreduce:
break;
case 18:
-
-/* Line 1455 of yacc.c */
#line 261 "getdate.y"
{
yyDayOrdinal = 1;
@@ -1728,8 +1688,6 @@ yyreduce:
break;
case 19:
-
-/* Line 1455 of yacc.c */
#line 265 "getdate.y"
{
yyDayOrdinal = 1;
@@ -1738,8 +1696,6 @@ yyreduce:
break;
case 20:
-
-/* Line 1455 of yacc.c */
#line 269 "getdate.y"
{
yyDayOrdinal = (yyvsp[(1) - (2)].Number);
@@ -1748,8 +1704,6 @@ yyreduce:
break;
case 21:
-
-/* Line 1455 of yacc.c */
#line 275 "getdate.y"
{
yyMonth = (yyvsp[(1) - (3)].Number);
@@ -1758,8 +1712,6 @@ yyreduce:
break;
case 22:
-
-/* Line 1455 of yacc.c */
#line 279 "getdate.y"
{
/* Interpret as YYYY/MM/DD if $1 >= 1000, otherwise as MM/DD/YY.
@@ -1782,8 +1734,6 @@ yyreduce:
break;
case 23:
-
-/* Line 1455 of yacc.c */
#line 297 "getdate.y"
{
/* ISO 8601 format. yyyy-mm-dd. */
@@ -1794,8 +1744,6 @@ yyreduce:
break;
case 24:
-
-/* Line 1455 of yacc.c */
#line 303 "getdate.y"
{
/* e.g. 17-JUN-1992. */
@@ -1806,8 +1754,6 @@ yyreduce:
break;
case 25:
-
-/* Line 1455 of yacc.c */
#line 309 "getdate.y"
{
yyMonth = (yyvsp[(1) - (2)].Number);
@@ -1816,8 +1762,6 @@ yyreduce:
break;
case 26:
-
-/* Line 1455 of yacc.c */
#line 313 "getdate.y"
{
yyMonth = (yyvsp[(1) - (4)].Number);
@@ -1827,8 +1771,6 @@ yyreduce:
break;
case 27:
-
-/* Line 1455 of yacc.c */
#line 318 "getdate.y"
{
yyMonth = (yyvsp[(2) - (2)].Number);
@@ -1837,8 +1779,6 @@ yyreduce:
break;
case 28:
-
-/* Line 1455 of yacc.c */
#line 322 "getdate.y"
{
yyMonth = (yyvsp[(2) - (3)].Number);
@@ -1848,8 +1788,6 @@ yyreduce:
break;
case 29:
-
-/* Line 1455 of yacc.c */
#line 329 "getdate.y"
{
yyRelSeconds = -yyRelSeconds;
@@ -1862,8 +1800,6 @@ yyreduce:
break;
case 31:
-
-/* Line 1455 of yacc.c */
#line 340 "getdate.y"
{
yyRelYear += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1871,8 +1807,6 @@ yyreduce:
break;
case 32:
-
-/* Line 1455 of yacc.c */
#line 343 "getdate.y"
{
yyRelYear += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1880,8 +1814,6 @@ yyreduce:
break;
case 33:
-
-/* Line 1455 of yacc.c */
#line 346 "getdate.y"
{
yyRelYear++;
@@ -1889,8 +1821,6 @@ yyreduce:
break;
case 34:
-
-/* Line 1455 of yacc.c */
#line 349 "getdate.y"
{
yyRelMonth += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1898,8 +1828,6 @@ yyreduce:
break;
case 35:
-
-/* Line 1455 of yacc.c */
#line 352 "getdate.y"
{
yyRelMonth += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1907,8 +1835,6 @@ yyreduce:
break;
case 36:
-
-/* Line 1455 of yacc.c */
#line 355 "getdate.y"
{
yyRelMonth++;
@@ -1916,8 +1842,6 @@ yyreduce:
break;
case 37:
-
-/* Line 1455 of yacc.c */
#line 358 "getdate.y"
{
yyRelDay += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1925,8 +1849,6 @@ yyreduce:
break;
case 38:
-
-/* Line 1455 of yacc.c */
#line 361 "getdate.y"
{
yyRelDay += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1934,8 +1856,6 @@ yyreduce:
break;
case 39:
-
-/* Line 1455 of yacc.c */
#line 364 "getdate.y"
{
yyRelDay++;
@@ -1943,8 +1863,6 @@ yyreduce:
break;
case 40:
-
-/* Line 1455 of yacc.c */
#line 367 "getdate.y"
{
yyRelHour += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1952,8 +1870,6 @@ yyreduce:
break;
case 41:
-
-/* Line 1455 of yacc.c */
#line 370 "getdate.y"
{
yyRelHour += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1961,8 +1877,6 @@ yyreduce:
break;
case 42:
-
-/* Line 1455 of yacc.c */
#line 373 "getdate.y"
{
yyRelHour++;
@@ -1970,8 +1884,6 @@ yyreduce:
break;
case 43:
-
-/* Line 1455 of yacc.c */
#line 376 "getdate.y"
{
yyRelMinutes += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1979,8 +1891,6 @@ yyreduce:
break;
case 44:
-
-/* Line 1455 of yacc.c */
#line 379 "getdate.y"
{
yyRelMinutes += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -1988,8 +1898,6 @@ yyreduce:
break;
case 45:
-
-/* Line 1455 of yacc.c */
#line 382 "getdate.y"
{
yyRelMinutes++;
@@ -1997,8 +1905,6 @@ yyreduce:
break;
case 46:
-
-/* Line 1455 of yacc.c */
#line 385 "getdate.y"
{
yyRelSeconds += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -2006,8 +1912,6 @@ yyreduce:
break;
case 47:
-
-/* Line 1455 of yacc.c */
#line 388 "getdate.y"
{
yyRelSeconds += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number);
@@ -2015,8 +1919,6 @@ yyreduce:
break;
case 48:
-
-/* Line 1455 of yacc.c */
#line 391 "getdate.y"
{
yyRelSeconds++;
@@ -2024,8 +1926,6 @@ yyreduce:
break;
case 49:
-
-/* Line 1455 of yacc.c */
#line 397 "getdate.y"
{
if ((yyHaveTime != 0) && (yyHaveDate != 0) && (yyHaveRel == 0))
@@ -2060,8 +1960,6 @@ yyreduce:
break;
case 50:
-
-/* Line 1455 of yacc.c */
#line 430 "getdate.y"
{
(yyval.Meridian) = MER24;
@@ -2069,8 +1967,6 @@ yyreduce:
break;
case 51:
-
-/* Line 1455 of yacc.c */
#line 434 "getdate.y"
{
(yyval.Meridian) = (yyvsp[(1) - (1)].Meridian);
@@ -2078,9 +1974,8 @@ yyreduce:
break;
-
-/* Line 1455 of yacc.c */
-#line 2084 "getdate.c"
+/* Line 1267 of yacc.c. */
+#line 1979 "getdate.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2091,6 +1986,7 @@ yyreduce:
*++yyvsp = yyval;
+
/* 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. */
@@ -2155,7 +2051,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -2172,7 +2068,7 @@ yyerrlab:
}
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;
@@ -2229,6 +2125,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
*++yyvsp = yylval;
@@ -2253,7 +2152,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#ifndef yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -2264,7 +2163,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEMPTY)
+ if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
/* Do not reclaim the symbols of the rule which action triggered
@@ -2290,8 +2189,6 @@ yyreturn:
}
-
-/* Line 1675 of yacc.c */
#line 439 "getdate.y"
diff --git a/libmisc/utmp.c b/libmisc/utmp.c
index 437c3d5..43bac47 100644
--- a/libmisc/utmp.c
+++ b/libmisc/utmp.c
@@ -45,7 +45,7 @@
#include <netdb.h>
#include <stdio.h>
-#ident "$Id: utmp.c 3064 2009-09-07 19:50:00Z nekral-guest $"
+#ident "$Id: utmp.c 3720 2012-05-18 17:57:52Z nekral-guest $"
/*
@@ -129,6 +129,7 @@ static bool is_my_tty (const char *tty)
return ret;
}
+#ifndef USE_PAM
/*
* Some systems already have updwtmp() and possibly updwtmpx(). Others
* don't, so we re-implement these functions if necessary.
@@ -160,6 +161,7 @@ static void updwtmpx (const char *filename, const struct utmpx *utx)
}
#endif /* ! HAVE_UPDWTMPX */
#endif /* ! USE_UTMPX */
+#endif /* ! USE_PAM */
/*
@@ -313,7 +315,10 @@ int setutmp (struct utmp *ut)
}
endutent ();
+#ifndef USE_PAM
+ /* This is done by pam_lastlog */
updwtmp (_WTMP_FILE, ut);
+#endif /* ! USE_PAM */
return err;
}
@@ -446,7 +451,10 @@ int setutmpx (struct utmpx *utx)
}
endutxent ();
+#ifndef USE_PAM
+ /* This is done by pam_lastlog */
updwtmpx (_WTMP_FILE "x", utx);
+#endif /* ! USE_PAM */
return err;
}