ReactOS  0.4.15-dev-3294-ge98684e
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)
 
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 28 of file crtdata.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 11 of file crtdata.c.

Function Documentation

◆ IsLocalSymbol()

int IsLocalSymbol ( void Address)

Definition at line 22 of file crtdata.c.

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

◆ START_TEST()

START_TEST ( crtdata  )

Definition at line 601 of file crtdata.c.

602 {
603  /* Initialize image size */
605  PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)((PUCHAR)dosHeader + dosHeader->e_lfanew);
606  s_ImageEnd = (PUCHAR)dosHeader + ntHeaders->OptionalHeader.SizeOfImage;
607 
608  /* initialize version info */
611 
612  Test___argc();
613  Test___argv();
615 #ifndef _M_ARM
616  Test___initenv();
619 #endif
622  Test___pioinfo();
623 #ifndef _M_ARM
626 #endif
627  Test___wargv();
628 #ifndef _M_ARM
629  Test___winitenv();
630 #endif
631  Test__acmdln();
632 #ifdef _M_IX86
633  Test__adjust_fdiv();
634 #endif
635  Test__aexit_rtn();
636  Test__commode();
637  Test__ctype();
638  Test__daylight();
639 #ifndef _M_ARM
640  Test__dstbias();
641  Test__environ();
642  Test__fileinfo();
643 #endif
644  Test__fmode();
645  Test__iob();
646  Test__mbcasemap();
647  Test__mbctype();
648 #ifndef _M_ARM
650 #endif
651  Test__osver();
652  Test__pgmptr();
654  Test__sys_nerr();
655  Test__timezone();
656  Test__tzname();
657  Test__wcmdln();
658  Test__wctype();
659 #ifndef _M_ARM
660  Test__wenviron();
661 #endif
662  Test__winmajor();
663  Test__winminor();
664 #ifndef _M_ARM
665  Test__winver();
666 #endif
667  Test__wpgmptr();
668 }
void Test__timezone(void)
Definition: crtdata.c:478
void Test___mb_cur_max(void)
Definition: crtdata.c:110
void Test__wpgmptr(void)
Definition: crtdata.c:583
unsigned char * PUCHAR
Definition: retypes.h:3
void Test___lc_collate_cp(void)
Definition: crtdata.c:87
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
Definition: version.c:37
void Test___winitenv(void)
Definition: crtdata.c:188
void Test__fmode(void)
Definition: crtdata.c:346
void Test__tzname(void)
Definition: crtdata.c:493
void Test__wenviron(void)
Definition: crtdata.c:524
void Test__winminor(void)
Definition: crtdata.c:555
void Test___unguarded_readlc_active(void)
Definition: crtdata.c:163
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
void Test__osver(void)
Definition: crtdata.c:430
void Test__daylight(void)
Definition: crtdata.c:283
void Test__wctype(void)
Definition: crtdata.c:265
static void * s_ImageEnd
Definition: crtdata.c:20
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:246
void Test___lc_codepage(void)
Definition: crtdata.c:77
void Test__pgmptr(void)
Definition: crtdata.c:440
void Test__acmdln(void)
Definition: crtdata.c:199
void Test__sys_nerr(void)
Definition: crtdata.c:468
static OSVERSIONINFOW s_osvi
Definition: crtdata.c:18
void Test__sys_errlist(void)
Definition: crtdata.c:457
void Test__commode(void)
Definition: crtdata.c:224
void Test__mbcasemap(void)
Definition: crtdata.c:391
void Test__dstbias(void)
Definition: crtdata.c:303
void Test__iob(void)
Definition: crtdata.c:371
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
void Test__environ(void)
Definition: crtdata.c:321
void Test__ctype(void)
Definition: crtdata.c:238
void Test__mbctype(void)
Definition: crtdata.c:405
void Test___argv(void)
Definition: crtdata.c:45
void Test__winver(void)
Definition: crtdata.c:569
void Test___lc_handle(void)
Definition: crtdata.c:99
void Test___setlc_active(void)
Definition: crtdata.c:151
void Test__osplatform(void)
Definition: crtdata.c:420
void Test___badioinfo(void)
Definition: crtdata.c:57
void Test__wcmdln(void)
Definition: crtdata.c:514
void Test___pioinfo(void)
Definition: crtdata.c:145
void Test___initenv(void)
Definition: crtdata.c:66
char __ImageBase
Definition: mstscax.cpp:17
void Test__fileinfo(void)
Definition: crtdata.c:334
void Test___argc(void)
Definition: crtdata.c:33
void Test__winmajor(void)
Definition: crtdata.c:542
void Test___wargv(void)
Definition: crtdata.c:174
void Test__aexit_rtn(void)
Definition: crtdata.c:217
PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS
Definition: ntddk_ex.h:187

