ReactOS 0.4.15-dev-7674-gc0b4db1
crtdata.c File Reference
#include <apitest.h>
#include <apitest_guard.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <locale.h>
#include <mbctype.h>
Include dependency graph for crtdata.c:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define test_is_local_symbol(addr, is)   ok_int(IsLocalSymbol(addr), (is))
 

Functions

int IsLocalSymbol (void *Address)
 
int *__cdeclp__daylight (void)
 
long *__cdeclp__dstbias (void)
 
 errno_t (__cdecl *p_get_fmode)(int *_PMode)
 
 int (__cdecl *p_get_pgmptr)(char **p)
 
void Test___argc (void)
 
void Test___argv (void)
 
void Test___badioinfo (void)
 
void Test___initenv (void)
 
void Test___lc_codepage (void)
 
void Test___lc_collate_cp (void)
 
void Test___lc_handle (void)
 
void Test___mb_cur_max (void)
 
void Test___pioinfo (void)
 
void Test___setlc_active (void)
 
void Test___unguarded_readlc_active (void)
 
void Test___wargv (void)
 
void Test___winitenv (void)
 
void Test__acmdln (void)
 
void Test__aexit_rtn (void)
 
void Test__commode (void)
 
void Test__ctype (void)
 
void Test__wctype (void)
 
void Test__daylight (void)
 
void Test__dstbias (void)
 
void Test__environ (void)
 
void Test__fileinfo (void)
 
void Test__fmode (void)
 
void Test__iob (void)
 
void Test__mbcasemap (void)
 
void Test__mbctype (void)
 
void Test__osplatform (void)
 
void Test__osver (void)
 
void Test__pgmptr (void)
 
void Test__sys_errlist (void)
 
void Test__sys_nerr (void)
 
void Test__timezone (void)
 
void Test__tzname (void)
 
void Test__wcmdln (void)
 
void Test__wenviron (void)
 
void Test__winmajor (void)
 
void Test__winminor (void)
 
void Test__winver (void)
 
void Test__wpgmptr (void)
 
 START_TEST (crtdata)
 

Variables

static OSVERSIONINFOW s_osvi
 
char __ImageBase
 
static voids_ImageEnd
 

Macro Definition Documentation

◆ test_is_local_symbol

#define test_is_local_symbol (   addr,
  is 
)    ok_int(IsLocalSymbol(addr), (is))

Definition at line 42 of file crtdata.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 11 of file crtdata.c.

Function Documentation

◆ errno_t()

errno_t ( __cdecl p_get_fmode)

◆ int()

int ( __cdecl p_get_pgmptr)

◆ IsLocalSymbol()

int IsLocalSymbol ( void Address)

Definition at line 22 of file crtdata.c.

23{
24 return ((Address >= (void*)&__ImageBase) && (Address <= s_ImageEnd));
25}
char __ImageBase
static void * s_ImageEnd
Definition: crtdata.c:20
static WCHAR Address[46]
Definition: ping.c:68

◆ p__daylight()

int *__cdecl * p__daylight ( void  )

Referenced by START_TEST(), and Test__daylight().

◆ p__dstbias()

long *__cdecl * p__dstbias ( void  )

Referenced by START_TEST(), and Test__dstbias().

◆ START_TEST()

START_TEST ( crtdata  )

Definition at line 638 of file crtdata.c.

639{
640 /* Initialize image size */
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 */
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();
680#ifndef _M_ARM
684#endif
688#ifndef _M_ARM
691#endif
692 Test___wargv();
693#ifndef _M_ARM
695#endif
696 Test__acmdln();
697#ifdef _M_IX86
698 Test__adjust_fdiv();
699#endif
702 Test__ctype();
704#ifndef _M_ARM
708#endif
709 Test__fmode();
710 Test__iob();
713#ifndef _M_ARM
715#endif
716 Test__osver();
717 Test__pgmptr();
721 Test__tzname();
722 Test__wcmdln();
723 Test__wctype();
724#ifndef _M_ARM
726#endif
729#ifndef _M_ARM
730 Test__winver();
731#endif
733}
#define ok(value,...)
Definition: atltest.h:57
void Test__tzname(void)
Definition: crtdata.c:518
void Test__winminor(void)
Definition: crtdata.c:583
void Test__osplatform(void)
Definition: crtdata.c:441
void Test__osver(void)
Definition: crtdata.c:453
int *__cdecl * p__daylight(void)
void Test__dstbias(void)
Definition: crtdata.c:317
void Test__acmdln(void)
Definition: crtdata.c:213
void Test__mbcasemap(void)
Definition: crtdata.c:412
void Test__fileinfo(void)
Definition: crtdata.c:354
void Test___argc(void)
Definition: crtdata.c:47
void Test__sys_errlist(void)
Definition: crtdata.c:482
void Test__winver(void)
Definition: crtdata.c:599
void Test__wpgmptr(void)
Definition: crtdata.c:615
void Test___wargv(void)
Definition: crtdata.c:188
void Test__daylight(void)
Definition: crtdata.c:297
void Test___initenv(void)
Definition: crtdata.c:80
void Test__wenviron(void)
Definition: crtdata.c:545
void Test__mbctype(void)
Definition: crtdata.c:426
void Test___winitenv(void)
Definition: crtdata.c:202
void Test__fmode(void)
Definition: crtdata.c:366
void Test__ctype(void)
Definition: crtdata.c:252
void Test___setlc_active(void)
Definition: crtdata.c:165
long *__cdecl * p__dstbias(void)
static OSVERSIONINFOW s_osvi
Definition: crtdata.c:18
void Test__sys_nerr(void)
Definition: crtdata.c:493
void Test__pgmptr(void)
Definition: crtdata.c:463
void Test___argv(void)
Definition: crtdata.c:59
void Test__aexit_rtn(void)
Definition: crtdata.c:231
void Test__environ(void)
Definition: crtdata.c:335
void Test___pioinfo(void)
Definition: crtdata.c:159
void Test__wcmdln(void)
Definition: crtdata.c:535
void Test__commode(void)
Definition: crtdata.c:238
void Test__iob(void)
Definition: crtdata.c:392
void Test___mb_cur_max(void)
Definition: crtdata.c:124
void Test__timezone(void)
Definition: crtdata.c:503
void Test__winmajor(void)
Definition: crtdata.c:568
void Test___lc_handle(void)
Definition: crtdata.c:113
void Test__wctype(void)
Definition: crtdata.c:279
void Test___unguarded_readlc_active(void)
Definition: crtdata.c:177
void Test___lc_collate_cp(void)
Definition: crtdata.c:101
void Test___badioinfo(void)
Definition: crtdata.c:71
void Test___lc_codepage(void)
Definition: crtdata.c:91
#define NULL
Definition: types.h:112
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
Definition: version.c:37
PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS
Definition: ntddk_ex.h:187
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
static void(* p_get_wenviron)(WCHAR ***)
Definition: environ.c:51
static void(* p_get_environ)(char ***)
Definition: environ.c:50
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:246
ULONG dwMajorVersion
Definition: rtltypes.h:247
unsigned char * PUCHAR
Definition: typedefs.h:53

◆ Test___argc()

void Test___argc ( void  )

Definition at line 47 of file crtdata.c.

48{
49 void* p = &__argc;
51
52 #undef __argc
53 ok_ptr(&__argc, p);
54#ifdef _M_IX86
56#endif
57}
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:42
#define FALSE
Definition: types.h:117
GLfloat GLfloat p
Definition: glext.h:8902
_CRTIMP int __argc
Definition: getargs.c:21
_CRTIMP int *__cdecl __p___argc()
Definition: getargs.c:475

Referenced by START_TEST().

◆ Test___argv()

void Test___argv ( void  )

Definition at line 59 of file crtdata.c.

60{
61 void* p = &__argv;
63
64 #undef __argv
65 ok_ptr(&__argv, p);
66#ifdef _M_IX86
68#endif
69}
_CRTIMP char ***__cdecl __p___argv()
Definition: getargs.c:483
_CRTIMP char ** __argv
Definition: getargs.c:18

