diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-05-01 12:10:37 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-05-01 17:27:03 -0700 |
commit | 549de1eb50f949634bd45341a56a5f9a56f96a76 (patch) | |
tree | 34ae3102cf143f9c63be6c0fb35ad0bca1534695 /lib/mktime.c | |
parent | b28c2cda0e90ccad85a99c48dded5624e39d28ac (diff) | |
download | gnulib-549de1eb50f949634bd45341a56a5f9a56f96a76.tar.gz |
mktime: simplify DEBUG_MKTIME
* lib/mktime.c (DEBUG_MKTIME): Define to 0 if not defined.
Simplify later usage accordingly.
Diffstat (limited to 'lib/mktime.c')
-rw-r--r-- | lib/mktime.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/mktime.c b/lib/mktime.c index 4f4f0bf34c..ccc6c5149f 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -17,9 +17,11 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -/* Define this to have a standalone program to test this implementation of +/* Define this to 1 to have a standalone program to test this implementation of mktime. */ -/* #define DEBUG_MKTIME 1 */ +#ifndef DEBUG_MKTIME +# define DEBUG_MKTIME 0 +#endif #ifndef _LIBC # include <config.h> @@ -40,13 +42,13 @@ #include <intprops.h> #include <verify.h> -#if defined DEBUG_MKTIME && DEBUG_MKTIME +#if DEBUG_MKTIME # include <stdio.h> # include <stdlib.h> /* Make it work even if the system's libc has its own mktime routine. */ # undef mktime # define mktime my_mktime -#endif /* DEBUG_MKTIME */ +#endif /* Some of the code in this file assumes that signed integer overflow silently wraps around. This assumption can't easily be programmed @@ -545,7 +547,7 @@ libc_hidden_def (mktime) libc_hidden_weak (timelocal) #endif -#if defined DEBUG_MKTIME && DEBUG_MKTIME +#if DEBUG_MKTIME static int not_equal_tm (const struct tm *a, const struct tm *b) |