VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/msvcrt/time.h

最後變更 在這個檔案是 53206,由 vboxsync 提交於 10 年 前

Devices/vmsvga: header fixes

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.8 KB
 
1/*
2 * Time definitions
3 *
4 * Copyright 2000 Francois Gouget.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21/*
22 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
24 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
25 * a choice of LGPL license versions is made available with the language indicating
26 * that LGPLv2 or any later version may be used, or where a choice of which version
27 * of the LGPL is applied is otherwise unspecified.
28 */
29
30#ifndef __WINE_TIME_H
31#define __WINE_TIME_H
32
33#include <crtdefs.h>
34
35#include <pshpack8.h>
36
37#ifndef _CLOCK_T_DEFINED
38typedef __msvcrt_long clock_t;
39#define _CLOCK_T_DEFINED
40#endif
41
42#ifndef NULL
43#ifdef __cplusplus
44#define NULL 0
45#else
46#define NULL ((void *)0)
47#endif
48#endif
49
50#ifndef CLOCKS_PER_SEC
51#define CLOCKS_PER_SEC 1000
52#endif
53
54#ifndef _TM_DEFINED
55#define _TM_DEFINED
56struct tm {
57 int tm_sec;
58 int tm_min;
59 int tm_hour;
60 int tm_mday;
61 int tm_mon;
62 int tm_year;
63 int tm_wday;
64 int tm_yday;
65 int tm_isdst;
66};
67#endif /* _TM_DEFINED */
68
69#ifdef __cplusplus
70extern "C" {
71#endif
72
73#ifdef __i386__
74#define _daylight (*__p__daylight())
75#define _dstbias (*__p__dstbias())
76#define _timezone (*__p__timezone())
77#define _tzname (__p__tzname())
78
79int * __cdecl __p__daylight(void);
80__msvcrt_long * __cdecl __p__dstbias(void);
81__msvcrt_long * __cdecl __p__timezone(void);
82char ** __cdecl __p__tzname(void);
83#else
84extern int _daylight;
85extern __msvcrt_long _dstbias;
86extern __msvcrt_long _timezone;
87extern char *_tzname;
88#endif
89
90#ifdef _USE_32BIT_TIME_T
91#define _ctime32 ctime
92#define _difftime32 difftime
93#define _gmtime32 gmtime
94#define _localtime32 localtime
95#define _mktime32 mktime
96#define _time32 time
97#endif
98
99unsigned __cdecl _getsystime(struct tm*);
100unsigned __cdecl _setsystime(struct tm*,unsigned);
101char* __cdecl _strdate(char*);
102errno_t __cdecl _strdate_s(char*,size_t);
103char* __cdecl _strtime(char*);
104errno_t __cdecl _strtime_s(char*,size_t);
105void __cdecl _tzset(void);
106
107char* __cdecl asctime(const struct tm*);
108clock_t __cdecl clock(void);
109char* __cdecl _ctime32(const __time32_t*);
110char* __cdecl _ctime64(const __time64_t*);
111double __cdecl _difftime32(__time32_t,__time32_t);
112double __cdecl _difftime64(__time64_t,__time64_t);
113struct tm* __cdecl _gmtime32(const __time32_t*);
114struct tm* __cdecl _gmtime64(const __time64_t*);
115struct tm* __cdecl _localtime32(const __time32_t*);
116errno_t __cdecl _localtime32_s(struct tm*, const __time64_t*);
117struct tm* __cdecl _localtime64(const __time64_t*);
118errno_t __cdecl _localtime64_s(struct tm*, const __time64_t*);
119__time32_t __cdecl _mktime32(struct tm*);
120__time64_t __cdecl _mktime64(struct tm*);
121size_t __cdecl strftime(char*,size_t,const char*,const struct tm*);
122__time32_t __cdecl _time32(__time32_t*);
123__time64_t __cdecl _time64(__time64_t*);
124
125#ifndef _USE_32BIT_TIME_T
126static inline char* ctime(const time_t *t) { return _ctime64(t); }
127static inline double difftime(time_t t1, time_t t2) { return _difftime64(t1, t2); }
128static inline struct tm* gmtime(const time_t *t) { return _gmtime64(t); }
129static inline struct tm* localtime(const time_t *t) { return _localtime64(t); }
130static inline time_t mktime(struct tm *tm) { return _mktime64(tm); }
131static inline time_t time(time_t *t) { return _time64(t); }
132#endif
133
134#ifndef _WTIME_DEFINED
135#define _WTIME_DEFINED
136
137#ifdef _USE_32BIT_TIME_T
138#define _wctime32 _wctime
139#endif
140
141wchar_t* __cdecl _wasctime(const struct tm*);
142size_t __cdecl wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
143wchar_t* __cdecl _wctime32(const __time32_t*);
144wchar_t* __cdecl _wctime64(const __time64_t*);
145wchar_t* __cdecl _wstrdate(wchar_t*);
146errno_t __cdecl _wstrdate_s(wchar_t*,size_t);
147wchar_t* __cdecl _wstrtime(wchar_t*);
148errno_t __cdecl _wstrtime_s(wchar_t*,size_t);
149
150#ifndef _USE_32BIT_TIME_T
151static inline wchar_t* _wctime(const time_t *t) { return _wctime64(t); }
152#endif
153
154#endif /* _WTIME_DEFINED */
155
156#ifdef __cplusplus
157}
158#endif
159
160#include <poppack.h>
161
162#endif /* __WINE_TIME_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette