1
2list(APPEND SOURCE_MSVCRT
3    fpcontrol.c
4#    _CrtCheckMemory.c
5#    _CrtDbgBreak.c
6#    _CrtDbgReport.c
7#    _CrtDbgReportV.c
8#    _CrtDbgReportW.c
9#    _CrtDbgReportWV.c
10#    _CrtDoForAllClientObjects.c
11#    _CrtDumpMemoryLeaks.c
12#    _CrtIsMemoryBlock.c
13#    _CrtIsValidHeapPointer.c
14#    _CrtIsValidPointer.c
15#    _CrtMemCheckpoint.c
16#    _CrtMemDifference.c
17#    _CrtMemDumpAllObjectsSince.c
18#    _CrtMemDumpStatistics.c
19#    _CrtReportBlockType.c
20#    _CrtSetAllocHook.c
21#    _CrtSetBreakAlloc.c
22#    _CrtSetDbgBlockType.c
23#    _CrtSetDbgFlag.c
24#    _CrtSetDumpClient.c
25#    _CrtSetReportFile.c
26#    _CrtSetReportHook.c
27#    _CrtSetReportHook2.c
28#    _CrtSetReportMode.c
29#    _CxxThrowException.c
30#    _Getdays.c
31#    _Getmonths.c
32#    _Gettnames.c
33#    _HUGE.c
34#    _Strftime.c
35#    _XcptFilter.c
36#    __CppXcptFilter.c
37#    __CxxCallUnwindDelDtor.c
38#    __CxxCallUnwindDtor.c
39#    __CxxCallUnwindVecDtor.c
40#    __CxxDetectRethrow.c
41#    __CxxExceptionFilter.c
42#    __CxxQueryExceptionSize.c
43#    __CxxRegisterExceptionObject
44#    __CxxUnregisterExceptionObject
45#    __DestructExceptionObject
46#    __RTCastToVoid.c MSVCRT___RTCastToVoid
47#    __RTDynamicCast.c MSVCRT___RTDynamicCast
48#    __RTtypeid.c MSVCRT___RTtypeid
49#    __STRINGTOLD.c
50#    ___lc_codepage_func.c
51#    ___lc_collate_cp_func.c
52#    ___lc_handle_func.c
53#    ___mb_cur_max_func.c MSVCRT___mb_cur_max_func
54#    ___setlc_active_func.c
55#    ___unguarded_readlc_active_add_func.c
56#    __argc
57#    __argv
58#    __badioinfo __badioinfo
59#    __crtCompareStringA.c kernel32.CompareStringA
60#    __crtCompareStringW.c kernel32.CompareStringW
61#    __crtGetLocaleInfoW.c kernel32.GetLocaleInfoW
62#    __crtGetStringTypeW.c
63#    __crtLCMapStringA.c
64#    __crtLCMapStringW
65#    __daylight.c __p__daylight
66#    __dllonexit.c
67#    __doserrno.c
68#    __fpecode.c
69#    __get_app_type.c
70#    __getmainargs.c
71#    __initenv
72#    __iob_func.c
73#    __isascii.c
74#    __iscsym.c
75#    __iscsymf.c
76#    __lc_codepage MSVCRT___lc_codepage
77#    __lc_collate # not in XP / 7
78#    __lc_collate_cp MSVCRT___lc_collate_cp
79#    __lc_handle MSVCRT___lc_handle
80#    __lconv_init.c
81#    __libm_sse2_acos
82#    __libm_sse2_acosf
83#    __libm_sse2_asin
84#    __libm_sse2_asinf
85#    __libm_sse2_atan
86#    __libm_sse2_atan2
87#    __libm_sse2_atanf
88#    __libm_sse2_cos
89#    __libm_sse2_cosf
90#    __libm_sse2_exp
91#    __libm_sse2_expf
92#    __libm_sse2_log
93#    __libm_sse2_log10
94#    __libm_sse2_log10f
95#    __libm_sse2_logf
96#    __libm_sse2_pow
97#    __libm_sse2_powf
98#    __libm_sse2_sin
99#    __libm_sse2_sinf
100#    __libm_sse2_tan
101#    __libm_sse2_tanf
102#    __mb_cur_max
103#    __pctype_func.c
104#    __pioinfo
105#    __pwctype_func.c
106#    __pxcptinfoptrs.c
107#    __set_app_type.c
108#    __setlc_active
109#    __setusermatherr.c
110#    __strncnt
111#    __threadhandle.c kernel32.GetCurrentThread
112#    __threadid.c kernel32.GetCurrentThreadId
113#    __toascii.c
114#    __uncaught_exception.c
115#    __unDName.c
116#    __unDNameEx.c
117#    __unguarded_readlc_active
118#    __wargv __wargv
119#    __wcserror.c
120#    __wcserror_s.c
121#    __wcsncnt
122#    __wgetmainargs.c
123#    __winitenv
124#    _abnormal_termination.c
125#    _abs64
126#    _access.c
127#    _access_s.c
128#    _acmdln
129#    _aexit_rtn
130#    _aligned_free.c
131#    _aligned_free_dbg
132#    _aligned_malloc.c
133#    _aligned_malloc_dbg
134#    _aligned_offset_malloc.c
135#    _aligned_offset_malloc_dbg
136#    _aligned_offset_realloc.c
137#    _aligned_offset_realloc_dbg
138#    _aligned_realloc.c
139#    _aligned_realloc_dbg
140#    _amsg_exit.c
141#    _assert.c
142#    _atodbl.c
143#    _atodbl_l
144#    _atof_l.c
145#    _atoflt_l
146#    -ret64 _atoi64.c
147#    _atoi64_l
148#    _atoi_l
149#    _atol_l
150#    _atoldbl.c
151#    _atoldbl_l
152#    _beep.c
153#    _beginthread.c
154#    _beginthreadex.c
155#    _c_exit.c
156#    _cabs.c
157#    _callnewh.c
158#    _calloc_dbg
159#    _cexit.c
160#    _cgets.c
161#    _cgets_s
162#    _cgetws
163#    _cgetws_s
164#    _chdir.c
165#    _chdrive.c
166#    _chgsign.c
167#    _chmod.c
168#    _chsize.c
169#    _chsize_s
170#    _chvalidator
171#    _chvalidator_l
172#    _close.c
173#    _commit.c
174#    _commode
175#    _copysign.c
176#    _cprintf.c
177#    _cprintf_l
178#    _cprintf_p
179#    _cprintf_p_l
180#    _cprintf_s
181#    _cprintf_s_l
182#    _cputs.c
183#    _cputws
184#    _creat.c
185#    _crtAssertBusy
186#    _crtBreakAlloc
187#    _crtDbgFlag
188#    _cscanf.c
189#    _cscanf_l.c
190#    _cscanf_s.c
191#    _cscanf_s_l.c
192#    _ctime32.c
193#    _ctime32_s.c
194#    _ctime64.c
195#    _ctime64_s.c
196#    _ctype
197#    _cwait.c
198#    _cwprintf.c
199#    _cwprintf_l
200#    _cwprintf_p
201#    _cwprintf_p_l
202#    _cwprintf_s
203#    _cwprintf_s_l
204#    _cwscanf.c
205#    _cwscanf_l.c
206#    _cwscanf_s.c
207#    _cwscanf_s_l.c
208#    _daylight
209#    _difftime32.c
210#    _difftime64.c
211#    _dstbias
212#    _dup.c
213#    _dup2.c
214#    _ecvt.c
215#    _ecvt_s
216#    _endthread.c
217#    _endthreadex.c
218#    _environ
219#    _eof.c
220#    _errno.c
221#    _execl.c
222#    _execle.c
223#    _execlp.c
224#    _execlpe.c
225#    _execv.c
226#    _execve.c
227#    _execvp.c
228#    _execvpe.c
229#    _exit.c
230#    _expand.c
231#    _expand_dbg
232#    _fcloseall.c
233#    _fcvt.c
234#    _fcvt_s
235#    _fdopen.c
236#    _fgetchar.c
237#    _fgetwchar.c
238#    _filbuf.c
239#    _fileinfo
240#    _filelength.c
241#    -ret64 _filelengthi64.c
242#    _fileno.c
243#    _findclose.c
244#    _findfirst.c
245#    _findfirst64.c
246#    _findfirsti64.c
247#    _findnext.c
248#    _findnext64.c
249#    _findnexti64.c
250#    _finite.c
251#    _flsbuf.c
252#    _flushall.c
253#    _fmode
254#    _fpclass.c
255#    _fpieee_flt.c
256#    _fpreset.c
257#    _fprintf_l
258#    _fprintf_p
259#    _fprintf_p_l
260#    _fprintf_s_l
261#    _fputchar.c
262#    _fputwchar.c
263#    _free_dbg
264#    _freea
265#    _freea_s
266#    _fscanf_l
267#    _fscanf_l.c
268#    _fscanf_s_l.c
269#    _fseeki64.c
270#    _fsopen.c
271#    _fstat.c
272#    _fstat64.c
273#    _fstati64.c
274#    -ret64 _ftelli64.c
275#    _ftime.c
276#    _ftime32.c
277#    _ftime32_s
278#    _ftime64.c
279#    _ftime64_s
280#    _ftol2_sse_excpt
281#    _fullpath.c
282#    _fullpath_dbg
283#    _futime.c
284#    _futime32.c
285#    _futime64.c
286#    _fwprintf_l
287#    _fwprintf_p
288#    _fwprintf_p_l
289#    _fwprintf_s_l
290#    _fwscanf_l.c
291#    _fwscanf_s_l.c
292#    _gcvt.c
293#    _gcvt_s
294#    _get_doserrno.c
295#    _get_environ
296#    _get_errno.c
297#    _get_fileinfo
298#    _get_fmode
299#    _get_heap_handle.c
300#    _get_osfhandle.c
301#    _get_osplatform.c
302#    _get_osver
303#    _get_output_format.c
304#    _get_pgmptr.c
305#    _get_sbh_threshold.c
306#    _get_wenviron
307#    _get_winmajor
308#    _get_winminor
309#    _get_winver
310#    _get_wpgmptr.c
311#    _get_terminate.c
312#    _get_tzname.c
313#    _get_unexpected.c
314#    _getch.c
315#    _getche.c
316#    _getcwd.c
317#    _getdcwd.c
318#    _getdiskfree.c
319#    _getdllprocaddr.c
320#    _getdrive.c
321#    _getdrives.c kernel32.GetLogicalDrives
322#    _getmaxstdio.c
323#    _getmbcp.c
324#    _getpid.c kernel32.GetCurrentProcessId
325#    _getsystime.c
326#    _getw.c
327#    _getwch
328#    _getwche
329#    _getws.c
330#    _gmtime32.c
331#    _gmtime32_s.c
332#    _gmtime64.c
333#    _gmtime64_s.c
334#    _heapadd.c
335#    _heapchk.c
336#    _heapmin.c
337#    _heapset.c
338#    _heapused.c
339#    _heapwalk.c
340#    _hypot.c
341#    _i64toa.c
342#    _i64toa_s.c
343#    _i64tow.c
344#    _i64tow_s.c
345#    _initterm.c
346#    _initterm_e.c
347#    _invalid_parameter.c
348#    _iob
349#    _isalnum_l
350#    _isalpha_l
351#    _isatty.c
352#    _iscntrl_l
353#    _isctype.c
354#    _isctype_l
355#    _isdigit_l
356#    _isgraph_l
357#    _isleadbyte_l
358#    _islower_l
359#    _ismbbalnum.c
360#    _ismbbalnum_l
361#    _ismbbalpha.c
362#    _ismbbalpha_l
363#    _ismbbgraph.c
364#    _ismbbgraph_l
365#    _ismbbkalnum.c
366#    _ismbbkalnum_l
367#    _ismbbkana.c
368#    _ismbbkana_l
369#    _ismbbkprint.c
370#    _ismbbkprint_l
371#    _ismbbkpunct.c
372#    _ismbbkpunct_l
373#    _ismbblead.c
374#    _ismbblead_l
375#    _ismbbprint.c
376#    _ismbbprint_l
377#    _ismbbpunct.c
378#    _ismbbpunct_l
379#    _ismbbtrail.c
380#    _ismbbtrail_l
381#    _ismbcalnum.c
382#    _ismbcalnum_l
383#    _ismbcalpha.c
384#    _ismbcalpha_l
385#    _ismbcdigit.c
386#    _ismbcdigit_l
387#    _ismbcgraph.c
388#    _ismbcgraph_l
389#    _ismbchira.c
390#    _ismbchira_l
391#    _ismbckata.c
392#    _ismbckata_l
393#    _ismbcl0.c
394#    _ismbcl0_l
395#    _ismbcl1.c
396#    _ismbcl1_l
397#    _ismbcl2.c
398#    _ismbcl2_l
399#    _ismbclegal.c
400#    _ismbclegal_l
401#    _ismbclower.c
402#    _ismbclower_l
403#    _ismbcprint.c
404#    _ismbcprint_l
405#    _ismbcpunct.c
406#    _ismbcpunct_l
407#    _ismbcspace.c
408#    _ismbcspace_l
409#    _ismbcsymbol.c
410#    _ismbcsymbol_l
411#    _ismbcupper.c
412#    _ismbcupper_l
413#    _ismbslead.c
414#    _ismbslead_l
415#    _ismbstrail.c
416#    _ismbstrail_l
417#    _isnan.c
418#    _isprint_l
419#    _isspace_l
420#    _isupper_l
421#    _iswalnum_l
422#    _iswalpha_l
423#    _iswcntrl_l
424#    _iswctype_l
425#    _iswdigit_l
426#    _iswgraph_l
427#    _iswlower_l
428#    _iswprint_l
429#    _iswpunct_l
430#    _iswspace_l
431#    _iswupper_l
432#    _iswxdigit_l
433#    _isxdigit_l
434#    _itoa.c
435#    _itoa_s.c
436#    _itow.c
437#    _itow_s.c
438#    _j0.c
439#    _j1.c
440#    _jn.c
441#    _kbhit.c
442#    _lfind.c
443#    _lfind_s
444#    _loaddll.c
445#    _localtime32.c
446#    _localtime32_s.c
447#    _localtime64.c
448#    _localtime64_s.c
449#    _lock.c
450#    _locking.c
451#    _logb.c
452#    _longjmpex.c longjmp
453#    _lrotl.c
454#    _lrotr.c
455#    _lsearch.c
456#    _lsearch_s
457#    _lseek.c
458#    -ret64 _lseeki64.c
459#    _ltoa.c
460#    _ltoa_s.c
461#    _ltow.c
462#    _ltow_s.c
463#    _makepath.c
464#    _makepath_s.c
465#    _malloc_dbg
466#    _mbbtombc.c
467#    _mbbtombc_l
468#    _mbbtype.c
469#    _mbcasemap
470#    _mbccpy .c
471#    _mbccpy_l
472#    _mbccpy_s
473#    _mbccpy_s_l
474#    _mbcjistojms.c
475#    _mbcjistojms_l
476#    _mbcjmstojis.c
477#    _mbcjmstojis_l
478#    _mbclen.c
479#    _mbclen_l
480#    _mbctohira.c
481#    _mbctohira_l
482#    _mbctokata.c
483#    _mbctokata_l
484#    _mbctolower.c
485#    _mbctolower_l
486#    _mbctombb.c
487#    _mbctombb_l
488#    _mbctoupper.c
489#    _mbctoupper_l
490#    _mbctype
491#    _mblen_l
492#    _mbsbtype.c
493#    _mbsbtype_l
494#    _mbscat.c
495#    _mbscat_s
496#    _mbscat_s_l
497#    _mbschr.c
498#    _mbschr_l
499#    _mbscmp.c
500#    _mbscmp_l
501#    _mbscoll.c
502#    _mbscoll_l
503#    _mbscpy.c
504#    _mbscpy_s
505#    _mbscpy_s_l
506#    _mbscspn.c
507#    _mbscspn_l
508#    _mbsdec.c
509#    _mbsdec_l
510#    _mbsdup.c
511#    _strdup_dbg
512#    _mbsicmp.c
513#    _mbsicmp_l
514#    _mbsicoll.c
515#    _mbsicoll_l
516#    _mbsinc.c
517#    _mbsinc_l
518#    _mbslen.c
519#    _mbslen_l
520#    _mbslwr.c
521#    _mbslwr_l
522#    _mbslwr_s
523#    _mbslwr_s_l
524#    _mbsnbcat.c
525#    _mbsnbcat_l
526#    _mbsnbcat_s
527#    _mbsnbcat_s_l
528#    _mbsnbcmp.c
529#    _mbsnbcmp_l
530#    _mbsnbcnt.c
531#    _mbsnbcnt_l
532#    _mbsnbcoll.c
533#    _mbsnbcoll_l
534#    _mbsnbcpy.c
535#    _mbsnbcpy_l
536#    _mbsnbcpy_s.c
537#    _mbsnbcpy_s_l
538#    _mbsnbicmp.c
539#    _mbsnbicmp_l
540#    _mbsnbicoll.c
541#    _mbsnbicoll_l
542#    _mbsnbset.c
543#    _mbsnbset_l
544#    _mbsnbset_s
545#    _mbsnbset_s_l
546#    _mbsncat.c
547#    _mbsncat_l
548#    _mbsncat_s
549#    _mbsncat_s_l
550#    _mbsnccnt.c
551#    _mbsnccnt_l
552#    _mbsncmp.c
553#    _mbsncmp_l
554#    _mbsncoll.c
555#    _mbsncoll_l
556#    _mbsncpy.c
557#    _mbsncpy_l
558#    _mbsncpy_s
559#    _mbsncpy_s_l
560#    _mbsnextc.c
561#    _mbsnextc_l
562#    _mbsnicmp.c
563#    _mbsnicmp_l
564#    _mbsnicoll.c
565#    _mbsnicoll_l
566#    _mbsninc.c
567#    _mbsninc_l
568#    _mbsnlen
569#    _mbsnlen_l
570#    _mbsnset.c
571#    _mbsnset_l
572#    _mbsnset_s
573#    _mbsnset_s_l
574#    _mbspbrk.c
575#    _mbspbrk_l
576#    _mbsrchr.c
577#    _mbsrchr_l
578#    _mbsrev.c
579#    _mbsrev_l
580#    _mbsset.c
581#    _mbsset_l
582#    _mbsset_s
583#    _mbsset_s_l
584#    _mbsspn.c
585#    _mbsspn_l
586#    _mbsspnp.c
587#    _mbsspnp_l
588#    _mbsstr.c
589#    _mbsstr_l
590#    _mbstok.c
591#    _mbstok_l
592#    _mbstok_s
593#    _mbstok_s_l
594#    _mbstowcs_l
595#    _mbstowcs_s_l
596#    _mbstrlen.c
597#    _mbstrlen_l
598#    _mbstrnlen
599#    _mbstrnlen_l
600#    _mbsupr.c
601#    _mbsupr_l
602#    _mbsupr_s
603#    _mbsupr_s_l
604#    _mbtowc_l
605#    _memccpy.c
606#    _memicmp.c
607#    _memicmp_l
608#    _mkdir.c
609#    _mkgmtime.c
610#    _mkgmtime32.c
611#    _mkgmtime64.c
612#    _mktemp.c
613#    _mktemp_s
614#    _mktime32.c
615#    _mktime64.c
616#    _msize.c
617#    _msize_debug
618#    _nextafter.c
619#    _onexit.c
620#    _open.c
621#    _open_osfhandle.c
622#    _osplatform
623#    _osver
624#    _outp.c
625#    _outpd.c
626#    _outpw.c
627#    _pclose.c
628#    _pctype
629#    _pgmptr
630#    _pipe.c
631#    _popen.c
632#    _printf_l
633#    _printf_p
634#    _printf_p_l
635#    _printf_s_l
636#    _purecall.c
637#    _putch.c
638#    _putenv.c
639#    _putenv_s
640#    _putw.c
641#    _putwch.c
642#    _putws.c
643#    _pwctype
644#    _read.c
645#    _realloc_dbg
646#    _resetstkoflw.c
647#    _rmdir.c
648#    _rmtmp.c
649#    _rotl.c
650#    _rotl64
651#    _rotr.c
652#    _rotr64
653#    _scalb.c
654#    _scanf_l.c
655#    _scanf_s_l.c
656#    _scprintf
657#    _scprintf_l
658#    _scprintf_p_l
659#    _scwprintf
660#    _scwprintf_l
661#    _scwprintf_p_l
662#    _searchenv.c
663#    _searchenv_s.c
664#    _set_SSE2_enable
665#    _set_doserrno.c
666#    _set_errno.c
667#    _set_error_mode.c
668#    _set_fileinfo
669#    _set_fmode
670#    _set_output_format
671#    _set_sbh_threshold.c
672#    _seterrormode.c
673#    _setmaxstdio.c
674#    _setmbcp.c
675#    _setmode.c
676#    _setsystime.c
677#    _sleep.c
678    _snprintf.c
679#    _snprintf_c
680#    _snprintf_c_l
681#    _snprintf_l
682#    _snprintf_s
683#    _snprintf_s_l
684#    _snscanf
685#    _snscanf_l
686#    _snscanf_s
687#    _snscanf_s_l
688    _snwprintf.c
689#    _snwprintf_l
690#    _snwprintf_s
691#    _snwprintf_s_l
692#    _snwscanf
693#    _snwscanf_l
694#    _snwscanf_s
695#    _snwscanf_s_l
696#    _sopen.c
697#    _sopen_s.c
698#    _spawnl.c
699#    _spawnle.c
700#    _spawnlp.c
701#    _spawnlpe.c
702#    _spawnv.c
703#    _spawnve.c
704#    _spawnvp.c
705#    _spawnvpe.c
706#    _splitpath.c
707#    _splitpath_s
708#    _sprintf_l
709#    _sprintf_p_l
710#    _sprintf_s_l
711#    _sscanf_l.c
712#    _sscanf_s_l.c
713#    _stat.c
714#    _stat64.c
715#    _stati64.c
716#    _strcmpi.c
717#    _strcoll_l
718#    _strdate.c
719#    _strdate_s
720#    _strdup.c
721#    _strdup_dbg
722#    _strerror.c
723#    _strerror_s
724#    _stricmp.c
725#    _stricmp_l
726#    _stricoll.c
727#    _stricoll_l
728#    _strlwr.c
729#    _strlwr_l
730#    _strlwr_s
731#    _strlwr_s_l
732#    _strncoll.c
733#    _strncoll_l
734#    _strnicmp.c
735#    _strnicmp_l
736#    _strnicoll.c
737#    _strnicoll_l
738#    _strnset.c
739#    _strnset_s
740#    _strrev.c
741#    _strset.c
742#    _strset_s
743#    _strtime.c
744#    _strtime_s
745#    _strtod_l.c
746#    _strtoi64.c
747#    _strtoi64_l.c
748#    _strtol_l
749#    _strtoui64.c strtoull
750#    _strtoui64_l.c
751#    _strtoul_l
752#    _strupr.c
753#    _strupr_l
754#    _strupr_s
755#    _strupr_s_l
756#    _strxfrm_l
757#    _swab.c
758#    _swprintf.c swprintf
759#    _swprintf_c
760#    _swprintf_c_l
761#    _swprintf_p_l
762#    _swprintf_s_l
763#    _swscanf_l.c
764#    _swscanf_s_l.c
765#    _sys_errlist
766#    _sys_nerr
767#    _tell.c
768#    -ret64 _telli64.c
769#    _tempnam.c
770#    _tempnam_dbg
771#    _time32.c
772#    _time64.c
773#    _timezone
774#    _tolower.c
775#    _tolower_l
776#    _toupper.c
777#    _toupper_l
778#    _towlower_l
779#    _towupper_l
780#    _tzname
781#    _tzset.c
782#    _ui64toa.c
783#    _ui64toa_s.c
784#    _ui64tow.c
785#    _ui64tow_s.c
786#    _ultoa.c
787#    _ultoa_s
788#    _ultow.c
789#    _ultow_s
790#    _umask.c
791#    _umask_s
792#    _ungetch.c
793#    _ungetwch
794#    _unlink.c
795#    _unloaddll.c
796#    _unlock.c
797#    _utime32.c
798#    _utime64.c
799#    _vcprintf
800#    _vcprintf_l
801#    _vcprintf_p
802#    _vcprintf_p_l
803#    _vcprintf_s
804#    _vcprintf_s_l
805#    _vcwprintf.c
806#    _vcwprintf_l
807#    _vcwprintf_p
808#    _vcwprintf_p_l
809#    _vcwprintf_s
810#    _vcwprintf_s_l
811#    _vfprintf_l
812#    _vfprintf_p
813#    _vfprintf_p_l
814#    _vfprintf_s_l
815#    _vfwprintf_l
816#    _vfwprintf_p
817#    _vfwprintf_p_l
818#    _vfwprintf_s_l
819#    _vprintf_l
820#    _vprintf_p
821#    _vprintf_p_l
822#    _vprintf_s_l
823#    _utime.c
824    _vscprintf.c
825#    _vscprintf_l
826#    _vscprintf_p_l
827    _vscwprintf.c
828#    _vscwprintf_l
829#    _vscwprintf_p_l
830    _vsnprintf.c
831#    _vsnprintf_c.c _vsnprintf
832#    _vsnprintf_c_l.c _vsnprintf_l
833#    _vsnprintf_l.c
834#    _vsnprintf_s.c
835#    _vsnprintf_s_l.c
836    _vsnwprintf.c
837#    _vsnwprintf_l.c
838#    _vsnwprintf_s.c
839#    _vsnwprintf_s_l.c
840#    _vsprintf_l
841#    _vsprintf_p.c
842#    _vsprintf_p_l
843#    _vsprintf_s_l
844#    _vswprintf.c
845#    _vswprintf_c.c _vsnwprintf
846#    _vswprintf_c_l.c _vsnwprintf_l
847#    _vswprintf_l.c
848#    _vswprintf_p_l.c _vsnwprintf_l
849#    _vswprintf_s_l.c
850#    _vwprintf_l
851#    _vwprintf_p
852#    _vwprintf_p_l
853#    _vwprintf_s_l
854#    _waccess.c
855#    _waccess_s.c
856#    _wasctime.c
857#    _wasctime_s
858#    _wassert
859#    _wchdir.c
860#    _wchmod.c
861#    _wcmdln
862#    _wcreat.c
863#    _wcscoll_l
864#    _wcsdup.c
865#    _wcsdup_dbg
866#    _wcserror.c
867#    _wcserror_s.c
868#    _wcsftime_l
869#    _wcsicmp.c
870#    _wcsicmp_l
871#    _wcsicoll.c
872#    _wcsicoll_l
873#    _wcslwr.c
874#    _wcslwr_l
875#    _wcslwr_s
876#    _wcslwr_s_l
877#    _wcsncoll.c
878#    _wcsncoll_l
879#    _wcsnicmp.c
880#    _wcsnicmp_l
881#    _wcsnicoll.c
882#    _wcsnicoll_l
883#    _wcsnset.c
884#    _wcsnset_s
885#    _wcsrev.c
886#    _wcsset.c
887#    _wcsset_s
888#    _wcstoi64.c
889#    _wcstoi64_l.c
890#    _wcstol_l
891#    _wcstombs_l
892#    _wcstombs_s_l.c
893#    _wcstoui64.c
894#    _wcstoui64_l.c
895#    _wcstoul_l
896#    _wcsupr.c
897#    _wcsupr_l
898#    _wcsupr_s.c
899#    _wcsupr_s_l
900#    _wcsxfrm_l
901#    _wctime.c
902#    _wctime32.c
903#    _wctime32_s
904#    _wctime64.c
905#    _wctime64_s
906#    _wctomb_l
907#    _wctomb_s_l
908#    _wctype
909#    _wenviron
910#    _wexecl.c
911#    _wexecle.c
912#    _wexeclp.c
913#    _wexeclpe.c
914#    _wexecv.c
915#    _wexecve.c
916#    _wexecvp.c
917#    _wexecvpe.c
918#    _wfdopen.c
919#    _wfindfirst.c
920#    _wfindfirst64
921#    _wfindfirsti64.c
922#    _wfindnext.c
923#    _wfindnext64
924#    _wfindnexti64.c
925#    _wfopen.c
926#    _wfopen_s.c
927#    _wfreopen.c
928#    _wfreopen_s
929#    _wfsopen.c
930#    _wfullpath.c
931#    _wfullpath_dbg
932#    _wgetcwd.c
933#    _wgetdcwd.c
934#    _wgetenv.c
935#    _wgetenv_s
936#    _winmajor
937#    _winminor
938#    _winput_s
939#    _winver
940#    _wmakepath.c
941#    _wmakepath_s.c
942#    _wmkdir.c
943#    _wmktemp.c
944#    _wmktemp_s
945#    _wopen.c
946#    _woutput_s
947#    _wperror.c
948#    _wpgmptr
949#    _wpopen.c
950#    _wprintf_l
951#    _wprintf_p
952#    _wprintf_p_l
953#    _wprintf_s_l
954#    _wputenv.c
955#    _wputenv_s
956#    _wremove.c
957#    _wrename.c
958#    _write.c
959#    _wrmdir.c
960#    _wscanf_l.c
961#    _wscanf_s_l.c
962#    _wsearchenv.c
963#    _wsearchenv_s
964#    _wsetlocale.c
965#    _wsopen.c
966#    _wsopen_s.c
967#    _wspawnl.c
968#    _wspawnle.c
969#    _wspawnlp.c
970#    _wspawnlpe.c
971#    _wspawnv.c
972#    _wspawnve.c
973#    _wspawnvp.c
974#    _wspawnvpe.c
975#    _wsplitpath.c
976#    _wsplitpath_s.c
977#    _wstat.c
978#    _wstati64.c
979#    _wstat64.c
980#    _wstrdate.c
981#    _wstrdate_s
982#    _wstrtime.c
983#    _wstrtime_s
984    _wsystem.c
985#    _wtempnam.c
986#    _wtempnam_dbg
987#    _wtmpnam.c
988#    _wtmpnam_s
989#    _wtof.c
990#    _wtof_l.c
991#    _wtoi.c
992#    _wtoi64.c
993#    _wtoi64_l
994#    _wtoi_l
995#    _wtol.c
996#    _wtol_l
997#    _wunlink.c
998#    _wutime.c
999#    _wutime32.c
1000#    _wutime64.c
1001#    _y0.c
1002#    _y1.c
1003#    _yn.c
1004#    abort.c
1005#    abs.c
1006#    acos.c
1007#    asctime.c
1008#    asctime_s
1009#    asin.c
1010#    atan.c
1011#    atan2.c
1012    atexit.c
1013#    atof.c
1014#    atoi.c
1015#    atol.c
1016#    bsearch.c
1017#    bsearch_s
1018#    btowc.c
1019#    calloc.c
1020    ceil.c
1021#    clearerr.c
1022#    clearerr_s
1023#    clock.c
1024#    cos.c
1025#    cosh.c
1026#    ctime.c
1027#    difftime.c
1028#    div.c
1029#    exit.c
1030#    exp.c
1031    fabs.c
1032#    fclose.c
1033#    feof.c
1034#    ferror.c
1035#    fflush.c
1036#    fgetc.c
1037#    fgetpos.c
1038#    fgets.c
1039#    fgetwc.c
1040#    fgetws.c
1041    floor.c
1042#    fmod.c
1043#    fopen.c
1044#    fopen_s.c
1045#    fprintf.c
1046#    fprintf_s.c
1047#    fputc.c
1048#    fputs.c
1049#    fputwc.c
1050#    fputws.c
1051#    fread.c
1052#    free.c
1053#    freopen.c
1054#    freopen_s
1055#    frexp.c
1056#    fscanf.c
1057#    fscanf_s.c
1058#    fseek.c
1059#    fsetpos.c
1060#    ftell.c
1061#    fwprintf.c
1062#    fwprintf_s.c
1063#    fwrite.c
1064#    fwscanf.c
1065#    fwscanf_s.c
1066#    getc.c
1067#    getchar.c
1068#    getenv.c
1069#    getenv_s
1070#    gets.c
1071#    getwc.c
1072#    getwchar.c
1073#    gmtime.c
1074#    is_wctype.c
1075#    isalnum.c
1076#    isalpha.c
1077#    iscntrl.c
1078#    isdigit.c
1079#    isgraph.c
1080#    isleadbyte.c
1081#    islower.c
1082#    isprint.c
1083#    ispunct.c
1084#    isspace.c
1085#    isupper.c
1086#    iswalnum.c
1087#    iswalpha.c
1088#    iswascii.c
1089#    iswcntrl.c
1090#    iswctype.c
1091#    iswdigit.c
1092#    iswgraph.c
1093#    iswlower.c
1094#    iswprint.c
1095#    iswpunct.c
1096#    iswspace.c
1097#    iswupper.c
1098#    iswxdigit.c
1099#    isxdigit.c
1100#    labs.c
1101#    ldexp.c
1102#    ldiv.c
1103#    localeconv.c
1104#    localtime.c
1105#    log.c
1106#    log10.c
1107#    longjmp.c
1108#    malloc.c
1109#    mblen.c
1110#    mbrlen
1111#    mbrtowc
1112#    mbsdup_dbg
1113#    mbsrtowcs
1114#    mbsrtowcs_s
1115    mbstowcs.c
1116#    mbstowcs_s Not exported in 2k3 Sp1
1117    mbtowc.c
1118#    memchr.c
1119#    memcmp.c
1120#    memcpy.c
1121#    memcpy_s.c memmove_s
1122#    memmove.c
1123#    memmove_s.c
1124#    memset.c
1125#    mktime.c
1126#    modf.c
1127#    perror.c
1128#    pow.c
1129#    printf.c
1130#    printf_s.c
1131#    putc.c
1132#    putchar.c
1133#    puts.c
1134#    putwc.c fputwc
1135#    putwchar.c _fputwchar
1136#    qsort.c
1137#    qsort_s
1138#    raise.c
1139#    rand.c
1140#    rand_s.c
1141#    realloc.c
1142#    remove.c
1143#    rename.c
1144#    rewind.c
1145#    scanf.c
1146#    scanf_s.c
1147#    setbuf.c
1148#    _setjmp.c
1149#    setlocale.c
1150#    setvbuf.c
1151#    signal.c
1152#    sin.c
1153#    sinh.c
1154    sprintf.c
1155#    sprintf_s.c
1156#    sqrt.c
1157#    srand.c
1158#    sscanf.c
1159#    sscanf_s.c
1160#    strcat.c
1161#    strcat_s.c
1162#    strchr.c
1163#    strcmp.c
1164#    strcoll.c
1165    strcpy.c
1166#    strcpy_s.c
1167#    strcspn.c
1168#    strerror.c
1169#    strerror_s.c
1170#    strftime.c
1171    strlen.c
1172#    strncat.c
1173#    strncat_s
1174#    strncmp.c
1175#    strncpy.c
1176#    strncpy_s.c
1177#    strnlen.c
1178#    strpbrk.c
1179#    strrchr.c
1180#    strspn.c
1181#    strstr.c
1182#    strtod.c
1183#    strtok.c
1184#    strtok_s.c
1185#    strtol.c
1186    strtoul.c
1187#    strxfrm.c
1188#    swprintf.c
1189#    swprintf_s.c
1190#    swscanf.c
1191#    swscanf_s.c
1192    system.c
1193#    tan.c
1194#    tanh.c
1195#    time.c
1196#    tmpfile.c
1197#    tmpfile_s
1198#    tmpnam.c
1199#    tmpnam_s
1200#    tolower.c
1201#    toupper.c
1202#    towlower.c
1203#    towupper.c
1204#    ungetc.c
1205#    ungetwc.c
1206#    utime
1207#    vfprintf.c
1208#    vfprintf_s.c
1209#    vfwprintf.c
1210#    vfwprintf_s.c
1211#    vprintf.c
1212#    vprintf_s.c
1213#    vsnprintf
1214#    vsprintf.c
1215#    vsprintf_s.c
1216#    vswprintf.c
1217#    vswprintf_s.c
1218#    vwprintf.c
1219#    vwprintf_s.c
1220#    wcrtomb
1221#    wcrtomb_s
1222#    wcscat.c
1223#    wcscat_s.c
1224#    wcschr.c
1225#    wcscmp.c
1226#    wcscoll.c
1227#    wcscpy.c
1228#    wcscpy_s.c
1229#    wcscspn.c
1230#    wcsftime.c
1231#    wcslen.c
1232#    wcsncat.c
1233#    wcsncat_s.c
1234#    wcsncmp.c
1235#    wcsncpy.c
1236#    wcsncpy_s.c
1237#    wcsnlen
1238#    wcspbrk.c
1239#    wcsrchr.c
1240#    wcsrtombs
1241#    wcsrtombs_s
1242#    wcsspn.c
1243#    wcsstr.c
1244#    wcstod.c
1245#    wcstok.c
1246#    wcstok_s.c
1247#    wcstol.c
1248    wcstombs.c
1249#    wcstombs_s.c Not exported in 2k3 Sp1
1250    wcstoul.c
1251#    wcsxfrm.c
1252#    wctob
1253    wctomb.c
1254#    wctomb_s
1255#    wprintf.c
1256#    wprintf_s.c
1257#    wscanf.c
1258#    wscanf_s.c
1259    crtdata.c
1260    static_construct.cpp
1261    static_init.c
1262)
1263
1264if(ARCH STREQUAL "i386")
1265    list(APPEND SOURCE_MSVCRT
1266        __getmainargs.c ##FIXME: Moved here because it doesn't work on x64
1267    #    _CIacos.c
1268    #    _CIasin.c
1269    #    _CIatan.c
1270    #    _CIatan2.c
1271    #    _CIcos.c
1272    #    _CIcosh.c
1273    #    _CIexp.c
1274    #    _CIfmod.c
1275    #    _CIlog.c
1276    #    _CIlog10.c
1277    #    _CIpow.c
1278    #    _CIsin.c
1279    #    _CIsinh.c
1280    #    _CIsqrt.c
1281    #    _CItan.c
1282    #    _CItanh.c
1283    #    _chkesp.c
1284    #    _EH_prolog.c
1285    #    __CxxFrameHandler.c
1286    #    __CxxFrameHandler2.c
1287    #    __CxxFrameHandler3.c
1288    #    __CxxLongjmpUnwind.c
1289    #    __p___argc.c
1290    #    __p___argv.c
1291    #    __p___initenv.c
1292    #    __p___mb_cur_max.c
1293    #    __p___wargv.c
1294    #    __p___winitenv.c
1295    #    __p__acmdln.c
1296    #    __p__amblksiz.c
1297    #    __p__commode.c
1298    #    __p__daylight.c
1299    #    __p__dstbias.c
1300    #    __p__environ.c
1301    #    __p__fileinfo.c
1302    #    __p__fmode.c
1303    #    __p__iob.c
1304    #    __p__mbcasemap.c
1305    #    __p__mbctype.c
1306    #    __p__osver.c
1307    #    __p__pctype.c
1308    #    __p__pgmptr.c
1309    #    __p__pwctype.c
1310    #    __p__timezone.c
1311    #    __p__tzname.c
1312    #    __p__wcmdln.c
1313    #    __p__wenviron.c
1314    #    __p__winmajor.c
1315    #    __p__winminor.c
1316    #    __p__winver.c
1317    #    __p__wpgmptr.c
1318    #    _adj_fdiv_m16i.c
1319    #    _adj_fdiv_m32.c
1320    #    _adj_fdiv_m32i.c
1321    #    _adj_fdiv_m64.c
1322    #    _adj_fdiv_r.c
1323    #    _adj_fdivr_m16i.c
1324    #    _adj_fdivr_m32.c
1325    #    _adj_fdivr_m32i.c
1326    #    _adj_fdivr_m64.c
1327    #    _adj_fpatan.c
1328    #    _adj_fprem.c
1329    #    _adj_fprem1.c
1330    #    _adj_fptan.c
1331    #    _adjust_fdiv
1332    #    _except_handler2.c
1333    #    _except_handler3.c
1334    #    _except_handler4_common.c
1335    #    _ftol.c
1336    #    _ftol2.c _ftol
1337    #    _ftol2_sse.c
1338    #    _global_unwind2.c
1339    #    _inp.c
1340    #    _inpd.c
1341    #    _inpw.c
1342    #    _local_unwind2.c
1343    #    _local_unwind4.c
1344    #    _safe_fdiv.c
1345    #    _safe_fdivr.c
1346    #    _safe_fprem.c
1347    #    _safe_fprem1.c
1348    #    _seh_longjmp_unwind4.c
1349    #    _seh_longjmp_unwind.c
1350    #    -norelay _setjmp3.c
1351    )
1352elseif(ARCH STREQUAL "amd64")
1353    list(APPEND SOURCE_MSVCRT
1354    #    __C_specific_handler
1355    #    _setjmp.c
1356    #    _setjmpex.c
1357    #    _local_unwind.c
1358    #    longjmp.c
1359    #    __C_specific_handler.c
1360    #    _setjmpex.c
1361    #    ceilf.c
1362    #    cosf.c
1363    #    floorf.c
1364    #    fmodf.c
1365    #    logf.c
1366    #    powf.c
1367    #    sinf.c
1368    #    sqrtf.c
1369    )
1370elseif(ARCH STREQUAL "arm")
1371    list(APPEND SOURCE_MSVCRT
1372        __rt_div.c
1373        __fto64.c
1374        __64tof.c
1375    )
1376endif()
1377
1378# Startup code doesn't go together well with the static CRT... too much __imp_
1379#add_executable(static_crt_apitest testlist.c ${SOURCE_MSVCRT})
1380#target_compile_definitions(static_crt_apitest PRIVATE TEST_STATIC_CRT)
1381#target_link_libraries(static_crt_apitest ${PSEH_LIB} crt wine)
1382#set_module_type(static_crt_apitest win32cui)
1383#add_importlibs(static_crt_apitest kernel32 ntdll)
1384#add_rostests_file(TARGET static_crt_apitest)
1385
1386#spec2def(static_crt_dll_startup.dll dll_startup.spec)
1387#add_library(static_crt_dll_startup MODULE
1388#    dll_startup.cpp
1389#    ${CMAKE_CURRENT_BINARY_DIR}/static_crt_dll_startup.def)
1390#target_link_libraries(static_crt_dll_startup crt)
1391#set_module_type(static_crt_dll_startup win32dll)
1392#add_importlibs(static_crt_dll_startup kernel32 ntdll)
1393#add_rostests_file(TARGET static_crt_dll_startup)
1394
1395add_executable(msvcrt_crt_apitest testlist.c ${SOURCE_MSVCRT})
1396target_compile_definitions(msvcrt_crt_apitest PRIVATE TEST_MSVCRT)
1397target_link_libraries(msvcrt_crt_apitest wine ${PSEH_LIB})
1398set_module_type(msvcrt_crt_apitest win32cui)
1399add_importlibs(msvcrt_crt_apitest msvcrt kernel32 ntdll)
1400add_rostests_file(TARGET msvcrt_crt_apitest)
1401
1402if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
1403    target_compile_options(msvcrt_crt_apitest PRIVATE -Wno-format)
1404endif()
1405
1406spec2def(msvcrt_crt_dll_startup.dll dll_startup.spec)
1407add_library(msvcrt_crt_dll_startup MODULE
1408    dll_startup.cpp
1409    ${CMAKE_CURRENT_BINARY_DIR}/msvcrt_crt_dll_startup.def)
1410set_module_type(msvcrt_crt_dll_startup win32dll)
1411add_importlibs(msvcrt_crt_dll_startup msvcrt kernel32 ntdll)
1412add_rostests_file(TARGET msvcrt_crt_dll_startup)
1413