◆ Test___argc()

void Test___argc ( void  )

Definition at line 33 of file crtdata.c.

34 {
35  void* p = &__argc;
37 
38  #undef __argc
39  ok_ptr(&__argc, p);
40 #ifdef _M_IX86
41  ok_ptr(__p___argc(), p);
42 #endif
43 }
_CRTIMP int *__cdecl __p___argc()
Definition: getargs.c:475
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
#define FALSE
Definition: types.h:117
_CRTIMP int __argc
Definition: getargs.c:21
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test___argv()

void Test___argv ( void  )

Definition at line 45 of file crtdata.c.

46 {
47  void* p = &__argv;
49 
50  #undef __argv
51  ok_ptr(&__argv, p);
52 #ifdef _M_IX86
53  ok_ptr(__p___argv(), p);
54 #endif
55 }
_CRTIMP char ** __argv
Definition: getargs.c:18
#define ok_ptr(expression, result)
Definition: atltest.h:108
_CRTIMP char ***__cdecl __p___argv()
Definition: getargs.c:483
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
#define FALSE
Definition: types.h:117
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test___badioinfo()

void Test___badioinfo ( void  )

Definition at line 57 of file crtdata.c.

58 {
59  typedef struct _ioinfo ioinfo;
60  _CRTIMP extern ioinfo* __badioinfo[];
61  ok(__badioinfo != NULL, "__badioinfo is NULL\n");
62  ok(__badioinfo[0] != NULL, "__badioinfo is NULL\n");
63 }
_CRTIMP ioinfo * __badioinfo[]
Definition: file.c:126
Definition: file.c:40
#define _CRTIMP
Definition: crtdefs.h:72
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112

Referenced by START_TEST().

◆ Test___initenv()

void Test___initenv ( void  )

Definition at line 66 of file crtdata.c.

67 {
68  _CRTIMP extern char** __initenv;
69  ok(__initenv != NULL, "__initenv is NULL\n");
70  ok(*__initenv != NULL, "*__initenv is NULL\n");
71 #ifdef _M_IX86
72  _CRTIMP char*** __p___initenv(void);
74 #endif
75 }
char *** __p___initenv(void)
Definition: environ.c:400
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
char ** __initenv
Definition: environ.c:24
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112

Referenced by START_TEST().

◆ Test___lc_codepage()

void Test___lc_codepage ( void  )

Definition at line 77 of file crtdata.c.

78 {
79  _CRTIMP extern unsigned int __lc_codepage;
82  __lc_codepage++;
84  __lc_codepage--;
85 }
unsigned int __lc_codepage
Definition: locale.c:34
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_int(expression, result)
Definition: atltest.h:134
#define todo_ros
Definition: test.h:158
_CRTIMP unsigned int __cdecl ___lc_codepage_func(void)
Definition: locale.c:627

Referenced by START_TEST().

◆ Test___lc_collate_cp()

void Test___lc_collate_cp ( void  )

Definition at line 87 of file crtdata.c.

88 {
89  _CRTIMP extern int __lc_collate_cp;
96 }
#define _CRTIMP
Definition: crtdefs.h:72
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
#define FALSE
Definition: types.h:117
#define ok_int(expression, result)
Definition: atltest.h:134
int __lc_collate_cp
_CRTIMP unsigned int __cdecl ___lc_collate_cp_func(void)
Definition: locale.c:635