Referenced by START_TEST().

◆ Test___badioinfo()

void Test___badioinfo ( void  )

Definition at line 71 of file crtdata.c.

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}
#define _CRTIMP
Definition: crtdefs.h:72
_CRTIMP ioinfo * __badioinfo[]
Definition: file.c:126
Definition: file.c:40

Referenced by START_TEST().

◆ Test___initenv()

void Test___initenv ( void  )

Definition at line 80 of file crtdata.c.

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);
88#endif
89}
char ** __initenv
Definition: environ.c:24
char *** __p___initenv(void)
Definition: environ.c:400

Referenced by START_TEST().

◆ Test___lc_codepage()

void Test___lc_codepage ( void  )

Definition at line 91 of file crtdata.c.

92{
93 _CRTIMP extern unsigned int __lc_codepage;
99}
#define ok_int(expression, result)
Definition: atltest.h:134
_CRTIMP unsigned int __cdecl ___lc_codepage_func(void)
Definition: locale.c:627
#define todo_ros
Definition: test.h:167
unsigned int __lc_codepage
Definition: locale.c:34

Referenced by START_TEST().

◆ Test___lc_collate_cp()

void Test___lc_collate_cp ( void  )

Definition at line 101 of file crtdata.c.

102{
103 _CRTIMP extern int __lc_collate_cp;
110}
_CRTIMP unsigned int __cdecl ___lc_collate_cp_func(void)
Definition: locale.c:635
int __lc_collate_cp

Referenced by START_TEST().

◆ Test___lc_handle()

void Test___lc_handle ( void  )

Definition at line 113 of file crtdata.c.

114{
115 _CRTIMP int __lc_handle;
116 ok_int(__lc_handle, 0);
119 __lc_handle++;
121 __lc_handle--;
122}
LCID *CDECL ___lc_handle_func(void)
Definition: locale.c:619

Referenced by START_TEST().

◆ Test___mb_cur_max()

void Test___mb_cur_max ( void  )

Definition at line 124 of file crtdata.c.

125{
126 void* p = &__mb_cur_max;
129
130 #undef __mb_cur_max
131 _CRTIMP extern int __mb_cur_max;
133
135#ifdef _M_IX86
136 _CRTIMP int* __p___mb_cur_max(void);
138#endif
139 __mb_cur_max++;
140 if (s_osvi.dwMajorVersion >= 6)
141 {
143#ifdef _M_IX86
145#endif
146 }
147 else
148 {
150#ifdef _M_IX86
151 todo_ros ok_ptr(__p___mb_cur_max(), p); // wine code handles it like on Vista+
153#endif
154 }
155
156 __mb_cur_max--;
157}
#define __mb_cur_max
Definition: ctype.h:629
#define ___mb_cur_max_func()
Definition: ctype.h:636
int *__cdecl __p___mb_cur_max(void)
Definition: environ.c:430

Referenced by START_TEST().

◆ Test___pioinfo()

void Test___pioinfo ( void  )

Definition at line 159 of file crtdata.c.

160{
161
162}

Referenced by START_TEST().

◆ Test___setlc_active()

void Test___setlc_active ( void  )

Definition at line 165 of file crtdata.c.

166{
167 _CRTIMP extern unsigned int __setlc_active;
169
170 _CRTIMP unsigned int ___setlc_active_func(void);
175}
unsigned int CDECL ___setlc_active_func(void)
Definition: locale.c:1481
unsigned int __setlc_active
Definition: environ.c:16

Referenced by START_TEST().

◆ Test___unguarded_readlc_active()

void Test___unguarded_readlc_active ( void  )

Definition at line 177 of file crtdata.c.

178{
179 _CRTIMP extern unsigned int __unguarded_readlc_active;
182
185}
unsigned int __unguarded_readlc_active
Definition: environ.c:17
unsigned int *CDECL ___unguarded_readlc_active_add_func(void)
Definition: locale.c:1490

Referenced by START_TEST().

◆ Test___wargv()

void Test___wargv ( void  )

Definition at line 188 of file crtdata.c.

