* include/math.h: Guard ISO C99 additions with __cplusplus

not __GLIBCPP__.
This commit is contained in:
Danny Smith 2004-07-17 05:15:26 +00:00
parent 241422d046
commit cd341e5613
2 changed files with 11 additions and 2 deletions

View File

@ -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> 2004-07-17 Christopher Faylor <cgf@timesys.com>
* Makefile.in (CC): Strip inappropriate include file settings from any * Makefile.in (CC): Strip inappropriate include file settings from any

View File

@ -56,6 +56,7 @@ typedef long clock_t;
#define _CLOCK_T_DEFINED #define _CLOCK_T_DEFINED
#endif #endif
#ifndef _TM_DEFINED
/* /*
* A structure for storing all kinds of useful information about the * A structure for storing all kinds of useful information about the
* current (or another) time. * current (or another) time.
@ -73,6 +74,8 @@ struct tm
int tm_isdst; /* +1 Daylight Savings Time, 0 No DST, int tm_isdst; /* +1 Daylight Savings Time, 0 No DST,
* -1 don't know */ * -1 don't know */
}; };
#define _TM_DEFINED
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -187,9 +190,9 @@ __MINGW_IMPORT char *tzname[2];
#endif /* Not _NO_OLDNAMES */ #endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */ #endif /* Not __STRICT_ANSI__ */
#ifndef __STRICT_ANSI__
#ifndef _WTIME_DEFINED #ifndef _WTIME_DEFINED
/* wide function prototypes, also declared in wchar.h */ /* wide function prototypes, also declared in wchar.h */
#ifndef __STRICT_ANSI__
#ifdef __MSVCRT__ #ifdef __MSVCRT__
_CRTIMP wchar_t* __cdecl _wasctime(const struct tm*); _CRTIMP wchar_t* __cdecl _wasctime(const struct tm*);
_CRTIMP wchar_t* __cdecl _wctime(const time_t*); _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*); _CRTIMP wchar_t* __cdecl _wctime64 (const __time64_t*);
#endif #endif
#endif /* __MSVCRT__ */ #endif /* __MSVCRT__ */
#endif /* __STRICT_ANSI__ */
_CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); _CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
#define _WTIME_DEFINED #define _WTIME_DEFINED
#endif /* _WTIME_DEFINED */ #endif /* _WTIME_DEFINED */
#endif /* __STRICT_ANSI__ */
#ifdef __cplusplus #ifdef __cplusplus
} }