VirtualBox

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

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

Devices/vmsvga: header fixes

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 6.2 KB
 
1/*
2 * CRT 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_CRTDEFS_H
31#define __WINE_CRTDEFS_H
32
33#ifndef __WINE_USE_MSVCRT
34#define __WINE_USE_MSVCRT
35#endif
36
37#ifdef __WINE_WINE_PORT_H
38# error You cannot use both wine/port.h and msvcrt headers
39#endif
40
41#if (defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc64__) || defined(__aarch64__)) && !defined(_WIN64)
42#define _WIN64
43#endif
44
45#if !defined(_MSC_VER) && !defined(__int64)
46# if defined(_WIN64) && !defined(__MINGW64__)
47# define __int64 long
48# else
49# define __int64 long long
50# endif
51#endif
52
53#ifndef __stdcall
54# ifdef __i386__
55# ifdef __GNUC__
56# ifdef __APPLE__ /* Mac OS X uses a 16-byte aligned stack and not a 4-byte one */
57# define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))
58# else
59# define __stdcall __attribute__((__stdcall__))
60# endif
61# elif defined(_MSC_VER)
62 /* Nothing needs to be done. __stdcall already exists */
63# else
64# error You need to define __stdcall for your compiler
65# endif
66# elif defined(__x86_64__) && defined (__GNUC__)
67# define __stdcall __attribute__((ms_abi))
68# else
69# define __stdcall
70# endif
71#endif /* __stdcall */
72
73#ifndef __cdecl
74# if defined(__i386__) && defined(__GNUC__)
75# ifdef __APPLE__ /* Mac OS X uses 16-byte aligned stack and not a 4-byte one */
76# define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))
77# else
78# define __cdecl __attribute__((__cdecl__))
79# endif
80# elif defined(__x86_64__) && defined (__GNUC__)
81# define __cdecl __attribute__((ms_abi))
82# elif !defined(_MSC_VER)
83# define __cdecl
84# endif
85#endif /* __cdecl */
86
87#ifndef __ms_va_list
88# if defined(__x86_64__) && defined (__GNUC__)
89# define __ms_va_list __builtin_ms_va_list
90# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
91# define __ms_va_end(list) __builtin_ms_va_end(list)
92# else
93# define __ms_va_list va_list
94# define __ms_va_start(list,arg) va_start(list,arg)
95# define __ms_va_end(list) va_end(list)
96# endif
97#endif
98
99#ifndef DECLSPEC_ALIGN
100# if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
101# define DECLSPEC_ALIGN(x) __declspec(align(x))
102# elif defined(__GNUC__)
103# define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
104# else
105# define DECLSPEC_ALIGN(x)
106# endif
107#endif
108
109#define _ARGMAX 100
110
111#ifndef _MSVCRT_LONG_DEFINED
112#define _MSVCRT_LONG_DEFINED
113/* we need 32-bit longs even on 64-bit */
114typedef int __msvcrt_long;
115typedef unsigned int __msvcrt_ulong;
116#endif
117
118#ifndef _INTPTR_T_DEFINED
119#ifdef _WIN64
120typedef __int64 intptr_t;
121#else
122typedef int intptr_t;
123#endif
124#define _INTPTR_T_DEFINED
125#endif
126
127#ifndef _UINTPTR_T_DEFINED
128#ifdef _WIN64
129typedef unsigned __int64 uintptr_t;
130#else
131typedef unsigned int uintptr_t;
132#endif
133#define _UINTPTR_T_DEFINED
134#endif
135
136#ifndef _PTRDIFF_T_DEFINED
137#ifdef _WIN64
138typedef __int64 ptrdiff_t;
139#else
140typedef int ptrdiff_t;
141#endif
142#define _PTRDIFF_T_DEFINED
143#endif
144
145#ifndef _SIZE_T_DEFINED
146#ifdef _WIN64
147typedef unsigned __int64 size_t;
148#else
149typedef unsigned int size_t;
150#endif
151#define _SIZE_T_DEFINED
152#endif
153
154#ifndef _TIME32_T_DEFINED
155typedef __msvcrt_long __time32_t;
156#define _TIME32_T_DEFINED
157#endif
158
159#ifndef _TIME64_T_DEFINED
160typedef __int64 DECLSPEC_ALIGN(8) __time64_t;
161#define _TIME64_T_DEFINED
162#endif
163
164#ifdef _USE_32BIT_TIME_T
165# ifdef _WIN64
166# error You cannot use 32-bit time_t in Win64
167# endif
168#elif !defined(_WIN64)
169# define _USE_32BIT_TIME_T
170#endif
171
172#ifndef _TIME_T_DEFINED
173#ifdef _USE_32BIT_TIME_T
174typedef __time32_t time_t;
175#else
176typedef __time64_t time_t;
177#endif
178#define _TIME_T_DEFINED
179#endif
180
181#ifndef _WCHAR_T_DEFINED
182#ifndef __cplusplus
183typedef unsigned short wchar_t;
184#endif
185#define _WCHAR_T_DEFINED
186#endif
187
188#ifndef _WCTYPE_T_DEFINED
189typedef unsigned short wint_t;
190typedef unsigned short wctype_t;
191#define _WCTYPE_T_DEFINED
192#endif
193
194#ifndef _ERRNO_T_DEFINED
195typedef int errno_t;
196#define _ERRNO_T_DEFINED
197#endif
198
199struct threadlocaleinfostruct;
200struct threadmbcinfostruct;
201typedef struct threadlocaleinfostruct *pthreadlocinfo;
202typedef struct threadmbcinfostruct *pthreadmbcinfo;
203
204typedef struct localeinfo_struct
205{
206 pthreadlocinfo locinfo;
207 pthreadmbcinfo mbcinfo;
208} _locale_tstruct, *_locale_t;
209
210#ifndef _TAGLC_ID_DEFINED
211typedef struct tagLC_ID {
212 unsigned short wLanguage;
213 unsigned short wCountry;
214 unsigned short wCodePage;
215} LC_ID, *LPLC_ID;
216#define _TAGLC_ID_DEFINED
217#endif
218
219#ifndef _THREADLOCALEINFO
220typedef struct threadlocaleinfostruct {
221 int refcount;
222 unsigned int lc_codepage;
223 unsigned int lc_collate_cp;
224 __msvcrt_ulong lc_handle[6];
225 LC_ID lc_id[6];
226 struct {
227 char *locale;
228 wchar_t *wlocale;
229 int *refcount;
230 int *wrefcount;
231 } lc_category[6];
232 int lc_clike;
233 int mb_cur_max;
234 int *lconv_intl_refcount;
235 int *lconv_num_refcount;
236 int *lconv_mon_refcount;
237 struct lconv *lconv;
238 int *ctype1_refcount;
239 unsigned short *ctype1;
240 const unsigned short *pctype;
241 const unsigned char *pclmap;
242 const unsigned char *pcumap;
243 struct __lc_time_data *lc_time_curr;
244} threadlocinfo;
245#define _THREADLOCALEINFO
246#endif
247
248#endif /* __WINE_CRTDEFS_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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