TESTING -- override pthreads to fix gstreamer v5
[wine/multimedia.git] / dlls / msvcrt / msvcrt.h
blobe30e6754af9bab78dfc568df69e9390f8c7f3883
1 /*
2 * Copyright 2001 Jon Griffiths
3 * Copyright 2004 Dimitrie O. Paun
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 * NOTES
20 * Naming conventions
21 * - Symbols are prefixed with MSVCRT_ if they conflict
22 * with libc symbols
23 * - Internal symbols are usually prefixed by msvcrt_.
24 * - Exported symbols that are not present in the public
25 * headers are usually kept the same as the original.
26 * Other conventions
27 * - To avoid conflicts with the standard C library,
28 * no msvcrt headers are included in the implementation.
29 * - Instead, symbols are duplicated here, prefixed with
30 * MSVCRT_, as explained above.
31 * - To avoid inconsistencies, a test for each symbol is
32 * added into tests/headers.c. Please always add a
33 * corresponding test when you add a new symbol!
36 #ifndef __WINE_MSVCRT_H
37 #define __WINE_MSVCRT_H
39 #include <stdarg.h>
41 #include "windef.h"
42 #include "winbase.h"
44 #define MSVCRT_LONG_MAX 0x7fffffff
45 #define MSVCRT_LONG_MIN (-MSVCRT_LONG_MAX-1)
46 #define MSVCRT_ULONG_MAX 0xffffffff
47 #define MSVCRT_I64_MAX (((__int64)0x7fffffff << 32) | 0xffffffff)
48 #define MSVCRT_I64_MIN (-MSVCRT_I64_MAX-1)
49 #define MSVCRT_UI64_MAX (((unsigned __int64)0xffffffff << 32) | 0xffffffff)
50 #define MSVCRT_MB_LEN_MAX 5
51 #ifdef _WIN64
52 #define MSVCRT_SIZE_MAX MSVCRT_UI64_MAX
53 #else
54 #define MSVCRT_SIZE_MAX MSVCRT_ULONG_MAX
55 #endif
57 #define MSVCRT__MAX_DRIVE 3
58 #define MSVCRT__MAX_DIR 256
59 #define MSVCRT__MAX_FNAME 256
60 #define MSVCRT__MAX_EXT 256
62 typedef unsigned char MSVCRT_bool;
63 typedef unsigned short MSVCRT_wchar_t;
64 typedef unsigned short MSVCRT_wint_t;
65 typedef unsigned short MSVCRT_wctype_t;
66 typedef unsigned short MSVCRT__ino_t;
67 typedef unsigned int MSVCRT__fsize_t;
68 typedef int MSVCRT_long;
69 typedef unsigned int MSVCRT_ulong;
70 typedef __int64 MSVCRT_longlong;
71 #ifdef _WIN64
72 typedef unsigned __int64 MSVCRT_size_t;
73 typedef __int64 MSVCRT_intptr_t;
74 typedef unsigned __int64 MSVCRT_uintptr_t;
75 #else
76 typedef unsigned long MSVCRT_size_t;
77 typedef long MSVCRT_intptr_t;
78 typedef unsigned long MSVCRT_uintptr_t;
79 #endif
80 typedef unsigned int MSVCRT__dev_t;
81 typedef int MSVCRT__off_t;
82 typedef int MSVCRT_clock_t;
83 typedef int MSVCRT___time32_t;
84 typedef __int64 DECLSPEC_ALIGN(8) MSVCRT___time64_t;
85 typedef __int64 DECLSPEC_ALIGN(8) MSVCRT_fpos_t;
86 typedef int MSVCRT_mbstate_t;
88 typedef void (__cdecl *MSVCRT_terminate_handler)(void);
89 typedef void (__cdecl *MSVCRT_terminate_function)(void);
90 typedef void (__cdecl *MSVCRT_unexpected_handler)(void);
91 typedef void (__cdecl *MSVCRT_unexpected_function)(void);
92 typedef void (__cdecl *MSVCRT__se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info);
93 typedef void (__cdecl *MSVCRT__beginthread_start_routine_t)(void *);
94 typedef unsigned int (__stdcall *MSVCRT__beginthreadex_start_routine_t)(void *);
95 typedef int (__cdecl *MSVCRT__onexit_t)(void);
96 typedef void (__cdecl *MSVCRT_invalid_parameter_handler)(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, unsigned, MSVCRT_uintptr_t);
97 typedef void (__cdecl *MSVCRT_purecall_handler)(void);
98 typedef void (__cdecl *MSVCRT_security_error_handler)(int, void *);
100 typedef struct {ULONG x80[3];} MSVCRT__LDOUBLE; /* Intel 80 bit FP format has sizeof() 12 */
102 struct MSVCRT_tm {
103 int tm_sec;
104 int tm_min;
105 int tm_hour;
106 int tm_mday;
107 int tm_mon;
108 int tm_year;
109 int tm_wday;
110 int tm_yday;
111 int tm_isdst;
114 typedef struct MSVCRT_tagLC_ID {
115 unsigned short wLanguage;
116 unsigned short wCountry;
117 unsigned short wCodePage;
118 } MSVCRT_LC_ID, *MSVCRT_LPLC_ID;
120 typedef struct {
121 union {
122 char *str[43];
123 struct {
124 char *short_wday[7];
125 char *wday[7];
126 char *short_mon[12];
127 char *mon[12];
128 char *am;
129 char *pm;
130 char *short_date;
131 char *date;
132 char *time;
133 } names;
134 } str;
135 LCID lcid;
136 int unk[2];
137 union {
138 MSVCRT_wchar_t *wstr[43];
139 struct {
140 MSVCRT_wchar_t *short_wday[7];
141 MSVCRT_wchar_t *wday[7];
142 MSVCRT_wchar_t *short_mon[12];
143 MSVCRT_wchar_t *mon[12];
144 MSVCRT_wchar_t *am;
145 MSVCRT_wchar_t *pm;
146 MSVCRT_wchar_t *short_date;
147 MSVCRT_wchar_t *date;
148 MSVCRT_wchar_t *time;
149 } names;
150 } wstr;
151 char data[1];
152 } MSVCRT___lc_time_data;
154 typedef struct MSVCRT_threadlocaleinfostruct {
155 int refcount;
156 unsigned int lc_codepage;
157 unsigned int lc_collate_cp;
158 MSVCRT_ulong lc_handle[6];
159 MSVCRT_LC_ID lc_id[6];
160 struct {
161 char *locale;
162 MSVCRT_wchar_t *wlocale;
163 int *refcount;
164 int *wrefcount;
165 } lc_category[6];
166 int lc_clike;
167 int mb_cur_max;
168 int *lconv_intl_refcount;
169 int *lconv_num_refcount;
170 int *lconv_mon_refcount;
171 struct MSVCRT_lconv *lconv;
172 int *ctype1_refcount;
173 unsigned short *ctype1;
174 unsigned short *pctype;
175 unsigned char *pclmap;
176 unsigned char *pcumap;
177 MSVCRT___lc_time_data *lc_time_curr;
178 #if _MSVCR_VER >= 110
179 MSVCRT_wchar_t *lc_name[6];
180 #endif
181 } MSVCRT_threadlocinfo;
183 typedef struct MSVCRT_threadmbcinfostruct {
184 int refcount;
185 int mbcodepage;
186 int ismbcodepage;
187 int mblcid;
188 unsigned short mbulinfo[6];
189 unsigned char mbctype[257];
190 unsigned char mbcasemap[256];
191 } MSVCRT_threadmbcinfo;
193 typedef struct MSVCRT_threadlocaleinfostruct *MSVCRT_pthreadlocinfo;
194 typedef struct MSVCRT_threadmbcinfostruct *MSVCRT_pthreadmbcinfo;
196 typedef struct MSVCRT_localeinfo_struct
198 MSVCRT_pthreadlocinfo locinfo;
199 MSVCRT_pthreadmbcinfo mbcinfo;
200 } MSVCRT__locale_tstruct, *MSVCRT__locale_t;
203 /* TLS data */
204 extern DWORD msvcrt_tls_index DECLSPEC_HIDDEN;
206 /* Keep in sync with msvcr90/tests/msvcr90.c */
207 struct __thread_data {
208 DWORD tid;
209 HANDLE handle;
210 int thread_errno;
211 MSVCRT_ulong thread_doserrno;
212 int unk1;
213 unsigned int random_seed; /* seed for rand() */
214 char *strtok_next; /* next ptr for strtok() */
215 MSVCRT_wchar_t *wcstok_next; /* next ptr for wcstok() */
216 unsigned char *mbstok_next; /* next ptr for mbstok() */
217 char *strerror_buffer; /* buffer for strerror */
218 MSVCRT_wchar_t *wcserror_buffer; /* buffer for wcserror */
219 char *tmpnam_buffer; /* buffer for tmpname() */
220 MSVCRT_wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */
221 void *unk2[2];
222 char *asctime_buffer; /* buffer for asctime */
223 MSVCRT_wchar_t *wasctime_buffer; /* buffer for wasctime */
224 struct MSVCRT_tm *time_buffer; /* buffer for localtime/gmtime */
225 char *efcvt_buffer; /* buffer for ecvt/fcvt */
226 int unk3[2];
227 void *unk4[3];
228 EXCEPTION_POINTERS *xcptinfo;
229 int fpecode;
230 MSVCRT_pthreadmbcinfo mbcinfo;
231 MSVCRT_pthreadlocinfo locinfo;
232 BOOL have_locale;
233 int unk5[1];
234 MSVCRT_terminate_function terminate_handler;
235 MSVCRT_unexpected_function unexpected_handler;
236 MSVCRT__se_translator_function se_translator;
237 void *unk6[3];
238 int unk7;
239 EXCEPTION_RECORD *exc_record;
240 void *unk8[7];
241 LCID cached_lcid;
242 int unk9[3];
243 DWORD cached_cp;
244 char cached_locale[131];
245 void *unk10[100];
248 typedef struct __thread_data thread_data_t;
250 extern thread_data_t *msvcrt_get_thread_data(void) DECLSPEC_HIDDEN;
252 LCID MSVCRT_locale_to_LCID(const char*, unsigned short*) DECLSPEC_HIDDEN;
253 extern MSVCRT__locale_t MSVCRT_locale DECLSPEC_HIDDEN;
254 extern unsigned int MSVCRT___lc_codepage;
255 extern int MSVCRT___lc_collate_cp;
256 extern WORD MSVCRT__ctype [257];
258 void msvcrt_set_errno(int) DECLSPEC_HIDDEN;
259 #if _MSVCR_VER >= 80
260 void throw_bad_alloc(const char*) DECLSPEC_HIDDEN;
261 #endif
263 void __cdecl _purecall(void);
264 void __cdecl _amsg_exit(int errnum);
266 extern char **MSVCRT__environ;
267 extern MSVCRT_wchar_t **MSVCRT__wenviron;
269 extern char ** msvcrt_SnapshotOfEnvironmentA(char **) DECLSPEC_HIDDEN;
270 extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **) DECLSPEC_HIDDEN;
272 MSVCRT_wchar_t *msvcrt_wstrdupa(const char *) DECLSPEC_HIDDEN;
274 extern unsigned int MSVCRT__commode;
276 /* FIXME: This should be declared in new.h but it's not an extern "C" so
277 * it would not be much use anyway. Even for Winelib applications.
279 int __cdecl MSVCRT__set_new_mode(int mode);
281 void* __cdecl MSVCRT_operator_new(MSVCRT_size_t);
282 void __cdecl MSVCRT_operator_delete(void*);
284 typedef void* (__cdecl *malloc_func_t)(MSVCRT_size_t);
285 typedef void (__cdecl *free_func_t)(void*);
287 /* Setup and teardown multi threaded locks */
288 extern void msvcrt_init_mt_locks(void) DECLSPEC_HIDDEN;
289 extern void msvcrt_free_locks(void) DECLSPEC_HIDDEN;
291 extern void msvcrt_init_exception(void*) DECLSPEC_HIDDEN;
292 extern BOOL msvcrt_init_locale(void) DECLSPEC_HIDDEN;
293 extern void msvcrt_init_math(void) DECLSPEC_HIDDEN;
294 extern void msvcrt_init_io(void) DECLSPEC_HIDDEN;
295 extern void msvcrt_free_io(void) DECLSPEC_HIDDEN;
296 extern void msvcrt_init_console(void) DECLSPEC_HIDDEN;
297 extern void msvcrt_free_console(void) DECLSPEC_HIDDEN;
298 extern void msvcrt_init_args(void) DECLSPEC_HIDDEN;
299 extern void msvcrt_free_args(void) DECLSPEC_HIDDEN;
300 extern void msvcrt_init_signals(void) DECLSPEC_HIDDEN;
301 extern void msvcrt_free_signals(void) DECLSPEC_HIDDEN;
302 extern void msvcrt_free_popen_data(void) DECLSPEC_HIDDEN;
303 extern BOOL msvcrt_init_heap(void) DECLSPEC_HIDDEN;
304 extern void msvcrt_destroy_heap(void) DECLSPEC_HIDDEN;
306 extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN;
308 extern unsigned int __cdecl _control87(unsigned int, unsigned int);
310 /* run-time error codes */
311 #define _RT_STACK 0
312 #define _RT_NULLPTR 1
313 #define _RT_FLOAT 2
314 #define _RT_INTDIV 3
315 #define _RT_EXECMEM 5
316 #define _RT_EXECFORM 6
317 #define _RT_EXECENV 7
318 #define _RT_SPACEARG 8
319 #define _RT_SPACEENV 9
320 #define _RT_ABORT 10
321 #define _RT_NPTR 12
322 #define _RT_FPTR 13
323 #define _RT_BREAK 14
324 #define _RT_INT 15
325 #define _RT_THREAD 16
326 #define _RT_LOCK 17
327 #define _RT_HEAP 18
328 #define _RT_OPENCON 19
329 #define _RT_QWIN 20
330 #define _RT_NOMAIN 21
331 #define _RT_NONCONT 22
332 #define _RT_INVALDISP 23
333 #define _RT_ONEXIT 24
334 #define _RT_PUREVIRT 25
335 #define _RT_STDIOINIT 26
336 #define _RT_LOWIOINIT 27
337 #define _RT_HEAPINIT 28
338 #define _RT_DOMAIN 120
339 #define _RT_SING 121
340 #define _RT_TLOSS 122
341 #define _RT_CRNL 252
342 #define _RT_BANNER 255
344 struct MSVCRT___timeb32 {
345 MSVCRT___time32_t time;
346 unsigned short millitm;
347 short timezone;
348 short dstflag;
351 struct MSVCRT___timeb64 {
352 MSVCRT___time64_t time;
353 unsigned short millitm;
354 short timezone;
355 short dstflag;
358 struct MSVCRT__iobuf {
359 char* _ptr;
360 int _cnt;
361 char* _base;
362 int _flag;
363 int _file;
364 int _charbuf;
365 int _bufsiz;
366 char* _tmpfname;
369 typedef struct MSVCRT__iobuf MSVCRT_FILE;
371 struct MSVCRT_lconv {
372 char* decimal_point;
373 char* thousands_sep;
374 char* grouping;
375 char* int_curr_symbol;
376 char* currency_symbol;
377 char* mon_decimal_point;
378 char* mon_thousands_sep;
379 char* mon_grouping;
380 char* positive_sign;
381 char* negative_sign;
382 char int_frac_digits;
383 char frac_digits;
384 char p_cs_precedes;
385 char p_sep_by_space;
386 char n_cs_precedes;
387 char n_sep_by_space;
388 char p_sign_posn;
389 char n_sign_posn;
390 #if _MSVCR_VER >= 120
391 MSVCRT_wchar_t* _W_decimal_point;
392 MSVCRT_wchar_t* _W_thousands_sep;
393 MSVCRT_wchar_t* _W_int_curr_symbol;
394 MSVCRT_wchar_t* _W_currency_symbol;
395 MSVCRT_wchar_t* _W_mon_decimal_point;
396 MSVCRT_wchar_t* _W_mon_thousands_sep;
397 MSVCRT_wchar_t* _W_positive_sign;
398 MSVCRT_wchar_t* _W_negative_sign;
399 #endif
402 struct MSVCRT__exception {
403 int type;
404 char* name;
405 double arg1;
406 double arg2;
407 double retval;
410 struct MSVCRT__complex {
411 double x; /* Real part */
412 double y; /* Imaginary part */
415 typedef struct MSVCRT__div_t {
416 int quot; /* quotient */
417 int rem; /* remainder */
418 } MSVCRT_div_t;
420 typedef struct MSVCRT__ldiv_t {
421 MSVCRT_long quot; /* quotient */
422 MSVCRT_long rem; /* remainder */
423 } MSVCRT_ldiv_t;
425 struct MSVCRT__heapinfo {
426 int* _pentry;
427 MSVCRT_size_t _size;
428 int _useflag;
431 #ifdef __i386__
432 struct MSVCRT___JUMP_BUFFER {
433 unsigned long Ebp;
434 unsigned long Ebx;
435 unsigned long Edi;
436 unsigned long Esi;
437 unsigned long Esp;
438 unsigned long Eip;
439 unsigned long Registration;
440 unsigned long TryLevel;
441 /* Start of new struct members */
442 unsigned long Cookie;
443 unsigned long UnwindFunc;
444 unsigned long UnwindData[6];
446 #elif defined(__x86_64__)
447 struct MSVCRT__SETJMP_FLOAT128
449 unsigned __int64 DECLSPEC_ALIGN(16) Part[2];
451 struct MSVCRT___JUMP_BUFFER
453 unsigned __int64 Frame;
454 unsigned __int64 Rbx;
455 unsigned __int64 Rsp;
456 unsigned __int64 Rbp;
457 unsigned __int64 Rsi;
458 unsigned __int64 Rdi;
459 unsigned __int64 R12;
460 unsigned __int64 R13;
461 unsigned __int64 R14;
462 unsigned __int64 R15;
463 unsigned __int64 Rip;
464 unsigned __int64 Spare;
465 struct MSVCRT__SETJMP_FLOAT128 Xmm6;
466 struct MSVCRT__SETJMP_FLOAT128 Xmm7;
467 struct MSVCRT__SETJMP_FLOAT128 Xmm8;
468 struct MSVCRT__SETJMP_FLOAT128 Xmm9;
469 struct MSVCRT__SETJMP_FLOAT128 Xmm10;
470 struct MSVCRT__SETJMP_FLOAT128 Xmm11;
471 struct MSVCRT__SETJMP_FLOAT128 Xmm12;
472 struct MSVCRT__SETJMP_FLOAT128 Xmm13;
473 struct MSVCRT__SETJMP_FLOAT128 Xmm14;
474 struct MSVCRT__SETJMP_FLOAT128 Xmm15;
476 #elif defined(__arm__)
477 struct MSVCRT___JUMP_BUFFER
479 unsigned long Frame;
480 unsigned long R4;
481 unsigned long R5;
482 unsigned long R6;
483 unsigned long R7;
484 unsigned long R8;
485 unsigned long R9;
486 unsigned long R10;
487 unsigned long R11;
488 unsigned long Sp;
489 unsigned long Pc;
490 unsigned long Fpscr;
491 unsigned long long D[8];
493 #endif /* __i386__ */
495 struct MSVCRT__diskfree_t {
496 unsigned int total_clusters;
497 unsigned int avail_clusters;
498 unsigned int sectors_per_cluster;
499 unsigned int bytes_per_sector;
502 struct MSVCRT__finddata32_t {
503 unsigned int attrib;
504 MSVCRT___time32_t time_create;
505 MSVCRT___time32_t time_access;
506 MSVCRT___time32_t time_write;
507 MSVCRT__fsize_t size;
508 char name[260];
511 struct MSVCRT__finddata32i64_t {
512 unsigned int attrib;
513 MSVCRT___time32_t time_create;
514 MSVCRT___time32_t time_access;
515 MSVCRT___time32_t time_write;
516 __int64 DECLSPEC_ALIGN(8) size;
517 char name[260];
520 struct MSVCRT__finddata64i32_t {
521 unsigned int attrib;
522 MSVCRT___time64_t time_create;
523 MSVCRT___time64_t time_access;
524 MSVCRT___time64_t time_write;
525 MSVCRT__fsize_t size;
526 char name[260];
529 struct MSVCRT__finddata64_t {
530 unsigned int attrib;
531 MSVCRT___time64_t time_create;
532 MSVCRT___time64_t time_access;
533 MSVCRT___time64_t time_write;
534 __int64 DECLSPEC_ALIGN(8) size;
535 char name[260];
538 struct MSVCRT__wfinddata32_t {
539 unsigned int attrib;
540 MSVCRT___time32_t time_create;
541 MSVCRT___time32_t time_access;
542 MSVCRT___time32_t time_write;
543 MSVCRT__fsize_t size;
544 MSVCRT_wchar_t name[260];
547 struct MSVCRT__wfinddata32i64_t {
548 unsigned int attrib;
549 MSVCRT___time32_t time_create;
550 MSVCRT___time32_t time_access;
551 MSVCRT___time32_t time_write;
552 __int64 DECLSPEC_ALIGN(8) size;
553 MSVCRT_wchar_t name[260];
556 struct MSVCRT__wfinddata64i32_t {
557 unsigned int attrib;
558 MSVCRT___time64_t time_create;
559 MSVCRT___time64_t time_access;
560 MSVCRT___time64_t time_write;
561 MSVCRT__fsize_t size;
562 MSVCRT_wchar_t name[260];
565 struct MSVCRT__wfinddata64_t {
566 unsigned int attrib;
567 MSVCRT___time64_t time_create;
568 MSVCRT___time64_t time_access;
569 MSVCRT___time64_t time_write;
570 __int64 DECLSPEC_ALIGN(8) size;
571 MSVCRT_wchar_t name[260];
574 struct MSVCRT___utimbuf32
576 MSVCRT___time32_t actime;
577 MSVCRT___time32_t modtime;
580 struct MSVCRT___utimbuf64
582 MSVCRT___time64_t actime;
583 MSVCRT___time64_t modtime;
586 /* for FreeBSD */
587 #undef st_atime
588 #undef st_ctime
589 #undef st_mtime
591 struct MSVCRT__stat32 {
592 MSVCRT__dev_t st_dev;
593 MSVCRT__ino_t st_ino;
594 unsigned short st_mode;
595 short st_nlink;
596 short st_uid;
597 short st_gid;
598 MSVCRT__dev_t st_rdev;
599 MSVCRT__off_t st_size;
600 MSVCRT___time32_t st_atime;
601 MSVCRT___time32_t st_mtime;
602 MSVCRT___time32_t st_ctime;
605 struct MSVCRT__stat32i64 {
606 MSVCRT__dev_t st_dev;
607 MSVCRT__ino_t st_ino;
608 unsigned short st_mode;
609 short st_nlink;
610 short st_uid;
611 short st_gid;
612 MSVCRT__dev_t st_rdev;
613 __int64 DECLSPEC_ALIGN(8) st_size;
614 MSVCRT___time32_t st_atime;
615 MSVCRT___time32_t st_mtime;
616 MSVCRT___time32_t st_ctime;
619 struct MSVCRT__stat64i32 {
620 MSVCRT__dev_t st_dev;
621 MSVCRT__ino_t st_ino;
622 unsigned short st_mode;
623 short st_nlink;
624 short st_uid;
625 short st_gid;
626 MSVCRT__dev_t st_rdev;
627 MSVCRT__off_t st_size;
628 MSVCRT___time64_t st_atime;
629 MSVCRT___time64_t st_mtime;
630 MSVCRT___time64_t st_ctime;
633 struct MSVCRT__stat64 {
634 MSVCRT__dev_t st_dev;
635 MSVCRT__ino_t st_ino;
636 unsigned short st_mode;
637 short st_nlink;
638 short st_uid;
639 short st_gid;
640 MSVCRT__dev_t st_rdev;
641 __int64 DECLSPEC_ALIGN(8) st_size;
642 MSVCRT___time64_t st_atime;
643 MSVCRT___time64_t st_mtime;
644 MSVCRT___time64_t st_ctime;
647 #ifdef _WIN64
648 #define MSVCRT__finddata_t MSVCRT__finddata64i32_t
649 #define MSVCRT__finddatai64_t MSVCRT__finddata64_t
650 #define MSVCRT__wfinddata_t MSVCRT__wfinddata64i32_t
651 #define MSVCRT__wfinddatai64_t MSVCRT__wfinddata64_t
652 #define MSVCRT__stat MSVCRT__stat64i32
653 #define MSVCRT__stati64 MSVCRT__stat64
654 #else
655 #define MSVCRT__finddata_t MSVCRT__finddata32_t
656 #define MSVCRT__finddatai64_t MSVCRT__finddata32i64_t
657 #define MSVCRT__wfinddata_t MSVCRT__wfinddata32_t
658 #define MSVCRT__wfinddatai64_t MSVCRT__wfinddata32i64_t
659 #define MSVCRT__stat MSVCRT__stat32
660 #define MSVCRT__stati64 MSVCRT__stat32i64
661 #endif
663 #define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
664 #define MSVCRT_EOF (-1)
665 #define MSVCRT_TMP_MAX 0x7fff
666 #define MSVCRT_TMP_MAX_S 0x7fffffff
667 #define MSVCRT_RAND_MAX 0x7fff
668 #define MSVCRT_BUFSIZ 512
670 #define MSVCRT_SEEK_SET 0
671 #define MSVCRT_SEEK_CUR 1
672 #define MSVCRT_SEEK_END 2
674 #define MSVCRT_STDIN_FILENO 0
675 #define MSVCRT_STDOUT_FILENO 1
676 #define MSVCRT_STDERR_FILENO 2
678 /* more file._flag flags, but these conflict with Unix */
679 #define MSVCRT__IOFBF 0x0000
680 #define MSVCRT__IONBF 0x0004
681 #define MSVCRT__IOLBF 0x0040
683 #define MSVCRT_FILENAME_MAX 260
684 #define MSVCRT_DRIVE_MAX 3
685 #define MSVCRT_FNAME_MAX 256
686 #define MSVCRT_DIR_MAX 256
687 #define MSVCRT_EXT_MAX 256
688 #define MSVCRT_PATH_MAX 260
689 #define MSVCRT_stdin (MSVCRT__iob+MSVCRT_STDIN_FILENO)
690 #define MSVCRT_stdout (MSVCRT__iob+MSVCRT_STDOUT_FILENO)
691 #define MSVCRT_stderr (MSVCRT__iob+MSVCRT_STDERR_FILENO)
693 #define MSVCRT__P_WAIT 0
694 #define MSVCRT__P_NOWAIT 1
695 #define MSVCRT__P_OVERLAY 2
696 #define MSVCRT__P_NOWAITO 3
697 #define MSVCRT__P_DETACH 4
699 #define MSVCRT_EPERM 1
700 #define MSVCRT_ENOENT 2
701 #define MSVCRT_ESRCH 3
702 #define MSVCRT_EINTR 4
703 #define MSVCRT_EIO 5
704 #define MSVCRT_ENXIO 6
705 #define MSVCRT_E2BIG 7
706 #define MSVCRT_ENOEXEC 8
707 #define MSVCRT_EBADF 9
708 #define MSVCRT_ECHILD 10
709 #define MSVCRT_EAGAIN 11
710 #define MSVCRT_ENOMEM 12
711 #define MSVCRT_EACCES 13
712 #define MSVCRT_EFAULT 14
713 #define MSVCRT_EBUSY 16
714 #define MSVCRT_EEXIST 17
715 #define MSVCRT_EXDEV 18
716 #define MSVCRT_ENODEV 19
717 #define MSVCRT_ENOTDIR 20
718 #define MSVCRT_EISDIR 21
719 #define MSVCRT_EINVAL 22
720 #define MSVCRT_ENFILE 23
721 #define MSVCRT_EMFILE 24
722 #define MSVCRT_ENOTTY 25
723 #define MSVCRT_EFBIG 27
724 #define MSVCRT_ENOSPC 28
725 #define MSVCRT_ESPIPE 29
726 #define MSVCRT_EROFS 30
727 #define MSVCRT_EMLINK 31
728 #define MSVCRT_EPIPE 32
729 #define MSVCRT_EDOM 33
730 #define MSVCRT_ERANGE 34
731 #define MSVCRT_EDEADLK 36
732 #define MSVCRT_EDEADLOCK MSVCRT_EDEADLK
733 #define MSVCRT_ENAMETOOLONG 38
734 #define MSVCRT_ENOLCK 39
735 #define MSVCRT_ENOSYS 40
736 #define MSVCRT_ENOTEMPTY 41
737 #define MSVCRT_EILSEQ 42
738 #define MSVCRT_STRUNCATE 80
740 #define MSVCRT_LC_ALL 0
741 #define MSVCRT_LC_COLLATE 1
742 #define MSVCRT_LC_CTYPE 2
743 #define MSVCRT_LC_MONETARY 3
744 #define MSVCRT_LC_NUMERIC 4
745 #define MSVCRT_LC_TIME 5
746 #define MSVCRT_LC_MIN MSVCRT_LC_ALL
747 #define MSVCRT_LC_MAX MSVCRT_LC_TIME
749 #define MSVCRT__HEAPEMPTY -1
750 #define MSVCRT__HEAPOK -2
751 #define MSVCRT__HEAPBADBEGIN -3
752 #define MSVCRT__HEAPBADNODE -4
753 #define MSVCRT__HEAPEND -5
754 #define MSVCRT__HEAPBADPTR -6
756 #define MSVCRT__FREEENTRY 0
757 #define MSVCRT__USEDENTRY 1
759 #define MSVCRT__OUT_TO_DEFAULT 0
760 #define MSVCRT__OUT_TO_STDERR 1
761 #define MSVCRT__OUT_TO_MSGBOX 2
762 #define MSVCRT__REPORT_ERRMODE 3
764 /* ASCII char classification table - binary compatible */
765 #define MSVCRT__UPPER 0x0001 /* C1_UPPER */
766 #define MSVCRT__LOWER 0x0002 /* C1_LOWER */
767 #define MSVCRT__DIGIT 0x0004 /* C1_DIGIT */
768 #define MSVCRT__SPACE 0x0008 /* C1_SPACE */
769 #define MSVCRT__PUNCT 0x0010 /* C1_PUNCT */
770 #define MSVCRT__CONTROL 0x0020 /* C1_CNTRL */
771 #define MSVCRT__BLANK 0x0040 /* C1_BLANK */
772 #define MSVCRT__HEX 0x0080 /* C1_XDIGIT */
773 #define MSVCRT__LEADBYTE 0x8000
774 #define MSVCRT__ALPHA (0x0100|MSVCRT__UPPER|MSVCRT__LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
776 #define MSVCRT__IOREAD 0x0001
777 #define MSVCRT__IOWRT 0x0002
778 #define MSVCRT__IOMYBUF 0x0008
779 #define MSVCRT__IOEOF 0x0010
780 #define MSVCRT__IOERR 0x0020
781 #define MSVCRT__IOSTRG 0x0040
782 #define MSVCRT__IORW 0x0080
783 #define MSVCRT__USERBUF 0x0100
784 #define MSVCRT__IOCOMMIT 0x4000
786 #define MSVCRT__S_IEXEC 0x0040
787 #define MSVCRT__S_IWRITE 0x0080
788 #define MSVCRT__S_IREAD 0x0100
789 #define MSVCRT__S_IFIFO 0x1000
790 #define MSVCRT__S_IFCHR 0x2000
791 #define MSVCRT__S_IFDIR 0x4000
792 #define MSVCRT__S_IFREG 0x8000
793 #define MSVCRT__S_IFMT 0xF000
795 #define MSVCRT__LK_UNLCK 0
796 #define MSVCRT__LK_LOCK 1
797 #define MSVCRT__LK_NBLCK 2
798 #define MSVCRT__LK_RLCK 3
799 #define MSVCRT__LK_NBRLCK 4
801 #define MSVCRT__SH_COMPAT 0x00 /* Compatibility */
802 #define MSVCRT__SH_DENYRW 0x10 /* Deny read/write */
803 #define MSVCRT__SH_DENYWR 0x20 /* Deny write */
804 #define MSVCRT__SH_DENYRD 0x30 /* Deny read */
805 #define MSVCRT__SH_DENYNO 0x40 /* Deny nothing */
807 #define MSVCRT__O_RDONLY 0
808 #define MSVCRT__O_WRONLY 1
809 #define MSVCRT__O_RDWR 2
810 #define MSVCRT__O_ACCMODE (MSVCRT__O_RDONLY|MSVCRT__O_WRONLY|MSVCRT__O_RDWR)
811 #define MSVCRT__O_APPEND 0x0008
812 #define MSVCRT__O_RANDOM 0x0010
813 #define MSVCRT__O_SEQUENTIAL 0x0020
814 #define MSVCRT__O_TEMPORARY 0x0040
815 #define MSVCRT__O_NOINHERIT 0x0080
816 #define MSVCRT__O_CREAT 0x0100
817 #define MSVCRT__O_TRUNC 0x0200
818 #define MSVCRT__O_EXCL 0x0400
819 #define MSVCRT__O_SHORT_LIVED 0x1000
820 #define MSVCRT__O_TEXT 0x4000
821 #define MSVCRT__O_BINARY 0x8000
822 #define MSVCRT__O_RAW MSVCRT__O_BINARY
823 #define MSVCRT__O_WTEXT 0x10000
824 #define MSVCRT__O_U16TEXT 0x20000
825 #define MSVCRT__O_U8TEXT 0x40000
827 /* _statusfp bit flags */
828 #define MSVCRT__SW_INEXACT 0x00000001 /* inexact (precision) */
829 #define MSVCRT__SW_UNDERFLOW 0x00000002 /* underflow */
830 #define MSVCRT__SW_OVERFLOW 0x00000004 /* overflow */
831 #define MSVCRT__SW_ZERODIVIDE 0x00000008 /* zero divide */
832 #define MSVCRT__SW_INVALID 0x00000010 /* invalid */
834 #define MSVCRT__SW_UNEMULATED 0x00000040 /* unemulated instruction */
835 #define MSVCRT__SW_SQRTNEG 0x00000080 /* square root of a neg number */
836 #define MSVCRT__SW_STACKOVERFLOW 0x00000200 /* FP stack overflow */
837 #define MSVCRT__SW_STACKUNDERFLOW 0x00000400 /* FP stack underflow */
839 #define MSVCRT__SW_DENORMAL 0x00080000 /* denormal status bit */
841 /* fpclass constants */
842 #define MSVCRT__FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
843 #define MSVCRT__FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
844 #define MSVCRT__FPCLASS_NINF 0x0004 /* Negative Infinity */
845 #define MSVCRT__FPCLASS_NN 0x0008 /* Negative Normal */
846 #define MSVCRT__FPCLASS_ND 0x0010 /* Negative Denormal */
847 #define MSVCRT__FPCLASS_NZ 0x0020 /* Negative Zero */
848 #define MSVCRT__FPCLASS_PZ 0x0040 /* Positive Zero */
849 #define MSVCRT__FPCLASS_PD 0x0080 /* Positive Denormal */
850 #define MSVCRT__FPCLASS_PN 0x0100 /* Positive Normal */
851 #define MSVCRT__FPCLASS_PINF 0x0200 /* Positive Infinity */
853 /* fpclassify constants */
854 #define MSVCRT_FP_INFINITE 1
855 #define MSVCRT_FP_NAN 2
856 #define MSVCRT_FP_NORMAL -1
857 #define MSVCRT_FP_SUBNORMAL -2
858 #define MSVCRT_FP_ZERO 0
860 #define MSVCRT__MCW_EM 0x0008001f
861 #define MSVCRT__MCW_IC 0x00040000
862 #define MSVCRT__MCW_RC 0x00000300
863 #define MSVCRT__MCW_PC 0x00030000
864 #define MSVCRT__MCW_DN 0x03000000
866 #define MSVCRT__EM_INVALID 0x00000010
867 #define MSVCRT__EM_DENORMAL 0x00080000
868 #define MSVCRT__EM_ZERODIVIDE 0x00000008
869 #define MSVCRT__EM_OVERFLOW 0x00000004
870 #define MSVCRT__EM_UNDERFLOW 0x00000002
871 #define MSVCRT__EM_INEXACT 0x00000001
872 #define MSVCRT__IC_AFFINE 0x00040000
873 #define MSVCRT__IC_PROJECTIVE 0x00000000
874 #define MSVCRT__RC_CHOP 0x00000300
875 #define MSVCRT__RC_UP 0x00000200
876 #define MSVCRT__RC_DOWN 0x00000100
877 #define MSVCRT__RC_NEAR 0x00000000
878 #define MSVCRT__PC_24 0x00020000
879 #define MSVCRT__PC_53 0x00010000
880 #define MSVCRT__PC_64 0x00000000
881 #define MSVCRT__DN_SAVE 0x00000000
882 #define MSVCRT__DN_FLUSH 0x01000000
883 #define MSVCRT__DN_FLUSH_OPERANDS_SAVE_RESULTS 0x02000000
884 #define MSVCRT__DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000
885 #define MSVCRT__EM_AMBIGUOUS 0x80000000
887 #define MSVCRT_CLOCKS_PER_SEC 1000
889 /* signals */
890 #define MSVCRT_SIGINT 2
891 #define MSVCRT_SIGILL 4
892 #define MSVCRT_SIGFPE 8
893 #define MSVCRT_SIGSEGV 11
894 #define MSVCRT_SIGTERM 15
895 #define MSVCRT_SIGBREAK 21
896 #define MSVCRT_SIGABRT 22
897 #define MSVCRT_NSIG (MSVCRT_SIGABRT + 1)
899 typedef void (__cdecl *MSVCRT___sighandler_t)(int);
901 #define MSVCRT_SIG_DFL ((MSVCRT___sighandler_t)0)
902 #define MSVCRT_SIG_IGN ((MSVCRT___sighandler_t)1)
903 #define MSVCRT_SIG_ERR ((MSVCRT___sighandler_t)-1)
905 #define MSVCRT__FPE_INVALID 0x81
906 #define MSVCRT__FPE_DENORMAL 0x82
907 #define MSVCRT__FPE_ZERODIVIDE 0x83
908 #define MSVCRT__FPE_OVERFLOW 0x84
909 #define MSVCRT__FPE_UNDERFLOW 0x85
910 #define MSVCRT__FPE_INEXACT 0x86
911 #define MSVCRT__FPE_UNEMULATED 0x87
912 #define MSVCRT__FPE_SQRTNEG 0x88
913 #define MSVCRT__FPE_STACKOVERFLOW 0x8a
914 #define MSVCRT__FPE_STACKUNDERFLOW 0x8b
915 #define MSVCRT__FPE_EXPLICITGEN 0x8c
917 #define _MS 0x01
918 #define _MP 0x02
919 #define _M1 0x04
920 #define _M2 0x08
922 #define _SBUP 0x10
923 #define _SBLOW 0x20
925 #define _MBC_SINGLE 0
926 #define _MBC_LEAD 1
927 #define _MBC_TRAIL 2
928 #define _MBC_ILLEGAL -1
930 #define _MB_CP_SBCS 0
931 #define _MB_CP_OEM -2
932 #define _MB_CP_ANSI -3
933 #define _MB_CP_LOCALE -4
935 #define MSVCRT__TRUNCATE ((MSVCRT_size_t)-1)
937 #define _MAX__TIME64_T (((MSVCRT___time64_t)0x00000007 << 32) | 0x93406FFF)
939 /* _set_abort_behavior codes */
940 #define MSVCRT__WRITE_ABORT_MSG 1
941 #define MSVCRT__CALL_REPORTFAULT 2
943 /* _get_output_format return code */
944 #define MSVCRT__TWO_DIGIT_EXPONENT 0x1
946 #define MSVCRT__NLSCMPERROR ((unsigned int)0x7fffffff)
948 void __cdecl MSVCRT_free(void*);
949 void* __cdecl MSVCRT_malloc(MSVCRT_size_t);
950 void* __cdecl MSVCRT_calloc(MSVCRT_size_t,MSVCRT_size_t);
951 void* __cdecl MSVCRT_realloc(void*,MSVCRT_size_t);
953 int __cdecl MSVCRT_iswalpha(MSVCRT_wint_t);
954 int __cdecl MSVCRT_iswspace(MSVCRT_wint_t);
955 int __cdecl MSVCRT_iswdigit(MSVCRT_wint_t);
956 int __cdecl MSVCRT_isleadbyte(int);
957 int __cdecl MSVCRT__isleadbyte_l(int, MSVCRT__locale_t);
959 void __cdecl MSVCRT__lock_file(MSVCRT_FILE*);
960 void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*);
961 int __cdecl MSVCRT_fgetc(MSVCRT_FILE*);
962 int __cdecl MSVCRT__fgetc_nolock(MSVCRT_FILE*);
963 int __cdecl MSVCRT__fputc_nolock(int,MSVCRT_FILE*);
964 int __cdecl MSVCRT_ungetc(int,MSVCRT_FILE*);
965 int __cdecl MSVCRT__ungetc_nolock(int,MSVCRT_FILE*);
966 MSVCRT_wint_t __cdecl MSVCRT_fgetwc(MSVCRT_FILE*);
967 MSVCRT_wint_t __cdecl MSVCRT__fgetwc_nolock(MSVCRT_FILE*);
968 MSVCRT_wint_t __cdecl MSVCRT__fputwc_nolock(MSVCRT_wint_t,MSVCRT_FILE*);
969 MSVCRT_wint_t __cdecl MSVCRT_ungetwc(MSVCRT_wint_t,MSVCRT_FILE*);
970 MSVCRT_wint_t __cdecl MSVCRT__ungetwc_nolock(MSVCRT_wint_t, MSVCRT_FILE*);
971 int __cdecl MSVCRT__fseeki64_nolock(MSVCRT_FILE*,__int64,int);
972 __int64 __cdecl MSVCRT__ftelli64(MSVCRT_FILE* file);
973 __int64 __cdecl MSVCRT__ftelli64_nolock(MSVCRT_FILE*);
974 void __cdecl MSVCRT__exit(int);
975 void __cdecl MSVCRT_abort(void);
976 MSVCRT_ulong* __cdecl MSVCRT___doserrno(void);
977 int* __cdecl MSVCRT__errno(void);
978 char* __cdecl MSVCRT_getenv(const char*);
979 MSVCRT_size_t __cdecl MSVCRT__fread_nolock(void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*);
980 MSVCRT_size_t __cdecl MSVCRT__fread_nolock_s(void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*);
981 MSVCRT_size_t __cdecl MSVCRT__fwrite_nolock(const void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*);
982 int __cdecl MSVCRT_fclose(MSVCRT_FILE*);
983 int __cdecl MSVCRT__fclose_nolock(MSVCRT_FILE*);
984 int __cdecl MSVCRT__fflush_nolock(MSVCRT_FILE*);
985 void __cdecl MSVCRT_terminate(void);
986 MSVCRT_FILE* __cdecl MSVCRT__iob_func(void);
987 MSVCRT_clock_t __cdecl MSVCRT_clock(void);
988 MSVCRT___time32_t __cdecl MSVCRT__time32(MSVCRT___time32_t*);
989 MSVCRT___time64_t __cdecl MSVCRT__time64(MSVCRT___time64_t*);
990 MSVCRT_FILE* __cdecl MSVCRT__fdopen(int, const char *);
991 MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int, const MSVCRT_wchar_t *);
992 int __cdecl MSVCRT_vsnprintf(char *str, MSVCRT_size_t len, const char *format, __ms_va_list valist);
993 int __cdecl MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, MSVCRT_size_t len,
994 const MSVCRT_wchar_t *format, __ms_va_list valist );
995 int __cdecl MSVCRT__snwprintf(MSVCRT_wchar_t*, unsigned int, const MSVCRT_wchar_t*, ...);
996 int __cdecl MSVCRT_sprintf(char*,const char*,...);
997 int __cdecl MSVCRT__snprintf(char*,unsigned int,const char*,...);
998 int __cdecl MSVCRT__scprintf(const char*,...);
999 int __cdecl MSVCRT_raise(int sig);
1000 int __cdecl MSVCRT__set_printf_count_output(int);
1002 #define MSVCRT__ENABLE_PER_THREAD_LOCALE 1
1003 #define MSVCRT__DISABLE_PER_THREAD_LOCALE 2
1005 extern MSVCRT__locale_t MSVCRT_locale;
1006 MSVCRT_pthreadlocinfo get_locinfo(void) DECLSPEC_HIDDEN;
1007 MSVCRT_pthreadmbcinfo get_mbcinfo(void) DECLSPEC_HIDDEN;
1008 void __cdecl MSVCRT__free_locale(MSVCRT__locale_t);
1009 void free_locinfo(MSVCRT_pthreadlocinfo) DECLSPEC_HIDDEN;
1010 void free_mbcinfo(MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
1011 int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
1013 #ifndef __WINE_MSVCRT_TEST
1014 int __cdecl MSVCRT__write(int,const void*,unsigned int);
1015 int __cdecl _getch(void);
1016 int __cdecl _ismbblead(unsigned int);
1017 int __cdecl _ismbblead_l(unsigned int, MSVCRT__locale_t);
1018 int __cdecl _ismbclegal(unsigned int c);
1019 int __cdecl _ismbstrail(const unsigned char* start, const unsigned char* str);
1020 int __cdecl MSVCRT_mbtowc(MSVCRT_wchar_t*,const char*,MSVCRT_size_t);
1021 MSVCRT_size_t __cdecl MSVCRT_mbstowcs(MSVCRT_wchar_t*,const char*,MSVCRT_size_t);
1022 MSVCRT_size_t __cdecl MSVCRT_wcstombs(char*,const MSVCRT_wchar_t*,MSVCRT_size_t);
1023 MSVCRT_intptr_t __cdecl MSVCRT__spawnve(int,const char*,const char* const *,const char* const *);
1024 MSVCRT_intptr_t __cdecl MSVRT__spawnvpe(int,const char*,const char* const *,const char* const *);
1025 MSVCRT_intptr_t __cdecl MSVCRT__wspawnve(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *);
1026 MSVCRT_intptr_t __cdecl MSVCRT__wspawnvpe(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *);
1027 void __cdecl MSVCRT__searchenv(const char*,const char*,char*);
1028 int __cdecl MSVCRT__getdrive(void);
1029 char* __cdecl MSVCRT__strdup(const char*);
1030 char* __cdecl MSVCRT__strnset(char*,int,MSVCRT_size_t);
1031 char* __cdecl _strset(char*,int);
1032 int __cdecl _ungetch(int);
1033 int __cdecl _cputs(const char*);
1034 int __cdecl _cprintf(const char*,...);
1035 int __cdecl _cwprintf(const MSVCRT_wchar_t*,...);
1036 char*** __cdecl MSVCRT___p__environ(void);
1037 int* __cdecl __p___mb_cur_max(void);
1038 unsigned int* __cdecl __p__fmode(void);
1039 MSVCRT_wchar_t* __cdecl MSVCRT__wcsdup(const MSVCRT_wchar_t*);
1040 MSVCRT_wchar_t*** __cdecl MSVCRT___p__wenviron(void);
1041 INT __cdecl MSVCRT_wctomb(char*,MSVCRT_wchar_t);
1042 char* __cdecl MSVCRT__strdate(char* date);
1043 char* __cdecl MSVCRT__strtime(char* date);
1044 int __cdecl _setmbcp(int);
1045 int __cdecl MSVCRT__close(int);
1046 int __cdecl MSVCRT__dup(int);
1047 int __cdecl MSVCRT__dup2(int, int);
1048 int __cdecl MSVCRT__pipe(int *, unsigned int, int);
1049 MSVCRT_wchar_t* __cdecl MSVCRT__wgetenv(const MSVCRT_wchar_t*);
1050 void __cdecl MSVCRT__wsearchenv(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_wchar_t*);
1051 MSVCRT_intptr_t __cdecl MSVCRT__spawnvpe(int, const char*, const char* const*, const char* const*);
1052 void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_wchar_t *func,
1053 const MSVCRT_wchar_t *file, unsigned int line, MSVCRT_uintptr_t arg);
1054 int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t);
1055 int __cdecl MSVCRT__tolower_l(int,MSVCRT__locale_t);
1056 int __cdecl MSVCRT__strnicoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
1057 int __cdecl MSVCRT__strncoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
1058 unsigned int __cdecl MSVCRT__get_output_format(void);
1059 char* __cdecl MSVCRT_strtok_s(char*, const char*, char**);
1061 /* Maybe one day we'll enable the invalid parameter handlers with the full set of information (msvcrXXd)
1062 * #define MSVCRT_INVALID_PMT(x) MSVCRT_call_invalid_parameter_handler(x, __FUNCTION__, __FILE__, __LINE__, 0)
1063 * #define MSVCRT_CHECK_PMT(x) ((x) ? TRUE : MSVCRT_INVALID_PMT(#x),FALSE)
1064 * Until this is done, just keep the same semantics for CHECK_PMT(), but without generating / sending
1065 * any information
1066 * NB : MSVCRT_call_invalid_parameter_handler is a wrapper around MSVCRT__invalid_parameter in order
1067 * to do the Ansi to Unicode transformation
1069 #define MSVCRT_INVALID_PMT(x,err) (*MSVCRT__errno() = (err), MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0))
1070 #define MSVCRT_CHECK_PMT_ERR(x,err) ((x) || (MSVCRT_INVALID_PMT( 0, (err) ), FALSE))
1071 #define MSVCRT_CHECK_PMT(x) MSVCRT_CHECK_PMT_ERR((x), MSVCRT_EINVAL)
1072 #endif
1074 #define MSVCRT__ARGMAX 100
1075 typedef int (*puts_clbk_a)(void*, int, const char*);
1076 typedef int (*puts_clbk_w)(void*, int, const MSVCRT_wchar_t*);
1077 typedef union _printf_arg
1079 void *get_ptr;
1080 int get_int;
1081 LONGLONG get_longlong;
1082 double get_double;
1083 } printf_arg;
1084 typedef printf_arg (*args_clbk)(void*, int, int, __ms_va_list*);
1085 int pf_printf_a(puts_clbk_a, void*, const char*, MSVCRT__locale_t,
1086 DWORD, args_clbk, void*, __ms_va_list*) DECLSPEC_HIDDEN;
1087 int pf_printf_w(puts_clbk_w, void*, const MSVCRT_wchar_t*, MSVCRT__locale_t,
1088 DWORD, args_clbk, void*, __ms_va_list*) DECLSPEC_HIDDEN;
1089 printf_arg arg_clbk_valist(void*, int, int, __ms_va_list*) DECLSPEC_HIDDEN;
1091 #define MSVCRT_FLT_MIN 1.175494351e-38F
1092 #define MSVCRT_DBL_MIN 2.2250738585072014e-308
1093 #define MSVCRT__OVERFLOW 3
1094 #define MSVCRT__UNDERFLOW 4
1096 typedef struct
1098 float f;
1099 } MSVCRT__CRT_FLOAT;
1101 typedef struct
1103 double x;
1104 } MSVCRT__CRT_DOUBLE;
1106 extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,unsigned short int);
1108 /* __unDName/__unDNameEx flags */
1109 #define UNDNAME_COMPLETE (0x0000)
1110 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) /* Don't show __ in calling convention */
1111 #define UNDNAME_NO_MS_KEYWORDS (0x0002) /* Don't show calling convention at all */
1112 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004) /* Don't show function/method return value */
1113 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
1114 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
1115 #define UNDNAME_NO_MS_THISTYPE (0x0020)
1116 #define UNDNAME_NO_CV_THISTYPE (0x0040)
1117 #define UNDNAME_NO_THISTYPE (0x0060)
1118 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) /* Don't show access specifier (public/protected/private) */
1119 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
1120 #define UNDNAME_NO_MEMBER_TYPE (0x0200) /* Don't show static/virtual specifier */
1121 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
1122 #define UNDNAME_32_BIT_DECODE (0x0800)
1123 #define UNDNAME_NAME_ONLY (0x1000) /* Only report the variable/method name */
1124 #define UNDNAME_NO_ARGUMENTS (0x2000) /* Don't show method arguments */
1125 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
1126 #define UNDNAME_NO_COMPLEX_TYPE (0x8000)
1128 #define UCRTBASE_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION (0x0001)
1129 #define UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR (0x0002)
1130 #define UCRTBASE_PRINTF_LEGACY_WIDE_SPECIFIERS (0x0004)
1131 #define UCRTBASE_PRINTF_LEGACY_MSVCRT_COMPATIBILITY (0x0008)
1132 #define UCRTBASE_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS (0x0010)
1134 #define UCRTBASE_PRINTF_MASK (0x001F)
1136 #define MSVCRT_PRINTF_POSITIONAL_PARAMS (0x0100)
1137 #define MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER (0x0200)
1139 #define UCRTBASE_SCANF_SECURECRT (0x0001)
1140 #define UCRTBASE_SCANF_LEGACY_WIDE_SPECIFIERS (0x0002)
1141 #define UCRTBASE_SCANF_LEGACY_MSVCRT_COMPATIBILITY (0x0004)
1143 #define UCRTBASE_SCANF_MASK (0x0007)
1145 #endif /* __WINE_MSVCRT_H */