.
[gnulib.git] / lib / getdate.y
index 834aa9b..9f8f95f 100644 (file)
@@ -10,7 +10,7 @@
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
-# ifdef FORCE_ALLOCA_H
+# ifdef HAVE_ALLOCA_H
 #  include <alloca.h>
 # endif
 #endif
 # include <string.h>
 #endif
 
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(x)
+#endif
+
+#ifndef ATTRIBUTE_UNUSED
+# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#endif
+
 /* Some old versions of bison generate parsers that use bcopy.
    That loses on systems that don't provide the function, so we have
    to redefine it here.  */
@@ -439,7 +447,7 @@ o_merid     : /* NULL */
 /* Include this file down here because bison inserts code above which
    may define-away `const'.  We want the prototype for get_date to have
    the same signature as the function definition does. */
-#include "get-date.h"
+#include "getdate.h"
 
 extern struct tm       *gmtime ();
 extern struct tm       *localtime ();
@@ -471,7 +479,7 @@ static TABLE const MonthDayTable[] = {
     { "thurs",         tDAY, 4 },
     { "friday",                tDAY, 5 },
     { "saturday",      tDAY, 6 },
-    { NULL }
+    { NULL, 0, 0 }
 };
 
 /* Time units table. */
@@ -486,7 +494,7 @@ static TABLE const UnitsTable[] = {
     { "min",           tMINUTE_UNIT,   1 },
     { "second",                tSEC_UNIT,      1 },
     { "sec",           tSEC_UNIT,      1 },
-    { NULL }
+    { NULL, 0, 0 }
 };
 
 /* Assorted relative-time words. */
@@ -511,7 +519,7 @@ static TABLE const OtherTable[] = {
     { "eleventh",      tUNUMBER,       11 },
     { "twelfth",       tUNUMBER,       12 },
     { "ago",           tAGO,   1 },
-    { NULL }
+    { NULL, 0, 0 }
 };
 
 /* The timezone table. */
@@ -596,7 +604,7 @@ static TABLE const TimezoneTable[] = {
     { "nzst",  tZONE,     -HOUR (12) },        /* New Zealand Standard */
     { "nzdt",  tDAYZONE,  -HOUR (12) },        /* New Zealand Daylight */
     { "idle",  tZONE,     -HOUR (12) },        /* International Date Line East */
-    {  NULL  }
+    {  NULL, 0, 0  }
 };
 
 /* Military timezone table. */
@@ -626,7 +634,7 @@ static TABLE const MilitaryTable[] = {
     { "x",     tZONE,  HOUR (-11) },
     { "y",     tZONE,  HOUR (-12) },
     { "z",     tZONE,  HOUR (  0) },
-    { NULL }
+    { NULL, 0, 0 }
 };
 
 \f
@@ -635,7 +643,7 @@ static TABLE const MilitaryTable[] = {
 /* ARGSUSED */
 static int
 yyerror (s)
-     char *s;
+     char *s ATTRIBUTE_UNUSED;
 {
   return 0;
 }