Referenced by START_TEST().

◆ Test___lc_handle()

void Test___lc_handle ( void  )

Definition at line 99 of file crtdata.c.

100 {
101  _CRTIMP int __lc_handle;
102  ok_int(__lc_handle, 0);
103  _CRTIMP int* ___lc_handle_func();
104  ok_int(*___lc_handle_func(), 0);
105  __lc_handle++;
107  __lc_handle--;
108 }
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_int(expression, result)
Definition: atltest.h:134
#define todo_ros
Definition: test.h:158
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 110 of file crtdata.c.

111 {
112  void* p = &__mb_cur_max;
114  ok_int(__mb_cur_max, 1);
115 
116  #undef __mb_cur_max
117  _CRTIMP extern int __mb_cur_max;
118  ok_ptr(&__mb_cur_max, p);
119 
121 #ifdef _M_IX86
122  _CRTIMP int* __p___mb_cur_max(void);
123  ok_int(*__p___mb_cur_max(), 1);
124 #endif
125  __mb_cur_max++;
126  if (s_osvi.dwMajorVersion >= 6)
127  {
129 #ifdef _M_IX86
130  ok_int(*__p___mb_cur_max(), 1);
131 #endif
132  }
133  else
134  {
136 #ifdef _M_IX86
137  todo_ros ok_ptr(__p___mb_cur_max(), p); // wine code handles it like on Vista+
139 #endif
140  }
141 
142  __mb_cur_max--;
143 }
#define ___mb_cur_max_func()
Definition: ctype.h:636
#define __mb_cur_max
Definition: ctype.h:629
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
int *__cdecl __p___mb_cur_max(void)
Definition: environ.c:430
#define FALSE
Definition: types.h:117
#define ok_int(expression, result)
Definition: atltest.h:134
#define todo_ros
Definition: test.h:158
ULONG dwMajorVersion
Definition: rtltypes.h:247
static OSVERSIONINFOW s_osvi
Definition: crtdata.c:18
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test___pioinfo()

void Test___pioinfo ( void  )

Definition at line 145 of file crtdata.c.

146 {
147 
148 }

Referenced by START_TEST().

◆ Test___setlc_active()

void Test___setlc_active ( void  )

Definition at line 151 of file crtdata.c.

152 {
153  _CRTIMP extern unsigned int __setlc_active;
155 
156  _CRTIMP unsigned int ___setlc_active_func(void);
158  __setlc_active++;
160  __setlc_active--;
161 }
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_int(expression, result)
Definition: atltest.h:134
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 163 of file crtdata.c.

164 {
165  _CRTIMP extern unsigned int __unguarded_readlc_active;
166  void* p = &__unguarded_readlc_active;
168 
169  _CRTIMP unsigned int* ___unguarded_readlc_active_add_func(void);
171 }
unsigned int *CDECL ___unguarded_readlc_active_add_func(void)
Definition: locale.c:1490
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
unsigned int __unguarded_readlc_active
Definition: environ.c:17
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test___wargv()

void Test___wargv ( void  )

Definition at line 174 of file crtdata.c.

175 {
176  void* p = &__wargv;
178 
179  #undef __wargv
180  _CRTIMP extern wchar_t ** __wargv;
181  ok_ptr(&__wargv, p);
182 #ifdef _M_IX86
183  ok_ptr(__p___wargv(), p);
184 #endif
185 }
#define _CRTIMP
Definition: crtdefs.h:72
_CRTIMP wchar_t ***__cdecl __p___wargv()
Definition: getargs.c:491
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
#define FALSE
Definition: types.h:117
_CRTIMP wchar_t ** __wargv
Definition: getargs.c:20
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test___winitenv()

void Test___winitenv ( void  )

Definition at line 188 of file crtdata.c.

189 {
190  _CRTIMP extern wchar_t** __winitenv;
191  todo_ros ok(__winitenv == NULL, "__winitenv is not NULL\n");
192 #ifdef _M_IX86
193  _CRTIMP wchar_t*** __p___winitenv(void);
195 #endif
196 }
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
wchar_t ** __winitenv
Definition: environ.c:25
#define todo_ros
Definition: test.h:158
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
wchar_t *** __p___winitenv(void)
Definition: environ.c:408

