| 1 | #include "func.def.in" |
| 2 | |
| 3 | #define ADD_UNDERSCORE(symbol) symbol == _ ## symbol |
| 4 | #define ADD_UNDERSCORE_DATA(symbol) symbol DATA == _ ## symbol |
| 5 | #define ADD_UNDERSCORE_DATA_DLL(symbol) symbol DATA == _ ## symbol ## _dll |
| 6 | #define ADD_DOUBLE_UNDERSCORE(symbol) symbol == __ ## symbol |
| 7 | |
| 8 | ; This is list of symbol aliases from the Visual C++ 1.0 oldnames.lib library |
| 9 | ; FIXME: some of these symbol aliases are commented, check and document why |
| 10 | #ifdef UCRTBASE |
| 11 | ; access is provided as an alias for __mingw_access |
| 12 | #else |
| 13 | ADD_UNDERSCORE(access) |
| 14 | #endif |
| 15 | #ifndef CRTAPP |
| 16 | ; ADD_UNDERSCORE(cgets) |
| 17 | ADD_UNDERSCORE(chdir) |
| 18 | #endif |
| 19 | ADD_UNDERSCORE(chmod) |
| 20 | ADD_UNDERSCORE(chsize) |
| 21 | ADD_UNDERSCORE(close) |
| 22 | #ifndef CRTAPP |
| 23 | ; ADD_UNDERSCORE(cprintf) |
| 24 | ; ADD_UNDERSCORE(cputs) |
| 25 | #endif |
| 26 | ADD_UNDERSCORE(creat) |
| 27 | #ifndef CRTAPP |
| 28 | ; ADD_UNDERSCORE(cscanf) |
| 29 | ADD_UNDERSCORE(cwait) |
| 30 | #endif |
| 31 | #if defined(UCRTBASE) |
| 32 | ; daylight variable is provided by misc/ucrt_tzset.c |
| 33 | #elif defined(CRTDLL) |
| 34 | ADD_UNDERSCORE_DATA_DLL(daylight) |
| 35 | #else |
| 36 | ADD_UNDERSCORE_DATA(daylight) |
| 37 | #endif |
| 38 | ADD_UNDERSCORE(dup) |
| 39 | ADD_UNDERSCORE(dup2) |
| 40 | ADD_UNDERSCORE(ecvt) |
| 41 | #if defined(UCRTBASE) |
| 42 | ; _environ variable is not available in ucrtbase.dll and there is no replacement for it |
| 43 | #elif defined(CRTDLL) |
| 44 | ; ADD_UNDERSCORE_DATA_DLL(environ) |
| 45 | #else |
| 46 | ; ADD_UNDERSCORE_DATA(environ) |
| 47 | #endif |
| 48 | ADD_UNDERSCORE(eof) |
| 49 | #ifndef CRTAPP |
| 50 | ADD_UNDERSCORE(execl) |
| 51 | ADD_UNDERSCORE(execle) |
| 52 | ADD_UNDERSCORE(execlp) |
| 53 | ADD_UNDERSCORE(execlpe) |
| 54 | ADD_UNDERSCORE(execv) |
| 55 | ADD_UNDERSCORE(execve) |
| 56 | ADD_UNDERSCORE(execvp) |
| 57 | ADD_UNDERSCORE(execvpe) |
| 58 | #endif |
| 59 | ADD_UNDERSCORE(fcloseall) |
| 60 | ADD_UNDERSCORE(fcvt) |
| 61 | ADD_UNDERSCORE(fdopen) |
| 62 | ADD_UNDERSCORE(fgetchar) |
| 63 | ADD_UNDERSCORE(filelength) |
| 64 | ADD_UNDERSCORE(fileno) |
| 65 | ; ADD_UNDERSCORE(flushall) |
| 66 | ADD_UNDERSCORE(fputchar) |
| 67 | #if defined(UCRTBASE) |
| 68 | F32(fstat == _fstat32) |
| 69 | F64(fstat == _fstat64i32) |
| 70 | #else |
| 71 | ; fstat for non-UCRT is provided by mingw to workaround S_IFDIR issue in _fstat |
| 72 | #endif |
| 73 | ; ftime is provided in misc/ftime32.c or misc/ftime64.c as MS _ftime is not ABI compatible with POSIX ftime |
| 74 | #if defined(UCRTBASE) |
| 75 | ; HUGE alias and _HUGE variable are provided by math/_huge.c |
| 76 | #elif defined(CRTDLL) |
| 77 | ADD_UNDERSCORE_DATA_DLL(HUGE) |
| 78 | #else |
| 79 | ADD_UNDERSCORE_DATA(HUGE) |
| 80 | #endif |
| 81 | ADD_UNDERSCORE(gcvt) |
| 82 | #ifndef CRTAPP |
| 83 | ADD_UNDERSCORE(getch) |
| 84 | ADD_UNDERSCORE(getche) |
| 85 | ADD_UNDERSCORE(getcwd) |
| 86 | #endif |
| 87 | #ifdef UCRTBASE |
| 88 | ; ucrtbase.dll has got _getpid for all archs |
| 89 | ADD_UNDERSCORE(getpid) |
| 90 | #elif !defined(CRTAPP) |
| 91 | ; msvcrt.dll for arm/arm64 lacks _getpid |
| 92 | F_X86_ANY(ADD_UNDERSCORE(getpid)) |
| 93 | #endif |
| 94 | #ifndef CRTAPP |
| 95 | ADD_UNDERSCORE(getw) |
| 96 | #endif |
| 97 | ADD_UNDERSCORE(isatty) |
| 98 | ADD_UNDERSCORE(itoa) |
| 99 | #ifndef CRTAPP |
| 100 | ADD_UNDERSCORE(kbhit) |
| 101 | #endif |
| 102 | ADD_UNDERSCORE(lfind) |
| 103 | ; ADD_UNDERSCORE(locking) |
| 104 | ADD_UNDERSCORE(lsearch) |
| 105 | ADD_UNDERSCORE(lseek) |
| 106 | ADD_UNDERSCORE(ltoa) |
| 107 | ADD_UNDERSCORE(memccpy) |
| 108 | ADD_UNDERSCORE(memicmp) |
| 109 | ADD_UNDERSCORE(mkdir) |
| 110 | ADD_UNDERSCORE(mktemp) |
| 111 | ; onexit function alias is provided by misc/_onexit.c |
| 112 | ADD_UNDERSCORE(open) |
| 113 | #ifndef CRTAPP |
| 114 | ADD_UNDERSCORE(putch) |
| 115 | ADD_UNDERSCORE(putenv) |
| 116 | #endif |
| 117 | ADD_UNDERSCORE(putw) |
| 118 | ADD_UNDERSCORE(read) |
| 119 | ADD_UNDERSCORE(rmdir) |
| 120 | ADD_UNDERSCORE(rmtmp) |
| 121 | ADD_UNDERSCORE(setmode) |
| 122 | ADD_UNDERSCORE(sopen) |
| 123 | #ifndef CRTAPP |
| 124 | ADD_UNDERSCORE(spawnl) |
| 125 | ADD_UNDERSCORE(spawnle) |
| 126 | ADD_UNDERSCORE(spawnlp) |
| 127 | ADD_UNDERSCORE(spawnlpe) |
| 128 | ADD_UNDERSCORE(spawnv) |
| 129 | ADD_UNDERSCORE(spawnve) |
| 130 | ADD_UNDERSCORE(spawnvp) |
| 131 | ADD_UNDERSCORE(spawnvpe) |
| 132 | #endif |
| 133 | #ifdef UCRTBASE |
| 134 | F32(stat == _stat32) |
| 135 | F64(stat == _stat64i32) |
| 136 | #else |
| 137 | ; stat for non-UCRT is provided by mingw to workaround trailing slash issue in _stat |
| 138 | #endif |
| 139 | #ifdef NO_STRCMPI_ALIAS |
| 140 | ; Symbol _strcmpi is natively present and defined in the library def file |
| 141 | ; So define strcmpi as an alias to _strcmpi |
| 142 | ADD_UNDERSCORE(strcmpi) |
| 143 | #else |
| 144 | ; Symbol _strcmpi is not present in the library, it provides only _stricmp symbol |
| 145 | ; So define strcmpi as an alias to _stricmp |
| 146 | strcmpi == _stricmp |
| 147 | #endif |
| 148 | ADD_UNDERSCORE(strdup) |
| 149 | ADD_UNDERSCORE(stricmp) |
| 150 | ADD_UNDERSCORE(strlwr) |
| 151 | ADD_UNDERSCORE(strnicmp) |
| 152 | ADD_UNDERSCORE(strnset) |
| 153 | ADD_UNDERSCORE(strrev) |
| 154 | ADD_UNDERSCORE(strset) |
| 155 | ADD_UNDERSCORE(strupr) |
| 156 | ADD_UNDERSCORE(swab) |
| 157 | #if defined(UCRTBASE) |
| 158 | ; _sys_errlist variable is not available in ucrtbase.dll and there is no replacement for it |
| 159 | #else |
| 160 | // sys_errlist variable is without _dll suffix in crtdll.dll |
| 161 | ; ADD_UNDERSCORE_DATA(sys_errlist) |
| 162 | #endif |
| 163 | #if defined(UCRTBASE) |
| 164 | ; _sys_nerr variable is not available in ucrtbase.dll and there is no replacement for it |
| 165 | #elif defined(CRTDLL) |
| 166 | ; ADD_UNDERSCORE_DATA_DLL(sys_nerr) |
| 167 | #else |
| 168 | ; ADD_UNDERSCORE_DATA(sys_nerr) |
| 169 | #endif |
| 170 | ADD_UNDERSCORE(tell) |
| 171 | ADD_UNDERSCORE(tempnam) |
| 172 | #if defined(UCRTBASE) |
| 173 | ; timezone variable is provided by misc/ucrt_tzset.c |
| 174 | #elif defined(CRTDLL) |
| 175 | ADD_UNDERSCORE_DATA_DLL(timezone) |
| 176 | #else |
| 177 | ADD_UNDERSCORE_DATA(timezone) |
| 178 | #endif |
| 179 | #if defined(UCRTBASE) |
| 180 | ; tzname variable is provided by misc/ucrt_tzset.c |
| 181 | #else |
| 182 | // tzname variable is without _dll suffix in crtdll.dll |
| 183 | ADD_UNDERSCORE_DATA(tzname) |
| 184 | #endif |
| 185 | #if defined(UCRTBASE) |
| 186 | ; tzset function is provided by misc/ucrt_tzset.c |
| 187 | #else |
| 188 | ADD_UNDERSCORE(tzset) |
| 189 | #endif |
| 190 | ; ADD_UNDERSCORE(ultoa) |
| 191 | ADD_UNDERSCORE(umask) |
| 192 | #ifndef CRTAPP |
| 193 | ADD_UNDERSCORE(ungetch) |
| 194 | #endif |
| 195 | ADD_UNDERSCORE(unlink) |
| 196 | #ifdef FIXED_SIZE_SYMBOLS |
| 197 | ADD_UNDERSCORE(utime) |
| 198 | #else |
| 199 | F32(utime == _utime32) |
| 200 | F64(utime == _utime64) |
| 201 | #endif |
| 202 | ADD_UNDERSCORE(write) |
| 203 | |
| 204 | ; This is list of symbol aliases added in the Visual C++ 2.0 oldnames.lib library |
| 205 | ; All these symbols with leading underscore are present also in pre-2.0 CRT versions: crtdll.dll and msvcrt10.dll |
| 206 | ; ADD_UNDERSCORE(control87) |
| 207 | #if __SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__ |
| 208 | ADD_UNDERSCORE(fpreset) |
| 209 | #else |
| 210 | ; ADD_UNDERSCORE(fpreset) ; Alias fpreset is set in CRT_fp10.c and CRT_fp8.c |
| 211 | #endif |
| 212 | ADD_UNDERSCORE(wcsdup) |
| 213 | ADD_UNDERSCORE(wcsicmp) |
| 214 | ADD_UNDERSCORE(wcsicoll) |
| 215 | ADD_UNDERSCORE(wcslwr) |
| 216 | ADD_UNDERSCORE(wcsnicmp) |
| 217 | ADD_UNDERSCORE(wcsnset) |
| 218 | ADD_UNDERSCORE(wcsrev) |
| 219 | ADD_UNDERSCORE(wcsset) |
| 220 | ADD_UNDERSCORE(wcsupr) |
| 221 | |
| 222 | ; This is list of symbol aliases added in the Visual C++ 4.0 oldnames.lib library |
| 223 | ; All these symbols with leading underscore are present also in pre-4.0 CRT versions: crtdll.dll, msvcrt10.dll and msvcrt20.dll |
| 224 | ; ADD_UNDERSCORE(cabs) |
| 225 | #ifdef UCRTBASE |
| 226 | ; hypot is natively exported from UCRT |
| 227 | #else |
| 228 | ; hypot is provided by math/hypot.c as a wrapper around _hypot |
| 229 | #endif |
| 230 | ADD_UNDERSCORE(j0) |
| 231 | ADD_UNDERSCORE(j1) |
| 232 | ADD_UNDERSCORE(jn) |
| 233 | ADD_UNDERSCORE(y0) |
| 234 | ADD_UNDERSCORE(y1) |
| 235 | ADD_UNDERSCORE(yn) |
| 236 | |
| 237 | ; This is list of symbol aliases for C95 functions |
| 238 | #ifdef WITH_GET_PUT_WCHAR_ALIASES |
| 239 | getwc == fgetwc |
| 240 | getwchar == _fgetwchar |
| 241 | putwc == fputwc |
| 242 | putwchar == _fputwchar |
| 243 | #endif |
| 244 | |
| 245 | ; This is list of symbol aliases for C99 functions |
| 246 | ; ADD_UNDERSCORE(logb) |
| 247 | #ifdef WITH_NEXTAFTER_ALIAS |
| 248 | ADD_UNDERSCORE(nextafter) |
| 249 | #endif |
| 250 | |
| 251 | ; This is list of symbol aliases for C99 ARM long double functions |
| 252 | ; They are defined as aliases to regular double symbols as on ARM, long double is equal to regular double |
| 253 | F_LD64(acosl == acos) |
| 254 | F_LD64(asinl == asin) |
| 255 | F_LD64(atan2l == atan2) |
| 256 | F_LD64(atanl == atan) |
| 257 | F_LD64(ceill == ceil) |
| 258 | F_LD64(cosl == cos) |
| 259 | F_LD64(expl == exp) |
| 260 | F_LD64(floorl == floor) |
| 261 | F_LD64(fmodl == fmod) |
| 262 | F_LD64(log10l == log10) |
| 263 | F_LD64(logl == log) |
| 264 | ; FIXME: Why is powl alias defined only for UCRT? |
| 265 | #ifdef UCRTBASE |
| 266 | F_LD64(powl == pow) |
| 267 | #endif |
| 268 | F_LD64(sinl == sin) |
| 269 | F_LD64(tanl == tan) |
| 270 | F_LD64(_chgsignl == _chgsign) |
| 271 | |
| 272 | ; This is list of symbol aliases for C11 functions |
| 273 | #ifdef UCRTBASE |
| 274 | F32(timespec_get == _timespec32_get) |
| 275 | F64(timespec_get == _timespec64_get) |
| 276 | #endif |
| 277 | |
| 278 | ; This is list of symbol aliases for POSIX functions |
| 279 | ADD_DOUBLE_UNDERSCORE(isascii) |
| 280 | ADD_DOUBLE_UNDERSCORE(toascii) |
| 281 | #ifndef CRTAPP |
| 282 | ADD_UNDERSCORE(pclose) |
| 283 | ADD_UNDERSCORE(popen) |
| 284 | #endif |
| 285 | fseeko == fseek |
| 286 | ftello == ftell |
| 287 | ftruncate == _chsize |
| 288 | ; ADD_UNDERSCORE(scalb) |
| 289 | |
| 290 | ; This is list of symbol aliases for Large File Specification (extension to Single UNIX Specification) |
| 291 | ; https://unix.org/version2/whatsnew/lfs20mar.html#3.1 section 3.1 Transitional Extensions |
| 292 | creat64 == _creat |
| 293 | open64 == _open |
| 294 | fopen64 == fopen |
| 295 | freopen64 == freopen |
| 296 | #ifndef NO_TMPFILE_ALIAS |
| 297 | tmpfile64 == tmpfile |
| 298 | #endif |
| 299 | #ifndef NO_FPOS64_ALIASES |
| 300 | ; fgetpos and fsetpos are already 64-bit |
| 301 | fgetpos64 == fgetpos |
| 302 | fsetpos64 == fsetpos |
| 303 | lseek64 == _lseeki64 |
| 304 | #endif |
| 305 | #ifdef UCRTBASE |
| 306 | fstat32 == _fstat32 |
| 307 | fstat32i64 == _fstat32i64 |
| 308 | fstat64 == _fstat64 |
| 309 | fstat64i32 == _fstat64i32 |
| 310 | stat32 == _stat32 |
| 311 | stat32i64 == _stat32i64 |
| 312 | stat64 == _stat64 |
| 313 | stat64i32 == _stat64i32 |
| 314 | #else |
| 315 | ; fstat for non-UCRT is provided by mingw to workaround S_IFDIR issue in _fstat |
| 316 | ; stat for non-UCRT is provided by mingw to workaround trailing slash issue in _stat |
| 317 | #endif |
| 318 | #ifdef FIXED_SIZE_SYMBOLS |
| 319 | #ifdef WITH_FSEEKO64_ALIAS |
| 320 | fseeko64 == _fseeki64 |
| 321 | #endif |
| 322 | #else |
| 323 | fseeko64 == _fseeki64 |
| 324 | ftello64 == _ftelli64 |
| 325 | #endif |
| 326 | |
| 327 | ; This is list of symbol aliases for GNU functions which are not part of POSIX or ISO C |
| 328 | strcasecmp == _stricmp |
| 329 | strncasecmp == _strnicmp |
| 330 | |
| 331 | ; This is list of various symbol aliases which are needed for compatibility |
| 332 | ; Some symbols in some version of CRT library were added and some other symbols were removed or renamed |
| 333 | ; This list provides some level of backward and forward compatibility |
| 334 | |
| 335 | #ifdef WITH_SETJMP3_ALIAS |
| 336 | ; crtdll.dll and msvcrt10.dll have only old _setjmp function which does not take |
| 337 | ; additional variadic arguments and uses smaller jmpbuf structure. |
| 338 | ; mingw-w64 calls _setjmp3 only with zero additional arguments and because number |
| 339 | ; of additional arguments is passed on the stack which is cleanup by the caller, |
| 340 | ; it means that the mingw-w64 usage of _setjmp3 is ABI compatible with the old |
| 341 | ; _setjmp function which is available also in crtdll.dll and msvcrt10.dll libs. |
| 342 | ; It heavily depends on the mingw-w64-headers/crt/setjmp.h implementation. |
| 343 | ; So this definition allows crtdll.dll and msvcrt10.dll applications to call |
| 344 | ; setjmp() macro from setjmp.h, which expands to _setjmp3() function call and |
| 345 | ; which is aliased to _setjmp symbol for crtdll.dll and msvcrt10.dll libraries. |
| 346 | F_I386(_setjmp3 == _setjmp) |
| 347 | #endif |
| 348 | |
| 349 | #ifdef UCRTBASE |
| 350 | F_NON_ARM64(_setjmp == __intrinsic_setjmp) |
| 351 | F64(_setjmpex == __intrinsic_setjmpex) |
| 352 | #endif |
| 353 | |
| 354 | #ifndef NO_STRCMPI_ALIAS |
| 355 | _strcmpi == _stricmp |
| 356 | #endif |
| 357 | |
| 358 | #ifdef WITH_IOB_FUNC_ALIAS |
| 359 | __iob_func == __p__iob |
| 360 | #endif |
| 361 | |
| 362 | #ifdef WITH_TZ_ALIASES |
| 363 | __daylight == __p__daylight |
| 364 | #ifndef NO_DSTBIAS |
| 365 | __dstbias == __p__dstbias |
| 366 | #endif |
| 367 | __timezone == __p__timezone |
| 368 | __tzname == __p__tzname |
| 369 | #endif |
| 370 | |
| 371 | #ifdef WITH_ATOLL_ALIAS |
| 372 | atoll == _atoi64 |
| 373 | _wtoll == _wtoi64 |
| 374 | #endif |
| 375 | |
| 376 | #ifdef WITH_ATOLL_L_ALIAS |
| 377 | _atoll_l == _atoi64_l |
| 378 | _wtoll_l == _wtoi64_l |
| 379 | #endif |
| 380 | |
| 381 | #ifdef WITH_LLABS_ALIAS |
| 382 | llabs == _abs64 |
| 383 | imaxabs == _abs64 |
| 384 | #elif defined(WITH_IMAXABS_ALIAS) |
| 385 | imaxabs == llabs |
| 386 | #endif |
| 387 | |
| 388 | #ifdef WITH_IMAXDIV_ALIAS |
| 389 | imaxdiv == lldiv |
| 390 | #endif |
| 391 | |
| 392 | #ifdef WITH_STRTO64_ALIAS |
| 393 | strtoll == _strtoi64 |
| 394 | strtoull == _strtoui64 |
| 395 | strtoimax == _strtoi64 |
| 396 | strtoumax == _strtoui64 |
| 397 | wcstoll == _wcstoi64 |
| 398 | wcstoull == _wcstoui64 |
| 399 | wcstoimax == _wcstoi64 |
| 400 | wcstoumax == _wcstoui64 |
| 401 | #endif |
| 402 | |
| 403 | #ifdef WITH_STRTO64_L_ALIAS |
| 404 | _strtoll_l == _strtoi64_l |
| 405 | _strtoull_l == _strtoui64_l |
| 406 | _strtoimax_l == _strtoi64_l |
| 407 | _strtoumax_l == _strtoui64_l |
| 408 | _wcstoll_l == _wcstoi64_l |
| 409 | _wcstoull_l == _wcstoui64_l |
| 410 | _wcstoimax_l == _wcstoi64_l |
| 411 | _wcstoumax_l == _wcstoui64_l |
| 412 | #endif |
| 413 | |
| 414 | ; This is list of find symbol aliases, every CRT library has either find symbols with SIZE suffix or without them |
| 415 | #ifdef FIXED_SIZE_SYMBOLS |
| 416 | F32(_findfirst32 == _findfirst) |
| 417 | F64(_findfirst64i32 == _findfirst) |
| 418 | #ifndef NO_I64_FIXED_SIZE |
| 419 | F32(_findfirst32i64 == _findfirsti64) |
| 420 | #ifndef NO_FIXED_SIZE_64_ALIAS |
| 421 | F64(_findfirst64 == _findfirsti64) |
| 422 | #endif |
| 423 | #endif |
| 424 | F32(_findnext32 == _findnext) |
| 425 | F64(_findnext64i32 == _findnext) |
| 426 | #ifndef NO_I64_FIXED_SIZE |
| 427 | F32(_findnext32i64 == _findnexti64) |
| 428 | #ifndef NO_FIXED_SIZE_64_ALIAS |
| 429 | F64(_findnext64 == _findnexti64) |
| 430 | #endif |
| 431 | #endif |
| 432 | #ifndef NO_WIDE_FIXED_SIZE |
| 433 | F32(_wfindfirst32 == _wfindfirst) |
| 434 | F64(_wfindfirst64i32 == _wfindfirst) |
| 435 | #ifndef NO_I64_FIXED_SIZE |
| 436 | F32(_wfindfirst32i64 == _wfindfirsti64) |
| 437 | #ifndef NO_FIXED_SIZE_64_ALIAS |
| 438 | F64(_wfindfirst64 == _wfindfirsti64) |
| 439 | #endif |
| 440 | #endif |
| 441 | F32(_wfindnext32 == _wfindnext) |
| 442 | F64(_wfindnext64i32 == _wfindnext) |
| 443 | #ifndef NO_I64_FIXED_SIZE |
| 444 | F32(_wfindnext32i64 == _wfindnexti64) |
| 445 | #ifndef NO_FIXED_SIZE_64_ALIAS |
| 446 | F64(_wfindnext64 == _wfindnexti64) |
| 447 | #endif |
| 448 | #endif |
| 449 | #endif |
| 450 | #else |
| 451 | F32(_findfirst == _findfirst32) |
| 452 | F64(_findfirst == _findfirst64i32) |
| 453 | F32(_findfirsti64 == _findfirst32i64) |
| 454 | F64(_findfirsti64 == _findfirst64) |
| 455 | F32(_findnext == _findnext32) |
| 456 | F64(_findnext == _findnext64i32) |
| 457 | F32(_findnexti64 == _findnext32i64) |
| 458 | F64(_findnexti64 == _findnext64) |
| 459 | F32(_wfindfirst == _wfindfirst32) |
| 460 | F64(_wfindfirst == _wfindfirst64i32) |
| 461 | F32(_wfindfirsti64 == _wfindfirst32i64) |
| 462 | F64(_wfindfirsti64 == _wfindfirst64) |
| 463 | F32(_wfindnext == _wfindnext32) |
| 464 | F64(_wfindnext == _wfindnext64i32) |
| 465 | F32(_wfindnexti64 == _wfindnext32i64) |
| 466 | F64(_wfindnexti64 == _wfindnext64) |
| 467 | #endif |
| 468 | |
| 469 | ; This is list of stat symbol aliases, every CRT library has either stat symbols with SIZE suffix or without them |
| 470 | #ifdef FIXED_SIZE_SYMBOLS |
| 471 | #ifndef CRTDLL |
| 472 | F32(_fstat32 == _fstat) |
| 473 | #endif |
| 474 | F64(_fstat64i32 == _fstat) |
| 475 | #ifndef NO_I64_FIXED_SIZE |
| 476 | F32(_fstat32i64 == _fstati64) |
| 477 | #ifndef NO_FIXED_SIZE_64_ALIAS |
| 478 | F64(_fstat64 == _fstati64) |
| 479 | #endif |
| 480 | #endif |
| 481 | #ifndef CRTDLL |
| 482 | F32(_stat32 == _stat) |
| 483 | #endif |
| 484 | F64(_stat64i32 == _stat) |
| 485 | #ifndef NO_I64_FIXED_SIZE |
| 486 | F32(_stat32i64 == _stati64) |
| 487 | #ifndef NO_FIXED_SIZE_64_ALIAS |
| 488 | F64(_stat64 == _stati64) |
| 489 | #endif |
| 490 | #endif |
| 491 | #ifndef NO_WIDE_FIXED_SIZE |
| 492 | F32(_wstat32 == _wstat) |
| 493 | F64(_wstat64i32 == _wstat) |
| 494 | #ifndef NO_I64_FIXED_SIZE |
| 495 | F32(_wstat32i64 == _wstati64) |
| 496 | #ifndef NO_FIXED_SIZE_64_ALIAS |
| 497 | F64(_wstat64 == _wstati64) |
| 498 | #endif |
| 499 | #endif |
| 500 | #endif |
| 501 | #else |
| 502 | F32(_fstat == _fstat32) |
| 503 | F64(_fstat == _fstat64i32) |
| 504 | F32(_fstati64 == _fstat32i64) |
| 505 | F64(_fstati64 == _fstat64) |
| 506 | F32(_stat == _stat32) |
| 507 | F64(_stat == _stat64i32) |
| 508 | F32(_stati64 == _stat32i64) |
| 509 | F64(_stati64 == _stat64) |
| 510 | F32(_wstat == _wstat32) |
| 511 | F64(_wstat == _wstat64i32) |
| 512 | F32(_wstati64 == _wstat32i64) |
| 513 | F64(_wstati64 == _wstat64) |
| 514 | #endif |
| 515 | |
| 516 | ; This is list of time symbol aliases, every CRT library except msvcrt.dll has either time symbols with SIZE suffix or without them |
| 517 | #ifndef NO_TIME_ALIAS |
| 518 | #ifdef FIXED_SIZE_SYMBOLS |
| 519 | F32(_ctime32 == ctime) |
| 520 | F64(_ctime64 == ctime) |
| 521 | F32(_difftime32 == difftime) |
| 522 | F64(_difftime64 == difftime) |
| 523 | F32(_ftime32 == _ftime) |
| 524 | F64(_ftime64 == _ftime) |
| 525 | F32(_futime32 == _futime) |
| 526 | F64(_futime64 == _futime) |
| 527 | F32(_gmtime32 == gmtime) |
| 528 | F64(_gmtime64 == gmtime) |
| 529 | F32(_localtime32 == localtime) |
| 530 | F64(_localtime64 == localtime) |
| 531 | ; Skip _mkgmtime as it is present only in msvcrt.dll |
| 532 | F32(_mktime32 == mktime) |
| 533 | F64(_mktime64 == mktime) |
| 534 | F32(_time32 == time) |
| 535 | F64(_time64 == time) |
| 536 | F32(_utime32 == _utime) |
| 537 | F64(_utime64 == _utime) |
| 538 | #ifndef NO_WIDE_FIXED_SIZE |
| 539 | F32(_wctime32 == _wctime) |
| 540 | F64(_wctime64 == _wctime) |
| 541 | F32(_wutime32 == _wutime) |
| 542 | F64(_wutime64 == _wutime) |
| 543 | #endif |
| 544 | #else |
| 545 | F32(ctime == _ctime32) |
| 546 | F64(ctime == _ctime64) |
| 547 | F32(difftime == _difftime32) |
| 548 | F64(difftime == _difftime64) |
| 549 | F32(_ftime == _ftime32) |
| 550 | F64(_ftime == _ftime64) |
| 551 | F32(_futime == _futime32) |
| 552 | F64(_futime == _futime64) |
| 553 | F32(gmtime == _gmtime32) |
| 554 | F64(gmtime == _gmtime64) |
| 555 | F32(localtime == _localtime32) |
| 556 | F64(localtime == _localtime64) |
| 557 | F32(_mkgmtime == _mkgmtime32) |
| 558 | F64(_mkgmtime == _mkgmtime64) |
| 559 | F32(mktime == _mktime32) |
| 560 | F64(mktime == _mktime64) |
| 561 | F32(time == _time32) |
| 562 | F64(time == _time64) |
| 563 | F32(_utime == _utime32) |
| 564 | F64(_utime == _utime64) |
| 565 | F32(_wctime == _wctime32) |
| 566 | F64(_wctime == _wctime64) |
| 567 | F32(_wutime == _wutime32) |
| 568 | F64(_wutime == _wutime64) |
| 569 | #endif |
| 570 | #endif |
| 571 | |
| 572 | ; This is list of symbols which are present in msvcrt but not in UCRT |
| 573 | #ifdef UCRTBASE |
| 574 | __lconv_init == __initialize_lconv_for_unsigned_char |
| 575 | __set_app_type == _set_app_type |
| 576 | __p__daylight == __daylight |
| 577 | __p__dstbias == __dstbias |
| 578 | __p__timezone == __timezone |
| 579 | __p__tzname == __tzname |
| 580 | _XcptFilter == _seh_filter_exe |
| 581 | #endif |
| 582 | |
| 583 | ; This is list of printf/scanf symbol aliases with __ms_ prefix |
| 584 | #ifndef UCRTBASE |
| 585 | __ms_fprintf == fprintf |
| 586 | __ms_fscanf == fscanf |
| 587 | __ms_fwprintf == fwprintf |
| 588 | __ms_fwscanf == fwscanf |
| 589 | __ms_printf == printf |
| 590 | __ms_scanf == scanf |
| 591 | __ms_sprintf == sprintf |
| 592 | __ms_sscanf == sscanf |
| 593 | __ms_swscanf == swscanf |
| 594 | __ms_vfprintf == vfprintf |
| 595 | __ms_vfwprintf == vfwprintf |
| 596 | __ms_vprintf == vprintf |
| 597 | __ms_vsprintf == vsprintf |
| 598 | __ms_vwprintf == vwprintf |
| 599 | __ms_wprintf == wprintf |
| 600 | __ms_wscanf == wscanf |
| 601 | #endif |
| 602 | |
| 603 | ; This is list of additional symbol aliases not available in any library as neither native symbols nor aliases |
| 604 | ; FIXME: check if these really are needed |
| 605 | |
| 606 | ; This is wstat and wstat64 symbol available only in mingw but for a long time |
| 607 | #ifdef UCRTBASE |
| 608 | F32(wstat == _wstat32) |
| 609 | F64(wstat == _wstat64i32) |
| 610 | wstat32 == _wstat32 |
| 611 | wstat32i64 == _wstat32i64 |
| 612 | wstat64 == _wstat64 |
| 613 | wstat64i32 == _wstat64i32 |
| 614 | #else |
| 615 | ; wstat for non-UCRT is provided by mingw to workaround trailing slash issue in _wstat |
| 616 | #endif |
| 617 | |
| 618 | ; Origin of the symbol wcscmpi is unknown. This symbol is not present in |
| 619 | ; crtdll.dll and neither in any msvcr* version. The only source of wcscmpi is |
| 620 | ; wcstr.h header file from the Microsoft Visual C++ 1.0 (32-bit for NT) and |
| 621 | ; Microsoft Windows NT 3.1 SDK where wcscmpi and _wcscmpi are defined as |
| 622 | ; macros which expand to _wcsicmp. So the raw wcscmpi is not linkable symbol |
| 623 | ; even in the old Visual C++ versions. |
| 624 | wcscmpi == _wcsicmp |
| 625 | |
| 626 | ; Origin of these symbols is unknown too. |
| 627 | ADD_UNDERSCORE(chgsign) |
| 628 | ADD_UNDERSCORE(fgetwchar) |
| 629 | ADD_UNDERSCORE(finite) |
| 630 | ADD_UNDERSCORE(fpclass) |
| 631 | ADD_UNDERSCORE(fputwchar) |
| 632 | #ifndef CRTAPP |
| 633 | ADD_UNDERSCORE(heapwalk) |
| 634 | #endif |
| 635 | ADD_DOUBLE_UNDERSCORE(iscsymf) |
| 636 | ADD_DOUBLE_UNDERSCORE(iscsym) |
| 637 | #ifndef CRTAPP |
| 638 | ADD_UNDERSCORE(searchenv) |
| 639 | #endif |
| 640 | ADD_UNDERSCORE(stricoll) |
| 641 | #ifndef UCRTBASE |
| 642 | ADD_UNDERSCORE(vsnprintf_s) |
| 643 | #endif |
| 644 | #ifndef CRTAPP |
| 645 | ADD_UNDERSCORE(wpopen) |
| 646 | #endif |