summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/mingw/ChangeLog6
-rw-r--r--winsup/mingw/include/time.h7
2 files changed, 11 insertions, 2 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index 5675e3be9..37b4646ed 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-17 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/time.h (wcsftime): Move out of !__STRICT_ANSI
+ block.
+ (struct tm): Protect with _TM_DEFINED.
+
2004-07-17 Christopher Faylor <cgf@timesys.com>
* Makefile.in (CC): Strip inappropriate include file settings from any
diff --git a/winsup/mingw/include/time.h b/winsup/mingw/include/time.h
index 7d62c4697..2a3bfc526 100644
--- a/winsup/mingw/include/time.h
+++ b/winsup/mingw/include/time.h
@@ -56,6 +56,7 @@ typedef long clock_t;
#define _CLOCK_T_DEFINED
#endif
+#ifndef _TM_DEFINED
/*
* A structure for storing all kinds of useful information about the
* current (or another) time.
@@ -73,6 +74,8 @@ struct tm
int tm_isdst; /* +1 Daylight Savings Time, 0 No DST,
* -1 don't know */
};
+#define _TM_DEFINED
+#endif
#ifdef __cplusplus
extern "C" {
@@ -187,9 +190,9 @@ __MINGW_IMPORT char *tzname[2];
#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
-#ifndef __STRICT_ANSI__
#ifndef _WTIME_DEFINED
/* wide function prototypes, also declared in wchar.h */
+#ifndef __STRICT_ANSI__
#ifdef __MSVCRT__
_CRTIMP wchar_t* __cdecl _wasctime(const struct tm*);
_CRTIMP wchar_t* __cdecl _wctime(const time_t*);
@@ -199,10 +202,10 @@ _CRTIMP wchar_t* __cdecl _wstrtime(wchar_t*);
_CRTIMP wchar_t* __cdecl _wctime64 (const __time64_t*);
#endif
#endif /* __MSVCRT__ */
+#endif /* __STRICT_ANSI__ */
_CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
#define _WTIME_DEFINED
#endif /* _WTIME_DEFINED */
-#endif /* __STRICT_ANSI__ */
#ifdef __cplusplus
}