Referenced by START_TEST().

◆ Test__acmdln()

void Test__acmdln ( void  )

Definition at line 199 of file crtdata.c.

200 {
201  _CRTIMP extern char* _acmdln;
202  ok(_acmdln != NULL, "__winitenv is NULL\n");
203 #ifdef _M_IX86
204  _CRTIMP char** __p__acmdln(void);
206 #endif
207 }
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
char * _acmdln
Definition: environ.c:18
const char ** __p__acmdln(void)
Definition: environ.c:368

Referenced by START_TEST().

◆ Test__aexit_rtn()

void Test__aexit_rtn ( void  )

Definition at line 217 of file crtdata.c.

218 {
219  typedef void (*_exit_t)(int exitcode);
220  _CRTIMP extern _exit_t _aexit_rtn;
222 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
aexit_t _aexit_rtn
Definition: amsg.c:39
void _exit(int exitcode)
Definition: _exit.c:25

Referenced by START_TEST().

◆ Test__commode()

void Test__commode ( void  )

Definition at line 224 of file crtdata.c.

225 {
226  void* p = &_commode;
228  ok_int(_commode, 0);
229 
230  #undef _commode
231  _CRTIMP extern int _commode;
232  ok_ptr(&_commode, p);
233 #ifdef _M_IX86
235 #endif
236 }
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
int * __p__commode(void)
Definition: environ.c:352
#define FALSE
Definition: types.h:117
#define ok_int(expression, result)
Definition: atltest.h:134
_CRTIMP int _commode
Definition: environ.c:31
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__ctype()

void Test__ctype ( void  )

Definition at line 238 of file crtdata.c.

239 {
240  _CRTIMP extern const unsigned short _ctype[];
241  ok_int(_ctype[0], 0);
242  ok_int(_ctype[1], _CONTROL);
243 
244  #undef _pctype
245  _CRTIMP extern const unsigned short* _pctype;
246  ok(_pctype != &_ctype[0], "_pwctype should not match &_wctype[0]");
247  if (s_osvi.dwMajorVersion >= 6)
248  {
249  ok(_pctype != &_ctype[1], "_pwctype should not match &_wctype[1]");
250  }
251  else
252  {
253  ok(_pctype == &_ctype[1], "_pwctype should match &_wctype[1]");
254  }
255 
256  ok(__pctype_func() != _ctype, "__pctype_func() should not match _ctype\n");
259 #ifdef _M_IX86
260  _CRTIMP const unsigned short** __cdecl __p__pctype(void);
262 #endif
263 }
#define _CONTROL
Definition: ctype.h:71
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
const unsigned short * _pctype
Definition: ctype.c:556
#define ok_int(expression, result)
Definition: atltest.h:134
ULONG dwMajorVersion
Definition: rtltypes.h:247
static OSVERSIONINFOW s_osvi
Definition: crtdata.c:18
const unsigned short _ctype[257]
Definition: ctype.c:36
#define ok(value,...)
Definition: atltest.h:57
const unsigned short ** __p__pctype(void)
Definition: locale.c:1518
#define __pctype_func()
Definition: wctype.h:34

Referenced by START_TEST().

◆ Test__daylight()

void Test__daylight ( void  )

Definition at line 283 of file crtdata.c.

284 {
285  void* p = &_daylight;
287 
288  #undef _daylight
289  _CRTIMP extern int _daylight;
290  ok_ptr(&_daylight, p);
291 
292 #ifdef _M_IX86
293  _CRTIMP void* __p__daylight(void);
295 #endif
296 #if (WINVER >= 0x600)
297  _CRTIMP int* __cdecl __daylight(void);
298  ok_ptr(&__daylight, &_daylight);
299 #endif
300 }
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
#define FALSE
Definition: types.h:117
void * __p__daylight(void)
Definition: timezone.c:37
int _daylight
Definition: timezone.c:30
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__dstbias()

void Test__dstbias ( void  )

Definition at line 303 of file crtdata.c.

304 {
305  void* p = &_dstbias;
307 
308  #undef _dstbias
309  _CRTIMP extern long _dstbias;
310  ok_ptr(&_dstbias, p);
311 #ifdef _M_IX86
312  _CRTIMP long* __cdecl __p__dstbias(void);
314 #endif
315 #if (WINVER >= 0x600)
316  _CRTIMP long* __cdecl __dstbias(void);
317  ok_ptr(&__dstbias, &_dstbias);
318 #endif
319 }
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
#define FALSE
Definition: types.h:117
long * __p__dstbias(void)
Definition: timezone.c:69
long _dstbias
Definition: timezone.c:62
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__environ()

void Test__environ ( void  )

Definition at line 321 of file crtdata.c.

322 {
323  void* p = &_environ;
324  ok(_environ != NULL, "_environ == NULL\n");
325 
326  #undef _environ
327  _CRTIMP extern char** _environ;
328  ok_ptr(&_environ, p);
329 #ifdef _M_IX86
331 #endif
332 }
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
char ** _environ
Definition: environ.c:22
_CRTIMP char ***__cdecl __p__environ()
Definition: environ.c:384
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__fileinfo()

void Test__fileinfo ( void  )

Definition at line 334 of file crtdata.c.

335 {
336  _CRTIMP extern int _fileinfo;
337  ok_int(_fileinfo, -1);
338 
339 #ifdef _M_IX86
340  _CRTIMP int* __p__fileinfo();
342 #endif
343 }
void * __p__fileinfo()
Definition: stubs.c:16
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
int _fileinfo
Definition: stubs.c:13

Referenced by START_TEST().

◆ Test__fmode()

void Test__fmode ( void  )

Definition at line 346 of file crtdata.c.

347 {
348  void* p = &_fmode;
350  ok_int(_fmode, 0);
351 
352  #undef _fmode
353  _CRTIMP extern int _fmode;
354  ok_ptr(&_fmode, p);
355 
356 #ifdef _M_IX86
357  _CRTIMP int* __cdecl __p__fmode();
358  ok_ptr(__p__fmode(), p);
359 #endif
360 
361 #if (_WIN32_WINNT >= 0x600)
362  _fmode = 1234;
363  _CRTIMP errno_t __cdecl _get_fmode(_Out_ int* _PMode);
364  int mode;
365  ok_int(_get_fmode(&mode), 0);
366  ok_int(mode, _fmode);
367  _fmode = 0;
368 #endif
369 }
#define __cdecl
Definition: accygwin.h:79
#define _Out_
Definition: ms_sal.h:345
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
#define FALSE
Definition: types.h:117
unsigned int *__cdecl __p__fmode(void)
Definition: fmode.c:9
#define ok_int(expression, result)
Definition: atltest.h:134
int errno_t
Definition: crtdefs.h:374
_CRTIMP errno_t __cdecl _get_fmode(_Out_ int *_PMode)
GLenum mode
Definition: glext.h:6217
_CRTIMP int _fmode
Definition: fmode.c:4
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__iob()

void Test__iob ( void  )

Definition at line 371 of file crtdata.c.

372 {
373  void* p = &_iob;
375  ok_ptr(&_iob[0], stdin);
376  ok_ptr(&_iob[1], stdout);
377  ok_ptr(&_iob[2], stderr);
378 
379  #undef _iob
380  _CRTIMP extern FILE _iob[];
381  ok_ptr(&_iob, p);
382 
383  ok_ptr(__iob_func(), &_iob);
384 
385 #ifdef _M_IX86
386  _CRTIMP int* __cdecl __p__iob();
387  ok_ptr(__p__iob(), p);
388 #endif
389 }
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
FILE * stdin
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
FILE * stdout
#define FALSE
Definition: types.h:117
FILE * stderr
FILE _iob[_IOB_ENTRIES]
Definition: file.c:133
GLfloat GLfloat p
Definition: glext.h:8902
_CRTIMP FILE *__cdecl __iob_func(void)
Definition: file.c:683

Referenced by START_TEST().

◆ Test__mbcasemap()

void Test__mbcasemap ( void  )

Definition at line 391 of file crtdata.c.

392 {
393  void* p = &_mbcasemap;
394  ok_int(_mbcasemap[0], 0);
395 
396  #undef _mbcasemap
397  ok_ptr(_mbcasemap, p);
398 
399 #ifdef _M_IX86
400  _CRTIMP unsigned char* __cdecl __p__mbcasemap();
402 #endif
403 }
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
unsigned char _mbcasemap[1]
Definition: stubs.c:21
void * __p__mbcasemap()
Definition: stubs.c:24
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__mbctype()

void Test__mbctype ( void  )

Definition at line 405 of file crtdata.c.

406 {
407  void* p = &_mbctype;
408  ok_int(_mbctype[0], 0);
409 
410  #undef _mbctype
411  ok_ptr(&_mbctype, p);
412 
413 #ifdef _M_IX86
414  _CRTIMP unsigned char* __cdecl __p__mbctype();
415  todo_ros ok_ptr(__p__mbctype(), &_mbctype); // wine implements thiss like on Vista
416 #endif
417 }
_CRTIMP unsigned char _mbctype[257]
Definition: locale.c:40
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
unsigned char * __p__mbctype(void)
Definition: ismblead.c:48
#define ok_int(expression, result)
Definition: atltest.h:134
#define todo_ros
Definition: test.h:158
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__osplatform()

void Test__osplatform ( void  )

Definition at line 420 of file crtdata.c.

421 {
423 #if (WINVER >= 0x600)
424  _CRTIMP unsigned int __cdecl _get_osplatform(void);
426 #endif
427 }
errno_t __cdecl _get_osplatform(_Out_ unsigned int *_Value)
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
unsigned int _osplatform
Definition: environ.c:10
static OSVERSIONINFOW s_osvi
Definition: crtdata.c:18
ULONG dwPlatformId
Definition: rtltypes.h:250

Referenced by START_TEST().

◆ Test__osver()

void Test__osver ( void  )

Definition at line 430 of file crtdata.c.

431 {
433 
434 #ifdef _M_IX86
435  _CRTIMP int* __cdecl __p__osver();
436  ok_ptr(__p__osver(), &_osver);
437 #endif
438 }
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
static OSVERSIONINFOW s_osvi
Definition: crtdata.c:18
ULONG dwBuildNumber
Definition: rtltypes.h:249
unsigned int _osver
Definition: environ.c:11
unsigned int * __p__osver(void)
Definition: environ.c:446

Referenced by START_TEST().

◆ Test__pgmptr()

void Test__pgmptr ( void  )

Definition at line 440 of file crtdata.c.

441 {
442  void* p = &_pgmptr;
443  ok(_pgmptr != NULL, "_pgmptr should not be NULL\n");
444 
445  #undef _pgmptr
446  _CRTIMP extern char* _pgmptr;
447  ok_ptr(&_pgmptr, p);
448 #ifdef _M_IX86
450 #endif
451 #if (WINVER >= 0x600)
452  _CRTIMP char* __cdecl _get_pgmptr(void);
454 #endif
455 }
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
_CRTIMP char **__cdecl __p__pgmptr()
Definition: environ.c:454
#define ok_ptr(expression, result)
Definition: atltest.h:108
_CRTIMP errno_t __cdecl _get_pgmptr(_Outptr_result_z_ char **_Value)
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
_CRTIMP char * _pgmptr
Definition: environ.c:27
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__sys_errlist()

void Test__sys_errlist ( void  )

Definition at line 457 of file crtdata.c.

458 {
459  void* p = &_sys_errlist;
460  ok_int(strcmp(_sys_errlist[0], strerror(0)), 0);
461  ok_int(strcmp(_sys_errlist[42], strerror(42)), 0);
462 
463  #undef _sys_errlist
464  _CRTIMP extern char* _sys_errlist[];
465  ok_ptr(&_sys_errlist, p);
466 }
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
const char * strerror(int err)
Definition: compat_str.c:23
_CRTIMP char * _sys_errlist[]
Definition: strerror.c:68
#define ok_int(expression, result)
Definition: atltest.h:134
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__sys_nerr()

void Test__sys_nerr ( void  )

Definition at line 468 of file crtdata.c.

469 {
470  void* p = &_sys_nerr;
471  ok_int(_sys_nerr, 43);
472 
473  #undef _sys_nerr
474  _CRTIMP extern int _sys_nerr;
475  ok_ptr(&_sys_nerr, p);
476 }
#define _CRTIMP
Definition: crtdefs.h:72
_CRTIMP int _sys_nerr
Definition: strerror.c:80
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__timezone()

void Test__timezone ( void  )

Definition at line 478 of file crtdata.c.

479 {
480  void* p = &_timezone;
482 
483  #undef _timezone
484  _CRTIMP extern long _timezone;
485  ok_ptr(&_timezone, p);
486 
487 #ifdef _M_IX86
488  _CRTIMP char** __p__timezone();
490 #endif
491 }
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
long * __p__timezone(void)
Definition: timezone.c:53
#define FALSE
Definition: types.h:117
long _timezone
Definition: timezone.c:46
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__tzname()

void Test__tzname ( void  )

Definition at line 493 of file crtdata.c.

494 {
495  void* p = &_tzname;
497  ok(_tzname[0] != NULL, "_tzname[0] == NULL\n");
498  ok(_tzname[0] != NULL, "_tzname[0] == NULL\n");
499 
500  #undef _tzname
501  _CRTIMP extern char * _tzname[2];
502  ok_ptr(_tzname, p);
503 
504 #ifdef _M_IX86
505  _CRTIMP char** __p__tzname();
507 #endif
508 #if (WINVER >= 0x600)
509  _CRTIMP char* __cdecl __tzname(void);
510  ok_ptr(__tzname(), _wenviron);
511 #endif
512 }
wchar_t ** _wenviron
Definition: environ.c:23
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define test_is_local_symbol(addr, is)
Definition: crtdata.c:28
#define FALSE
Definition: types.h:117
char * _tzname[2]
Definition: timezone.c:22
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
char ** __p__tzname(void)
Definition: timezone.c:79
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__wcmdln()

void Test__wcmdln ( void  )

Definition at line 514 of file crtdata.c.

515 {
516  _CRTIMP extern wchar_t* _wcmdln;
517 #ifdef _M_IX86
518  _CRTIMP wchar_t** __p__wcmdln(void);
520 #endif
521 }
const wchar_t ** __p__wcmdln(void)
Definition: environ.c:376
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
wchar_t * _wcmdln
Definition: environ.c:19

Referenced by START_TEST().

◆ Test__wctype()

void Test__wctype ( void  )

Definition at line 265 of file crtdata.c.

266 {
267  ok_int(_wctype[0], 0);
268  ok_int(_wctype[1], _CONTROL);
269 
270  #undef _pwctype
271  _CRTIMP extern const unsigned short* _pwctype;
272  ok_ptr(_pwctype, &_wctype[1]);
273 
274  ok(__pwctype_func() != _wctype, "__pwctype_func() == _wctype\n");
277 #ifdef _M_IX86
278  _CRTIMP const unsigned short** __cdecl __p__pwctype(void);
280 #endif
281 }
#define _CONTROL
Definition: ctype.h:71
#define __cdecl
Definition: accygwin.h:79
#define __pwctype_func()
Definition: wctype.h:68
#define _CRTIMP
Definition: crtdefs.h:72
const unsigned short * _pwctype
Definition: ctype.c:557
#define ok_ptr(expression, result)
Definition: atltest.h:108
const unsigned short ** __p__pwctype(void)
Definition: ctype.c:564
#define ok_int(expression, result)
Definition: atltest.h:134
const unsigned short _wctype[]
Definition: ctype.c:296
#define ok(value,...)
Definition: atltest.h:57
#define __pctype_func()
Definition: wctype.h:34

Referenced by START_TEST().

◆ Test__wenviron()

void Test__wenviron ( void  )

Definition at line 524 of file crtdata.c.

525 {
526  void* p = &_wenviron;
527  todo_ros ok(_wenviron == NULL, "_wenviron is not NULL\n");
528 
529  #undef _wenviron
530  _CRTIMP extern wchar_t** _wenviron;
531  ok_ptr(&_wenviron, p);
532 #ifdef _M_IX86
534 #endif
535 #if (WINVER >= 0x600)
536  _CRTIMP unsigned int __cdecl _get_wenviron(void);
538 #endif
539 }
_CRTIMP wchar_t ***__cdecl __p__wenviron()
Definition: environ.c:392
wchar_t ** _wenviron
Definition: environ.c:23
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
_CRTIMP errno_t __cdecl _get_wenviron(_Out_ wchar_t ***)
#define todo_ros
Definition: test.h:158
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by START_TEST().

◆ Test__winmajor()

void Test__winmajor ( void  )

Definition at line 542 of file crtdata.c.

543 {
545 #ifdef _M_IX86
546  _CRTIMP unsigned int* __cdecl __p__winmajor();
548 #endif
549 #if (WINVER >= 0x600)
550  _CRTIMP unsigned int __cdecl _get_winmajor(void);
552 #endif
553 }
errno_t __cdecl _get_winmajor(_Out_ unsigned int *_Value)
unsigned int * __p__winmajor(void)
Definition: environ.c:500
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
ULONG dwMajorVersion
Definition: rtltypes.h:247
static OSVERSIONINFOW s_osvi
Definition: crtdata.c:18
unsigned int _winmajor
Definition: environ.c:13

Referenced by START_TEST().

◆ Test__winminor()

void Test__winminor ( void  )

Definition at line 555 of file crtdata.c.

556 {
558 #ifdef _M_IX86
559  _CRTIMP unsigned int* __cdecl __p__winminor();
561 #endif
562 #if (WINVER >= 0x600)
563  _CRTIMP unsigned int __cdecl _get_winminor(void);
565 #endif
566 }
unsigned int * __p__winminor(void)
Definition: environ.c:508
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
unsigned int _winminor
Definition: environ.c:12
errno_t __cdecl _get_winminor(_Out_ unsigned int *_Value)
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
static OSVERSIONINFOW s_osvi
Definition: crtdata.c:18
ULONG dwMinorVersion
Definition: rtltypes.h:248

Referenced by START_TEST().

◆ Test__winver()

void Test__winver ( void  )

Definition at line 569 of file crtdata.c.

570 {
572 #ifdef _M_IX86
573  _CRTIMP unsigned int* __cdecl __p__winver();
575 #endif
576 #if (WINVER >= 0x600)
577  _CRTIMP unsigned int __cdecl _get_winver(void);
579 #endif
580 }
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
ULONG dwMajorVersion
Definition: rtltypes.h:247
static OSVERSIONINFOW s_osvi
Definition: crtdata.c:18
errno_t __cdecl _get_winver(_Out_ unsigned int *_Value)
unsigned int * __p__winver(void)
Definition: environ.c:516
unsigned int _winver
Definition: environ.c:14
ULONG dwMinorVersion
Definition: rtltypes.h:248

Referenced by START_TEST().

◆ Test__wpgmptr()

void Test__wpgmptr ( void  )

Definition at line 583 of file crtdata.c.

584 {
585  void* p = _wpgmptr;
586  ok_ptr(_wpgmptr, NULL);
587 
588  #undef _wpgmptr
589  ok_ptr(_wpgmptr, p);
590 
591 #ifdef _M_IX86
592  _CRTIMP wchar_t ** __cdecl __p__wpgmptr();
594 #endif
595 #if (WINVER >= 0x600)
596  _CRTIMP unsigned int __cdecl _get_wpgmptr(void);
598 #endif
599 }
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP
Definition: crtdefs.h:72
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define ok_int(expression, result)
Definition: atltest.h:134
_CRTIMP errno_t __cdecl _get_wpgmptr(_Outptr_result_z_ wchar_t **_Value)
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902
_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

Definition at line 17 of file mstscax.cpp.

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