189{
190 void* p = &__wargv;
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}
_CRTIMP wchar_t ***__cdecl __p___wargv()
Definition: getargs.c:491
_CRTIMP wchar_t ** __wargv
Definition: getargs.c:20

Referenced by START_TEST().

◆ Test___winitenv()

void Test___winitenv ( void  )

Definition at line 202 of file crtdata.c.

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);
209#endif
210}
wchar_t ** __winitenv
Definition: environ.c:25
wchar_t *** __p___winitenv(void)
Definition: environ.c:408

Referenced by START_TEST().

◆ Test__acmdln()

void Test__acmdln ( void  )

Definition at line 213 of file crtdata.c.

214{
215 _CRTIMP extern char* _acmdln;
216 ok(_acmdln != NULL, "__winitenv is NULL\n");
217#ifdef _M_IX86
218 _CRTIMP char** __p__acmdln(void);
220#endif
221}
const char ** __p__acmdln(void)
Definition: environ.c:368
char * _acmdln
Definition: environ.c:18

Referenced by START_TEST().

◆ Test__aexit_rtn()

void Test__aexit_rtn ( void  )

Definition at line 231 of file crtdata.c.

232{
233 typedef void (*_exit_t)(int exitcode);
234 _CRTIMP extern _exit_t _aexit_rtn;
236}
void _exit(int exitcode)
Definition: _exit.c:25
aexit_t _aexit_rtn
Definition: amsg.c:39

Referenced by START_TEST().

◆ Test__commode()

void Test__commode ( void  )

Definition at line 238 of file crtdata.c.

239{
240 void* p = &_commode;
242 ok_int(_commode, 0);
243
244 #undef _commode
245 _CRTIMP extern int _commode;
246 ok_ptr(&_commode, p);
247#ifdef _M_IX86
249#endif
250}
_CRTIMP int _commode
Definition: environ.c:31
int * __p__commode(void)
Definition: environ.c:352

Referenced by START_TEST().

◆ Test__ctype()

void Test__ctype ( void  )

Definition at line 252 of file crtdata.c.

253{
254 _CRTIMP extern const unsigned short _ctype[];
255 ok_int(_ctype[0], 0);
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");
273#ifdef _M_IX86
274 _CRTIMP const unsigned short** __cdecl __p__pctype(void);
276#endif
277}
#define __cdecl
Definition: accygwin.h:79
#define _CONTROL
Definition: ctype.h:71
#define __pctype_func()
Definition: wctype.h:34
#define _pctype
Definition: wctype.h:43
const unsigned short _ctype[257]
Definition: ctype.c:36
const unsigned short ** __p__pctype(void)
Definition: locale.c:1518

Referenced by START_TEST().

◆ Test__daylight()

void Test__daylight ( void  )

Definition at line 297 of file crtdata.c.

298{
299 void* p = &_daylight;
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);
309#endif
310 if (p__daylight != NULL)
311 {
313 }
314}
void * __p__daylight(void)
Definition: timezone.c:37
int _daylight
Definition: timezone.c:30

Referenced by START_TEST().

◆ Test__dstbias()

void Test__dstbias ( void  )

Definition at line 317 of file crtdata.c.

318{
319 void* p = &_dstbias;
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);
328#endif
329 if (p__dstbias != NULL)
330 {
332 }
333}
long * __p__dstbias(void)
Definition: timezone.c:69
long _dstbias
Definition: timezone.c:62

Referenced by START_TEST().

◆ Test__environ()

void Test__environ ( void  )

Definition at line 335 of file crtdata.c.

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
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}
char ** _environ
Definition: environ.c:22
_CRTIMP char ***__cdecl __p__environ()
Definition: environ.c:384

Referenced by START_TEST().

◆ Test__fileinfo()

void Test__fileinfo ( void  )

Definition at line 354 of file crtdata.c.

355{
356 _CRTIMP extern int _fileinfo;
357 ok_int(_fileinfo, -1);
358
359#ifdef _M_IX86
360 _CRTIMP int* __p__fileinfo();
362#endif
363}
void * __p__fileinfo()
Definition: stubs.c:17
int _fileinfo
Definition: stubs.c:14

