diff mbox

Fix Wundef warning for DEBUG in mktime

Message ID 20140626175019.GY4477@spoyarek.pnq.redhat.com
State Committed
Headers show

Commit Message

Siddhesh Poyarekar June 26, 2014, 5:50 p.m. UTC
On Thu, Jun 26, 2014 at 10:19:35AM -0700, Roland McGrath wrote:
> How close are we to mktime being harmonized with gnulib already?

Not far at all; there's just one change that should bring us in sync
with gnulib.  Patch below with the right attribution.

> If we're already there, then please coordinate this change with them.

OK.

Siddhesh

2014-06-26  Paul Eggert  <eggert@cs.ucla.edu>

	* time/mktime.c (leapyear): Remove inline keyword.

Comments

Roland McGrath June 26, 2014, 6:18 p.m. UTC | #1
> On Thu, Jun 26, 2014 at 10:19:35AM -0700, Roland McGrath wrote:
> > How close are we to mktime being harmonized with gnulib already?
> 
> Not far at all; there's just one change that should bring us in sync
> with gnulib.  Patch below with the right attribution.

Cool.  Please put that in, and make a note in the ChangeLog that it now
matches gnulib.  We might have a wiki page somewhere about shared code that
could or should mention that mktime is in synch with gnulib and meant to
stay that way.
diff mbox

Patch

diff --git a/time/mktime.c b/time/mktime.c
index a4a2d58..077f9c4 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -142,7 +142,7 @@  verify (twos_complement_arithmetic,
 verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0);
 
 /* Return 1 if YEAR + TM_YEAR_BASE is a leap year.  */
-static inline int
+static int
 leapyear (long_int year)
 {
   /* Don't add YEAR to TM_YEAR_BASE, as that might overflow.