Mercurial > gnulib
changeset 18305:ebba8469e29d
mktime: resurrect DEBUG_MKTIME testing
* lib/mktime.c [DEBUG_MKTIME]: Do not include <config.h>.
Include <string.h>, for strcmp.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sun, 01 May 2016 12:15:52 -0700 |
parents | e04e8b486f70 |
children | 6998697a3e42 |
files | ChangeLog lib/mktime.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun May 01 12:10:37 2016 -0700 +++ b/ChangeLog Sun May 01 12:15:52 2016 -0700 @@ -1,5 +1,9 @@ 2016-05-01 Paul Eggert <eggert@cs.ucla.edu> + mktime: resurrect DEBUG_MKTIME testing + * lib/mktime.c [DEBUG_MKTIME]: Do not include <config.h>. + Include <string.h>, for strcmp. + mktime: simplify DEBUG_MKTIME * lib/mktime.c (DEBUG_MKTIME): Define to 0 if not defined. Simplify later usage accordingly.
--- a/lib/mktime.c Sun May 01 12:10:37 2016 -0700 +++ b/lib/mktime.c Sun May 01 12:15:52 2016 -0700 @@ -23,7 +23,7 @@ # define DEBUG_MKTIME 0 #endif -#ifndef _LIBC +#if !defined _LIBC && !DEBUG_MKTIME # include <config.h> #endif @@ -45,6 +45,7 @@ #if DEBUG_MKTIME # include <stdio.h> # include <stdlib.h> +# include <string.h> /* Make it work even if the system's libc has its own mktime routine. */ # undef mktime # define mktime my_mktime