Referenced by START_TEST().

◆ Test__fmode()

void Test__fmode ( void  )

Definition at line 366 of file crtdata.c.

367{
368 void* p = &_fmode;
370 ok_int(_fmode, 0);
371
372 #undef _fmode
373 _CRTIMP extern int _fmode;
374 ok_ptr(&_fmode, p);
375
376#ifdef _M_IX86
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);
388 _fmode = 0;
389 }
390}
GLenum mode
Definition: glext.h:6217
_CRTIMP int _fmode
Definition: fmode.c:4
unsigned int *__cdecl __p__fmode(void)
Definition: fmode.c:9

Referenced by START_TEST().

◆ Test__iob()

void Test__iob ( void  )

Definition at line 392 of file crtdata.c.

393{
394 void* p = &_iob;
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
405
406#ifdef _M_IX86
407 _CRTIMP int* __cdecl __p__iob();
408 ok_ptr(__p__iob(), p);
409#endif
410}
#define stdout
Definition: stdio.h:99
#define stderr
Definition: stdio.h:100
_CRTIMP FILE *__cdecl __iob_func(void)
Definition: file.c:682
#define stdin
Definition: stdio.h:98
FILE _iob[_IOB_ENTRIES]
Definition: file.c:133

Referenced by START_TEST().

◆ Test__mbcasemap()

void Test__mbcasemap ( void  )

Definition at line 412 of file crtdata.c.

413{
414 void* p = &_mbcasemap;
415 ok_int(_mbcasemap[0], 0);
416
417 #undef _mbcasemap
419
420#ifdef _M_IX86
421 _CRTIMP unsigned char* __cdecl __p__mbcasemap();
423#endif
424}
void * __p__mbcasemap()
Definition: stubs.c:25
unsigned char _mbcasemap[1]
Definition: stubs.c:22

Referenced by START_TEST().

◆ Test__mbctype()

void Test__mbctype ( void  )

Definition at line 426 of file crtdata.c.

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}
unsigned char * __p__mbctype(void)
Definition: ismblead.c:48
_CRTIMP unsigned char _mbctype[257]
Definition: locale.c:40

Referenced by START_TEST().

◆ Test__osplatform()

void Test__osplatform ( void  )

Definition at line 441 of file crtdata.c.

442{
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}
unsigned int _osplatform
Definition: environ.c:10
ULONG dwPlatformId
Definition: rtltypes.h:250

Referenced by START_TEST().

◆ Test__osver()

void Test__osver ( void  )

Definition at line 453 of file crtdata.c.

454{
456
457#ifdef _M_IX86
460#endif
461}
unsigned int _osver
Definition: environ.c:11
unsigned int * __p__osver(void)
Definition: environ.c:446
ULONG dwBuildNumber
Definition: rtltypes.h:249

Referenced by START_TEST().

◆ Test__pgmptr()

void Test__pgmptr ( void  )

Definition at line 463 of file crtdata.c.

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
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}
_CRTIMP char **__cdecl __p__pgmptr()
Definition: environ.c:454
_CRTIMP char * _pgmptr
Definition: environ.c:27

Referenced by START_TEST().

◆ Test__sys_errlist()

void Test__sys_errlist ( void  )

Definition at line 482 of file crtdata.c.

483{
484 void* p = &_sys_errlist;
486 ok_int(strcmp(_sys_errlist[42], strerror(42)), 0);
487
488 #undef _sys_errlist
489 _CRTIMP extern char* _sys_errlist[];
491}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
_CRTIMP char * _sys_errlist[]
Definition: strerror.c:68
const char * strerror(int err)
Definition: compat_str.c:23

Referenced by START_TEST().

◆ Test__sys_nerr()

void Test__sys_nerr ( void  )

Definition at line 493 of file crtdata.c.

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}
_CRTIMP int _sys_nerr
Definition: strerror.c:80

Referenced by START_TEST().

◆ Test__timezone()

void Test__timezone ( void  )

Definition at line 503 of file crtdata.c.

