1 /*
2 * PROJECT: ReactOS CRT API tests
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Tests for crt data exports
5 * COPYRIGHT: Copyright 2021 Timo Kreuzer <timo.kreuzer@reactos.org>
6 */
7
8 #include <apitest.h>
9 #include <apitest_guard.h>
10
11 #define WIN32_NO_STATUS
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <time.h>
15 #include <locale.h>
16 #include <mbctype.h>
17
18 static OSVERSIONINFOW s_osvi;
19 extern char __ImageBase;
20 static void* s_ImageEnd;
21
IsLocalSymbol(void * Address)22 int IsLocalSymbol(void* Address)
23 {
24 return ((Address >= (void*)&__ImageBase) && (Address <= s_ImageEnd));
25 }
26
27 // Dynamically imported functions (Vista+)
28 int* (__cdecl *p__daylight)(void);
29 long* (__cdecl *p__dstbias)(void);
30 errno_t (__cdecl *p_get_fmode)(int* _PMode);
31 errno_t (__cdecl *p_get_osplatform)(unsigned int *pValue);
32 int (__cdecl *p_get_pgmptr)(char** p);
33 errno_t (__cdecl *p_get_wpgmptr)(_Outptr_result_z_ wchar_t **_Value);
34 errno_t (__cdecl *p_get_winver)(_Out_ unsigned int *_Value);
35 errno_t (__cdecl *p_get_winmajor)(_Out_ unsigned int *_Value);
36 errno_t (__cdecl *p_get_winminor)(_Out_ unsigned int *_Value);
37 errno_t (__cdecl *p_get_environ)(_Out_ char***);
38 errno_t (__cdecl *p_get_wenviron)(_Out_ wchar_t***);
39
40
41 #ifndef TEST_STATIC
42 #define test_is_local_symbol(addr, is) ok_int(IsLocalSymbol(addr), (is))
43 #else
44 #define test_is_local_symbol(addr, is)
45 #endif
46
Test___argc(void)47 void Test___argc(void)
48 {
49 void* p = &__argc;
50 test_is_local_symbol(p, FALSE);
51
52 #undef __argc
53 ok_ptr(&__argc, p);
54 #ifdef _M_IX86
55 ok_ptr(__p___argc(), p);
56 #endif
57 }
58
Test___argv(void)59 void Test___argv(void)
60 {
61 void* p = &__argv;
62 test_is_local_symbol(p, FALSE);
63
64 #undef __argv
65 ok_ptr(&__argv, p);
66 #ifdef _M_IX86
67 ok_ptr(__p___argv(), p);
68 #endif
69 }
70
Test___badioinfo(void)71 void Test___badioinfo(void)
72 {
73 typedef struct _ioinfo ioinfo;
74 _CRTIMP extern ioinfo* __badioinfo[];
75 ok(__badioinfo != NULL, "__badioinfo is NULL\n");
76 ok(__badioinfo[0] != NULL, "__badioinfo is NULL\n");
77 }
78
79 #ifndef _M_ARM
Test___initenv(void)80 void Test___initenv(void)
81 {
82 _CRTIMP extern char** __initenv;
83 ok(__initenv != NULL, "__initenv is NULL\n");
84 ok(*__initenv != NULL, "*__initenv is NULL\n");
85 #ifdef _M_IX86
86 _CRTIMP char*** __p___initenv(void);
87 ok_ptr(__p___initenv(), &__initenv);
88 #endif
89 }
90
Test___lc_codepage(void)91 void Test___lc_codepage(void)
92 {
93 _CRTIMP extern unsigned int __lc_codepage;
94 ok_int(__lc_codepage, 0);
95 ok_int(___lc_codepage_func(), 0);
96 __lc_codepage++;
97 todo_ros ok_int(___lc_codepage_func(), 0);
98 __lc_codepage--;
99 }
100
Test___lc_collate_cp(void)101 void Test___lc_collate_cp(void)
102 {
103 _CRTIMP extern int __lc_collate_cp;
104 test_is_local_symbol(&__lc_collate_cp, FALSE);
105 ok_int(__lc_collate_cp, 0);
106 ok_int(___lc_collate_cp_func(), 0);
107 __lc_collate_cp++;
108 ok_int(___lc_collate_cp_func(), 0);
109 __lc_collate_cp--;
110 }
111 #endif // !_M_ARM
112
Test___lc_handle(void)113 void Test___lc_handle(void)
114 {
115 _CRTIMP int __lc_handle;
116 ok_int(__lc_handle, 0);
117 _CRTIMP int* ___lc_handle_func();
118 ok_int(*___lc_handle_func(), 0);
119 __lc_handle++;
120 todo_ros ok_int(*___lc_handle_func(), 0);
121 __lc_handle--;
122 }
123
Test___mb_cur_max(void)124 void Test___mb_cur_max(void)
125 {
126 void* p = &__mb_cur_max;
127 test_is_local_symbol(&__mb_cur_max, FALSE);
128 ok_int(__mb_cur_max, 1);
129
130 #undef __mb_cur_max
131 _CRTIMP extern int __mb_cur_max;
132 ok_ptr(&__mb_cur_max, p);
133
134 ok_int(___mb_cur_max_func(), 1);
135 #ifdef _M_IX86
136 _CRTIMP int* __p___mb_cur_max(void);
137 ok_int(*__p___mb_cur_max(), 1);
138 #endif
139 __mb_cur_max++;
140 if (s_osvi.dwMajorVersion >= 6)
141 {
142 ok_int(___mb_cur_max_func(), 1);
143 #ifdef _M_IX86
144 ok_int(*__p___mb_cur_max(), 1);
145 #endif
146 }
147 else
148 {
149 todo_ros ok_int(___mb_cur_max_func(), 2);
150 #ifdef _M_IX86
151 todo_ros ok_ptr(__p___mb_cur_max(), p); // wine code handles it like on Vista+
152 todo_ros ok_int(*__p___mb_cur_max(), 2);
153 #endif
154 }
155
156 __mb_cur_max--;
157 }
158
Test___pioinfo(void)159 void Test___pioinfo(void)
160 {
161
162 }
163
164 #ifndef _M_ARM
Test___setlc_active(void)165 void Test___setlc_active(void)
166 {
167 _CRTIMP extern unsigned int __setlc_active;
168 ok_int(__setlc_active, 0);
169
170 _CRTIMP unsigned int ___setlc_active_func(void);
171 ok_int(___setlc_active_func(), __setlc_active);
172 __setlc_active++;
173 ok_int(___setlc_active_func(), __setlc_active);
174 __setlc_active--;
175 }
176
Test___unguarded_readlc_active(void)177 void Test___unguarded_readlc_active(void)
178 {
179 _CRTIMP extern unsigned int __unguarded_readlc_active;
180 void* p = &__unguarded_readlc_active;
181 ok_int(__unguarded_readlc_active, 0);
182
183 _CRTIMP unsigned int* ___unguarded_readlc_active_add_func(void);
184 ok_ptr(___unguarded_readlc_active_add_func(), p);
185 }
186 #endif // !_M_ARM
187
Test___wargv(void)188 void Test___wargv(void)
189 {
190 void* p = &__wargv;
191 test_is_local_symbol(p, FALSE);
192
193 #undef __wargv
194 _CRTIMP extern wchar_t ** __wargv;
195 ok_ptr(&__wargv, p);
196 #ifdef _M_IX86
197 ok_ptr(__p___wargv(), p);
198 #endif
199 }
200
201 #ifndef _M_ARM
Test___winitenv(void)202 void Test___winitenv(void)
203 {
204 _CRTIMP extern wchar_t** __winitenv;
205 todo_ros ok(__winitenv == NULL, "__winitenv is not NULL\n");
206 #ifdef _M_IX86
207 _CRTIMP wchar_t*** __p___winitenv(void);
208 ok_ptr(__p___winitenv(), &__winitenv);
209 #endif
210 }
211 #endif
212
Test__acmdln(void)213 void Test__acmdln(void)
214 {
215 _CRTIMP extern char* _acmdln;
216 ok(_acmdln != NULL, "__winitenv is NULL\n");
217 #ifdef _M_IX86
218 _CRTIMP char** __p__acmdln(void);
219 ok_ptr(__p__acmdln(), &_acmdln);
220 #endif
221 }
222
223 #ifdef _M_IX86
Test__adjust_fdiv(void)224 void Test__adjust_fdiv(void)
225 {
226 _CRTIMP extern int _adjust_fdiv;
227 ok_int(_adjust_fdiv, 0);
228 }
229 #endif
230
Test__aexit_rtn(void)231 void Test__aexit_rtn(void)
232 {
233 typedef void (*_exit_t)(int exitcode);
234 _CRTIMP extern _exit_t _aexit_rtn;
235 ok_ptr(_aexit_rtn, _exit);
236 }
237
Test__commode(void)238 void Test__commode(void)
239 {
240 void* p = &_commode;
241 test_is_local_symbol(&_commode, FALSE);
242 ok_int(_commode, 0);
243
244 #undef _commode
245 _CRTIMP extern int _commode;
246 ok_ptr(&_commode, p);
247 #ifdef _M_IX86
248 ok_ptr(__p__commode(), &_commode);
249 #endif
250 }
251
Test__ctype(void)252 void Test__ctype(void)
253 {
254 _CRTIMP extern const unsigned short _ctype[];
255 ok_int(_ctype[0], 0);
256 ok_int(_ctype[1], _CONTROL);
257
258 #undef _pctype
259 _CRTIMP extern const unsigned short* _pctype;
260 ok(_pctype != &_ctype[0], "_pwctype should not match &_wctype[0]");
261 if (s_osvi.dwMajorVersion >= 6)
262 {
263 ok(_pctype != &_ctype[1], "_pwctype should not match &_wctype[1]");
264 }
265 else
266 {
267 ok(_pctype == &_ctype[1], "_pwctype should match &_wctype[1]");
268 }
269
270 ok(__pctype_func() != _ctype, "__pctype_func() should not match _ctype\n");
271 ok_int(__pctype_func()[0], _CONTROL);
272 ok_int(__pctype_func()[1], _CONTROL);
273 #ifdef _M_IX86
274 _CRTIMP const unsigned short** __cdecl __p__pctype(void);
275 ok_ptr(*__p__pctype(), __pctype_func());
276 #endif
277 }
278
Test__wctype(void)279 void Test__wctype(void)
280 {
281 ok_int(_wctype[0], 0);
282 ok_int(_wctype[1], _CONTROL);
283
284 #undef _pwctype
285 _CRTIMP extern const unsigned short* _pwctype;
286 ok_ptr(_pwctype, &_wctype[1]);
287
288 ok(__pwctype_func() != _wctype, "__pwctype_func() == _wctype\n");
289 ok_int(__pctype_func()[0], _CONTROL);
290 ok_int(__pctype_func()[1], _CONTROL);
291 #ifdef _M_IX86
292 _CRTIMP const unsigned short** __cdecl __p__pwctype(void);
293 ok_ptr(*__p__pwctype(), __pwctype_func());
294 #endif
295 }
296
Test__daylight(void)297 void Test__daylight(void)
298 {
299 void* p = &_daylight;
300 test_is_local_symbol(&_daylight, FALSE);
301
302 #undef _daylight
303 _CRTIMP extern int _daylight;
304 ok_ptr(&_daylight, p);
305
306 #ifdef _M_IX86
307 _CRTIMP void* __p__daylight(void);
308 ok_ptr(__p__daylight(), &_daylight);
309 #endif
310 if (p__daylight != NULL)
311 {
312 ok_ptr(p__daylight(), &_daylight);
313 }
314 }
315
316 #ifndef _M_ARM
Test__dstbias(void)317 void Test__dstbias(void)
318 {
319 void* p = &_dstbias;
320 test_is_local_symbol(&_dstbias, FALSE);
321
322 #undef _dstbias
323 _CRTIMP extern long _dstbias;
324 ok_ptr(&_dstbias, p);
325 #ifdef _M_IX86
326 _CRTIMP long* __cdecl __p__dstbias(void);
327 ok_ptr(__p__dstbias(), &_dstbias);
328 #endif
329 if (p__dstbias != NULL)
330 {
331 ok_ptr(p__dstbias(), &_dstbias);
332 }
333 }
334
Test__environ(void)335 void Test__environ(void)
336 {
337 void* p = &_environ;
338 ok(_environ != NULL, "_environ == NULL\n");
339
340 #undef _environ
341 _CRTIMP extern char** _environ;
342 ok_ptr(&_environ, p);
343 #ifdef _M_IX86
344 ok_ptr(__p__environ(), &_environ);
345 #endif
346 if (p_get_environ != NULL)
347 {
348 char** result_environ;
349 ok_int(p_get_environ(&result_environ), 0);
350 ok_ptr(result_environ, _environ);
351 }
352 }
353
Test__fileinfo(void)354 void Test__fileinfo(void)
355 {
356 _CRTIMP extern int _fileinfo;
357 ok_int(_fileinfo, -1);
358
359 #ifdef _M_IX86
360 _CRTIMP int* __p__fileinfo();
361 ok_ptr(__p__fileinfo(), &_fileinfo);
362 #endif
363 }
364 #endif // !_M_ARM
365
Test__fmode(void)366 void Test__fmode(void)
367 {
368 void* p = &_fmode;
369 test_is_local_symbol(&_fmode, FALSE);
370 ok_int(_fmode, 0);
371
372 #undef _fmode
373 _CRTIMP extern int _fmode;
374 ok_ptr(&_fmode, p);
375
376 #ifdef _M_IX86
377 _CRTIMP int* __cdecl __p__fmode();
378 ok_ptr(__p__fmode(), p);
379 #endif
380
381 if (p_get_fmode != NULL)
382 {
383 _fmode = 1234;
384
385 int mode;
386 ok_int(p_get_fmode(&mode), 0);
387 ok_int(mode, _fmode);
388 _fmode = 0;
389 }
390 }
391
Test__iob(void)392 void Test__iob(void)
393 {
394 void* p = &_iob;
395 test_is_local_symbol(&_iob, FALSE);
396 ok_ptr(&_iob[0], stdin);
397 ok_ptr(&_iob[1], stdout);
398 ok_ptr(&_iob[2], stderr);
399
400 #undef _iob
401 _CRTIMP extern FILE _iob[];
402 ok_ptr(&_iob, p);
403
404 ok_ptr(__iob_func(), &_iob);
405
406 #ifdef _M_IX86
407 _CRTIMP int* __cdecl __p__iob();
408 ok_ptr(__p__iob(), p);
409 #endif
410 }
411
Test__mbcasemap(void)412 void Test__mbcasemap(void)
413 {
414 void* p = &_mbcasemap;
415 ok_int(_mbcasemap[0], 0);
416
417 #undef _mbcasemap
418 ok_ptr(_mbcasemap, p);
419
420 #ifdef _M_IX86
421 _CRTIMP unsigned char* __cdecl __p__mbcasemap();
422 ok_ptr(__p__mbcasemap(), &_mbcasemap);
423 #endif
424 }
425
Test__mbctype(void)426 void Test__mbctype(void)
427 {
428 void* p = &_mbctype;
429 ok_int(_mbctype[0], 0);
430
431 #undef _mbctype
432 ok_ptr(&_mbctype, p);
433
434 #ifdef _M_IX86
435 _CRTIMP unsigned char* __cdecl __p__mbctype();
436 todo_ros ok_ptr(__p__mbctype(), &_mbctype); // wine implements thiss like on Vista
437 #endif
438 }
439
440 #ifndef _M_ARM
Test__osplatform(void)441 void Test__osplatform(void)
442 {
443 ok_int(_osplatform, s_osvi.dwPlatformId);
444 if (p_get_osplatform != NULL)
445 {
446 unsigned int result_osplatform;
447 ok_int(p_get_osplatform(&result_osplatform), 0);
448 ok_int(result_osplatform, _osplatform);
449 }
450 }
451 #endif
452
Test__osver(void)453 void Test__osver(void)
454 {
455 ok_int(_osver, s_osvi.dwBuildNumber);
456
457 #ifdef _M_IX86
458 _CRTIMP int* __cdecl __p__osver();
459 ok_ptr(__p__osver(), &_osver);
460 #endif
461 }
462
Test__pgmptr(void)463 void Test__pgmptr(void)
464 {
465 void* p = &_pgmptr;
466 ok(_pgmptr != NULL, "_pgmptr should not be NULL\n");
467
468 #undef _pgmptr
469 _CRTIMP extern char* _pgmptr;
470 ok_ptr(&_pgmptr, p);
471 #ifdef _M_IX86
472 ok_ptr(__p__pgmptr(), &_pgmptr);
473 #endif
474 if (p_get_pgmptr != NULL)
475 {
476 char *result_pgmptr;
477 ok_int(p_get_pgmptr(&result_pgmptr), 0);
478 ok_ptr(result_pgmptr, _pgmptr);
479 }
480 }
481
Test__sys_errlist(void)482 void Test__sys_errlist(void)
483 {
484 void* p = &_sys_errlist;
485 ok_int(strcmp(_sys_errlist[0], strerror(0)), 0);
486 ok_int(strcmp(_sys_errlist[42], strerror(42)), 0);
487
488 #undef _sys_errlist
489 _CRTIMP extern char* _sys_errlist[];
490 ok_ptr(&_sys_errlist, p);
491 }
492
Test__sys_nerr(void)493 void Test__sys_nerr(void)
494 {
495 void* p = &_sys_nerr;
496 ok_int(_sys_nerr, 43);
497
498 #undef _sys_nerr
499 _CRTIMP extern int _sys_nerr;
500 ok_ptr(&_sys_nerr, p);
501 }
502
Test__timezone(void)503 void Test__timezone(void)
504 {
505 void* p = &_timezone;
506 test_is_local_symbol(&_timezone, FALSE);
507
508 #undef _timezone
509 _CRTIMP extern long _timezone;
510 ok_ptr(&_timezone, p);
511
512 #ifdef _M_IX86
513 _CRTIMP char** __p__timezone();
514 ok_ptr(__p__timezone(), &_timezone);
515 #endif
516 }
517
Test__tzname(void)518 void Test__tzname(void)
519 {
520 void* p = &_tzname;
521 test_is_local_symbol(&_tzname, FALSE);
522 ok(_tzname[0] != NULL, "_tzname[0] == NULL\n");
523 ok(_tzname[0] != NULL, "_tzname[0] == NULL\n");
524
525 #undef _tzname
526 _CRTIMP extern char * _tzname[2];
527 ok_ptr(_tzname, p);
528
529 #ifdef _M_IX86
530 _CRTIMP char** __p__tzname();
531 ok_ptr(__p__tzname(), &_tzname);
532 #endif
533 }
534
Test__wcmdln(void)535 void Test__wcmdln(void)
536 {
537 _CRTIMP extern wchar_t* _wcmdln;
538 #ifdef _M_IX86
539 _CRTIMP wchar_t** __p__wcmdln(void);
540 ok_ptr(__p__wcmdln(), &_wcmdln);
541 #endif
542 }
543
544 #ifndef _M_ARM
Test__wenviron(void)545 void Test__wenviron(void)
546 {
547 void* p = &_wenviron;
548 todo_ros ok(_wenviron == NULL, "_wenviron is not NULL\n");
549
550 #undef _wenviron
551 _CRTIMP extern wchar_t** _wenviron;
552 ok_ptr(&_wenviron, p);
553 #ifdef _M_IX86
554 ok_ptr(__p__wenviron(), &_wenviron);
555 #endif
556
557 #if 0 // FIXME: This returns an error / NULL on Windows 10
558 if (p_get_wenviron != NULL)
559 {
560 wchar_t** result_wenviron;
561 ok_int(p_get_wenviron(&result_wenviron), 0);
562 ok_ptr(result_wenviron, _wenviron);
563 }
564 #endif
565 }
566 #endif
567
Test__winmajor(void)568 void Test__winmajor(void)
569 {
570 ok_int(_winmajor, s_osvi.dwMajorVersion);
571 #ifdef _M_IX86
572 _CRTIMP unsigned int* __cdecl __p__winmajor();
573 ok_ptr(__p__winmajor(), &_winmajor);
574 #endif
575 if (p_get_winmajor != NULL)
576 {
577 unsigned int result_winmajor;
578 ok_int(p_get_winmajor(&result_winmajor), 0);
579 ok_int(result_winmajor, _winmajor);
580 }
581 }
582
Test__winminor(void)583 void Test__winminor(void)
584 {
585 ok_int(_winminor, s_osvi.dwMinorVersion);
586 #ifdef _M_IX86
587 _CRTIMP unsigned int* __cdecl __p__winminor();
588 ok_ptr(__p__winminor(), &_winminor);
589 #endif
590 if (p_get_winminor != NULL)
591 {
592 unsigned int result_winminor;
593 ok_int(p_get_winminor(&result_winminor), 0);
594 ok_int(result_winminor, _winminor);
595 }
596 }
597
598 #ifndef _M_ARM
Test__winver(void)599 void Test__winver(void)
600 {
601 ok_int(_winver, (s_osvi.dwMajorVersion << 8) | s_osvi.dwMinorVersion);
602 #ifdef _M_IX86
603 _CRTIMP unsigned int* __cdecl __p__winver();
604 ok_ptr(__p__winver(), &_winver);
605 #endif
606 if (p_get_winver != NULL)
607 {
608 unsigned int result_winver;
609 ok_int(p_get_winver(&result_winver), 0);
610 ok_int(result_winver, _winver);
611 }
612 }
613 #endif
614
Test__wpgmptr(void)615 void Test__wpgmptr(void)
616 {
617 void* p = _wpgmptr;
618 ok_ptr(_wpgmptr, NULL);
619
620 #undef _wpgmptr
621 ok_ptr(_wpgmptr, p);
622
623 #ifdef _M_IX86
624 _CRTIMP wchar_t ** __cdecl __p__wpgmptr();
625 ok_ptr(__p__wpgmptr(), &_wpgmptr);
626 #endif
627
628 #if 0 // FIXME: This returns an error on Windows 10
629 if (p_get_wpgmptr != NULL)
630 {
631 wchar_t* result_wpgmptr;
632 ok_int(p_get_wpgmptr(&result_wpgmptr), 0);
633 ok_ptr(result_wpgmptr, _wpgmptr);
634 }
635 #endif
636 }
637
START_TEST(crtdata)638 START_TEST(crtdata)
639 {
640 /* Initialize image size */
641 PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)&__ImageBase;
642 PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)((PUCHAR)dosHeader + dosHeader->e_lfanew);
643 s_ImageEnd = (PUCHAR)dosHeader + ntHeaders->OptionalHeader.SizeOfImage;
644
645 /* initialize version info */
646 s_osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
647 GetVersionExW(&s_osvi);
648
649 HMODULE hmsvcrt = GetModuleHandleA("msvcrt.dll");
650 p__daylight = (void*)GetProcAddress(hmsvcrt, "__daylight");
651 p__dstbias = (void*)GetProcAddress(hmsvcrt, "__dstbias");
652 p_get_fmode = (void*)GetProcAddress(hmsvcrt, "_get_fmode");
653 p_get_osplatform = (void*)GetProcAddress(hmsvcrt, "_get_osplatform");
654 p_get_pgmptr = (void*)GetProcAddress(hmsvcrt, "_get_pgmptr");
655 p_get_wpgmptr = (void*)GetProcAddress(hmsvcrt, "_get_wpgmptr");
656 p_get_winver = (void*)GetProcAddress(hmsvcrt, "_get_winver");
657 p_get_winmajor = (void*)GetProcAddress(hmsvcrt, "_get_winmajor");
658 p_get_winminor = (void*)GetProcAddress(hmsvcrt, "_get_winminor");
659 p_get_environ = (void*)GetProcAddress(hmsvcrt, "_get_environ");
660 p_get_wenviron = (void*)GetProcAddress(hmsvcrt, "_get_wenviron");
661
662 if (s_osvi.dwMajorVersion >= 6)
663 {
664 ok(p__daylight != NULL, "__daylight is NULL\n");
665 ok(p__dstbias != NULL, "__dstbias is NULL\n");
666 ok(p_get_fmode != NULL, "_get_fmode is NULL\n");
667 ok(p_get_osplatform != NULL, "_get_osplatform is NULL\n");
668 ok(p_get_pgmptr != NULL, "_get_pgmptr is NULL\n");
669 ok(p_get_wpgmptr != NULL, "_get_wpgmptr is NULL\n");
670 ok(p_get_winver != NULL, "_get_winver is NULL\n");
671 ok(p_get_winmajor != NULL, "_get_winmajor is NULL\n");
672 ok(p_get_winminor != NULL, "_get_winminor is NULL\n");
673 ok(p_get_environ != NULL, "_get_environ is NULL\n");
674 ok(p_get_wenviron != NULL, "_get_wenviron is NULL\n");
675 }
676
677 Test___argc();
678 Test___argv();
679 Test___badioinfo();
680 #ifndef _M_ARM
681 Test___initenv();
682 Test___lc_codepage();
683 Test___lc_collate_cp();
684 #endif
685 Test___lc_handle();
686 Test___mb_cur_max();
687 Test___pioinfo();
688 #ifndef _M_ARM
689 Test___setlc_active();
690 Test___unguarded_readlc_active();
691 #endif
692 Test___wargv();
693 #ifndef _M_ARM
694 Test___winitenv();
695 #endif
696 Test__acmdln();
697 #ifdef _M_IX86
698 Test__adjust_fdiv();
699 #endif
700 Test__aexit_rtn();
701 Test__commode();
702 Test__ctype();
703 Test__daylight();
704 #ifndef _M_ARM
705 Test__dstbias();
706 Test__environ();
707 Test__fileinfo();
708 #endif
709 Test__fmode();
710 Test__iob();
711 Test__mbcasemap();
712 Test__mbctype();
713 #ifndef _M_ARM
714 Test__osplatform();
715 #endif
716 Test__osver();
717 Test__pgmptr();
718 Test__sys_errlist();
719 Test__sys_nerr();
720 Test__timezone();
721 Test__tzname();
722 Test__wcmdln();
723 Test__wctype();
724 #ifndef _M_ARM
725 Test__wenviron();
726 #endif
727 Test__winmajor();
728 Test__winminor();
729 #ifndef _M_ARM
730 Test__winver();
731 #endif
732 Test__wpgmptr();
733 }
734