This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/468] New: mktime.c includes <string.h> unnecessarily
- From: "eggert at gnu dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 22 Oct 2004 19:38:25 -0000
- Subject: [Bug libc/468] New: mktime.c includes <string.h> unnecessarily
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
Here's a minor code cleanup patch to mktime.c.
This patch is imported from gnulib.
mktime.c includes <string.h> unconditionally, but it uses string functions
only if DEBUG is defined. Also, C99 requires that <string.h> be included in this
case, so the comment about "builtin redirect" isn't quite accurate and is
probably best removed.
--- 0/time/mktime.c 2004-04-01 16:40:25 -0800
+++ 1/time/mktime.c 2004-10-22 12:24:21 -0700
@@ -37,11 +37,11 @@
#include <time.h>
#include <limits.h>
-#include <string.h> /* For string function builtin redirect. */
#if DEBUG
# include <stdio.h>
# include <stdlib.h>
+# include <string.h>
/* Make it work even if the system's libc has its own mktime routine. */
# define mktime my_mktime
#endif /* DEBUG */
--
Summary: mktime.c includes <string.h> unnecessarily
Product: glibc
Version: 2.3.3
Status: NEW
Severity: minor
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: eggert at gnu dot org
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: N.A.
GCC host triplet: N.A.
GCC target triplet: N.A.
http://sources.redhat.com/bugzilla/show_bug.cgi?id=468
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.