504{
505 void* p = &_timezone;
507
508 #undef _timezone
509 _CRTIMP extern long _timezone;
510 ok_ptr(&_timezone, p);
511
512#ifdef _M_IX86
513 _CRTIMP char** __p__timezone();
515#endif
516}
long * __p__timezone(void)
Definition: timezone.c:53
long _timezone
Definition: timezone.c:46

Referenced by START_TEST().

◆ Test__tzname()

void Test__tzname ( void  )

Definition at line 518 of file crtdata.c.

519{
520 void* p = &_tzname;
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();
532#endif
533}
char ** __p__tzname(void)
Definition: timezone.c:79
char * _tzname[2]
Definition: timezone.c:22

Referenced by START_TEST().

◆ Test__wcmdln()

void Test__wcmdln ( void  )

Definition at line 535 of file crtdata.c.

536{
537 _CRTIMP extern wchar_t* _wcmdln;
538#ifdef _M_IX86
539 _CRTIMP wchar_t** __p__wcmdln(void);
541#endif
542}
const wchar_t ** __p__wcmdln(void)
Definition: environ.c:376
wchar_t * _wcmdln
Definition: environ.c:19

Referenced by START_TEST().

◆ Test__wctype()

void Test__wctype ( void  )

Definition at line 279 of file crtdata.c.

280{
281 ok_int(_wctype[0], 0);
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");
291#ifdef _M_IX86
292 _CRTIMP const unsigned short** __cdecl __p__pwctype(void);
294#endif
295}
const unsigned short ** __p__pwctype(void)
Definition: ctype.c:564
#define __pwctype_func()
Definition: wctype.h:68
#define _wctype
Definition: wctype.h:58
#define _pwctype
Definition: wctype.h:67

Referenced by START_TEST().

◆ Test__wenviron()

void Test__wenviron ( void  )

Definition at line 545 of file crtdata.c.

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
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}
wchar_t ** _wenviron
Definition: environ.c:23
_CRTIMP wchar_t ***__cdecl __p__wenviron()
Definition: environ.c:392

Referenced by START_TEST().

◆ Test__winmajor()

void Test__winmajor ( void  )

Definition at line 568 of file crtdata.c.

569{
571#ifdef _M_IX86
572 _CRTIMP unsigned int* __cdecl __p__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}
unsigned int _winmajor
Definition: environ.c:13
unsigned int * __p__winmajor(void)
Definition: environ.c:500

Referenced by START_TEST().

◆ Test__winminor()

void Test__winminor ( void  )

Definition at line 583 of file crtdata.c.

584{
586#ifdef _M_IX86
587 _CRTIMP unsigned int* __cdecl __p__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}
unsigned int _winminor
Definition: environ.c:12
unsigned int * __p__winminor(void)
Definition: environ.c:508
ULONG dwMinorVersion
Definition: rtltypes.h:248

Referenced by START_TEST().

◆ Test__winver()

void Test__winver ( void  )

Definition at line 599 of file crtdata.c.

600{
602#ifdef _M_IX86
603 _CRTIMP unsigned int* __cdecl __p__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}
unsigned int _winver
Definition: environ.c:14
unsigned int * __p__winver(void)
Definition: environ.c:516

Referenced by START_TEST().

◆ Test__wpgmptr()

void Test__wpgmptr ( void  )

Definition at line 615 of file crtdata.c.

616{
617 void* p = _wpgmptr;
619
620 #undef _wpgmptr
621 ok_ptr(_wpgmptr, p);
622
623#ifdef _M_IX86
624 _CRTIMP wchar_t ** __cdecl __p__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}
_CRTIMP wchar_t * _wpgmptr
Definition: environ.c:29
_CRTIMP wchar_t **__cdecl __p__wpgmptr()
Definition: environ.c:477

Referenced by START_TEST().

Variable Documentation

◆ __ImageBase

char __ImageBase
extern

Referenced by IsLocalSymbol(), and START_TEST().

◆ s_ImageEnd

void* s_ImageEnd
static

Definition at line 20 of file crtdata.c.

Referenced by IsLocalSymbol(), and START_TEST().

◆ s_osvi