@@ -137,8 +137,11 @@ ADD_UNDERSCORE(spawnve)
137
137
ADD_UNDERSCORE(spawnvp)
138
138
ADD_UNDERSCORE(spawnvpe)
139
139
#endif
140
- #ifndef CRTDLL
141
- ; stat is provided by mingw to workaround trailing slash issue in _stat
140
+ #ifdef UCRTBASE
141
+ F32(stat == _stat32)
142
+ F64(stat == _stat64i32)
143
+ #else
144
+ ; stat for non-UCRT is provided by mingw to workaround trailing slash issue in _stat
142
145
#endif
143
146
#ifdef NO_STRCMPI_ALIAS
144
147
; Symbol _strcmpi is natively present and defined in the library def file
@@ -208,7 +211,11 @@ ADD_UNDERSCORE(write)
208
211
; This is list of symbol aliases added in the Visual C++ 2.0 oldnames.lib library
209
212
; All these symbols with leading underscore are present also in pre-2.0 CRT versions: crtdll.dll and msvcrt10.dll
210
213
; ADD_UNDERSCORE(control87)
214
+ #if __SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__
215
+ ADD_UNDERSCORE(fpreset)
216
+ #else
211
217
; ADD_UNDERSCORE(fpreset) ; Alias fpreset is set in CRT_fp10.c and CRT_fp8.c
218
+ #endif
212
219
ADD_UNDERSCORE(wcsdup)
213
220
ADD_UNDERSCORE(wcsicmp)
214
221
ADD_UNDERSCORE(wcsicoll)
@@ -222,7 +229,11 @@ ADD_UNDERSCORE(wcsupr)
222
229
; This is list of symbol aliases added in the Visual C++ 4.0 oldnames.lib library
223
230
; All these symbols with leading underscore are present also in pre-4.0 CRT versions: crtdll.dll, msvcrt10.dll and msvcrt20.dll
224
231
; ADD_UNDERSCORE(cabs)
232
+ #ifdef UCRTBASE
233
+ ; hypot is natively exported from UCRT
234
+ #else
225
235
ADD_UNDERSCORE(hypot)
236
+ #endif
226
237
ADD_UNDERSCORE(j0)
227
238
ADD_UNDERSCORE(j1)
228
239
ADD_UNDERSCORE(jn)
@@ -247,27 +258,26 @@ wcstok == wcstok_s
247
258
ADD_UNDERSCORE(nextafter)
248
259
#endif
249
260
250
- #if defined(DEF_ARM32) || defined(DEF_ARM64)
251
261
; This is list of symbol aliases for C99 ARM long double functions
252
262
; They are defined as aliases to regular double symbols as on ARM, long double is equal to regular double
253
- acosl == acos
254
- asinl == asin
255
- atan2l == atan2
256
- atanl == atan
257
- ceill == ceil
258
- cosl == cos
259
- expl == exp
260
- floorl == floor
261
- fmodl == fmod
262
- log10l == log10
263
- logl == log
263
+ F_LD64( acosl == acos)
264
+ F_LD64( asinl == asin)
265
+ F_LD64( atan2l == atan2)
266
+ F_LD64( atanl == atan)
267
+ F_LD64( ceill == ceil)
268
+ F_LD64( cosl == cos)
269
+ F_LD64( expl == exp)
270
+ F_LD64( floorl == floor)
271
+ F_LD64( fmodl == fmod)
272
+ F_LD64( log10l == log10)
273
+ F_LD64( logl == log)
264
274
; FIXME: Why is powl alias defined only for UCRT?
265
275
#ifdef UCRTBASE
266
- powl == pow
267
- #endif
268
- sinl == sin
269
- tanl == tan
276
+ F_LD64(powl == pow)
270
277
#endif
278
+ F_LD64(sinl == sin)
279
+ F_LD64(tanl == tan)
280
+ F_LD64(_chgsignl == _chgsign)
271
281
272
282
; This is list of symbol aliases for C11 functions
273
283
#ifdef UCRTBASE
@@ -290,6 +300,22 @@ ADD_UNDERSCORE(popen)
290
300
fgetpos64 == fgetpos
291
301
fsetpos64 == fsetpos
292
302
#endif
303
+ #ifdef UCRTBASE
304
+ stat32 == _stat32
305
+ stat32i64 == _stat32i64
306
+ stat64 == _stat64
307
+ stat64i32 == _stat64i32
308
+ #else
309
+ ; stat for non-UCRT is provided by mingw to workaround trailing slash issue in _stat
310
+ #endif
311
+ #ifdef FIXED_SIZE_SYMBOLS
312
+ // NO_FIXED_SIZE_64_ALIAS means that DLL provides the native _fstat64 symbol
313
+ #if defined(NO_FIXED_SIZE_64_ALIAS) && !defined(NO_FSTAT64_ALIAS)
314
+ fstat64 == _fstat64
315
+ #endif
316
+ #else
317
+ fstat64 == _fstat64
318
+ #endif
293
319
294
320
; This is list of symbol aliases for GNU functions which are not part of POSIX or ISO C
295
321
strcasecmp == _stricmp
@@ -545,19 +571,23 @@ __ms_vsprintf == vsprintf
545
571
__ms_vwprintf == vwprintf
546
572
__ms_wprintf == wprintf
547
573
__ms_wscanf == wscanf
548
- #ifdef WITH_MS_VSCANF_ALIASES
549
- __ms_vfscanf == vfscanf
550
- __ms_vfwscanf == vfwscanf
551
- __ms_vscanf == vscanf
552
- __ms_vsscanf == vsscanf
553
- __ms_vswscanf == vswscanf
554
- __ms_vwscanf == vwscanf
555
- #endif
556
574
#endif
557
575
558
576
; This is list of additional symbol aliases not available in any library as neither native symbols nor aliases
559
577
; FIXME: check if these really are needed
560
578
579
+ ; This is wstat and wstat64 symbol available only in mingw but for a long time
580
+ #ifdef UCRTBASE
581
+ F32(wstat == _wstat32)
582
+ F64(wstat == _wstat64i32)
583
+ wstat32 == _wstat32
584
+ wstat32i64 == _wstat32i64
585
+ wstat64 == _wstat64
586
+ wstat64i32 == _wstat64i32
587
+ #else
588
+ ; wstat for non-UCRT is provided by mingw to workaround trailing slash issue in _wstat
589
+ #endif
590
+
561
591
; Origin of the symbol wcscmpi is unknown. This symbol is not present in
562
592
; crtdll.dll and neither in any msvcr* version. The only source of wcscmpi is
563
593
; wcstr.h header file from the Microsoft Visual C++ 1.0 (32-bit for NT) and
0 commit comments