summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/strftime.c6
-rw-r--r--time/strptime.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/time/strftime.c b/time/strftime.c
index 10d508d6e5..8c50a7dffb 100644
--- a/time/strftime.c
+++ b/time/strftime.c
@@ -137,7 +137,7 @@ extern int __tz_compute __P ((time_t timer, const struct tm *tm));
 # if ! HAVE_LOCALTIME_R
 #  if ! HAVE_TM_GMTOFF
 /* Approximate gmtime_r as best we can in its absence.  */
-#  define gmtime_r my_gmtime_r
+#   define gmtime_r my_gmtime_r
 static struct tm *gmtime_r __P ((const time_t *, struct tm *));
 static struct tm *
 gmtime_r (t, tp)
@@ -208,7 +208,7 @@ static const char zeroes[16] = "0000000000000000";
 # define memset_zero(P, Len) (memset ((P), '0', (Len)), (P) += (Len))
 #endif
 
-#define	add(n, f)							      \
+#define add(n, f)							      \
   do									      \
     {									      \
       int _n = (n);							      \
@@ -231,7 +231,7 @@ static const char zeroes[16] = "0000000000000000";
       i += _incr;							      \
     } while (0)
 
-#define	cpy(n, s) \
+#define cpy(n, s) \
     add ((n),								      \
 	 if (to_lowcase)						      \
 	   memcpy_lowcase (p, (s), _n);					      \
diff --git a/time/strptime.c b/time/strptime.c
index 90b88a1ba3..8d650716fe 100644
--- a/time/strptime.c
+++ b/time/strptime.c
@@ -541,7 +541,10 @@ strptime_internal (buf, format, tm, decided)
 	  break;
 	case 'Y':
 	  /* Match year including century number.  */
-	  get_number (0, INT_MAX);
+	  if (sizeof (time_t) > 4)
+	    get_number (0, 9999);
+	  else
+	    get_number (0, 2036);
 	  tm->tm_year = val - 1900;
 	  break;
 	case 'Z':