2001-04-11 01:21:43 +02:00
|
|
|
/*
|
|
|
|
* Time definitions
|
|
|
|
*
|
|
|
|
* Copyright 2000 Francois Gouget.
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2001-04-11 01:21:43 +02:00
|
|
|
*/
|
|
|
|
#ifndef __WINE_TIME_H
|
|
|
|
#define __WINE_TIME_H
|
|
|
|
|
2019-08-09 17:32:04 +02:00
|
|
|
#include <corecrt.h>
|
2006-10-16 21:29:23 +02:00
|
|
|
|
2008-12-11 22:37:34 +01:00
|
|
|
#include <pshpack8.h>
|
2002-12-18 21:17:20 +01:00
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
#ifndef _CLOCK_T_DEFINED
|
2009-05-23 11:38:59 +02:00
|
|
|
typedef __msvcrt_long clock_t;
|
2004-06-25 03:19:15 +02:00
|
|
|
#define _CLOCK_T_DEFINED
|
2002-12-18 21:17:20 +01:00
|
|
|
#endif
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2002-12-18 21:17:20 +01:00
|
|
|
#ifndef NULL
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define NULL 0
|
|
|
|
#else
|
|
|
|
#define NULL ((void *)0)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2003-06-04 22:24:16 +02:00
|
|
|
#ifndef CLOCKS_PER_SEC
|
|
|
|
#define CLOCKS_PER_SEC 1000
|
|
|
|
#endif
|
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
#ifndef _TM_DEFINED
|
|
|
|
#define _TM_DEFINED
|
|
|
|
struct tm {
|
2001-04-11 01:21:43 +02:00
|
|
|
int tm_sec;
|
|
|
|
int tm_min;
|
|
|
|
int tm_hour;
|
|
|
|
int tm_mday;
|
|
|
|
int tm_mon;
|
|
|
|
int tm_year;
|
|
|
|
int tm_wday;
|
|
|
|
int tm_yday;
|
|
|
|
int tm_isdst;
|
|
|
|
};
|
2004-06-25 03:19:15 +02:00
|
|
|
#endif /* _TM_DEFINED */
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2008-12-15 16:20:08 +01:00
|
|
|
#ifdef __i386__
|
2005-09-27 12:55:50 +02:00
|
|
|
#define _daylight (*__p__daylight())
|
|
|
|
#define _dstbias (*__p__dstbias())
|
|
|
|
#define _timezone (*__p__timezone())
|
|
|
|
#define _tzname (__p__tzname())
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2008-12-17 14:45:18 +01:00
|
|
|
int * __cdecl __p__daylight(void);
|
2009-05-23 11:38:59 +02:00
|
|
|
__msvcrt_long * __cdecl __p__dstbias(void);
|
|
|
|
__msvcrt_long * __cdecl __p__timezone(void);
|
2008-12-17 14:45:18 +01:00
|
|
|
char ** __cdecl __p__tzname(void);
|
2008-12-15 16:20:08 +01:00
|
|
|
#else
|
|
|
|
extern int _daylight;
|
2009-05-23 11:38:59 +02:00
|
|
|
extern __msvcrt_long _dstbias;
|
|
|
|
extern __msvcrt_long _timezone;
|
2008-12-15 16:20:08 +01:00
|
|
|
extern char *_tzname;
|
|
|
|
#endif
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2009-05-23 11:06:29 +02:00
|
|
|
#ifdef _USE_32BIT_TIME_T
|
|
|
|
#define _ctime32 ctime
|
|
|
|
#define _difftime32 difftime
|
|
|
|
#define _gmtime32 gmtime
|
|
|
|
#define _localtime32 localtime
|
|
|
|
#define _mktime32 mktime
|
|
|
|
#define _time32 time
|
|
|
|
#endif
|
|
|
|
|
2008-12-17 14:45:18 +01:00
|
|
|
unsigned __cdecl _getsystime(struct tm*);
|
|
|
|
unsigned __cdecl _setsystime(struct tm*,unsigned);
|
|
|
|
char* __cdecl _strdate(char*);
|
2010-08-27 01:46:00 +02:00
|
|
|
errno_t __cdecl _strdate_s(char*,size_t);
|
2008-12-17 14:45:18 +01:00
|
|
|
char* __cdecl _strtime(char*);
|
2010-08-27 01:45:31 +02:00
|
|
|
errno_t __cdecl _strtime_s(char*,size_t);
|
2008-12-17 14:45:18 +01:00
|
|
|
void __cdecl _tzset(void);
|
2001-04-11 01:21:43 +02:00
|
|
|
|
2008-12-17 14:45:18 +01:00
|
|
|
char* __cdecl asctime(const struct tm*);
|
|
|
|
clock_t __cdecl clock(void);
|
2009-05-23 11:06:29 +02:00
|
|
|
char* __cdecl _ctime32(const __time32_t*);
|
|
|
|
char* __cdecl _ctime64(const __time64_t*);
|
|
|
|
double __cdecl _difftime32(__time32_t,__time32_t);
|
|
|
|
double __cdecl _difftime64(__time64_t,__time64_t);
|
|
|
|
struct tm* __cdecl _gmtime32(const __time32_t*);
|
|
|
|
struct tm* __cdecl _gmtime64(const __time64_t*);
|
|
|
|
struct tm* __cdecl _localtime32(const __time32_t*);
|
2010-10-11 12:25:05 +02:00
|
|
|
errno_t __cdecl _localtime32_s(struct tm*, const __time64_t*);
|
2009-05-23 11:06:29 +02:00
|
|
|
struct tm* __cdecl _localtime64(const __time64_t*);
|
2010-10-11 12:24:20 +02:00
|
|
|
errno_t __cdecl _localtime64_s(struct tm*, const __time64_t*);
|
2009-05-23 11:06:29 +02:00
|
|
|
__time32_t __cdecl _mktime32(struct tm*);
|
|
|
|
__time64_t __cdecl _mktime64(struct tm*);
|
2008-12-17 14:45:18 +01:00
|
|
|
size_t __cdecl strftime(char*,size_t,const char*,const struct tm*);
|
2009-05-23 11:06:29 +02:00
|
|
|
__time32_t __cdecl _time32(__time32_t*);
|
|
|
|
__time64_t __cdecl _time64(__time64_t*);
|
|
|
|
|
|
|
|
#ifndef _USE_32BIT_TIME_T
|
|
|
|
static inline char* ctime(const time_t *t) { return _ctime64(t); }
|
|
|
|
static inline double difftime(time_t t1, time_t t2) { return _difftime64(t1, t2); }
|
|
|
|
static inline struct tm* gmtime(const time_t *t) { return _gmtime64(t); }
|
|
|
|
static inline struct tm* localtime(const time_t *t) { return _localtime64(t); }
|
|
|
|
static inline time_t mktime(struct tm *tm) { return _mktime64(tm); }
|
|
|
|
static inline time_t time(time_t *t) { return _time64(t); }
|
|
|
|
#endif
|
2004-06-25 03:19:15 +02:00
|
|
|
|
|
|
|
#ifndef _WTIME_DEFINED
|
|
|
|
#define _WTIME_DEFINED
|
2009-05-23 11:06:29 +02:00
|
|
|
|
|
|
|
#ifdef _USE_32BIT_TIME_T
|
|
|
|
#define _wctime32 _wctime
|
|
|
|
#endif
|
|
|
|
|
2008-12-17 14:45:18 +01:00
|
|
|
wchar_t* __cdecl _wasctime(const struct tm*);
|
|
|
|
size_t __cdecl wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
|
2009-05-23 11:06:29 +02:00
|
|
|
wchar_t* __cdecl _wctime32(const __time32_t*);
|
|
|
|
wchar_t* __cdecl _wctime64(const __time64_t*);
|
2008-12-17 14:45:18 +01:00
|
|
|
wchar_t* __cdecl _wstrdate(wchar_t*);
|
2010-08-27 01:46:00 +02:00
|
|
|
errno_t __cdecl _wstrdate_s(wchar_t*,size_t);
|
2008-12-17 14:45:18 +01:00
|
|
|
wchar_t* __cdecl _wstrtime(wchar_t*);
|
2010-08-27 01:45:31 +02:00
|
|
|
errno_t __cdecl _wstrtime_s(wchar_t*,size_t);
|
2009-05-23 11:06:29 +02:00
|
|
|
|
|
|
|
#ifndef _USE_32BIT_TIME_T
|
|
|
|
static inline wchar_t* _wctime(const time_t *t) { return _wctime64(t); }
|
|
|
|
#endif
|
|
|
|
|
2004-06-25 03:19:15 +02:00
|
|
|
#endif /* _WTIME_DEFINED */
|
2001-04-11 01:21:43 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2007-02-20 09:35:41 +01:00
|
|
|
#include <poppack.h>
|
|
|
|
|
2001-04-11 01:21:43 +02:00
|
|
|
#endif /* __WINE_TIME_H */
|