| author | |
| committer | |
| log | b1269785557074ce249666ff922a47ae1d384769 |
| tree | 40b7cac57206170fba51e358a3cbff84d2dec41e |
| parent | bbecbaab0a3fd6b66bf45f720b9cb1471ea193c4 |
198 files changed, 3 insertions(+), 11368 deletions(-)
lib/libc/mingw/lib-common/msvcrt.def.in deleted-1628| ... | @@ -1,1628 +0,0 @@ | ||
| 1 | LIBRARY "msvcrt.dll" | ||
| 2 | EXPORTS | ||
| 3 | |||
| 4 | #include "func.def.in" | ||
| 5 | #include "msvcrt-common.def.in" | ||
| 6 | |||
| 7 | #ifdef DEF_I386 | ||
| 8 | _CIacos | ||
| 9 | _CIasin | ||
| 10 | _CIatan | ||
| 11 | _CIatan2 | ||
| 12 | _CIcos | ||
| 13 | _CIcosh | ||
| 14 | _CIexp | ||
| 15 | _CIfmod | ||
| 16 | _CIlog | ||
| 17 | _CIlog10 | ||
| 18 | _CIpow | ||
| 19 | _CIsin | ||
| 20 | _CIsinh | ||
| 21 | _CIsqrt | ||
| 22 | _CItan | ||
| 23 | _CItanh | ||
| 24 | #endif | ||
| 25 | |||
| 26 | #ifdef DEF_X64 | ||
| 27 | $I10_OUTPUT | ||
| 28 | ; public: __cdecl __non_rtti_object::__non_rtti_object(class __non_rtti_object const & __ptr64) __ptr64 | ||
| 29 | ; GCC = __ZN17__non_rtti_objectC2ERKS_ | ||
| 30 | ??0__non_rtti_object@@QEAA@AEBV0@@Z | ||
| 31 | ; public: __cdecl __non_rtti_object::__non_rtti_object(char const * __ptr64) __ptr64 | ||
| 32 | ; GCC = __ZN17__non_rtti_objectC1ERKS_ | ||
| 33 | ??0__non_rtti_object@@QEAA@PEBD@Z | ||
| 34 | ; private: __cdecl bad_cast::bad_cast(char const * __ptr64 const * __ptr64) __ptr64 | ||
| 35 | ??0bad_cast@@AEAA@PEBQEBD@Z | ||
| 36 | ; public: __cdecl bad_cast::bad_cast(char const * __ptr64 const & __ptr64) __ptr64 | ||
| 37 | ??0bad_cast@@QEAA@AEBQEBD@Z | ||
| 38 | ; public: __cdecl bad_cast::bad_cast(class bad_cast const & __ptr64) __ptr64 | ||
| 39 | ??0bad_cast@@QEAA@AEBV0@@Z | ||
| 40 | ; public: __cdecl bad_cast::bad_cast(char const * __ptr64) __ptr64 | ||
| 41 | ??0bad_cast@@QEAA@PEBD@Z | ||
| 42 | ; public: __cdecl bad_typeid::bad_typeid(class bad_typeid const & __ptr64) __ptr64 | ||
| 43 | ??0bad_typeid@@QEAA@AEBV0@@Z | ||
| 44 | ; public: __cdecl bad_typeid::bad_typeid(char const * __ptr64) __ptr64 | ||
| 45 | ??0bad_typeid@@QEAA@PEBD@Z | ||
| 46 | ; public: __cdecl exception::exception(char const * __ptr64 const & __ptr64) __ptr64 | ||
| 47 | ??0exception@@QEAA@AEBQEBD@Z | ||
| 48 | ; public: __cdecl exception::exception(char const * __ptr64 const & __ptr64,int) __ptr64 | ||
| 49 | ??0exception@@QEAA@AEBQEBDH@Z | ||
| 50 | ; public: __cdecl exception::exception(class exception const & __ptr64) __ptr64 | ||
| 51 | ??0exception@@QEAA@AEBV0@@Z | ||
| 52 | ; public: __cdecl exception::exception(void) __ptr64 | ||
| 53 | ??0exception@@QEAA@XZ | ||
| 54 | ; public: virtual __cdecl __non_rtti_object::~__non_rtti_object(void) __ptr64 | ||
| 55 | ??1__non_rtti_object@@UEAA@XZ | ||
| 56 | ; public: virtual __cdecl bad_cast::~bad_cast(void) __ptr64 | ||
| 57 | ??1bad_cast@@UEAA@XZ | ||
| 58 | ; public: virtual __cdecl bad_typeid::~bad_typeid(void) __ptr64 | ||
| 59 | ??1bad_typeid@@UEAA@XZ | ||
| 60 | ; public: virtual __cdecl exception::~exception(void) __ptr64 | ||
| 61 | ??1exception@@UEAA@XZ | ||
| 62 | ; public: virtual __cdecl type_info::~type_info(void) __ptr64 | ||
| 63 | ??1type_info@@UEAA@XZ | ||
| 64 | ; void * __ptr64 __cdecl operator new(unsigned __int64) | ||
| 65 | ; GCC = __Znwy | ||
| 66 | ??2@YAPEAX_K@Z | ||
| 67 | ; void __cdecl operator delete(void * __ptr64) | ||
| 68 | ; GCC = __ZdlPv | ||
| 69 | ??3@YAXPEAX@Z | ||
| 70 | ; public: class __non_rtti_object & __ptr64 __cdecl __non_rtti_object::operator=(class __non_rtti_object const & __ptr64) __ptr64 | ||
| 71 | ??4__non_rtti_object@@QEAAAEAV0@AEBV0@@Z | ||
| 72 | ; public: class bad_cast & __ptr64 __cdecl bad_cast::operator=(class bad_cast const & __ptr64) __ptr64 | ||
| 73 | ??4bad_cast@@QEAAAEAV0@AEBV0@@Z | ||
| 74 | ; public: class bad_typeid & __ptr64 __cdecl bad_typeid::operator=(class bad_typeid const & __ptr64) __ptr64 | ||
| 75 | ??4bad_typeid@@QEAAAEAV0@AEBV0@@Z | ||
| 76 | ; public: class exception & __ptr64 __cdecl exception::operator=(class exception const & __ptr64) __ptr64 | ||
| 77 | ??4exception@@QEAAAEAV0@AEBV0@@Z | ||
| 78 | ; public: int __cdecl type_info::operator==(class type_info const & __ptr64)const __ptr64 | ||
| 79 | ??8type_info@@QEBAHAEBV0@@Z | ||
| 80 | ; public: int __cdecl type_info::operator!=(class type_info const & __ptr64)const __ptr64 | ||
| 81 | ??9type_info@@QEBAHAEBV0@@Z | ||
| 82 | ; const __non_rtti_object::`vftable' | ||
| 83 | ??_7__non_rtti_object@@6B@ | ||
| 84 | ; const bad_cast::`vftable' | ||
| 85 | ??_7bad_cast@@6B@ | ||
| 86 | ; const bad_typeid::`vftable' | ||
| 87 | ??_7bad_typeid@@6B@ | ||
| 88 | ; const exception::`vftable' | ||
| 89 | ??_7exception@@6B@ | ||
| 90 | ; public: void __cdecl bad_cast::`default constructor closure'(void) __ptr64 | ||
| 91 | ??_Fbad_cast@@QEAAXXZ | ||
| 92 | ; public: void __cdecl bad_typeid::`default constructor closure'(void) __ptr64 | ||
| 93 | ??_Fbad_typeid@@QEAAXXZ | ||
| 94 | ; void * __ptr64 __cdecl operator new[](unsigned __int64) | ||
| 95 | ; GNU = __Znay | ||
| 96 | ??_U@YAPEAX_K@Z | ||
| 97 | ; void __cdecl operator delete[](void * __ptr64) | ||
| 98 | ; GNU = __ZdaPv | ||
| 99 | ??_V@YAXPEAX@Z | ||
| 100 | ; int (__cdecl*__cdecl _query_new_handler(void))(unsigned __int64) | ||
| 101 | ; GNU = __Z18_query_new_handlerv | ||
| 102 | ?_query_new_handler@@YAP6AH_K@ZXZ | ||
| 103 | ; int __cdecl _query_new_mode(void) | ||
| 104 | ; GNU = __Z15_query_new_modev | ||
| 105 | ?_query_new_mode@@YAHXZ | ||
| 106 | ; int (__cdecl*__cdecl _set_new_handler(int (__cdecl*)(unsigned __int64)))(unsigned __int64) | ||
| 107 | ; GNU = __Z16_set_new_handlerPFiyE | ||
| 108 | ?_set_new_handler@@YAP6AH_K@ZP6AH0@Z@Z | ||
| 109 | ; int __cdecl _set_new_mode(int) | ||
| 110 | ; GNU = __Z13_set_new_modei | ||
| 111 | ?_set_new_mode@@YAHH@Z | ||
| 112 | ; void (__cdecl*__cdecl _set_se_translator(void (__cdecl*)(unsigned int,struct _EXCEPTION_POINTERS * __ptr64)))(unsigned int,struct _EXCEPTION_POINTERS * __ptr64) | ||
| 113 | ; GNU = __Z18_set_se_translatorPFvjP19_EXCEPTION_POINTERSE | ||
| 114 | ?_set_se_translator@@YAP6AXIPEAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z | ||
| 115 | ; public: int __cdecl type_info::before(class type_info const & __ptr64)const __ptr64 | ||
| 116 | ?before@type_info@@QEBAHAEBV1@@Z | ||
| 117 | ; public: char const * __ptr64 __cdecl type_info::name(void)const __ptr64 | ||
| 118 | ?name@type_info@@QEBAPEBDXZ | ||
| 119 | ; public: char const * __ptr64 __cdecl type_info::raw_name(void)const __ptr64 | ||
| 120 | ?raw_name@type_info@@QEBAPEBDXZ | ||
| 121 | ; void (__cdecl*__cdecl set_new_handler(void (__cdecl*)(void)))(void) | ||
| 122 | ; GNU = __Z15set_new_handlerPFvvE | ||
| 123 | ?set_new_handler@@YAP6AXXZP6AXXZ@Z | ||
| 124 | ; void (__cdecl*__cdecl set_terminate(void (__cdecl*)(void)))(void) | ||
| 125 | ; GNU = __Z13set_terminatePFvvE | ||
| 126 | ?set_terminate@@YAP6AXXZP6AXXZ@Z | ||
| 127 | ; void (__cdecl*__cdecl set_unexpected(void (__cdecl*)(void)))(void) | ||
| 128 | ; GNU = __Z14set_unexpectedPFvvE | ||
| 129 | ?set_unexpected@@YAP6AXXZP6AXXZ@Z | ||
| 130 | ; void __cdecl terminate(void) | ||
| 131 | ; GNU = __Z9terminatev | ||
| 132 | ?terminate@@YAXXZ | ||
| 133 | ; void __cdecl unexpected(void) | ||
| 134 | ; GNU = __Z10unexpectedv | ||
| 135 | ?unexpected@@YAXXZ | ||
| 136 | ; public: virtual char const * __ptr64 __cdecl exception::what(void)const __ptr64 | ||
| 137 | ?what@exception@@UEBAPEBDXZ | ||
| 138 | #endif | ||
| 139 | |||
| 140 | #ifdef DEF_ARM32 | ||
| 141 | ??0__non_rtti_object@@QAA@ABV0@@Z | ||
| 142 | ??0__non_rtti_object@@QAA@PBD@Z | ||
| 143 | ??0bad_cast@@AAA@PBQBD@Z | ||
| 144 | ??0bad_cast@@QAA@ABV0@@Z | ||
| 145 | ??0bad_cast@@QAA@PBD@Z | ||
| 146 | ??0bad_typeid@@QAA@ABV0@@Z | ||
| 147 | ??0bad_typeid@@QAA@PBD@Z | ||
| 148 | ??0exception@@QAA@ABQBD@Z | ||
| 149 | ??0exception@@QAA@ABQBDH@Z | ||
| 150 | ??0exception@@QAA@ABV0@@Z | ||
| 151 | ??0exception@@QAA@XZ | ||
| 152 | ??1__non_rtti_object@@UAA@XZ | ||
| 153 | ??1bad_cast@@UAA@XZ | ||
| 154 | ??1bad_typeid@@UAA@XZ | ||
| 155 | ??1exception@@UAA@XZ | ||
| 156 | ??1type_info@@UAA@XZ | ||
| 157 | ??2@YAPAXI@Z | ||
| 158 | ??2@YAPAXIHPBDH@Z | ||
| 159 | ??3@YAXPAX@Z | ||
| 160 | ??4__non_rtti_object@@QAAAAV0@ABV0@@Z | ||
| 161 | ??4bad_cast@@QAAAAV0@ABV0@@Z | ||
| 162 | ??4bad_typeid@@QAAAAV0@ABV0@@Z | ||
| 163 | ??4exception@@QAAAAV0@ABV0@@Z | ||
| 164 | ??8type_info@@QBAHABV0@@Z | ||
| 165 | ??9type_info@@QBAHABV0@@Z | ||
| 166 | ??_7__non_rtti_object@@6B@ DATA | ||
| 167 | ??_7bad_cast@@6B@ DATA | ||
| 168 | ??_7bad_typeid@@6B@ DATA | ||
| 169 | ??_7exception@@6B@ DATA | ||
| 170 | ??_Fbad_cast@@QAAXXZ | ||
| 171 | ??_Fbad_typeid@@QAAXXZ | ||
| 172 | ??_U@YAPAXI@Z | ||
| 173 | ??_U@YAPAXIHPBDH@Z | ||
| 174 | ??_V@YAXPAX@Z | ||
| 175 | _CallMemberFunction0 | ||
| 176 | _CallMemberFunction1 | ||
| 177 | _CallMemberFunction2 | ||
| 178 | __ExceptionPtrAssign | ||
| 179 | __ExceptionPtrCompare | ||
| 180 | __ExceptionPtrCopy | ||
| 181 | __ExceptionPtrCopyException | ||
| 182 | __ExceptionPtrCreate | ||
| 183 | __ExceptionPtrCurrentException | ||
| 184 | __ExceptionPtrDestroy | ||
| 185 | __ExceptionPtrRethrow | ||
| 186 | __ExceptionPtrSwap | ||
| 187 | __ExceptionPtrToBool | ||
| 188 | ?_query_new_handler@@YAP6AHI@ZXZ | ||
| 189 | ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z | ||
| 190 | ?_set_new_mode@@YAHH@Z | ||
| 191 | ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z | ||
| 192 | ?before@type_info@@QBAHABV1@@Z | ||
| 193 | ?name@type_info@@QBAPBDXZ | ||
| 194 | ?raw_name@type_info@@QBAPBDXZ | ||
| 195 | ?set_terminate@@YAP6AXXZP6AXXZ@Z | ||
| 196 | ?set_unexpected@@YAP6AXXZP6AXXZ@Z | ||
| 197 | ?terminate@@YAXXZ | ||
| 198 | ?unexpected@@YAXXZ | ||
| 199 | ?what@exception@@UBAPBDXZ | ||
| 200 | #endif | ||
| 201 | |||
| 202 | #ifdef DEF_ARM32 | ||
| 203 | _CrtCheckMemory | ||
| 204 | _CrtDbgBreak | ||
| 205 | _CrtDbgReport | ||
| 206 | _CrtDbgReportV | ||
| 207 | _CrtDbgReportW | ||
| 208 | _CrtDbgReportWV | ||
| 209 | _CrtDoForAllClientObjects | ||
| 210 | _CrtDumpMemoryLeaks | ||
| 211 | _CrtIsMemoryBlock | ||
| 212 | _CrtIsValidHeapPointer | ||
| 213 | _CrtIsValidPointer | ||
| 214 | _CrtMemCheckpoint | ||
| 215 | _CrtMemDifference | ||
| 216 | _CrtMemDumpAllObjectsSince | ||
| 217 | _CrtMemDumpStatistics | ||
| 218 | _CrtReportBlockType | ||
| 219 | _CrtSetAllocHook | ||
| 220 | _CrtSetBreakAlloc | ||
| 221 | _CrtSetDbgBlockType | ||
| 222 | _CrtSetDbgFlag | ||
| 223 | _CrtSetDumpClient | ||
| 224 | _CrtSetReportFile | ||
| 225 | _CrtSetReportHook | ||
| 226 | _CrtSetReportHook2 | ||
| 227 | _CrtSetReportMode | ||
| 228 | #endif | ||
| 229 | F_I386(_CxxThrowException@8) | ||
| 230 | F_NON_I386(_CxxThrowException) | ||
| 231 | F_I386(_EH_prolog) | ||
| 232 | _Getdays | ||
| 233 | _Getmonths | ||
| 234 | _Gettnames | ||
| 235 | _HUGE DATA | ||
| 236 | _Strftime | ||
| 237 | F_ARM_ANY(_W_Getdays) | ||
| 238 | F_ARM_ANY(_W_Getmonths) | ||
| 239 | F_ARM_ANY(_W_Gettnames) | ||
| 240 | F_ARM_ANY(_Wcsftime) | ||
| 241 | _XcptFilter | ||
| 242 | F_ARM_ANY(__AdjustPointer) | ||
| 243 | F_NON_I386(__C_specific_handler) | ||
| 244 | __CppXcptFilter | ||
| 245 | F_I386(__CxxCallUnwindDtor) | ||
| 246 | F_I386(__CxxCallUnwindVecDtor) | ||
| 247 | F_I386(__CxxDetectRethrow) | ||
| 248 | F_I386(__CxxExceptionFilter) | ||
| 249 | F_X86_ANY(__CxxFrameHandler) | ||
| 250 | F_ARM_ANY(__CxxFrameHandler3) | ||
| 251 | F_I386(__CxxLongjmpUnwind) | ||
| 252 | F_I386(__CxxQueryExceptionSize) | ||
| 253 | F_I386(__CxxRegisterExceptionObject) | ||
| 254 | F_I386(__CxxUnregisterExceptionObject) | ||
| 255 | __DestructExceptionObject | ||
| 256 | __RTCastToVoid | ||
| 257 | __RTDynamicCast | ||
| 258 | __RTtypeid | ||
| 259 | __STRINGTOLD | ||
| 260 | F_NON_I386(___lc_codepage_func) | ||
| 261 | ___lc_collate_cp_func | ||
| 262 | ___lc_handle_func | ||
| 263 | ; ___mb_cur_max_func exists (on all archs) since XP. Earlier, this function | ||
| 264 | ; was never used, but the __mb_cur_max data symbol was accessed instead. | ||
| 265 | ; For i386 we provide this function as a statically linked helper, that uses | ||
| 266 | ; __mb_cur_max, to avoid forcing a dependency on XP here. | ||
| 267 | F_NON_I386(___mb_cur_max_func) | ||
| 268 | F_X86_ANY(___setlc_active_func) | ||
| 269 | F_X86_ANY(___unguarded_readlc_active_add_func) | ||
| 270 | __argc DATA | ||
| 271 | __argv DATA | ||
| 272 | __badioinfo DATA | ||
| 273 | F_I386(__buffer_overrun) | ||
| 274 | __crtCompareStringA | ||
| 275 | __crtCompareStringW | ||
| 276 | __crtGetLocaleInfoW | ||
| 277 | __crtGetStringTypeW | ||
| 278 | __crtLCMapStringA | ||
| 279 | __crtLCMapStringW | ||
| 280 | F_ARM_ANY(__daylight) | ||
| 281 | __dllonexit | ||
| 282 | __doserrno | ||
| 283 | F_ARM_ANY(__dstbias) | ||
| 284 | __fpecode | ||
| 285 | __getmainargs | ||
| 286 | F_X86_ANY(__initenv DATA) | ||
| 287 | __iob_func | ||
| 288 | __isascii | ||
| 289 | __iscsym | ||
| 290 | __iscsymf | ||
| 291 | F_I386(__lc_clike) | ||
| 292 | F_X86_ANY(__lc_codepage DATA) | ||
| 293 | F_X86_ANY(__lc_collate_cp DATA) | ||
| 294 | __lc_handle DATA | ||
| 295 | __lconv_init | ||
| 296 | __mb_cur_max DATA | ||
| 297 | #ifdef DEF_I386 | ||
| 298 | __p___argc | ||
| 299 | __p___argv | ||
| 300 | __p___initenv | ||
| 301 | __p___mb_cur_max | ||
| 302 | __p___wargv | ||
| 303 | __p___winitenv | ||
| 304 | __p__acmdln | ||
| 305 | __p__amblksiz | ||
| 306 | __p__commode | ||
| 307 | __p__daylight | ||
| 308 | __p__dstbias | ||
| 309 | __p__environ | ||
| 310 | __p__fileinfo | ||
| 311 | __p__fmode | ||
| 312 | __p__iob | ||
| 313 | __p__mbcasemap | ||
| 314 | __p__mbctype | ||
| 315 | __p__osver | ||
| 316 | __p__pctype | ||
| 317 | __p__pgmptr | ||
| 318 | __p__pwctype | ||
| 319 | __p__timezone | ||
| 320 | __p__tzname | ||
| 321 | __p__wcmdln | ||
| 322 | __p__wenviron | ||
| 323 | __p__winmajor | ||
| 324 | __p__winminor | ||
| 325 | __p__winver | ||
| 326 | __p__wpgmptr | ||
| 327 | #endif | ||
| 328 | __pctype_func | ||
| 329 | __pioinfo DATA | ||
| 330 | __pwctype_func | ||
| 331 | __pxcptinfoptrs | ||
| 332 | F_I386(__security_error_handler) | ||
| 333 | __set_app_type | ||
| 334 | F_I386(__set_buffer_overrun_handler) | ||
| 335 | F_X86_ANY(__setlc_active DATA) | ||
| 336 | __setusermatherr | ||
| 337 | F_ARM_ANY(__strncnt) | ||
| 338 | F_X86_ANY(__threadhandle) | ||
| 339 | F_X86_ANY(__threadid) | ||
| 340 | __toascii | ||
| 341 | __uncaught_exception | ||
| 342 | __unDName | ||
| 343 | __unDNameEx | ||
| 344 | F_X86_ANY(__unguarded_readlc_active DATA) | ||
| 345 | __wargv DATA | ||
| 346 | __wcserror | ||
| 347 | F_NON_I386(__wcserror_s) | ||
| 348 | F_ARM_ANY(__wcsncnt) | ||
| 349 | __wgetmainargs | ||
| 350 | F_X86_ANY(__winitenv DATA) | ||
| 351 | F_I386(_abnormal_termination) | ||
| 352 | F_NON_I386(_abs64) | ||
| 353 | F_NON_I386(llabs == _abs64) | ||
| 354 | F_NON_I386(imaxabs == _abs64) | ||
| 355 | _access | ||
| 356 | ; _access_s Replaced by emu | ||
| 357 | _acmdln DATA | ||
| 358 | #ifdef DEF_I386 | ||
| 359 | _adj_fdiv_m16i | ||
| 360 | _adj_fdiv_m32 | ||
| 361 | _adj_fdiv_m32i | ||
| 362 | _adj_fdiv_m64 | ||
| 363 | _adj_fdiv_r | ||
| 364 | _adj_fdivr_m16i | ||
| 365 | _adj_fdivr_m32 | ||
| 366 | _adj_fdivr_m32i | ||
| 367 | _adj_fdivr_m64 | ||
| 368 | _adj_fpatan | ||
| 369 | _adj_fprem | ||
| 370 | _adj_fprem1 | ||
| 371 | _adj_fptan | ||
| 372 | _adjust_fdiv DATA | ||
| 373 | #endif | ||
| 374 | _aexit_rtn DATA | ||
| 375 | _aligned_free | ||
| 376 | F_ARM_ANY(_aligned_free_dbg) | ||
| 377 | _aligned_malloc | ||
| 378 | F_ARM_ANY(_aligned_malloc_dbg) | ||
| 379 | _aligned_offset_malloc | ||
| 380 | F_ARM_ANY(_aligned_offset_malloc_dbg) | ||
| 381 | _aligned_offset_realloc | ||
| 382 | F_ARM_ANY(_aligned_offset_realloc_dbg) | ||
| 383 | _aligned_realloc | ||
| 384 | F_ARM_ANY(_aligned_realloc_dbg) | ||
| 385 | _amsg_exit | ||
| 386 | _assert | ||
| 387 | _atodbl | ||
| 388 | _atodbl_l | ||
| 389 | _atof_l | ||
| 390 | _atoflt_l | ||
| 391 | _atoi64 | ||
| 392 | atoll == _atoi64 | ||
| 393 | _atoi64_l | ||
| 394 | _atoll_l == _atoi64_l | ||
| 395 | _atoi_l | ||
| 396 | _atol_l | ||
| 397 | _atoldbl | ||
| 398 | F_NON_I386(_atoldbl_l) | ||
| 399 | F_X86_ANY(_beep) | ||
| 400 | _beginthread | ||
| 401 | _beginthreadex | ||
| 402 | _c_exit | ||
| 403 | _cabs DATA | ||
| 404 | _callnewh | ||
| 405 | F_ARM_ANY(_calloc_dbg) | ||
| 406 | _cexit | ||
| 407 | _cgets | ||
| 408 | ; _cgets_s replaced by emu | ||
| 409 | _cgetws | ||
| 410 | ; _cgetws_s replaced by emu | ||
| 411 | _chdir | ||
| 412 | _chdrive | ||
| 413 | _chgsign | ||
| 414 | F_NON_I386(_chgsignf) | ||
| 415 | _chmod | ||
| 416 | F_I386(_chkesp) | ||
| 417 | _chsize | ||
| 418 | ; _chsize_s replaced by emu | ||
| 419 | F_ARM_ANY(_chvalidator) | ||
| 420 | F_ARM_ANY(_chvalidator_l) | ||
| 421 | _clearfp | ||
| 422 | _close | ||
| 423 | _commit | ||
| 424 | _commode DATA | ||
| 425 | _control87 | ||
| 426 | _controlfp | ||
| 427 | ; _controlfp_s replaced by emu | ||
| 428 | _copysign | ||
| 429 | F_NON_I386(_copysignf) | ||
| 430 | _cprintf | ||
| 431 | _cprintf_l | ||
| 432 | _cprintf_p | ||
| 433 | _cprintf_p_l | ||
| 434 | ; _cprintf_s Replaced by emu | ||
| 435 | ; _cprintf_s_l likewise. | ||
| 436 | _cputs | ||
| 437 | _cputws | ||
| 438 | F_I386(_CRT_RTC_INIT) | ||
| 439 | _creat | ||
| 440 | F_ARM_ANY(_create_locale) | ||
| 441 | F_ARM32(_crtAssertBusy) | ||
| 442 | F_ARM32(_crtBreakAlloc) | ||
| 443 | F_ARM32(_crtDbgFlag) | ||
| 444 | _cscanf | ||
| 445 | _cscanf_l | ||
| 446 | _cscanf_s | ||
| 447 | _cscanf_s_l | ||
| 448 | F_ARM_ANY(_ctime32) | ||
| 449 | F_I386(_ctime32 == ctime) | ||
| 450 | ; _ctime32_s replaced by emu | ||
| 451 | _ctime64 | ||
| 452 | ; _ctime64_s replaced by emu | ||
| 453 | _ctype F_I386(DATA) | ||
| 454 | _cwait | ||
| 455 | _cwprintf | ||
| 456 | _cwprintf_l | ||
| 457 | _cwprintf_p | ||
| 458 | _cwprintf_p_l | ||
| 459 | ; _cwprintf_s Replaced by emu | ||
| 460 | ; _cwprintf_s_l Likewise. | ||
| 461 | _cwscanf | ||
| 462 | _cwscanf_l | ||
| 463 | _cwscanf_s | ||
| 464 | _cwscanf_s_l | ||
| 465 | F_X86_ANY(_dstbias DATA) | ||
| 466 | _daylight DATA | ||
| 467 | _difftime32 F_I386(== difftime) | ||
| 468 | _difftime64 | ||
| 469 | _dup | ||
| 470 | _dup2 | ||
| 471 | _ecvt | ||
| 472 | _ecvt_s | ||
| 473 | _endthread | ||
| 474 | _endthreadex | ||
| 475 | F_X86_ANY(_environ DATA) | ||
| 476 | _eof | ||
| 477 | _errno | ||
| 478 | F_I386(_except_handler2) | ||
| 479 | F_I386(_except_handler3) | ||
| 480 | _execl | ||
| 481 | _execle | ||
| 482 | _execlp | ||
| 483 | _execlpe | ||
| 484 | _execv | ||
| 485 | _execve | ||
| 486 | _execvp | ||
| 487 | _execvpe | ||
| 488 | _exit | ||
| 489 | _expand | ||
| 490 | F_ARM_ANY(_expand_dbg) | ||
| 491 | _fcloseall | ||
| 492 | _fcvt | ||
| 493 | _fcvt_s | ||
| 494 | _fdopen | ||
| 495 | _fgetchar | ||
| 496 | _fgetwchar | ||
| 497 | _filbuf | ||
| 498 | F_X86_ANY(_fileinfo DATA) | ||
| 499 | _filelength | ||
| 500 | _filelengthi64 | ||
| 501 | _fileno | ||
| 502 | _findclose | ||
| 503 | _findfirst | ||
| 504 | F32(_findfirst32 == _findfirst) | ||
| 505 | _findfirst64 | ||
| 506 | _findfirsti64 | ||
| 507 | F32(_findfirst32i64 == _findfirsti64) | ||
| 508 | F64(_findfirst64i32 == _findfirst) | ||
| 509 | _findnext | ||
| 510 | F32(_findnext32 == _findnext) | ||
| 511 | _findnext64 | ||
| 512 | _findnexti64 | ||
| 513 | F32(_findnext32i64 == _findnexti64) | ||
| 514 | F64(_findnext64i32 == _findnext) | ||
| 515 | _finite | ||
| 516 | F_NON_I386(_finitef) | ||
| 517 | _flsbuf | ||
| 518 | _flushall | ||
| 519 | _fmode DATA | ||
| 520 | _fpclass | ||
| 521 | F_X64(_fpclassf) | ||
| 522 | F_I386(_fpieee_flt) | ||
| 523 | F_ARM_ANY(_fpieee_flt) | ||
| 524 | _fpreset DATA | ||
| 525 | _fprintf_l | ||
| 526 | _fprintf_p | ||
| 527 | _fprintf_p_l | ||
| 528 | _fprintf_s_l | ||
| 529 | _fputchar | ||
| 530 | _fputwchar | ||
| 531 | F_ARM_ANY(_free_dbg) | ||
| 532 | F_ARM_ANY(_free_locale) | ||
| 533 | F_ARM_ANY(_freea) | ||
| 534 | F_NON_I386(_fscanf_l) | ||
| 535 | F_NON_I386(_fscanf_s_l) | ||
| 536 | F_ARM_ANY(_fseeki64) | ||
| 537 | _fsopen | ||
| 538 | _fstat | ||
| 539 | F32(_fstat32 == _fstat) | ||
| 540 | _fstat64 | ||
| 541 | _fstati64 | ||
| 542 | F64(_fstat64i32 == _fstat) | ||
| 543 | _ftime | ||
| 544 | F_I386(_ftime32 == _ftime) | ||
| 545 | F_NON_I386(_ftime32) | ||
| 546 | _ftime32_s | ||
| 547 | _ftime64 | ||
| 548 | _ftime64_s | ||
| 549 | F32(_ftime_s == _ftime32_s) | ||
| 550 | F64(_ftime_s == _ftime64_s) | ||
| 551 | F_I386(_ftol) | ||
| 552 | _fullpath | ||
| 553 | F_ARM_ANY(_fullpath_dbg) | ||
| 554 | _futime | ||
| 555 | F_I386(_futime32 == _futime) | ||
| 556 | F_NON_I386(_futime32) | ||
| 557 | _futime64 | ||
| 558 | _fwprintf_l | ||
| 559 | _fwprintf_p | ||
| 560 | _fwprintf_p_l | ||
| 561 | _fwprintf_s_l | ||
| 562 | _fwscanf_l | ||
| 563 | _fwscanf_s_l | ||
| 564 | _gcvt | ||
| 565 | _gcvt_s | ||
| 566 | F_ARM_ANY(_get_current_locale) | ||
| 567 | _get_doserrno | ||
| 568 | F_ARM_ANY(_get_environ) | ||
| 569 | F_ARM_ANY(_get_errno) | ||
| 570 | F_ARM_ANY(_get_fileinfo) | ||
| 571 | F_ARM_ANY(_get_fmode) | ||
| 572 | F_X86_ANY(_get_heap_handle) | ||
| 573 | _get_osfhandle | ||
| 574 | ;_get_output_format provided by emu | ||
| 575 | F_X86_ANY(_get_sbh_threshold) | ||
| 576 | F_ARM_ANY(_get_wenviron) | ||
| 577 | _getch | ||
| 578 | _getche | ||
| 579 | _getcwd | ||
| 580 | _getdcwd | ||
| 581 | _getdiskfree | ||
| 582 | _getdllprocaddr | ||
| 583 | _getdrive | ||
| 584 | F_X86_ANY(_getdrives) | ||
| 585 | _getmaxstdio | ||
| 586 | _getmbcp | ||
| 587 | F_X86_ANY(_getpid) | ||
| 588 | F_X86_ANY(_getsystime) | ||
| 589 | _getw | ||
| 590 | _getwch | ||
| 591 | _getwche | ||
| 592 | F_X86_ANY(_getws) | ||
| 593 | F_I386(_global_unwind2) | ||
| 594 | _gmtime32 F_I386(== gmtime) | ||
| 595 | ; _gmtime32_s replaced by emu | ||
| 596 | _gmtime64 | ||
| 597 | ; _gmtime64_s replaced by emu | ||
| 598 | F_X86_ANY(_heapadd) | ||
| 599 | _heapchk | ||
| 600 | _heapmin | ||
| 601 | F_X86_ANY(_heapset) | ||
| 602 | F_X86_ANY(_heapused) | ||
| 603 | _heapwalk | ||
| 604 | _hypot | ||
| 605 | F_NON_I386(_hypotf) | ||
| 606 | _i64toa | ||
| 607 | _i64toa_s | ||
| 608 | _i64tow | ||
| 609 | _i64tow_s | ||
| 610 | _initterm | ||
| 611 | F_ARM_ANY(_initterm_e) | ||
| 612 | F_I386(_inp) | ||
| 613 | F_I386(_inpd) | ||
| 614 | F_I386(_inpw) | ||
| 615 | F_ARM_ANY(_invalid_parameter) | ||
| 616 | _iob DATA | ||
| 617 | _isalnum_l | ||
| 618 | _isalpha_l | ||
| 619 | _isatty | ||
| 620 | _iscntrl_l | ||
| 621 | _isctype | ||
| 622 | _isctype_l | ||
| 623 | _isdigit_l | ||
| 624 | _isgraph_l | ||
| 625 | _isleadbyte_l | ||
| 626 | _islower_l | ||
| 627 | _ismbbalnum | ||
| 628 | _ismbbalnum_l | ||
| 629 | _ismbbalpha | ||
| 630 | _ismbbalpha_l | ||
| 631 | _ismbbgraph | ||
| 632 | _ismbbgraph_l | ||
| 633 | _ismbbkalnum | ||
| 634 | _ismbbkalnum_l | ||
| 635 | _ismbbkana | ||
| 636 | _ismbbkana_l | ||
| 637 | _ismbbkprint | ||
| 638 | _ismbbkprint_l | ||
| 639 | _ismbbkpunct | ||
| 640 | _ismbbkpunct_l | ||
| 641 | _ismbblead | ||
| 642 | _ismbblead_l | ||
| 643 | _ismbbprint | ||
| 644 | _ismbbprint_l | ||
| 645 | _ismbbpunct | ||
| 646 | _ismbbpunct_l | ||
| 647 | _ismbbtrail | ||
| 648 | _ismbbtrail_l | ||
| 649 | _ismbcalnum | ||
| 650 | _ismbcalnum_l | ||
| 651 | _ismbcalpha | ||
| 652 | _ismbcalpha_l | ||
| 653 | _ismbcdigit | ||
| 654 | _ismbcdigit_l | ||
| 655 | _ismbcgraph | ||
| 656 | _ismbcgraph_l | ||
| 657 | _ismbchira | ||
| 658 | _ismbchira_l | ||
| 659 | _ismbckata | ||
| 660 | _ismbckata_l | ||
| 661 | _ismbcl0 | ||
| 662 | _ismbcl0_l | ||
| 663 | _ismbcl1 | ||
| 664 | _ismbcl1_l | ||
| 665 | _ismbcl2 | ||
| 666 | _ismbcl2_l | ||
| 667 | _ismbclegal | ||
| 668 | _ismbclegal_l | ||
| 669 | _ismbclower | ||
| 670 | _ismbclower_l | ||
| 671 | _ismbcprint | ||
| 672 | _ismbcprint_l | ||
| 673 | _ismbcpunct | ||
| 674 | _ismbcpunct_l | ||
| 675 | _ismbcspace | ||
| 676 | _ismbcspace_l | ||
| 677 | _ismbcsymbol | ||
| 678 | _ismbcsymbol_l | ||
| 679 | _ismbcupper | ||
| 680 | _ismbcupper_l | ||
| 681 | _ismbslead | ||
| 682 | _ismbslead_l | ||
| 683 | _ismbstrail | ||
| 684 | _ismbstrail_l | ||
| 685 | _isnan | ||
| 686 | F_X64(_isnanf) | ||
| 687 | _isprint_l | ||
| 688 | _isspace_l | ||
| 689 | _isupper_l | ||
| 690 | _iswalnum_l | ||
| 691 | _iswalpha_l | ||
| 692 | _iswcntrl_l | ||
| 693 | _iswctype_l | ||
| 694 | _iswdigit_l | ||
| 695 | _iswgraph_l | ||
| 696 | _iswlower_l | ||
| 697 | _iswprint_l | ||
| 698 | _iswpunct_l | ||
| 699 | _iswspace_l | ||
| 700 | _iswupper_l | ||
| 701 | _iswxdigit_l | ||
| 702 | _isxdigit_l | ||
| 703 | _itoa | ||
| 704 | _itoa_s | ||
| 705 | _itow | ||
| 706 | _itow_s | ||
| 707 | _j0 | ||
| 708 | _j1 | ||
| 709 | _jn | ||
| 710 | _kbhit | ||
| 711 | _lfind | ||
| 712 | F_X86_ANY(_loaddll) | ||
| 713 | F_NON_I386(_lfind_s) | ||
| 714 | F_X64(_local_unwind) | ||
| 715 | F_I386(_local_unwind2) | ||
| 716 | _localtime32 F_I386(== localtime) | ||
| 717 | ; _localtime32_s replaced by emu | ||
| 718 | _localtime64 | ||
| 719 | ; _localtime64_s replaced by emu | ||
| 720 | _lock | ||
| 721 | _locking | ||
| 722 | _logb | ||
| 723 | F_NON_I386(_logbf) | ||
| 724 | F_I386(_longjmpex) | ||
| 725 | _lrotl | ||
| 726 | _lrotr | ||
| 727 | _lsearch | ||
| 728 | F_NON_I386(_lsearch_s) | ||
| 729 | _lseek | ||
| 730 | _lseeki64 | ||
| 731 | _ltoa | ||
| 732 | F_NON_I386(_ltoa_s) | ||
| 733 | _ltow | ||
| 734 | F_NON_I386(_ltow_s) | ||
| 735 | _makepath | ||
| 736 | _makepath_s | ||
| 737 | F_ARM_ANY(_malloc_dbg) | ||
| 738 | _mbbtombc | ||
| 739 | _mbbtombc_l | ||
| 740 | _mbbtype | ||
| 741 | _mbcasemap F_NON_I386(DATA) | ||
| 742 | _mbccpy | ||
| 743 | _mbccpy_l | ||
| 744 | _mbccpy_s | ||
| 745 | _mbccpy_s_l | ||
| 746 | _mbcjistojms | ||
| 747 | _mbcjistojms_l | ||
| 748 | _mbcjmstojis | ||
| 749 | _mbcjmstojis_l | ||
| 750 | _mbclen | ||
| 751 | _mbclen_l | ||
| 752 | _mbctohira | ||
| 753 | _mbctohira_l | ||
| 754 | _mbctokata | ||
| 755 | _mbctokata_l | ||
| 756 | _mbctolower | ||
| 757 | _mbctolower_l | ||
| 758 | _mbctombb | ||
| 759 | _mbctombb_l | ||
| 760 | _mbctoupper | ||
| 761 | _mbctoupper_l | ||
| 762 | _mbctype DATA | ||
| 763 | _mblen_l | ||
| 764 | _mbsbtype | ||
| 765 | _mbsbtype_l | ||
| 766 | _mbscat | ||
| 767 | _mbscat_s | ||
| 768 | _mbscat_s_l | ||
| 769 | _mbschr | ||
| 770 | _mbschr_l | ||
| 771 | _mbscmp | ||
| 772 | _mbscmp_l | ||
| 773 | _mbscoll | ||
| 774 | _mbscoll_l | ||
| 775 | _mbscpy | ||
| 776 | _mbscpy_s | ||
| 777 | _mbscpy_s_l | ||
| 778 | _mbscspn | ||
| 779 | _mbscspn_l | ||
| 780 | _mbsdec | ||
| 781 | _mbsdec_l | ||
| 782 | _mbsdup | ||
| 783 | _mbsicmp | ||
| 784 | _mbsicmp_l | ||
| 785 | _mbsicoll | ||
| 786 | _mbsicoll_l | ||
| 787 | _mbsinc | ||
| 788 | _mbsinc_l | ||
| 789 | _mbslen | ||
| 790 | _mbslen_l | ||
| 791 | _mbslwr | ||
| 792 | _mbslwr_l | ||
| 793 | _mbslwr_s | ||
| 794 | _mbslwr_s_l | ||
| 795 | _mbsnbcat | ||
| 796 | _mbsnbcat_l | ||
| 797 | _mbsnbcat_s | ||
| 798 | _mbsnbcat_s_l | ||
| 799 | _mbsnbcmp | ||
| 800 | _mbsnbcmp_l | ||
| 801 | _mbsnbcnt | ||
| 802 | _mbsnbcnt_l | ||
| 803 | _mbsnbcoll | ||
| 804 | _mbsnbcoll_l | ||
| 805 | _mbsnbcpy | ||
| 806 | _mbsnbcpy_l | ||
| 807 | _mbsnbcpy_s | ||
| 808 | _mbsnbcpy_s_l | ||
| 809 | _mbsnbicmp | ||
| 810 | _mbsnbicmp_l | ||
| 811 | _mbsnbicoll | ||
| 812 | _mbsnbicoll_l | ||
| 813 | _mbsnbset | ||
| 814 | _mbsnbset_l | ||
| 815 | _mbsnbset_s | ||
| 816 | _mbsnbset_s_l | ||
| 817 | _mbsncat | ||
| 818 | _mbsncat_l | ||
| 819 | _mbsncat_s | ||
| 820 | _mbsncat_s_l | ||
| 821 | _mbsnccnt | ||
| 822 | _mbsnccnt_l | ||
| 823 | _mbsncmp | ||
| 824 | _mbsncmp_l | ||
| 825 | _mbsncoll | ||
| 826 | _mbsncoll_l | ||
| 827 | _mbsncpy | ||
| 828 | _mbsncpy_l | ||
| 829 | _mbsncpy_s | ||
| 830 | _mbsncpy_s_l | ||
| 831 | _mbsnextc | ||
| 832 | _mbsnextc_l | ||
| 833 | _mbsnicmp | ||
| 834 | _mbsnicmp_l | ||
| 835 | _mbsnicoll | ||
| 836 | _mbsnicoll_l | ||
| 837 | _mbsninc | ||
| 838 | _mbsninc_l | ||
| 839 | _mbsnlen | ||
| 840 | _mbsnlen_l | ||
| 841 | _mbsnset | ||
| 842 | _mbsnset_l | ||
| 843 | _mbsnset_s | ||
| 844 | _mbsnset_s_l | ||
| 845 | _mbspbrk | ||
| 846 | _mbspbrk_l | ||
| 847 | _mbsrchr | ||
| 848 | _mbsrchr_l | ||
| 849 | _mbsrev | ||
| 850 | _mbsrev_l | ||
| 851 | _mbsset | ||
| 852 | _mbsset_l | ||
| 853 | _mbsset_s | ||
| 854 | _mbsset_s_l | ||
| 855 | _mbsspn | ||
| 856 | _mbsspn_l | ||
| 857 | _mbsspnp | ||
| 858 | _mbsspnp_l | ||
| 859 | _mbsstr | ||
| 860 | _mbsstr_l | ||
| 861 | _mbstok | ||
| 862 | _mbstok_l | ||
| 863 | _mbstok_s | ||
| 864 | _mbstok_s_l | ||
| 865 | _mbstowcs_l | ||
| 866 | _mbstowcs_s_l | ||
| 867 | _mbstrlen | ||
| 868 | _mbstrlen_l | ||
| 869 | _mbstrnlen | ||
| 870 | _mbstrnlen_l | ||
| 871 | _mbsupr | ||
| 872 | _mbsupr_l | ||
| 873 | _mbsupr_s | ||
| 874 | _mbsupr_s_l | ||
| 875 | _mbtowc_l | ||
| 876 | _memccpy | ||
| 877 | F_ARM_ANY(_memcpy_strict_align) | ||
| 878 | _memicmp | ||
| 879 | _memicmp_l | ||
| 880 | _mkdir | ||
| 881 | _mkgmtime | ||
| 882 | _mkgmtime32 | ||
| 883 | _mkgmtime64 | ||
| 884 | _mktemp | ||
| 885 | ; _mktemp_s replaced by emu | ||
| 886 | F_I386(_mktime32 == mktime) | ||
| 887 | F_ARM_ANY(_mktime32) | ||
| 888 | _mktime64 | ||
| 889 | _msize | ||
| 890 | F_ARM_ANY(_msize_dbg) | ||
| 891 | _nextafter | ||
| 892 | F_X64(_nextafterf) | ||
| 893 | _onexit | ||
| 894 | _open | ||
| 895 | _open_osfhandle | ||
| 896 | F_X86_ANY(_osplatform DATA) | ||
| 897 | _osver DATA | ||
| 898 | F_I386(_outp) | ||
| 899 | F_I386(_outpd) | ||
| 900 | F_I386(_outpw) | ||
| 901 | _pclose | ||
| 902 | _pctype DATA | ||
| 903 | _pgmptr DATA | ||
| 904 | _pipe | ||
| 905 | _popen | ||
| 906 | _printf_l | ||
| 907 | _printf_p | ||
| 908 | _printf_p_l | ||
| 909 | _printf_s_l | ||
| 910 | _purecall | ||
| 911 | _putch | ||
| 912 | _putenv | ||
| 913 | _putenv_s | ||
| 914 | _putw | ||
| 915 | _putwch | ||
| 916 | _putws | ||
| 917 | _pwctype DATA | ||
| 918 | _read | ||
| 919 | F_ARM_ANY(_realloc_dbg) | ||
| 920 | _resetstkoflw | ||
| 921 | _rmdir | ||
| 922 | _rmtmp | ||
| 923 | _rotl | ||
| 924 | F_NON_I386(_rotl64) | ||
| 925 | _rotr | ||
| 926 | F_NON_I386(_rotr64) | ||
| 927 | #ifdef DEF_I386 | ||
| 928 | _safe_fdiv | ||
| 929 | _safe_fdivr | ||
| 930 | _safe_fprem | ||
| 931 | _safe_fprem1 | ||
| 932 | #endif | ||
| 933 | _scalb | ||
| 934 | F_X64(_scalbf) | ||
| 935 | _scanf_l | ||
| 936 | _scanf_s_l | ||
| 937 | F_NON_I386(_scprintf) ; i386 _scprintf replaced by emu | ||
| 938 | _scprintf_l | ||
| 939 | _scprintf_p_l | ||
| 940 | _scwprintf | ||
| 941 | _scwprintf_l | ||
| 942 | _scwprintf_p_l | ||
| 943 | _searchenv | ||
| 944 | _searchenv_s | ||
| 945 | F_I386(_seh_longjmp_unwind) | ||
| 946 | _set_controlfp | ||
| 947 | _set_doserrno | ||
| 948 | F_ARM_ANY(_set_errno) | ||
| 949 | _set_error_mode | ||
| 950 | F_ARM_ANY(_set_fileinfo) | ||
| 951 | F_ARM_ANY(_set_fmode) | ||
| 952 | ; Does not seem to present even on Win7 msvcrt | ||
| 953 | ;_set_purecall_handler | ||
| 954 | F_X86_ANY(_set_sbh_threshold) | ||
| 955 | ; _set_output_format provided by emu | ||
| 956 | F_I386(_set_SSE2_enable) | ||
| 957 | F_I386(_set_security_error_handler) | ||
| 958 | F_X86_ANY(_seterrormode) | ||
| 959 | _setjmp | ||
| 960 | F_I386(_setjmp3) | ||
| 961 | F_NON_I386(_setjmpex) | ||
| 962 | F_X86_ANY(_setmaxstdio) | ||
| 963 | _setmbcp | ||
| 964 | _setmode | ||
| 965 | F_X86_ANY(_setsystime) | ||
| 966 | F_X86_ANY(_sleep) | ||
| 967 | _snprintf | ||
| 968 | _snprintf_c | ||
| 969 | _snprintf_c_l | ||
| 970 | _snprintf_l | ||
| 971 | _snprintf_s | ||
| 972 | _snprintf_s_l | ||
| 973 | _snscanf | ||
| 974 | _snscanf_l | ||
| 975 | _snscanf_s | ||
| 976 | _snscanf_s_l | ||
| 977 | _snwprintf | ||
| 978 | snwprintf == _snwprintf | ||
| 979 | _snwprintf_l | ||
| 980 | _snwprintf_s | ||
| 981 | _snwprintf_s_l | ||
| 982 | _snwscanf | ||
| 983 | _snwscanf_l | ||
| 984 | _snwscanf_s | ||
| 985 | _snwscanf_s_l | ||
| 986 | _sopen | ||
| 987 | ; _sopen_s replaced by emu | ||
| 988 | _spawnl | ||
| 989 | _spawnle | ||
| 990 | _spawnlp | ||
| 991 | _spawnlpe | ||
| 992 | _spawnv | ||
| 993 | _spawnve | ||
| 994 | _spawnvp | ||
| 995 | _spawnvpe | ||
| 996 | _splitpath | ||
| 997 | _splitpath_s | ||
| 998 | _sprintf_l | ||
| 999 | _sprintf_p_l | ||
| 1000 | _sprintf_s_l | ||
| 1001 | _sscanf_l | ||
| 1002 | _sscanf_s_l | ||
| 1003 | _stat | ||
| 1004 | _stat64 | ||
| 1005 | _stati64 | ||
| 1006 | F32(_stat32 == _stat) | ||
| 1007 | F64(_stat64i32 == _stat) | ||
| 1008 | _statusfp | ||
| 1009 | _strcmpi | ||
| 1010 | _strcoll_l | ||
| 1011 | _strdate | ||
| 1012 | ; _strdate_s replaced by emu | ||
| 1013 | _strdup | ||
| 1014 | F_ARM_ANY(_strdup_dbg) | ||
| 1015 | _strerror | ||
| 1016 | _strerror_s | ||
| 1017 | _stricmp | ||
| 1018 | _stricmp_l | ||
| 1019 | _stricoll | ||
| 1020 | _stricoll_l | ||
| 1021 | _strlwr | ||
| 1022 | strlwr == _strlwr | ||
| 1023 | _strlwr_l | ||
| 1024 | _strlwr_s | ||
| 1025 | _strlwr_s_l | ||
| 1026 | _strncoll | ||
| 1027 | _strncoll_l | ||
| 1028 | _strnicmp | ||
| 1029 | _strnicmp_l | ||
| 1030 | _strnicoll | ||
| 1031 | _strnicoll_l | ||
| 1032 | _strnset | ||
| 1033 | _strnset_s | ||
| 1034 | _strrev | ||
| 1035 | _strset | ||
| 1036 | _strset_s | ||
| 1037 | _strtime | ||
| 1038 | ; _strtime_s replaced by emu | ||
| 1039 | _strtod_l | ||
| 1040 | _strtoi64 | ||
| 1041 | strtoll == _strtoi64 | ||
| 1042 | strtoimax == _strtoi64 | ||
| 1043 | _strtoi64_l | ||
| 1044 | _strtoll_l == _strtoi64_l | ||
| 1045 | _strtoimax_l == _strtoi64_l | ||
| 1046 | _strtol_l | ||
| 1047 | _strtoui64 | ||
| 1048 | strtoull == _strtoui64 | ||
| 1049 | strtoumax == _strtoui64 | ||
| 1050 | _strtoui64_l | ||
| 1051 | _strtoull_l == _strtoui64_l | ||
| 1052 | _strtoumax_l == _strtoui64_l | ||
| 1053 | _strtoul_l | ||
| 1054 | _strupr | ||
| 1055 | _strupr_l | ||
| 1056 | _strupr_s | ||
| 1057 | _strupr_s_l | ||
| 1058 | _strxfrm_l | ||
| 1059 | _swab | ||
| 1060 | _swprintf == swprintf | ||
| 1061 | F_NON_I386(_swprintf_c) | ||
| 1062 | _swprintf_c_l | ||
| 1063 | _swprintf_p_l | ||
| 1064 | _swprintf_s_l | ||
| 1065 | _swscanf_l | ||
| 1066 | _swscanf_s_l | ||
| 1067 | _sys_errlist DATA | ||
| 1068 | _sys_nerr DATA | ||
| 1069 | _tell | ||
| 1070 | _telli64 | ||
| 1071 | _tempnam | ||
| 1072 | F_ARM_ANY(_tempnam_dbg) | ||
| 1073 | F_I386(_time32 == time) | ||
| 1074 | F_ARM_ANY(_time32) | ||
| 1075 | _time64 | ||
| 1076 | _timezone DATA | ||
| 1077 | _tolower | ||
| 1078 | _tolower_l | ||
| 1079 | _toupper | ||
| 1080 | _toupper_l | ||
| 1081 | _towlower_l | ||
| 1082 | _towupper_l | ||
| 1083 | _tzname DATA | ||
| 1084 | _tzset | ||
| 1085 | _ui64toa | ||
| 1086 | _ui64toa_s | ||
| 1087 | _ui64tow | ||
| 1088 | _ui64tow_s | ||
| 1089 | _ultoa | ||
| 1090 | _ultoa_s | ||
| 1091 | _ultow | ||
| 1092 | _ultow_s | ||
| 1093 | _umask | ||
| 1094 | ; _umask_s replaced by emu | ||
| 1095 | _ungetch | ||
| 1096 | _ungetwch | ||
| 1097 | _unlink | ||
| 1098 | F_X86_ANY(_unloaddll) | ||
| 1099 | _unlock | ||
| 1100 | _utime | ||
| 1101 | F_I386(_utime32 == _utime) | ||
| 1102 | F_NON_I386(_utime32) | ||
| 1103 | _utime64 | ||
| 1104 | _vcprintf | ||
| 1105 | _vcprintf_l | ||
| 1106 | _vcprintf_p | ||
| 1107 | _vcprintf_p_l | ||
| 1108 | ; _vcprintf_s Replaced by emu | ||
| 1109 | ; _vcprintf_s_l Likewise. | ||
| 1110 | _vcwprintf | ||
| 1111 | _vcwprintf_l | ||
| 1112 | _vcwprintf_p | ||
| 1113 | _vcwprintf_p_l | ||
| 1114 | ; _vcwprintf_s Replaced by emu | ||
| 1115 | ; _vcwprintf_s_l Likewise. | ||
| 1116 | _vfprintf_l | ||
| 1117 | _vfprintf_p | ||
| 1118 | _vfprintf_p_l | ||
| 1119 | _vfprintf_s_l | ||
| 1120 | _vfwprintf_l | ||
| 1121 | _vfwprintf_p | ||
| 1122 | _vfwprintf_p_l | ||
| 1123 | _vfwprintf_s_l | ||
| 1124 | _vprintf_l | ||
| 1125 | _vprintf_p | ||
| 1126 | _vprintf_p_l | ||
| 1127 | _vprintf_s_l | ||
| 1128 | F_NON_I386(_vscprintf) ; i386 _vscprintf replaced by emu | ||
| 1129 | _vscprintf_l | ||
| 1130 | _vscprintf_p_l | ||
| 1131 | _vscwprintf | ||
| 1132 | _vscwprintf_l | ||
| 1133 | _vscwprintf_p_l | ||
| 1134 | _vsnprintf | ||
| 1135 | _vsnprintf_c | ||
| 1136 | _vsnprintf_c_l | ||
| 1137 | _vsnprintf_l | ||
| 1138 | _vsnprintf_s | ||
| 1139 | _vsnprintf_s_l | ||
| 1140 | _vsnwprintf | ||
| 1141 | vsnwprintf == _vsnwprintf | ||
| 1142 | _vsnwprintf_l | ||
| 1143 | _vsnwprintf_s | ||
| 1144 | _vsnwprintf_s_l | ||
| 1145 | _vsprintf_l | ||
| 1146 | _vsprintf_p | ||
| 1147 | _vsprintf_p_l | ||
| 1148 | _vsprintf_s_l | ||
| 1149 | _vswprintf F_I386(== vswprintf) | ||
| 1150 | _vswprintf_c | ||
| 1151 | _vswprintf_c_l | ||
| 1152 | _vswprintf_l | ||
| 1153 | _vswprintf_p_l | ||
| 1154 | _vswprintf_s_l | ||
| 1155 | _vwprintf_l | ||
| 1156 | _vwprintf_p | ||
| 1157 | _vwprintf_p_l | ||
| 1158 | _vwprintf_s_l | ||
| 1159 | _waccess | ||
| 1160 | ; _waccess_s Replaced by emu | ||
| 1161 | _wasctime | ||
| 1162 | ; _wasctime_s Replaced by emu | ||
| 1163 | F_NON_I386(_wassert) | ||
| 1164 | _wchdir | ||
| 1165 | _wchmod | ||
| 1166 | _wcmdln DATA | ||
| 1167 | _wcreat | ||
| 1168 | _wcscoll_l | ||
| 1169 | _wcsdup | ||
| 1170 | F_ARM_ANY(_wcsdup_dbg) | ||
| 1171 | _wcserror | ||
| 1172 | _wcserror_s | ||
| 1173 | _wcsftime_l | ||
| 1174 | _wcsicmp | ||
| 1175 | _wcsicmp_l | ||
| 1176 | _wcsicoll | ||
| 1177 | _wcsicoll_l | ||
| 1178 | _wcslwr | ||
| 1179 | wcslwr == _wcslwr | ||
| 1180 | _wcslwr_l | ||
| 1181 | _wcslwr_s | ||
| 1182 | _wcslwr_s_l | ||
| 1183 | _wcsncoll | ||
| 1184 | _wcsncoll_l | ||
| 1185 | _wcsnicmp | ||
| 1186 | _wcsnicmp_l | ||
| 1187 | _wcsnicoll | ||
| 1188 | _wcsnicoll_l | ||
| 1189 | _wcsnset | ||
| 1190 | _wcsnset_s | ||
| 1191 | _wcsrev | ||
| 1192 | _wcsset | ||
| 1193 | _wcsset_s | ||
| 1194 | F_ARM_ANY(_wcstod_l) | ||
| 1195 | _wcstoi64 | ||
| 1196 | _wcstoi64_l | ||
| 1197 | _wcstol_l | ||
| 1198 | _wcstombs_l | ||
| 1199 | _wcstombs_s_l | ||
| 1200 | _wcstoui64 | ||
| 1201 | _wcstoui64_l | ||
| 1202 | _wcstoul_l | ||
| 1203 | _wcsupr | ||
| 1204 | _wcsupr_l | ||
| 1205 | _wcsupr_s | ||
| 1206 | _wcsupr_s_l | ||
| 1207 | _wcsxfrm_l | ||
| 1208 | _wctime | ||
| 1209 | F_I386(_wctime32 == _wctime) | ||
| 1210 | F_ARM_ANY(_wctime32) | ||
| 1211 | ; _wctime32_s replaced by emu | ||
| 1212 | _wctime64 | ||
| 1213 | ; _wctime64_s replaced by emu | ||
| 1214 | _wctomb_l | ||
| 1215 | _wctomb_s_l | ||
| 1216 | _wctype | ||
| 1217 | F_X86_ANY(_wenviron DATA) | ||
| 1218 | _wexecl | ||
| 1219 | _wexecle | ||
| 1220 | _wexeclp | ||
| 1221 | _wexeclpe | ||
| 1222 | _wexecv | ||
| 1223 | _wexecve | ||
| 1224 | _wexecvp | ||
| 1225 | _wexecvpe | ||
| 1226 | _wfdopen | ||
| 1227 | _wfindfirst | ||
| 1228 | F32(_wfindfirst32 == _wfindfirst) | ||
| 1229 | _wfindfirst64 | ||
| 1230 | _wfindfirsti64 | ||
| 1231 | F32(_wfindfirst32i64 == _wfindfirsti64) | ||
| 1232 | F64(_wfindfirst64i32 == _wfindfirst) | ||
| 1233 | _wfindnext | ||
| 1234 | F32(_wfindnext32 == _wfindnext) | ||
| 1235 | _wfindnext64 | ||
| 1236 | _wfindnexti64 | ||
| 1237 | F32(_wfindnext32i64 == _wfindnexti64) | ||
| 1238 | F64(_wfindnext64i32 == _wfindnext) | ||
| 1239 | _wfopen | ||
| 1240 | _wfopen_s | ||
| 1241 | _wfreopen | ||
| 1242 | _wfreopen_s | ||
| 1243 | _wfsopen | ||
| 1244 | _wfullpath | ||
| 1245 | F_ARM_ANY(_wfullpath_dbg) | ||
| 1246 | _wgetcwd | ||
| 1247 | _wgetdcwd | ||
| 1248 | _wgetenv | ||
| 1249 | _wgetenv_s | ||
| 1250 | _winmajor DATA | ||
| 1251 | _winminor DATA | ||
| 1252 | _winput_s | ||
| 1253 | F_X86_ANY(_winver DATA) | ||
| 1254 | _wmakepath | ||
| 1255 | _wmakepath_s | ||
| 1256 | _wmkdir | ||
| 1257 | _wmktemp | ||
| 1258 | ; _wmktemp_s replaced by emu | ||
| 1259 | _wopen | ||
| 1260 | _woutput_s | ||
| 1261 | _wperror | ||
| 1262 | _wpgmptr DATA | ||
| 1263 | _wpopen | ||
| 1264 | _wprintf_l | ||
| 1265 | _wprintf_p | ||
| 1266 | _wprintf_p_l | ||
| 1267 | _wprintf_s_l | ||
| 1268 | _wputenv | ||
| 1269 | _wputenv_s | ||
| 1270 | _wremove | ||
| 1271 | _wrename | ||
| 1272 | _write | ||
| 1273 | _wrmdir | ||
| 1274 | _wscanf_l | ||
| 1275 | _wscanf_s_l | ||
| 1276 | _wsearchenv | ||
| 1277 | _wsearchenv_s | ||
| 1278 | _wsetlocale | ||
| 1279 | _wsopen | ||
| 1280 | _wsopen_s | ||
| 1281 | _wspawnl | ||
| 1282 | _wspawnle | ||
| 1283 | _wspawnlp | ||
| 1284 | _wspawnlpe | ||
| 1285 | _wspawnv | ||
| 1286 | _wspawnve | ||
| 1287 | _wspawnvp | ||
| 1288 | _wspawnvpe | ||
| 1289 | _wsplitpath | ||
| 1290 | _wsplitpath_s | ||
| 1291 | _wstat | ||
| 1292 | _wstat64 | ||
| 1293 | _wstati64 | ||
| 1294 | F32(_wstat32 == _wstat) | ||
| 1295 | F64(_wstat64i32 == _wstat) | ||
| 1296 | _wstrdate | ||
| 1297 | ; _wstrdate_s replaced by emu | ||
| 1298 | _wstrtime | ||
| 1299 | ; _wstrtime_s replaced by emu | ||
| 1300 | _wsystem | ||
| 1301 | _wtempnam | ||
| 1302 | F_ARM_ANY(_wtempnam_dbg) | ||
| 1303 | _wtmpnam | ||
| 1304 | _wtmpnam_s | ||
| 1305 | _wtof | ||
| 1306 | _wtof_l | ||
| 1307 | _wtoi | ||
| 1308 | _wtoi64 | ||
| 1309 | _wtoi64_l | ||
| 1310 | _wtoi_l | ||
| 1311 | _wtol | ||
| 1312 | _wtol_l | ||
| 1313 | _wunlink | ||
| 1314 | _wutime | ||
| 1315 | F_I386(_wutime32 == _wutime) | ||
| 1316 | F_NON_I386(_wutime32) | ||
| 1317 | _wutime64 | ||
| 1318 | _y0 | ||
| 1319 | _y1 | ||
| 1320 | _yn | ||
| 1321 | abort | ||
| 1322 | abs | ||
| 1323 | acos | ||
| 1324 | F_NON_I386(acosf F_X86_ANY(DATA)) | ||
| 1325 | F_ARM_ANY(acosl == acos) | ||
| 1326 | asctime | ||
| 1327 | ; asctime_s replaced by emu | ||
| 1328 | asin | ||
| 1329 | F_NON_I386(asinf F_X86_ANY(DATA)) | ||
| 1330 | F_ARM_ANY(asinl == asin) | ||
| 1331 | atan | ||
| 1332 | atan2 F_X86_ANY(DATA) | ||
| 1333 | F_NON_I386(atan2f F_X86_ANY(DATA)) | ||
| 1334 | F_ARM_ANY(atan2l == atan2) | ||
| 1335 | F_NON_I386(atanf F_X86_ANY(DATA)) | ||
| 1336 | F_ARM_ANY(atanl == atan) | ||
| 1337 | atexit DATA | ||
| 1338 | atof | ||
| 1339 | atoi | ||
| 1340 | atol | ||
| 1341 | bsearch | ||
| 1342 | bsearch_s | ||
| 1343 | F_ARM_ANY(btowc) | ||
| 1344 | calloc | ||
| 1345 | ceil F_X86_ANY(DATA) | ||
| 1346 | F_NON_I386(ceilf F_X86_ANY(DATA)) | ||
| 1347 | F_ARM_ANY(ceill == ceil) | ||
| 1348 | clearerr | ||
| 1349 | clearerr_s | ||
| 1350 | clock | ||
| 1351 | cos F_X86_ANY(DATA) | ||
| 1352 | F_NON_I386(cosf F_X86_ANY(DATA)) | ||
| 1353 | F_ARM_ANY(cosl == cos) | ||
| 1354 | cosh | ||
| 1355 | F_NON_I386(coshf DATA) | ||
| 1356 | ctime | ||
| 1357 | difftime | ||
| 1358 | div | ||
| 1359 | exit | ||
| 1360 | exp F_X86_ANY(DATA) | ||
| 1361 | F_NON_I386(expf F_X86_ANY(DATA)) | ||
| 1362 | F_ARM_ANY(expl == exp) | ||
| 1363 | fabs DATA | ||
| 1364 | F_ARM_ANY(fabsf) | ||
| 1365 | fclose | ||
| 1366 | feof | ||
| 1367 | ferror | ||
| 1368 | fflush | ||
| 1369 | fgetc | ||
| 1370 | fgetpos | ||
| 1371 | fgets | ||
| 1372 | fgetwc | ||
| 1373 | fgetws | ||
| 1374 | floor F_X86_ANY(DATA) | ||
| 1375 | F_NON_I386(floorf F_X86_ANY(DATA)) | ||
| 1376 | F_ARM_ANY(floorl == floor) | ||
| 1377 | fmod F_X86_ANY(DATA) | ||
| 1378 | F_NON_I386(fmodf F_X86_ANY(DATA)) | ||
| 1379 | F_ARM_ANY(fmodl == fmod) | ||
| 1380 | fopen | ||
| 1381 | fopen_s | ||
| 1382 | fprintf | ||
| 1383 | __ms_fprintf == fprintf | ||
| 1384 | fprintf_s | ||
| 1385 | fputc | ||
| 1386 | fputs | ||
| 1387 | fputwc | ||
| 1388 | fputws | ||
| 1389 | fread | ||
| 1390 | free | ||
| 1391 | freopen | ||
| 1392 | freopen_s | ||
| 1393 | frexp DATA | ||
| 1394 | fscanf | ||
| 1395 | __ms_fscanf == fscanf | ||
| 1396 | fscanf_s | ||
| 1397 | fseek | ||
| 1398 | fsetpos | ||
| 1399 | ftell | ||
| 1400 | fwprintf | ||
| 1401 | __ms_fwprintf == fwprintf | ||
| 1402 | fwprintf_s | ||
| 1403 | fwrite | ||
| 1404 | fwscanf | ||
| 1405 | __ms_fwscanf == fwscanf | ||
| 1406 | fwscanf_s | ||
| 1407 | getc | ||
| 1408 | getchar | ||
| 1409 | getenv | ||
| 1410 | getenv_s | ||
| 1411 | F_X86_ANY(gets) | ||
| 1412 | getwc | ||
| 1413 | getwchar | ||
| 1414 | gmtime | ||
| 1415 | is_wctype | ||
| 1416 | isalnum | ||
| 1417 | isalpha | ||
| 1418 | iscntrl | ||
| 1419 | isdigit | ||
| 1420 | isgraph | ||
| 1421 | isleadbyte | ||
| 1422 | islower | ||
| 1423 | isprint | ||
| 1424 | ispunct | ||
| 1425 | isspace | ||
| 1426 | isupper | ||
| 1427 | iswalnum | ||
| 1428 | iswalpha | ||
| 1429 | iswascii | ||
| 1430 | iswcntrl | ||
| 1431 | iswctype | ||
| 1432 | iswdigit | ||
| 1433 | iswgraph | ||
| 1434 | iswlower | ||
| 1435 | iswprint | ||
| 1436 | iswpunct | ||
| 1437 | iswspace | ||
| 1438 | iswupper | ||
| 1439 | iswxdigit | ||
| 1440 | isxdigit | ||
| 1441 | labs | ||
| 1442 | ldexp F_X86_ANY(DATA) | ||
| 1443 | ldiv | ||
| 1444 | localeconv | ||
| 1445 | localtime | ||
| 1446 | log F_X86_ANY(DATA) | ||
| 1447 | log10 | ||
| 1448 | F_NON_I386(log10f F_X86_ANY(DATA)) | ||
| 1449 | F_ARM_ANY(log10l == log10) | ||
| 1450 | F_NON_I386(logf F_X86_ANY(DATA)) | ||
| 1451 | F_ARM_ANY(logl == log) | ||
| 1452 | longjmp | ||
| 1453 | malloc | ||
| 1454 | mblen | ||
| 1455 | F_ARM_ANY(mbrlen) | ||
| 1456 | F_ARM_ANY(mbrtowc) | ||
| 1457 | F_ARM_ANY(mbsdup_dbg) | ||
| 1458 | F_ARM_ANY(mbsrtowcs) | ||
| 1459 | mbsrtowcs_s | ||
| 1460 | mbstowcs | ||
| 1461 | mbstowcs_s | ||
| 1462 | mbtowc | ||
| 1463 | memchr | ||
| 1464 | memcmp | ||
| 1465 | memcpy | ||
| 1466 | ; memcpy_s replaced by emu | ||
| 1467 | memmove | ||
| 1468 | ; memmove_s replaced by emu | ||
| 1469 | memset | ||
| 1470 | mktime | ||
| 1471 | modf DATA | ||
| 1472 | F_NON_I386(modff DATA) | ||
| 1473 | perror | ||
| 1474 | pow DATA | ||
| 1475 | F_NON_I386(powf DATA) | ||
| 1476 | printf | ||
| 1477 | __ms_printf == printf | ||
| 1478 | printf_s | ||
| 1479 | putc | ||
| 1480 | putchar | ||
| 1481 | puts | ||
| 1482 | putwc | ||
| 1483 | putwchar | ||
| 1484 | qsort | ||
| 1485 | qsort_s | ||
| 1486 | raise | ||
| 1487 | rand | ||
| 1488 | ; rand_s replaced by emu | ||
| 1489 | realloc | ||
| 1490 | remove | ||
| 1491 | rename | ||
| 1492 | rewind | ||
| 1493 | scanf | ||
| 1494 | __ms_scanf == scanf | ||
| 1495 | scanf_s | ||
| 1496 | setbuf | ||
| 1497 | F_NON_I386(setjmp) | ||
| 1498 | setlocale | ||
| 1499 | setvbuf | ||
| 1500 | signal | ||
| 1501 | sin F_X86_ANY(DATA) | ||
| 1502 | F_NON_I386(sinf F_X86_ANY(DATA)) | ||
| 1503 | F_ARM_ANY(sinl == sin) | ||
| 1504 | ; if we implement sinh, we can set it DATA only. | ||
| 1505 | sinh | ||
| 1506 | F_NON_I386(sinhf DATA) | ||
| 1507 | sprintf | ||
| 1508 | __ms_sprintf == sprintf | ||
| 1509 | ; sprintf_s replaced by emu | ||
| 1510 | sqrt DATA | ||
| 1511 | F_NON_I386(sqrtf DATA) | ||
| 1512 | srand | ||
| 1513 | sscanf | ||
| 1514 | __ms_sscanf == sscanf | ||
| 1515 | sscanf_s | ||
| 1516 | strcat | ||
| 1517 | strcat_s | ||
| 1518 | strchr | ||
| 1519 | strcmp | ||
| 1520 | strcoll | ||
| 1521 | strcpy | ||
| 1522 | strcpy_s | ||
| 1523 | strcspn | ||
| 1524 | strerror | ||
| 1525 | ; strerror_s replaced by emu | ||
| 1526 | strftime | ||
| 1527 | strlen | ||
| 1528 | strncat | ||
| 1529 | strncat_s | ||
| 1530 | strncmp | ||
| 1531 | strncpy | ||
| 1532 | strncpy_s | ||
| 1533 | ; strnlen replaced by emu | ||
| 1534 | strpbrk | ||
| 1535 | strrchr | ||
| 1536 | strspn | ||
| 1537 | strstr | ||
| 1538 | strtod | ||
| 1539 | strtok | ||
| 1540 | strtok_s | ||
| 1541 | strtol | ||
| 1542 | strtoul | ||
| 1543 | strxfrm | ||
| 1544 | swprintf | ||
| 1545 | __ms_swprintf == swprintf | ||
| 1546 | swprintf_s | ||
| 1547 | swscanf | ||
| 1548 | __ms_swscanf == swscanf | ||
| 1549 | swscanf_s | ||
| 1550 | system | ||
| 1551 | tan | ||
| 1552 | F_NON_I386(tanf F_X86_ANY(DATA)) | ||
| 1553 | F_ARM_ANY(tanl == tan) | ||
| 1554 | ; if we implement tanh, we can set it to DATA only. | ||
| 1555 | tanh | ||
| 1556 | F_ARM_ANY(tanhf) | ||
| 1557 | time F_NON_I386(== _time64) | ||
| 1558 | tmpfile | ||
| 1559 | tmpfile_s | ||
| 1560 | tmpnam | ||
| 1561 | tmpnam_s | ||
| 1562 | tolower | ||
| 1563 | toupper | ||
| 1564 | towlower | ||
| 1565 | towupper | ||
| 1566 | ungetc | ||
| 1567 | ungetwc | ||
| 1568 | F_ARM_ANY(utime) | ||
| 1569 | vfprintf | ||
| 1570 | __ms_vfprintf == vfprintf | ||
| 1571 | vfprintf_s | ||
| 1572 | vfwprintf | ||
| 1573 | __ms_vfwprintf == vfwprintf | ||
| 1574 | vfwprintf_s | ||
| 1575 | vprintf | ||
| 1576 | __ms_vprintf == vprintf | ||
| 1577 | vprintf_s | ||
| 1578 | vsprintf | ||
| 1579 | __ms_vsprintf == vsprintf | ||
| 1580 | ; vsprintf_s replaced by emu | ||
| 1581 | vswprintf | ||
| 1582 | __ms_vswprintf == vswprintf | ||
| 1583 | vswprintf_s | ||
| 1584 | vwprintf | ||
| 1585 | __ms_vwprintf == vwprintf | ||
| 1586 | vwprintf_s | ||
| 1587 | F_ARM_ANY(wcrtomb) | ||
| 1588 | wcrtomb_s | ||
| 1589 | wcscat | ||
| 1590 | wcscat_s | ||
| 1591 | wcschr | ||
| 1592 | wcscmp | ||
| 1593 | wcscoll | ||
| 1594 | wcscpy | ||
| 1595 | wcscpy_s | ||
| 1596 | wcscspn | ||
| 1597 | wcsftime | ||
| 1598 | wcslen | ||
| 1599 | wcsncat | ||
| 1600 | wcsncat_s | ||
| 1601 | wcsncmp | ||
| 1602 | wcsncpy | ||
| 1603 | wcsncpy_s | ||
| 1604 | ; We provide replacement implementation in libmingwex | ||
| 1605 | wcsnlen DATA | ||
| 1606 | wcspbrk | ||
| 1607 | wcsrchr | ||
| 1608 | F_ARM_ANY(wcsrtombs) | ||
| 1609 | wcsrtombs_s | ||
| 1610 | wcsspn | ||
| 1611 | wcsstr | ||
| 1612 | wcstod | ||
| 1613 | wcstok | ||
| 1614 | wcstok_s | ||
| 1615 | wcstol | ||
| 1616 | wcstombs | ||
| 1617 | wcstombs_s | ||
| 1618 | wcstoul | ||
| 1619 | wcsxfrm | ||
| 1620 | F_ARM_ANY(wctob) | ||
| 1621 | wctomb | ||
| 1622 | wctomb_s | ||
| 1623 | wprintf | ||
| 1624 | __ms_wprintf == wprintf | ||
| 1625 | wprintf_s | ||
| 1626 | wscanf | ||
| 1627 | __ms_wscanf == wscanf | ||
| 1628 | wscanf_s | ||
lib/libc/mingw/lib32/crtdll.def.in deleted-726| ... | @@ -1,726 +0,0 @@ | ||
| 1 | ; | ||
| 2 | ;* crtdll.def | ||
| 3 | ;* This file has no copyright assigned and is placed in the Public Domain. | ||
| 4 | ;* This file is part of the mingw-runtime package. | ||
| 5 | ;* No warranty is given; refer to the file DISCLAIMER.PD within the package. | ||
| 6 | ; | ||
| 7 | ; Exports from crtdll.dll from Windows 95 SYSTEM directory. Hopefully this | ||
| 8 | ; should also work with the crtdll provided with Windows NT. | ||
| 9 | ; | ||
| 10 | ; NOTE: The crtdll is OBSOLETE and msvcrt should be used instead. The msvcrt | ||
| 11 | ; is available for free download from Microsoft Corporation and will work on | ||
| 12 | ; Windows 95. Support for the crtdll is deprecated and this file may be | ||
| 13 | ; deleted in future versions. | ||
| 14 | ; | ||
| 15 | ; These three functions appear to be name mangled in some way, so GCC is | ||
| 16 | ; probably not going to be able to use them in any case. | ||
| 17 | ; | ||
| 18 | ; ??2@YAPAXI@Z | ||
| 19 | ; ??3@YAXPAX@Z | ||
| 20 | ; ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z | ||
| 21 | ; | ||
| 22 | ; These are functions for which I have not yet written prototypes or | ||
| 23 | ; otherwise set up (they are still included below though unlike those | ||
| 24 | ; first three). | ||
| 25 | ; | ||
| 26 | ; _CIacos | ||
| 27 | ; _CIasin | ||
| 28 | ; _CIatan | ||
| 29 | ; _CIatan2 | ||
| 30 | ; _CIcos | ||
| 31 | ; _CIcosh | ||
| 32 | ; _CIexp | ||
| 33 | ; _CIfmod | ||
| 34 | ; _CIlog | ||
| 35 | ; _CIlog10 | ||
| 36 | ; _CIpow | ||
| 37 | ; _CIsin | ||
| 38 | ; _CIsinh | ||
| 39 | ; _CIsqrt | ||
| 40 | ; _CItan | ||
| 41 | ; _CItanh | ||
| 42 | ; __dllonexit | ||
| 43 | ; __mb_cur_max_dll | ||
| 44 | ; __threadhandle | ||
| 45 | ; __threadid | ||
| 46 | ; _abnormal_termination | ||
| 47 | ; _acmdln_dll | ||
| 48 | ; _aexit_rtn_dll | ||
| 49 | ; _amsg_exit | ||
| 50 | ; _commit | ||
| 51 | ; _commode_dll | ||
| 52 | ; _cpumode_dll | ||
| 53 | ; _ctype | ||
| 54 | ; _expand | ||
| 55 | ; _fcloseall | ||
| 56 | ; _filbuf | ||
| 57 | ; _fileinfo_dll | ||
| 58 | ; _flsbuf | ||
| 59 | ; _flushall | ||
| 60 | ; _fmode_dll | ||
| 61 | ; _fpieee_flt | ||
| 62 | ; _fsopen | ||
| 63 | ; _ftol | ||
| 64 | ; _getdiskfree | ||
| 65 | ; _getdllprocaddr | ||
| 66 | ; _getdrive | ||
| 67 | ; _getdrives | ||
| 68 | ; _getsystime | ||
| 69 | ; _initterm | ||
| 70 | ; _ismbbalnum | ||
| 71 | ; _ismbbalpha | ||
| 72 | ; _ismbbgraph | ||
| 73 | ; _ismbbkalnum | ||
| 74 | ; _ismbbkana | ||
| 75 | ; _ismbbkpunct | ||
| 76 | ; _ismbblead | ||
| 77 | ; _ismbbprint | ||
| 78 | ; _ismbbpunct | ||
| 79 | ; _ismbbtrail | ||
| 80 | ; _ismbcalpha | ||
| 81 | ; _ismbcdigit | ||
| 82 | ; _ismbchira | ||
| 83 | ; _ismbckata | ||
| 84 | ; _ismbcl0 | ||
| 85 | ; _ismbcl1 | ||
| 86 | ; _ismbcl2 | ||
| 87 | ; _ismbclegal | ||
| 88 | ; _ismbclower | ||
| 89 | ; _ismbcprint | ||
| 90 | ; _ismbcspace | ||
| 91 | ; _ismbcsymbol | ||
| 92 | ; _ismbcupper | ||
| 93 | ; _ismbslead | ||
| 94 | ; _ismbstrail | ||
| 95 | ; _lfind | ||
| 96 | ; _loaddll | ||
| 97 | ; _lrotl | ||
| 98 | ; _lrotr | ||
| 99 | ; _lsearch | ||
| 100 | ; _makepath | ||
| 101 | ; _matherr | ||
| 102 | ; _mbbtombc | ||
| 103 | ; _mbbtype | ||
| 104 | ; _mbccpy | ||
| 105 | ; _mbcjistojms | ||
| 106 | ; _mbcjmstojis | ||
| 107 | ; _mbclen | ||
| 108 | ; _mbctohira | ||
| 109 | ; _mbctokata | ||
| 110 | ; _mbctolower | ||
| 111 | ; _mbctombb | ||
| 112 | ; _mbctoupper | ||
| 113 | ; _mbctype | ||
| 114 | ; _mbsbtype | ||
| 115 | ; _mbscat | ||
| 116 | ; _mbscmp | ||
| 117 | ; _mbscpy | ||
| 118 | ; _mbscspn | ||
| 119 | ; _mbsdec | ||
| 120 | ; _mbsdup | ||
| 121 | ; _mbsicmp | ||
| 122 | ; _mbsinc | ||
| 123 | ; _mbslen | ||
| 124 | ; _mbslwr | ||
| 125 | ; _mbsnbcat | ||
| 126 | ; _mbsnbcmp | ||
| 127 | ; _mbsnbcnt | ||
| 128 | ; _mbsnbcpy | ||
| 129 | ; _mbsnbicmp | ||
| 130 | ; _mbsnbset | ||
| 131 | ; _mbsnccnt | ||
| 132 | ; _mbsncmp | ||
| 133 | ; _mbsncpy | ||
| 134 | ; _mbsnextc | ||
| 135 | ; _mbsnicmp | ||
| 136 | ; _mbsninc | ||
| 137 | ; _mbsnset | ||
| 138 | ; _mbspbrk | ||
| 139 | ; _mbsrchr | ||
| 140 | ; _mbsrev | ||
| 141 | ; _mbsset | ||
| 142 | ; _mbsspn | ||
| 143 | ; _mbsspnp | ||
| 144 | ; _mbsstr | ||
| 145 | ; _mbstrlen | ||
| 146 | ; _mbsupr | ||
| 147 | ; _onexit | ||
| 148 | ; _osversion_dll | ||
| 149 | ; _pctype_dll | ||
| 150 | ; _purecall | ||
| 151 | ; _pwctype_dll | ||
| 152 | ; _rmtmp | ||
| 153 | ; _rotl | ||
| 154 | ; _rotr | ||
| 155 | ; _setsystime | ||
| 156 | ; _snprintf | ||
| 157 | ; _snwprintf | ||
| 158 | ; _splitpath | ||
| 159 | ; _strdate | ||
| 160 | ; _strdec | ||
| 161 | ; _strinc | ||
| 162 | ; _strncnt | ||
| 163 | ; _strnextc | ||
| 164 | ; _strninc | ||
| 165 | ; _strspnp | ||
| 166 | ; _strtime | ||
| 167 | ; _tempnam | ||
| 168 | ; _ultoa | ||
| 169 | ; _unloaddll | ||
| 170 | ; _vsnprintf | ||
| 171 | ; _vsnwprintf | ||
| 172 | ; _wtoi | ||
| 173 | ; _wtol | ||
| 174 | ; | ||
| 175 | LIBRARY "crtdll.dll" | ||
| 176 | EXPORTS | ||
| 177 | |||
| 178 | #include "msvcrt-common.def.in" | ||
| 179 | |||
| 180 | _CIacos | ||
| 181 | _CIasin | ||
| 182 | _CIatan | ||
| 183 | _CIatan2 | ||
| 184 | _CIcos | ||
| 185 | _CIcosh | ||
| 186 | _CIexp | ||
| 187 | _CIfmod | ||
| 188 | _CIlog | ||
| 189 | _CIlog10 | ||
| 190 | _CIpow | ||
| 191 | _CIsin | ||
| 192 | _CIsinh | ||
| 193 | _CIsqrt | ||
| 194 | _CItan | ||
| 195 | _CItanh | ||
| 196 | _HUGE_dll DATA | ||
| 197 | _HUGE DATA == _HUGE_dll | ||
| 198 | _XcptFilter | ||
| 199 | __GetMainArgs | ||
| 200 | __argc_dll DATA | ||
| 201 | __argc DATA == __argc_dll | ||
| 202 | __argv_dll DATA | ||
| 203 | __argv DATA == __argv_dll | ||
| 204 | __dllonexit | ||
| 205 | __doserrno | ||
| 206 | __fpecode | ||
| 207 | __isascii | ||
| 208 | __iscsym | ||
| 209 | __iscsymf | ||
| 210 | __mb_cur_max_dll DATA | ||
| 211 | __mb_cur_max DATA == __mb_cur_max_dll | ||
| 212 | __pxcptinfoptrs | ||
| 213 | __threadhandle | ||
| 214 | __threadid | ||
| 215 | __toascii | ||
| 216 | _abnormal_termination | ||
| 217 | _access | ||
| 218 | _acmdln_dll DATA | ||
| 219 | _acmdln DATA == _acmdln_dll | ||
| 220 | _aexit_rtn_dll DATA | ||
| 221 | _aexit_rtn DATA == _aexit_rtn_dll | ||
| 222 | _amsg_exit | ||
| 223 | _assert | ||
| 224 | _basemajor_dll DATA | ||
| 225 | _baseminor_dll DATA | ||
| 226 | _baseversion_dll DATA | ||
| 227 | _beep | ||
| 228 | _beginthread | ||
| 229 | _c_exit | ||
| 230 | _cabs DATA | ||
| 231 | _cexit | ||
| 232 | _cgets | ||
| 233 | _chdir | ||
| 234 | _chdrive | ||
| 235 | _chgsign | ||
| 236 | _chmod | ||
| 237 | _chsize | ||
| 238 | _clearfp | ||
| 239 | _close | ||
| 240 | _commit | ||
| 241 | _commode_dll DATA | ||
| 242 | _commode DATA == _commode_dll | ||
| 243 | _control87 | ||
| 244 | _controlfp | ||
| 245 | _copysign | ||
| 246 | _cprintf | ||
| 247 | _cpumode_dll DATA | ||
| 248 | _cputs | ||
| 249 | _creat | ||
| 250 | _cscanf | ||
| 251 | _ctype DATA | ||
| 252 | _cwait | ||
| 253 | _daylight_dll DATA | ||
| 254 | _daylight DATA == _daylight_dll | ||
| 255 | _dup | ||
| 256 | _dup2 | ||
| 257 | _ecvt | ||
| 258 | _endthread | ||
| 259 | _environ_dll DATA | ||
| 260 | _environ DATA == _environ_dll | ||
| 261 | _eof | ||
| 262 | _errno | ||
| 263 | _except_handler2 | ||
| 264 | _execl | ||
| 265 | _execle | ||
| 266 | _execlp | ||
| 267 | _execlpe | ||
| 268 | _execv | ||
| 269 | _execve | ||
| 270 | _execvp | ||
| 271 | _execvpe | ||
| 272 | _exit | ||
| 273 | _expand | ||
| 274 | _fcloseall | ||
| 275 | _fcvt | ||
| 276 | _fdopen | ||
| 277 | _fgetchar | ||
| 278 | _fgetwchar | ||
| 279 | _filbuf | ||
| 280 | _fileinfo_dll DATA | ||
| 281 | _fileinfo DATA == _fileinfo_dll | ||
| 282 | _filelength | ||
| 283 | _fileno | ||
| 284 | _findclose | ||
| 285 | _findfirst | ||
| 286 | _findnext | ||
| 287 | _finite | ||
| 288 | _flsbuf | ||
| 289 | _flushall | ||
| 290 | _fmode_dll DATA | ||
| 291 | _fmode DATA == _fmode_dll | ||
| 292 | _fpclass | ||
| 293 | _fpieee_flt | ||
| 294 | _fpreset DATA | ||
| 295 | _fputchar | ||
| 296 | _fputwchar | ||
| 297 | _fsopen | ||
| 298 | _fstat | ||
| 299 | _ftime | ||
| 300 | _ftol | ||
| 301 | _fullpath | ||
| 302 | _futime | ||
| 303 | _gcvt | ||
| 304 | _get_osfhandle | ||
| 305 | _getch | ||
| 306 | _getche | ||
| 307 | _getcwd | ||
| 308 | _getdcwd | ||
| 309 | _getdiskfree | ||
| 310 | _getdllprocaddr | ||
| 311 | _getdrive | ||
| 312 | _getdrives | ||
| 313 | _getpid | ||
| 314 | _getsystime | ||
| 315 | _getw | ||
| 316 | _global_unwind2 | ||
| 317 | _heapchk | ||
| 318 | _heapmin | ||
| 319 | _heapset | ||
| 320 | _heapwalk | ||
| 321 | _hypot | ||
| 322 | _initterm | ||
| 323 | _iob DATA | ||
| 324 | _isatty | ||
| 325 | _isctype | ||
| 326 | _ismbbalnum | ||
| 327 | _ismbbalpha | ||
| 328 | _ismbbgraph | ||
| 329 | _ismbbkalnum | ||
| 330 | _ismbbkana | ||
| 331 | _ismbbkpunct | ||
| 332 | _ismbblead | ||
| 333 | _ismbbprint | ||
| 334 | _ismbbpunct | ||
| 335 | _ismbbtrail | ||
| 336 | _ismbcalpha | ||
| 337 | _ismbcdigit | ||
| 338 | _ismbchira | ||
| 339 | _ismbckata | ||
| 340 | _ismbcl0 | ||
| 341 | _ismbcl1 | ||
| 342 | _ismbcl2 | ||
| 343 | _ismbclegal | ||
| 344 | _ismbclower | ||
| 345 | _ismbcprint | ||
| 346 | _ismbcspace | ||
| 347 | _ismbcsymbol | ||
| 348 | _ismbcupper | ||
| 349 | _ismbslead | ||
| 350 | _ismbstrail | ||
| 351 | _isnan | ||
| 352 | _itoa | ||
| 353 | _j0 | ||
| 354 | _j1 | ||
| 355 | _jn | ||
| 356 | _kbhit | ||
| 357 | _lfind | ||
| 358 | _loaddll | ||
| 359 | _local_unwind2 | ||
| 360 | _locking | ||
| 361 | _logb | ||
| 362 | _lrotl | ||
| 363 | _lrotr | ||
| 364 | _lsearch | ||
| 365 | _lseek | ||
| 366 | _ltoa | ||
| 367 | _makepath | ||
| 368 | _matherr | ||
| 369 | _mbbtombc | ||
| 370 | _mbbtype | ||
| 371 | _mbccpy | ||
| 372 | _mbcjistojms | ||
| 373 | _mbcjmstojis | ||
| 374 | _mbclen | ||
| 375 | _mbctohira | ||
| 376 | _mbctokata | ||
| 377 | _mbctolower | ||
| 378 | _mbctombb | ||
| 379 | _mbctoupper | ||
| 380 | _mbctype DATA | ||
| 381 | _mbsbtype | ||
| 382 | _mbscat | ||
| 383 | _mbschr | ||
| 384 | _mbscmp | ||
| 385 | _mbscpy | ||
| 386 | _mbscspn | ||
| 387 | _mbsdec | ||
| 388 | _mbsdup | ||
| 389 | _mbsicmp | ||
| 390 | _mbsinc | ||
| 391 | _mbslen | ||
| 392 | _mbslwr | ||
| 393 | _mbsnbcat | ||
| 394 | _mbsnbcmp | ||
| 395 | _mbsnbcnt | ||
| 396 | _mbsnbcpy | ||
| 397 | _mbsnbicmp | ||
| 398 | _mbsnbset | ||
| 399 | _mbsncat | ||
| 400 | _mbsnccnt | ||
| 401 | _mbsncmp | ||
| 402 | _mbsncpy | ||
| 403 | _mbsnextc | ||
| 404 | _mbsnicmp | ||
| 405 | _mbsninc | ||
| 406 | _mbsnset | ||
| 407 | _mbspbrk | ||
| 408 | _mbsrchr | ||
| 409 | _mbsrev | ||
| 410 | _mbsset | ||
| 411 | _mbsspn | ||
| 412 | _mbsspnp | ||
| 413 | _mbsstr | ||
| 414 | _mbstok | ||
| 415 | _mbstrlen | ||
| 416 | _mbsupr | ||
| 417 | _memccpy | ||
| 418 | _memicmp | ||
| 419 | _mkdir | ||
| 420 | _mktemp | ||
| 421 | _msize | ||
| 422 | _nextafter | ||
| 423 | _onexit | ||
| 424 | _open | ||
| 425 | _open_osfhandle | ||
| 426 | _osmajor_dll DATA | ||
| 427 | _osminor_dll DATA | ||
| 428 | _osmode_dll DATA | ||
| 429 | _osver_dll DATA | ||
| 430 | _osver DATA == _osver_dll | ||
| 431 | _osversion_dll DATA | ||
| 432 | _pclose | ||
| 433 | _pctype_dll DATA | ||
| 434 | _pctype DATA == _pctype_dll | ||
| 435 | _pgmptr_dll DATA | ||
| 436 | _pgmptr DATA == _pgmptr_dll | ||
| 437 | _pipe | ||
| 438 | _popen | ||
| 439 | _purecall | ||
| 440 | _putch | ||
| 441 | _putenv | ||
| 442 | _putw | ||
| 443 | _pwctype_dll DATA | ||
| 444 | _pwctype DATA == _pwctype_dll | ||
| 445 | _read | ||
| 446 | _rmdir | ||
| 447 | _rmtmp | ||
| 448 | _rotl | ||
| 449 | _rotr | ||
| 450 | _scalb | ||
| 451 | _searchenv | ||
| 452 | _seterrormode | ||
| 453 | _setjmp | ||
| 454 | _setmode | ||
| 455 | _setsystime | ||
| 456 | _sleep | ||
| 457 | _snprintf | ||
| 458 | _snwprintf | ||
| 459 | _sopen | ||
| 460 | _spawnl | ||
| 461 | _spawnle | ||
| 462 | _spawnlp | ||
| 463 | _spawnlpe | ||
| 464 | _spawnv | ||
| 465 | _spawnve | ||
| 466 | _spawnvp | ||
| 467 | _spawnvpe | ||
| 468 | _splitpath | ||
| 469 | _stat | ||
| 470 | _statusfp | ||
| 471 | _strcmpi | ||
| 472 | _strdate | ||
| 473 | _strdec | ||
| 474 | _strdup | ||
| 475 | _strerror | ||
| 476 | _stricmp | ||
| 477 | _stricoll | ||
| 478 | _strinc | ||
| 479 | _strlwr | ||
| 480 | strlwr == _strlwr | ||
| 481 | _strncnt | ||
| 482 | _strnextc | ||
| 483 | _strnicmp | ||
| 484 | _strninc | ||
| 485 | _strnset | ||
| 486 | _strrev | ||
| 487 | _strset | ||
| 488 | _strspnp | ||
| 489 | _strtime | ||
| 490 | _strupr | ||
| 491 | _swab | ||
| 492 | _sys_errlist DATA | ||
| 493 | _sys_nerr_dll DATA | ||
| 494 | _sys_nerr DATA == _sys_nerr_dll | ||
| 495 | _tell | ||
| 496 | _tempnam | ||
| 497 | _timezone_dll DATA | ||
| 498 | _timezone DATA == _timezone_dll | ||
| 499 | _tolower | ||
| 500 | _toupper | ||
| 501 | _tzname DATA | ||
| 502 | _tzset | ||
| 503 | _ultoa | ||
| 504 | _umask | ||
| 505 | _ungetch | ||
| 506 | _unlink | ||
| 507 | _unloaddll | ||
| 508 | _utime | ||
| 509 | _vsnprintf | ||
| 510 | _vsnwprintf | ||
| 511 | _wcsdup | ||
| 512 | _wcsicmp | ||
| 513 | _wcsicoll | ||
| 514 | _wcslwr | ||
| 515 | wcslwr == _wcslwr | ||
| 516 | _wcsnicmp | ||
| 517 | _wcsnset | ||
| 518 | _wcsrev | ||
| 519 | _wcsset | ||
| 520 | _wcsupr | ||
| 521 | _winmajor_dll DATA | ||
| 522 | _winmajor DATA == _winmajor_dll | ||
| 523 | _winminor_dll DATA | ||
| 524 | _winminor DATA == _winminor_dll | ||
| 525 | _winver_dll DATA | ||
| 526 | _winver DATA == _winver_dll | ||
| 527 | _write | ||
| 528 | _wtoi | ||
| 529 | _wtol | ||
| 530 | _y0 | ||
| 531 | _y1 | ||
| 532 | _yn | ||
| 533 | abort | ||
| 534 | abs | ||
| 535 | acos | ||
| 536 | asctime | ||
| 537 | asin DATA | ||
| 538 | atan DATA | ||
| 539 | atan2 DATA | ||
| 540 | atexit DATA | ||
| 541 | atof | ||
| 542 | atoi | ||
| 543 | atol | ||
| 544 | bsearch | ||
| 545 | calloc | ||
| 546 | ceil | ||
| 547 | clearerr | ||
| 548 | clock | ||
| 549 | cos DATA | ||
| 550 | cosh | ||
| 551 | ctime DATA | ||
| 552 | ;_ctime32 = ctime | ||
| 553 | difftime | ||
| 554 | div | ||
| 555 | exit | ||
| 556 | exp DATA | ||
| 557 | fabs DATA | ||
| 558 | fclose | ||
| 559 | feof | ||
| 560 | ferror | ||
| 561 | fflush | ||
| 562 | fgetc | ||
| 563 | fgetpos | ||
| 564 | fgets | ||
| 565 | fgetwc | ||
| 566 | floor | ||
| 567 | fmod | ||
| 568 | fopen | ||
| 569 | fprintf | ||
| 570 | fputc | ||
| 571 | fputs | ||
| 572 | fputwc | ||
| 573 | fread | ||
| 574 | free | ||
| 575 | freopen | ||
| 576 | frexp | ||
| 577 | fscanf | ||
| 578 | fseek | ||
| 579 | fsetpos | ||
| 580 | ftell | ||
| 581 | fwprintf | ||
| 582 | fwrite | ||
| 583 | fwscanf | ||
| 584 | getc | ||
| 585 | getchar | ||
| 586 | getenv | ||
| 587 | gets | ||
| 588 | gmtime DATA | ||
| 589 | ;_gmtime32 = gmtime | ||
| 590 | is_wctype | ||
| 591 | isalnum | ||
| 592 | isalpha | ||
| 593 | iscntrl | ||
| 594 | isdigit | ||
| 595 | isgraph | ||
| 596 | isleadbyte | ||
| 597 | islower | ||
| 598 | isprint | ||
| 599 | ispunct | ||
| 600 | isspace | ||
| 601 | isupper | ||
| 602 | iswalnum | ||
| 603 | iswalpha | ||
| 604 | iswascii | ||
| 605 | iswcntrl | ||
| 606 | iswctype | ||
| 607 | iswdigit | ||
| 608 | iswgraph | ||
| 609 | iswlower | ||
| 610 | iswprint | ||
| 611 | iswpunct | ||
| 612 | iswspace | ||
| 613 | iswupper | ||
| 614 | iswxdigit | ||
| 615 | isxdigit | ||
| 616 | labs | ||
| 617 | ldexp DATA | ||
| 618 | ldiv | ||
| 619 | localeconv | ||
| 620 | localtime DATA | ||
| 621 | ;_localtime32 = localtime | ||
| 622 | log | ||
| 623 | log10 | ||
| 624 | longjmp | ||
| 625 | malloc | ||
| 626 | mblen | ||
| 627 | mbstowcs | ||
| 628 | mbtowc | ||
| 629 | memchr | ||
| 630 | memcmp | ||
| 631 | memcpy | ||
| 632 | memmove | ||
| 633 | memset | ||
| 634 | mktime DATA | ||
| 635 | ;_mktime32 = mktime | ||
| 636 | modf | ||
| 637 | perror | ||
| 638 | pow | ||
| 639 | printf | ||
| 640 | putc | ||
| 641 | putchar | ||
| 642 | puts | ||
| 643 | qsort | ||
| 644 | raise | ||
| 645 | rand | ||
| 646 | realloc | ||
| 647 | remove | ||
| 648 | rename | ||
| 649 | rewind | ||
| 650 | scanf | ||
| 651 | setbuf | ||
| 652 | setlocale | ||
| 653 | setvbuf | ||
| 654 | signal | ||
| 655 | sin | ||
| 656 | sinh | ||
| 657 | sprintf | ||
| 658 | sqrt | ||
| 659 | srand | ||
| 660 | sscanf | ||
| 661 | strcat | ||
| 662 | strchr | ||
| 663 | strcmp | ||
| 664 | strcoll | ||
| 665 | strcpy | ||
| 666 | strcspn | ||
| 667 | strerror | ||
| 668 | strftime | ||
| 669 | strlen | ||
| 670 | strncat | ||
| 671 | strncmp | ||
| 672 | strncpy | ||
| 673 | strpbrk | ||
| 674 | strrchr | ||
| 675 | strspn | ||
| 676 | strstr | ||
| 677 | strtod | ||
| 678 | strtok | ||
| 679 | strtol | ||
| 680 | strtoul | ||
| 681 | strxfrm | ||
| 682 | swprintf | ||
| 683 | swscanf | ||
| 684 | system | ||
| 685 | tan | ||
| 686 | tanh | ||
| 687 | time DATA | ||
| 688 | ;_time32 = time | ||
| 689 | tmpfile | ||
| 690 | tmpnam | ||
| 691 | tolower | ||
| 692 | toupper | ||
| 693 | towlower | ||
| 694 | towupper | ||
| 695 | ungetc | ||
| 696 | ungetwc | ||
| 697 | vfprintf | ||
| 698 | vfwprintf | ||
| 699 | vprintf | ||
| 700 | vsprintf | ||
| 701 | vswprintf | ||
| 702 | vwprintf | ||
| 703 | wcscat | ||
| 704 | wcschr | ||
| 705 | wcscmp | ||
| 706 | wcscoll | ||
| 707 | wcscpy | ||
| 708 | wcscspn | ||
| 709 | wcsftime | ||
| 710 | wcslen | ||
| 711 | wcsncat | ||
| 712 | wcsncmp | ||
| 713 | wcsncpy | ||
| 714 | wcspbrk | ||
| 715 | wcsrchr | ||
| 716 | wcsspn | ||
| 717 | wcsstr | ||
| 718 | wcstod | ||
| 719 | wcstok | ||
| 720 | wcstol | ||
| 721 | wcstombs | ||
| 722 | wcstoul | ||
| 723 | wcsxfrm | ||
| 724 | wctomb | ||
| 725 | wprintf | ||
| 726 | wscanf | ||
lib/libc/mingw/lib32/msvcp60.def deleted-71| ... | @@ -1,71 +0,0 @@ | ||
| 1 | ;Submitted by: Danny Smith <danny_r_smith_2001@yahoo.co.nz> | ||
| 2 | ;Only the C functions are listed. Most of these have been commented out since | ||
| 3 | ;I don't know what they are and can't test them. Some look like data exports | ||
| 4 | ;for C++ math functions (E.G.: _Xbig). | ||
| 5 | LIBRARY MSVCP60.DLL | ||
| 6 | EXPORTS | ||
| 7 | ;_Cosh | ||
| 8 | ;_Denorm | ||
| 9 | ;_Dnorm | ||
| 10 | ;_Dscale | ||
| 11 | ;_Dtest | ||
| 12 | ;_Eps | ||
| 13 | ;_Exp | ||
| 14 | ;_FCosh | ||
| 15 | ;_FDenorm | ||
| 16 | ;_FDnorm | ||
| 17 | ;_FDscale | ||
| 18 | ;_FDtest | ||
| 19 | ;_FEps | ||
| 20 | ;_FExp | ||
| 21 | ;_FInf | ||
| 22 | ;_FNan | ||
| 23 | ;_FRteps | ||
| 24 | ;_FSinh | ||
| 25 | ;_FSnan | ||
| 26 | ;_FXbig | ||
| 27 | ;_Getcoll | ||
| 28 | ;_Getctype | ||
| 29 | ;_Getcvt | ||
| 30 | ;_Hugeval | ||
| 31 | ;_Inf | ||
| 32 | ;_LCosh | ||
| 33 | ;_LDenorm | ||
| 34 | ;_LDscale | ||
| 35 | ;_LDtest | ||
| 36 | ;_LEps | ||
| 37 | ;_LExp | ||
| 38 | ;_LInf | ||
| 39 | ;_LNan | ||
| 40 | ;_LPoly | ||
| 41 | ;_LRteps | ||
| 42 | ;_LSinh | ||
| 43 | ;_LSnan | ||
| 44 | ;_LXbig | ||
| 45 | ;_Mbrtowc | ||
| 46 | ;_Nan | ||
| 47 | ;_Poly | ||
| 48 | ;_Rteps | ||
| 49 | ;_Sinh | ||
| 50 | ;_Snan | ||
| 51 | ;_Stod | ||
| 52 | ;_Stof | ||
| 53 | ;_Stold | ||
| 54 | ;_Strcoll | ||
| 55 | ;_Strxfrm | ||
| 56 | ;_Tolower | ||
| 57 | ;_Toupper | ||
| 58 | ;_Wcrtomb | ||
| 59 | ;__Wcrtomb_lk | ||
| 60 | ;_Xbig | ||
| 61 | |||
| 62 | btowc | ||
| 63 | mbrlen | ||
| 64 | mbrtowc | ||
| 65 | mbsrtowcs | ||
| 66 | towctrans | ||
| 67 | wcrtomb | ||
| 68 | wcsrtombs | ||
| 69 | wctob | ||
| 70 | wctrans | ||
| 71 | wctype | ||
| \ No newline at end of file | |||
lib/libc/mingw/math/arm-common/acosh.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | double acosh(double x) | ||
| 10 | { | ||
| 11 | if (x < 1.0) | ||
| 12 | return NAN; | ||
| 13 | if (isinf(x*x)) | ||
| 14 | return log(2) + log(x); | ||
| 15 | return log(x + sqrt(x*x - 1)); | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/acoshf.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | float acoshf(float x) | ||
| 10 | { | ||
| 11 | if (x < 1.0) | ||
| 12 | return NAN; | ||
| 13 | if (isinf(x*x)) | ||
| 14 | return logf(2) + logf(x); | ||
| 15 | return logf(x + sqrtf(x*x - 1)); | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/acoshl.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | long double acoshl(long double x) | ||
| 10 | { | ||
| 11 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 12 | return acosh(x); | ||
| 13 | #else | ||
| 14 | #error Not supported on your platform yet | ||
| 15 | #endif | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/asinh.c deleted-18| ... | @@ -1,18 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | double asinh(double x) | ||
| 10 | { | ||
| 11 | if (isinf(x*x + 1)) { | ||
| 12 | if (x > 0) | ||
| 13 | return log(2) + log(x); | ||
| 14 | else | ||
| 15 | return -log(2) - log(-x); | ||
| 16 | } | ||
| 17 | return log(x + sqrt(x*x + 1)); | ||
| 18 | } | ||
lib/libc/mingw/math/arm-common/asinhf.c deleted-18| ... | @@ -1,18 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | float asinhf(float x) | ||
| 10 | { | ||
| 11 | if (isinf(x*x + 1)) { | ||
| 12 | if (x > 0) | ||
| 13 | return logf(2) + logf(x); | ||
| 14 | else | ||
| 15 | return -logf(2) - logf(-x); | ||
| 16 | } | ||
| 17 | return logf(x + sqrtf(x*x + 1)); | ||
| 18 | } | ||
lib/libc/mingw/math/arm-common/asinhl.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | long double asinhl(long double x) | ||
| 10 | { | ||
| 11 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 12 | return asinh(x); | ||
| 13 | #else | ||
| 14 | #error Not supported on your platform yet | ||
| 15 | #endif | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/atanh.c deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | double atanh(double x) | ||
| 10 | { | ||
| 11 | if (x > 1 || x < -1) | ||
| 12 | return NAN; | ||
| 13 | if (-1e-6 < x && x < 1e-6) | ||
| 14 | return x + x*x*x/3; | ||
| 15 | else | ||
| 16 | return (log(1 + x) - log(1 - x)) / 2; | ||
| 17 | } | ||
lib/libc/mingw/math/arm-common/atanhf.c deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | float atanhf(float x) | ||
| 10 | { | ||
| 11 | if (x > 1 || x < -1) | ||
| 12 | return NAN; | ||
| 13 | if (-1e-6 < x && x < 1e-6) | ||
| 14 | return x + x*x*x/3; | ||
| 15 | else | ||
| 16 | return (logf(1 + x) - logf(1 - x)) / 2; | ||
| 17 | } | ||
lib/libc/mingw/math/arm-common/atanhl.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | long double atanhl(long double x) | ||
| 10 | { | ||
| 11 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 12 | return atanh(x); | ||
| 13 | #else | ||
| 14 | #error Not supported on your platform yet | ||
| 15 | #endif | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/copysignl.c deleted-11| ... | @@ -1,11 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | long double copysignl(long double x, long double y) | ||
| 9 | { | ||
| 10 | return copysign(x, y); | ||
| 11 | } | ||
lib/libc/mingw/math/arm-common/expm1.c deleted-12| ... | @@ -1,12 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | double expm1(double x) | ||
| 10 | { | ||
| 11 | return exp(x) - 1.0; | ||
| 12 | } | ||
lib/libc/mingw/math/arm-common/expm1f.c deleted-15| ... | @@ -1,15 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | float expm1f(float x) | ||
| 10 | { | ||
| 11 | // Intentionally using double version of exp() here in the float version of | ||
| 12 | // expm1, to preserve as much accuracy as possible in the intermediate | ||
| 13 | // result. | ||
| 14 | return exp(x) - 1.0; | ||
| 15 | } | ||
lib/libc/mingw/math/arm-common/expm1l.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | long double expm1l(long double x) | ||
| 10 | { | ||
| 11 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 12 | return expm1(x); | ||
| 13 | #else | ||
| 14 | #error Not supported on your platform yet | ||
| 15 | #endif | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/ilogb.c deleted-19| ... | @@ -1,19 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <limits.h> | ||
| 9 | |||
| 10 | int ilogb(double x) | ||
| 11 | { | ||
| 12 | if (x == 0.0) | ||
| 13 | return FP_ILOGB0; | ||
| 14 | if (isinf(x)) | ||
| 15 | return INT_MAX; | ||
| 16 | if (isnan(x)) | ||
| 17 | return FP_ILOGBNAN; | ||
| 18 | return (int) logb(x); | ||
| 19 | } | ||
lib/libc/mingw/math/arm-common/ilogbf.c deleted-19| ... | @@ -1,19 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <limits.h> | ||
| 9 | |||
| 10 | int ilogbf(float x) | ||
| 11 | { | ||
| 12 | if (x == 0.0) | ||
| 13 | return FP_ILOGB0; | ||
| 14 | if (isinf(x)) | ||
| 15 | return INT_MAX; | ||
| 16 | if (isnan(x)) | ||
| 17 | return FP_ILOGBNAN; | ||
| 18 | return (int) logbf(x); | ||
| 19 | } | ||
lib/libc/mingw/math/arm-common/ilogbl.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | int ilogbl(long double x) | ||
| 10 | { | ||
| 11 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 12 | return ilogb(x); | ||
| 13 | #else | ||
| 14 | #error Not supported on your platform yet | ||
| 15 | #endif | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/log1p.c deleted-12| ... | @@ -1,12 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | double log1p(double x) | ||
| 10 | { | ||
| 11 | return log(x + 1.0); | ||
| 12 | } | ||
lib/libc/mingw/math/arm-common/log1pf.c deleted-15| ... | @@ -1,15 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | float log1pf(float x) | ||
| 10 | { | ||
| 11 | // Intentionally using double version of log() here in the float version of | ||
| 12 | // log1p, to preserve as much accuracy as possible in the intermediate | ||
| 13 | // parameter. | ||
| 14 | return log(x + 1.0); | ||
| 15 | } | ||
lib/libc/mingw/math/arm-common/log1pl.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | long double log1pl(long double x) | ||
| 10 | { | ||
| 11 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 12 | return log1p(x); | ||
| 13 | #else | ||
| 14 | #error Not supported on your platform yet | ||
| 15 | #endif | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/log2.c deleted-55| ... | @@ -1,55 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <stdint.h> | ||
| 9 | |||
| 10 | typedef union ieee754_double_ { | ||
| 11 | struct __attribute__((__packed__)) { | ||
| 12 | uint64_t f52 : 52; | ||
| 13 | uint64_t exp : 11; | ||
| 14 | uint64_t sgn : 1; | ||
| 15 | }; | ||
| 16 | double f; | ||
| 17 | } ieee754_double; | ||
| 18 | |||
| 19 | typedef union ieee754_float_ { | ||
| 20 | struct __attribute__((__packed__)) { | ||
| 21 | uint32_t f23 : 23; | ||
| 22 | uint32_t exp : 8; | ||
| 23 | uint32_t sgn : 1; | ||
| 24 | }; | ||
| 25 | float f; | ||
| 26 | } ieee754_float; | ||
| 27 | |||
| 28 | double log2(double x) | ||
| 29 | { | ||
| 30 | ieee754_double u = { .f = x }; | ||
| 31 | if (u.sgn == 0 && u.f52 == 0 && u.exp > 0 && u.exp < 0x7ff) { | ||
| 32 | // Handle exact powers of two exactly | ||
| 33 | return (int)u.exp - 1023; | ||
| 34 | } | ||
| 35 | return log(x) / 0.69314718246459960938; | ||
| 36 | } | ||
| 37 | |||
| 38 | float log2f(float x) | ||
| 39 | { | ||
| 40 | ieee754_float u = { .f = x }; | ||
| 41 | if (u.sgn == 0 && u.f23 == 0 && u.exp > 0 && u.exp < 0xff) { | ||
| 42 | // Handle exact powers of two exactly | ||
| 43 | return (int)u.exp - 127; | ||
| 44 | } | ||
| 45 | return logf(x) / 0.69314718246459960938f; | ||
| 46 | } | ||
| 47 | |||
| 48 | long double log2l(long double x) | ||
| 49 | { | ||
| 50 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 51 | return log2(x); | ||
| 52 | #else | ||
| 53 | #error Not supported on your platform yet | ||
| 54 | #endif | ||
| 55 | } | ||
lib/libc/mingw/math/arm-common/logb.c deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <limits.h> | ||
| 9 | |||
| 10 | extern double (* __MINGW_IMP_SYMBOL(_logb))(double); | ||
| 11 | |||
| 12 | double logb(double x) | ||
| 13 | { | ||
| 14 | if (isinf(x)) | ||
| 15 | return INFINITY; | ||
| 16 | return __MINGW_IMP_SYMBOL(_logb)(x); | ||
| 17 | } | ||
lib/libc/mingw/math/arm-common/logbf.c deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <limits.h> | ||
| 9 | |||
| 10 | extern float (* __MINGW_IMP_SYMBOL(_logbf))(float); | ||
| 11 | |||
| 12 | float logbf(float x) | ||
| 13 | { | ||
| 14 | if (isinf(x)) | ||
| 15 | return INFINITY; | ||
| 16 | return __MINGW_IMP_SYMBOL(_logbf)(x); | ||
| 17 | } | ||
lib/libc/mingw/math/arm-common/logbl.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | long double logbl(long double x) | ||
| 10 | { | ||
| 11 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 12 | return logb(x); | ||
| 13 | #else | ||
| 14 | #error Not supported on your platform yet | ||
| 15 | #endif | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/powf.c deleted-21| ... | @@ -1,21 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <limits.h> | ||
| 9 | |||
| 10 | extern float (* __MINGW_IMP_SYMBOL(powf))(float, float); | ||
| 11 | |||
| 12 | float powf(float x, float y) | ||
| 13 | { | ||
| 14 | if (x == 1.0f) | ||
| 15 | return 1.0f; | ||
| 16 | if (y == 0.0f) | ||
| 17 | return 1.0f; | ||
| 18 | if (x == -1.0f && isinf(y)) | ||
| 19 | return 1.0f; | ||
| 20 | return __MINGW_IMP_SYMBOL(powf)(x, y); | ||
| 21 | } | ||
lib/libc/mingw/math/arm-common/powl.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | long double powl(long double x, long double y) | ||
| 10 | { | ||
| 11 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 12 | return pow(x, y); | ||
| 13 | #else | ||
| 14 | #error Not supported on your platform yet | ||
| 15 | #endif | ||
| 16 | } | ||
lib/libc/mingw/math/arm-common/remainder.c deleted-14| ... | @@ -1,14 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | double remainder(double x, double y) | ||
| 11 | { | ||
| 12 | int iret; | ||
| 13 | return remquo(x, y, &iret); | ||
| 14 | } | ||
lib/libc/mingw/math/arm-common/remainderf.c deleted-14| ... | @@ -1,14 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | float remainderf(float x, float y) | ||
| 11 | { | ||
| 12 | int iret; | ||
| 13 | return remquof(x, y, &iret); | ||
| 14 | } | ||
lib/libc/mingw/math/arm-common/remainderl.c deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | long double remainderl(long double x, long double y) | ||
| 11 | { | ||
| 12 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 13 | return remainder(x, y); | ||
| 14 | #else | ||
| 15 | #error Not supported on your platform yet | ||
| 16 | #endif | ||
| 17 | } | ||
lib/libc/mingw/math/arm-common/remquol.c deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | long double remquol(long double x, long double y, int *quo) | ||
| 11 | { | ||
| 12 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 13 | return remquo(x, y, quo); | ||
| 14 | #else | ||
| 15 | #error Not supported on your platform yet | ||
| 16 | #endif | ||
| 17 | } | ||
lib/libc/mingw/math/arm-common/s_remquo.c deleted-154| ... | @@ -1,154 +0,0 @@ | ||
| 1 | /* @(#)e_fmod.c 1.3 95/01/18 */ | ||
| 2 | /*- | ||
| 3 | * ==================================================== | ||
| 4 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | ||
| 5 | * | ||
| 6 | * Developed at SunSoft, a Sun Microsystems, Inc. business. | ||
| 7 | * Permission to use, copy, modify, and distribute this | ||
| 8 | * software is freely granted, provided that this notice | ||
| 9 | * is preserved. | ||
| 10 | * ==================================================== | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <sys/cdefs.h> | ||
| 14 | |||
| 15 | #include <float.h> | ||
| 16 | |||
| 17 | #include <math.h> | ||
| 18 | #include "../bsd_private_base.h" | ||
| 19 | |||
| 20 | static const double Zero[] = {0.0, -0.0,}; | ||
| 21 | |||
| 22 | /* | ||
| 23 | * Return the IEEE remainder and set *quo to the last n bits of the | ||
| 24 | * quotient, rounded to the nearest integer. We choose n=31 because | ||
| 25 | * we wind up computing all the integer bits of the quotient anyway as | ||
| 26 | * a side-effect of computing the remainder by the shift and subtract | ||
| 27 | * method. In practice, this is far more bits than are needed to use | ||
| 28 | * remquo in reduction algorithms. | ||
| 29 | */ | ||
| 30 | double | ||
| 31 | remquo(double x, double y, int *quo) | ||
| 32 | { | ||
| 33 | 	int32_t n,hx,hy,hz,ix,iy,sx,i; | ||
| 34 | 	u_int32_t lx,ly,lz,q,sxy; | ||
| 35 | |||
| 36 | 	EXTRACT_WORDS(hx,lx,x); | ||
| 37 | 	EXTRACT_WORDS(hy,ly,y); | ||
| 38 | 	sxy = (hx ^ hy) & 0x80000000; | ||
| 39 | 	sx = hx&0x80000000;		/* sign of x */ | ||
| 40 | 	hx ^=sx;		/* |x| */ | ||
| 41 | 	hy &= 0x7fffffff;	/* |y| */ | ||
| 42 | |||
| 43 | /* purge off exception values */ | ||
| 44 | 	if((hy|ly)==0||(hx>=0x7ff00000)||	/* y=0,or x not finite */ | ||
| 45 | 	 ((hy|((ly|-ly)>>31))>0x7ff00000))	/* or y is NaN */ | ||
| 46 | 	 return nan_mix_op(x, y, *)/nan_mix_op(x, y, *); | ||
| 47 | 	if(hx<=hy) { | ||
| 48 | 	 if((hx<hy)||(lx<ly)) { | ||
| 49 | 		q = 0; | ||
| 50 | 		goto fixup;	/* |x|<|y| return x or x-y */ | ||
| 51 | 	 } | ||
| 52 | 	 if(lx==ly) { | ||
| 53 | 		*quo = (sxy ? -1 : 1); | ||
| 54 | 		return Zero[(u_int32_t)sx>>31];	/* |x|=|y| return x*0*/ | ||
| 55 | 	 } | ||
| 56 | 	} | ||
| 57 | |||
| 58 | /* determine ix = ilogb(x) */ | ||
| 59 | 	if(hx<0x00100000) {	/* subnormal x */ | ||
| 60 | 	 if(hx==0) { | ||
| 61 | 		for (ix = -1043, i=lx; i>0; i<<=1) ix -=1; | ||
| 62 | 	 } else { | ||
| 63 | 		for (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1; | ||
| 64 | 	 } | ||
| 65 | 	} else ix = (hx>>20)-1023; | ||
| 66 | |||
| 67 | /* determine iy = ilogb(y) */ | ||
| 68 | 	if(hy<0x00100000) {	/* subnormal y */ | ||
| 69 | 	 if(hy==0) { | ||
| 70 | 		for (iy = -1043, i=ly; i>0; i<<=1) iy -=1; | ||
| 71 | 	 } else { | ||
| 72 | 		for (iy = -1022,i=(hy<<11); i>0; i<<=1) iy -=1; | ||
| 73 | 	 } | ||
| 74 | 	} else iy = (hy>>20)-1023; | ||
| 75 | |||
| 76 | /* set up {hx,lx}, {hy,ly} and align y to x */ | ||
| 77 | 	if(ix >= -1022) | ||
| 78 | 	 hx = 0x00100000|(0x000fffff&hx); | ||
| 79 | 	else {		/* subnormal x, shift x to normal */ | ||
| 80 | 	 n = -1022-ix; | ||
| 81 | 	 if(n<=31) { | ||
| 82 | 	 hx = (hx<<n)|(lx>>(32-n)); | ||
| 83 | 	 lx <<= n; | ||
| 84 | 	 } else { | ||
| 85 | 		hx = lx<<(n-32); | ||
| 86 | 		lx = 0; | ||
| 87 | 	 } | ||
| 88 | 	} | ||
| 89 | 	if(iy >= -1022) | ||
| 90 | 	 hy = 0x00100000|(0x000fffff&hy); | ||
| 91 | 	else {		/* subnormal y, shift y to normal */ | ||
| 92 | 	 n = -1022-iy; | ||
| 93 | 	 if(n<=31) { | ||
| 94 | 	 hy = (hy<<n)|(ly>>(32-n)); | ||
| 95 | 	 ly <<= n; | ||
| 96 | 	 } else { | ||
| 97 | 		hy = ly<<(n-32); | ||
| 98 | 		ly = 0; | ||
| 99 | 	 } | ||
| 100 | 	} | ||
| 101 | |||
| 102 | /* fix point fmod */ | ||
| 103 | 	n = ix - iy; | ||
| 104 | 	q = 0; | ||
| 105 | 	while(n--) { | ||
| 106 | 	 hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1; | ||
| 107 | 	 if(hz<0){hx = hx+hx+(lx>>31); lx = lx+lx;} | ||
| 108 | 	 else {hx = hz+hz+(lz>>31); lx = lz+lz; q++;} | ||
| 109 | 	 q <<= 1; | ||
| 110 | 	} | ||
| 111 | 	hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1; | ||
| 112 | 	if(hz>=0) {hx=hz;lx=lz;q++;} | ||
| 113 | |||
| 114 | /* convert back to floating value and restore the sign */ | ||
| 115 | 	if((hx|lx)==0) {			/* return sign(x)*0 */ | ||
| 116 | 	 q &= 0x7fffffff; | ||
| 117 | 	 *quo = (sxy ? -q : q); | ||
| 118 | 	 return Zero[(u_int32_t)sx>>31]; | ||
| 119 | 	} | ||
| 120 | 	while(hx<0x00100000) {		/* normalize x */ | ||
| 121 | 	 hx = hx+hx+(lx>>31); lx = lx+lx; | ||
| 122 | 	 iy -= 1; | ||
| 123 | 	} | ||
| 124 | 	if(iy>= -1022) {	/* normalize output */ | ||
| 125 | 	 hx = ((hx-0x00100000)|((iy+1023)<<20)); | ||
| 126 | 	} else {		/* subnormal output */ | ||
| 127 | 	 n = -1022 - iy; | ||
| 128 | 	 if(n<=20) { | ||
| 129 | 		lx = (lx>>n)|((u_int32_t)hx<<(32-n)); | ||
| 130 | 		hx >>= n; | ||
| 131 | 	 } else if (n<=31) { | ||
| 132 | 		lx = (hx<<(32-n))|(lx>>n); hx = 0; | ||
| 133 | 	 } else { | ||
| 134 | 		lx = hx>>(n-32); hx = 0; | ||
| 135 | 	 } | ||
| 136 | 	} | ||
| 137 | fixup: | ||
| 138 | 	INSERT_WORDS(x,hx,lx); | ||
| 139 | 	y = fabs(y); | ||
| 140 | 	if (y < 0x1p-1021) { | ||
| 141 | 	 if (x+x>y || (x+x==y && (q & 1))) { | ||
| 142 | 		q++; | ||
| 143 | 		x-=y; | ||
| 144 | 	 } | ||
| 145 | 	} else if (x>0.5*y || (x==0.5*y && (q & 1))) { | ||
| 146 | 	 q++; | ||
| 147 | 	 x-=y; | ||
| 148 | 	} | ||
| 149 | 	GET_HIGH_WORD(hx,x); | ||
| 150 | 	SET_HIGH_WORD(x,hx^sx); | ||
| 151 | 	q &= 0x7fffffff; | ||
| 152 | 	*quo = (sxy ? -q : q); | ||
| 153 | 	return x; | ||
| 154 | } | ||
lib/libc/mingw/math/arm-common/s_remquof.c deleted-121| ... | @@ -1,121 +0,0 @@ | ||
| 1 | /* @(#)e_fmod.c 1.3 95/01/18 */ | ||
| 2 | /*- | ||
| 3 | * ==================================================== | ||
| 4 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | ||
| 5 | * | ||
| 6 | * Developed at SunSoft, a Sun Microsystems, Inc. business. | ||
| 7 | * Permission to use, copy, modify, and distribute this | ||
| 8 | * software is freely granted, provided that this notice | ||
| 9 | * is preserved. | ||
| 10 | * ==================================================== | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <sys/cdefs.h> | ||
| 14 | |||
| 15 | #include <math.h> | ||
| 16 | #include "../bsd_private_base.h" | ||
| 17 | |||
| 18 | static const float Zero[] = {0.0, -0.0,}; | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Return the IEEE remainder and set *quo to the last n bits of the | ||
| 22 | * quotient, rounded to the nearest integer. We choose n=31 because | ||
| 23 | * we wind up computing all the integer bits of the quotient anyway as | ||
| 24 | * a side-effect of computing the remainder by the shift and subtract | ||
| 25 | * method. In practice, this is far more bits than are needed to use | ||
| 26 | * remquo in reduction algorithms. | ||
| 27 | */ | ||
| 28 | float | ||
| 29 | remquof(float x, float y, int *quo) | ||
| 30 | { | ||
| 31 | 	int32_t n,hx,hy,hz,ix,iy,sx,i; | ||
| 32 | 	u_int32_t q,sxy; | ||
| 33 | |||
| 34 | 	GET_FLOAT_WORD(hx,x); | ||
| 35 | 	GET_FLOAT_WORD(hy,y); | ||
| 36 | 	sxy = (hx ^ hy) & 0x80000000; | ||
| 37 | 	sx = hx&0x80000000;		/* sign of x */ | ||
| 38 | 	hx ^=sx;		/* |x| */ | ||
| 39 | 	hy &= 0x7fffffff;	/* |y| */ | ||
| 40 | |||
| 41 | /* purge off exception values */ | ||
| 42 | 	if(hy==0||hx>=0x7f800000||hy>0x7f800000) /* y=0,NaN;or x not finite */ | ||
| 43 | 	 return nan_mix_op(x, y, *)/nan_mix_op(x, y, *); | ||
| 44 | 	if(hx<hy) { | ||
| 45 | 	 q = 0; | ||
| 46 | 	 goto fixup;	/* |x|<|y| return x or x-y */ | ||
| 47 | 	} else if(hx==hy) { | ||
| 48 | 	 *quo = (sxy ? -1 : 1); | ||
| 49 | 	 return Zero[(u_int32_t)sx>>31];	/* |x|=|y| return x*0*/ | ||
| 50 | 	} | ||
| 51 | |||
| 52 | /* determine ix = ilogb(x) */ | ||
| 53 | 	if(hx<0x00800000) {	/* subnormal x */ | ||
| 54 | 	 for (ix = -126,i=(hx<<8); i>0; i<<=1) ix -=1; | ||
| 55 | 	} else ix = (hx>>23)-127; | ||
| 56 | |||
| 57 | /* determine iy = ilogb(y) */ | ||
| 58 | 	if(hy<0x00800000) {	/* subnormal y */ | ||
| 59 | 	 for (iy = -126,i=(hy<<8); i>0; i<<=1) iy -=1; | ||
| 60 | 	} else iy = (hy>>23)-127; | ||
| 61 | |||
| 62 | /* set up {hx,lx}, {hy,ly} and align y to x */ | ||
| 63 | 	if(ix >= -126) | ||
| 64 | 	 hx = 0x00800000|(0x007fffff&hx); | ||
| 65 | 	else {		/* subnormal x, shift x to normal */ | ||
| 66 | 	 n = -126-ix; | ||
| 67 | 	 hx <<= n; | ||
| 68 | 	} | ||
| 69 | 	if(iy >= -126) | ||
| 70 | 	 hy = 0x00800000|(0x007fffff&hy); | ||
| 71 | 	else {		/* subnormal y, shift y to normal */ | ||
| 72 | 	 n = -126-iy; | ||
| 73 | 	 hy <<= n; | ||
| 74 | 	} | ||
| 75 | |||
| 76 | /* fix point fmod */ | ||
| 77 | 	n = ix - iy; | ||
| 78 | 	q = 0; | ||
| 79 | 	while(n--) { | ||
| 80 | 	 hz=hx-hy; | ||
| 81 | 	 if(hz<0) hx = hx << 1; | ||
| 82 | 	 else {hx = hz << 1; q++;} | ||
| 83 | 	 q <<= 1; | ||
| 84 | 	} | ||
| 85 | 	hz=hx-hy; | ||
| 86 | 	if(hz>=0) {hx=hz;q++;} | ||
| 87 | |||
| 88 | /* convert back to floating value and restore the sign */ | ||
| 89 | 	if(hx==0) {				/* return sign(x)*0 */ | ||
| 90 | 	 q &= 0x7fffffff; | ||
| 91 | 	 *quo = (sxy ? -q : q); | ||
| 92 | 	 return Zero[(u_int32_t)sx>>31]; | ||
| 93 | 	} | ||
| 94 | 	while(hx<0x00800000) {		/* normalize x */ | ||
| 95 | 	 hx <<= 1; | ||
| 96 | 	 iy -= 1; | ||
| 97 | 	} | ||
| 98 | 	if(iy>= -126) {		/* normalize output */ | ||
| 99 | 	 hx = ((hx-0x00800000)|((iy+127)<<23)); | ||
| 100 | 	} else {		/* subnormal output */ | ||
| 101 | 	 n = -126 - iy; | ||
| 102 | 	 hx >>= n; | ||
| 103 | 	} | ||
| 104 | fixup: | ||
| 105 | 	SET_FLOAT_WORD(x,hx); | ||
| 106 | 	y = fabsf(y); | ||
| 107 | 	if (y < 0x1p-125f) { | ||
| 108 | 	 if (x+x>y || (x+x==y && (q & 1))) { | ||
| 109 | 		q++; | ||
| 110 | 		x-=y; | ||
| 111 | 	 } | ||
| 112 | 	} else if (x>0.5f*y || (x==0.5f*y && (q & 1))) { | ||
| 113 | 	 q++; | ||
| 114 | 	 x-=y; | ||
| 115 | 	} | ||
| 116 | 	GET_FLOAT_WORD(hx,x); | ||
| 117 | 	SET_FLOAT_WORD(x,hx^sx); | ||
| 118 | 	q &= 0x7fffffff; | ||
| 119 | 	*quo = (sxy ? -q : q); | ||
| 120 | 	return x; | ||
| 121 | } | ||
lib/libc/mingw/math/arm-common/scalbn.c deleted-45| ... | @@ -1,45 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | double scalbn(double x, int exp) | ||
| 10 | { | ||
| 11 | return x * exp2(exp); | ||
| 12 | } | ||
| 13 | |||
| 14 | float scalbnf(float x, int exp) | ||
| 15 | { | ||
| 16 | return x * exp2f(exp); | ||
| 17 | } | ||
| 18 | |||
| 19 | long double scalbnl(long double x, int exp) | ||
| 20 | { | ||
| 21 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 22 | return scalbn(x, exp); | ||
| 23 | #else | ||
| 24 | #error Not supported on your platform yet | ||
| 25 | #endif | ||
| 26 | } | ||
| 27 | |||
| 28 | double scalbln(double x, long exp) | ||
| 29 | { | ||
| 30 | return x * exp2(exp); | ||
| 31 | } | ||
| 32 | |||
| 33 | float scalblnf(float x, long exp) | ||
| 34 | { | ||
| 35 | return x * exp2f(exp); | ||
| 36 | } | ||
| 37 | |||
| 38 | long double scalblnl(long double x, long exp) | ||
| 39 | { | ||
| 40 | #if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 41 | return scalbln(x, exp); | ||
| 42 | #else | ||
| 43 | #error Not supported on your platform yet | ||
| 44 | #endif | ||
| 45 | } | ||
lib/libc/mingw/math/arm/exp2.S deleted-19| ... | @@ -1,19 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"exp2.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 2 | ||
| 11 | 	.globl __MINGW_USYMBOL(exp2) | ||
| 12 | 	.globl __MINGW_USYMBOL(exp2l) | ||
| 13 | 	.def	__MINGW_USYMBOL(exp2);	.scl	2;	.type	32;	.endef | ||
| 14 | 	.def	__MINGW_USYMBOL(exp2l);	.scl	2;	.type	32;	.endef | ||
| 15 | __MINGW_USYMBOL(exp2): | ||
| 16 | __MINGW_USYMBOL(exp2l): | ||
| 17 | 	vmov.f64 d1, d0 | ||
| 18 | 	vmov.f64 d0, #2.0 | ||
| 19 | 	b pow | ||
lib/libc/mingw/math/arm/exp2f.S deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"exp2f.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 2 | ||
| 11 | 	.globl __MINGW_USYMBOL(exp2f) | ||
| 12 | 	.def	__MINGW_USYMBOL(exp2f);	.scl	2;	.type	32;	.endef | ||
| 13 | __MINGW_USYMBOL(exp2f): | ||
| 14 | 	vmov s1, s0 | ||
| 15 | 	vmov.f32 s0, #2.0 | ||
| 16 | 	b powf | ||
lib/libc/mingw/math/arm/nearbyint.S deleted-18| ... | @@ -1,18 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"nearbyint.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 4 | ||
| 11 | 	.globl __MINGW_USYMBOL(nearbyint) | ||
| 12 | 	.def	__MINGW_USYMBOL(nearbyint);	.scl	2;	.type	32;	.endef | ||
| 13 | __MINGW_USYMBOL(nearbyint): | ||
| 14 | 	push	{r4, lr} | ||
| 15 | 	vmrs	r4, fpscr | ||
| 16 | 	bl	rint | ||
| 17 | 	vmsr	fpscr, r4 | ||
| 18 | 	pop	{r4, pc} | ||
lib/libc/mingw/math/arm/nearbyintf.S deleted-18| ... | @@ -1,18 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"nearbyintf.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 4 | ||
| 11 | 	.globl __MINGW_USYMBOL(nearbyintf) | ||
| 12 | 	.def	__MINGW_USYMBOL(nearbyintf);	.scl	2;	.type	32;	.endef | ||
| 13 | __MINGW_USYMBOL(nearbyintf): | ||
| 14 | 	push	{r4, lr} | ||
| 15 | 	vmrs	r4, fpscr | ||
| 16 | 	bl	rintf | ||
| 17 | 	vmsr	fpscr, r4 | ||
| 18 | 	pop	{r4, pc} | ||
lib/libc/mingw/math/arm/nearbyintl.S deleted-18| ... | @@ -1,18 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"nearbyintl.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 4 | ||
| 11 | 	.globl __MINGW_USYMBOL(nearbyintl) | ||
| 12 | 	.def	__MINGW_USYMBOL(nearbyintl);	.scl	2;	.type	32;	.endef | ||
| 13 | __MINGW_USYMBOL(nearbyintl): | ||
| 14 | 	push	{r4, lr} | ||
| 15 | 	vmrs	r4, fpscr | ||
| 16 | 	bl	rintl | ||
| 17 | 	vmsr	fpscr, r4 | ||
| 18 | 	pop	{r4, pc} | ||
lib/libc/mingw/math/arm/s_trunc.c deleted-61| ... | @@ -1,61 +0,0 @@ | ||
| 1 | /* @(#)s_floor.c 5.1 93/09/24 */ | ||
| 2 | /* | ||
| 3 | * ==================================================== | ||
| 4 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | ||
| 5 | * | ||
| 6 | * Developed at SunPro, a Sun Microsystems, Inc. business. | ||
| 7 | * Permission to use, copy, modify, and distribute this | ||
| 8 | * software is freely granted, provided that this notice | ||
| 9 | * is preserved. | ||
| 10 | * ==================================================== | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <sys/cdefs.h> | ||
| 14 | |||
| 15 | /* | ||
| 16 | * trunc(x) | ||
| 17 | * Return x rounded toward 0 to integral value | ||
| 18 | * Method: | ||
| 19 | *	Bit twiddling. | ||
| 20 | * Exception: | ||
| 21 | *	Inexact flag raised if x not equal to trunc(x). | ||
| 22 | */ | ||
| 23 | |||
| 24 | #include <float.h> | ||
| 25 | |||
| 26 | #include "../bsd_private_base.h" | ||
| 27 | |||
| 28 | static const double huge = 1.0e300; | ||
| 29 | |||
| 30 | double | ||
| 31 | trunc(double x) | ||
| 32 | { | ||
| 33 | 	int32_t i0,i1,j0; | ||
| 34 | 	u_int32_t i; | ||
| 35 | 	EXTRACT_WORDS(i0,i1,x); | ||
| 36 | 	j0 = ((i0>>20)&0x7ff)-0x3ff; | ||
| 37 | 	if(j0<20) { | ||
| 38 | 	 if(j0<0) { 	/* raise inexact if x != 0 */ | ||
| 39 | 		if(huge+x>0.0) {/* |x|<1, so return 0*sign(x) */ | ||
| 40 | 		 i0 &= 0x80000000U; | ||
| 41 | 		 i1 = 0; | ||
| 42 | 		} | ||
| 43 | 	 } else { | ||
| 44 | 		i = (0x000fffff)>>j0; | ||
| 45 | 		if(((i0&i)|i1)==0) return x; /* x is integral */ | ||
| 46 | 		if(huge+x>0.0) {	/* raise inexact flag */ | ||
| 47 | 		 i0 &= (~i); i1=0; | ||
| 48 | 		} | ||
| 49 | 	 } | ||
| 50 | 	} else if (j0>51) { | ||
| 51 | 	 if(j0==0x400) return x+x;	/* inf or NaN */ | ||
| 52 | 	 else return x;		/* x is integral */ | ||
| 53 | 	} else { | ||
| 54 | 	 i = ((u_int32_t)(0xffffffff))>>(j0-20); | ||
| 55 | 	 if((i1&i)==0) return x;	/* x is integral */ | ||
| 56 | 	 if(huge+x>0.0)		/* raise inexact flag */ | ||
| 57 | 		i1 &= (~i); | ||
| 58 | 	} | ||
| 59 | 	INSERT_WORDS(x,i0,i1); | ||
| 60 | 	return x; | ||
| 61 | } | ||
lib/libc/mingw/math/arm/s_truncf.c deleted-51| ... | @@ -1,51 +0,0 @@ | ||
| 1 | /* @(#)s_floor.c 5.1 93/09/24 */ | ||
| 2 | /* | ||
| 3 | * ==================================================== | ||
| 4 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | ||
| 5 | * | ||
| 6 | * Developed at SunPro, a Sun Microsystems, Inc. business. | ||
| 7 | * Permission to use, copy, modify, and distribute this | ||
| 8 | * software is freely granted, provided that this notice | ||
| 9 | * is preserved. | ||
| 10 | * ==================================================== | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <sys/cdefs.h> | ||
| 14 | |||
| 15 | /* | ||
| 16 | * truncf(x) | ||
| 17 | * Return x rounded toward 0 to integral value | ||
| 18 | * Method: | ||
| 19 | *	Bit twiddling. | ||
| 20 | * Exception: | ||
| 21 | *	Inexact flag raised if x not equal to truncf(x). | ||
| 22 | */ | ||
| 23 | |||
| 24 | #include "../bsd_private_base.h" | ||
| 25 | |||
| 26 | static const float huge = 1.0e30F; | ||
| 27 | |||
| 28 | float | ||
| 29 | truncf(float x) | ||
| 30 | { | ||
| 31 | 	int32_t i0,j0; | ||
| 32 | 	u_int32_t i; | ||
| 33 | 	GET_FLOAT_WORD(i0,x); | ||
| 34 | 	j0 = ((i0>>23)&0xff)-0x7f; | ||
| 35 | 	if(j0<23) { | ||
| 36 | 	 if(j0<0) { 	/* raise inexact if x != 0 */ | ||
| 37 | 		if(huge+x>0.0F)		/* |x|<1, so return 0*sign(x) */ | ||
| 38 | 		 i0 &= 0x80000000; | ||
| 39 | 	 } else { | ||
| 40 | 		i = (0x007fffff)>>j0; | ||
| 41 | 		if((i0&i)==0) return x; /* x is integral */ | ||
| 42 | 		if(huge+x>0.0F)		/* raise inexact flag */ | ||
| 43 | 		 i0 &= (~i); | ||
| 44 | 	 } | ||
| 45 | 	} else { | ||
| 46 | 	 if(j0==0x80) return x+x;	/* inf or NaN */ | ||
| 47 | 	 else return x;		/* x is integral */ | ||
| 48 | 	} | ||
| 49 | 	SET_FLOAT_WORD(x,i0); | ||
| 50 | 	return x; | ||
| 51 | } | ||
lib/libc/mingw/math/arm64/exp2.S deleted-19| ... | @@ -1,19 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"exp2.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 2 | ||
| 11 | 	.globl __MINGW_USYMBOL(exp2) | ||
| 12 | 	.globl __MINGW_USYMBOL(exp2l) | ||
| 13 | 	.def	__MINGW_USYMBOL(exp2);	.scl	2;	.type	32;	.endef | ||
| 14 | 	.def	__MINGW_USYMBOL(exp2l);	.scl	2;	.type	32;	.endef | ||
| 15 | __MINGW_USYMBOL(exp2): | ||
| 16 | __MINGW_USYMBOL(exp2l): | ||
| 17 | 	fmov d1, d0 | ||
| 18 | 	fmov d0, #2.0 | ||
| 19 | 	b pow | ||
lib/libc/mingw/math/arm64/exp2f.S deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"exp2f.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 2 | ||
| 11 | 	.globl __MINGW_USYMBOL(exp2f) | ||
| 12 | 	.def	__MINGW_USYMBOL(exp2f);	.scl	2;	.type	32;	.endef | ||
| 13 | __MINGW_USYMBOL(exp2f): | ||
| 14 | 	fmov s1, s0 | ||
| 15 | 	fmov s0, #2.0 | ||
| 16 | 	b powf | ||
lib/libc/mingw/math/arm64/nearbyint.S deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"nearbyint.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 2 | ||
| 11 | 	.globl __MINGW_USYMBOL(nearbyint) | ||
| 12 | 	.def	__MINGW_USYMBOL(nearbyint);	.scl	2;	.type	32;	.endef | ||
| 13 | __MINGW_USYMBOL(nearbyint): | ||
| 14 | 	mrs	x1, fpcr | ||
| 15 | 	frintx	d0, d0 | ||
| 16 | 	msr	fpcr, x1 | ||
| 17 | 	ret | ||
lib/libc/mingw/math/arm64/nearbyintf.S deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"nearbyintf.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 2 | ||
| 11 | 	.globl __MINGW_USYMBOL(nearbyintf) | ||
| 12 | 	.def	__MINGW_USYMBOL(nearbyintf);	.scl	2;	.type	32;	.endef | ||
| 13 | __MINGW_USYMBOL(nearbyintf): | ||
| 14 | 	mrs	x1, fpcr | ||
| 15 | 	frintx	s0, s0 | ||
| 16 | 	msr	fpcr, x1 | ||
| 17 | 	ret | ||
lib/libc/mingw/math/arm64/nearbyintl.S deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"nearbyintl.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 2 | ||
| 11 | 	.globl __MINGW_USYMBOL(nearbyintl) | ||
| 12 | 	.def	__MINGW_USYMBOL(nearbyintl);	.scl	2;	.type	32;	.endef | ||
| 13 | __MINGW_USYMBOL(nearbyintl): | ||
| 14 | 	mrs	x1, fpcr | ||
| 15 | 	frintx	d0, d0 | ||
| 16 | 	msr	fpcr, x1 | ||
| 17 | 	ret | ||
lib/libc/mingw/math/arm64/trunc.S deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file "trunc.S" | ||
| 9 | 	.text | ||
| 10 | 	.p2align 2 | ||
| 11 | 	.globl __MINGW_USYMBOL(trunc) | ||
| 12 | .def __MINGW_USYMBOL(trunc); .scl 2; .type 32; .endef | ||
| 13 | |||
| 14 | __MINGW_USYMBOL(trunc): | ||
| 15 | 	frintz	d0, d0 | ||
| 16 | 	ret | ||
lib/libc/mingw/math/arm64/truncf.S deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | .file "truncf.S" | ||
| 9 | .text | ||
| 10 | .p2align 2 | ||
| 11 | .globl __MINGW_USYMBOL(truncf) | ||
| 12 | .def __MINGW_USYMBOL(truncf); .scl 2; .type 32; .endef | ||
| 13 | |||
| 14 | __MINGW_USYMBOL(truncf): | ||
| 15 | 	frintz	s0, s0 | ||
| 16 | 	ret | ||
lib/libc/mingw/math/cbrt.c deleted-104| ... | @@ -1,104 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include "cephes_mconf.h" | ||
| 8 | |||
| 9 | static const double CBRT2 = 1.2599210498948731647672; | ||
| 10 | static const double CBRT4 = 1.5874010519681994747517; | ||
| 11 | static const double CBRT2I = 0.79370052598409973737585; | ||
| 12 | static const double CBRT4I = 0.62996052494743658238361; | ||
| 13 | |||
| 14 | #ifndef __MINGW32__ | ||
| 15 | extern double frexp ( double, int * ); | ||
| 16 | extern double ldexp ( double, int ); | ||
| 17 | extern int isnan ( double ); | ||
| 18 | extern int isfinite ( double ); | ||
| 19 | #endif | ||
| 20 | |||
| 21 | double cbrt(double x) | ||
| 22 | { | ||
| 23 | 	int e, rem, sign; | ||
| 24 | 	double z; | ||
| 25 | |||
| 26 | #ifdef __MINGW32__ | ||
| 27 | 	if (!isfinite (x) || x == 0) | ||
| 28 | 		return x; | ||
| 29 | #else | ||
| 30 | #ifdef NANS | ||
| 31 | 	if (isnan(x)) | ||
| 32 | 		return x; | ||
| 33 | #endif | ||
| 34 | #ifdef INFINITIES | ||
| 35 | 	if (!isfinite(x)) | ||
| 36 | 		return x; | ||
| 37 | #endif | ||
| 38 | 	if (x == 0) | ||
| 39 | 		return (x); | ||
| 40 | #endif /* __MINGW32__ */ | ||
| 41 | |||
| 42 | 	if (x > 0) | ||
| 43 | 		sign = 1; | ||
| 44 | 	else | ||
| 45 | 	{ | ||
| 46 | 		sign = -1; | ||
| 47 | 		x = -x; | ||
| 48 | 	} | ||
| 49 | |||
| 50 | 	z = x; | ||
| 51 | 	/* extract power of 2, leaving | ||
| 52 | 	 * mantissa between 0.5 and 1 | ||
| 53 | 	 */ | ||
| 54 | 	x = frexp(x, &e); | ||
| 55 | |||
| 56 | 	/* Approximate cube root of number between .5 and 1, | ||
| 57 | 	 * peak relative error = 9.2e-6 | ||
| 58 | 	 */ | ||
| 59 | 	x = (((-1.3466110473359520655053e-1 * x | ||
| 60 | 	 + 5.4664601366395524503440e-1) * x | ||
| 61 | 	 - 9.5438224771509446525043e-1) * x | ||
| 62 | 	 + 1.1399983354717293273738e0 ) * x | ||
| 63 | 	 + 4.0238979564544752126924e-1; | ||
| 64 | |||
| 65 | 	/* exponent divided by 3 */ | ||
| 66 | 	if (e >= 0) | ||
| 67 | 	{ | ||
| 68 | 		rem = e; | ||
| 69 | 		e /= 3; | ||
| 70 | 		rem -= 3*e; | ||
| 71 | 		if (rem == 1) | ||
| 72 | 			x *= CBRT2; | ||
| 73 | 		else if (rem == 2) | ||
| 74 | 			x *= CBRT4; | ||
| 75 | 	} | ||
| 76 | 	/* argument less than 1 */ | ||
| 77 | 	else | ||
| 78 | 	{ | ||
| 79 | 		e = -e; | ||
| 80 | 		rem = e; | ||
| 81 | 		e /= 3; | ||
| 82 | 		rem -= 3*e; | ||
| 83 | 		if (rem == 1) | ||
| 84 | 			x *= CBRT2I; | ||
| 85 | 		else if (rem == 2) | ||
| 86 | 			x *= CBRT4I; | ||
| 87 | 		e = -e; | ||
| 88 | 	} | ||
| 89 | |||
| 90 | 	/* multiply by power of 2 */ | ||
| 91 | 	x = ldexp(x, e); | ||
| 92 | |||
| 93 | 	/* Newton iteration */ | ||
| 94 | 	x -= ( x - (z/(x*x)) )*0.33333333333333333333; | ||
| 95 | #ifdef DEC | ||
| 96 | 	x -= ( x - (z/(x*x)) )/3.0; | ||
| 97 | #else | ||
| 98 | 	x -= ( x - (z/(x*x)) )*0.33333333333333333333; | ||
| 99 | #endif | ||
| 100 | |||
| 101 | 	if (sign < 0) | ||
| 102 | 		x = -x; | ||
| 103 | 	return (x); | ||
| 104 | } | ||
lib/libc/mingw/math/cbrtf.c deleted-75| ... | @@ -1,75 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include "cephes_mconf.h" | ||
| 8 | |||
| 9 | static const float CBRT2 = 1.25992104989487316477; | ||
| 10 | static const float CBRT4 = 1.58740105196819947475; | ||
| 11 | |||
| 12 | float cbrtf (float x) | ||
| 13 | { | ||
| 14 | 	int e, rem, sign; | ||
| 15 | 	float z; | ||
| 16 | 	if (!isfinite (x) || x == 0.0F) | ||
| 17 | 		return x; | ||
| 18 | 	if (x > 0) | ||
| 19 | 		sign = 1; | ||
| 20 | 	else | ||
| 21 | 	{ | ||
| 22 | 		sign = -1; | ||
| 23 | 		x = -x; | ||
| 24 | 	} | ||
| 25 | |||
| 26 | 	z = x; | ||
| 27 | 	/* extract power of 2, leaving | ||
| 28 | 	 * mantissa between 0.5 and 1 | ||
| 29 | 	 */ | ||
| 30 | 	x = frexpf(x, &e); | ||
| 31 | |||
| 32 | 	/* Approximate cube root of number between .5 and 1, | ||
| 33 | 	 * peak relative error = 9.2e-6 | ||
| 34 | 	 */ | ||
| 35 | 	x = (((-0.13466110473359520655053 * x | ||
| 36 | 	 + 0.54664601366395524503440 ) * x | ||
| 37 | 	 - 0.95438224771509446525043 ) * x | ||
| 38 | 	 + 1.1399983354717293273738 ) * x | ||
| 39 | 	 + 0.40238979564544752126924; | ||
| 40 | |||
| 41 | 	/* exponent divided by 3 */ | ||
| 42 | 	if (e >= 0) | ||
| 43 | 	{ | ||
| 44 | 		rem = e; | ||
| 45 | 		e /= 3; | ||
| 46 | 		rem -= 3*e; | ||
| 47 | 		if (rem == 1) | ||
| 48 | 			x *= CBRT2; | ||
| 49 | 		else if (rem == 2) | ||
| 50 | 			x *= CBRT4; | ||
| 51 | 	} | ||
| 52 | /* argument less than 1 */ | ||
| 53 | 	else | ||
| 54 | 	{ | ||
| 55 | 		e = -e; | ||
| 56 | 		rem = e; | ||
| 57 | 		e /= 3; | ||
| 58 | 		rem -= 3*e; | ||
| 59 | 		if (rem == 1) | ||
| 60 | 			x /= CBRT2; | ||
| 61 | 		else if (rem == 2) | ||
| 62 | 			x /= CBRT4; | ||
| 63 | 		e = -e; | ||
| 64 | 	} | ||
| 65 | |||
| 66 | 	/* multiply by power of 2 */ | ||
| 67 | 	x = ldexpf(x, e); | ||
| 68 | |||
| 69 | 	/* Newton iteration */ | ||
| 70 | 	x -= ( x - (z/(x*x)) ) * 0.333333333333; | ||
| 71 | |||
| 72 | 	if (sign < 0) | ||
| 73 | 		x = -x; | ||
| 74 | 	return (x); | ||
| 75 | } | ||
lib/libc/mingw/math/copysign.c deleted-21| ... | @@ -1,21 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | typedef union U | ||
| 9 | { | ||
| 10 | unsigned int u[2]; | ||
| 11 | double d; | ||
| 12 | } U; | ||
| 13 | |||
| 14 | double copysign(double x, double y) | ||
| 15 | { | ||
| 16 | U h,j; | ||
| 17 | h.d = x; | ||
| 18 | j.d = y; | ||
| 19 | h.u[1] = (h.u[1] & 0x7fffffff) | (j.u[1] & 0x80000000); | ||
| 20 | return h.d; | ||
| 21 | } | ||
lib/libc/mingw/math/copysignf.c deleted-19| ... | @@ -1,19 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | typedef union ui_f { | ||
| 9 | 	float f; | ||
| 10 | 	unsigned int ui; | ||
| 11 | } ui_f; | ||
| 12 | |||
| 13 | float copysignf(float aX, float aY) | ||
| 14 | { | ||
| 15 | ui_f x,y; | ||
| 16 | x.f=aX; y.f=aY; | ||
| 17 | x.ui= (x.ui & 0x7fffffff) | (y.ui & 0x80000000); | ||
| 18 | return x.f; | ||
| 19 | } | ||
lib/libc/mingw/math/fabs.c deleted-20| ... | @@ -1,20 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #define __CRT__NO_INLINE | ||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | double | ||
| 10 | fabs (double x) | ||
| 11 | { | ||
| 12 | #if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) | ||
| 13 | return __builtin_fabs (x); | ||
| 14 | #elif defined(__i386__) || defined(_X86_) | ||
| 15 | double res = 0.0; | ||
| 16 | |||
| 17 | asm volatile ("fabs;" : "=t" (res) : "0" (x)); | ||
| 18 | return res; | ||
| 19 | #endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) */ | ||
| 20 | } | ||
lib/libc/mingw/math/fdim.c deleted-24| ... | @@ -1,24 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <errno.h> | ||
| 8 | |||
| 9 | double | ||
| 10 | fdim (double x, double y) | ||
| 11 | { | ||
| 12 | int cx = fpclassify (x), cy = fpclassify (y); | ||
| 13 | double r; | ||
| 14 | |||
| 15 | if (cx == FP_NAN || cy == FP_NAN | ||
| 16 | || (y < 0 && cx == FP_INFINITE && cy == FP_INFINITE)) | ||
| 17 | return x - y; /* Take care invalid flag is raised. */ | ||
| 18 | if (x <= y) | ||
| 19 | return 0.0; | ||
| 20 | r = x - y; | ||
| 21 | if (fpclassify (r) == FP_INFINITE) | ||
| 22 | errno = ERANGE; | ||
| 23 | return r; | ||
| 24 | } | ||
lib/libc/mingw/math/fdimf.c deleted-24| ... | @@ -1,24 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <errno.h> | ||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | float | ||
| 10 | fdimf (float x, float y) | ||
| 11 | { | ||
| 12 | int cx = fpclassify (x), cy = fpclassify (y); | ||
| 13 | float r; | ||
| 14 | |||
| 15 | if (cx == FP_NAN || cy == FP_NAN | ||
| 16 | || (y < 0 && cx == FP_INFINITE && cy == FP_INFINITE)) | ||
| 17 | return x - y; /* Take care invalid flag is raised. */ | ||
| 18 | if (x <= y) | ||
| 19 | return 0.0f; | ||
| 20 | r = x - y; | ||
| 21 | if (fpclassify (r) == FP_INFINITE) | ||
| 22 | errno = ERANGE; | ||
| 23 | return r; | ||
| 24 | } | ||
lib/libc/mingw/math/fma.c deleted-97| ... | @@ -1,97 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | double fma(double x, double y, double z); | ||
| 7 | |||
| 8 | #if defined(_ARM_) || defined(__arm__) | ||
| 9 | |||
| 10 | /* Use hardware FMA on ARM. */ | ||
| 11 | double fma(double x, double y, double z){ | ||
| 12 | __asm__ ( | ||
| 13 | "fmacd %0, %1, %2 \n" | ||
| 14 | : "+w"(z) | ||
| 15 | : "w"(x), "w"(y) | ||
| 16 | ); | ||
| 17 | return z; | ||
| 18 | } | ||
| 19 | |||
| 20 | #elif defined(_ARM64_) || defined(__aarch64__) | ||
| 21 | |||
| 22 | /* Use hardware FMA on ARM64. */ | ||
| 23 | double fma(double x, double y, double z){ | ||
| 24 | __asm__ ( | ||
| 25 | "fmadd %d0, %d1, %d2, %d0 \n" | ||
| 26 | : "+w"(z) | ||
| 27 | : "w"(x), "w"(y) | ||
| 28 | ); | ||
| 29 | return z; | ||
| 30 | } | ||
| 31 | |||
| 32 | #elif defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) | ||
| 33 | |||
| 34 | #include <math.h> | ||
| 35 | #include <stdint.h> | ||
| 36 | |||
| 37 | /* This is in accordance with the IEC 559 double-precision format. | ||
| 38 | * Be advised that due to the hidden bit, the higher half actually has 26 bits. | ||
| 39 | * Multiplying two 27-bit numbers will cause a 1-ULP error, which we cannot | ||
| 40 | * avoid. It is kept in the very last position. | ||
| 41 | */ | ||
| 42 | typedef union iec559_double_ { | ||
| 43 | struct __attribute__((__packed__)) { | ||
| 44 | uint64_t mlo : 27; | ||
| 45 | uint64_t mhi : 25; | ||
| 46 | uint64_t exp : 11; | ||
| 47 | uint64_t sgn : 1; | ||
| 48 | }; | ||
| 49 | double f; | ||
| 50 | } iec559_double; | ||
| 51 | |||
| 52 | static inline void break_down(iec559_double *restrict lo, iec559_double *restrict hi, double x) { | ||
| 53 | hi->f = x; | ||
| 54 | /* Erase low-order significant bits. `hi->f` now has only 26 significant bits. */ | ||
| 55 | hi->mlo = 0; | ||
| 56 | /* Store the low-order half. It will be normalized by the hardware. */ | ||
| 57 | lo->f = x - hi->f; | ||
| 58 | /* Preserve signness in case of zero. */ | ||
| 59 | lo->sgn = hi->sgn; | ||
| 60 | } | ||
| 61 | |||
| 62 | double fma(double x, double y, double z) { | ||
| 63 | /* | ||
| 64 | POSIX-2013: | ||
| 65 | 1. If x or y are NaN, a NaN shall be returned. | ||
| 66 | 2. If x multiplied by y is an exact infinity and z is also an infinity | ||
| 67 | but with the opposite sign, a domain error shall occur, and either a NaN | ||
| 68 | (if supported), or an implementation-defined value shall be returned. | ||
| 69 | 3. If one of x and y is infinite, the other is zero, and z is not a NaN, | ||
| 70 | a domain error shall occur, and either a NaN (if supported), or an | ||
| 71 | implementation-defined value shall be returned. | ||
| 72 | 4. If one of x and y is infinite, the other is zero, and z is a NaN, a NaN | ||
| 73 | shall be returned and a domain error may occur. | ||
| 74 | 5. If x* y is not 0*Inf nor Inf*0 and z is a NaN, a NaN shall be returned. | ||
| 75 | */ | ||
| 76 | /* Check whether the result is finite. */ | ||
| 77 | double ret = x * y + z; | ||
| 78 | if(!isfinite(ret)) { | ||
| 79 | return ret; /* If this naive check doesn't yield a finite value, the FMA isn't | ||
| 80 | likely to return one either. Forward the value as is. */ | ||
| 81 | } | ||
| 82 | iec559_double xlo, xhi, ylo, yhi; | ||
| 83 | break_down(&xlo, &xhi, x); | ||
| 84 | break_down(&ylo, &yhi, y); | ||
| 85 | /* The order of these four statements is essential. Don't move them around. */ | ||
| 86 | ret = z; | ||
| 87 | ret += xhi.f * yhi.f; /* The most significant item comes first. */ | ||
| 88 | ret += xhi.f * ylo.f + xlo.f * yhi.f; /* They are equally significant. */ | ||
| 89 | ret += xlo.f * ylo.f; /* The least significant item comes last. */ | ||
| 90 | return ret; | ||
| 91 | } | ||
| 92 | |||
| 93 | #else | ||
| 94 | |||
| 95 | #error Please add FMA implementation for this platform. | ||
| 96 | |||
| 97 | #endif | ||
lib/libc/mingw/math/fmaf.c deleted-97| ... | @@ -1,97 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | float fmaf(float x, float y, float z); | ||
| 7 | |||
| 8 | #if defined(_ARM_) || defined(__arm__) | ||
| 9 | |||
| 10 | /* Use hardware FMA on ARM. */ | ||
| 11 | float fmaf(float x, float y, float z){ | ||
| 12 | __asm__ ( | ||
| 13 | "fmacs %0, %1, %2 \n" | ||
| 14 | : "+t"(z) | ||
| 15 | : "t"(x), "t"(y) | ||
| 16 | ); | ||
| 17 | return z; | ||
| 18 | } | ||
| 19 | |||
| 20 | #elif defined(_ARM64_) || defined(__aarch64__) | ||
| 21 | |||
| 22 | /* Use hardware FMA on ARM64. */ | ||
| 23 | float fmaf(float x, float y, float z){ | ||
| 24 | __asm__ ( | ||
| 25 | "fmadd %s0, %s1, %s2, %s0 \n" | ||
| 26 | : "+w"(z) | ||
| 27 | : "w"(x), "w"(y) | ||
| 28 | ); | ||
| 29 | return z; | ||
| 30 | } | ||
| 31 | |||
| 32 | #elif defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) | ||
| 33 | |||
| 34 | #include <math.h> | ||
| 35 | #include <stdint.h> | ||
| 36 | |||
| 37 | /* This is in accordance with the IEC 559 single-precision format. | ||
| 38 | * Be advised that due to the hidden bit, the higher half actually has 11 bits. | ||
| 39 | * Multiplying two 13-bit numbers will cause a 1-ULP error, which we cannot | ||
| 40 | * avoid. It is kept in the very last position. | ||
| 41 | */ | ||
| 42 | typedef union iec559_float_ { | ||
| 43 | struct __attribute__((__packed__)) { | ||
| 44 | uint32_t mlo : 13; | ||
| 45 | uint32_t mhi : 10; | ||
| 46 | uint32_t exp : 8; | ||
| 47 | uint32_t sgn : 1; | ||
| 48 | }; | ||
| 49 | float f; | ||
| 50 | } iec559_float; | ||
| 51 | |||
| 52 | static inline void break_down(iec559_float *restrict lo, iec559_float *restrict hi, float x) { | ||
| 53 | hi->f = x; | ||
| 54 | /* Erase low-order significant bits. `hi->f` now has only 11 significant bits. */ | ||
| 55 | hi->mlo = 0; | ||
| 56 | /* Store the low-order half. It will be normalized by the hardware. */ | ||
| 57 | lo->f = x - hi->f; | ||
| 58 | /* Preserve signness in case of zero. */ | ||
| 59 | lo->sgn = hi->sgn; | ||
| 60 | } | ||
| 61 | |||
| 62 | float fmaf(float x, float y, float z) { | ||
| 63 | /* | ||
| 64 | POSIX-2013: | ||
| 65 | 1. If x or y are NaN, a NaN shall be returned. | ||
| 66 | 2. If x multiplied by y is an exact infinity and z is also an infinity | ||
| 67 | but with the opposite sign, a domain error shall occur, and either a NaN | ||
| 68 | (if supported), or an implementation-defined value shall be returned. | ||
| 69 | 3. If one of x and y is infinite, the other is zero, and z is not a NaN, | ||
| 70 | a domain error shall occur, and either a NaN (if supported), or an | ||
| 71 | implementation-defined value shall be returned. | ||
| 72 | 4. If one of x and y is infinite, the other is zero, and z is a NaN, a NaN | ||
| 73 | shall be returned and a domain error may occur. | ||
| 74 | 5. If x* y is not 0*Inf nor Inf*0 and z is a NaN, a NaN shall be returned. | ||
| 75 | */ | ||
| 76 | /* Check whether the result is finite. */ | ||
| 77 | float ret = x * y + z; | ||
| 78 | if(!isfinite(ret)) { | ||
| 79 | return ret; /* If this naive check doesn't yield a finite value, the FMA isn't | ||
| 80 | likely to return one either. Forward the value as is. */ | ||
| 81 | } | ||
| 82 | iec559_float xlo, xhi, ylo, yhi; | ||
| 83 | break_down(&xlo, &xhi, x); | ||
| 84 | break_down(&ylo, &yhi, y); | ||
| 85 | /* The order of these four statements is essential. Don't move them around. */ | ||
| 86 | ret = z; | ||
| 87 | ret += xhi.f * yhi.f; /* The most significant item comes first. */ | ||
| 88 | ret += xhi.f * ylo.f + xlo.f * yhi.f; /* They are equally significant. */ | ||
| 89 | ret += xlo.f * ylo.f; /* The least significant item comes last. */ | ||
| 90 | return ret; | ||
| 91 | } | ||
| 92 | |||
| 93 | #else | ||
| 94 | |||
| 95 | #error Please add FMA implementation for this platform. | ||
| 96 | |||
| 97 | #endif | ||
lib/libc/mingw/math/fmax.c deleted-12| ... | @@ -1,12 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | double | ||
| 9 | fmax (double _x, double _y) | ||
| 10 | { | ||
| 11 | return ( isgreaterequal (_x, _y)|| __isnan (_y) ? _x : _y ); | ||
| 12 | } | ||
lib/libc/mingw/math/fmaxf.c deleted-12| ... | @@ -1,12 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | float | ||
| 9 | fmaxf (float _x, float _y) | ||
| 10 | { | ||
| 11 | return (( isgreaterequal(_x, _y) || __isnanf (_y)) ? _x : _y ); | ||
| 12 | } | ||
lib/libc/mingw/math/fmin.c deleted-12| ... | @@ -1,12 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | double | ||
| 9 | fmin (double _x, double _y) | ||
| 10 | { | ||
| 11 | return ((islessequal(_x, _y) || __isnan (_y)) ? _x : _y ); | ||
| 12 | } | ||
lib/libc/mingw/math/fminf.c deleted-12| ... | @@ -1,12 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | float | ||
| 9 | fminf (float _x, float _y) | ||
| 10 | { | ||
| 11 | return ((islessequal(_x, _y) || __isnanf (_y)) ? _x : _y ); | ||
| 12 | } | ||
lib/libc/mingw/math/frexp.c deleted-64| ... | @@ -1,64 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | double frexp(double value, int* exp); | ||
| 7 | |||
| 8 | #if defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__) || \ | ||
| 9 | defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) | ||
| 10 | |||
| 11 | #include <stdint.h> | ||
| 12 | |||
| 13 | /* It is assumed that `double` conforms to IEEE 754 and is little-endian. | ||
| 14 | * This is true on x86 and ARM. */ | ||
| 15 | |||
| 16 | typedef union ieee754_double_ { | ||
| 17 | struct __attribute__((__packed__)) { | ||
| 18 | uint64_t f52 : 52; | ||
| 19 | uint64_t exp : 11; | ||
| 20 | uint64_t sgn : 1; | ||
| 21 | }; | ||
| 22 | double f; | ||
| 23 | } ieee754_double; | ||
| 24 | |||
| 25 | double frexp(double value, int* exp) | ||
| 26 | { | ||
| 27 | int n; | ||
| 28 | ieee754_double reg; | ||
| 29 | reg.f = value; | ||
| 30 | if(reg.exp == 0x7FF) { | ||
| 31 | /* The value is an infinity or NaN. | ||
| 32 | * Store zero in `*exp`. Return the value as is. */ | ||
| 33 | *exp = 0; | ||
| 34 | return reg.f; | ||
| 35 | } | ||
| 36 | if(reg.exp != 0) { | ||
| 37 | /* The value is normalized. | ||
| 38 | * Extract and zero out the exponent. */ | ||
| 39 | *exp = reg.exp - 0x3FE; | ||
| 40 | reg.exp = 0x3FE; | ||
| 41 | return reg.f; | ||
| 42 | } | ||
| 43 | if(reg.f52 == 0) { | ||
| 44 | /* The value is zero. | ||
| 45 | * Store zero in `*exp`. Return the value as is. | ||
| 46 | * Note the signness. */ | ||
| 47 | *exp = 0; | ||
| 48 | return reg.f; | ||
| 49 | } | ||
| 50 | /* The value is denormalized. | ||
| 51 | * Extract the exponent, normalize the value, then zero out | ||
| 52 | * the exponent. Note that the hidden bit is removed. */ | ||
| 53 | n = __builtin_clzll(reg.f52) - 11; | ||
| 54 | reg.f52 <<= n; | ||
| 55 | *exp = 1 - 0x3FE - n; | ||
| 56 | reg.exp = 0x3FE; | ||
| 57 | return reg.f; | ||
| 58 | } | ||
| 59 | |||
| 60 | #else | ||
| 61 | |||
| 62 | #error Please add `frexp()` implementation for this platform. | ||
| 63 | |||
| 64 | #endif | ||
lib/libc/mingw/math/hypot.c deleted-23| ... | @@ -1,23 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file is part of the mingw-w64 runtime package. | ||
| 3 | * No warranty is given; refer to the file DISCLAIMER within this package. | ||
| 4 | */ | ||
| 5 | #define _NEW_COMPLEX_DOUBLE 1 | ||
| 6 | |||
| 7 | #include "../complex/complex_internal.h" | ||
| 8 | #include <errno.h> | ||
| 9 | #include <math.h> | ||
| 10 | |||
| 11 | double hypot (double x, double y) | ||
| 12 | { | ||
| 13 | int x_class = fpclassify (x); | ||
| 14 | int y_class = fpclassify (y); | ||
| 15 | |||
| 16 | if (x_class == FP_INFINITE || y_class == FP_INFINITE) | ||
| 17 | return __FLT_HUGE_VAL; | ||
| 18 | else if (x_class == FP_NAN || y_class == FP_NAN) | ||
| 19 | return __FLT_NAN; | ||
| 20 | |||
| 21 | return _hypot (x, y); | ||
| 22 | } | ||
| 23 | |||
lib/libc/mingw/math/llrint.c deleted-42| ... | @@ -1,42 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <fenv.h> | ||
| 8 | |||
| 9 | long long llrint (double x) | ||
| 10 | { | ||
| 11 | long long retval = 0ll; | ||
| 12 | #if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) | ||
| 13 | __asm__ __volatile__ ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); | ||
| 14 | #else | ||
| 15 | int mode = fegetround(); | ||
| 16 | if (mode == FE_DOWNWARD) | ||
| 17 | retval = (long long)floor(x); | ||
| 18 | else if (mode == FE_UPWARD) | ||
| 19 | retval = (long long)ceil(x); | ||
| 20 | else if (mode == FE_TOWARDZERO) | ||
| 21 | retval = x >= 0 ? (long long)floor(x) : (long long)ceil(x); | ||
| 22 | else { | ||
| 23 | // Break `x` into integral and fractional parts. | ||
| 24 | double intg, frac; | ||
| 25 | frac = modf(x, &intg); | ||
| 26 | frac = fabs(frac); | ||
| 27 | // Convert the truncated integral part to an integer. | ||
| 28 | retval = intg; | ||
| 29 | if (frac < 0.5) { | ||
| 30 | // Round towards zero. | ||
| 31 | } else if (frac > 0.5) { | ||
| 32 | // Round towards infinities. | ||
| 33 | retval += signbit(x) ? -1 : 1; | ||
| 34 | } else { | ||
| 35 | // Round to the nearest even number. | ||
| 36 | retval += retval % 2; | ||
| 37 | } | ||
| 38 | } | ||
| 39 | #endif | ||
| 40 | return retval; | ||
| 41 | } | ||
| 42 | |||
lib/libc/mingw/math/llrintf.c deleted-41| ... | @@ -1,41 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <fenv.h> | ||
| 8 | |||
| 9 | long long llrintf (float x) | ||
| 10 | { | ||
| 11 | long long retval = 0ll; | ||
| 12 | #if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) | ||
| 13 | __asm__ __volatile__ ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); | ||
| 14 | #else | ||
| 15 | int mode = fegetround(); | ||
| 16 | if (mode == FE_DOWNWARD) | ||
| 17 | retval = (long long)floorf(x); | ||
| 18 | else if (mode == FE_UPWARD) | ||
| 19 | retval = (long long)ceilf(x); | ||
| 20 | else if (mode == FE_TOWARDZERO) | ||
| 21 | retval = x >= 0 ? (long long)floorf(x) : (long long)ceilf(x); | ||
| 22 | else { | ||
| 23 | // Break `x` into integral and fractional parts. | ||
| 24 | float intg, frac; | ||
| 25 | frac = modff(x, &intg); | ||
| 26 | frac = fabsf(frac); | ||
| 27 | // Convert the truncated integral part to an integer. | ||
| 28 | retval = intg; | ||
| 29 | if (frac < 0.5) { | ||
| 30 | // Round towards zero. | ||
| 31 | } else if (frac > 0.5) { | ||
| 32 | // Round towards infinities. | ||
| 33 | retval += signbit(x) ? -1 : 1; | ||
| 34 | } else { | ||
| 35 | // Round to the nearest even number. | ||
| 36 | retval += retval % 2; | ||
| 37 | } | ||
| 38 | } | ||
| 39 | #endif | ||
| 40 | return retval; | ||
| 41 | } | ||
lib/libc/mingw/math/llround.c deleted-38| ... | @@ -1,38 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <limits.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | long long | ||
| 11 | llround (double x) | ||
| 12 | { | ||
| 13 | double res; | ||
| 14 | |||
| 15 | if (x >= 0.0) | ||
| 16 | { | ||
| 17 | 	 res = ceil (x); | ||
| 18 | 	 if (res - x > 0.5) | ||
| 19 | 	 res -= 1.0; | ||
| 20 | } | ||
| 21 | else | ||
| 22 | { | ||
| 23 | res = ceil (-x); | ||
| 24 | if (res + x > 0.5) | ||
| 25 | 	 res -= 1.0; | ||
| 26 | res = -res; | ||
| 27 | } | ||
| 28 | if (!isfinite (res) | ||
| 29 | || res > (double) LONG_LONG_MAX | ||
| 30 | || res < (double) LONG_LONG_MIN) | ||
| 31 | { | ||
| 32 | errno = ERANGE; | ||
| 33 | /* Undefined behaviour, so we could return anything. */ | ||
| 34 | /* return res > 0.0 ? LONG_LONG_MAX : LONG_LONG_MIN; */ | ||
| 35 | } | ||
| 36 | return (long long) res; | ||
| 37 | } | ||
| 38 | |||
lib/libc/mingw/math/llroundf.c deleted-38| ... | @@ -1,38 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <limits.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | long long | ||
| 11 | llroundf (float x) | ||
| 12 | { | ||
| 13 | float res; | ||
| 14 | |||
| 15 | if (x >= 0.0F) | ||
| 16 | { | ||
| 17 | res = ceilf (x); | ||
| 18 | if (res - x > 0.5F) | ||
| 19 | res -= 1.0F; | ||
| 20 | } | ||
| 21 | else | ||
| 22 | { | ||
| 23 | res = ceilf (-x); | ||
| 24 | if (res + x > 0.5F) | ||
| 25 | res -= 1.0F; | ||
| 26 | res = -res; | ||
| 27 | } | ||
| 28 | if (!isfinite (res) | ||
| 29 | || res > (float) LONG_LONG_MAX | ||
| 30 | || res < (float) LONG_LONG_MIN) | ||
| 31 | { | ||
| 32 | errno = ERANGE; | ||
| 33 | /* Undefined behaviour, so we could return anything. */ | ||
| 34 | /* return res > 0.0F ? LONG_LONG_MAX : LONG_LONG_MIN; */ | ||
| 35 | } | ||
| 36 | return (long long) res; | ||
| 37 | } | ||
| 38 | |||
lib/libc/mingw/math/lrint.c deleted-32| ... | @@ -1,32 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 9 | #include <xmmintrin.h> | ||
| 10 | #endif | ||
| 11 | |||
| 12 | long lrint (double x) | ||
| 13 | { | ||
| 14 | long retval = 0L; | ||
| 15 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 16 | retval = _mm_cvtsd_si32(_mm_load_sd(&x)); | ||
| 17 | #elif defined(_X86_) || defined(__i386__) | ||
| 18 | __asm__ __volatile__ ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); | ||
| 19 | #elif defined(__arm__) || defined(_ARM_) | ||
| 20 | float temp; | ||
| 21 | __asm__ __volatile__ ( | ||
| 22 | "vcvtr.s32.f64 %[tmp], %[src]\n\t" | ||
| 23 | "fmrs %[dst], %[tmp]\n\t" | ||
| 24 | : [dst] "=r" (retval), [tmp] "=t" (temp) : [src] "w" (x)); | ||
| 25 | #elif defined(__aarch64__) || defined(_ARM64_) | ||
| 26 | __asm__ __volatile__ ( | ||
| 27 | "frintx %d1, %d1\n\t" | ||
| 28 | "fcvtzs %w0, %d1\n\t" | ||
| 29 | : "=r" (retval), "+w" (x)); | ||
| 30 | #endif | ||
| 31 | return retval; | ||
| 32 | } | ||
lib/libc/mingw/math/lrintf.c deleted-31| ... | @@ -1,31 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 9 | #include <xmmintrin.h> | ||
| 10 | #endif | ||
| 11 | |||
| 12 | long lrintf (float x) | ||
| 13 | { | ||
| 14 | long retval = 0l; | ||
| 15 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 16 | retval = _mm_cvtss_si32(_mm_load_ss(&x)); | ||
| 17 | #elif defined(_X86_) || defined(__i386__) | ||
| 18 | __asm__ __volatile__ ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); | ||
| 19 | #elif defined(__arm__) || defined(_ARM_) | ||
| 20 | __asm__ __volatile__ ( | ||
| 21 | "vcvtr.s32.f32 %[src], %[src]\n\t" | ||
| 22 | "fmrs %[dst], %[src]\n\t" | ||
| 23 | : [dst] "=r" (retval), [src] "+w" (x)); | ||
| 24 | #elif defined(__aarch64__) || defined(_ARM64_) | ||
| 25 | __asm__ __volatile__ ( | ||
| 26 | "frintx %s1, %s1\n\t" | ||
| 27 | "fcvtzs %w0, %s1\n\t" | ||
| 28 | : "=r" (retval), "+w" (x)); | ||
| 29 | #endif | ||
| 30 | return retval; | ||
| 31 | } | ||
lib/libc/mingw/math/lround.c deleted-37| ... | @@ -1,37 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <limits.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | long | ||
| 11 | lround (double x) | ||
| 12 | { | ||
| 13 | double res; | ||
| 14 | |||
| 15 | if (x >= 0.0) | ||
| 16 | { | ||
| 17 | res = ceil (x); | ||
| 18 | if (res - x > 0.5) | ||
| 19 | 	res -= 1.0; | ||
| 20 | } | ||
| 21 | else | ||
| 22 | { | ||
| 23 | res = ceil (-x); | ||
| 24 | if (res + x > 0.5) | ||
| 25 | 	res -= 1.0; | ||
| 26 | res = -res; | ||
| 27 | } | ||
| 28 | if (!isfinite (res) | ||
| 29 | || res > (double) LONG_MAX | ||
| 30 | || res < (double) LONG_MIN) | ||
| 31 | { | ||
| 32 | errno = ERANGE; | ||
| 33 | /* Undefined behaviour, so we could return anything. */ | ||
| 34 | /* return res > 0.0 ? LONG_MAX : LONG_MIN; */ | ||
| 35 | } | ||
| 36 | return (long) res; | ||
| 37 | } | ||
lib/libc/mingw/math/lroundf.c deleted-37| ... | @@ -1,37 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <limits.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | long | ||
| 11 | lroundf (float x) | ||
| 12 | { | ||
| 13 | float res; | ||
| 14 | |||
| 15 | if (x >= 0.0F) | ||
| 16 | { | ||
| 17 | res = ceilf (x); | ||
| 18 | if (res - x > 0.5F) | ||
| 19 | 	res -= 1.0F; | ||
| 20 | } | ||
| 21 | else | ||
| 22 | { | ||
| 23 | res = ceilf (-x); | ||
| 24 | if (res + x > 0.5F) | ||
| 25 | 	res -= 1.0F; | ||
| 26 | res = -res; | ||
| 27 | } | ||
| 28 | if (!isfinite (res) | ||
| 29 | || res > (float) LONG_MAX | ||
| 30 | || res < (float) LONG_MIN) | ||
| 31 | { | ||
| 32 | errno = ERANGE; | ||
| 33 | /* Undefined behaviour, so we could return anything. */ | ||
| 34 | /* return res > 0.0F ? LONG_MAX : LONG_MIN; */ | ||
| 35 | } | ||
| 36 | return (long) res; | ||
| 37 | } | ||
lib/libc/mingw/math/modf.c deleted-41| ... | @@ -1,41 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <fenv.h> | ||
| 7 | #include <math.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | double | ||
| 11 | modf (double value, double* iptr) | ||
| 12 | { | ||
| 13 | double int_part = 0.0; | ||
| 14 | /* truncate */ | ||
| 15 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 16 | asm volatile ("subq $8, %%rsp\n" | ||
| 17 | "fnstcw 4(%%rsp)\n" | ||
| 18 | "movzwl 4(%%rsp), %%eax\n" | ||
| 19 | "orb $12, %%ah\n" | ||
| 20 | "movw %%ax, (%%rsp)\n" | ||
| 21 | "fldcw (%%rsp)\n" | ||
| 22 | "frndint\n" | ||
| 23 | "fldcw 4(%%rsp)\n" | ||
| 24 | "addq $8, %%rsp\n" : "=t" (int_part) : "0" (value) : "eax"); /* round */ | ||
| 25 | #elif defined(_X86_) || defined(__i386__) | ||
| 26 | asm volatile ("push %%eax\n\tsubl $8, %%esp\n" | ||
| 27 | "fnstcw 4(%%esp)\n" | ||
| 28 | "movzwl 4(%%esp), %%eax\n" | ||
| 29 | "orb $12, %%ah\n" | ||
| 30 | "movw %%ax, (%%esp)\n" | ||
| 31 | "fldcw (%%esp)\n" | ||
| 32 | "frndint\n" | ||
| 33 | "fldcw 4(%%esp)\n" | ||
| 34 | "addl $8, %%esp\n\tpop %%eax\n" : "=t" (int_part) : "0" (value) : "eax"); /* round */ | ||
| 35 | #else | ||
| 36 | int_part = trunc(value); | ||
| 37 | #endif | ||
| 38 | if (iptr) | ||
| 39 | *iptr = int_part; | ||
| 40 | return (isinf (value) ? 0.0 : value - int_part); | ||
| 41 | } | ||
lib/libc/mingw/math/nextafterf.c deleted-32| ... | @@ -1,32 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | float | ||
| 9 | nextafterf (float x, float y) | ||
| 10 | { | ||
| 11 | union | ||
| 12 | { | ||
| 13 | float f; | ||
| 14 | unsigned int i; | ||
| 15 | } u; | ||
| 16 | if (isnan (y) || isnan (x)) | ||
| 17 | return x + y; | ||
| 18 | if (x == y ) | ||
| 19 | /* nextafter (0.0, -O.0) should return -0.0. */ | ||
| 20 | return y; | ||
| 21 | u.f = x; | ||
| 22 | if (x == 0.0F) | ||
| 23 | { | ||
| 24 | u.i = 1; | ||
| 25 | return y > 0.0F ? u.f : -u.f; | ||
| 26 | } | ||
| 27 | if (((x > 0.0F) ^ (y > x)) == 0) | ||
| 28 | u.i++; | ||
| 29 | else | ||
| 30 | u.i--; | ||
| 31 | return u.f; | ||
| 32 | } | ||
lib/libc/mingw/math/round.c deleted-26| ... | @@ -1,26 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | double | ||
| 9 | round (double x) | ||
| 10 | { | ||
| 11 | double res; | ||
| 12 | if (x >= 0.0) | ||
| 13 | { | ||
| 14 | res = ceil (x); | ||
| 15 | if (res - x > 0.5) | ||
| 16 | 	res -= 1.0; | ||
| 17 | } | ||
| 18 | else | ||
| 19 | { | ||
| 20 | res = ceil (-x); | ||
| 21 | if (res + x > 0.5) | ||
| 22 | 	res -= 1.0; | ||
| 23 | res = -res; | ||
| 24 | } | ||
| 25 | return res; | ||
| 26 | } | ||
lib/libc/mingw/math/roundf.c deleted-26| ... | @@ -1,26 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | float | ||
| 9 | roundf (float x) | ||
| 10 | { | ||
| 11 | float res; | ||
| 12 | if (x >= 0.0F) | ||
| 13 | { | ||
| 14 | res = ceilf (x); | ||
| 15 | if (res - x > 0.5F) | ||
| 16 | 	res -= 1.0F; | ||
| 17 | } | ||
| 18 | else | ||
| 19 | { | ||
| 20 | res = ceilf (-x); | ||
| 21 | if (res + x > 0.5F) | ||
| 22 | 	res -= 1.0F; | ||
| 23 | res = -res; | ||
| 24 | } | ||
| 25 | return res; | ||
| 26 | } | ||
lib/libc/mingw/math/s_erf.c deleted-347| ... | @@ -1,347 +0,0 @@ | ||
| 1 | /* @(#)s_erf.c 1.3 95/01/18 */ | ||
| 2 | /* | ||
| 3 | * ==================================================== | ||
| 4 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | ||
| 5 | * | ||
| 6 | * Developed at SunSoft, a Sun Microsystems, Inc. business. | ||
| 7 | * Permission to use, copy, modify, and distribute this | ||
| 8 | * software is freely granted, provided that this notice | ||
| 9 | * is preserved. | ||
| 10 | * ==================================================== | ||
| 11 | */ | ||
| 12 | |||
| 13 | /* double erf(double x) | ||
| 14 | * double erfc(double x) | ||
| 15 | *			 x | ||
| 16 | *		 2 |\ | ||
| 17 | * erf(x) = --------- | exp(-t*t)dt | ||
| 18 | *	 	 sqrt(pi) \| | ||
| 19 | *			 0 | ||
| 20 | * | ||
| 21 | * erfc(x) = 1-erf(x) | ||
| 22 | * Note that | ||
| 23 | *		erf(-x) = -erf(x) | ||
| 24 | *		erfc(-x) = 2 - erfc(x) | ||
| 25 | * | ||
| 26 | * Method: | ||
| 27 | *	1. For |x| in [0, 0.84375] | ||
| 28 | *	 erf(x) = x + x*R(x^2) | ||
| 29 | * erfc(x) = 1 - erf(x) if x in [-.84375,0.25] | ||
| 30 | * = 0.5 + ((0.5-x)-x*R) if x in [0.25,0.84375] | ||
| 31 | *	 where R = P/Q where P is an odd poly of degree 8 and | ||
| 32 | *	 Q is an odd poly of degree 10. | ||
| 33 | *						 -57.90 | ||
| 34 | *			| R - (erf(x)-x)/x | <= 2 | ||
| 35 | * | ||
| 36 | *	 Remark. The formula is derived by noting | ||
| 37 | * erf(x) = (2/sqrt(pi))*(x - x^3/3 + x^5/10 - x^7/42 + ....) | ||
| 38 | *	 and that | ||
| 39 | * 2/sqrt(pi) = 1.128379167095512573896158903121545171688 | ||
| 40 | *	 is close to one. The interval is chosen because the fix | ||
| 41 | *	 point of erf(x) is near 0.6174 (i.e., erf(x)=x when x is | ||
| 42 | *	 near 0.6174), and by some experiment, 0.84375 is chosen to | ||
| 43 | *	 guarantee the error is less than one ulp for erf. | ||
| 44 | * | ||
| 45 | *	2. For |x| in [0.84375,1.25], let s = |x| - 1, and | ||
| 46 | * c = 0.84506291151 rounded to single (24 bits) | ||
| 47 | *		erf(x) = sign(x) * (c + P1(s)/Q1(s)) | ||
| 48 | *		erfc(x) = (1-c) - P1(s)/Q1(s) if x > 0 | ||
| 49 | *			 1+(c+P1(s)/Q1(s)) if x < 0 | ||
| 50 | *		|P1/Q1 - (erf(|x|)-c)| <= 2**-59.06 | ||
| 51 | *	 Remark: here we use the taylor series expansion at x=1. | ||
| 52 | *		erf(1+s) = erf(1) + s*Poly(s) | ||
| 53 | *			 = 0.845.. + P1(s)/Q1(s) | ||
| 54 | *	 That is, we use rational approximation to approximate | ||
| 55 | *			erf(1+s) - (c = (single)0.84506291151) | ||
| 56 | *	 Note that |P1/Q1|< 0.078 for x in [0.84375,1.25] | ||
| 57 | *	 where | ||
| 58 | *		P1(s) = degree 6 poly in s | ||
| 59 | *		Q1(s) = degree 6 poly in s | ||
| 60 | * | ||
| 61 | *	3. For x in [1.25,1/0.35(~2.857143)], | ||
| 62 | *		erfc(x) = (1/x)*exp(-x*x-0.5625+R1/S1) | ||
| 63 | *		erf(x) = 1 - erfc(x) | ||
| 64 | *	 where | ||
| 65 | *		R1(z) = degree 7 poly in z, (z=1/x^2) | ||
| 66 | *		S1(z) = degree 8 poly in z | ||
| 67 | * | ||
| 68 | *	4. For x in [1/0.35,28] | ||
| 69 | *		erfc(x) = (1/x)*exp(-x*x-0.5625+R2/S2) if x > 0 | ||
| 70 | *			= 2.0 - (1/x)*exp(-x*x-0.5625+R2/S2) if -6<x<0 | ||
| 71 | *			= 2.0 - tiny		(if x <= -6) | ||
| 72 | *		erf(x) = sign(x)*(1.0 - erfc(x)) if x < 6, else | ||
| 73 | *		erf(x) = sign(x)*(1.0 - tiny) | ||
| 74 | *	 where | ||
| 75 | *		R2(z) = degree 6 poly in z, (z=1/x^2) | ||
| 76 | *		S2(z) = degree 7 poly in z | ||
| 77 | * | ||
| 78 | *	Note1: | ||
| 79 | *	 To compute exp(-x*x-0.5625+R/S), let s be a single | ||
| 80 | *	 precision number and s := x; then | ||
| 81 | *		-x*x = -s*s + (s-x)*(s+x) | ||
| 82 | *		exp(-x*x-0.5626+R/S) = | ||
| 83 | *			exp(-s*s-0.5625)*exp((s-x)*(s+x)+R/S); | ||
| 84 | *	Note2: | ||
| 85 | *	 Here 4 and 5 make use of the asymptotic series | ||
| 86 | *			 exp(-x*x) | ||
| 87 | *		erfc(x) ~ ---------- * ( 1 + Poly(1/x^2) ) | ||
| 88 | *			 x*sqrt(pi) | ||
| 89 | *	 We use rational approximation to approximate | ||
| 90 | *		g(s)=f(1/x^2) = log(erfc(x)*x) - x*x + 0.5625 | ||
| 91 | *	 Here is the error bound for R1/S1 and R2/S2 | ||
| 92 | *		|R1/S1 - f(x)| < 2**(-62.57) | ||
| 93 | *		|R2/S2 - f(x)| < 2**(-61.52) | ||
| 94 | * | ||
| 95 | *	5. For inf > x >= 28 | ||
| 96 | *		erf(x) = sign(x) *(1 - tiny) (raise inexact) | ||
| 97 | *		erfc(x) = tiny*tiny (raise underflow) if x > 0 | ||
| 98 | *			= 2 - tiny if x<0 | ||
| 99 | * | ||
| 100 | *	7. Special case: | ||
| 101 | *		erf(0) = 0, erf(inf) = 1, erf(-inf) = -1, | ||
| 102 | *		erfc(0) = 1, erfc(inf) = 0, erfc(-inf) = 2, | ||
| 103 | *		erfc/erf(NaN) is NaN | ||
| 104 | */ | ||
| 105 | |||
| 106 | |||
| 107 | /* #include "fdlibm.h" */ | ||
| 108 | |||
| 109 | #include <math.h> | ||
| 110 | #include <stdint.h> | ||
| 111 | #include <errno.h> | ||
| 112 | |||
| 113 | #define __ieee754_exp exp | ||
| 114 | |||
| 115 | typedef union | ||
| 116 | { | ||
| 117 | double value; | ||
| 118 | struct | ||
| 119 | { | ||
| 120 | uint32_t lsw; | ||
| 121 | uint32_t msw; | ||
| 122 | } parts; | ||
| 123 | } ieee_double_shape_type; | ||
| 124 | |||
| 125 | |||
| 126 | static inline int __get_hi_word(const double x) | ||
| 127 | { | ||
| 128 | ieee_double_shape_type u; | ||
| 129 | u.value = x; | ||
| 130 | return u.parts.msw; | ||
| 131 | } | ||
| 132 | |||
| 133 | static inline void __trunc_lo_word(double *x) | ||
| 134 | { | ||
| 135 | ieee_double_shape_type u; | ||
| 136 | u.value = *x; | ||
| 137 | u.parts.lsw = 0; | ||
| 138 | *x = u.value; | ||
| 139 | } | ||
| 140 | |||
| 141 | |||
| 142 | static const double | ||
| 143 | tiny= 1e-300, | ||
| 144 | half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ | ||
| 145 | one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ | ||
| 146 | two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */ | ||
| 147 | /* c = (float)0.84506291151 */ | ||
| 148 | erx = 8.45062911510467529297e-01, /* 0x3FEB0AC1, 0x60000000 */ | ||
| 149 | /* | ||
| 150 | * Coefficients for approximation to erf on [0,0.84375] | ||
| 151 | */ | ||
| 152 | efx = 1.28379167095512586316e-01, /* 0x3FC06EBA, 0x8214DB69 */ | ||
| 153 | efx8= 1.02703333676410069053e+00, /* 0x3FF06EBA, 0x8214DB69 */ | ||
| 154 | pp0 = 1.28379167095512558561e-01, /* 0x3FC06EBA, 0x8214DB68 */ | ||
| 155 | pp1 = -3.25042107247001499370e-01, /* 0xBFD4CD7D, 0x691CB913 */ | ||
| 156 | pp2 = -2.84817495755985104766e-02, /* 0xBF9D2A51, 0xDBD7194F */ | ||
| 157 | pp3 = -5.77027029648944159157e-03, /* 0xBF77A291, 0x236668E4 */ | ||
| 158 | pp4 = -2.37630166566501626084e-05, /* 0xBEF8EAD6, 0x120016AC */ | ||
| 159 | qq1 = 3.97917223959155352819e-01, /* 0x3FD97779, 0xCDDADC09 */ | ||
| 160 | qq2 = 6.50222499887672944485e-02, /* 0x3FB0A54C, 0x5536CEBA */ | ||
| 161 | qq3 = 5.08130628187576562776e-03, /* 0x3F74D022, 0xC4D36B0F */ | ||
| 162 | qq4 = 1.32494738004321644526e-04, /* 0x3F215DC9, 0x221C1A10 */ | ||
| 163 | qq5 = -3.96022827877536812320e-06, /* 0xBED09C43, 0x42A26120 */ | ||
| 164 | /* | ||
| 165 | * Coefficients for approximation to erf in [0.84375,1.25] | ||
| 166 | */ | ||
| 167 | pa0 = -2.36211856075265944077e-03, /* 0xBF6359B8, 0xBEF77538 */ | ||
| 168 | pa1 = 4.14856118683748331666e-01, /* 0x3FDA8D00, 0xAD92B34D */ | ||
| 169 | pa2 = -3.72207876035701323847e-01, /* 0xBFD7D240, 0xFBB8C3F1 */ | ||
| 170 | pa3 = 3.18346619901161753674e-01, /* 0x3FD45FCA, 0x805120E4 */ | ||
| 171 | pa4 = -1.10894694282396677476e-01, /* 0xBFBC6398, 0x3D3E28EC */ | ||
| 172 | pa5 = 3.54783043256182359371e-02, /* 0x3FA22A36, 0x599795EB */ | ||
| 173 | pa6 = -2.16637559486879084300e-03, /* 0xBF61BF38, 0x0A96073F */ | ||
| 174 | qa1 = 1.06420880400844228286e-01, /* 0x3FBB3E66, 0x18EEE323 */ | ||
| 175 | qa2 = 5.40397917702171048937e-01, /* 0x3FE14AF0, 0x92EB6F33 */ | ||
| 176 | qa3 = 7.18286544141962662868e-02, /* 0x3FB2635C, 0xD99FE9A7 */ | ||
| 177 | qa4 = 1.26171219808761642112e-01, /* 0x3FC02660, 0xE763351F */ | ||
| 178 | qa5 = 1.36370839120290507362e-02, /* 0x3F8BEDC2, 0x6B51DD1C */ | ||
| 179 | qa6 = 1.19844998467991074170e-02, /* 0x3F888B54, 0x5735151D */ | ||
| 180 | /* | ||
| 181 | * Coefficients for approximation to erfc in [1.25,1/0.35] | ||
| 182 | */ | ||
| 183 | ra0 = -9.86494403484714822705e-03, /* 0xBF843412, 0x600D6435 */ | ||
| 184 | ra1 = -6.93858572707181764372e-01, /* 0xBFE63416, 0xE4BA7360 */ | ||
| 185 | ra2 = -1.05586262253232909814e+01, /* 0xC0251E04, 0x41B0E726 */ | ||
| 186 | ra3 = -6.23753324503260060396e+01, /* 0xC04F300A, 0xE4CBA38D */ | ||
| 187 | ra4 = -1.62396669462573470355e+02, /* 0xC0644CB1, 0x84282266 */ | ||
| 188 | ra5 = -1.84605092906711035994e+02, /* 0xC067135C, 0xEBCCABB2 */ | ||
| 189 | ra6 = -8.12874355063065934246e+01, /* 0xC0545265, 0x57E4D2F2 */ | ||
| 190 | ra7 = -9.81432934416914548592e+00, /* 0xC023A0EF, 0xC69AC25C */ | ||
| 191 | sa1 = 1.96512716674392571292e+01, /* 0x4033A6B9, 0xBD707687 */ | ||
| 192 | sa2 = 1.37657754143519042600e+02, /* 0x4061350C, 0x526AE721 */ | ||
| 193 | sa3 = 4.34565877475229228821e+02, /* 0x407B290D, 0xD58A1A71 */ | ||
| 194 | sa4 = 6.45387271733267880336e+02, /* 0x40842B19, 0x21EC2868 */ | ||
| 195 | sa5 = 4.29008140027567833386e+02, /* 0x407AD021, 0x57700314 */ | ||
| 196 | sa6 = 1.08635005541779435134e+02, /* 0x405B28A3, 0xEE48AE2C */ | ||
| 197 | sa7 = 6.57024977031928170135e+00, /* 0x401A47EF, 0x8E484A93 */ | ||
| 198 | sa8 = -6.04244152148580987438e-02, /* 0xBFAEEFF2, 0xEE749A62 */ | ||
| 199 | /* | ||
| 200 | * Coefficients for approximation to erfc in [1/.35,28] | ||
| 201 | */ | ||
| 202 | rb0 = -9.86494292470009928597e-03, /* 0xBF843412, 0x39E86F4A */ | ||
| 203 | rb1 = -7.99283237680523006574e-01, /* 0xBFE993BA, 0x70C285DE */ | ||
| 204 | rb2 = -1.77579549177547519889e+01, /* 0xC031C209, 0x555F995A */ | ||
| 205 | rb3 = -1.60636384855821916062e+02, /* 0xC064145D, 0x43C5ED98 */ | ||
| 206 | rb4 = -6.37566443368389627722e+02, /* 0xC083EC88, 0x1375F228 */ | ||
| 207 | rb5 = -1.02509513161107724954e+03, /* 0xC0900461, 0x6A2E5992 */ | ||
| 208 | rb6 = -4.83519191608651397019e+02, /* 0xC07E384E, 0x9BDC383F */ | ||
| 209 | sb1 = 3.03380607434824582924e+01, /* 0x403E568B, 0x261D5190 */ | ||
| 210 | sb2 = 3.25792512996573918826e+02, /* 0x40745CAE, 0x221B9F0A */ | ||
| 211 | sb3 = 1.53672958608443695994e+03, /* 0x409802EB, 0x189D5118 */ | ||
| 212 | sb4 = 3.19985821950859553908e+03, /* 0x40A8FFB7, 0x688C246A */ | ||
| 213 | sb5 = 2.55305040643316442583e+03, /* 0x40A3F219, 0xCEDF3BE6 */ | ||
| 214 | sb6 = 4.74528541206955367215e+02, /* 0x407DA874, 0xE79FE763 */ | ||
| 215 | sb7 = -2.24409524465858183362e+01; /* 0xC03670E2, 0x42712D62 */ | ||
| 216 | |||
| 217 | |||
| 218 | double erf(double x) | ||
| 219 | { | ||
| 220 | 	int hx, ix, i; | ||
| 221 | 	double R, S, P, Q, s, y, z, r; | ||
| 222 | 	hx = __get_hi_word(x); | ||
| 223 | 	ix = hx & 0x7fffffff; | ||
| 224 | 	if (ix >= 0x7ff00000) {		/* erf(nan)=nan */ | ||
| 225 | 	 i = ((unsigned)hx>>31)<<1; | ||
| 226 | 	 return (double)(1-i)+one/x;	/* erf(+-inf)=+-1 */ | ||
| 227 | 	} | ||
| 228 | |||
| 229 | 	if (ix < 0x3feb0000) {		/* |x|<0.84375 */ | ||
| 230 | 	 if (ix < 0x3e300000) {	/* |x|<2**-28 */ | ||
| 231 | 	 if (ix < 0x00800000) | ||
| 232 | 		 return 0.125*(8.0*x+efx8*x); /*avoid underflow */ | ||
| 233 | 		return x + efx*x; | ||
| 234 | 	 } | ||
| 235 | 	 z = x*x; | ||
| 236 | 	 r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4))); | ||
| 237 | 	 s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5)))); | ||
| 238 | 	 y = r/s; | ||
| 239 | 	 return x + x*y; | ||
| 240 | 	} | ||
| 241 | 	if (ix < 0x3ff40000) {		/* 0.84375 <= |x| < 1.25 */ | ||
| 242 | 	 s = fabs(x)-one; | ||
| 243 | 	 P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6))))); | ||
| 244 | 	 Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6))))); | ||
| 245 | 	 if (hx >= 0) | ||
| 246 | 	 return erx + P/Q; | ||
| 247 | 	 else | ||
| 248 | 	 return -erx - P/Q; | ||
| 249 | 	} | ||
| 250 | 	if (ix >= 0x40180000) {		/* inf>|x|>=6 */ | ||
| 251 | 	 if (hx >= 0) | ||
| 252 | 	 return one-tiny; | ||
| 253 | 	 else | ||
| 254 | 	 return tiny-one; | ||
| 255 | 	} | ||
| 256 | 	x = fabs(x); | ||
| 257 | 	s = one/(x*x); | ||
| 258 | 	if (ix < 0x4006DB6E) {	/* |x| < 1/0.35 */ | ||
| 259 | 	 R = ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*( | ||
| 260 | 				ra5+s*(ra6+s*ra7)))))); | ||
| 261 | 	 S = one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*( | ||
| 262 | 				sa5+s*(sa6+s*(sa7+s*sa8))))))); | ||
| 263 | 	} else {	/* |x| >= 1/0.35 */ | ||
| 264 | 	 R = rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*( | ||
| 265 | 				rb5+s*rb6))))); | ||
| 266 | 	 S = one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*( | ||
| 267 | 				sb5+s*(sb6+s*sb7)))))); | ||
| 268 | 	} | ||
| 269 | 	z = x; | ||
| 270 | 	__trunc_lo_word(&z); | ||
| 271 | 	r = __ieee754_exp(-z*z-0.5625)*__ieee754_exp((z-x)*(z+x)+R/S); | ||
| 272 | 	if (hx >= 0) | ||
| 273 | 	 return one-r/x; | ||
| 274 | 	else | ||
| 275 | 	 return r/x-one; | ||
| 276 | } | ||
| 277 | |||
| 278 | double erfc(double x) | ||
| 279 | { | ||
| 280 | 	int hx,ix; | ||
| 281 | 	double R,S,P,Q,s,y,z,r; | ||
| 282 | 	hx = __get_hi_word(x); | ||
| 283 | 	ix = hx&0x7fffffff; | ||
| 284 | 	if (ix >= 0x7ff00000) {			/* erfc(nan)=nan */ | ||
| 285 | 						/* erfc(+-inf)=0,2 */ | ||
| 286 | 	 return (double)(((unsigned)hx>>31)<<1)+one/x; | ||
| 287 | 	} | ||
| 288 | |||
| 289 | 	if (ix < 0x3feb0000) {		/* |x|<0.84375 */ | ||
| 290 | 	 if (ix < 0x3c700000)	/* |x|<2**-56 */ | ||
| 291 | 		return one-x; | ||
| 292 | 	 z = x*x; | ||
| 293 | 	 r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4))); | ||
| 294 | 	 s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5)))); | ||
| 295 | 	 y = r/s; | ||
| 296 | 	 if (hx < 0x3fd00000) {	/* x<1/4 */ | ||
| 297 | 		return one-(x+x*y); | ||
| 298 | 	 } else { | ||
| 299 | 		r = x*y; | ||
| 300 | 		r += (x-half); | ||
| 301 | 	 return half - r ; | ||
| 302 | 	 } | ||
| 303 | 	} | ||
| 304 | 	if (ix < 0x3ff40000) {		/* 0.84375 <= |x| < 1.25 */ | ||
| 305 | 	 s = fabs(x)-one; | ||
| 306 | 	 P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6))))); | ||
| 307 | 	 Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6))))); | ||
| 308 | 	 if (hx >= 0) { | ||
| 309 | 	 z = one-erx; return z - P/Q; | ||
| 310 | 	 } else { | ||
| 311 | 		z = erx+P/Q; return one+z; | ||
| 312 | 	 } | ||
| 313 | 	} | ||
| 314 | 	if (ix < 0x403c0000) {		/* |x|<28 */ | ||
| 315 | 	 x = fabs(x); | ||
| 316 | 	 s = one/(x*x); | ||
| 317 | 	 if (ix < 0x4006DB6D) {	/* |x| < 1/.35 ~ 2.857143*/ | ||
| 318 | 		R = ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*( | ||
| 319 | 				ra5+s*(ra6+s*ra7)))))); | ||
| 320 | 		S = one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*( | ||
| 321 | 				sa5+s*(sa6+s*(sa7+s*sa8))))))); | ||
| 322 | 	 } else {			/* |x| >= 1/.35 ~ 2.857143 */ | ||
| 323 | 		if (hx < 0 && ix >= 0x40180000) | ||
| 324 | 		 return two-tiny; /* x < -6 */ | ||
| 325 | 		R = rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*( | ||
| 326 | 				rb5+s*rb6))))); | ||
| 327 | 		S = one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*( | ||
| 328 | 				sb5+s*(sb6+s*sb7)))))); | ||
| 329 | 	 } | ||
| 330 | 	 z = x; | ||
| 331 | 	 __trunc_lo_word(&z); | ||
| 332 | 	 r = __ieee754_exp(-z*z-0.5625)* | ||
| 333 | 			__ieee754_exp((z-x)*(z+x)+R/S); | ||
| 334 | 	 if (hx > 0) | ||
| 335 | 	 return r/x; | ||
| 336 | 	 else | ||
| 337 | 	 return two-r/x; | ||
| 338 | 	} else { | ||
| 339 | 	 /* set range error */ | ||
| 340 | errno = ERANGE; | ||
| 341 | 	 if (hx > 0) | ||
| 342 | 	 return tiny*tiny; | ||
| 343 | 	 else | ||
| 344 | 	 return two-tiny; | ||
| 345 | 	} | ||
| 346 | } | ||
| 347 | |||
lib/libc/mingw/math/sf_erf.c deleted-268| ... | @@ -1,268 +0,0 @@ | ||
| 1 | /* sf_erf.c -- float version of s_erf.c. | ||
| 2 | * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. | ||
| 3 | */ | ||
| 4 | |||
| 5 | /* | ||
| 6 | * ==================================================== | ||
| 7 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | ||
| 8 | * | ||
| 9 | * Developed at SunPro, a Sun Microsystems, Inc. business. | ||
| 10 | * Permission to use, copy, modify, and distribute this | ||
| 11 | * software is freely granted, provided that this notice | ||
| 12 | * is preserved. | ||
| 13 | * ==================================================== | ||
| 14 | */ | ||
| 15 | |||
| 16 | /* | ||
| 17 | #include "fdlibm.h" | ||
| 18 | */ | ||
| 19 | #include <math.h> | ||
| 20 | #include <stdint.h> | ||
| 21 | #include <errno.h> | ||
| 22 | |||
| 23 | #define __ieee754_expf expf | ||
| 24 | |||
| 25 | typedef union | ||
| 26 | { | ||
| 27 | float value; | ||
| 28 | uint32_t word; | ||
| 29 | } ieee_float_shape_type; | ||
| 30 | |||
| 31 | /* Get a 32 bit int from a float. */ | ||
| 32 | |||
| 33 | static inline int | ||
| 34 | __get_float_word(float d) | ||
| 35 | { | ||
| 36 | ieee_float_shape_type u; | ||
| 37 | u.value = d; | ||
| 38 | return u.word; | ||
| 39 | } | ||
| 40 | |||
| 41 | /* Set a float from a 32 bit int. */ | ||
| 42 | |||
| 43 | #define SET_FLOAT_WORD(d,i)			\ | ||
| 44 | do {						\ | ||
| 45 | ieee_float_shape_type sf_u;			\ | ||
| 46 | sf_u.word = (i);				\ | ||
| 47 | (d) = sf_u.value;				\ | ||
| 48 | } while (0) | ||
| 49 | |||
| 50 | static inline void __trunc_float_word(float * x) | ||
| 51 | { | ||
| 52 | ieee_float_shape_type u; | ||
| 53 | u.value = * x; | ||
| 54 | u.word &= 0xfffff000; | ||
| 55 | } | ||
| 56 | |||
| 57 | #ifdef __v810__ | ||
| 58 | #define const | ||
| 59 | #endif | ||
| 60 | |||
| 61 | static const float | ||
| 62 | tiny= 1e-30, | ||
| 63 | half= 5.0000000000e-01, /* 0x3F000000 */ | ||
| 64 | one = 1.0000000000e+00, /* 0x3F800000 */ | ||
| 65 | two = 2.0000000000e+00, /* 0x40000000 */ | ||
| 66 | 	/* c = (subfloat)0.84506291151 */ | ||
| 67 | erx = 8.4506291151e-01, /* 0x3f58560b */ | ||
| 68 | /* | ||
| 69 | * Coefficients for approximation to erf on [0,0.84375] | ||
| 70 | */ | ||
| 71 | efx = 1.2837916613e-01, /* 0x3e0375d4 */ | ||
| 72 | efx8= 1.0270333290e+00, /* 0x3f8375d4 */ | ||
| 73 | pp0 = 1.2837916613e-01, /* 0x3e0375d4 */ | ||
| 74 | pp1 = -3.2504209876e-01, /* 0xbea66beb */ | ||
| 75 | pp2 = -2.8481749818e-02, /* 0xbce9528f */ | ||
| 76 | pp3 = -5.7702702470e-03, /* 0xbbbd1489 */ | ||
| 77 | pp4 = -2.3763017452e-05, /* 0xb7c756b1 */ | ||
| 78 | qq1 = 3.9791721106e-01, /* 0x3ecbbbce */ | ||
| 79 | qq2 = 6.5022252500e-02, /* 0x3d852a63 */ | ||
| 80 | qq3 = 5.0813062117e-03, /* 0x3ba68116 */ | ||
| 81 | qq4 = 1.3249473704e-04, /* 0x390aee49 */ | ||
| 82 | qq5 = -3.9602282413e-06, /* 0xb684e21a */ | ||
| 83 | /* | ||
| 84 | * Coefficients for approximation to erf in [0.84375,1.25] | ||
| 85 | */ | ||
| 86 | pa0 = -2.3621185683e-03, /* 0xbb1acdc6 */ | ||
| 87 | pa1 = 4.1485610604e-01, /* 0x3ed46805 */ | ||
| 88 | pa2 = -3.7220788002e-01, /* 0xbebe9208 */ | ||
| 89 | pa3 = 3.1834661961e-01, /* 0x3ea2fe54 */ | ||
| 90 | pa4 = -1.1089469492e-01, /* 0xbde31cc2 */ | ||
| 91 | pa5 = 3.5478305072e-02, /* 0x3d1151b3 */ | ||
| 92 | pa6 = -2.1663755178e-03, /* 0xbb0df9c0 */ | ||
| 93 | qa1 = 1.0642088205e-01, /* 0x3dd9f331 */ | ||
| 94 | qa2 = 5.4039794207e-01, /* 0x3f0a5785 */ | ||
| 95 | qa3 = 7.1828655899e-02, /* 0x3d931ae7 */ | ||
| 96 | qa4 = 1.2617121637e-01, /* 0x3e013307 */ | ||
| 97 | qa5 = 1.3637083583e-02, /* 0x3c5f6e13 */ | ||
| 98 | qa6 = 1.1984500103e-02, /* 0x3c445aa3 */ | ||
| 99 | /* | ||
| 100 | * Coefficients for approximation to erfc in [1.25,1/0.35] | ||
| 101 | */ | ||
| 102 | ra0 = -9.8649440333e-03, /* 0xbc21a093 */ | ||
| 103 | ra1 = -6.9385856390e-01, /* 0xbf31a0b7 */ | ||
| 104 | ra2 = -1.0558626175e+01, /* 0xc128f022 */ | ||
| 105 | ra3 = -6.2375331879e+01, /* 0xc2798057 */ | ||
| 106 | ra4 = -1.6239666748e+02, /* 0xc322658c */ | ||
| 107 | ra5 = -1.8460508728e+02, /* 0xc3389ae7 */ | ||
| 108 | ra6 = -8.1287437439e+01, /* 0xc2a2932b */ | ||
| 109 | ra7 = -9.8143291473e+00, /* 0xc11d077e */ | ||
| 110 | sa1 = 1.9651271820e+01, /* 0x419d35ce */ | ||
| 111 | sa2 = 1.3765776062e+02, /* 0x4309a863 */ | ||
| 112 | sa3 = 4.3456588745e+02, /* 0x43d9486f */ | ||
| 113 | sa4 = 6.4538726807e+02, /* 0x442158c9 */ | ||
| 114 | sa5 = 4.2900814819e+02, /* 0x43d6810b */ | ||
| 115 | sa6 = 1.0863500214e+02, /* 0x42d9451f */ | ||
| 116 | sa7 = 6.5702495575e+00, /* 0x40d23f7c */ | ||
| 117 | sa8 = -6.0424413532e-02, /* 0xbd777f97 */ | ||
| 118 | /* | ||
| 119 | * Coefficients for approximation to erfc in [1/.35,28] | ||
| 120 | */ | ||
| 121 | rb0 = -9.8649431020e-03, /* 0xbc21a092 */ | ||
| 122 | rb1 = -7.9928326607e-01, /* 0xbf4c9dd4 */ | ||
| 123 | rb2 = -1.7757955551e+01, /* 0xc18e104b */ | ||
| 124 | rb3 = -1.6063638306e+02, /* 0xc320a2ea */ | ||
| 125 | rb4 = -6.3756646729e+02, /* 0xc41f6441 */ | ||
| 126 | rb5 = -1.0250950928e+03, /* 0xc480230b */ | ||
| 127 | rb6 = -4.8351919556e+02, /* 0xc3f1c275 */ | ||
| 128 | sb1 = 3.0338060379e+01, /* 0x41f2b459 */ | ||
| 129 | sb2 = 3.2579251099e+02, /* 0x43a2e571 */ | ||
| 130 | sb3 = 1.5367296143e+03, /* 0x44c01759 */ | ||
| 131 | sb4 = 3.1998581543e+03, /* 0x4547fdbb */ | ||
| 132 | sb5 = 2.5530502930e+03, /* 0x451f90ce */ | ||
| 133 | sb6 = 4.7452853394e+02, /* 0x43ed43a7 */ | ||
| 134 | sb7 = -2.2440952301e+01; /* 0xc1b38712 */ | ||
| 135 | |||
| 136 | float erff(float x) | ||
| 137 | { | ||
| 138 | 	int32_t hx, ix, i; | ||
| 139 | 	float R, S, P, Q, s, y, z, r; | ||
| 140 | 	hx = __get_float_word(x); | ||
| 141 | 	ix = hx & 0x7fffffff; | ||
| 142 | 	if (!(ix<0x7f800000L)) {	/* erf(nan)=nan */ | ||
| 143 | 	 i = ((uint32_t)hx>>31)<<1; | ||
| 144 | 	 return (float)(1-i)+one/x;	/* erf(+-inf)=+-1 */ | ||
| 145 | 	} | ||
| 146 | |||
| 147 | 	if (ix < 0x3f580000) {		/* |x|<0.84375 */ | ||
| 148 | 	 if (ix < 0x31800000) {	/* |x|<2**-28 */ | ||
| 149 | 		if (ix < 0x04000000) | ||
| 150 | 		 /*avoid underflow */ | ||
| 151 | 		 return (float)0.125*((float)8.0*x+efx8*x); | ||
| 152 | 		return x + efx*x; | ||
| 153 | 	 } | ||
| 154 | 	 z = x*x; | ||
| 155 | 	 r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4))); | ||
| 156 | 	 s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5)))); | ||
| 157 | 	 y = r/s; | ||
| 158 | 	 return x + x*y; | ||
| 159 | 	} | ||
| 160 | 	if (ix < 0x3fa00000) {		/* 0.84375 <= |x| < 1.25 */ | ||
| 161 | 	 s = fabsf(x)-one; | ||
| 162 | 	 P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6))))); | ||
| 163 | 	 Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6))))); | ||
| 164 | 	 if (hx >= 0) | ||
| 165 | 	 return erx + P/Q; | ||
| 166 | 	 else | ||
| 167 | 	 return -erx - P/Q; | ||
| 168 | 	} | ||
| 169 | 	if (ix >= 0x40c00000) {		/* inf>|x|>=6 */ | ||
| 170 | 	 if (hx >= 0) | ||
| 171 | 	 return one-tiny; | ||
| 172 | 	 else | ||
| 173 | 	 return tiny-one; | ||
| 174 | 	} | ||
| 175 | 	x = fabsf(x); | ||
| 176 | 	s = one/(x*x); | ||
| 177 | 	if (ix< 0x4036DB6E) {	/* |x| < 1/0.35 */ | ||
| 178 | 	 R = ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*( | ||
| 179 | 				ra5+s*(ra6+s*ra7)))))); | ||
| 180 | 	 S = one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*( | ||
| 181 | 				sa5+s*(sa6+s*(sa7+s*sa8))))))); | ||
| 182 | 	} else {	/* |x| >= 1/0.35 */ | ||
| 183 | 	 R = rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*( | ||
| 184 | 				rb5+s*rb6))))); | ||
| 185 | 	 S = one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*( | ||
| 186 | 				sb5+s*(sb6+s*sb7)))))); | ||
| 187 | 	} | ||
| 188 | |||
| 189 | 	z = x; | ||
| 190 | 	__trunc_float_word (&z); | ||
| 191 | 	r = __ieee754_expf(-z*z-(float)0.5625)*__ieee754_expf((z-x)*(z+x)+R/S); | ||
| 192 | 	if (hx >= 0) | ||
| 193 | 	 return one-r/x; | ||
| 194 | 	else | ||
| 195 | 	 return r/x-one; | ||
| 196 | } | ||
| 197 | |||
| 198 | float erfcf(float x) | ||
| 199 | { | ||
| 200 | 	int32_t hx, ix; | ||
| 201 | 	float R, S, P, Q, s, y, z, r; | ||
| 202 | 	hx = __get_float_word(x); | ||
| 203 | 	ix = hx & 0x7fffffff; | ||
| 204 | 	if (!(ix < 0x7f800000L)) {		/* erfc(nan)=nan */ | ||
| 205 | 						/* erfc(+-inf)=0,2 */ | ||
| 206 | 	 return (float)(((uint32_t)hx>>31)<<1)+one/x; | ||
| 207 | 	} | ||
| 208 | |||
| 209 | 	if (ix < 0x3f580000) {		/* |x|<0.84375 */ | ||
| 210 | 	 if (ix < 0x23800000) 	/* |x|<2**-56 */ | ||
| 211 | 		return one-x; | ||
| 212 | 	 z = x*x; | ||
| 213 | 	 r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4))); | ||
| 214 | 	 s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5)))); | ||
| 215 | 	 y = r/s; | ||
| 216 | 	 if (hx < 0x3e800000) { 	/* x<1/4 */ | ||
| 217 | 		return one-(x+x*y); | ||
| 218 | 	 } else { | ||
| 219 | 		r = x*y; | ||
| 220 | 		r += (x-half); | ||
| 221 | 		return half - r ; | ||
| 222 | 	 } | ||
| 223 | 	} | ||
| 224 | 	if (ix < 0x3fa00000) {		/* 0.84375 <= |x| < 1.25 */ | ||
| 225 | 	 s = fabsf(x)-one; | ||
| 226 | 	 P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6))))); | ||
| 227 | 	 Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6))))); | ||
| 228 | 	 if (hx >= 0) { | ||
| 229 | 	 z = one-erx; return z - P/Q; | ||
| 230 | 	 } else { | ||
| 231 | 		z = erx+P/Q; return one+z; | ||
| 232 | 	 } | ||
| 233 | 	} | ||
| 234 | |||
| 235 | 	if (ix < 0x41e00000) {		/* |x|<28 */ | ||
| 236 | 	 x = fabsf(x); | ||
| 237 | 	 s = one/(x*x); | ||
| 238 | 	 if (ix< 0x4036DB6D) {	/* |x| < 1/.35 ~ 2.857143*/ | ||
| 239 | 	 R = ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*( | ||
| 240 | 				ra5+s*(ra6+s*ra7)))))); | ||
| 241 | 	 S = one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*( | ||
| 242 | 				sa5+s*(sa6+s*(sa7+s*sa8))))))); | ||
| 243 | 	 } else {			/* |x| >= 1/.35 ~ 2.857143 */ | ||
| 244 | 		if (hx < 0 && ix >= 0x40c00000) | ||
| 245 | 		 return two-tiny;/* x < -6 */ | ||
| 246 | 		R = rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*( | ||
| 247 | 				rb5+s*rb6))))); | ||
| 248 | 		S = one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*( | ||
| 249 | 				sb5+s*(sb6+s*sb7)))))); | ||
| 250 | 	 } | ||
| 251 | |||
| 252 | 	 z = x; | ||
| 253 | 	 __trunc_float_word (&z); | ||
| 254 | 	 r = __ieee754_expf(-z*z-(float)0.5625)* | ||
| 255 | 			__ieee754_expf((z-x)*(z+x)+R/S); | ||
| 256 | 	 if (hx > 0) | ||
| 257 | 	 return r/x; | ||
| 258 | 	 else | ||
| 259 | 	 return two-r/x; | ||
| 260 | 	} else { | ||
| 261 | 	 /* set range error */ | ||
| 262 | errno = ERANGE; | ||
| 263 | 	 if (hx > 0) | ||
| 264 | 	 return tiny*tiny; | ||
| 265 | 	 else | ||
| 266 | 	 return two-tiny; | ||
| 267 | 	} | ||
| 268 | } | ||
lib/libc/mingw/math/sqrt.c deleted-47| ... | @@ -1,47 +0,0 @@ | ||
| 1 | /* | ||
| 2 | This Software is provided under the Zope Public License (ZPL) Version 2.1. | ||
| 3 | |||
| 4 | Copyright (c) 2009, 2010 by the mingw-w64 project | ||
| 5 | |||
| 6 | See the AUTHORS file for the list of contributors to the mingw-w64 project. | ||
| 7 | |||
| 8 | This license has been certified as open source. It has also been designated | ||
| 9 | as GPL compatible by the Free Software Foundation (FSF). | ||
| 10 | |||
| 11 | Redistribution and use in source and binary forms, with or without | ||
| 12 | modification, are permitted provided that the following conditions are met: | ||
| 13 | |||
| 14 | 1. Redistributions in source code must retain the accompanying copyright | ||
| 15 | notice, this list of conditions, and the following disclaimer. | ||
| 16 | 2. Redistributions in binary form must reproduce the accompanying | ||
| 17 | copyright notice, this list of conditions, and the following disclaimer | ||
| 18 | in the documentation and/or other materials provided with the | ||
| 19 | distribution. | ||
| 20 | 3. Names of the copyright holders must not be used to endorse or promote | ||
| 21 | products derived from this software without prior written permission | ||
| 22 | from the copyright holders. | ||
| 23 | 4. The right to distribute this software or to use it for any purpose does | ||
| 24 | not give you the right to use Servicemarks (sm) or Trademarks (tm) of | ||
| 25 | the copyright holders. Use of them is covered by separate agreement | ||
| 26 | with the copyright holders. | ||
| 27 | 5. If any files are modified, you must cause the modified files to carry | ||
| 28 | prominent notices stating that you changed the files and the date of | ||
| 29 | any change. | ||
| 30 | |||
| 31 | Disclaimer | ||
| 32 | |||
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED | ||
| 34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 35 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
| 36 | EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 37 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| 39 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define _NEW_COMPLEX_DOUBLE 1 | ||
| 46 | #define X64_ASM "sqrtsd" | ||
| 47 | #include "sqrt.def.h" | ||
lib/libc/mingw/math/tgamma.c deleted-268| ... | @@ -1,268 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include "cephes_mconf.h" | ||
| 7 | |||
| 8 | #ifdef UNK | ||
| 9 | static const uD P[7] = { | ||
| 10 | { { 1.60119522476751861407E-4 } }, | ||
| 11 | { { 1.19135147006586384913E-3 } }, | ||
| 12 | { { 1.04213797561761569935E-2 } }, | ||
| 13 | { { 4.76367800457137231464E-2 } }, | ||
| 14 | { { 2.07448227648435975150E-1 } }, | ||
| 15 | { { 4.94214826801497100753E-1 } }, | ||
| 16 | { { 9.99999999999999996796E-1 } } | ||
| 17 | }; | ||
| 18 | static const uD Q[8] = { | ||
| 19 | { { -2.31581873324120129819E-5 } }, | ||
| 20 | { { 5.39605580493303397842E-4 } }, | ||
| 21 | { { -4.45641913851797240494E-3 } }, | ||
| 22 | { { 1.18139785222060435552E-2 } }, | ||
| 23 | { { 3.58236398605498653373E-2 } }, | ||
| 24 | { { -2.34591795718243348568E-1 } }, | ||
| 25 | { { 7.14304917030273074085E-2 } }, | ||
| 26 | { { 1.00000000000000000320E0 } } | ||
| 27 | }; | ||
| 28 | #define MAXGAM 171.624376956302725 | ||
| 29 | static const double LOGPI = 1.14472988584940017414; | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #ifdef IBMPC | ||
| 33 | static const uD P[7] = { | ||
| 34 | { { 0x2153,0x3998,0xfcb8,0x3f24 } }, | ||
| 35 | { { 0xbfab,0xe686,0x84e3,0x3f53 } }, | ||
| 36 | { { 0x14b0,0xe9db,0x57cd,0x3f85 } }, | ||
| 37 | { { 0x23d3,0x18c4,0x63d9,0x3fa8 } }, | ||
| 38 | { { 0x7d31,0xdcae,0x8da9,0x3fca } }, | ||
| 39 | { { 0xe312,0x3993,0xa137,0x3fdf } }, | ||
| 40 | { { 0x0000,0x0000,0x0000,0x3ff0 } } | ||
| 41 | }; | ||
| 42 | static const uD Q[8] = { | ||
| 43 | { { 0xd3af,0x8400,0x487a,0xbef8 } }, | ||
| 44 | { { 0x2573,0x2915,0xae8a,0x3f41 } }, | ||
| 45 | { { 0xb44a,0xe750,0x40e4,0xbf72 } }, | ||
| 46 | { { 0xb117,0x5b1b,0x31ed,0x3f88 } }, | ||
| 47 | { { 0xde67,0xe33f,0x5779,0x3fa2 } }, | ||
| 48 | { { 0x87c2,0x9d42,0x071a,0xbfce } }, | ||
| 49 | { { 0x3c51,0xc9cd,0x4944,0x3fb2 } }, | ||
| 50 | { { 0x0000,0x0000,0x0000,0x3ff0 } } | ||
| 51 | }; | ||
| 52 | #define MAXGAM 171.624376956302725 | ||
| 53 | #endif | ||
| 54 | |||
| 55 | #ifdef MIEEE | ||
| 56 | static const uD P[7] = { | ||
| 57 | { { 0x3f24,0xfcb8,0x3998,0x2153 } }, | ||
| 58 | { { 0x3f53,0x84e3,0xe686,0xbfab } }, | ||
| 59 | { { 0x3f85,0x57cd,0xe9db,0x14b0 } }, | ||
| 60 | { { 0x3fa8,0x63d9,0x18c4,0x23d3 } }, | ||
| 61 | { { 0x3fca,0x8da9,0xdcae,0x7d31 } }, | ||
| 62 | { { 0x3fdf,0xa137,0x3993,0xe312 } }, | ||
| 63 | { { 0x3ff0,0x0000,0x0000,0x0000 } } | ||
| 64 | }; | ||
| 65 | static const unsigned short Q[8] = { | ||
| 66 | { { 0xbef8,0x487a,0x8400,0xd3af } }, | ||
| 67 | { { 0x3f41,0xae8a,0x2915,0x2573 } }, | ||
| 68 | { { 0xbf72,0x40e4,0xe750,0xb44a } }, | ||
| 69 | { { 0x3f88,0x31ed,0x5b1b,0xb117 } }, | ||
| 70 | { { 0x3fa2,0x5779,0xe33f,0xde67 } }, | ||
| 71 | { { 0xbfce,0x071a,0x9d42,0x87c2 } }, | ||
| 72 | { { 0x3fb2,0x4944,0xc9cd,0x3c51 } }, | ||
| 73 | { { 0x3ff0,0x0000,0x0000,0x0000 } } | ||
| 74 | }; | ||
| 75 | #define MAXGAM 171.624376956302725 | ||
| 76 | #endif | ||
| 77 | |||
| 78 | /* Stirling's formula for the gamma function */ | ||
| 79 | #if UNK | ||
| 80 | static const uD STIR[5] = { | ||
| 81 | { { 7.87311395793093628397E-4 } }, | ||
| 82 | { { -2.29549961613378126380E-4 } }, | ||
| 83 | { { -2.68132617805781232825E-3 } }, | ||
| 84 | { { 3.47222221605458667310E-3 } }, | ||
| 85 | { { 8.33333333333482257126E-2 } } | ||
| 86 | }; | ||
| 87 | #define MAXSTIR 143.01608 | ||
| 88 | static const double SQTPI = 2.50662827463100050242E0; | ||
| 89 | #endif | ||
| 90 | #if IBMPC | ||
| 91 | static const uD STIR[5] = { | ||
| 92 | { { 0x7293,0x592d,0xcc72,0x3f49 } }, | ||
| 93 | { { 0x1d7c,0x27e6,0x166b,0xbf2e } }, | ||
| 94 | { { 0x4fd7,0x07d4,0xf726,0xbf65 } }, | ||
| 95 | { { 0xc5fd,0x1b98,0x71c7,0x3f6c } }, | ||
| 96 | { { 0x5986,0x5555,0x5555,0x3fb5 } } | ||
| 97 | }; | ||
| 98 | #define MAXSTIR 143.01608 | ||
| 99 | |||
| 100 | static const union | ||
| 101 | { | ||
| 102 | unsigned short s[4]; | ||
| 103 | double d; | ||
| 104 | } sqt = {{0x2706,0x1ff6,0x0d93,0x4004}}; | ||
| 105 | #define SQTPI (sqt.d) | ||
| 106 | #endif | ||
| 107 | #if MIEEE | ||
| 108 | static const uD STIR[5] = { | ||
| 109 | { { 0x3f49,0xcc72,0x592d,0x7293 } }, | ||
| 110 | { { 0xbf2e,0x166b,0x27e6,0x1d7c } }, | ||
| 111 | { { 0xbf65,0xf726,0x07d4,0x4fd7 } }, | ||
| 112 | { { 0x3f6c,0x71c7,0x1b98,0xc5fd } }, | ||
| 113 | { { 0x3fb5,0x5555,0x5555,0x5986 } } | ||
| 114 | }; | ||
| 115 | #define MAXSTIR 143.01608 | ||
| 116 | static const uD SQT = { | ||
| 117 | { { 0x4004,0x0d93,0x1ff6,0x2706 } } | ||
| 118 | }; | ||
| 119 | #define SQTPI SQT.d | ||
| 120 | #endif | ||
| 121 | |||
| 122 | static double stirf (double); | ||
| 123 | |||
| 124 | /* Gamma function computed by Stirling's formula. | ||
| 125 | * The polynomial STIR is valid for 33 <= x <= 172. | ||
| 126 | */ | ||
| 127 | static double stirf(double x) | ||
| 128 | { | ||
| 129 | 	double y, w, v; | ||
| 130 | |||
| 131 | 	w = 1.0/x; | ||
| 132 | 	w = 1.0 + w * polevl(w, STIR, 4); | ||
| 133 | 	y = exp(x); | ||
| 134 | 	if (x > MAXSTIR) | ||
| 135 | 	{ /* Avoid overflow in pow() */ | ||
| 136 | 		v = pow(x, 0.5 * x - 0.25); | ||
| 137 | 		y = v * (v / y); | ||
| 138 | 	} | ||
| 139 | 	else | ||
| 140 | 	{ | ||
| 141 | 		y = pow(x, x - 0.5) / y; | ||
| 142 | 	} | ||
| 143 | 	y = SQTPI * y * w; | ||
| 144 | 	return (y); | ||
| 145 | } | ||
| 146 | |||
| 147 | |||
| 148 | double __tgamma_r(double x, int *sgngam); | ||
| 149 | |||
| 150 | double __tgamma_r(double x, int *sgngam) | ||
| 151 | { | ||
| 152 | 	double p, q, z; | ||
| 153 | 	int i; | ||
| 154 | |||
| 155 | 	*sgngam = 1; | ||
| 156 | #ifdef NANS | ||
| 157 | 	if (isnan(x)) | ||
| 158 | 		return (x); | ||
| 159 | #endif | ||
| 160 | #ifdef INFINITIES | ||
| 161 | #ifdef NANS | ||
| 162 | 	if (x == INFINITY) | ||
| 163 | 		return (x); | ||
| 164 | 	if (x == -INFINITY) | ||
| 165 | 		return (NAN); | ||
| 166 | #else | ||
| 167 | 	if (!isfinite(x)) | ||
| 168 | 		return (x); | ||
| 169 | #endif | ||
| 170 | #endif | ||
| 171 | 	if (x == 0.0) | ||
| 172 | 		return copysign(HUGE_VAL, x); | ||
| 173 | |||
| 174 | 	q = fabs(x); | ||
| 175 | |||
| 176 | 	if (q > 33.0) | ||
| 177 | 	{ | ||
| 178 | 		if (x < 0.0) | ||
| 179 | 		{ | ||
| 180 | 			p = floor(q); | ||
| 181 | 			if (p == q) | ||
| 182 | 			{ | ||
| 183 | gsing: | ||
| 184 | 				_SET_ERRNO(EDOM); | ||
| 185 | 				mtherr("tgamma", SING); | ||
| 186 | #ifdef NANS | ||
| 187 | 				return (NAN); | ||
| 188 | #else | ||
| 189 | 				return (MAXNUM); | ||
| 190 | #endif | ||
| 191 | 			} | ||
| 192 | 			i = p; | ||
| 193 | 			if ((i & 1) == 0) | ||
| 194 | 				*sgngam = -1; | ||
| 195 | 			z = q - p; | ||
| 196 | 			if (z > 0.5) | ||
| 197 | 			{ | ||
| 198 | 				p += 1.0; | ||
| 199 | 				z = q - p; | ||
| 200 | 			} | ||
| 201 | 			z = q * sin(PI * z); | ||
| 202 | 			if (z == 0.0) | ||
| 203 | 			{ | ||
| 204 | 				_SET_ERRNO(ERANGE); | ||
| 205 | 				mtherr("tgamma", OVERFLOW); | ||
| 206 | #ifdef INFINITIES | ||
| 207 | 				return (*sgngam * INFINITY); | ||
| 208 | #else | ||
| 209 | 				return (*sgngam * MAXNUM); | ||
| 210 | #endif | ||
| 211 | 			} | ||
| 212 | 			z = fabs(z); | ||
| 213 | 			z = PI/(z * stirf(q)); | ||
| 214 | 		} | ||
| 215 | 		else | ||
| 216 | 		{ | ||
| 217 | 			z = stirf(x); | ||
| 218 | 		} | ||
| 219 | 		return (*sgngam * z); | ||
| 220 | 	} | ||
| 221 | |||
| 222 | 	z = 1.0; | ||
| 223 | 	while (x >= 3.0) | ||
| 224 | 	{ | ||
| 225 | 		x -= 1.0; | ||
| 226 | 		z *= x; | ||
| 227 | 	} | ||
| 228 | |||
| 229 | 	while (x < 0.0) | ||
| 230 | 	{ | ||
| 231 | 		if (x > -1.E-9) | ||
| 232 | 			goto Small; | ||
| 233 | 		z /= x; | ||
| 234 | 		x += 1.0; | ||
| 235 | 	} | ||
| 236 | |||
| 237 | 	while (x < 2.0) | ||
| 238 | 	{ | ||
| 239 | 		if (x < 1.e-9) | ||
| 240 | 			goto Small; | ||
| 241 | 		z /= x; | ||
| 242 | 		x += 1.0; | ||
| 243 | 	} | ||
| 244 | |||
| 245 | 	if (x == 2.0) | ||
| 246 | 		return (z); | ||
| 247 | |||
| 248 | 	x -= 2.0; | ||
| 249 | 	p = polevl( x, P, 6 ); | ||
| 250 | 	q = polevl( x, Q, 7 ); | ||
| 251 | 	return (z * p / q); | ||
| 252 | |||
| 253 | Small: | ||
| 254 | 	if (x == 0.0) | ||
| 255 | 	{ | ||
| 256 | 		goto gsing; | ||
| 257 | 	} | ||
| 258 | 	else | ||
| 259 | 		return (z/((1.0 + 0.5772156649015329 * x) * x)); | ||
| 260 | } | ||
| 261 | |||
| 262 | /* This is the C99 version */ | ||
| 263 | double tgamma(double x) | ||
| 264 | { | ||
| 265 | 	int local_sgngam = 0; | ||
| 266 | 	return (__tgamma_r(x, &local_sgngam)); | ||
| 267 | } | ||
| 268 | |||
lib/libc/mingw/math/tgammaf.c deleted-196| ... | @@ -1,196 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include "cephes_mconf.h" | ||
| 7 | |||
| 8 | /* define MAXGAM 34.84425627277176174 */ | ||
| 9 | |||
| 10 | /* Stirling's formula for the gamma function | ||
| 11 | * gamma(x) = sqrt(2 pi) x^(x-.5) exp(-x) ( 1 + 1/x P(1/x) ) | ||
| 12 | * .028 < 1/x < .1 | ||
| 13 | * relative error < 1.9e-11 | ||
| 14 | */ | ||
| 15 | static const float STIR[] = { | ||
| 16 | -2.705194986674176E-003, | ||
| 17 | 3.473255786154910E-003, | ||
| 18 | 8.333331788340907E-002, | ||
| 19 | }; | ||
| 20 | static const float MAXSTIR = 26.77; | ||
| 21 | static const float SQTPIF = 2.50662827463100050242; /* sqrt( 2 pi ) */ | ||
| 22 | |||
| 23 | static float stirf(float); | ||
| 24 | |||
| 25 | /* Gamma function computed by Stirling's formula, | ||
| 26 | * sqrt(2 pi) x^(x-.5) exp(-x) (1 + 1/x P(1/x)) | ||
| 27 | * The polynomial STIR is valid for 33 <= x <= 172. | ||
| 28 | */ | ||
| 29 | static float stirf( float x ) | ||
| 30 | { | ||
| 31 | 	float y, w, v; | ||
| 32 | |||
| 33 | 	w = 1.0/x; | ||
| 34 | 	w = 1.0 + w * polevlf(w, STIR, 2); | ||
| 35 | 	y = expf(-x); | ||
| 36 | 	if (x > MAXSTIR) | ||
| 37 | 	{ /* Avoid overflow in pow() */ | ||
| 38 | 		v = powf(x, 0.5 * x - 0.25); | ||
| 39 | 		y *= v; | ||
| 40 | 		y *= v; | ||
| 41 | 	} | ||
| 42 | 	else | ||
| 43 | 	{ | ||
| 44 | 		y = powf(x, x - 0.5) * y; | ||
| 45 | 	} | ||
| 46 | 	y = SQTPIF * y * w; | ||
| 47 | 	return (y); | ||
| 48 | } | ||
| 49 | |||
| 50 | |||
| 51 | /* gamma(x+2), 0 < x < 1 */ | ||
| 52 | static const float P[] = { | ||
| 53 | 1.536830450601906E-003, | ||
| 54 | 5.397581592950993E-003, | ||
| 55 | 4.130370201859976E-003, | ||
| 56 | 7.232307985516519E-002, | ||
| 57 | 8.203960091619193E-002, | ||
| 58 | 4.117857447645796E-001, | ||
| 59 | 4.227867745131584E-001, | ||
| 60 | 9.999999822945073E-001, | ||
| 61 | }; | ||
| 62 | |||
| 63 | float __tgammaf_r( float x, int* sgngamf); | ||
| 64 | |||
| 65 | float __tgammaf_r( float x, int* sgngamf) | ||
| 66 | { | ||
| 67 | 	float p, q, z, nz; | ||
| 68 | 	int i, direction, negative; | ||
| 69 | |||
| 70 | #ifdef NANS | ||
| 71 | 	if (isnan(x)) | ||
| 72 | 		return (x); | ||
| 73 | #endif | ||
| 74 | #ifdef INFINITIES | ||
| 75 | #ifdef NANS | ||
| 76 | 	if (x == INFINITYF) | ||
| 77 | 		return (x); | ||
| 78 | 	if (x == -INFINITYF) | ||
| 79 | 		return (NANF); | ||
| 80 | #else | ||
| 81 | 	if (!isfinite(x)) | ||
| 82 | 		return (x); | ||
| 83 | #endif | ||
| 84 | #endif | ||
| 85 | 	if (x == 0.0) | ||
| 86 | 		return copysignf(HUGE_VALF, x); | ||
| 87 | |||
| 88 | 	*sgngamf = 1; | ||
| 89 | 	negative = 0; | ||
| 90 | 	nz = 0.0; | ||
| 91 | 	if (x < 0.0) | ||
| 92 | 	{ | ||
| 93 | 		negative = 1; | ||
| 94 | 		q = -x; | ||
| 95 | 		p = floorf(q); | ||
| 96 | 		if (p == q) | ||
| 97 | 		{ | ||
| 98 | gsing: | ||
| 99 | 			_SET_ERRNO(EDOM); | ||
| 100 | 			mtherr("tgammaf", SING); | ||
| 101 | #ifdef NANS | ||
| 102 | 			return (NAN); | ||
| 103 | #else | ||
| 104 | 			return (MAXNUMF); | ||
| 105 | #endif | ||
| 106 | 		} | ||
| 107 | 		i = p; | ||
| 108 | 		if ((i & 1) == 0) | ||
| 109 | 			*sgngamf = -1; | ||
| 110 | 		nz = q - p; | ||
| 111 | 		if (nz > 0.5) | ||
| 112 | 		{ | ||
| 113 | 			p += 1.0; | ||
| 114 | 			nz = q - p; | ||
| 115 | 		} | ||
| 116 | 		nz = q * sinf(PIF * nz); | ||
| 117 | 		if (nz == 0.0) | ||
| 118 | 		{ | ||
| 119 | 			_SET_ERRNO(ERANGE); | ||
| 120 | 			mtherr("tgamma", OVERFLOW); | ||
| 121 | #ifdef INFINITIES | ||
| 122 | 			return(*sgngamf * INFINITYF); | ||
| 123 | #else | ||
| 124 | 			return(*sgngamf * MAXNUMF); | ||
| 125 | #endif | ||
| 126 | 		} | ||
| 127 | 		if (nz < 0) | ||
| 128 | 			nz = -nz; | ||
| 129 | 		x = q; | ||
| 130 | 	} | ||
| 131 | 	if (x >= 10.0) | ||
| 132 | 	{ | ||
| 133 | 		z = stirf(x); | ||
| 134 | 	} | ||
| 135 | 	if (x < 2.0) | ||
| 136 | 		direction = 1; | ||
| 137 | 	else | ||
| 138 | 		direction = 0; | ||
| 139 | 	z = 1.0; | ||
| 140 | 	while (x >= 3.0) | ||
| 141 | 	{ | ||
| 142 | 		x -= 1.0; | ||
| 143 | 		z *= x; | ||
| 144 | 	} | ||
| 145 | 	/* | ||
| 146 | 	while (x < 0.0) | ||
| 147 | 	{ | ||
| 148 | 		if (x > -1.E-4) | ||
| 149 | 			goto Small; | ||
| 150 | 		z *=x; | ||
| 151 | 		x += 1.0; | ||
| 152 | 	} | ||
| 153 | 	*/ | ||
| 154 | 	while (x < 2.0) | ||
| 155 | 	{ | ||
| 156 | 		if (x < 1.e-4) | ||
| 157 | 			goto Small; | ||
| 158 | 		z *=x; | ||
| 159 | 		x += 1.0; | ||
| 160 | 	} | ||
| 161 | |||
| 162 | 	if (direction) | ||
| 163 | 		z = 1.0/z; | ||
| 164 | |||
| 165 | 	if (x == 2.0) | ||
| 166 | 		return (z); | ||
| 167 | |||
| 168 | 	x -= 2.0; | ||
| 169 | 	p = z * polevlf(x, P, 7); | ||
| 170 | |||
| 171 | gdone: | ||
| 172 | 	if (negative) | ||
| 173 | 	{ | ||
| 174 | 		p = *sgngamf * PIF/(nz * p ); | ||
| 175 | 	} | ||
| 176 | 	return (p); | ||
| 177 | |||
| 178 | Small: | ||
| 179 | 	if (x == 0.0) | ||
| 180 | 	{ | ||
| 181 | 		goto gsing; | ||
| 182 | 	} | ||
| 183 | 	else | ||
| 184 | 	{ | ||
| 185 | 		p = z / ((1.0 + 0.5772156649015329 * x) * x); | ||
| 186 | 		goto gdone; | ||
| 187 | 	} | ||
| 188 | } | ||
| 189 | |||
| 190 | /* This is the C99 version */ | ||
| 191 | float tgammaf(float x) | ||
| 192 | { | ||
| 193 | 	int local_sgngamf = 0; | ||
| 194 | 	return (__tgammaf_r(x, &local_sgngamf)); | ||
| 195 | } | ||
| 196 | |||
lib/libc/mingw/math/x86/acosh.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | /* | ||
| 2 | This Software is provided under the Zope Public License (ZPL) Version 2.1. | ||
| 3 | |||
| 4 | Copyright (c) 2009, 2010 by the mingw-w64 project | ||
| 5 | |||
| 6 | See the AUTHORS file for the list of contributors to the mingw-w64 project. | ||
| 7 | |||
| 8 | This license has been certified as open source. It has also been designated | ||
| 9 | as GPL compatible by the Free Software Foundation (FSF). | ||
| 10 | |||
| 11 | Redistribution and use in source and binary forms, with or without | ||
| 12 | modification, are permitted provided that the following conditions are met: | ||
| 13 | |||
| 14 | 1. Redistributions in source code must retain the accompanying copyright | ||
| 15 | notice, this list of conditions, and the following disclaimer. | ||
| 16 | 2. Redistributions in binary form must reproduce the accompanying | ||
| 17 | copyright notice, this list of conditions, and the following disclaimer | ||
| 18 | in the documentation and/or other materials provided with the | ||
| 19 | distribution. | ||
| 20 | 3. Names of the copyright holders must not be used to endorse or promote | ||
| 21 | products derived from this software without prior written permission | ||
| 22 | from the copyright holders. | ||
| 23 | 4. The right to distribute this software or to use it for any purpose does | ||
| 24 | not give you the right to use Servicemarks (sm) or Trademarks (tm) of | ||
| 25 | the copyright holders. Use of them is covered by separate agreement | ||
| 26 | with the copyright holders. | ||
| 27 | 5. If any files are modified, you must cause the modified files to carry | ||
| 28 | prominent notices stating that you changed the files and the date of | ||
| 29 | any change. | ||
| 30 | |||
| 31 | Disclaimer | ||
| 32 | |||
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED | ||
| 34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 35 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
| 36 | EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 37 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| 39 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define _NEW_COMPLEX_DOUBLE 1 | ||
| 46 | #include "acosh.def.h" | ||
lib/libc/mingw/math/x86/acoshf.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | /* | ||
| 2 | This Software is provided under the Zope Public License (ZPL) Version 2.1. | ||
| 3 | |||
| 4 | Copyright (c) 2009, 2010 by the mingw-w64 project | ||
| 5 | |||
| 6 | See the AUTHORS file for the list of contributors to the mingw-w64 project. | ||
| 7 | |||
| 8 | This license has been certified as open source. It has also been designated | ||
| 9 | as GPL compatible by the Free Software Foundation (FSF). | ||
| 10 | |||
| 11 | Redistribution and use in source and binary forms, with or without | ||
| 12 | modification, are permitted provided that the following conditions are met: | ||
| 13 | |||
| 14 | 1. Redistributions in source code must retain the accompanying copyright | ||
| 15 | notice, this list of conditions, and the following disclaimer. | ||
| 16 | 2. Redistributions in binary form must reproduce the accompanying | ||
| 17 | copyright notice, this list of conditions, and the following disclaimer | ||
| 18 | in the documentation and/or other materials provided with the | ||
| 19 | distribution. | ||
| 20 | 3. Names of the copyright holders must not be used to endorse or promote | ||
| 21 | products derived from this software without prior written permission | ||
| 22 | from the copyright holders. | ||
| 23 | 4. The right to distribute this software or to use it for any purpose does | ||
| 24 | not give you the right to use Servicemarks (sm) or Trademarks (tm) of | ||
| 25 | the copyright holders. Use of them is covered by separate agreement | ||
| 26 | with the copyright holders. | ||
| 27 | 5. If any files are modified, you must cause the modified files to carry | ||
| 28 | prominent notices stating that you changed the files and the date of | ||
| 29 | any change. | ||
| 30 | |||
| 31 | Disclaimer | ||
| 32 | |||
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED | ||
| 34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 35 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
| 36 | EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 37 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| 39 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define _NEW_COMPLEX_FLOAT 1 | ||
| 46 | #include "acosh.def.h" | ||
lib/libc/mingw/math/x86/asinh.c deleted-74| ... | @@ -1,74 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <errno.h> | ||
| 8 | #include <float.h> | ||
| 9 | #include "fastmath.h" | ||
| 10 | |||
| 11 | /* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */ | ||
| 12 | double asinh(double x) | ||
| 13 | { | ||
| 14 | double z; | ||
| 15 | if (!isfinite (x)) | ||
| 16 | return x; | ||
| 17 | z = fabs (x); | ||
| 18 | |||
| 19 | /* Avoid setting FPU underflow exception flag in x * x. */ | ||
| 20 | #if 0 | ||
| 21 | if ( z < 0x1p-32) | ||
| 22 | return x; | ||
| 23 | #endif | ||
| 24 | |||
| 25 | /* NB the previous formula | ||
| 26 | z = __fast_log1p (z + z * z / (__fast_sqrt (z * z + 1.0) + 1.0)); | ||
| 27 | was defective in two ways: | ||
| 28 | 1: It ommitted required brackets: | ||
| 29 | z = __fast_log1p (z + z * (z / (__fast_sqrt (z * z + 1.0) + 1.0))); | ||
| 30 | ^ ^ | ||
| 31 | so would still overflow for large z. | ||
| 32 | 2: Even with the brackets, it still degraded quickly for large z | ||
| 33 | (where z*z+1 == z*z). | ||
| 34 | e.g. asinh (sinh 356.0)) gave 355.30685281944005 | ||
| 35 | */ | ||
| 36 | |||
| 37 | const double asinhCutover = pow(2,DBL_MAX_EXP/2); // 1.3407807929943e+154 | ||
| 38 | |||
| 39 | if (z < asinhCutover) | ||
| 40 | /* After excluding large values, the rearranged formula gives better results | ||
| 41 | the original formula log(z + sqrt(z * z + 1.0)) for very small z. | ||
| 42 | e.g. rearranged asinh(sinh 2e-301)) = 2e-301 | ||
| 43 | original asinh(sinh 2e-301)) = 0. | ||
| 44 | asinh(z) = log (z + sqrt (z * z + 1.0)) | ||
| 45 | = log1p (z + sqrt (z * z + 1.0) - 1.0) | ||
| 46 | = log1p (z + (sqrt (z * z + 1.0) - 1.0) | ||
| 47 | * (sqrt (z * z + 1.0) + 1.0) | ||
| 48 | / (sqrt (z * z + 1.0) + 1.0)) | ||
| 49 | = log1p (z + ((z * z + 1.0) - 1.0) | ||
| 50 | / (sqrt (z * z + 1.0) + 1.0)) | ||
| 51 | = log1p (z + z * z / (sqrt (z * z + 1.0) + 1.0)) | ||
| 52 | */ | ||
| 53 | z = __fast_log1p (z + z * (z / (__fast_sqrt (z * z + 1.0) + 1.0))); | ||
| 54 | else | ||
| 55 | /* above this, z*z+1 == z*z, so we can simplify | ||
| 56 | (and avoid z*z being infinity). | ||
| 57 | asinh(z) = log (z + sqrt (z * z + 1.0)) | ||
| 58 | = log (z + sqrt (z * z )) | ||
| 59 | = log (2 * z) | ||
| 60 | = log 2 + log z | ||
| 61 | Choosing asinhCutover is a little tricky. | ||
| 62 | We'd like something that's based on the nature of | ||
| 63 | the numeric type (DBL_MAX_EXP, etc). | ||
| 64 | If c = asinhCutover, then we need: | ||
| 65 | (1) c*c == c*c + 1 | ||
| 66 | (2) log (2*c) = log 2 + log c. | ||
| 67 | For float: | ||
| 68 | 9.490626562425156e7 is the smallest value that | ||
| 69 | achieves (1), but it fails (2). (It only just fails, | ||
| 70 | but enough to make the function erroneously non-monotonic). | ||
| 71 | */ | ||
| 72 | z = __fast_log(2) + __fast_log(z); | ||
| 73 | return copysign(z, x); //ensure 0.0 -> 0.0 and -0.0 -> -0.0. | ||
| 74 | } | ||
lib/libc/mingw/math/x86/asinhf.c deleted-34| ... | @@ -1,34 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <errno.h> | ||
| 8 | #include <float.h> | ||
| 9 | #include "fastmath.h" | ||
| 10 | |||
| 11 | /* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */ | ||
| 12 | float asinhf(float x) | ||
| 13 | { | ||
| 14 | float z; | ||
| 15 | if (!isfinite (x)) | ||
| 16 | return x; | ||
| 17 | z = fabsf (x); | ||
| 18 | |||
| 19 | /* Avoid setting FPU underflow exception flag in x * x. */ | ||
| 20 | #if 0 | ||
| 21 | if ( z < 0x1p-32) | ||
| 22 | return x; | ||
| 23 | #endif | ||
| 24 | |||
| 25 | /* See commentary in asinh */ | ||
| 26 | const float asinhCutover = pow(2,FLT_MAX_EXP/2); | ||
| 27 | |||
| 28 | if (z < asinhCutover) | ||
| 29 | z = __fast_log1p (z + z * (z / (__fast_sqrt (z * z + 1.0) + 1.0))); | ||
| 30 | //z = __fast_log(z + __fast_sqrt(z * z + 1.0)); | ||
| 31 | else | ||
| 32 | z = __fast_log(2) + __fast_log(z); | ||
| 33 | return copysignf(z, x); //ensure 0.0 -> 0.0 and -0.0 -> -0.0. | ||
| 34 | } | ||
lib/libc/mingw/math/x86/atan2.c deleted-15| ... | @@ -1,15 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <math.h> | ||
| 8 | |||
| 9 | double | ||
| 10 | atan2 (double y, double x) | ||
| 11 | { | ||
| 12 | double res = 0.0; | ||
| 13 | asm volatile ("fpatan" : "=t" (res) : "u" (y), "0" (x) : "st(1)"); | ||
| 14 | return res; | ||
| 15 | } | ||
lib/libc/mingw/math/x86/atanh.c deleted-36| ... | @@ -1,36 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <errno.h> | ||
| 8 | #include "fastmath.h" | ||
| 9 | |||
| 10 | /* atanh (x) = 0.5 * log ((1.0 + x)/(1.0 - x)) */ | ||
| 11 | |||
| 12 | double atanh(double x) | ||
| 13 | { | ||
| 14 | double z; | ||
| 15 | if (isnan (x)) | ||
| 16 | return x; | ||
| 17 | z = fabs (x); | ||
| 18 | if (z == 1.0) | ||
| 19 | { | ||
| 20 | errno = ERANGE; | ||
| 21 | return (x > 0 ? INFINITY : -INFINITY); | ||
| 22 | } | ||
| 23 | if (z > 1.0) | ||
| 24 | { | ||
| 25 | errno = EDOM; | ||
| 26 | return nan(""); | ||
| 27 | } | ||
| 28 | /* Rearrange formula to avoid precision loss for small x. | ||
| 29 | |||
| 30 | atanh(x) = 0.5 * log ((1.0 + x)/(1.0 - x)) | ||
| 31 | 	 = 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0) | ||
| 32 | = 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x)) | ||
| 33 | = 0.5 * log1p ((2.0 * x ) / (1.0 - x)) */ | ||
| 34 | z = 0.5 * __fast_log1p ((z + z) / (1.0 - z)); | ||
| 35 | return copysign(z, x); //ensure 0.0 -> 0.0 and -0.0 -> -0.0. | ||
| 36 | } | ||
lib/libc/mingw/math/x86/atanhf.c deleted-35| ... | @@ -1,35 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | #include <errno.h> | ||
| 8 | #include "fastmath.h" | ||
| 9 | |||
| 10 | /* atanh (x) = 0.5 * log ((1.0 + x)/(1.0 - x)) */ | ||
| 11 | float atanhf (float x) | ||
| 12 | { | ||
| 13 | float z; | ||
| 14 | if (isnan (x)) | ||
| 15 | return x; | ||
| 16 | z = fabsf (x); | ||
| 17 | if (z == 1.0) | ||
| 18 | { | ||
| 19 | errno = ERANGE; | ||
| 20 | return (x > 0 ? INFINITY : -INFINITY); | ||
| 21 | } | ||
| 22 | if ( z > 1.0) | ||
| 23 | { | ||
| 24 | errno = EDOM; | ||
| 25 | return nanf(""); | ||
| 26 | } | ||
| 27 | /* Rearrange formula to avoid precision loss for small x. | ||
| 28 | |||
| 29 | atanh(x) = 0.5 * log ((1.0 + x)/(1.0 - x)) | ||
| 30 | 	 = 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0) | ||
| 31 | = 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x)) | ||
| 32 | = 0.5 * log1p ((2.0 * x ) / (1.0 - x)) */ | ||
| 33 | z = 0.5 * __fast_log1p ((z + z) / (1.0 - z)); | ||
| 34 | return copysignf(z, x); //ensure 0.0 -> 0.0 and -0.0 -> -0.0. | ||
| 35 | } | ||
lib/libc/mingw/math/x86/ceil.S deleted-115| ... | @@ -1,115 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"ceil.S" | ||
| 9 | 	.text | ||
| 10 | 	.align 4 | ||
| 11 | 	.globl __MINGW_USYMBOL(ceil) | ||
| 12 | 	.def	__MINGW_USYMBOL(ceil);	.scl	2;	.type	32;	.endef | ||
| 13 | #ifdef __x86_64__ | ||
| 14 | 	.seh_proc	__MINGW_USYMBOL(ceil) | ||
| 15 | #endif | ||
| 16 | |||
| 17 | __MINGW_USYMBOL(ceil): | ||
| 18 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 19 | 	.seh_endprologue | ||
| 20 | 	movd %xmm0, %rax | ||
| 21 | 	movq	%rax, %rcx | ||
| 22 | 	sarq	$52, %rcx | ||
| 23 | 	andl	$2047, %ecx | ||
| 24 | 	subl	$1023, %ecx | ||
| 25 | 	cmpl	$51, %ecx | ||
| 26 | 	jg	.is_intnaninf | ||
| 27 | 	/* Is x zero? */ | ||
| 28 | 	testq	%rax, %rax | ||
| 29 | 	je	.ret_org | ||
| 30 | 	/* Is x signed? */ | ||
| 31 | 	testl	%ecx, %ecx | ||
| 32 | 	js	.signed_val | ||
| 33 | 	/* Is x integral? */ | ||
| 34 | 	movabsq	$4503599627370495, %rdx | ||
| 35 | 	sarq	%cl, %rdx | ||
| 36 | 	testq	%rax, %rdx | ||
| 37 | 	je	.ret_org | ||
| 38 | 	addsd	.huge(%rip), %xmm0 | ||
| 39 | 	ucomisd	.zero(%rip), %xmm0 | ||
| 40 | 	jbe	.doret | ||
| 41 | 	testq	%rax, %rax | ||
| 42 | 	jle	.l1 | ||
| 43 | 	/* inexact ... */ | ||
| 44 | 	movabsq	$4503599627370496, %r8 | ||
| 45 | 	shrq	%cl, %r8 | ||
| 46 | 	addq	%r8, %rax | ||
| 47 | .l1: | ||
| 48 | 	notq	%rdx | ||
| 49 | 	andq	%rdx, %rax | ||
| 50 | .doret: | ||
| 51 | 	movd %rax, %xmm0 | ||
| 52 | 	ret | ||
| 53 | 	.p2align 4,,10 | ||
| 54 | .signed_val: | ||
| 55 | 	addsd	.huge(%rip), %xmm0 | ||
| 56 | 	ucomisd	.zero(%rip), %xmm0 | ||
| 57 | 	jbe	.doret2 | ||
| 58 | 	testq	%rax, %rax | ||
| 59 | 	movabsq	$4607182418800017408, %rdx | ||
| 60 | 	movabsq	$-9223372036854775808, %rax | ||
| 61 | 	cmovns	%rdx, %rax | ||
| 62 | 	.p2align 4,,10 | ||
| 63 | .doret2: | ||
| 64 | 	movd %rax, %xmm0 | ||
| 65 | 	ret | ||
| 66 | |||
| 67 | 	.p2align 4,,10 | ||
| 68 | .is_intnaninf: | ||
| 69 | 	/* Is Nan or Inf? */ | ||
| 70 | 	cmpl	$1024, %ecx | ||
| 71 | 	je	.ret_naninf | ||
| 72 | 	.p2align 4,,10 | ||
| 73 | .ret_org: | ||
| 74 | 	/* return x. */ | ||
| 75 | 	rep | ||
| 76 | 	ret | ||
| 77 | 	.p2align 4,,10 | ||
| 78 | .ret_naninf: | ||
| 79 | 	/* return x + x; */ | ||
| 80 | 	addsd	%xmm0, %xmm0 | ||
| 81 | 	ret | ||
| 82 | 	.seh_endproc | ||
| 83 | |||
| 84 | /* local data. */ | ||
| 85 | 	.section .rdata,"dr" | ||
| 86 | 	.align 8 | ||
| 87 | .huge: | ||
| 88 | 	.long	-2013235812 | ||
| 89 | 	.long	2117592124 | ||
| 90 | 	.align 8 | ||
| 91 | .zero: | ||
| 92 | 	.long	0 | ||
| 93 | 	.long	0 | ||
| 94 | #elif defined(_X86_) || defined(__i386__) | ||
| 95 | 	fldl	4(%esp) | ||
| 96 | 	subl	$8,%esp | ||
| 97 | |||
| 98 | 	fstcw	4(%esp)			/* store fpu control word */ | ||
| 99 | |||
| 100 | 	/* We use here %edx although only the low 1 bits are defined. | ||
| 101 | 	 But none of the operations should care and they are faster | ||
| 102 | 	 than the 16 bit operations. */ | ||
| 103 | 	movl	$0x0800,%edx		/* round towards +oo */ | ||
| 104 | 	orl	4(%esp),%edx | ||
| 105 | 	andl	$0xfbff,%edx | ||
| 106 | 	movl	%edx,(%esp) | ||
| 107 | 	fldcw	(%esp)			/* load modified control word */ | ||
| 108 | |||
| 109 | 	frndint				/* round */ | ||
| 110 | |||
| 111 | 	fldcw	4(%esp)			/* restore original control word */ | ||
| 112 | |||
| 113 | 	addl	$8,%esp | ||
| 114 | 	ret | ||
| 115 | #endif | ||
lib/libc/mingw/math/x86/cos.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | /* | ||
| 2 | This Software is provided under the Zope Public License (ZPL) Version 2.1. | ||
| 3 | |||
| 4 | Copyright (c) 2009, 2010 by the mingw-w64 project | ||
| 5 | |||
| 6 | See the AUTHORS file for the list of contributors to the mingw-w64 project. | ||
| 7 | |||
| 8 | This license has been certified as open source. It has also been designated | ||
| 9 | as GPL compatible by the Free Software Foundation (FSF). | ||
| 10 | |||
| 11 | Redistribution and use in source and binary forms, with or without | ||
| 12 | modification, are permitted provided that the following conditions are met: | ||
| 13 | |||
| 14 | 1. Redistributions in source code must retain the accompanying copyright | ||
| 15 | notice, this list of conditions, and the following disclaimer. | ||
| 16 | 2. Redistributions in binary form must reproduce the accompanying | ||
| 17 | copyright notice, this list of conditions, and the following disclaimer | ||
| 18 | in the documentation and/or other materials provided with the | ||
| 19 | distribution. | ||
| 20 | 3. Names of the copyright holders must not be used to endorse or promote | ||
| 21 | products derived from this software without prior written permission | ||
| 22 | from the copyright holders. | ||
| 23 | 4. The right to distribute this software or to use it for any purpose does | ||
| 24 | not give you the right to use Servicemarks (sm) or Trademarks (tm) of | ||
| 25 | the copyright holders. Use of them is covered by separate agreement | ||
| 26 | with the copyright holders. | ||
| 27 | 5. If any files are modified, you must cause the modified files to carry | ||
| 28 | prominent notices stating that you changed the files and the date of | ||
| 29 | any change. | ||
| 30 | |||
| 31 | Disclaimer | ||
| 32 | |||
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED | ||
| 34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 35 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
| 36 | EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 37 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| 39 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define _NEW_COMPLEX_DOUBLE 1 | ||
| 46 | #include "cos.def.h" | ||
lib/libc/mingw/math/x86/exp.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | /* | ||
| 2 | This Software is provided under the Zope Public License (ZPL) Version 2.1. | ||
| 3 | |||
| 4 | Copyright (c) 2009, 2010 by the mingw-w64 project | ||
| 5 | |||
| 6 | See the AUTHORS file for the list of contributors to the mingw-w64 project. | ||
| 7 | |||
| 8 | This license has been certified as open source. It has also been designated | ||
| 9 | as GPL compatible by the Free Software Foundation (FSF). | ||
| 10 | |||
| 11 | Redistribution and use in source and binary forms, with or without | ||
| 12 | modification, are permitted provided that the following conditions are met: | ||
| 13 | |||
| 14 | 1. Redistributions in source code must retain the accompanying copyright | ||
| 15 | notice, this list of conditions, and the following disclaimer. | ||
| 16 | 2. Redistributions in binary form must reproduce the accompanying | ||
| 17 | copyright notice, this list of conditions, and the following disclaimer | ||
| 18 | in the documentation and/or other materials provided with the | ||
| 19 | distribution. | ||
| 20 | 3. Names of the copyright holders must not be used to endorse or promote | ||
| 21 | products derived from this software without prior written permission | ||
| 22 | from the copyright holders. | ||
| 23 | 4. The right to distribute this software or to use it for any purpose does | ||
| 24 | not give you the right to use Servicemarks (sm) or Trademarks (tm) of | ||
| 25 | the copyright holders. Use of them is covered by separate agreement | ||
| 26 | with the copyright holders. | ||
| 27 | 5. If any files are modified, you must cause the modified files to carry | ||
| 28 | prominent notices stating that you changed the files and the date of | ||
| 29 | any change. | ||
| 30 | |||
| 31 | Disclaimer | ||
| 32 | |||
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED | ||
| 34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 35 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
| 36 | EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 37 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| 39 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define _NEW_COMPLEX_DOUBLE 1 | ||
| 46 | #include "exp.def.h" | ||
lib/libc/mingw/math/x86/exp2.S deleted-94| ... | @@ -1,94 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"exp2.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | .globl __MINGW_USYMBOL(exp2) | ||
| 16 | 	.def	__MINGW_USYMBOL(exp2);	.scl	2;	.type	32;	.endef | ||
| 17 | __MINGW_USYMBOL(exp2): | ||
| 18 | #ifdef __x86_64__ | ||
| 19 | 	subq	$24, %rsp | ||
| 20 | 	movsd	%xmm0,(%rsp) | ||
| 21 | 	fldl	(%rsp) | ||
| 22 | 	fxam				/* Is NaN or +-Inf? */ | ||
| 23 | 	fstsw	%ax | ||
| 24 | 	movb	$0x45, %dh | ||
| 25 | 	andb	%ah, %dh | ||
| 26 | 	cmpb	$0x05, %dh | ||
| 27 | 	je	1f			/* Is +-Inf, jump. */ | ||
| 28 | 	fld	%st | ||
| 29 | 	subq $8, %rsp /* int(x) */ | ||
| 30 | 	fnstcw 4(%rsp) | ||
| 31 | 	movzwl 4(%rsp), %eax | ||
| 32 | 	orb $12, %ah | ||
| 33 | 	movw %ax, (%rsp) | ||
| 34 | 	fldcw (%rsp) | ||
| 35 | 	frndint | ||
| 36 | 	fldcw 4(%rsp) | ||
| 37 | 	addq $8, %rsp | ||
| 38 | 	fsubr	%st,%st(1)		/* fract(x) */ | ||
| 39 | 	fxch | ||
| 40 | 	f2xm1				/* 2^(fract(x)) - 1 */ | ||
| 41 | 	fld1 | ||
| 42 | 	faddp				/* 2^(fract(x)) */ | ||
| 43 | 	fscale				/* e^x */ | ||
| 44 | 	fstp	%st(1) | ||
| 45 | 	fstpl	(%rsp) | ||
| 46 | 	movsd	(%rsp),%xmm0 | ||
| 47 | 	addq	$24, %rsp | ||
| 48 | 	ret | ||
| 49 | |||
| 50 | 1:	testl	$0x200, %eax		/* Test sign. */ | ||
| 51 | 	jz	2f			/* If positive, jump. */ | ||
| 52 | 	fstp	%st | ||
| 53 | 	fldz				/* Set result to 0. */ | ||
| 54 | 2:	fstpl	(%rsp) | ||
| 55 | 	movsd	(%rsp),%xmm0 | ||
| 56 | 	addq	$24,%rsp | ||
| 57 | 	ret | ||
| 58 | #else | ||
| 59 | 	fldl	4(%esp) | ||
| 60 | /* I added the following ugly construct because exp(+-Inf) resulted | ||
| 61 | in NaN. The ugliness results from the bright minds at Intel. | ||
| 62 | For the i686 the code can be written better. | ||
| 63 | -- drepper@cygnus.com. */ | ||
| 64 | 	fxam				/* Is NaN or +-Inf? */ | ||
| 65 | 	fstsw	%ax | ||
| 66 | 	movb	$0x45, %dh | ||
| 67 | 	andb	%ah, %dh | ||
| 68 | 	cmpb	$0x05, %dh | ||
| 69 | 	je	1f			/* Is +-Inf, jump. */ | ||
| 70 | 	fld	%st | ||
| 71 | 	subl $8, %esp /* int(x) */ | ||
| 72 | 	fnstcw 4(%esp) | ||
| 73 | 	movzwl 4(%esp), %eax | ||
| 74 | 	orb $12, %ah | ||
| 75 | 	movw %ax, (%esp) | ||
| 76 | 	fldcw (%esp) | ||
| 77 | 	frndint | ||
| 78 | 	fldcw 4(%esp) | ||
| 79 | 	addl $8, %esp | ||
| 80 | 	fsubr	%st,%st(1)		/* fract(x) */ | ||
| 81 | 	fxch | ||
| 82 | 	f2xm1				/* 2^(fract(x)) - 1 */ | ||
| 83 | 	fld1 | ||
| 84 | 	faddp				/* 2^(fract(x)) */ | ||
| 85 | 	fscale				/* e^x */ | ||
| 86 | 	fstp	%st(1) | ||
| 87 | 	ret | ||
| 88 | |||
| 89 | 1:	testl	$0x200, %eax		/* Test sign. */ | ||
| 90 | 	jz	2f			/* If positive, jump. */ | ||
| 91 | 	fstp	%st | ||
| 92 | 	fldz				/* Set result to 0. */ | ||
| 93 | 2:	ret | ||
| 94 | #endif | ||
lib/libc/mingw/math/x86/exp2f.S deleted-94| ... | @@ -1,94 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"exp2f.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | .globl __MINGW_USYMBOL(exp2f) | ||
| 16 | 	.def	__MINGW_USYMBOL(exp2f);	.scl	2;	.type	32;	.endef | ||
| 17 | __MINGW_USYMBOL(exp2f): | ||
| 18 | #ifdef __x86_64__ | ||
| 19 | 	subq	$24, %rsp | ||
| 20 | 	movss	%xmm0,(%rsp) | ||
| 21 | 	flds	(%rsp) | ||
| 22 | 	fxam				/* Is NaN or +-Inf? */ | ||
| 23 | 	fstsw	%ax | ||
| 24 | 	movb	$0x45, %dh | ||
| 25 | 	andb	%ah, %dh | ||
| 26 | 	cmpb	$0x05, %dh | ||
| 27 | 	je	1f			/* Is +-Inf, jump. */ | ||
| 28 | 	fld	%st | ||
| 29 | 	subq $8, %rsp /* int(x) */ | ||
| 30 | 	fnstcw 4(%rsp) | ||
| 31 | 	movzwl 4(%rsp), %eax | ||
| 32 | 	orb $12, %ah | ||
| 33 | 	movw %ax, (%rsp) | ||
| 34 | 	fldcw (%rsp) | ||
| 35 | 	frndint | ||
| 36 | 	fldcw 4(%rsp) | ||
| 37 | 	addq $8, %rsp | ||
| 38 | 	fsubr	%st,%st(1)		/* fract(x) */ | ||
| 39 | 	fxch | ||
| 40 | 	f2xm1				/* 2^(fract(x)) - 1 */ | ||
| 41 | 	fld1 | ||
| 42 | 	faddp				/* 2^(fract(x)) */ | ||
| 43 | 	fscale				/* e^x */ | ||
| 44 | 	fstp	%st(1) | ||
| 45 | 	fstps	(%rsp) | ||
| 46 | 	movss	(%rsp),%xmm0 | ||
| 47 | 	addq	$24, %rsp | ||
| 48 | 	ret | ||
| 49 | |||
| 50 | 1:	testl	$0x200, %eax		/* Test sign. */ | ||
| 51 | 	jz	2f			/* If positive, jump. */ | ||
| 52 | 	fstp	%st | ||
| 53 | 	fldz				/* Set result to 0. */ | ||
| 54 | 2:	fstps	(%rsp) | ||
| 55 | 	movss	(%rsp),%xmm0 | ||
| 56 | 	addq	$24, %rsp | ||
| 57 | 	ret | ||
| 58 | #else | ||
| 59 | 	flds	4(%esp) | ||
| 60 | /* I added the following ugly construct because exp(+-Inf) resulted | ||
| 61 | in NaN. The ugliness results from the bright minds at Intel. | ||
| 62 | For the i686 the code can be written better. | ||
| 63 | -- drepper@cygnus.com. */ | ||
| 64 | 	fxam				/* Is NaN or +-Inf? */ | ||
| 65 | 	fstsw	%ax | ||
| 66 | 	movb	$0x45, %dh | ||
| 67 | 	andb	%ah, %dh | ||
| 68 | 	cmpb	$0x05, %dh | ||
| 69 | 	je	1f			/* Is +-Inf, jump. */ | ||
| 70 | 	fld	%st | ||
| 71 | 	subl $8, %esp /* int(x) */ | ||
| 72 | 	fnstcw 4(%esp) | ||
| 73 | 	movzwl 4(%esp), %eax | ||
| 74 | 	orb $12, %ah | ||
| 75 | 	movw %ax, (%esp) | ||
| 76 | 	fldcw (%esp) | ||
| 77 | 	frndint | ||
| 78 | 	fldcw 4(%esp) | ||
| 79 | 	addl $8, %esp | ||
| 80 | 	fsubr	%st,%st(1)		/* fract(x) */ | ||
| 81 | 	fxch | ||
| 82 | 	f2xm1				/* 2^(fract(x)) - 1 */ | ||
| 83 | 	fld1 | ||
| 84 | 	faddp				/* 2^(fract(x)) */ | ||
| 85 | 	fscale				/* e^x */ | ||
| 86 | 	fstp	%st(1) | ||
| 87 | 	ret | ||
| 88 | |||
| 89 | 1:	testl	$0x200, %eax		/* Test sign. */ | ||
| 90 | 	jz	2f			/* If positive, jump. */ | ||
| 91 | 	fstp	%st | ||
| 92 | 	fldz				/* Set result to 0. */ | ||
| 93 | 2:	ret | ||
| 94 | #endif | ||
lib/libc/mingw/math/x86/expm1.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | /* | ||
| 2 | This Software is provided under the Zope Public License (ZPL) Version 2.1. | ||
| 3 | |||
| 4 | Copyright (c) 2009, 2010 by the mingw-w64 project | ||
| 5 | |||
| 6 | See the AUTHORS file for the list of contributors to the mingw-w64 project. | ||
| 7 | |||
| 8 | This license has been certified as open source. It has also been designated | ||
| 9 | as GPL compatible by the Free Software Foundation (FSF). | ||
| 10 | |||
| 11 | Redistribution and use in source and binary forms, with or without | ||
| 12 | modification, are permitted provided that the following conditions are met: | ||
| 13 | |||
| 14 | 1. Redistributions in source code must retain the accompanying copyright | ||
| 15 | notice, this list of conditions, and the following disclaimer. | ||
| 16 | 2. Redistributions in binary form must reproduce the accompanying | ||
| 17 | copyright notice, this list of conditions, and the following disclaimer | ||
| 18 | in the documentation and/or other materials provided with the | ||
| 19 | distribution. | ||
| 20 | 3. Names of the copyright holders must not be used to endorse or promote | ||
| 21 | products derived from this software without prior written permission | ||
| 22 | from the copyright holders. | ||
| 23 | 4. The right to distribute this software or to use it for any purpose does | ||
| 24 | not give you the right to use Servicemarks (sm) or Trademarks (tm) of | ||
| 25 | the copyright holders. Use of them is covered by separate agreement | ||
| 26 | with the copyright holders. | ||
| 27 | 5. If any files are modified, you must cause the modified files to carry | ||
| 28 | prominent notices stating that you changed the files and the date of | ||
| 29 | any change. | ||
| 30 | |||
| 31 | Disclaimer | ||
| 32 | |||
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED | ||
| 34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 35 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
| 36 | EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 37 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| 39 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define _NEW_COMPLEX_DOUBLE 1 | ||
| 46 | #include "expm1.def.h" | ||
lib/libc/mingw/math/x86/expm1f.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | /* | ||
| 2 | This Software is provided under the Zope Public License (ZPL) Version 2.1. | ||
| 3 | |||
| 4 | Copyright (c) 2009, 2010 by the mingw-w64 project | ||
| 5 | |||
| 6 | See the AUTHORS file for the list of contributors to the mingw-w64 project. | ||
| 7 | |||
| 8 | This license has been certified as open source. It has also been designated | ||
| 9 | as GPL compatible by the Free Software Foundation (FSF). | ||
| 10 | |||
| 11 | Redistribution and use in source and binary forms, with or without | ||
| 12 | modification, are permitted provided that the following conditions are met: | ||
| 13 | |||
| 14 | 1. Redistributions in source code must retain the accompanying copyright | ||
| 15 | notice, this list of conditions, and the following disclaimer. | ||
| 16 | 2. Redistributions in binary form must reproduce the accompanying | ||
| 17 | copyright notice, this list of conditions, and the following disclaimer | ||
| 18 | in the documentation and/or other materials provided with the | ||
| 19 | distribution. | ||
| 20 | 3. Names of the copyright holders must not be used to endorse or promote | ||
| 21 | products derived from this software without prior written permission | ||
| 22 | from the copyright holders. | ||
| 23 | 4. The right to distribute this software or to use it for any purpose does | ||
| 24 | not give you the right to use Servicemarks (sm) or Trademarks (tm) of | ||
| 25 | the copyright holders. Use of them is covered by separate agreement | ||
| 26 | with the copyright holders. | ||
| 27 | 5. If any files are modified, you must cause the modified files to carry | ||
| 28 | prominent notices stating that you changed the files and the date of | ||
| 29 | any change. | ||
| 30 | |||
| 31 | Disclaimer | ||
| 32 | |||
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED | ||
| 34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 35 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
| 36 | EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 37 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| 39 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define _NEW_COMPLEX_FLOAT 1 | ||
| 46 | #include "expm1.def.h" | ||
lib/libc/mingw/math/x86/floor.S deleted-167| ... | @@ -1,167 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"floor.S" | ||
| 9 | 	.text | ||
| 10 | 	.p2align 4,,15 | ||
| 11 | 	.globl __MINGW_USYMBOL(floor) | ||
| 12 | 	.def	__MINGW_USYMBOL(floor);	.scl	2;	.type	32;	.endef | ||
| 13 | #ifdef __x86_64__ | ||
| 14 | 	.seh_proc __MINGW_USYMBOL(floor) | ||
| 15 | #endif | ||
| 16 | __MINGW_USYMBOL(floor): | ||
| 17 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 18 | 	pushq	%rbx | ||
| 19 | 	.seh_pushreg	%rbx | ||
| 20 | 	subq	$16, %rsp | ||
| 21 | 	.seh_stackalloc	16 | ||
| 22 | 	.seh_endprologue | ||
| 23 | 	movsd	%xmm0, 8(%rsp) | ||
| 24 | 	movq	8(%rsp), %r9 | ||
| 25 | 	movq	%r9, %rdx | ||
| 26 | 	movl	%r9d, %r10d | ||
| 27 | 	shrq	$32, %rdx | ||
| 28 | 	movl	%edx, %eax | ||
| 29 | 	movl	%edx, %r11d | ||
| 30 | 	sarl	$20, %eax | ||
| 31 | 	andl	$2047, %eax | ||
| 32 | 	leal	-1023(%rax), %r8d | ||
| 33 | 	cmpl	$51, %r8d | ||
| 34 | 	jle	.L2 | ||
| 35 | 	cmpl	$1024, %r8d | ||
| 36 | 	je	.L27 | ||
| 37 | .L3: | ||
| 38 | 	addq	$16, %rsp | ||
| 39 | 	popq	%rbx | ||
| 40 | 	ret | ||
| 41 | 	.p2align 4,,10 | ||
| 42 | .L2: | ||
| 43 | 	cmpl	$19, %r8d | ||
| 44 | 	jg	.L4 | ||
| 45 | 	testl	%r8d, %r8d | ||
| 46 | 	js	.L28 | ||
| 47 | 	movl	$1048575, %eax | ||
| 48 | 	movl	%r8d, %ecx | ||
| 49 | 	shrl	%cl, %eax | ||
| 50 | 	testl	%r9d, %r9d | ||
| 51 | 	jne	.L8 | ||
| 52 | 	testl	%edx, %eax | ||
| 53 | 	je	.L3 | ||
| 54 | .L8: | ||
| 55 | 	movsd	.hugeval(%rip), %xmm1 | ||
| 56 | 	xorpd	%xmm2, %xmm2 | ||
| 57 | 	addsd	%xmm0, %xmm1 | ||
| 58 | 	ucomisd	%xmm1, %xmm2 | ||
| 59 | 	jae	.L3 | ||
| 60 | 	xorl	%r9d, %r9d | ||
| 61 | 	testl	%edx, %edx | ||
| 62 | 	jns	.L9 | ||
| 63 | 	movl	$1048576, %r9d | ||
| 64 | 	movl	%r8d, %ecx | ||
| 65 | 	sarl	%cl, %r9d | ||
| 66 | .L9: | ||
| 67 | 	addl	%r9d, %edx | ||
| 68 | 	notl	%eax | ||
| 69 | 	andl	%edx, %eax | ||
| 70 | 	salq	$32, %rax | ||
| 71 | 	movq	%rax, 8(%rsp) | ||
| 72 | 	movsd	8(%rsp), %xmm0 | ||
| 73 | 	addq	$16, %rsp | ||
| 74 | 	popq	%rbx | ||
| 75 | 	ret | ||
| 76 | 	.p2align 4,,10 | ||
| 77 | .L4: | ||
| 78 | 	leal	-1043(%rax), %ecx | ||
| 79 | 	movl	$-1, %ebx | ||
| 80 | 	shrl	%cl, %ebx | ||
| 81 | 	testl	%r9d, %ebx | ||
| 82 | 	je	.L3 | ||
| 83 | 	movsd	.hugeval(%rip), %xmm1 | ||
| 84 | 	xorpd	%xmm2, %xmm2 | ||
| 85 | 	addsd	%xmm0, %xmm1 | ||
| 86 | 	ucomisd	%xmm1, %xmm2 | ||
| 87 | 	jae	.L3 | ||
| 88 | 	testl	%edx, %edx | ||
| 89 | 	js	.L29 | ||
| 90 | .L11: | ||
| 91 | 	notl	%ebx | ||
| 92 | 	salq	$32, %r11 | ||
| 93 | 	andl	%ebx, %r10d | ||
| 94 | 	orq	%r10, %r11 | ||
| 95 | 	movq	%r11, 8(%rsp) | ||
| 96 | 	movsd	8(%rsp), %xmm0 | ||
| 97 | 	addq	$16, %rsp | ||
| 98 | 	popq	%rbx | ||
| 99 | 	ret | ||
| 100 | 	.p2align 4,,10 | ||
| 101 | .L27: | ||
| 102 | 	addsd	%xmm0, %xmm0 | ||
| 103 | 	addq	$16, %rsp | ||
| 104 | 	popq	%rbx | ||
| 105 | 	ret | ||
| 106 | 	.p2align 4,,10 | ||
| 107 | .L28: | ||
| 108 | 	movsd	.hugeval(%rip), %xmm2 | ||
| 109 | 	xorpd	%xmm1, %xmm1 | ||
| 110 | 	addsd	%xmm0, %xmm2 | ||
| 111 | 	ucomisd	%xmm1, %xmm2 | ||
| 112 | 	jbe	.L3 | ||
| 113 | 	testl	%edx, %edx | ||
| 114 | 	js	.L7 | ||
| 115 | 	movapd	%xmm1, %xmm0 | ||
| 116 | 	jmp	.L3 | ||
| 117 | 	.p2align 4,,10 | ||
| 118 | .L7: | ||
| 119 | 	andl	$2147483647, %edx | ||
| 120 | 	orl	%r9d, %edx | ||
| 121 | 	je	.L3 | ||
| 122 | 	movabsq	$-4616189618054758400, %rax | ||
| 123 | 	movq	%rax, 8(%rsp) | ||
| 124 | 	movsd	8(%rsp), %xmm0 | ||
| 125 | 	jmp	.L3 | ||
| 126 | 	.p2align 4,,10 | ||
| 127 | .L29: | ||
| 128 | 	cmpl	$20, %r8d | ||
| 129 | 	je	.L25 | ||
| 130 | 	movl	$1075, %ecx | ||
| 131 | 	movl	$1, %r10d | ||
| 132 | 	subl	%eax, %ecx | ||
| 133 | 	sall	%cl, %r10d | ||
| 134 | 	addl	%r9d, %r10d | ||
| 135 | 	jae	.L11 | ||
| 136 | .L25: | ||
| 137 | 	leal	1(%rdx), %r11d | ||
| 138 | 	jmp	.L11 | ||
| 139 | 	.seh_endproc | ||
| 140 | |||
| 141 | 	.section .rdata,"dr" | ||
| 142 | 	.align 8 | ||
| 143 | .hugeval: | ||
| 144 | 	.long	-2013235812 | ||
| 145 | 	.long	2117592124 | ||
| 146 | #elif defined(_X86_) || defined(__i386__) | ||
| 147 | 	fldl	4(%esp) | ||
| 148 | 	subl	$8,%esp | ||
| 149 | |||
| 150 | 	fstcw	4(%esp)			/* store fpu control word */ | ||
| 151 | |||
| 152 | 	/* We use here %edx although only the low 1 bits are defined. | ||
| 153 | 	 But none of the operations should care and they are faster | ||
| 154 | 	 than the 16 bit operations. */ | ||
| 155 | 	movl	$0x400,%edx		/* round towards -oo */ | ||
| 156 | 	orl	4(%esp),%edx | ||
| 157 | 	andl	$0xf7ff,%edx | ||
| 158 | 	movl	%edx,(%esp) | ||
| 159 | 	fldcw	(%esp)			/* load modified control word */ | ||
| 160 | |||
| 161 | 	frndint				/* round */ | ||
| 162 | |||
| 163 | 	fldcw	4(%esp)			/* restore original control word */ | ||
| 164 | |||
| 165 | 	addl	$8,%esp | ||
| 166 | 	ret | ||
| 167 | #endif | ||
lib/libc/mingw/math/x86/fmod.c deleted-21| ... | @@ -1,21 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | double fmod (double x, double y); | ||
| 7 | |||
| 8 | double | ||
| 9 | fmod (double x, double y) | ||
| 10 | { | ||
| 11 | double res = 0.0; | ||
| 12 | |||
| 13 | asm volatile ( | ||
| 14 | "1:\tfprem\n\t" | ||
| 15 | "fstsw %%ax\n\t" | ||
| 16 | "sahf\n\t" | ||
| 17 | "jp 1b\n\t" | ||
| 18 | "fstp %%st(1)" | ||
| 19 | : "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)"); | ||
| 20 | return res; | ||
| 21 | } | ||
lib/libc/mingw/math/x86/ilogb.S deleted-137| ... | @@ -1,137 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"ilogb.S" | ||
| 9 | 	.text | ||
| 10 | 	.p2align 4,,15 | ||
| 11 | .globl __MINGW_USYMBOL(ilogb) | ||
| 12 | 	.def	__MINGW_USYMBOL(ilogb);	.scl	2;	.type	32;	.endef | ||
| 13 | #ifdef __x86_64__ | ||
| 14 | 	.seh_proc __MINGW_USYMBOL(ilogb) | ||
| 15 | #endif | ||
| 16 | __MINGW_USYMBOL(ilogb): | ||
| 17 | #ifdef __x86_64__ | ||
| 18 | /* Generated code by: | ||
| 19 | int | ||
| 20 | ilogb (double x) | ||
| 21 | { | ||
| 22 | __mingw_dbl_type_t hlp; | ||
| 23 | int hx, lx, ix; | ||
| 24 | |||
| 25 | hlp.x = x; | ||
| 26 | hx = hpl.lh.high & 0x7fffffff; | ||
| 27 | if (hx < 0x100000) | ||
| 28 | { | ||
| 29 | lx = hlp.lh.low; | ||
| 30 | if ((hx | lx) == 0) | ||
| 31 | return 0x80000000; // ilogb(0) = FP_ILOGB0 | ||
| 32 | // subnormal x | ||
| 33 | if (hx == 0) | ||
| 34 | { | ||
| 35 | for (ix = -1043; lx > 0; lx <<= 1) | ||
| 36 | ix -=1; | ||
| 37 | } | ||
| 38 | else | ||
| 39 | { | ||
| 40 | for (ix = -1022,hx <<= 11; hx > 0; hx <<= 1) | ||
| 41 | ix -=1; | ||
| 42 | } | ||
| 43 | return ix; | ||
| 44 | } | ||
| 45 | if (hx < 0x7ff00000) | ||
| 46 | return (hx >> 20) - 1023; | ||
| 47 | lx = hlp.lh.low; | ||
| 48 | return 0x7fffffff; | ||
| 49 | } */ | ||
| 50 | subq $24, %rsp | ||
| 51 | .seh_stackalloc 24 | ||
| 52 | .seh_endprologue | ||
| 53 | movsd %xmm0, 8(%rsp) | ||
| 54 | movq 8(%rsp), %rdx | ||
| 55 | shrq $32, %rdx | ||
| 56 | andl $2147483647, %edx | ||
| 57 | cmpl $1048575, %edx | ||
| 58 | jg .L2 | ||
| 59 | movq 8(%rsp), %rcx | ||
| 60 | movl %edx, %eax | ||
| 61 | orl %ecx, %eax | ||
| 62 | je .L8 | ||
| 63 | testl %edx, %edx | ||
| 64 | jne .L4 | ||
| 65 | testl %ecx, %ecx | ||
| 66 | movl %ecx, %edx | ||
| 67 | movl $-1043, %eax | ||
| 68 | jle .L3 | ||
| 69 | .p2align 4,,10 | ||
| 70 | .L5: | ||
| 71 | addl %edx, %edx | ||
| 72 | subl $1, %eax | ||
| 73 | testl %edx, %edx | ||
| 74 | jg .L5 | ||
| 75 | addq $24, %rsp | ||
| 76 | ret | ||
| 77 | .p2align 4,,10 | ||
| 78 | .L2: | ||
| 79 | cmpl $2146435071, %edx | ||
| 80 | jle .L13 | ||
| 81 | movl $2147483647, %eax | ||
| 82 | .L3: | ||
| 83 | addq $24, %rsp | ||
| 84 | ret | ||
| 85 | .p2align 4,,10 | ||
| 86 | .L4: | ||
| 87 | sall $11, %edx | ||
| 88 | movl $-1022, %eax | ||
| 89 | testl %edx, %edx | ||
| 90 | jle .L3 | ||
| 91 | .p2align 4,,10 | ||
| 92 | .L6: | ||
| 93 | addl %edx, %edx | ||
| 94 | subl $1, %eax | ||
| 95 | testl %edx, %edx | ||
| 96 | jg .L6 | ||
| 97 | addq $24, %rsp | ||
| 98 | ret | ||
| 99 | .p2align 4,,10 | ||
| 100 | .L13: | ||
| 101 | sarl $20, %edx | ||
| 102 | leal -1023(%rdx), %eax | ||
| 103 | addq $24, %rsp | ||
| 104 | ret | ||
| 105 | .L8: | ||
| 106 | movl $-2147483648, %eax | ||
| 107 | jmp .L3 | ||
| 108 | .seh_endproc | ||
| 109 | #else | ||
| 110 | |||
| 111 | 	fldl	4(%esp) | ||
| 112 | /* I added the following ugly construct because ilogb(+-Inf) is | ||
| 113 | required to return INT_MAX in ISO C99. | ||
| 114 | -- jakub@redhat.com. */ | ||
| 115 | 	fxam			/* Is NaN or +-Inf? */ | ||
| 116 | 	fstsw %ax | ||
| 117 | 	movb $0x45, %dh | ||
| 118 | 	andb %ah, %dh | ||
| 119 | 	cmpb $0x05, %dh | ||
| 120 | 	je 1f		/* Is +-Inf, jump. */ | ||
| 121 | 	cmpb $0x01, %dh | ||
| 122 | 	je 1f		/* Is NaN, jump. */ | ||
| 123 | |||
| 124 | 	fxtract | ||
| 125 | 	pushl	%eax | ||
| 126 | 	fstp	%st | ||
| 127 | |||
| 128 | 	fistpl	(%esp) | ||
| 129 | 	fwait | ||
| 130 | 	popl	%eax | ||
| 131 | |||
| 132 | 	ret | ||
| 133 | |||
| 134 | 1:	fstp	%st | ||
| 135 | 	movl	$0x7fffffff, %eax | ||
| 136 | 	ret | ||
| 137 | #endif | ||
lib/libc/mingw/math/x86/ilogbf.S deleted-106| ... | @@ -1,106 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"ilogbf.S" | ||
| 9 | 	.text | ||
| 10 | 	.p2align 4,,15 | ||
| 11 | .globl __MINGW_USYMBOL(ilogbf) | ||
| 12 | 	.def	__MINGW_USYMBOL(ilogbf);	.scl	2;	.type	32;	.endef | ||
| 13 | #ifdef __x86_64__ | ||
| 14 | 	.seh_proc __MINGW_USYMBOL(ilogbf) | ||
| 15 | #endif | ||
| 16 | __MINGW_USYMBOL(ilogbf): | ||
| 17 | #ifdef __x86_64__ | ||
| 18 | /* generated code for: | ||
| 19 | int | ||
| 20 | ilogbf (float x) | ||
| 21 | { | ||
| 22 | __mingw_flt_type_t hlp; | ||
| 23 | int hx, ix; | ||
| 24 | |||
| 25 | hlp.x = x; | ||
| 26 | hx = (int) hlp.val & 0x7fffffff; | ||
| 27 | if (hx < 0x800000) | ||
| 28 | { | ||
| 29 | if (hx == 0) | ||
| 30 | return 0x80000000; // ilogb(0) = FP_ILOGB0 | ||
| 31 | for (ix = -126, hx <<= 8; hx > 0; hx <<= 1) | ||
| 32 | ix -= 1; | ||
| 33 | return ix; | ||
| 34 | } | ||
| 35 | if (hx < 0x7f800000) | ||
| 36 | return (hx >> 23) - 127; | ||
| 37 | return 0x7fffffff; | ||
| 38 | } */ | ||
| 39 | subq $24, %rsp | ||
| 40 | .seh_stackalloc 24 | ||
| 41 | .seh_endprologue | ||
| 42 | movss %xmm0, 12(%rsp) | ||
| 43 | movl 12(%rsp), %edx | ||
| 44 | andl $2147483647, %edx | ||
| 45 | cmpl $8388607, %edx | ||
| 46 | jg .L2 | ||
| 47 | testl %edx, %edx | ||
| 48 | je .L6 | ||
| 49 | sall $8, %edx | ||
| 50 | movl $-126, %eax | ||
| 51 | testl %edx, %edx | ||
| 52 | jle .L3 | ||
| 53 | .p2align 4,,10 | ||
| 54 | .L4: | ||
| 55 | addl %edx, %edx | ||
| 56 | subl $1, %eax | ||
| 57 | testl %edx, %edx | ||
| 58 | jg .L4 | ||
| 59 | .L3: | ||
| 60 | addq $24, %rsp | ||
| 61 | ret | ||
| 62 | .p2align 4,,10 | ||
| 63 | .L2: | ||
| 64 | cmpl $2139095039, %edx | ||
| 65 | jle .L10 | ||
| 66 | movl $2147483647, %eax | ||
| 67 | addq $24, %rsp | ||
| 68 | ret | ||
| 69 | .p2align 4,,10 | ||
| 70 | .L10: | ||
| 71 | sarl $23, %edx | ||
| 72 | leal -127(%rdx), %eax | ||
| 73 | addq $24, %rsp | ||
| 74 | ret | ||
| 75 | .L6: | ||
| 76 | movl $-2147483648, %eax | ||
| 77 | jmp .L3 | ||
| 78 | .seh_endproc | ||
| 79 | #else | ||
| 80 | 	flds	4(%esp) | ||
| 81 | /* I added the following ugly construct because ilogb(+-Inf) is | ||
| 82 | required to return INT_MAX in ISO C99. | ||
| 83 | -- jakub@redhat.com. */ | ||
| 84 | 	fxam			/* Is NaN or +-Inf? */ | ||
| 85 | 	fstsw %ax | ||
| 86 | 	movb $0x45, %dh | ||
| 87 | 	andb %ah, %dh | ||
| 88 | 	cmpb $0x05, %dh | ||
| 89 | 	je 1f		/* Is +-Inf, jump. */ | ||
| 90 | 	cmpb $0x01, %dh | ||
| 91 | 	je 1f		/* Is Nan, jump. */ | ||
| 92 | |||
| 93 | 	fxtract | ||
| 94 | 	pushl	%eax | ||
| 95 | 	fstp	%st | ||
| 96 | |||
| 97 | 	fistpl	(%esp) | ||
| 98 | 	fwait | ||
| 99 | 	popl	%eax | ||
| 100 | |||
| 101 | 	ret | ||
| 102 | |||
| 103 | 1:	fstp	%st | ||
| 104 | 	movl	$0x7fffffff, %eax | ||
| 105 | 	ret | ||
| 106 | #endif | ||
lib/libc/mingw/math/x86/log1p.S deleted-85| ... | @@ -1,85 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"log1p.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | 	/* The fyl2xp1 can only be used for values in | ||
| 16 | 	 -1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2 | ||
| 17 | 	 0.29 is a safe value. | ||
| 18 | 	 */ | ||
| 19 | limit:	.double 0.29 | ||
| 20 | one:	.double 1.0 | ||
| 21 | /* | ||
| 22 | * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29, | ||
| 23 | * otherwise fyl2x with the needed extra computation. | ||
| 24 | */ | ||
| 25 | .globl __MINGW_USYMBOL(log1p) | ||
| 26 | 	.def	__MINGW_USYMBOL(log1p);	.scl	2;	.type	32;	.endef | ||
| 27 | __MINGW_USYMBOL(log1p): | ||
| 28 | #ifdef __x86_64__ | ||
| 29 | 	movsd	%xmm0,-16(%rsp) | ||
| 30 | 	fldln2 | ||
| 31 | 	fldl	-16(%rsp) | ||
| 32 | 	fxam | ||
| 33 | 	fnstsw | ||
| 34 | 	fld	%st | ||
| 35 | 	sahf | ||
| 36 | 	jc	3f	// in case x is NaN or �Inf | ||
| 37 | |||
| 38 | 4:	fabs | ||
| 39 | 	fcompl	limit(%rip) | ||
| 40 | 	fnstsw | ||
| 41 | 	sahf | ||
| 42 | 	jc	2f | ||
| 43 | 	faddl	one(%rip) | ||
| 44 | 	fyl2x | ||
| 45 | 	fstpl	-16(%rsp) | ||
| 46 | 	movsd	-16(%rsp),%xmm0 | ||
| 47 | 	ret | ||
| 48 | |||
| 49 | 2:	fyl2xp1 | ||
| 50 | 	fstpl	-16(%rsp) | ||
| 51 | 	movsd	-16(%rsp),%xmm0 | ||
| 52 | 	ret | ||
| 53 | |||
| 54 | 3:	jp	4b	// in case x is �Inf | ||
| 55 | 	fstp	%st(1) | ||
| 56 | 	fstp	%st(1) | ||
| 57 | 	fstpl	-16(%rsp) | ||
| 58 | 	movsd	-16(%rsp),%xmm0 | ||
| 59 | 	ret | ||
| 60 | #else | ||
| 61 | 	fldln2 | ||
| 62 | 	fldl	4(%esp) | ||
| 63 | 	fxam | ||
| 64 | 	fnstsw | ||
| 65 | 	fld	%st | ||
| 66 | 	sahf | ||
| 67 | 	jc	3f	// in case x is NaN or �Inf | ||
| 68 | |||
| 69 | 4:	fabs | ||
| 70 | 	fcompl	limit | ||
| 71 | 	fnstsw | ||
| 72 | 	sahf | ||
| 73 | 	jc	2f | ||
| 74 | 	faddl	one | ||
| 75 | 	fyl2x | ||
| 76 | 	ret | ||
| 77 | |||
| 78 | 2:	fyl2xp1 | ||
| 79 | 	ret | ||
| 80 | |||
| 81 | 3:	jp	4b	// in case x is �Inf | ||
| 82 | 	fstp	%st(1) | ||
| 83 | 	fstp	%st(1) | ||
| 84 | 	ret | ||
| 85 | #endif | ||
lib/libc/mingw/math/x86/log1pf.S deleted-85| ... | @@ -1,85 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"log1pf.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | 	/* The fyl2xp1 can only be used for values in | ||
| 16 | 	 -1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2 | ||
| 17 | 	 0.29 is a safe value. | ||
| 18 | 	 */ | ||
| 19 | limit:	.float 0.29 | ||
| 20 | one:	.float 1.0 | ||
| 21 | /* | ||
| 22 | * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29, | ||
| 23 | * otherwise fyl2x with the needed extra computation. | ||
| 24 | */ | ||
| 25 | .globl __MINGW_USYMBOL(log1pf) | ||
| 26 | 	.def	__MINGW_USYMBOL(log1pf);	.scl	2;	.type	32;	.endef | ||
| 27 | __MINGW_USYMBOL(log1pf): | ||
| 28 | #ifdef __x86_64__ | ||
| 29 | 	movss	%xmm0,-12(%rsp) | ||
| 30 | 	fldln2 | ||
| 31 | 	flds	-12(%rsp) | ||
| 32 | 	fxam | ||
| 33 | 	fnstsw | ||
| 34 | 	fld	%st | ||
| 35 | 	sahf | ||
| 36 | 	jc	3f		// in case x is NaN or �Inf | ||
| 37 | |||
| 38 | 4:	fabs | ||
| 39 | 	fcomps	limit(%rip) | ||
| 40 | 	fnstsw | ||
| 41 | 	sahf | ||
| 42 | 	jc	2f | ||
| 43 | 	fadds	one(%rip) | ||
| 44 | 	fyl2x | ||
| 45 | 	fstps	-12(%rsp) | ||
| 46 | 	movss	-12(%rsp),%xmm0 | ||
| 47 | 	ret | ||
| 48 | |||
| 49 | 2:	fyl2xp1 | ||
| 50 | 	fstps	-12(%rsp) | ||
| 51 | 	movss	-12(%rsp),%xmm0 | ||
| 52 | 	ret | ||
| 53 | |||
| 54 | 3:	jp	4b		// in case x is �Inf | ||
| 55 | 	fstp	%st(1) | ||
| 56 | 	fstp	%st(1) | ||
| 57 | 	fstps	-12(%rsp) | ||
| 58 | 	movss	-12(%rsp),%xmm0 | ||
| 59 | 	ret | ||
| 60 | #else | ||
| 61 | 	fldln2 | ||
| 62 | 	flds	4(%esp) | ||
| 63 | 	fxam | ||
| 64 | 	fnstsw | ||
| 65 | 	fld	%st | ||
| 66 | 	sahf | ||
| 67 | 	jc	3f		// in case x is NaN or �Inf | ||
| 68 | |||
| 69 | 4:	fabs | ||
| 70 | 	fcomps	limit | ||
| 71 | 	fnstsw | ||
| 72 | 	sahf | ||
| 73 | 	jc	2f | ||
| 74 | 	fadds	one | ||
| 75 | 	fyl2x | ||
| 76 | 	ret | ||
| 77 | |||
| 78 | 2:	fyl2xp1 | ||
| 79 | 	ret | ||
| 80 | |||
| 81 | 3:	jp	4b		// in case x is �Inf | ||
| 82 | 	fstp	%st(1) | ||
| 83 | 	fstp	%st(1) | ||
| 84 | 	ret | ||
| 85 | #endif | ||
lib/libc/mingw/math/x86/log2.S deleted-85| ... | @@ -1,85 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"log2.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | one:	.double 1.0 | ||
| 16 | 	/* It is not important that this constant is precise. It is only | ||
| 17 | 	 a value which is known to be on the safe side for using the | ||
| 18 | 	 fyl2xp1 instruction. */ | ||
| 19 | limit:	.double 0.29 | ||
| 20 | |||
| 21 | .globl __MINGW_USYMBOL(log2) | ||
| 22 | 	.def	__MINGW_USYMBOL(log2);	.scl	2;	.type	32;	.endef | ||
| 23 | __MINGW_USYMBOL(log2): | ||
| 24 | #ifdef __x86_64__ | ||
| 25 | 	movsd	%xmm0,-16(%rsp) | ||
| 26 | 	fldl	one(%rip) | ||
| 27 | 	fldl	-16(%rsp)		// x : 1 | ||
| 28 | 	fxam | ||
| 29 | 	fnstsw | ||
| 30 | 	fld	%st		// x : x : 1 | ||
| 31 | 	sahf | ||
| 32 | 	jc	3f		// in case x is NaN or �Inf | ||
| 33 | 4:	fsub	%st(2), %st	// x-1 : x : 1 | ||
| 34 | 	fld	%st		// x-1 : x-1 : x : 1 | ||
| 35 | 	fabs			// |x-1| : x-1 : x : 1 | ||
| 36 | 	fcompl	limit(%rip)	// x-1 : x : 1 | ||
| 37 | 	fnstsw			// x-1 : x : 1 | ||
| 38 | 	andb	$0x45, %ah | ||
| 39 | 	jz	2f | ||
| 40 | 	fstp	%st(1)		// x-1 : 1 | ||
| 41 | 	fyl2xp1			// log(x) | ||
| 42 | 	fstpl	-16(%rsp) | ||
| 43 | 	movsd	-16(%rsp),%xmm0 | ||
| 44 | 	ret | ||
| 45 | |||
| 46 | 2:	fstp	%st(0)		// x : 1 | ||
| 47 | 	fyl2x			// log(x) | ||
| 48 | 	fstpl	-16(%rsp) | ||
| 49 | 	movsd	-16(%rsp),%xmm0 | ||
| 50 | 	ret | ||
| 51 | |||
| 52 | 3:	jp	4b		// in case x is �Inf | ||
| 53 | 	fstp	%st(1) | ||
| 54 | 	fstp	%st(1) | ||
| 55 | 	fstpl	-16(%rsp) | ||
| 56 | 	movsd	-16(%rsp),%xmm0 | ||
| 57 | 	ret | ||
| 58 | #else | ||
| 59 | 	fldl	one | ||
| 60 | 	fldl	4(%esp)		// x : 1 | ||
| 61 | 	fxam | ||
| 62 | 	fnstsw | ||
| 63 | 	fld	%st		// x : x : 1 | ||
| 64 | 	sahf | ||
| 65 | 	jc	3f		// in case x is NaN or �Inf | ||
| 66 | 4:	fsub	%st(2), %st	// x-1 : x : 1 | ||
| 67 | 	fld	%st		// x-1 : x-1 : x : 1 | ||
| 68 | 	fabs			// |x-1| : x-1 : x : 1 | ||
| 69 | 	fcompl	limit		// x-1 : x : 1 | ||
| 70 | 	fnstsw			// x-1 : x : 1 | ||
| 71 | 	andb	$0x45, %ah | ||
| 72 | 	jz	2f | ||
| 73 | 	fstp	%st(1)		// x-1 : 1 | ||
| 74 | 	fyl2xp1			// log(x) | ||
| 75 | 	ret | ||
| 76 | |||
| 77 | 2:	fstp	%st(0)		// x : 1 | ||
| 78 | 	fyl2x			// log(x) | ||
| 79 | 	ret | ||
| 80 | |||
| 81 | 3:	jp	4b		// in case x is �Inf | ||
| 82 | 	fstp	%st(1) | ||
| 83 | 	fstp	%st(1) | ||
| 84 | 	ret | ||
| 85 | #endif | ||
lib/libc/mingw/math/x86/logb.c deleted-40| ... | @@ -1,40 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | /* | ||
| 7 | * Written by J.T. Conklin <jtc@netbsd.org>. | ||
| 8 | * Changes for long double by Ulrich Drepper <drepper@cygnus.com> | ||
| 9 | * Public domain. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <math.h> | ||
| 13 | |||
| 14 | double | ||
| 15 | logb (double x) | ||
| 16 | { | ||
| 17 | #ifdef __x86_64__ | ||
| 18 | __mingw_dbl_type_t hlp; | ||
| 19 | int lx, hx; | ||
| 20 | |||
| 21 | hlp.x = x; | ||
| 22 | lx = hlp.lh.low; | ||
| 23 | hx = hlp.lh.high & 0x7fffffff; /* high |x| */ | ||
| 24 | if ((hx | lx) == 0) | ||
| 25 | return -1.0 / fabs (x); | ||
| 26 | if (hx >= 0x7ff00000) | ||
| 27 | return x * x; | ||
| 28 | if ((hx >>= 20) == 0) { | ||
| 29 | unsigned long long mantissa = hlp.val & 0xfffffffffffffULL; | ||
| 30 | return -1023.0 - (__builtin_clzll(mantissa) - 12); | ||
| 31 | } | ||
| 32 | return (double) (hx - 1023); | ||
| 33 | #else | ||
| 34 | double res = 0.0; | ||
| 35 | asm volatile ( | ||
| 36 | "fxtract\n\t" | ||
| 37 | "fstp	%%st" : "=t" (res) : "0" (x)); | ||
| 38 | return res; | ||
| 39 | #endif | ||
| 40 | } | ||
lib/libc/mingw/math/x86/logbf.c deleted-37| ... | @@ -1,37 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | /* | ||
| 7 | * Written by J.T. Conklin <jtc@netbsd.org>. | ||
| 8 | * Changes for long double by Ulrich Drepper <drepper@cygnus.com> | ||
| 9 | * Public domain. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <math.h> | ||
| 13 | |||
| 14 | float | ||
| 15 | logbf (float x) | ||
| 16 | { | ||
| 17 | #ifdef __x86_64__ | ||
| 18 | int v; | ||
| 19 | __mingw_flt_type_t hlp; | ||
| 20 | |||
| 21 | hlp.x = x; | ||
| 22 | v = hlp.val & 0x7fffffff; /* high |x| */ | ||
| 23 | if (!v) | ||
| 24 | return (float)-1.0 / fabsf (x); | ||
| 25 | if (v >= 0x7f800000) | ||
| 26 | return x * x; | ||
| 27 | if ((v >>= 23) == 0) | ||
| 28 | return -127.0 - (__builtin_clzl(hlp.val & 0x7fffff) - 9); | ||
| 29 | return (float) (v - 127); | ||
| 30 | #else | ||
| 31 | float res = 0.0F; | ||
| 32 | asm volatile ( | ||
| 33 | "fxtract\n\t" | ||
| 34 | "fstp	%%st" : "=t" (res) : "0" (x)); | ||
| 35 | return res; | ||
| 36 | #endif | ||
| 37 | } | ||
lib/libc/mingw/math/x86/nearbyint.S deleted-51| ... | @@ -1,51 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"nearbyint.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | 	.globl __MINGW_USYMBOL(nearbyint) | ||
| 16 | 	.def	__MINGW_USYMBOL(nearbyint);	.scl	2;	.type	32;	.endef | ||
| 17 | __MINGW_USYMBOL(nearbyint): | ||
| 18 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 19 | 	movsd	%xmm0,-16(%rsp) | ||
| 20 | 	fldl	-16(%rsp) | ||
| 21 | 	pushq	%rax | ||
| 22 | 	pushq	%rcx | ||
| 23 | 	fnstcw	(%rsp) | ||
| 24 | 	movq	(%rsp), %rax | ||
| 25 | 	orq	$0x20, %rax | ||
| 26 | 	movq	%rax, 8(%rsp) | ||
| 27 | 	fldcw	8(%rsp) | ||
| 28 | 	frndint | ||
| 29 | 	fclex | ||
| 30 | 	fldcw	(%rsp) | ||
| 31 | 	popq	%rcx | ||
| 32 | 	popq	%rax | ||
| 33 | 	fstpl	-16(%rsp) | ||
| 34 | 	movsd	-16(%rsp),%xmm0 | ||
| 35 | 	ret | ||
| 36 | #elif defined(_X86_) || defined(__i386__) | ||
| 37 | 	fldl	4(%esp) | ||
| 38 | 	pushl	%eax | ||
| 39 | 	pushl	%ecx | ||
| 40 | 	fnstcw	(%esp) | ||
| 41 | 	movl	(%esp), %eax | ||
| 42 | 	orl	$0x20, %eax | ||
| 43 | 	movl	%eax, 4(%esp) | ||
| 44 | 	fldcw	4(%esp) | ||
| 45 | 	frndint | ||
| 46 | 	fclex | ||
| 47 | 	fldcw	(%esp) | ||
| 48 | 	popl	%ecx | ||
| 49 | 	popl	%eax | ||
| 50 | 	ret | ||
| 51 | #endif | ||
lib/libc/mingw/math/x86/nearbyintf.S deleted-51| ... | @@ -1,51 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"nearbyintf.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | 	.globl __MINGW_USYMBOL(nearbyintf) | ||
| 16 | 	.def	__MINGW_USYMBOL(nearbyintf);	.scl	2;	.type	32;	.endef | ||
| 17 | __MINGW_USYMBOL(nearbyintf): | ||
| 18 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 19 | 	movss	%xmm0,-12(%rsp) | ||
| 20 | 	flds	-12(%rsp) | ||
| 21 | 	pushq	%rax | ||
| 22 | 	pushq	%rcx | ||
| 23 | 	fnstcw	(%rsp) | ||
| 24 | 	movq	(%rsp), %rax | ||
| 25 | 	orq	$0x20, %rax | ||
| 26 | 	movq	%rax, 8(%rsp) | ||
| 27 | 	fldcw	8(%rsp) | ||
| 28 | 	frndint | ||
| 29 | 	fclex | ||
| 30 | 	fldcw	(%rsp) | ||
| 31 | 	popq	%rcx | ||
| 32 | 	popq	%rax | ||
| 33 | 	fstps	-12(%rsp) | ||
| 34 | 	movss	-12(%rsp),%xmm0 | ||
| 35 | 	ret | ||
| 36 | #elif defined(_X86_) || defined(__i386__) | ||
| 37 | 	flds	4(%esp) | ||
| 38 | 	pushl	%eax | ||
| 39 | 	pushl	%ecx | ||
| 40 | 	fnstcw	(%esp) | ||
| 41 | 	movl	(%esp), %eax | ||
| 42 | 	orl	$0x20, %eax | ||
| 43 | 	movl	%eax, 4(%esp) | ||
| 44 | 	fldcw	4(%esp) | ||
| 45 | 	frndint | ||
| 46 | 	fclex | ||
| 47 | 	fldcw	(%esp) | ||
| 48 | 	popl	%ecx | ||
| 49 | 	popl	%eax | ||
| 50 | 	ret | ||
| 51 | #endif | ||
lib/libc/mingw/math/x86/pow.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | /* | ||
| 2 | This Software is provided under the Zope Public License (ZPL) Version 2.1. | ||
| 3 | |||
| 4 | Copyright (c) 2009, 2010 by the mingw-w64 project | ||
| 5 | |||
| 6 | See the AUTHORS file for the list of contributors to the mingw-w64 project. | ||
| 7 | |||
| 8 | This license has been certified as open source. It has also been designated | ||
| 9 | as GPL compatible by the Free Software Foundation (FSF). | ||
| 10 | |||
| 11 | Redistribution and use in source and binary forms, with or without | ||
| 12 | modification, are permitted provided that the following conditions are met: | ||
| 13 | |||
| 14 | 1. Redistributions in source code must retain the accompanying copyright | ||
| 15 | notice, this list of conditions, and the following disclaimer. | ||
| 16 | 2. Redistributions in binary form must reproduce the accompanying | ||
| 17 | copyright notice, this list of conditions, and the following disclaimer | ||
| 18 | in the documentation and/or other materials provided with the | ||
| 19 | distribution. | ||
| 20 | 3. Names of the copyright holders must not be used to endorse or promote | ||
| 21 | products derived from this software without prior written permission | ||
| 22 | from the copyright holders. | ||
| 23 | 4. The right to distribute this software or to use it for any purpose does | ||
| 24 | not give you the right to use Servicemarks (sm) or Trademarks (tm) of | ||
| 25 | the copyright holders. Use of them is covered by separate agreement | ||
| 26 | with the copyright holders. | ||
| 27 | 5. If any files are modified, you must cause the modified files to carry | ||
| 28 | prominent notices stating that you changed the files and the date of | ||
| 29 | any change. | ||
| 30 | |||
| 31 | Disclaimer | ||
| 32 | |||
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED | ||
| 34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 35 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
| 36 | EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 37 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| 39 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define _NEW_COMPLEX_DOUBLE 1 | ||
| 46 | #include "pow.def.h" | ||
lib/libc/mingw/math/x86/remainder.S deleted-40| ... | @@ -1,40 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"remainder.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | .globl __MINGW_USYMBOL(remainder) | ||
| 16 | 	.def	__MINGW_USYMBOL(remainder);	.scl	2;	.type	32;	.endef | ||
| 17 | __MINGW_USYMBOL(remainder): | ||
| 18 | #ifdef __x86_64__ | ||
| 19 | 	movsd	%xmm0,-16(%rsp) | ||
| 20 | 	movsd	%xmm1,-32(%rsp) | ||
| 21 | 	fldl	-32(%rsp) | ||
| 22 | 	fldl	-16(%rsp) | ||
| 23 | 1:	fprem1 | ||
| 24 | 	fstsw	%ax | ||
| 25 | 	sahf | ||
| 26 | 	jp	1b | ||
| 27 | 	fstp	%st(1) | ||
| 28 | 	fstpl	-16(%rsp) | ||
| 29 | 	movsd	-16(%rsp),%xmm0 | ||
| 30 | 	ret | ||
| 31 | #else | ||
| 32 | 	fldl	12(%esp) | ||
| 33 | 	fldl	4(%esp) | ||
| 34 | 1:	fprem1 | ||
| 35 | 	fstsw	%ax | ||
| 36 | 	sahf | ||
| 37 | 	jp	1b | ||
| 38 | 	fstp	%st(1) | ||
| 39 | 	ret | ||
| 40 | #endif | ||
lib/libc/mingw/math/x86/remainderf.S deleted-40| ... | @@ -1,40 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"remainderf.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | .globl __MINGW_USYMBOL(remainder) | ||
| 16 | 	.def	__MINGW_USYMBOL(remainderf);	.scl	2;	.type	32;	.endef | ||
| 17 | __MINGW_USYMBOL(remainderf): | ||
| 18 | #ifdef __x86_64__ | ||
| 19 | 	movss	%xmm1,-12(%rsp) | ||
| 20 | 	flds	-12(%rsp) | ||
| 21 | 	movss	%xmm0,-12(%rsp) | ||
| 22 | 	flds	-12(%rsp) | ||
| 23 | 1:	fprem1 | ||
| 24 | 	fstsw	%ax | ||
| 25 | 	sahf | ||
| 26 | 	jp	1b | ||
| 27 | 	fstp	%st(1) | ||
| 28 | 	fstps	-12(%rsp) | ||
| 29 | 	movss	-12(%rsp),%xmm0 | ||
| 30 | 	ret | ||
| 31 | #else | ||
| 32 | 	flds	8(%esp) | ||
| 33 | 	flds	4(%esp) | ||
| 34 | 1:	fprem1 | ||
| 35 | 	fstsw	%ax | ||
| 36 | 	sahf | ||
| 37 | 	jp	1b | ||
| 38 | 	fstp	%st(1) | ||
| 39 | 	ret | ||
| 40 | #endif | ||
lib/libc/mingw/math/x86/remquo.S deleted-75| ... | @@ -1,75 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"remquo.S" | ||
| 9 | .text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | .globl __MINGW_USYMBOL(remquo) | ||
| 16 | __MINGW_USYMBOL(remquo): | ||
| 17 | #ifdef __x86_64__ | ||
| 18 | 	movsd	%xmm1,-16(%rsp) | ||
| 19 | 	fldl	-16(%rsp) | ||
| 20 | 	movsd	%xmm0,-16(%rsp) | ||
| 21 | 	fldl	-16(%rsp) | ||
| 22 | 1:	fprem1 | ||
| 23 | 	fstsw %ax | ||
| 24 | 	sahf | ||
| 25 | 	jp 1b | ||
| 26 | 	fstp %st(1) | ||
| 27 | 	movl %eax, %ecx | ||
| 28 | 	shrl $8, %eax | ||
| 29 | 	shrl $12, %ecx | ||
| 30 | 	andl $4, %ecx | ||
| 31 | 	andl $3, %eax | ||
| 32 | 	orl %eax, %ecx | ||
| 33 | 	leal (%ecx,%ecx,2),%ecx | ||
| 34 | 	movl $0xef2a60, %eax | ||
| 35 | 	shrl %cl, %eax | ||
| 36 | 	andl $7, %eax | ||
| 37 | 	movl -12(%rsp), %edx | ||
| 38 | 	movsd %xmm1,-16(%rsp) | ||
| 39 | 	xorl -12(%rsp), %edx | ||
| 40 | 	testl $0x80000000, %edx | ||
| 41 | 	jz 1f | ||
| 42 | 	negl %eax | ||
| 43 | 1:	movl %eax, (%r8) | ||
| 44 | |||
| 45 | 	fstpl	-16(%rsp) | ||
| 46 | 	movsd	-16(%rsp),%xmm0 | ||
| 47 | 	ret | ||
| 48 | #else | ||
| 49 | 	fldl 4 +8(%esp) | ||
| 50 | 	fldl 4(%esp) | ||
| 51 | 1:	fprem1 | ||
| 52 | 	fstsw %ax | ||
| 53 | 	sahf | ||
| 54 | 	jp 1b | ||
| 55 | 	fstp %st(1) | ||
| 56 | 	movl %eax, %ecx | ||
| 57 | 	shrl $8, %eax | ||
| 58 | 	shrl $12, %ecx | ||
| 59 | 	andl $4, %ecx | ||
| 60 | 	andl $3, %eax | ||
| 61 | 	orl %eax, %ecx | ||
| 62 | 	leal (%ecx,%ecx,2),%ecx | ||
| 63 | 	movl $0xef2a60, %eax | ||
| 64 | 	shrl %cl, %eax | ||
| 65 | 	andl $7, %eax | ||
| 66 | 	movl 4 +8 +8(%esp), %ecx | ||
| 67 | 	movl 4 +4(%esp), %edx | ||
| 68 | 	xorl 4 +8 +4(%esp), %edx | ||
| 69 | 	testl $0x80000000, %edx | ||
| 70 | 	jz 1f | ||
| 71 | 	negl %eax | ||
| 72 | 1:	movl %eax, (%ecx) | ||
| 73 | |||
| 74 | 	ret | ||
| 75 | #endif | ||
lib/libc/mingw/math/x86/remquof.S deleted-76| ... | @@ -1,76 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file	"remquof.S" | ||
| 9 | 	.text | ||
| 10 | #ifdef __x86_64__ | ||
| 11 | 	.align 8 | ||
| 12 | #else | ||
| 13 | 	.align 4 | ||
| 14 | #endif | ||
| 15 | .globl __MINGW_USYMBOL(remquof) | ||
| 16 | __MINGW_USYMBOL(remquof): | ||
| 17 | #ifdef __x86_64__ | ||
| 18 | 	movss	%xmm1,-12(%rsp) | ||
| 19 | 	flds -12(%rsp) | ||
| 20 | 	movss	%xmm0,-12(%rsp) | ||
| 21 | 	flds -12(%rsp) | ||
| 22 | 1:	fprem1 | ||
| 23 | 	fstsw %ax | ||
| 24 | 	sahf | ||
| 25 | 	jp 1b | ||
| 26 | 	fstp %st(1) | ||
| 27 | 	movl %eax, %ecx | ||
| 28 | 	shrl $8, %eax | ||
| 29 | 	shrl $12, %ecx | ||
| 30 | 	andl $4, %ecx | ||
| 31 | 	andl $3, %eax | ||
| 32 | 	orl %eax, %ecx | ||
| 33 | 	movl $0xef2a60, %eax | ||
| 34 | 	leal (%ecx,%ecx,2),%ecx | ||
| 35 | 	shrl %cl, %eax | ||
| 36 | 	andl $7, %eax | ||
| 37 | 	movss %xmm0,-12(%rsp) | ||
| 38 | 	movl -12(%rsp), %edx | ||
| 39 | 	movss %xmm1,-12(%rsp) | ||
| 40 | 	xorl -12(%rsp), %edx | ||
| 41 | 	testl $0x80000000, %edx | ||
| 42 | 	jz 1f | ||
| 43 | 	negl %eax | ||
| 44 | 1:	movl %eax, (%r8) | ||
| 45 | |||
| 46 | 	fstps	-12(%rsp) | ||
| 47 | 	movss	-12(%rsp),%xmm0 | ||
| 48 | 	ret | ||
| 49 | #else | ||
| 50 | 	flds 4 +4(%esp) | ||
| 51 | 	flds 4(%esp) | ||
| 52 | 1:	fprem1 | ||
| 53 | 	fstsw %ax | ||
| 54 | 	sahf | ||
| 55 | 	jp 1b | ||
| 56 | 	fstp %st(1) | ||
| 57 | 	movl %eax, %ecx | ||
| 58 | 	shrl $8, %eax | ||
| 59 | 	shrl $12, %ecx | ||
| 60 | 	andl $4, %ecx | ||
| 61 | 	andl $3, %eax | ||
| 62 | 	orl %eax, %ecx | ||
| 63 | 	movl $0xef2a60, %eax | ||
| 64 | 	leal (%ecx,%ecx,2),%ecx | ||
| 65 | 	shrl %cl, %eax | ||
| 66 | 	andl $7, %eax | ||
| 67 | 	movl 4 +4 +4(%esp), %ecx | ||
| 68 | 	movl 4(%esp), %edx | ||
| 69 | 	xorl 4 +4(%esp), %edx | ||
| 70 | 	testl $0x80000000, %edx | ||
| 71 | 	jz 1f | ||
| 72 | 	negl %eax | ||
| 73 | 1:	movl %eax, (%ecx) | ||
| 74 | |||
| 75 | 	ret | ||
| 76 | #endif | ||
lib/libc/mingw/math/x86/rint.c deleted-12| ... | @@ -1,12 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | double rint (double x) { | ||
| 9 | double retval = 0.0; | ||
| 10 | __asm__ __volatile__ ("frndint;" : "=t" (retval) : "0" (x)); | ||
| 11 | return retval; | ||
| 12 | } | ||
lib/libc/mingw/math/x86/rintf.c deleted-12| ... | @@ -1,12 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <math.h> | ||
| 7 | |||
| 8 | float rintf (float x) { | ||
| 9 | float retval = 0.0F; | ||
| 10 | __asm__ __volatile__ ("frndint;": "=t" (retval) : "0" (x)); | ||
| 11 | return retval; | ||
| 12 | } | ||
lib/libc/mingw/math/x86/sin.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | /* | ||
| 2 | This Software is provided under the Zope Public License (ZPL) Version 2.1. | ||
| 3 | |||
| 4 | Copyright (c) 2009, 2010 by the mingw-w64 project | ||
| 5 | |||
| 6 | See the AUTHORS file for the list of contributors to the mingw-w64 project. | ||
| 7 | |||
| 8 | This license has been certified as open source. It has also been designated | ||
| 9 | as GPL compatible by the Free Software Foundation (FSF). | ||
| 10 | |||
| 11 | Redistribution and use in source and binary forms, with or without | ||
| 12 | modification, are permitted provided that the following conditions are met: | ||
| 13 | |||
| 14 | 1. Redistributions in source code must retain the accompanying copyright | ||
| 15 | notice, this list of conditions, and the following disclaimer. | ||
| 16 | 2. Redistributions in binary form must reproduce the accompanying | ||
| 17 | copyright notice, this list of conditions, and the following disclaimer | ||
| 18 | in the documentation and/or other materials provided with the | ||
| 19 | distribution. | ||
| 20 | 3. Names of the copyright holders must not be used to endorse or promote | ||
| 21 | products derived from this software without prior written permission | ||
| 22 | from the copyright holders. | ||
| 23 | 4. The right to distribute this software or to use it for any purpose does | ||
| 24 | not give you the right to use Servicemarks (sm) or Trademarks (tm) of | ||
| 25 | the copyright holders. Use of them is covered by separate agreement | ||
| 26 | with the copyright holders. | ||
| 27 | 5. If any files are modified, you must cause the modified files to carry | ||
| 28 | prominent notices stating that you changed the files and the date of | ||
| 29 | any change. | ||
| 30 | |||
| 31 | Disclaimer | ||
| 32 | |||
| 33 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED | ||
| 34 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 35 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | ||
| 36 | EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 37 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, | ||
| 39 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 40 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 41 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
| 42 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 43 | */ | ||
| 44 | |||
| 45 | #define _NEW_COMPLEX_DOUBLE 1 | ||
| 46 | #include "sin.def.h" | ||
lib/libc/mingw/math/x86/trunc.S deleted-91| ... | @@ -1,91 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | 	.file "trunc.S" | ||
| 9 | 	.text | ||
| 10 | 	.p2align 4,,15 | ||
| 11 | 	.globl __MINGW_USYMBOL(trunc) | ||
| 12 | .def __MINGW_USYMBOL(trunc); .scl 2; .type 32; .endef | ||
| 13 | |||
| 14 | #ifdef __x86_64__ | ||
| 15 | 	.seh_proc __MINGW_USYMBOL(trunc) | ||
| 16 | #endif | ||
| 17 | __MINGW_USYMBOL(trunc): | ||
| 18 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 19 | 	subq	$24, %rsp | ||
| 20 | 	.seh_stackalloc	24 | ||
| 21 | 	.seh_endprologue | ||
| 22 | 	movsd	%xmm0, 8(%rsp) | ||
| 23 | 	movq	8(%rsp), %r8 | ||
| 24 | 	movq	%r8, %rdx | ||
| 25 | 	shrq	$32, %rdx | ||
| 26 | 	movl	%edx, %eax | ||
| 27 | 	sarl	$20, %eax | ||
| 28 | 	andl	$2047, %eax | ||
| 29 | 	leal	-1023(%rax), %ecx | ||
| 30 | 	cmpl	$19, %ecx | ||
| 31 | 	jg	.l1 | ||
| 32 | 	movl	%edx, %r8d | ||
| 33 | 	andl	$-2147483648, %r8d | ||
| 34 | 	testl	%ecx, %ecx | ||
| 35 | 	js	.l3 | ||
| 36 | 	movl	$1048575, %eax | ||
| 37 | 	sarl	%cl, %eax | ||
| 38 | 	notl	%eax | ||
| 39 | 	andl	%edx, %eax | ||
| 40 | 	orl	%r8d, %eax | ||
| 41 | 	salq	$32, %rax | ||
| 42 | 	movq	%rax, 8(%rsp) | ||
| 43 | 	movsd	8(%rsp), %xmm0 | ||
| 44 | 	addq	$24, %rsp | ||
| 45 | 	ret | ||
| 46 | 	.p2align 4,,10 | ||
| 47 | .l1: | ||
| 48 | 	cmpl	$51, %ecx | ||
| 49 | 	jle	.l2 | ||
| 50 | 	/* Is x inf/nan? */ | ||
| 51 | 	cmpl	$1024, %ecx | ||
| 52 | 	jne	.noinfnan | ||
| 53 | 	addsd	%xmm0, %xmm0 | ||
| 54 | .noinfnan: | ||
| 55 | 	addq	$24, %rsp | ||
| 56 | 	ret | ||
| 57 | 	.p2align 4,,10 | ||
| 58 | .l2: | ||
| 59 | 	leal	-1043(%rax), %ecx | ||
| 60 | 	movl	$-1, %r9d | ||
| 61 | 	salq	$32, %rdx | ||
| 62 | 	shrl	%cl, %r9d | ||
| 63 | 	notl	%r9d | ||
| 64 | 	andl	%r9d, %r8d | ||
| 65 | 	orq	%r8, %rdx | ||
| 66 | 	movq	%rdx, 8(%rsp) | ||
| 67 | 	movsd	8(%rsp), %xmm0 | ||
| 68 | 	addq	$24, %rsp | ||
| 69 | 	ret | ||
| 70 | 	.p2align 4,,10 | ||
| 71 | .l3: | ||
| 72 | 	salq	$32, %r8 | ||
| 73 | 	movq	%r8, 8(%rsp) | ||
| 74 | 	movsd	8(%rsp), %xmm0 | ||
| 75 | 	addq	$24, %rsp | ||
| 76 | 	ret | ||
| 77 | 	.seh_endproc | ||
| 78 | #elif defined(_X86_) || defined(__i386__) | ||
| 79 | 	fldl 4(%esp) | ||
| 80 | 	subl	$8, %esp | ||
| 81 | 	fstcw	(%esp) | ||
| 82 | 	/* FE_TOWARDZERO */ | ||
| 83 | 	movzwl (%esp), %eax | ||
| 84 | 	orb $0xc, %ah | ||
| 85 | 	movw	%ax, 4(%esp) | ||
| 86 | 	fldcw	4(%esp) | ||
| 87 | 	frndint | ||
| 88 | 	fldcw	(%esp) | ||
| 89 | 	addl	$8, %esp | ||
| 90 | 	ret | ||
| 91 | #endif | ||
lib/libc/mingw/math/x86/truncf.S deleted-71| ... | @@ -1,71 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <_mingw_mac.h> | ||
| 7 | |||
| 8 | .file "truncf.S" | ||
| 9 | .text | ||
| 10 | .p2align 4,,15 | ||
| 11 | .globl __MINGW_USYMBOL(truncf) | ||
| 12 | .def __MINGW_USYMBOL(truncf); .scl 2; .type 32; .endef | ||
| 13 | |||
| 14 | #ifdef __x86_64__ | ||
| 15 | .seh_proc __MINGW_USYMBOL(truncf) | ||
| 16 | #endif | ||
| 17 | __MINGW_USYMBOL(truncf): | ||
| 18 | #if defined(_AMD64_) || defined(__x86_64__) | ||
| 19 | 	subq	$24, %rsp | ||
| 20 | 	.seh_stackalloc	24 | ||
| 21 | 	.seh_endprologue | ||
| 22 | 	movd	%xmm0, 12(%rsp) | ||
| 23 | 	movl	12(%rsp), %edx | ||
| 24 | 	movl	%edx, %ecx | ||
| 25 | 	sarl	$23, %ecx | ||
| 26 | 	andl	$255, %ecx | ||
| 27 | 	subl	$127, %ecx | ||
| 28 | 	cmpl	$22, %ecx | ||
| 29 | 	jg	.l1 | ||
| 30 | 	movl	%edx, %r8d | ||
| 31 | 	andl	$-2147483648, %r8d | ||
| 32 | 	testl	%ecx, %ecx | ||
| 33 | 	js	.l2 | ||
| 34 | 	movl	$8388607, %eax | ||
| 35 | 	sarl	%cl, %eax | ||
| 36 | 	notl	%eax | ||
| 37 | 	andl	%edx, %eax | ||
| 38 | 	orl	%r8d, %eax | ||
| 39 | 	movl	%eax, 8(%rsp) | ||
| 40 | 	movss	8(%rsp), %xmm0 | ||
| 41 | 	addq	$24, %rsp | ||
| 42 | 	ret | ||
| 43 | 	.p2align 4,,10 | ||
| 44 | .l1: | ||
| 45 | 	addl	$-128, %ecx | ||
| 46 | 	jne	.noinfnan | ||
| 47 | 	addss	%xmm0, %xmm0 | ||
| 48 | .noinfnan: | ||
| 49 | 	addq	$24, %rsp | ||
| 50 | 	ret | ||
| 51 | 	.p2align 4,,10 | ||
| 52 | .l2: | ||
| 53 | 	movl	%r8d, 8(%rsp) | ||
| 54 | 	movss	8(%rsp), %xmm0 | ||
| 55 | 	addq	$24, %rsp | ||
| 56 | 	ret | ||
| 57 | 	.seh_endproc | ||
| 58 | #elif defined(_X86_) || defined(__i386__) | ||
| 59 | flds 4(%esp) | ||
| 60 | subl $8, %esp | ||
| 61 | fstcw (%esp) | ||
| 62 | /* FE_TOWARDZERO */ | ||
| 63 | movzwl (%esp), %eax | ||
| 64 | orb $0xc, %ah | ||
| 65 | movw %ax, 4(%esp) | ||
| 66 | fldcw 4(%esp) | ||
| 67 | frndint | ||
| 68 | fldcw (%esp) | ||
| 69 | addl $8, %esp | ||
| 70 | ret | ||
| 71 | #endif | ||
lib/libc/mingw/misc/___mb_cur_max_func.c deleted-18| ... | @@ -1,18 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <_mingw.h> | ||
| 8 | |||
| 9 | extern int* __MINGW_IMP_SYMBOL(__mb_cur_max); | ||
| 10 | |||
| 11 | int __cdecl ___mb_cur_max_func(void); | ||
| 12 | int __cdecl ___mb_cur_max_func(void) | ||
| 13 | { | ||
| 14 | return *__MINGW_IMP_SYMBOL(__mb_cur_max); | ||
| 15 | } | ||
| 16 | |||
| 17 | typedef int __cdecl (*_f___mb_cur_max_func)(void); | ||
| 18 | _f___mb_cur_max_func __MINGW_IMP_SYMBOL(___mb_cur_max_func) = ___mb_cur_max_func; | ||
lib/libc/mingw/misc/__p___argv.c deleted-15| ... | @@ -1,15 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <stdlib.h> | ||
| 8 | |||
| 9 | char ***__cdecl __p___argv(void) | ||
| 10 | { | ||
| 11 | return __MINGW_IMP_SYMBOL(__argv); | ||
| 12 | } | ||
| 13 | |||
| 14 | typedef char ***__cdecl (*_f__p___argv)(void); | ||
| 15 | _f__p___argv __MINGW_IMP_SYMBOL(__p___argv) = __p___argv; | ||
lib/libc/mingw/misc/__p__acmdln.c deleted-18| ... | @@ -1,18 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <_mingw.h> | ||
| 8 | |||
| 9 | extern char ** __MINGW_IMP_SYMBOL(_acmdln); | ||
| 10 | |||
| 11 | char **__cdecl __p__acmdln(void); | ||
| 12 | char **__cdecl __p__acmdln(void) | ||
| 13 | { | ||
| 14 | return __MINGW_IMP_SYMBOL(_acmdln); | ||
| 15 | } | ||
| 16 | |||
| 17 | typedef char **__cdecl (*_f__p__acmdln)(void); | ||
| 18 | _f__p__acmdln __MINGW_IMP_SYMBOL(__p__acmdln) = __p__acmdln; | ||
lib/libc/mingw/misc/__p__commode.c deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <_mingw.h> | ||
| 8 | |||
| 9 | extern int * __MINGW_IMP_SYMBOL(_commode); | ||
| 10 | |||
| 11 | int *__cdecl __p__commode(void); | ||
| 12 | int *__cdecl __p__commode(void) | ||
| 13 | { | ||
| 14 | return __MINGW_IMP_SYMBOL(_commode); | ||
| 15 | } | ||
| 16 | |||
| 17 | typeof(__p__commode) *__MINGW_IMP_SYMBOL(__p__commode) = __p__commode; | ||
lib/libc/mingw/misc/__p__fmode.c deleted-17| ... | @@ -1,17 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <_mingw.h> | ||
| 8 | |||
| 9 | extern int * __MINGW_IMP_SYMBOL(_fmode); | ||
| 10 | |||
| 11 | int *__cdecl __p__fmode(void); | ||
| 12 | int *__cdecl __p__fmode(void) | ||
| 13 | { | ||
| 14 | return __MINGW_IMP_SYMBOL(_fmode); | ||
| 15 | } | ||
| 16 | |||
| 17 | typeof(__p__fmode) *__MINGW_IMP_SYMBOL(__p__fmode) = __p__fmode; | ||
lib/libc/mingw/misc/__p__wcmdln.c deleted-18| ... | @@ -1,18 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <wchar.h> | ||
| 8 | |||
| 9 | extern wchar_t ** __MINGW_IMP_SYMBOL(_wcmdln); | ||
| 10 | |||
| 11 | wchar_t **__cdecl __p__wcmdln(void); | ||
| 12 | wchar_t **__cdecl __p__wcmdln(void) | ||
| 13 | { | ||
| 14 | return __MINGW_IMP_SYMBOL(_wcmdln); | ||
| 15 | } | ||
| 16 | |||
| 17 | typedef wchar_t **__cdecl (*_f__p__wcmdln)(void); | ||
| 18 | _f__p__wcmdln __MINGW_IMP_SYMBOL(__p__wcmdln) = __p__wcmdln; | ||
lib/libc/mingw/misc/_configthreadlocale.c deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <locale.h> | ||
| 8 | |||
| 9 | int __cdecl _configthreadlocale(int flag) | ||
| 10 | { | ||
| 11 | /* _ENABLE_PER_THREAD_LOCALE can't work on msvcrt.dll. */ | ||
| 12 | return flag == _ENABLE_PER_THREAD_LOCALE ? -1 : _DISABLE_PER_THREAD_LOCALE; | ||
| 13 | } | ||
| 14 | |||
| 15 | void *__MINGW_IMP_SYMBOL(_configthreadlocale) = _configthreadlocale; | ||
| 16 | |||
lib/libc/mingw/misc/_create_locale.c deleted-33| ... | @@ -1,33 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <windows.h> | ||
| 8 | #include <locale.h> | ||
| 9 | #include <msvcrt.h> | ||
| 10 | |||
| 11 | static _locale_t __cdecl init_func(int category, const char *locale); | ||
| 12 | _locale_t (__cdecl *__MINGW_IMP_SYMBOL(_create_locale))(int, const char *) = init_func; | ||
| 13 | |||
| 14 | static _locale_t __cdecl null_func(int category, const char *locale) | ||
| 15 | { | ||
| 16 | (void)category; | ||
| 17 | (void)locale; | ||
| 18 | return NULL; | ||
| 19 | } | ||
| 20 | |||
| 21 | static _locale_t __cdecl init_func(int category, const char *locale) | ||
| 22 | { | ||
| 23 | HMODULE msvcrt = __mingw_get_msvcrt_handle(); | ||
| 24 | _locale_t (__cdecl *func)(int, const char *) = NULL; | ||
| 25 | |||
| 26 | if (msvcrt) | ||
| 27 | func = (void*)GetProcAddress(msvcrt, "_create_locale"); | ||
| 28 | |||
| 29 | if (!func) | ||
| 30 | func = null_func; | ||
| 31 | |||
| 32 | return (__MINGW_IMP_SYMBOL(_create_locale) = func)(category, locale); | ||
| 33 | } | ||
lib/libc/mingw/misc/_free_locale.c deleted-31| ... | @@ -1,31 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <windows.h> | ||
| 8 | #include <locale.h> | ||
| 9 | #include <msvcrt.h> | ||
| 10 | |||
| 11 | static void __cdecl init_func(_locale_t locale); | ||
| 12 | void (__cdecl *__MINGW_IMP_SYMBOL(_free_locale))(_locale_t) = init_func; | ||
| 13 | |||
| 14 | static void __cdecl stub_func(_locale_t locale) | ||
| 15 | { | ||
| 16 | (void)locale; | ||
| 17 | } | ||
| 18 | |||
| 19 | static void __cdecl init_func(_locale_t locale) | ||
| 20 | { | ||
| 21 | HMODULE msvcrt = __mingw_get_msvcrt_handle(); | ||
| 22 | void (__cdecl *func)(_locale_t) = NULL; | ||
| 23 | |||
| 24 | if (msvcrt) | ||
| 25 | func = (void*)GetProcAddress(msvcrt, "_free_locale"); | ||
| 26 | |||
| 27 | if (!func) | ||
| 28 | func = stub_func; | ||
| 29 | |||
| 30 | (__MINGW_IMP_SYMBOL(_free_locale) = func)(locale); | ||
| 31 | } | ||
lib/libc/mingw/misc/_get_current_locale.c deleted-26| ... | @@ -1,26 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <locale.h> | ||
| 3 | #include <msvcrt.h> | ||
| 4 | |||
| 5 | static _locale_t __cdecl init_func(void); | ||
| 6 | _locale_t (__cdecl *__MINGW_IMP_SYMBOL(_get_current_locale))(void) = init_func; | ||
| 7 | |||
| 8 | static _locale_t __cdecl null_func(void) | ||
| 9 | { | ||
| 10 | return NULL; | ||
| 11 | } | ||
| 12 | |||
| 13 | static _locale_t __cdecl init_func(void) | ||
| 14 | { | ||
| 15 | HMODULE msvcrt = __mingw_get_msvcrt_handle(); | ||
| 16 | _locale_t (__cdecl *func)(void) = NULL; | ||
| 17 | |||
| 18 | if (msvcrt) { | ||
| 19 | func = (void*)GetProcAddress(msvcrt, "_get_current_locale"); | ||
| 20 | } | ||
| 21 | |||
| 22 | if (!func) | ||
| 23 | func = null_func; | ||
| 24 | |||
| 25 | return (__MINGW_IMP_SYMBOL(_get_current_locale) = func)(); | ||
| 26 | } | ||
lib/libc/mingw/misc/imaxabs.c deleted-28| ... | @@ -1,28 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | /* | ||
| 7 | This source code was extracted from the Q8 package created and | ||
| 8 | placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil> | ||
| 9 | last edit:	1999/11/05	gwyn@arl.mil | ||
| 10 | |||
| 11 | 	Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E). | ||
| 12 | |||
| 13 | 	This particular implementation requires the matching <inttypes.h>. | ||
| 14 | */ | ||
| 15 | #define __CRT__NO_INLINE | ||
| 16 | #include <inttypes.h> | ||
| 17 | |||
| 18 | intmax_t | ||
| 19 | __cdecl | ||
| 20 | imaxabs (intmax_t _j) | ||
| 21 | { return	_j >= 0 ? _j : -_j; } | ||
| 22 | intmax_t (__cdecl *__MINGW_IMP_SYMBOL(imaxabs))(intmax_t) = imaxabs; | ||
| 23 | |||
| 24 | long long __attribute__ ((alias ("imaxabs"))) __cdecl llabs (long long); | ||
| 25 | long long (__cdecl *__MINGW_IMP_SYMBOL(llabs))(long long) = llabs; | ||
| 26 | |||
| 27 | __int64 __attribute__ ((alias ("imaxabs"))) __cdecl _abs64 (__int64); | ||
| 28 | __int64 (__cdecl *__MINGW_IMP_SYMBOL(_abs64))(__int64) = _abs64; | ||
lib/libc/mingw/misc/imaxdiv.c deleted-35| ... | @@ -1,35 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | /* | ||
| 7 | This source code was extracted from the Q8 package created and | ||
| 8 | placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil> | ||
| 9 | last edit:	1999/11/05	gwyn@arl.mil | ||
| 10 | |||
| 11 | |||
| 12 | 	last edit:	1999/11/05	gwyn@arl.mil | ||
| 13 | |||
| 14 | 	Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E). | ||
| 15 | |||
| 16 | */ | ||
| 17 | |||
| 18 | #include	<inttypes.h> | ||
| 19 | #include	<stdlib.h> | ||
| 20 | |||
| 21 | imaxdiv_t | ||
| 22 | __cdecl | ||
| 23 | imaxdiv(intmax_t numer, intmax_t denom) | ||
| 24 | { | ||
| 25 | imaxdiv_t	result; | ||
| 26 | result.quot = numer / denom; | ||
| 27 | result.rem = numer % denom; | ||
| 28 | return result; | ||
| 29 | } | ||
| 30 | imaxdiv_t (__cdecl *__MINGW_IMP_SYMBOL(imaxdiv))(intmax_t, intmax_t) = imaxdiv; | ||
| 31 | |||
| 32 | lldiv_t __attribute__ ((alias ("imaxdiv"))) | ||
| 33 | __cdecl | ||
| 34 | lldiv (long long, long long); | ||
| 35 | lldiv_t (__cdecl *__MINGW_IMP_SYMBOL(lldiv))(long long, long long) = lldiv; | ||
lib/libc/mingw/misc/invalid_parameter_handler.c deleted-23| ... | @@ -1,23 +0,0 @@ | ||
| 1 | #define _CRTIMP | ||
| 2 | #include <windows.h> | ||
| 3 | |||
| 4 | typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t); | ||
| 5 | static _invalid_parameter_handler handler; | ||
| 6 | |||
| 7 | static _invalid_parameter_handler __cdecl mingw_set_invalid_parameter_handler(_invalid_parameter_handler new_handler) | ||
| 8 | { | ||
| 9 | return InterlockedExchangePointer((void**)&handler, new_handler); | ||
| 10 | } | ||
| 11 | |||
| 12 | _invalid_parameter_handler (__cdecl *__MINGW_IMP_SYMBOL(_set_invalid_parameter_handler))(_invalid_parameter_handler) = | ||
| 13 | mingw_set_invalid_parameter_handler; | ||
| 14 | |||
| 15 | static _invalid_parameter_handler __cdecl mingw_get_invalid_parameter_handler(void) | ||
| 16 | { | ||
| 17 | return handler; | ||
| 18 | } | ||
| 19 | |||
| 20 | _invalid_parameter_handler (__cdecl *__MINGW_IMP_SYMBOL(_get_invalid_parameter_handler))(void) = mingw_get_invalid_parameter_handler; | ||
| 21 | |||
| 22 | _invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void) __attribute__ ((alias ("mingw_get_invalid_parameter_handler"))); | ||
| 23 | _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler new_handler) __attribute__ ((alias ("mingw_set_invalid_parameter_handler"))); | ||
lib/libc/mingw/misc/lc_locale_func.c deleted-59| ... | @@ -1,59 +0,0 @@ | ||
| 1 | #define __lc_codepage __dummy_lc_codepage | ||
| 2 | #define ___lc_codepage_func __dummy____lc_codepage_func | ||
| 3 | #include <windows.h> | ||
| 4 | #include <locale.h> | ||
| 5 | |||
| 6 | #undef __lc_codepage | ||
| 7 | #undef ___lc_codepage_func | ||
| 8 | #include "mb_wc_common.h" | ||
| 9 | |||
| 10 | static unsigned int __cdecl setlocale_codepage_hack(void) | ||
| 11 | { | ||
| 12 | /* locale :: "lang[_country[.code_page]]" | ".code_page" */ | ||
| 13 | const char *cp_str = strchr (setlocale(LC_CTYPE, NULL), '.'); | ||
| 14 | return cp_str ? atoi(cp_str + 1) : 0; | ||
| 15 | } | ||
| 16 | |||
| 17 | #ifndef __LIBMSVCRT_OS__ | ||
| 18 | |||
| 19 | unsigned int (__cdecl *__MINGW_IMP_SYMBOL(___lc_codepage_func))(void) = setlocale_codepage_hack; | ||
| 20 | |||
| 21 | #else | ||
| 22 | |||
| 23 | #include <msvcrt.h> | ||
| 24 | |||
| 25 | static unsigned int *msvcrt__lc_codepage; | ||
| 26 | static unsigned int __cdecl msvcrt___lc_codepage_func(void) | ||
| 27 | { | ||
| 28 | return *msvcrt__lc_codepage; | ||
| 29 | } | ||
| 30 | |||
| 31 | static unsigned int __cdecl init_codepage_func(void); | ||
| 32 | unsigned int (__cdecl *__MINGW_IMP_SYMBOL(___lc_codepage_func))(void) = init_codepage_func; | ||
| 33 | |||
| 34 | static unsigned int __cdecl init_codepage_func(void) | ||
| 35 | { | ||
| 36 | HMODULE msvcrt = __mingw_get_msvcrt_handle(); | ||
| 37 | unsigned int (__cdecl *func)(void) = NULL; | ||
| 38 | |||
| 39 | if(msvcrt) { | ||
| 40 | func = (void*)GetProcAddress(msvcrt, "___lc_codepage_func"); | ||
| 41 | if(!func) { | ||
| 42 | msvcrt__lc_codepage = (unsigned int*)GetProcAddress(msvcrt, "__lc_codepage"); | ||
| 43 | if(msvcrt__lc_codepage) | ||
| 44 | func = msvcrt___lc_codepage_func; | ||
| 45 | } | ||
| 46 | } | ||
| 47 | |||
| 48 | if(!func) | ||
| 49 | func = setlocale_codepage_hack; | ||
| 50 | |||
| 51 | return (__MINGW_IMP_SYMBOL(___lc_codepage_func) = func)(); | ||
| 52 | } | ||
| 53 | |||
| 54 | #endif | ||
| 55 | |||
| 56 | unsigned int __cdecl ___lc_codepage_func(void) | ||
| 57 | { | ||
| 58 | return __MINGW_IMP_SYMBOL(___lc_codepage_func)(); | ||
| 59 | } | ||
lib/libc/mingw/misc/mbrtowc.c deleted-156| ... | @@ -1,156 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #ifndef WIN32_LEAN_AND_MEAN | ||
| 7 | #define WIN32_LEAN_AND_MEAN | ||
| 8 | #endif | ||
| 9 | #include "mb_wc_common.h" | ||
| 10 | #include <wchar.h> | ||
| 11 | #include <stdlib.h> | ||
| 12 | #include <errno.h> | ||
| 13 | #include <windows.h> | ||
| 14 | |||
| 15 | static int __MINGW_ATTRIB_NONNULL(1) __MINGW_ATTRIB_NONNULL(4) | ||
| 16 | __mbrtowc_cp (wchar_t * __restrict__ pwc, const char * __restrict__ s, | ||
| 17 | 	 size_t n, mbstate_t* __restrict__ ps, | ||
| 18 | 	 const unsigned int cp, const unsigned int mb_max) | ||
| 19 | { | ||
| 20 | union { | ||
| 21 | mbstate_t val; | ||
| 22 | char mbcs[4]; | ||
| 23 | } shift_state; | ||
| 24 | |||
| 25 | /* Do the prelim checks */ | ||
| 26 | if (s == NULL) | ||
| 27 | return 0; | ||
| 28 | |||
| 29 | if (n == 0) | ||
| 30 | /* The standard doesn't mention this case explicitly. Tell | ||
| 31 | caller that the conversion from a non-null s is incomplete. */ | ||
| 32 | return -2; | ||
| 33 | |||
| 34 | /* Save the current shift state, in case we need it in DBCS case. */ | ||
| 35 | shift_state.val = *ps; | ||
| 36 | *ps = 0; | ||
| 37 | |||
| 38 | if (!*s) | ||
| 39 | { | ||
| 40 | *pwc = 0; | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | |||
| 44 | if (mb_max > 1) | ||
| 45 | { | ||
| 46 | if (shift_state.mbcs[0] != 0) | ||
| 47 | 	{ | ||
| 48 | 	 /* Complete the mb char with the trailing byte. */ | ||
| 49 | 	 shift_state.mbcs[1] = *s; /* the second byte */ | ||
| 50 | 	 if (MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, | ||
| 51 | 				 shift_state.mbcs, 2, pwc, 1) | ||
| 52 | 		 == 0) | ||
| 53 | 	 { | ||
| 54 | 	 /* An invalid trailing byte */ | ||
| 55 | 	 errno = EILSEQ; | ||
| 56 | 	 return -1; | ||
| 57 | 	 } | ||
| 58 | 	 return 2; | ||
| 59 | 	} | ||
| 60 | else if (IsDBCSLeadByteEx (cp, *s)) | ||
| 61 | 	{ | ||
| 62 | 	 /* If told to translate one byte, just save the leadbyte | ||
| 63 | 	 in *ps. */ | ||
| 64 | 	 if (n < 2) | ||
| 65 | 	 { | ||
| 66 | 	 ((char*) ps)[0] = *s; | ||
| 67 | 	 return -2; | ||
| 68 | 	 } | ||
| 69 | 	 /* Else translate the first two bytes */ | ||
| 70 | 	 else if (MultiByteToWideChar (cp, MB_ERR_INVALID_CHARS, | ||
| 71 | 					s, 2, pwc, 1) | ||
| 72 | 		 == 0) | ||
| 73 | 	 { | ||
| 74 | 	 errno = EILSEQ; | ||
| 75 | 	 return -1; | ||
| 76 | 	 } | ||
| 77 | 	 return 2; | ||
| 78 | 	} | ||
| 79 | } | ||
| 80 | |||
| 81 | /* Fall through to single byte char */ | ||
| 82 | if (cp == 0) | ||
| 83 | *pwc = (wchar_t)(unsigned char)*s; | ||
| 84 | |||
| 85 | else if (MultiByteToWideChar (cp, MB_ERR_INVALID_CHARS, s, 1, pwc, 1) | ||
| 86 | 	 == 0) | ||
| 87 | { | ||
| 88 | errno = EILSEQ; | ||
| 89 | return -1; | ||
| 90 | } | ||
| 91 | |||
| 92 | return 1; | ||
| 93 | } | ||
| 94 | |||
| 95 | size_t | ||
| 96 | mbrtowc (wchar_t * __restrict__ pwc, const char * __restrict__ s, | ||
| 97 | 	 size_t n, mbstate_t* __restrict__ ps) | ||
| 98 | { | ||
| 99 | static mbstate_t internal_mbstate = 0; | ||
| 100 | wchar_t byte_bucket = 0; | ||
| 101 | wchar_t* dst = pwc ? pwc : &byte_bucket; | ||
| 102 | |||
| 103 | return (size_t) __mbrtowc_cp (dst, s, n, ps ? ps : &internal_mbstate, | ||
| 104 | 				___lc_codepage_func(), MB_CUR_MAX); | ||
| 105 | } | ||
| 106 | |||
| 107 | |||
| 108 | size_t | ||
| 109 | mbsrtowcs (wchar_t* __restrict__ dst, const char ** __restrict__ src, | ||
| 110 | 	 size_t len, mbstate_t* __restrict__ ps) | ||
| 111 | { | ||
| 112 | int ret =0 ; | ||
| 113 | size_t n = 0; | ||
| 114 | static mbstate_t internal_mbstate = 0; | ||
| 115 | mbstate_t* internal_ps = ps ? ps : &internal_mbstate; | ||
| 116 | const unsigned int cp = ___lc_codepage_func(); | ||
| 117 | const unsigned int mb_max = MB_CUR_MAX; | ||
| 118 | |||
| 119 | if (src == NULL || *src == NULL)	/* undefined behavior */ | ||
| 120 | return 0; | ||
| 121 | |||
| 122 | if (dst != NULL) | ||
| 123 | { | ||
| 124 | while (n < len | ||
| 125 | 	 && (ret = __mbrtowc_cp(dst, *src, len - n, | ||
| 126 | 				 internal_ps, cp, mb_max)) | ||
| 127 | 		 > 0) | ||
| 128 | 	{ | ||
| 129 | 	 ++dst; | ||
| 130 | 	 *src += ret; | ||
| 131 | 	 n += ret; | ||
| 132 | 	} | ||
| 133 | |||
| 134 | if (n < len && ret == 0) | ||
| 135 | 	*src = (char *)NULL; | ||
| 136 | } | ||
| 137 | else | ||
| 138 | { | ||
| 139 | wchar_t byte_bucket = 0; | ||
| 140 | while ((ret = __mbrtowc_cp (&byte_bucket, *src + n, mb_max, | ||
| 141 | 				 internal_ps, cp, mb_max)) | ||
| 142 | 		 > 0) | ||
| 143 | 	n += ret; | ||
| 144 | } | ||
| 145 | return n; | ||
| 146 | } | ||
| 147 | |||
| 148 | size_t | ||
| 149 | mbrlen (const char * __restrict__ s, size_t n, | ||
| 150 | 	mbstate_t * __restrict__ ps) | ||
| 151 | { | ||
| 152 | static mbstate_t s_mbstate = 0; | ||
| 153 | wchar_t byte_bucket = 0; | ||
| 154 | return __mbrtowc_cp (&byte_bucket, s, n, (ps) ? ps : &s_mbstate, | ||
| 155 | 		 ___lc_codepage_func(), MB_CUR_MAX); | ||
| 156 | } | ||
lib/libc/mingw/misc/mbsinit.c deleted-32| ... | @@ -1,32 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | /*	This source code was extracted from the Q8 package created and placed | ||
| 7 | in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil> | ||
| 8 | last edit:	1999/11/05	gwyn@arl.mil | ||
| 9 | |||
| 10 | Implements subclause 7.24 of ISO/IEC 9899:1999 (E). | ||
| 11 | |||
| 12 | 	It supports an encoding where all char codes are mapped | ||
| 13 | 	to the *same* code values within a wchar_t or wint_t, | ||
| 14 | 	so long as no other wchar_t codes are used by the program. | ||
| 15 | |||
| 16 | */ | ||
| 17 | |||
| 18 | #define __CRT__NO_INLINE | ||
| 19 | #include	<wchar.h> | ||
| 20 | |||
| 21 | #if 0 | ||
| 22 | int mbsinit(const mbstate_t *ps) | ||
| 23 | { | ||
| 24 | 	return 1;			/* don't have shift states */ | ||
| 25 | } | ||
| 26 | #endif | ||
| 27 | |||
| 28 | int __cdecl mbsinit(const mbstate_t *_P) | ||
| 29 | { | ||
| 30 | 	return (!_P || *_P == 0); | ||
| 31 | } | ||
| 32 | |||
lib/libc/mingw/misc/onexit_table.c deleted-77| ... | @@ -1,77 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <process.h> | ||
| 8 | #include <stdlib.h> | ||
| 9 | |||
| 10 | #define _EXIT_LOCK1 8 | ||
| 11 | |||
| 12 | void __cdecl _lock (int _File); | ||
| 13 | void __cdecl _unlock (int _File); | ||
| 14 | |||
| 15 | int __cdecl _initialize_onexit_table(_onexit_table_t *table) | ||
| 16 | { | ||
| 17 | if (!table) return -1; | ||
| 18 | table->_first = table->_last = table->_end = NULL; | ||
| 19 | return 0; | ||
| 20 | } | ||
| 21 | |||
| 22 | int __cdecl _register_onexit_function(_onexit_table_t *table, _onexit_t func) | ||
| 23 | { | ||
| 24 | if (!table) return -1; | ||
| 25 | |||
| 26 | _lock(_EXIT_LOCK1); | ||
| 27 | |||
| 28 | if (!table->_first) { | ||
| 29 | table->_first = calloc(32, sizeof(void*)); | ||
| 30 | if (!table->_first) { | ||
| 31 | _unlock(_EXIT_LOCK1); | ||
| 32 | return -1; | ||
| 33 | } | ||
| 34 | table->_last = table->_first; | ||
| 35 | table->_end = table->_first + 32; | ||
| 36 | } | ||
| 37 | |||
| 38 | if (table->_last == table->_end) { | ||
| 39 | size_t len = table->_end - table->_first; | ||
| 40 | _PVFV *new_buf = realloc(table->_first, len * sizeof(void*) * 2); | ||
| 41 | if (!new_buf) { | ||
| 42 | _unlock(_EXIT_LOCK1); | ||
| 43 | return -1; | ||
| 44 | } | ||
| 45 | table->_first = new_buf; | ||
| 46 | table->_last = new_buf + len; | ||
| 47 | table->_end = new_buf + len * 2; | ||
| 48 | } | ||
| 49 | |||
| 50 | *table->_last++ = (_PVFV)func; | ||
| 51 | _unlock(_EXIT_LOCK1); | ||
| 52 | return 0; | ||
| 53 | } | ||
| 54 | |||
| 55 | int __cdecl _execute_onexit_table(_onexit_table_t *table) | ||
| 56 | { | ||
| 57 | _PVFV *first, *last; | ||
| 58 | |||
| 59 | _lock(_EXIT_LOCK1); | ||
| 60 | first = table->_first; | ||
| 61 | last = table->_last; | ||
| 62 | _initialize_onexit_table(table); | ||
| 63 | _unlock(_EXIT_LOCK1); | ||
| 64 | |||
| 65 | if (!first) return 0; | ||
| 66 | |||
| 67 | while (--last >= first) | ||
| 68 | if (*last) | ||
| 69 | (**last)(); | ||
| 70 | |||
| 71 | free(first); | ||
| 72 | return 0; | ||
| 73 | } | ||
| 74 | |||
| 75 | typeof(_initialize_onexit_table) *__MINGW_IMP_SYMBOL(_initialize_onexit_table) = _initialize_onexit_table; | ||
| 76 | typeof(_register_onexit_function) *__MINGW_IMP_SYMBOL(_register_onexit_function) = _register_onexit_function; | ||
| 77 | typeof(_execute_onexit_table) *__MINGW_IMP_SYMBOL(_execute_onexit_table) = _execute_onexit_table; | ||
lib/libc/mingw/misc/output_format.c deleted-62| ... | @@ -1,62 +0,0 @@ | ||
| 1 | #define _get_output_format __dummy__get_output_format | ||
| 2 | #define _set_output_format __dummy__set_output_format | ||
| 3 | #include <windows.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | |||
| 6 | #undef _get_output_format | ||
| 7 | #undef _set_output_format | ||
| 8 | |||
| 9 | static unsigned int last_value = 0; | ||
| 10 | typedef unsigned int (*f_get_output_format)(void); | ||
| 11 | typedef unsigned int (*f_set_output_format)(unsigned int); | ||
| 12 | |||
| 13 | static unsigned int init_set_output_format(unsigned int); | ||
| 14 | f_set_output_format __MINGW_IMP_SYMBOL(_set_output_format) = init_set_output_format; | ||
| 15 | |||
| 16 | unsigned int _set_output_format(unsigned int format); | ||
| 17 | unsigned int _set_output_format(unsigned int format) | ||
| 18 | { | ||
| 19 | return __MINGW_IMP_SYMBOL(_set_output_format)(format); | ||
| 20 | } | ||
| 21 | |||
| 22 | static unsigned int fake_set_output_format(unsigned int value) | ||
| 23 | { | ||
| 24 | return InterlockedExchange((LONG*)&last_value, value); | ||
| 25 | } | ||
| 26 | |||
| 27 | static unsigned int init_set_output_format(unsigned int format) | ||
| 28 | { | ||
| 29 | f_set_output_format sof; | ||
| 30 | |||
| 31 | sof = (f_set_output_format) GetProcAddress (__mingw_get_msvcrt_handle(), "_set_output_format"); | ||
| 32 | if(!sof) | ||
| 33 | sof = fake_set_output_format; | ||
| 34 | |||
| 35 | return (__MINGW_IMP_SYMBOL(_set_output_format) = sof)(format); | ||
| 36 | } | ||
| 37 | |||
| 38 | |||
| 39 | static unsigned int init_get_output_format(void); | ||
| 40 | f_get_output_format __MINGW_IMP_SYMBOL(_get_output_format) = init_get_output_format; | ||
| 41 | |||
| 42 | unsigned int _get_output_format(void); | ||
| 43 | unsigned int _get_output_format(void) | ||
| 44 | { | ||
| 45 | return __MINGW_IMP_SYMBOL(_get_output_format)(); | ||
| 46 | } | ||
| 47 | |||
| 48 | static unsigned int fake_get_output_format(void) | ||
| 49 | { | ||
| 50 | return last_value; | ||
| 51 | } | ||
| 52 | |||
| 53 | static unsigned int init_get_output_format(void) | ||
| 54 | { | ||
| 55 | f_get_output_format gof; | ||
| 56 | |||
| 57 | gof = (f_get_output_format) GetProcAddress (__mingw_get_msvcrt_handle(), "_get_output_format"); | ||
| 58 | if(!gof) | ||
| 59 | gof = fake_get_output_format; | ||
| 60 | |||
| 61 | return (__MINGW_IMP_SYMBOL(_get_output_format) = gof)(); | ||
| 62 | } | ||
lib/libc/mingw/misc/purecall.c deleted-18| ... | @@ -1,18 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #define _CRTIMP | ||
| 8 | #include <stdlib.h> | ||
| 9 | #include <windows.h> | ||
| 10 | |||
| 11 | _purecall_handler __cdecl _set_purecall_handler(_purecall_handler handler) | ||
| 12 | { | ||
| 13 | static _purecall_handler prev_handler; | ||
| 14 | return InterlockedExchangePointer((void**)&prev_handler, handler); | ||
| 15 | } | ||
| 16 | |||
| 17 | void *__MINGW_IMP_SYMBOL(_set_purecall_handler) = _set_purecall_handler; | ||
| 18 | |||
lib/libc/mingw/misc/register_tls_atexit.c deleted-29| ... | @@ -1,29 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <process.h> | ||
| 8 | #include <windows.h> | ||
| 9 | #include <winnt.h> | ||
| 10 | #include <stdlib.h> | ||
| 11 | |||
| 12 | static _tls_callback_type callback; | ||
| 13 | |||
| 14 | static void run_callback(void) | ||
| 15 | { | ||
| 16 | if (callback) | ||
| 17 | callback(NULL, DLL_PROCESS_DETACH, 0); | ||
| 18 | callback = NULL; | ||
| 19 | } | ||
| 20 | |||
| 21 | void __cdecl _register_thread_local_exe_atexit_callback(_tls_callback_type cb) | ||
| 22 | { | ||
| 23 | callback = cb; | ||
| 24 | /* This should guarantee that the callback is called. It won't be run in the | ||
| 25 | * exact right spot as intended to, but it will be run. */ | ||
| 26 | atexit(run_callback); | ||
| 27 | } | ||
| 28 | |||
| 29 | typeof(_register_thread_local_exe_atexit_callback) *__MINGW_IMP_SYMBOL(_register_thread_local_exe_atexit_callback) = _register_thread_local_exe_atexit_callback; | ||
lib/libc/mingw/misc/seterrno.c deleted-24| ... | @@ -1,24 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <errno.h> | ||
| 7 | |||
| 8 | errno_t __cdecl _set_errno (int _Value) | ||
| 9 | { | ||
| 10 | errno = _Value; | ||
| 11 | return 0; | ||
| 12 | } | ||
| 13 | |||
| 14 | errno_t __cdecl _get_errno (int *_Value) | ||
| 15 | { | ||
| 16 | if(!_Value) | ||
| 17 | { | ||
| 18 | errno = EINVAL; | ||
| 19 | return EINVAL; | ||
| 20 | } | ||
| 21 | |||
| 22 | *_Value = errno; | ||
| 23 | return 0; | ||
| 24 | } | ||
lib/libc/mingw/misc/strtoimax.c deleted-123| ... | @@ -1,123 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | /* | ||
| 7 | This source code was extracted from the Q8 package created and | ||
| 8 | placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil> | ||
| 9 | last edit:	1999/11/05	gwyn@arl.mil | ||
| 10 | |||
| 11 | 	Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E). | ||
| 12 | |||
| 13 | 	This particular implementation requires the matching <inttypes.h>. | ||
| 14 | 	It also assumes that character codes for A..Z and a..z are in | ||
| 15 | 	contiguous ascending order; this is true for ASCII but not EBCDIC. | ||
| 16 | */ | ||
| 17 | #include <stdlib.h> | ||
| 18 | #include <errno.h> | ||
| 19 | #include <ctype.h> | ||
| 20 | #include <inttypes.h> | ||
| 21 | |||
| 22 | /* Helper macros */ | ||
| 23 | |||
| 24 | /* convert digit character to number, in any base */ | ||
| 25 | #define ToNumber(c)	(isdigit(c) ? (c) - '0' : \ | ||
| 26 | 			 isupper(c) ? (c) - 'A' + 10 : \ | ||
| 27 | 			 islower(c) ? (c) - 'a' + 10 : \ | ||
| 28 | 			 -1		/* "invalid" flag */ \ | ||
| 29 | 			) | ||
| 30 | /* validate converted digit character for specific base */ | ||
| 31 | #define valid(n, b)	((n) >= 0 && (n) < (b)) | ||
| 32 | |||
| 33 | intmax_t | ||
| 34 | __cdecl | ||
| 35 | strtoimax(const char * __restrict__ nptr, char ** __restrict__ endptr, int base) | ||
| 36 | 	{ | ||
| 37 | 	register uintmax_t	accum;	/* accumulates converted value */ | ||
| 38 | 	register int		n;	/* numeral from digit character */ | ||
| 39 | 	int			minus;	/* set iff minus sign seen */ | ||
| 40 | 	int			toobig;	/* set iff value overflows */ | ||
| 41 | |||
| 42 | 	if ( endptr != NULL ) | ||
| 43 | 		*endptr = (char *)nptr;	/* in case no conversion's performed */ | ||
| 44 | |||
| 45 | 	if ( base < 0 || base == 1 || base > 36 ) | ||
| 46 | 		{ | ||
| 47 | 		errno = EDOM; | ||
| 48 | 		return 0;		/* unspecified behavior */ | ||
| 49 | 		} | ||
| 50 | |||
| 51 | 	/* skip initial, possibly empty sequence of white-space characters */ | ||
| 52 | |||
| 53 | 	while ( isspace(*nptr) ) | ||
| 54 | 		++nptr; | ||
| 55 | |||
| 56 | 	/* process subject sequence: */ | ||
| 57 | |||
| 58 | 	/* optional sign */ | ||
| 59 | 	if ( (minus = *nptr == '-') || *nptr == '+' ) | ||
| 60 | 		++nptr; | ||
| 61 | |||
| 62 | 	if ( base == 0 ) { | ||
| 63 | 		if ( *nptr == '0' ) { | ||
| 64 | 			if ( nptr[1] == 'X' || nptr[1] == 'x' ) | ||
| 65 | 				base = 16; | ||
| 66 | 			else | ||
| 67 | 				base = 8; | ||
| 68 | 		} | ||
| 69 | 		else | ||
| 70 | 				base = 10; | ||
| 71 | 	} | ||
| 72 | 	/* optional "0x" or "0X" for base 16 */ | ||
| 73 | |||
| 74 | 	if ( base == 16 && *nptr == '0' && (nptr[1] == 'X' || nptr[1] == 'x') ) | ||
| 75 | 		nptr += 2;		/* skip past this prefix */ | ||
| 76 | |||
| 77 | 	/* check whether there is at least one valid digit */ | ||
| 78 | |||
| 79 | 	n = ToNumber(*nptr); | ||
| 80 | 	++nptr; | ||
| 81 | |||
| 82 | 	if ( !valid(n, base) ) | ||
| 83 | 		return 0;		/* subject seq. not of expected form */ | ||
| 84 | |||
| 85 | 	accum = n; | ||
| 86 | |||
| 87 | 	for ( toobig = 0; n = ToNumber(*nptr), valid(n, base); ++nptr ) | ||
| 88 | 		if ( accum > (uintmax_t)(INTMAX_MAX / base + 2) ) /* major wrap-around */ | ||
| 89 | 			toobig = 1;	/* but keep scanning */ | ||
| 90 | 		else | ||
| 91 | 			accum = base * accum + n; | ||
| 92 | |||
| 93 | 	if ( endptr != NULL ) | ||
| 94 | 		*endptr = (char *)nptr;	/* points to first not-valid-digit */ | ||
| 95 | |||
| 96 | 	if ( minus ) | ||
| 97 | 		{ | ||
| 98 | 		if ( accum > (uintmax_t)INTMAX_MAX + 1 ) | ||
| 99 | 			toobig = 1; | ||
| 100 | 		} | ||
| 101 | 	else | ||
| 102 | 	if ( accum > (uintmax_t)INTMAX_MAX ) | ||
| 103 | 		toobig = 1; | ||
| 104 | |||
| 105 | 	if ( toobig ) | ||
| 106 | 		{ | ||
| 107 | 		errno = ERANGE; | ||
| 108 | 		return minus ? INTMAX_MIN : INTMAX_MAX; | ||
| 109 | 		} | ||
| 110 | 	else | ||
| 111 | 		return (intmax_t)(minus ? -accum : accum); | ||
| 112 | 	} | ||
| 113 | intmax_t (__cdecl *__MINGW_IMP_SYMBOL(strtoimax))(const char* __restrict__, char ** __restrict__, int) = strtoimax; | ||
| 114 | |||
| 115 | long long __attribute__ ((alias ("strtoimax"))) | ||
| 116 | __cdecl | ||
| 117 | strtoll (const char* __restrict__ nptr, char ** __restrict__ endptr, int base); | ||
| 118 | long long (__cdecl *__MINGW_IMP_SYMBOL(strtoll))(const char* __restrict__, char ** __restrict__, int) = strtoll; | ||
| 119 | |||
| 120 | __int64 __attribute__ ((alias ("strtoimax"))) | ||
| 121 | __cdecl | ||
| 122 | _strtoi64 (const char* __restrict__ nptr, char ** __restrict__ endptr, int base); | ||
| 123 | __int64 (__cdecl *__MINGW_IMP_SYMBOL(_strtoi64))(const char* __restrict__, char ** __restrict__, int) = _strtoi64; | ||
lib/libc/mingw/misc/strtoumax.c deleted-121| ... | @@ -1,121 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | /* | ||
| 7 | This source code was extracted from the Q8 package created and | ||
| 8 | placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil> | ||
| 9 | last edit:	1999/11/05	gwyn@arl.mil | ||
| 10 | |||
| 11 | 	Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E). | ||
| 12 | |||
| 13 | 	This particular implementation requires the matching <inttypes.h>. | ||
| 14 | 	It also assumes that character codes for A..Z and a..z are in | ||
| 15 | 	contiguous ascending order; this is true for ASCII but not EBCDIC. | ||
| 16 | */ | ||
| 17 | #include <stdlib.h> | ||
| 18 | #include <errno.h> | ||
| 19 | #include <ctype.h> | ||
| 20 | #include <inttypes.h> | ||
| 21 | |||
| 22 | /* Helper macros */ | ||
| 23 | |||
| 24 | /* convert digit character to number, in any base */ | ||
| 25 | #define ToNumber(c)	(isdigit(c) ? (c) - '0' : \ | ||
| 26 | 			 isupper(c) ? (c) - 'A' + 10 : \ | ||
| 27 | 			 islower(c) ? (c) - 'a' + 10 : \ | ||
| 28 | 			 -1		/* "invalid" flag */ \ | ||
| 29 | 			) | ||
| 30 | /* validate converted digit character for specific base */ | ||
| 31 | #define valid(n, b)	((n) >= 0 && (n) < (b)) | ||
| 32 | |||
| 33 | uintmax_t | ||
| 34 | __cdecl | ||
| 35 | strtoumax(const char * __restrict__ nptr, char ** __restrict__ endptr, int base) | ||
| 36 | 	{ | ||
| 37 | 	register uintmax_t	accum;	/* accumulates converted value */ | ||
| 38 | 	register uintmax_t	next;	/* for computing next value of accum */ | ||
| 39 | 	register int		n;	/* numeral from digit character */ | ||
| 40 | 	int			minus;	/* set iff minus sign seen (yes!) */ | ||
| 41 | 	int			toobig;	/* set iff value overflows */ | ||
| 42 | |||
| 43 | 	if ( endptr != NULL ) | ||
| 44 | 		*endptr = (char *)nptr;	/* in case no conversion's performed */ | ||
| 45 | |||
| 46 | 	if ( base < 0 || base == 1 || base > 36 ) | ||
| 47 | 		{ | ||
| 48 | 		errno = EDOM; | ||
| 49 | 		return 0;		/* unspecified behavior */ | ||
| 50 | 		} | ||
| 51 | |||
| 52 | 	/* skip initial, possibly empty sequence of white-space characters */ | ||
| 53 | |||
| 54 | 	while ( isspace(*nptr) ) | ||
| 55 | 		++nptr; | ||
| 56 | |||
| 57 | 	/* process subject sequence: */ | ||
| 58 | |||
| 59 | 	/* optional sign (yes!) */ | ||
| 60 | |||
| 61 | 	if ( (minus = *nptr == '-') || *nptr == '+' ) | ||
| 62 | 		++nptr; | ||
| 63 | |||
| 64 | 	if ( base == 0 ) | ||
| 65 | { | ||
| 66 | 		if ( *nptr == '0' ) | ||
| 67 | { | ||
| 68 | 			if ( nptr[1] == 'X' || nptr[1] == 'x' ) | ||
| 69 | 				base = 16; | ||
| 70 | 			else | ||
| 71 | 				base = 8; | ||
| 72 | 		 } | ||
| 73 | 		else | ||
| 74 | 				base = 10; | ||
| 75 | 		} | ||
| 76 | |||
| 77 | /* optional "0x" or "0X" for base 16 */ | ||
| 78 | |||
| 79 | 	if ( base == 16 && *nptr == '0' && (nptr[1] == 'X' || nptr[1] == 'x') ) | ||
| 80 | 		nptr += 2;		/* skip past this prefix */ | ||
| 81 | |||
| 82 | 	/* check whether there is at least one valid digit */ | ||
| 83 | |||
| 84 | 	n = ToNumber(*nptr); | ||
| 85 | 	++nptr; | ||
| 86 | |||
| 87 | 	if ( !valid(n, base) ) | ||
| 88 | 		return 0;		/* subject seq. not of expected form */ | ||
| 89 | |||
| 90 | 	accum = n; | ||
| 91 | |||
| 92 | 	for ( toobig = 0; n = ToNumber(*nptr), valid(n, base); ++nptr ) | ||
| 93 | 		if ( accum > UINTMAX_MAX / base + 1	/* major wrap-around */ | ||
| 94 | 		 || (next = base * accum + n) < accum	/* minor wrap-around */ | ||
| 95 | 		 ) | ||
| 96 | 			toobig = 1;	/* but keep scanning */ | ||
| 97 | 		else | ||
| 98 | 			accum = next; | ||
| 99 | |||
| 100 | 	if ( endptr != NULL ) | ||
| 101 | 		*endptr = (char *)nptr;	/* points to first not-valid-digit */ | ||
| 102 | |||
| 103 | 	if ( toobig ) | ||
| 104 | 		{ | ||
| 105 | 		errno = ERANGE; | ||
| 106 | 		return UINTMAX_MAX; | ||
| 107 | 		} | ||
| 108 | 	else | ||
| 109 | 		return minus ? -accum : accum;	/* (yes!) */ | ||
| 110 | 	} | ||
| 111 | uintmax_t (__cdecl *__MINGW_IMP_SYMBOL(strtoumax))(const char* __restrict__, char ** __restrict__, int) = strtoumax; | ||
| 112 | |||
| 113 | unsigned long long __attribute__ ((alias ("strtoumax"))) | ||
| 114 | __cdecl | ||
| 115 | strtoull (const char* __restrict__ nptr, char ** __restrict__ endptr, int base); | ||
| 116 | unsigned long long (__cdecl *__MINGW_IMP_SYMBOL(strtoull))(const char* __restrict__, char ** __restrict__, int) = strtoull; | ||
| 117 | |||
| 118 | unsigned __int64 __attribute__ ((alias ("strtoumax"))) | ||
| 119 | __cdecl | ||
| 120 | _strtoui64 (const char* __restrict__ nptr, char ** __restrict__ endptr, int base); | ||
| 121 | unsigned __int64 (__cdecl *__MINGW_IMP_SYMBOL(_strtoui64))(const char* __restrict__, char ** __restrict__, int) = _strtoui64; | ||
lib/libc/mingw/misc/wassert.c deleted-49| ... | @@ -1,49 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <assert.h> | ||
| 8 | #include <stdlib.h> | ||
| 9 | #include <windows.h> | ||
| 10 | #include "msvcrt.h" | ||
| 11 | |||
| 12 | /* _wassert is not available on XP, so forward it to _assert if needed */ | ||
| 13 | static void __cdecl mingw_wassert(const wchar_t *_Message, const wchar_t *_File, unsigned _Line) | ||
| 14 | { | ||
| 15 | char *message = NULL, *file = NULL; | ||
| 16 | size_t len; | ||
| 17 | |||
| 18 | if ((len = wcstombs(NULL, _Message, 0)) != (size_t)-1) | ||
| 19 | { | ||
| 20 | message = malloc(len + 1); | ||
| 21 | wcstombs(message, _Message, len + 1); | ||
| 22 | } | ||
| 23 | |||
| 24 | if ((len = wcstombs(NULL, _File, 0)) != (size_t)-1) | ||
| 25 | { | ||
| 26 | file = malloc(len + 1); | ||
| 27 | wcstombs(file, _File, len + 1); | ||
| 28 | } | ||
| 29 | |||
| 30 | _assert(message, file, _Line); | ||
| 31 | |||
| 32 | free(message); | ||
| 33 | free(file); | ||
| 34 | } | ||
| 35 | |||
| 36 | static void __cdecl init_wassert(const wchar_t *message, const wchar_t *file, unsigned line); | ||
| 37 | |||
| 38 | void (__cdecl *__MINGW_IMP_SYMBOL(_wassert))(const wchar_t*, const wchar_t*,unsigned) = init_wassert; | ||
| 39 | |||
| 40 | static void __cdecl init_wassert(const wchar_t *message, const wchar_t *file, unsigned line) | ||
| 41 | { | ||
| 42 | void *func; | ||
| 43 | |||
| 44 | func = (void*)GetProcAddress(__mingw_get_msvcrt_handle(), "_wassert"); | ||
| 45 | if(!func) | ||
| 46 | func = mingw_wassert; | ||
| 47 | |||
| 48 | return (__MINGW_IMP_SYMBOL(_wassert) = func)(message, file, line); | ||
| 49 | } | ||
lib/libc/mingw/misc/wcrtomb.c deleted-100| ... | @@ -1,100 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #ifndef WIN32_LEAN_AND_MEAN | ||
| 7 | #define WIN32_LEAN_AND_MEAN | ||
| 8 | #endif | ||
| 9 | #include "mb_wc_common.h" | ||
| 10 | #include <wchar.h> | ||
| 11 | #include <stdlib.h> | ||
| 12 | #include <errno.h> | ||
| 13 | #include <limits.h> | ||
| 14 | #include <windows.h> | ||
| 15 | |||
| 16 | __attribute__((noinline)) | ||
| 17 | static int __MINGW_ATTRIB_NONNULL(1) | ||
| 18 | __wcrtomb_cp (char *dst, wchar_t wc, const unsigned int cp, | ||
| 19 | 	 const unsigned int mb_max) | ||
| 20 | { | ||
| 21 | if (cp == 0) | ||
| 22 | { | ||
| 23 | if (wc > 255) | ||
| 24 | 	{ | ||
| 25 | 	 errno = EILSEQ; | ||
| 26 | 	 return -1; | ||
| 27 | 	} | ||
| 28 | *dst = (char) wc; | ||
| 29 | return 1; | ||
| 30 | } | ||
| 31 | else | ||
| 32 | { | ||
| 33 | int invalid_char = 0; | ||
| 34 | |||
| 35 | int size = WideCharToMultiByte (cp, 0 /* Is this correct flag? */, | ||
| 36 | 				 &wc, 1, dst, mb_max, | ||
| 37 | 				 NULL, &invalid_char); | ||
| 38 | if (size == 0 || invalid_char) | ||
| 39 | 	{ | ||
| 40 | 	 errno = EILSEQ; | ||
| 41 | 	 return -1; | ||
| 42 | 	} | ||
| 43 | return size; | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 47 | size_t | ||
| 48 | wcrtomb (char *dst, wchar_t wc, mbstate_t * __UNUSED_PARAM (ps)) | ||
| 49 | { | ||
| 50 | char byte_bucket [MB_LEN_MAX]; | ||
| 51 | char* tmp_dst = dst ? dst : &byte_bucket[0]; | ||
| 52 | return (size_t)__wcrtomb_cp (tmp_dst, wc, ___lc_codepage_func(), | ||
| 53 | 			 MB_CUR_MAX); | ||
| 54 | } | ||
| 55 | |||
| 56 | size_t wcsrtombs (char *dst, const wchar_t **src, size_t len, | ||
| 57 | 		 mbstate_t * __UNUSED_PARAM (ps)) | ||
| 58 | { | ||
| 59 | int ret = 0; | ||
| 60 | size_t n = 0; | ||
| 61 | const unsigned int cp = ___lc_codepage_func(); | ||
| 62 | const unsigned int mb_max = MB_CUR_MAX; | ||
| 63 | const wchar_t *pwc = *src; | ||
| 64 | |||
| 65 | if (src == NULL || *src == NULL) /* undefined behavior */ | ||
| 66 | return 0; | ||
| 67 | |||
| 68 | if (dst != NULL) | ||
| 69 | { | ||
| 70 | while (n < len) | ||
| 71 | 	{ | ||
| 72 | 	 if ((ret = __wcrtomb_cp (dst, *pwc, cp, mb_max)) <= 0) | ||
| 73 | 	 return (size_t) -1; | ||
| 74 | 	 n += ret; | ||
| 75 | 	 dst += ret; | ||
| 76 | 	 if (*(dst - 1) == '\0') | ||
| 77 | 	 { | ||
| 78 | 	 *src = (wchar_t *) NULL; | ||
| 79 | 	 return (n - 1); | ||
| 80 | 	 } | ||
| 81 | 	 pwc++; | ||
| 82 | 	} | ||
| 83 | *src = pwc; | ||
| 84 | } | ||
| 85 | else | ||
| 86 | { | ||
| 87 | char byte_bucket [MB_LEN_MAX]; | ||
| 88 | while (1) | ||
| 89 | 	{ | ||
| 90 | 	 if ((ret = __wcrtomb_cp (&byte_bucket[0], *pwc, cp, mb_max)) <= 0) | ||
| 91 | 	 return (size_t) -1; | ||
| 92 | 	 n += ret; | ||
| 93 | 	 if (byte_bucket [ret - 1] == '\0') | ||
| 94 | 	 return (n - 1); | ||
| 95 | 	 pwc++; | ||
| 96 | 	} | ||
| 97 | } | ||
| 98 | |||
| 99 | return n; | ||
| 100 | } | ||
lib/libc/mingw/secapi/_access_s.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <io.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_access_s (const char *, int); | ||
| 8 | static errno_t __cdecl _stub (const char *, int); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_access_s))(const char *, int) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (const char *s, int m) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(const char *, int) = __MINGW_IMP_SYMBOL(_access_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(const char *, int)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_access_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_access_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_access_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(s, m); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _access_s (const char *s, int m) | ||
| 31 | { | ||
| 32 | return _stub (s, m); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_access_s (const char *s, int m) | ||
| 37 | { | ||
| 38 | if (!s || (m & ~6) != 0) | ||
| 39 | { | ||
| 40 | _access (NULL, m); | ||
| 41 | return EINVAL; | ||
| 42 | } | ||
| 43 | if (!_access (s, m)) | ||
| 44 | return 0; | ||
| 45 | return errno; | ||
| 46 | } | ||
lib/libc/mingw/secapi/_cgets_s.c deleted-55| ... | @@ -1,55 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/conio_s.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_cgets_s (char *, size_t, size_t *); | ||
| 8 | static errno_t __cdecl _stub (char *, size_t, size_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_cgets_s))(char *, size_t, size_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (char *s, size_t l, size_t *r_len) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(char *, size_t, size_t *) = __MINGW_IMP_SYMBOL(_cgets_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(char *, size_t, size_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_cgets_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_cgets_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_cgets_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(s, l, r_len); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _cgets_s (char *s, size_t l, size_t *r_len) | ||
| 31 | { | ||
| 32 | return _stub (s, l, r_len); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_cgets_s (char *s, size_t l, size_t *r_len) | ||
| 37 | { | ||
| 38 | char *h, *p; | ||
| 39 | |||
| 40 | if (s && l) | ||
| 41 | s[0] = 0; | ||
| 42 | if (!s || !l || !r_len) | ||
| 43 | { | ||
| 44 | _cgets (NULL); | ||
| 45 | return EINVAL; | ||
| 46 | } | ||
| 47 | p = (char *) alloca (l + 2); | ||
| 48 | p[0] = l; | ||
| 49 | h = _cgets (s); | ||
| 50 | if (!h) | ||
| 51 | return EINVAL; | ||
| 52 | *r_len = (size_t) p[1]; | ||
| 53 | memcpy (s, &p[2], *r_len); | ||
| 54 | return 0; | ||
| 55 | } | ||
lib/libc/mingw/secapi/_cgetws_s.c deleted-55| ... | @@ -1,55 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/conio_s.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_cgetws_s (wchar_t *, size_t, size_t *); | ||
| 8 | static errno_t __cdecl _stub (wchar_t *, size_t, size_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_cgetws_s))(wchar_t *, size_t, size_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (wchar_t *s, size_t l, size_t *r_len) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(wchar_t *, size_t, size_t *) = __MINGW_IMP_SYMBOL(_cgetws_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(wchar_t *, size_t, size_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_cgetws_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_cgetws_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_cgetws_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(s, l, r_len); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _cgetws_s (wchar_t *s, size_t l, size_t *r_len) | ||
| 31 | { | ||
| 32 | return _stub (s, l, r_len); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_cgetws_s (wchar_t *s, size_t l, size_t *r_len) | ||
| 37 | { | ||
| 38 | wchar_t *h, *p; | ||
| 39 | |||
| 40 | if (s && l) | ||
| 41 | s[0] = 0; | ||
| 42 | if (!s || !l || !r_len) | ||
| 43 | { | ||
| 44 | _cgetws (NULL); | ||
| 45 | return EINVAL; | ||
| 46 | } | ||
| 47 | p = (wchar_t *) alloca ((l + 2) * sizeof (wchar_t)); | ||
| 48 | p[0] = l; | ||
| 49 | h = _cgetws (s); | ||
| 50 | if (!h) | ||
| 51 | return EINVAL; | ||
| 52 | *r_len = (size_t) p[1]; | ||
| 53 | memcpy (s, &p[2], *r_len); | ||
| 54 | return 0; | ||
| 55 | } | ||
lib/libc/mingw/secapi/_chsize_s.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <io.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_chsize_s (int, long long); | ||
| 8 | static errno_t __cdecl _stub (int, long long); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_chsize_s))(int, long long) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (int fd, long long sz) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(int, long long) = __MINGW_IMP_SYMBOL(_chsize_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(int, long long)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_chsize_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_chsize_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_chsize_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(fd, sz); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _chsize_s (int fd, long long sz) | ||
| 31 | { | ||
| 32 | return _stub (fd, sz); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_chsize_s (int fd, long long sz) | ||
| 37 | { | ||
| 38 | if (sz > 0x7fffffffll) | ||
| 39 | { | ||
| 40 | /* We can't set file bigger as 2GB, so return EACCES. */ | ||
| 41 | return (errno = EACCES); | ||
| 42 | } | ||
| 43 | if (!_chsize (fd, sz)) | ||
| 44 | return 0; | ||
| 45 | return errno; | ||
| 46 | } | ||
lib/libc/mingw/secapi/_controlfp_s.c deleted-56| ... | @@ -1,56 +0,0 @@ | ||
| 1 | #include <float.h> | ||
| 2 | #include <errno.h> | ||
| 3 | #include <windows.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | |||
| 6 | static errno_t __cdecl _stub( | ||
| 7 | unsigned int *currentControl, | ||
| 8 | unsigned int newControl, | ||
| 9 | unsigned int mask | ||
| 10 | ); | ||
| 11 | |||
| 12 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_controlfp_s))(unsigned int *, unsigned int, unsigned int) = _stub; | ||
| 13 | |||
| 14 | errno_t __cdecl _controlfp_s( | ||
| 15 | unsigned int *currentControl, | ||
| 16 | unsigned int newControl, | ||
| 17 | unsigned int mask | ||
| 18 | ){ | ||
| 19 | return __MINGW_IMP_SYMBOL(_controlfp_s)(currentControl,newControl,mask); | ||
| 20 | } | ||
| 21 | |||
| 22 | static const unsigned int allflags = _MCW_DN | _MCW_EM | _MCW_IC | _MCW_RC | _MCW_PC; | ||
| 23 | static errno_t __cdecl _int_controlfp_s( | ||
| 24 | unsigned int *currentControl, | ||
| 25 | unsigned int newControl, | ||
| 26 | unsigned int mask | ||
| 27 | ){ | ||
| 28 | unsigned int cont; | ||
| 29 | if(!(newControl & mask & ~allflags)){ | ||
| 30 | if (currentControl) *currentControl = _controlfp( 0, 0 ); | ||
| 31 | return EINVAL; | ||
| 32 | } | ||
| 33 | cont = _controlfp( newControl, mask ); | ||
| 34 | if(currentControl) *currentControl = cont; | ||
| 35 | return 0; | ||
| 36 | } | ||
| 37 | |||
| 38 | static errno_t __cdecl _stub ( | ||
| 39 | unsigned int *currentControl, | ||
| 40 | unsigned int newControl, | ||
| 41 | unsigned int mask | ||
| 42 | ) | ||
| 43 | { | ||
| 44 | errno_t __cdecl (*f)(unsigned int *, unsigned int, unsigned int) = __MINGW_IMP_SYMBOL(_controlfp_s); | ||
| 45 | |||
| 46 | if (f == _stub) | ||
| 47 | { | ||
| 48 | f = (errno_t __cdecl (*)(unsigned int *, unsigned int, unsigned int)) | ||
| 49 | GetProcAddress (__mingw_get_msvcrt_handle (), "_controlfp_s"); | ||
| 50 | if (!f) | ||
| 51 | f = _int_controlfp_s; | ||
| 52 | __MINGW_IMP_SYMBOL(_controlfp_s) = f; | ||
| 53 | } | ||
| 54 | return (*f)(currentControl, newControl, mask); | ||
| 55 | } | ||
| 56 | |||
lib/libc/mingw/secapi/_cprintf_s.c deleted-20| ... | @@ -1,20 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/conio_s.h> | ||
| 6 | |||
| 7 | int __cdecl (*__MINGW_IMP_SYMBOL(_cprintf_s))(const char *,...) = | ||
| 8 | _cprintf_s; | ||
| 9 | |||
| 10 | int __cdecl | ||
| 11 | _cprintf_s (const char *s, ...) | ||
| 12 | { | ||
| 13 | va_list argp; | ||
| 14 | int r; | ||
| 15 | |||
| 16 | va_start (argp, s); | ||
| 17 | r = _vcprintf_s (s, argp); | ||
| 18 | va_end (argp); | ||
| 19 | return r; | ||
| 20 | } | ||
lib/libc/mingw/secapi/_cprintf_s_l.c deleted-20| ... | @@ -1,20 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/conio_s.h> | ||
| 6 | |||
| 7 | int __cdecl (*__MINGW_IMP_SYMBOL(_cprintf_s_l))(const char *, _locale_t, ...) = | ||
| 8 | _cprintf_s_l; | ||
| 9 | |||
| 10 | int __cdecl | ||
| 11 | _cprintf_s_l (const char *s, _locale_t loc, ...) | ||
| 12 | { | ||
| 13 | va_list argp; | ||
| 14 | int r; | ||
| 15 | |||
| 16 | va_start (argp, loc); | ||
| 17 | r = _vcprintf_s_l (s, loc, argp); | ||
| 18 | va_end (argp); | ||
| 19 | return r; | ||
| 20 | } | ||
lib/libc/mingw/secapi/_ctime32_s.c deleted-56| ... | @@ -1,56 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_ctime32_s (char *, size_t, const __time32_t *); | ||
| 8 | static errno_t __cdecl _stub (char *, size_t, const __time32_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_ctime32_s))(char *, size_t, const __time32_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (char *d, size_t dn, const __time32_t *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(char *, size_t, const __time32_t *) = __MINGW_IMP_SYMBOL(_ctime32_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(char *, size_t, const __time32_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_ctime32_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_ctime32_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_ctime32_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _ctime32_s (char *d, size_t dn, const __time32_t *pt) | ||
| 31 | { | ||
| 32 | return _stub (d, dn, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_ctime32_s (char *d, size_t dn, const __time32_t *pt) | ||
| 37 | { | ||
| 38 | struct tm ltm; | ||
| 39 | errno_t e; | ||
| 40 | |||
| 41 | if (!d || !dn) | ||
| 42 | { | ||
| 43 | errno = EINVAL; | ||
| 44 | 	return EINVAL; | ||
| 45 | } | ||
| 46 | d[0] = 0; | ||
| 47 | if (!pt) | ||
| 48 | { | ||
| 49 | 	errno = EINVAL; | ||
| 50 | 	return EINVAL; | ||
| 51 | } | ||
| 52 | |||
| 53 | if ((e = _localtime32_s (&ltm, pt)) != 0) | ||
| 54 | return e; | ||
| 55 | return asctime_s (d, dn, &ltm); | ||
| 56 | } | ||
lib/libc/mingw/secapi/_ctime64_s.c deleted-56| ... | @@ -1,56 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_ctime64_s (char *, size_t, const __time64_t *); | ||
| 8 | static errno_t __cdecl _stub (char *, size_t, const __time64_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_ctime64_s))(char *, size_t, const __time64_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (char *d, size_t dn, const __time64_t *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(char *, size_t, const __time64_t *) = __MINGW_IMP_SYMBOL(_ctime64_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(char *, size_t, const __time64_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_ctime64_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_ctime64_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_ctime64_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _ctime64_s (char *d, size_t dn, const __time64_t *pt) | ||
| 31 | { | ||
| 32 | return _stub (d, dn, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_ctime64_s (char *d, size_t dn, const __time64_t *pt) | ||
| 37 | { | ||
| 38 | struct tm ltm; | ||
| 39 | errno_t e; | ||
| 40 | |||
| 41 | if (!d || !dn) | ||
| 42 | { | ||
| 43 | errno = EINVAL; | ||
| 44 | 	return EINVAL; | ||
| 45 | } | ||
| 46 | d[0] = 0; | ||
| 47 | if (!pt) | ||
| 48 | { | ||
| 49 | 	errno = EINVAL; | ||
| 50 | 	return EINVAL; | ||
| 51 | } | ||
| 52 | |||
| 53 | if ((e = _localtime64_s (&ltm, pt)) != 0) | ||
| 54 | return e; | ||
| 55 | return asctime_s (d, dn, &ltm); | ||
| 56 | } | ||
lib/libc/mingw/secapi/_cwprintf_s.c deleted-20| ... | @@ -1,20 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/conio_s.h> | ||
| 6 | |||
| 7 | int __cdecl (*__MINGW_IMP_SYMBOL(_cwprintf_s))(const wchar_t *,...) = | ||
| 8 | _cwprintf_s; | ||
| 9 | |||
| 10 | int __cdecl | ||
| 11 | _cwprintf_s (const wchar_t *s, ...) | ||
| 12 | { | ||
| 13 | va_list argp; | ||
| 14 | int r; | ||
| 15 | |||
| 16 | va_start (argp, s); | ||
| 17 | r = _vcwprintf_s (s, argp); | ||
| 18 | va_end (argp); | ||
| 19 | return r; | ||
| 20 | } | ||
lib/libc/mingw/secapi/_cwprintf_s_l.c deleted-20| ... | @@ -1,20 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/conio_s.h> | ||
| 6 | |||
| 7 | int __cdecl (*__MINGW_IMP_SYMBOL(_cwprintf_s_l))(const wchar_t *, _locale_t, ...) = | ||
| 8 | _cwprintf_s_l; | ||
| 9 | |||
| 10 | int __cdecl | ||
| 11 | _cwprintf_s_l (const wchar_t *s, _locale_t loc, ...) | ||
| 12 | { | ||
| 13 | va_list argp; | ||
| 14 | int r; | ||
| 15 | |||
| 16 | va_start (argp, loc); | ||
| 17 | r = _vcwprintf_s_l (s, loc, argp); | ||
| 18 | va_end (argp); | ||
| 19 | return r; | ||
| 20 | } | ||
lib/libc/mingw/secapi/_gmtime32_s.c deleted-51| ... | @@ -1,51 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_gmtime32_s (struct tm *, const __time32_t *); | ||
| 8 | static errno_t __cdecl _stub (struct tm *, const __time32_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_gmtime32_s))(struct tm *, const __time32_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (struct tm *ptm, const __time32_t *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(struct tm *, const __time32_t *) = __MINGW_IMP_SYMBOL(_gmtime32_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(struct tm *, const __time32_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_gmtime32_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_gmtime32_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_gmtime32_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(ptm, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _gmtime32_s (struct tm *ptm, const __time32_t *pt) | ||
| 31 | { | ||
| 32 | return _stub (ptm, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_gmtime32_s (struct tm *ptm, const __time32_t *pt) | ||
| 37 | { | ||
| 38 | struct tm *ltm; | ||
| 39 | |||
| 40 | if (ptm) | ||
| 41 | memset (ptm, 0xff, sizeof (*ptm)); | ||
| 42 | if (!ptm || !pt) | ||
| 43 | { | ||
| 44 | errno = EINVAL; | ||
| 45 | 	return EINVAL; | ||
| 46 | } | ||
| 47 | if ((ltm = _gmtime32 (pt)) == NULL) | ||
| 48 | return errno; | ||
| 49 | *ptm = *ltm; | ||
| 50 | return 0; | ||
| 51 | } | ||
lib/libc/mingw/secapi/_gmtime64_s.c deleted-51| ... | @@ -1,51 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_gmtime64_s (struct tm *, const __time64_t *); | ||
| 8 | static errno_t __cdecl _stub (struct tm *, const __time64_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_gmtime64_s))(struct tm *, const __time64_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (struct tm *ptm, const __time64_t *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(struct tm *, const __time64_t *) = __MINGW_IMP_SYMBOL(_gmtime64_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(struct tm *, const __time64_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_gmtime64_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_gmtime64_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_gmtime64_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(ptm, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _gmtime64_s (struct tm *ptm, const __time64_t *pt) | ||
| 31 | { | ||
| 32 | return _stub (ptm, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_gmtime64_s (struct tm *ptm, const __time64_t *pt) | ||
| 37 | { | ||
| 38 | struct tm *ltm; | ||
| 39 | |||
| 40 | if (ptm) | ||
| 41 | memset (ptm, 0xff, sizeof (*ptm)); | ||
| 42 | if (!ptm || !pt) | ||
| 43 | { | ||
| 44 | errno = EINVAL; | ||
| 45 | 	return EINVAL; | ||
| 46 | } | ||
| 47 | if ((ltm = _gmtime64 (pt)) == NULL) | ||
| 48 | return errno; | ||
| 49 | *ptm = *ltm; | ||
| 50 | return 0; | ||
| 51 | } | ||
lib/libc/mingw/secapi/_localtime32_s.c deleted-51| ... | @@ -1,51 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_localtime32_s (struct tm *, const __time32_t *); | ||
| 8 | static errno_t __cdecl _stub (struct tm *, const __time32_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_localtime32_s))(struct tm *, const __time32_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (struct tm *ptm, const __time32_t *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(struct tm *, const __time32_t *) = __MINGW_IMP_SYMBOL(_localtime32_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(struct tm *, const __time32_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_localtime32_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_localtime32_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_localtime32_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(ptm, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _localtime32_s (struct tm *ptm, const __time32_t *pt) | ||
| 31 | { | ||
| 32 | return _stub (ptm, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_localtime32_s (struct tm *ptm, const __time32_t *pt) | ||
| 37 | { | ||
| 38 | struct tm *ltm; | ||
| 39 | |||
| 40 | if (ptm) | ||
| 41 | memset (ptm, 0xff, sizeof (*ptm)); | ||
| 42 | if (!ptm || !pt) | ||
| 43 | { | ||
| 44 | errno = EINVAL; | ||
| 45 | 	return EINVAL; | ||
| 46 | } | ||
| 47 | if ((ltm = _localtime32 (pt)) == NULL) | ||
| 48 | return errno; | ||
| 49 | *ptm = *ltm; | ||
| 50 | return 0; | ||
| 51 | } | ||
lib/libc/mingw/secapi/_localtime64_s.c deleted-51| ... | @@ -1,51 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_localtime64_s (struct tm *, const __time64_t *); | ||
| 8 | static errno_t __cdecl _stub (struct tm *, const __time64_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_localtime64_s))(struct tm *, const __time64_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (struct tm *ptm, const __time64_t *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(struct tm *, const __time64_t *) = __MINGW_IMP_SYMBOL(_localtime64_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(struct tm *, const __time64_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_localtime64_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_localtime64_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_localtime64_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(ptm, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _localtime64_s (struct tm *ptm, const __time64_t *pt) | ||
| 31 | { | ||
| 32 | return _stub (ptm, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_localtime64_s (struct tm *ptm, const __time64_t *pt) | ||
| 37 | { | ||
| 38 | struct tm *ltm; | ||
| 39 | |||
| 40 | if (ptm) | ||
| 41 | memset (ptm, 0xff, sizeof (*ptm)); | ||
| 42 | if (!ptm || !pt) | ||
| 43 | { | ||
| 44 | errno = EINVAL; | ||
| 45 | 	return EINVAL; | ||
| 46 | } | ||
| 47 | if ((ltm = _localtime64 (pt)) == NULL) | ||
| 48 | return errno; | ||
| 49 | *ptm = *ltm; | ||
| 50 | return 0; | ||
| 51 | } | ||
lib/libc/mingw/secapi/_mktemp_s.c deleted-54| ... | @@ -1,54 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <io.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_mktemp_s (char *, size_t); | ||
| 8 | static errno_t __cdecl _stub (char *, size_t); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_mktemp_s))(char *, size_t) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (char *d, size_t dn) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(char *, size_t) = __MINGW_IMP_SYMBOL(_mktemp_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(char *, size_t)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_mktemp_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_mktemp_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_mktemp_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _mktemp_s (char *d, size_t dn) | ||
| 31 | { | ||
| 32 | return _stub (d, dn); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_mktemp_s (char *d, size_t dn) | ||
| 37 | { | ||
| 38 | size_t sz; | ||
| 39 | if (!d || !dn) | ||
| 40 | { | ||
| 41 | _mktemp (NULL); | ||
| 42 | return EINVAL; | ||
| 43 | } | ||
| 44 | sz = strnlen (d, dn); | ||
| 45 | if (sz >= dn || sz < 6) | ||
| 46 | { | ||
| 47 | d[0] = 0; | ||
| 48 | _mktemp (NULL); | ||
| 49 | return EINVAL; | ||
| 50 | } | ||
| 51 | if (_mktemp (d) != NULL) | ||
| 52 | return 0; | ||
| 53 | return errno; | ||
| 54 | } | ||
lib/libc/mingw/secapi/_sopen_s.c deleted-42| ... | @@ -1,42 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <io.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | |||
| 6 | static errno_t __cdecl _int_sopen_s(int *, const char *, int, int, int); | ||
| 7 | static errno_t __cdecl _stub(int *, const char *, int, int, int); | ||
| 8 | |||
| 9 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_sopen_s))(int *, const char *, int, int, int) = _stub; | ||
| 10 | |||
| 11 | static errno_t __cdecl | ||
| 12 | _stub (int* pfh, const char *filename, int oflag, int shflag, int pmode) | ||
| 13 | { | ||
| 14 | errno_t __cdecl (*f)(int *, const char *, int, int, int) = __MINGW_IMP_SYMBOL(_sopen_s); | ||
| 15 | |||
| 16 | if (f == _stub) { | ||
| 17 | f = (errno_t __cdecl (*)(int *, const char *, int, int, int)) | ||
| 18 | GetProcAddress (__mingw_get_msvcrt_handle (), "_sopen_s"); | ||
| 19 | if (f == NULL) | ||
| 20 | f = _int_sopen_s; | ||
| 21 | __MINGW_IMP_SYMBOL(_sopen_s) = f; | ||
| 22 | } | ||
| 23 | |||
| 24 | return (*f)(pfh, filename, oflag, shflag, pmode); | ||
| 25 | } | ||
| 26 | |||
| 27 | static errno_t __cdecl _int_sopen_s(int* pfh, const char *filename, int oflag, int shflag, int pmode) | ||
| 28 | { | ||
| 29 | if (pfh == NULL || filename == NULL) { | ||
| 30 | if (pfh != NULL) *pfh = -1; | ||
| 31 | errno = EINVAL; | ||
| 32 | return EINVAL; | ||
| 33 | } | ||
| 34 | |||
| 35 | *pfh = _sopen(filename, oflag, shflag, pmode); | ||
| 36 | return errno; | ||
| 37 | } | ||
| 38 | |||
| 39 | errno_t __cdecl _sopen_s(int* pfh, const char *filename, int oflag, int shflag, int pmode) | ||
| 40 | { | ||
| 41 | return _stub (pfh, filename, oflag, shflag, pmode); | ||
| 42 | } | ||
lib/libc/mingw/secapi/_strdate_s.c deleted-68| ... | @@ -1,68 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_strdate_s (char *, size_t); | ||
| 8 | static errno_t __cdecl _stub (char *, size_t); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_strdate_s))(char *, size_t) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (char *d, size_t dn) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(char *, size_t) = __MINGW_IMP_SYMBOL(_strdate_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(char *, size_t)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_strdate_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_strdate_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_strdate_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _strdate_s (char *d, size_t dn) | ||
| 31 | { | ||
| 32 | return _stub (d, dn); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_strdate_s (char *d, size_t dn) | ||
| 37 | { | ||
| 38 | SYSTEMTIME dt; | ||
| 39 | |||
| 40 | if (!d || !dn) | ||
| 41 | { | ||
| 42 | errno = EINVAL; | ||
| 43 | return EINVAL; | ||
| 44 | } | ||
| 45 | |||
| 46 | d[0] = 0; | ||
| 47 | |||
| 48 | if (dn < 9) | ||
| 49 | { | ||
| 50 | errno = ERANGE; | ||
| 51 | return ERANGE; | ||
| 52 | } | ||
| 53 | |||
| 54 | GetLocalTime (&dt); | ||
| 55 | dt.wYear %= 100; | ||
| 56 | |||
| 57 | d[0] = (char) (dt.wMonth / 10 + '0'); | ||
| 58 | d[1] = (char) (dt.wMonth % 10 + '0'); | ||
| 59 | d[2] = '/'; | ||
| 60 | d[3] = (char) (dt.wDay / 10 + '0'); | ||
| 61 | d[4] = (char) (dt.wDay % 10 + '0'); | ||
| 62 | d[5] = '/'; | ||
| 63 | d[6] = (char) (dt.wYear / 10 + '0'); | ||
| 64 | d[7] = (char) (dt.wYear % 10 + '0'); | ||
| 65 | d[8] = 0; | ||
| 66 | |||
| 67 | return 0; | ||
| 68 | } | ||
lib/libc/mingw/secapi/_strtime_s.c deleted-72| ... | @@ -1,72 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_strtime_s (char *, size_t); | ||
| 8 | static errno_t __cdecl _stub (char *, size_t); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_strtime_s))(char *, size_t) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (char *d, size_t dn) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(char *, size_t) = __MINGW_IMP_SYMBOL(_strtime_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(char *, size_t)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_strtime_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_strtime_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_strtime_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _strtime_s (char *d, size_t dn) | ||
| 31 | { | ||
| 32 | return _stub (d, dn); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_strtime_s (char *d, size_t dn) | ||
| 37 | { | ||
| 38 | SYSTEMTIME dt; | ||
| 39 | int hours, minutes, seconds; | ||
| 40 | |||
| 41 | if (!d || !dn) | ||
| 42 | { | ||
| 43 | errno = EINVAL; | ||
| 44 | return EINVAL; | ||
| 45 | } | ||
| 46 | |||
| 47 | d[0] = 0; | ||
| 48 | |||
| 49 | if (dn < 9) | ||
| 50 | { | ||
| 51 | errno = ERANGE; | ||
| 52 | return ERANGE; | ||
| 53 | } | ||
| 54 | |||
| 55 | GetLocalTime (&dt); | ||
| 56 | dt.wYear %= 100; | ||
| 57 | |||
| 58 | hours = dt.wHour; | ||
| 59 | minutes = dt.wMinute; | ||
| 60 | seconds = dt.wSecond; | ||
| 61 | |||
| 62 | d[2] = d[5] = ':'; | ||
| 63 | d[0] = (char) (hours / 10 + '0'); | ||
| 64 | d[1] = (char) (hours % 10 + '0'); | ||
| 65 | d[3] = (char) (minutes / 10 + '0'); | ||
| 66 | d[4] = (char) (minutes % 10 + '0'); | ||
| 67 | d[6] = (char) (seconds / 10 + '0'); | ||
| 68 | d[7] = (char) (seconds % 10 + '0'); | ||
| 69 | d[8] = 0; | ||
| 70 | |||
| 71 | return 0; | ||
| 72 | } | ||
lib/libc/mingw/secapi/_umask_s.c deleted-45| ... | @@ -1,45 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <io.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_umask_s (int, int *); | ||
| 8 | static errno_t __cdecl _stub (int, int *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_umask_s))(int, int *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (int m, int *pold) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(int, int *) = __MINGW_IMP_SYMBOL(_umask_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(int, int *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_umask_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_umask_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_umask_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(m, pold); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _umask_s (int m, int *pold) | ||
| 31 | { | ||
| 32 | return _stub (m, pold); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_umask_s (int m, int *pold) | ||
| 37 | { | ||
| 38 | if (!pold) | ||
| 39 | { | ||
| 40 | errno = EINVAL; | ||
| 41 | 	return EINVAL; | ||
| 42 | } | ||
| 43 | *pold = _umask (m); | ||
| 44 | return 0; | ||
| 45 | } | ||
lib/libc/mingw/secapi/_vcprintf_s.c deleted-39| ... | @@ -1,39 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/conio_s.h> | ||
| 6 | |||
| 7 | static int __cdecl _int_vcprintf_s (const char *, va_list); | ||
| 8 | static int __cdecl _stub (const char *, va_list); | ||
| 9 | |||
| 10 | int __cdecl (*__MINGW_IMP_SYMBOL(_vcprintf_s))(const char *, va_list) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static int __cdecl | ||
| 14 | _stub (const char *s, va_list argp) | ||
| 15 | { | ||
| 16 | int __cdecl (*f)(const char *, va_list) = __MINGW_IMP_SYMBOL(_vcprintf_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (int __cdecl (*)(const char *, va_list)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_vcprintf_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_vcprintf_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_vcprintf_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(s, argp); | ||
| 27 | } | ||
| 28 | |||
| 29 | int __cdecl | ||
| 30 | _vcprintf_s (const char *s, va_list argp) | ||
| 31 | { | ||
| 32 | return _stub (s, argp); | ||
| 33 | } | ||
| 34 | |||
| 35 | static int __cdecl | ||
| 36 | _int_vcprintf_s (const char *s, va_list argp) | ||
| 37 | { | ||
| 38 | return _vcprintf (s, argp); | ||
| 39 | } | ||
lib/libc/mingw/secapi/_vcprintf_s_l.c deleted-39| ... | @@ -1,39 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/conio_s.h> | ||
| 6 | |||
| 7 | static int __cdecl _int_vcprintf_s_l (const char *, _locale_t, va_list); | ||
| 8 | static int __cdecl _stub (const char *, _locale_t, va_list); | ||
| 9 | |||
| 10 | int __cdecl (*__MINGW_IMP_SYMBOL(_vcprintf_s_l))(const char *, _locale_t, va_list) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static int __cdecl | ||
| 14 | _stub (const char *s, _locale_t loc, va_list argp) | ||
| 15 | { | ||
| 16 | int __cdecl (*f)(const char *, _locale_t, va_list) = __MINGW_IMP_SYMBOL(_vcprintf_s_l); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (int __cdecl (*)(const char *, _locale_t, va_list)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_vcprintf_s_l"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_vcprintf_s_l; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_vcprintf_s_l) = f; | ||
| 25 | } | ||
| 26 | return (*f)(s, loc, argp); | ||
| 27 | } | ||
| 28 | |||
| 29 | int __cdecl | ||
| 30 | _vcprintf_s_l (const char *s, _locale_t loc, va_list argp) | ||
| 31 | { | ||
| 32 | return _stub (s, loc, argp); | ||
| 33 | } | ||
| 34 | |||
| 35 | static int __cdecl | ||
| 36 | _int_vcprintf_s_l (const char *s, _locale_t loc, va_list argp) | ||
| 37 | { | ||
| 38 | return _vcprintf_l (s, loc, argp); | ||
| 39 | } | ||
lib/libc/mingw/secapi/_vcwprintf_s.c deleted-39| ... | @@ -1,39 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/wchar_s.h> | ||
| 6 | |||
| 7 | static int __cdecl _int_vcwprintf_s (const wchar_t *, va_list); | ||
| 8 | static int __cdecl _stub (const wchar_t *, va_list); | ||
| 9 | |||
| 10 | int __cdecl (*__MINGW_IMP_SYMBOL(_vcwprintf_s))(const wchar_t *, va_list) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static int __cdecl | ||
| 14 | _stub (const wchar_t *s, va_list argp) | ||
| 15 | { | ||
| 16 | int __cdecl (*f)(const wchar_t *, va_list) = __MINGW_IMP_SYMBOL(_vcwprintf_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (int __cdecl (*)(const wchar_t *, va_list)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_vcwprintf_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_vcwprintf_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_vcwprintf_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(s, argp); | ||
| 27 | } | ||
| 28 | |||
| 29 | int __cdecl | ||
| 30 | _vcwprintf_s (const wchar_t *s, va_list argp) | ||
| 31 | { | ||
| 32 | return _stub (s, argp); | ||
| 33 | } | ||
| 34 | |||
| 35 | static int __cdecl | ||
| 36 | _int_vcwprintf_s (const wchar_t *s, va_list argp) | ||
| 37 | { | ||
| 38 | return _vcwprintf (s, argp); | ||
| 39 | } | ||
lib/libc/mingw/secapi/_vcwprintf_s_l.c deleted-39| ... | @@ -1,39 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/wchar_s.h> | ||
| 6 | |||
| 7 | static int __cdecl _int_vcwprintf_s_l (const wchar_t *, _locale_t, va_list); | ||
| 8 | static int __cdecl _stub (const wchar_t *, _locale_t, va_list); | ||
| 9 | |||
| 10 | int __cdecl (*__MINGW_IMP_SYMBOL(_vcwprintf_s_l))(const wchar_t *, _locale_t, va_list) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static int __cdecl | ||
| 14 | _stub (const wchar_t *s, _locale_t loc, va_list argp) | ||
| 15 | { | ||
| 16 | int __cdecl (*f)(const wchar_t *, _locale_t, va_list) = __MINGW_IMP_SYMBOL(_vcwprintf_s_l); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (int __cdecl (*)(const wchar_t *, _locale_t, va_list)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_vcwprintf_s_l"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_vcwprintf_s_l; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_vcwprintf_s_l) = f; | ||
| 25 | } | ||
| 26 | return (*f)(s, loc, argp); | ||
| 27 | } | ||
| 28 | |||
| 29 | int __cdecl | ||
| 30 | _vcwprintf_s_l (const wchar_t *s, _locale_t loc, va_list argp) | ||
| 31 | { | ||
| 32 | return _stub (s, loc, argp); | ||
| 33 | } | ||
| 34 | |||
| 35 | static int __cdecl | ||
| 36 | _int_vcwprintf_s_l (const wchar_t *s, _locale_t loc, va_list argp) | ||
| 37 | { | ||
| 38 | return _vcwprintf_l (s, loc, argp); | ||
| 39 | } | ||
lib/libc/mingw/secapi/_vscprintf_p.c deleted-8| ... | @@ -1,8 +0,0 @@ | ||
| 1 | #include <sec_api/stdio_s.h> | ||
| 2 | |||
| 3 | int __cdecl _vscprintf_p(const char *format, va_list arglist) | ||
| 4 | { | ||
| 5 | return _vscprintf_p_l(format, NULL, arglist); | ||
| 6 | } | ||
| 7 | |||
| 8 | int __cdecl (*__MINGW_IMP_SYMBOL(_vscprintf_p))(const char *, va_list) = _vscprintf_p; | ||
lib/libc/mingw/secapi/_vscwprintf_p.c deleted-8| ... | @@ -1,8 +0,0 @@ | ||
| 1 | #include <sec_api/stdio_s.h> | ||
| 2 | |||
| 3 | int __cdecl _vscwprintf_p(const wchar_t *format, va_list arglist) | ||
| 4 | { | ||
| 5 | return _vscwprintf_p_l(format, NULL, arglist); | ||
| 6 | } | ||
| 7 | |||
| 8 | int __cdecl (*__MINGW_IMP_SYMBOL(_vscwprintf_p))(const wchar_t *, va_list) = _vscwprintf_p; | ||
lib/libc/mingw/secapi/_vswprintf_p.c deleted-8| ... | @@ -1,8 +0,0 @@ | ||
| 1 | #include <sec_api/stdio_s.h> | ||
| 2 | |||
| 3 | int __cdecl _vswprintf_p(wchar_t *_DstBuf, size_t _MaxCount, const wchar_t *_Format, va_list _ArgList) | ||
| 4 | { | ||
| 5 | return _vswprintf_p_l(_DstBuf, _MaxCount, _Format, NULL, _ArgList); | ||
| 6 | } | ||
| 7 | |||
| 8 | int __cdecl (*__MINGW_IMP_SYMBOL(_vswprintf_p))(wchar_t*,size_t,const wchar_t*,va_list) = _vswprintf_p; | ||
lib/libc/mingw/secapi/_waccess_s.c deleted-46| ... | @@ -1,46 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/wchar_s.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_waccess_s (const wchar_t *, int); | ||
| 8 | static errno_t __cdecl _stub (const wchar_t *, int); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_waccess_s))(const wchar_t *, int) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (const wchar_t *s, int m) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(const wchar_t *, int) = __MINGW_IMP_SYMBOL(_waccess_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(const wchar_t *, int)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_waccess_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_waccess_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_waccess_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(s, m); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _waccess_s (const wchar_t *s, int m) | ||
| 31 | { | ||
| 32 | return _stub (s, m); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_waccess_s (const wchar_t *s, int m) | ||
| 37 | { | ||
| 38 | if (!s || (m & ~6) != 0) | ||
| 39 | { | ||
| 40 | _waccess (NULL, m); | ||
| 41 | return EINVAL; | ||
| 42 | } | ||
| 43 | if (!_waccess (s, m)) | ||
| 44 | return 0; | ||
| 45 | return errno; | ||
| 46 | } | ||
lib/libc/mingw/secapi/_wasctime_s.c deleted-52| ... | @@ -1,52 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_wasctime_s (wchar_t *, size_t, const struct tm *); | ||
| 8 | static errno_t __cdecl _stub (wchar_t *, size_t, const struct tm *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_wasctime_s))(wchar_t *, size_t, const struct tm *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (wchar_t *d, size_t dn, const struct tm *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(wchar_t *, size_t, const struct tm *) = __MINGW_IMP_SYMBOL(_wasctime_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(wchar_t *, size_t, const struct tm *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_wasctime_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_wasctime_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_wasctime_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _wasctime_s (wchar_t *d, size_t dn, const struct tm *pt) | ||
| 31 | { | ||
| 32 | return _stub (d, dn, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_wasctime_s (wchar_t *d, size_t dn, const struct tm *pt) | ||
| 37 | { | ||
| 38 | wchar_t *tmp; | ||
| 39 | size_t i; | ||
| 40 | |||
| 41 | if (d && dn) | ||
| 42 | d[0] = 0; | ||
| 43 | if (!d || dn < 26 || !pt || (tmp = _wasctime (pt)) == NULL) | ||
| 44 | { | ||
| 45 | errno = EINVAL; | ||
| 46 | 	return EINVAL; | ||
| 47 | } | ||
| 48 | for (i = 0; tmp[i] != 0; i++) | ||
| 49 | d[i] = tmp[i]; | ||
| 50 | d[i] = 0; | ||
| 51 | return 0; | ||
| 52 | } | ||
lib/libc/mingw/secapi/_wctime32_s.c deleted-56| ... | @@ -1,56 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_wctime32_s (wchar_t *, size_t, const __time32_t *); | ||
| 8 | static errno_t __cdecl _stub (wchar_t *, size_t, const __time32_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_wctime32_s))(wchar_t *, size_t, const __time32_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (wchar_t *d, size_t dn, const __time32_t *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(wchar_t*,size_t, const __time32_t *) = __MINGW_IMP_SYMBOL(_wctime32_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(wchar_t *, size_t, const __time32_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_wctime32_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_wctime32_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_wctime32_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _wctime32_s (wchar_t *d, size_t dn, const __time32_t *pt) | ||
| 31 | { | ||
| 32 | return _stub (d, dn, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_wctime32_s (wchar_t *d, size_t dn, const __time32_t *pt) | ||
| 37 | { | ||
| 38 | struct tm ltm; | ||
| 39 | errno_t e; | ||
| 40 | |||
| 41 | if (!d || !dn) | ||
| 42 | { | ||
| 43 | errno = EINVAL; | ||
| 44 | 	return EINVAL; | ||
| 45 | } | ||
| 46 | d[0] = 0; | ||
| 47 | if (!pt) | ||
| 48 | { | ||
| 49 | 	errno = EINVAL; | ||
| 50 | 	return EINVAL; | ||
| 51 | } | ||
| 52 | |||
| 53 | if ((e = _localtime32_s (&ltm, pt)) != 0) | ||
| 54 | return e; | ||
| 55 | return _wasctime_s (d, dn, &ltm); | ||
| 56 | } | ||
lib/libc/mingw/secapi/_wctime64_s.c deleted-56| ... | @@ -1,56 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_wctime64_s (wchar_t *, size_t, const __time64_t *); | ||
| 8 | static errno_t __cdecl _stub (wchar_t *, size_t, const __time64_t *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_wctime64_s))(wchar_t *, size_t, const __time64_t *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (wchar_t *d, size_t dn, const __time64_t *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(wchar_t*,size_t, const __time64_t *) = __MINGW_IMP_SYMBOL(_wctime64_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(wchar_t *, size_t, const __time64_t *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_wctime64_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_wctime64_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_wctime64_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _wctime64_s (wchar_t *d, size_t dn, const __time64_t *pt) | ||
| 31 | { | ||
| 32 | return _stub (d, dn, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_wctime64_s (wchar_t *d, size_t dn, const __time64_t *pt) | ||
| 37 | { | ||
| 38 | struct tm ltm; | ||
| 39 | errno_t e; | ||
| 40 | |||
| 41 | if (!d || !dn) | ||
| 42 | { | ||
| 43 | errno = EINVAL; | ||
| 44 | 	return EINVAL; | ||
| 45 | } | ||
| 46 | d[0] = 0; | ||
| 47 | if (!pt) | ||
| 48 | { | ||
| 49 | 	errno = EINVAL; | ||
| 50 | 	return EINVAL; | ||
| 51 | } | ||
| 52 | |||
| 53 | if ((e = _localtime64_s (&ltm, pt)) != 0) | ||
| 54 | return e; | ||
| 55 | return _wasctime_s (d, dn, &ltm); | ||
| 56 | } | ||
lib/libc/mingw/secapi/_wmktemp_s.c deleted-54| ... | @@ -1,54 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/wchar_s.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_wmktemp_s (wchar_t *, size_t); | ||
| 8 | static errno_t __cdecl _stub (wchar_t *, size_t); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_wmktemp_s))(wchar_t *, size_t) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (wchar_t *d, size_t dn) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(wchar_t *, size_t) = __MINGW_IMP_SYMBOL(_wmktemp_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(wchar_t *, size_t)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_wmktemp_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_wmktemp_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_wmktemp_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _wmktemp_s (wchar_t *d, size_t dn) | ||
| 31 | { | ||
| 32 | return _stub (d, dn); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_wmktemp_s (wchar_t *d, size_t dn) | ||
| 37 | { | ||
| 38 | size_t sz; | ||
| 39 | if (!d || !dn) | ||
| 40 | { | ||
| 41 | _wmktemp (NULL); | ||
| 42 | return EINVAL; | ||
| 43 | } | ||
| 44 | sz = wcsnlen (d, dn); | ||
| 45 | if (sz >= dn || sz < 6) | ||
| 46 | { | ||
| 47 | d[0] = 0; | ||
| 48 | _wmktemp (NULL); | ||
| 49 | return EINVAL; | ||
| 50 | } | ||
| 51 | if (_wmktemp (d) != NULL) | ||
| 52 | return 0; | ||
| 53 | return errno; | ||
| 54 | } | ||
lib/libc/mingw/secapi/_wstrdate_s.c deleted-68| ... | @@ -1,68 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_wstrdate_s (wchar_t *, size_t); | ||
| 8 | static errno_t __cdecl _stub (wchar_t *, size_t); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_wstrdate_s))(wchar_t *, size_t) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (wchar_t *d, size_t dn) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(wchar_t *, size_t) = __MINGW_IMP_SYMBOL(_wstrdate_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(wchar_t *, size_t)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_wstrdate_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_wstrdate_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_wstrdate_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _wstrdate_s (wchar_t *d, size_t dn) | ||
| 31 | { | ||
| 32 | return _stub (d, dn); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_wstrdate_s (wchar_t *d, size_t dn) | ||
| 37 | { | ||
| 38 | SYSTEMTIME dt; | ||
| 39 | |||
| 40 | if (!d || !dn) | ||
| 41 | { | ||
| 42 | errno = EINVAL; | ||
| 43 | return EINVAL; | ||
| 44 | } | ||
| 45 | |||
| 46 | d[0] = 0; | ||
| 47 | |||
| 48 | if (dn < 9) | ||
| 49 | { | ||
| 50 | errno = ERANGE; | ||
| 51 | return ERANGE; | ||
| 52 | } | ||
| 53 | |||
| 54 | GetLocalTime (&dt); | ||
| 55 | dt.wYear %= 100; | ||
| 56 | |||
| 57 | d[0] = (wchar_t) (dt.wMonth / 10 + '0'); | ||
| 58 | d[1] = (wchar_t) (dt.wMonth % 10 + '0'); | ||
| 59 | d[2] = '/'; | ||
| 60 | d[3] = (wchar_t) (dt.wDay / 10 + '0'); | ||
| 61 | d[4] = (wchar_t) (dt.wDay % 10 + '0'); | ||
| 62 | d[5] = '/'; | ||
| 63 | d[6] = (wchar_t) (dt.wYear / 10 + '0'); | ||
| 64 | d[7] = (wchar_t) (dt.wYear % 10 + '0'); | ||
| 65 | d[8] = 0; | ||
| 66 | |||
| 67 | return 0; | ||
| 68 | } | ||
lib/libc/mingw/secapi/_wstrtime_s.c deleted-71| ... | @@ -1,71 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_wstrtime_s (wchar_t *, size_t); | ||
| 8 | static errno_t __cdecl _stub (wchar_t *, size_t); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(_wstrtime_s))(wchar_t *, size_t) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (wchar_t *d, size_t dn) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(wchar_t *, size_t) = __MINGW_IMP_SYMBOL(_wstrtime_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(wchar_t *, size_t)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "_wstrtime_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_wstrtime_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(_wstrtime_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | _wstrtime_s (wchar_t *d, size_t dn) | ||
| 31 | { | ||
| 32 | return _stub (d, dn); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_wstrtime_s (wchar_t *d, size_t dn) | ||
| 37 | { | ||
| 38 | SYSTEMTIME dt; | ||
| 39 | int hours, minutes, seconds; | ||
| 40 | |||
| 41 | if (!d || !dn) | ||
| 42 | { | ||
| 43 | errno = EINVAL; | ||
| 44 | return EINVAL; | ||
| 45 | } | ||
| 46 | |||
| 47 | d[0] = 0; | ||
| 48 | |||
| 49 | if (dn < 9) | ||
| 50 | { | ||
| 51 | errno = ERANGE; | ||
| 52 | return ERANGE; | ||
| 53 | } | ||
| 54 | |||
| 55 | GetLocalTime (&dt); | ||
| 56 | |||
| 57 | hours = dt.wHour; | ||
| 58 | minutes = dt.wMinute; | ||
| 59 | seconds = dt.wSecond; | ||
| 60 | |||
| 61 | d[2] = d[5] = ':'; | ||
| 62 | d[0] = (wchar_t) (hours / 10 + '0'); | ||
| 63 | d[1] = (wchar_t) (hours % 10 + '0'); | ||
| 64 | d[3] = (wchar_t) (minutes / 10 + '0'); | ||
| 65 | d[4] = (wchar_t) (minutes % 10 + '0'); | ||
| 66 | d[6] = (wchar_t) (seconds / 10 + '0'); | ||
| 67 | d[7] = (wchar_t) (seconds % 10 + '0'); | ||
| 68 | d[8] = 0; | ||
| 69 | |||
| 70 | return 0; | ||
| 71 | } | ||
lib/libc/mingw/secapi/asctime_s.c deleted-52| ... | @@ -1,52 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <time.h> | ||
| 4 | #include <errno.h> | ||
| 5 | #include <msvcrt.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_asctime_s (char *, size_t, const struct tm *); | ||
| 8 | static errno_t __cdecl _stub (char *, size_t, const struct tm *); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(asctime_s))(char *, size_t, const struct tm *) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (char *d, size_t dn, const struct tm *pt) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(char *, size_t, const struct tm *) = __MINGW_IMP_SYMBOL(asctime_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(char *, size_t, const struct tm *)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "asctime_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_asctime_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(asctime_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn, pt); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | asctime_s (char *d, size_t dn, const struct tm *pt) | ||
| 31 | { | ||
| 32 | return _stub (d, dn, pt); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_asctime_s (char *d, size_t dn, const struct tm *pt) | ||
| 37 | { | ||
| 38 | char *tmp; | ||
| 39 | size_t i; | ||
| 40 | |||
| 41 | if (d && dn) | ||
| 42 | d[0] = 0; | ||
| 43 | if (!d || dn < 26 || !pt || (tmp = asctime (pt)) == NULL) | ||
| 44 | { | ||
| 45 | errno = EINVAL; | ||
| 46 | 	return EINVAL; | ||
| 47 | } | ||
| 48 | for (i = 0; tmp[i] != 0; i++) | ||
| 49 | d[i] = tmp[i]; | ||
| 50 | d[i] = 0; | ||
| 51 | return 0; | ||
| 52 | } | ||
lib/libc/mingw/secapi/memcpy_s.c deleted-59| ... | @@ -1,59 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | |||
| 6 | static errno_t __cdecl _int_memcpy_s (void *, size_t, const void *, size_t); | ||
| 7 | static errno_t __cdecl _stub (void *, size_t, const void *, size_t); | ||
| 8 | |||
| 9 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(memcpy_s))(void *, size_t, const void *, size_t) = | ||
| 10 | _stub; | ||
| 11 | |||
| 12 | static errno_t __cdecl | ||
| 13 | _stub (void *d, size_t dn, const void *s, size_t n) | ||
| 14 | { | ||
| 15 | errno_t __cdecl (*f)(void *, size_t, const void *, size_t) = __MINGW_IMP_SYMBOL(memcpy_s); | ||
| 16 | |||
| 17 | if (f == _stub) | ||
| 18 | { | ||
| 19 | 	f = (errno_t __cdecl (*)(void *, size_t, const void *, size_t)) | ||
| 20 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "memcpy_s"); | ||
| 21 | 	if (!f) | ||
| 22 | 	 f = _int_memcpy_s; | ||
| 23 | 	__MINGW_IMP_SYMBOL(memcpy_s) = f; | ||
| 24 | } | ||
| 25 | return (*f)(d, dn, s, n); | ||
| 26 | } | ||
| 27 | |||
| 28 | errno_t __cdecl | ||
| 29 | memcpy_s (void *d, size_t dn, const void *s, size_t n) | ||
| 30 | { | ||
| 31 | return _stub (d, dn, s, n); | ||
| 32 | } | ||
| 33 | |||
| 34 | static errno_t __cdecl | ||
| 35 | _int_memcpy_s (void *d, size_t dn, const void *s, size_t n) | ||
| 36 | { | ||
| 37 | if (!n) | ||
| 38 | return 0; | ||
| 39 | |||
| 40 | if (!d || !s) | ||
| 41 | { | ||
| 42 | if (d) | ||
| 43 | memset (d, 0, dn); | ||
| 44 | errno = EINVAL; | ||
| 45 | return EINVAL; | ||
| 46 | } | ||
| 47 | |||
| 48 | if (dn < n) | ||
| 49 | { | ||
| 50 | memset (d, 0, dn); | ||
| 51 | |||
| 52 | errno = ERANGE; | ||
| 53 | return ERANGE; | ||
| 54 | } | ||
| 55 | |||
| 56 | memcpy (d, s, n); | ||
| 57 | |||
| 58 | return 0; | ||
| 59 | } | ||
lib/libc/mingw/secapi/memmove_s.c deleted-59| ... | @@ -1,59 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | |||
| 6 | static errno_t __cdecl _int_memmove_s (void *, size_t, const void *, size_t); | ||
| 7 | static errno_t __cdecl _stub (void *, size_t, const void *, size_t); | ||
| 8 | |||
| 9 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(memmove_s))(void *, size_t, const void *, size_t) = | ||
| 10 | _stub; | ||
| 11 | |||
| 12 | static errno_t __cdecl | ||
| 13 | _stub (void *d, size_t dn, const void *s, size_t n) | ||
| 14 | { | ||
| 15 | errno_t __cdecl (*f)(void *, size_t, const void *, size_t) = __MINGW_IMP_SYMBOL(memmove_s); | ||
| 16 | |||
| 17 | if (f == _stub) | ||
| 18 | { | ||
| 19 | 	f = (errno_t __cdecl (*)(void *, size_t, const void *, size_t)) | ||
| 20 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "memmove_s"); | ||
| 21 | 	if (!f) | ||
| 22 | 	 f = _int_memmove_s; | ||
| 23 | 	__MINGW_IMP_SYMBOL(memmove_s) = f; | ||
| 24 | } | ||
| 25 | return (*f)(d, dn, s, n); | ||
| 26 | } | ||
| 27 | |||
| 28 | errno_t __cdecl | ||
| 29 | memmove_s (void *d, size_t dn, const void *s, size_t n) | ||
| 30 | { | ||
| 31 | return _stub (d, dn, s, n); | ||
| 32 | } | ||
| 33 | |||
| 34 | static errno_t __cdecl | ||
| 35 | _int_memmove_s (void *d, size_t dn, const void *s, size_t n) | ||
| 36 | { | ||
| 37 | if (!n) | ||
| 38 | return 0; | ||
| 39 | |||
| 40 | if (!d || !s) | ||
| 41 | { | ||
| 42 | if (d) | ||
| 43 | memset (d, 0, dn); | ||
| 44 | errno = EINVAL; | ||
| 45 | return EINVAL; | ||
| 46 | } | ||
| 47 | |||
| 48 | if (dn < n) | ||
| 49 | { | ||
| 50 | memset (d, 0, dn); | ||
| 51 | |||
| 52 | errno = ERANGE; | ||
| 53 | return ERANGE; | ||
| 54 | } | ||
| 55 | |||
| 56 | memmove (d, s, n); | ||
| 57 | |||
| 58 | return 0; | ||
| 59 | } | ||
lib/libc/mingw/secapi/rand_s.c deleted-36| ... | @@ -1,36 +0,0 @@ | ||
| 1 | #define _CRT_RAND_S | ||
| 2 | #include <stdlib.h> | ||
| 3 | #include <windows.h> | ||
| 4 | #include <ntsecapi.h> | ||
| 5 | #include <errno.h> | ||
| 6 | #include <msvcrt.h> | ||
| 7 | |||
| 8 | static BOOLEAN (WINAPI *pRtlGenRandom)(void*,ULONG); | ||
| 9 | |||
| 10 | static errno_t mingw_rand_s(unsigned int *pval) | ||
| 11 | { | ||
| 12 | return !pval || !pRtlGenRandom || !pRtlGenRandom(pval, sizeof(*pval)) ? EINVAL : 0; | ||
| 13 | } | ||
| 14 | |||
| 15 | static errno_t __cdecl init_rand_s(unsigned int*); | ||
| 16 | |||
| 17 | errno_t (__cdecl *__MINGW_IMP_SYMBOL(rand_s))(unsigned int*) = init_rand_s; | ||
| 18 | |||
| 19 | errno_t __cdecl | ||
| 20 | rand_s(unsigned int *val) | ||
| 21 | { | ||
| 22 | return __MINGW_IMP_SYMBOL(rand_s)(val); | ||
| 23 | } | ||
| 24 | |||
| 25 | static errno_t __cdecl init_rand_s(unsigned int *val) | ||
| 26 | { | ||
| 27 | int (__cdecl *func)(unsigned int*); | ||
| 28 | |||
| 29 | func = (void*)GetProcAddress(__mingw_get_msvcrt_handle(), "rand_s"); | ||
| 30 | if(!func) { | ||
| 31 | func = mingw_rand_s; | ||
| 32 | pRtlGenRandom = (void*)GetProcAddress(LoadLibraryW(L"advapi32.dll"), "SystemFunction036"); | ||
| 33 | } | ||
| 34 | |||
| 35 | return (__MINGW_IMP_SYMBOL(rand_s) = func)(val); | ||
| 36 | } | ||
lib/libc/mingw/secapi/sprintf_s.c deleted-19| ... | @@ -1,19 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/stdio_s.h> | ||
| 6 | |||
| 7 | int __cdecl (*__MINGW_IMP_SYMBOL(sprintf_s))(char *, size_t, const char *,...) = sprintf_s; | ||
| 8 | |||
| 9 | int __cdecl | ||
| 10 | sprintf_s (char *_DstBuf, size_t _Size, const char *_Format, ...) | ||
| 11 | { | ||
| 12 | va_list argp; | ||
| 13 | int r; | ||
| 14 | |||
| 15 | va_start (argp, _Format); | ||
| 16 | r = vsprintf_s (_DstBuf, _Size, _Format, argp); | ||
| 17 | va_end (argp); | ||
| 18 | return r; | ||
| 19 | } | ||
lib/libc/mingw/secapi/strerror_s.c deleted-54| ... | @@ -1,54 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/stdio_s.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_strerror_s (char *, size_t, int); | ||
| 8 | static errno_t __cdecl _stub (char *, size_t, int); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(strerror_s))(char *, size_t, int) = _stub; | ||
| 11 | |||
| 12 | static errno_t __cdecl | ||
| 13 | _stub (char *buffer, size_t numberOfElements, int errnum) | ||
| 14 | { | ||
| 15 | errno_t __cdecl (*f)(char *, size_t, int) = __MINGW_IMP_SYMBOL(strerror_s); | ||
| 16 | |||
| 17 | if (f == _stub) | ||
| 18 | { | ||
| 19 | f = (errno_t __cdecl (*)(char *, size_t, int)) | ||
| 20 | GetProcAddress (__mingw_get_msvcrt_handle (), "strerror_s"); | ||
| 21 | if (!f) | ||
| 22 | { | ||
| 23 | f = _int_strerror_s; | ||
| 24 | } | ||
| 25 | __MINGW_IMP_SYMBOL(strerror_s) = f; | ||
| 26 | } | ||
| 27 | return (*f)(buffer, numberOfElements, errnum); | ||
| 28 | } | ||
| 29 | |||
| 30 | errno_t __cdecl | ||
| 31 | strerror_s (char *buffer, size_t numberOfElements, int errnum) | ||
| 32 | { | ||
| 33 | return _stub (buffer, numberOfElements, errnum); | ||
| 34 | } | ||
| 35 | |||
| 36 | static errno_t __cdecl | ||
| 37 | _int_strerror_s (char *buffer, size_t numberOfElements, int errnum) | ||
| 38 | { | ||
| 39 | char *errmsg = strerror(errnum); | ||
| 40 | |||
| 41 | if (!errmsg || !buffer || numberOfElements == 0) | ||
| 42 | { | ||
| 43 | errno = EINVAL; | ||
| 44 | return EINVAL; | ||
| 45 | } | ||
| 46 | |||
| 47 | if (sprintf_s(buffer, numberOfElements, "%s", errmsg) == -1) | ||
| 48 | { | ||
| 49 | errno = EINVAL; | ||
| 50 | return EINVAL; | ||
| 51 | } | ||
| 52 | |||
| 53 | return 0; | ||
| 54 | } | ||
lib/libc/mingw/secapi/vsprintf_s.c deleted-40| ... | @@ -1,40 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <stdio.h> | ||
| 6 | #include <sec_api/stdio_s.h> | ||
| 7 | |||
| 8 | static int __cdecl _int_vsprintf_s (char *, size_t, const char *, va_list); | ||
| 9 | static int __cdecl _stub (char *, size_t, const char *, va_list); | ||
| 10 | |||
| 11 | int __cdecl (*__MINGW_IMP_SYMBOL(vsprintf_s))(char *, size_t, const char *, va_list) = | ||
| 12 | _stub; | ||
| 13 | |||
| 14 | static int __cdecl | ||
| 15 | _stub (char *_DstBuf, size_t _Size, const char *_Format, va_list _ArgList) | ||
| 16 | { | ||
| 17 | int __cdecl (*f)(char *, size_t, const char *, va_list) = __MINGW_IMP_SYMBOL(vsprintf_s); | ||
| 18 | |||
| 19 | if (f == _stub) | ||
| 20 | { | ||
| 21 | 	f = (int __cdecl (*)(char *, size_t, const char *, va_list)) | ||
| 22 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "vsprintf_s"); | ||
| 23 | 	if (!f) | ||
| 24 | 	 f = _int_vsprintf_s; | ||
| 25 | 	__MINGW_IMP_SYMBOL(vsprintf_s) = f; | ||
| 26 | } | ||
| 27 | return (*f)(_DstBuf, _Size, _Format, _ArgList); | ||
| 28 | } | ||
| 29 | |||
| 30 | int __cdecl | ||
| 31 | vsprintf_s (char *_DstBuf, size_t _Size, const char *_Format, va_list _ArgList) | ||
| 32 | { | ||
| 33 | return _stub (_DstBuf, _Size, _Format, _ArgList); | ||
| 34 | } | ||
| 35 | |||
| 36 | static int __cdecl | ||
| 37 | _int_vsprintf_s (char *_DstBuf, size_t _Size, const char *_Format, va_list _ArgList) | ||
| 38 | { | ||
| 39 | return __ms_vsnprintf (_DstBuf, _Size, _Format, _ArgList); | ||
| 40 | } | ||
lib/libc/mingw/secapi/wmemcpy_s.c deleted-60| ... | @@ -1,60 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/wchar_s.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_wmemcpy_s (wchar_t *, size_t, const wchar_t *, size_t); | ||
| 8 | static errno_t __cdecl _stub (wchar_t *, size_t, const wchar_t *, size_t); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(wmemcpy_s))(wchar_t *, size_t, const wchar_t *, size_t) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (wchar_t *d, size_t dn, const wchar_t *s, size_t n) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(wchar_t *, size_t, const wchar_t *, size_t) = __MINGW_IMP_SYMBOL(wmemcpy_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | 	f = (errno_t __cdecl (*)(wchar_t *, size_t, const wchar_t *, size_t)) | ||
| 21 | 	 GetProcAddress (__mingw_get_msvcrt_handle (), "wmemcpy_s"); | ||
| 22 | 	if (!f) | ||
| 23 | 	 f = _int_wmemcpy_s; | ||
| 24 | 	__MINGW_IMP_SYMBOL(wmemcpy_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn, s, n); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | wmemcpy_s (wchar_t *d, size_t dn, const wchar_t *s, size_t n) | ||
| 31 | { | ||
| 32 | return _stub (d, dn, s, n); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_wmemcpy_s (wchar_t *d, size_t dn, const wchar_t *s, size_t n) | ||
| 37 | { | ||
| 38 | if (!n) | ||
| 39 | return 0; | ||
| 40 | |||
| 41 | if (!d || !s) | ||
| 42 | { | ||
| 43 | if (d) | ||
| 44 | memset (d, 0, dn * sizeof (wchar_t)); | ||
| 45 | errno = EINVAL; | ||
| 46 | return EINVAL; | ||
| 47 | } | ||
| 48 | |||
| 49 | if (dn < n) | ||
| 50 | { | ||
| 51 | memset (d, 0, dn * sizeof (wchar_t)); | ||
| 52 | |||
| 53 | errno = ERANGE; | ||
| 54 | return ERANGE; | ||
| 55 | } | ||
| 56 | |||
| 57 | memcpy (d, s, n * sizeof (wchar_t)); | ||
| 58 | |||
| 59 | return 0; | ||
| 60 | } | ||
lib/libc/mingw/secapi/wmemmove_s.c deleted-60| ... | @@ -1,60 +0,0 @@ | ||
| 1 | #include <windows.h> | ||
| 2 | #include <malloc.h> | ||
| 3 | #include <errno.h> | ||
| 4 | #include <msvcrt.h> | ||
| 5 | #include <sec_api/wchar_s.h> | ||
| 6 | |||
| 7 | static errno_t __cdecl _int_wmemmove_s (wchar_t *, size_t, const wchar_t*, size_t); | ||
| 8 | static errno_t __cdecl _stub (wchar_t *, size_t, const wchar_t *, size_t); | ||
| 9 | |||
| 10 | errno_t __cdecl (*__MINGW_IMP_SYMBOL(wmemmove_s))(wchar_t *, size_t, const wchar_t *, size_t) = | ||
| 11 | _stub; | ||
| 12 | |||
| 13 | static errno_t __cdecl | ||
| 14 | _stub (wchar_t *d, size_t dn, const wchar_t *s, size_t n) | ||
| 15 | { | ||
| 16 | errno_t __cdecl (*f)(wchar_t *, size_t, const wchar_t *, size_t) = __MINGW_IMP_SYMBOL(wmemmove_s); | ||
| 17 | |||
| 18 | if (f == _stub) | ||
| 19 | { | ||
| 20 | f = (errno_t __cdecl (*)(wchar_t *, size_t, const wchar_t *, size_t)) | ||
| 21 | GetProcAddress (__mingw_get_msvcrt_handle (), "wmemmove_s"); | ||
| 22 | if (!f) | ||
| 23 | f = _int_wmemmove_s; | ||
| 24 | __MINGW_IMP_SYMBOL(wmemmove_s) = f; | ||
| 25 | } | ||
| 26 | return (*f)(d, dn, s, n); | ||
| 27 | } | ||
| 28 | |||
| 29 | errno_t __cdecl | ||
| 30 | wmemmove_s (wchar_t *d, size_t dn, const wchar_t *s, size_t n) | ||
| 31 | { | ||
| 32 | return _stub (d, dn, s, n); | ||
| 33 | } | ||
| 34 | |||
| 35 | static errno_t __cdecl | ||
| 36 | _int_wmemmove_s (wchar_t *d, size_t dn, const wchar_t *s, size_t n) | ||
| 37 | { | ||
| 38 | if (!n) | ||
| 39 | return 0; | ||
| 40 | |||
| 41 | if (!d || !s) | ||
| 42 | { | ||
| 43 | if (d) | ||
| 44 | memset (d, 0, dn * sizeof (wchar_t)); | ||
| 45 | errno = EINVAL; | ||
| 46 | return EINVAL; | ||
| 47 | } | ||
| 48 | |||
| 49 | if (dn < n) | ||
| 50 | { | ||
| 51 | memset (d, 0, dn * sizeof (wchar_t)); | ||
| 52 | |||
| 53 | errno = ERANGE; | ||
| 54 | return ERANGE; | ||
| 55 | } | ||
| 56 | |||
| 57 | memmove (d, s, n * sizeof (wchar_t)); | ||
| 58 | |||
| 59 | return 0; | ||
| 60 | } | ||
lib/libc/mingw/stdio/_getc_nolock.c deleted-8| ... | @@ -1,8 +0,0 @@ | ||
| 1 | #include <stdio.h> | ||
| 2 | |||
| 3 | #undef _getc_nolock | ||
| 4 | int __cdecl _getc_nolock(FILE *stream); | ||
| 5 | int __cdecl _getc_nolock(FILE *stream) | ||
| 6 | { | ||
| 7 | return _fgetc_nolock(stream); | ||
| 8 | } | ||
lib/libc/mingw/stdio/_getwc_nolock.c deleted-10| ... | @@ -1,10 +0,0 @@ | ||
| 1 | #undef __MSVCRT_VERSION__ | ||
| 2 | #define __MSVCRT_VERSION__ 0x800 | ||
| 3 | #include <stdio.h> | ||
| 4 | |||
| 5 | #undef _getwc_nolock | ||
| 6 | wint_t __cdecl _getwc_nolock(FILE *stream); | ||
| 7 | wint_t __cdecl _getwc_nolock(FILE *stream) | ||
| 8 | { | ||
| 9 | return _fgetwc_nolock(stream); | ||
| 10 | } | ||
lib/libc/mingw/stdio/_putc_nolock.c deleted-8| ... | @@ -1,8 +0,0 @@ | ||
| 1 | #include <stdio.h> | ||
| 2 | |||
| 3 | #undef _putc_nolock | ||
| 4 | int __cdecl _putc_nolock(int c, FILE *stream); | ||
| 5 | int __cdecl _putc_nolock(int c, FILE *stream) | ||
| 6 | { | ||
| 7 | return _fputc_nolock(c, stream); | ||
| 8 | } | ||
lib/libc/mingw/stdio/_putwc_nolock.c deleted-10| ... | @@ -1,10 +0,0 @@ | ||
| 1 | #undef __MSVCRT_VERSION__ | ||
| 2 | #define __MSVCRT_VERSION__ 0x800 | ||
| 3 | #include <stdio.h> | ||
| 4 | |||
| 5 | #undef _putwc_nolock | ||
| 6 | wint_t __cdecl _putwc_nolock(wchar_t c, FILE *stream); | ||
| 7 | wint_t __cdecl _putwc_nolock(wchar_t c, FILE *stream) | ||
| 8 | { | ||
| 9 | return _fputwc_nolock(c, stream); | ||
| 10 | } | ||
lib/libc/mingw/stdio/_vscprintf.c deleted-86| ... | @@ -1,86 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <windows.h> | ||
| 7 | #include <stdarg.h> | ||
| 8 | #include <stdio.h> | ||
| 9 | #include <stdlib.h> | ||
| 10 | #include <string.h> | ||
| 11 | #include <errno.h> | ||
| 12 | |||
| 13 | /* emulation of _vscprintf() via _vsnprintf() */ | ||
| 14 | static int __cdecl emu_vscprintf(const char * __restrict__ format, va_list arglist) | ||
| 15 | { | ||
| 16 | char *buffer, *new_buffer; | ||
| 17 | size_t size; | ||
| 18 | int ret = -1; | ||
| 19 | |||
| 20 | /* if format is a null pointer, _vscprintf() returns -1 and sets errno to EINVAL */ | ||
| 21 | if (!format) { | ||
| 22 | _set_errno(EINVAL); | ||
| 23 | return -1; | ||
| 24 | } | ||
| 25 | |||
| 26 | /* size for _vsnprintf() must be non-zero and buffer must have place for terminating null character */ | ||
| 27 | size = strlen(format) * 2 + 1; | ||
| 28 | buffer = malloc(size); | ||
| 29 | |||
| 30 | if (!buffer) { | ||
| 31 | _set_errno(ENOMEM); | ||
| 32 | return -1; | ||
| 33 | } | ||
| 34 | |||
| 35 | /* if the number of characters to write is greater than size, _vsnprintf() returns -1 */ | ||
| 36 | while (size < SIZE_MAX/2 && (ret = _vsnprintf(buffer, size, format, arglist)) < 0) { | ||
| 37 | /* in this case try with larger buffer */ | ||
| 38 | size *= 2; | ||
| 39 | new_buffer = realloc(buffer, size); | ||
| 40 | if (!new_buffer) | ||
| 41 | break; | ||
| 42 | buffer = new_buffer; | ||
| 43 | } | ||
| 44 | |||
| 45 | free(buffer); | ||
| 46 | |||
| 47 | if (ret < 0) { | ||
| 48 | _set_errno(ENOMEM); | ||
| 49 | return -1; | ||
| 50 | } | ||
| 51 | |||
| 52 | return ret; | ||
| 53 | } | ||
| 54 | |||
| 55 | #ifndef __LIBMSVCRT_OS__ | ||
| 56 | |||
| 57 | int (__cdecl *__MINGW_IMP_SYMBOL(_vscprintf))(const char * __restrict__, va_list) = emu_vscprintf; | ||
| 58 | |||
| 59 | #else | ||
| 60 | |||
| 61 | #include <msvcrt.h> | ||
| 62 | |||
| 63 | static int __cdecl init_vscprintf(const char * __restrict__ format, va_list arglist); | ||
| 64 | |||
| 65 | int (__cdecl *__MINGW_IMP_SYMBOL(_vscprintf))(const char * __restrict__, va_list) = init_vscprintf; | ||
| 66 | |||
| 67 | static int __cdecl init_vscprintf(const char * __restrict__ format, va_list arglist) | ||
| 68 | { | ||
| 69 | HMODULE msvcrt = __mingw_get_msvcrt_handle(); | ||
| 70 | int (__cdecl *func)(const char * __restrict__, va_list) = NULL; | ||
| 71 | |||
| 72 | if (msvcrt) | ||
| 73 | func = (int (__cdecl *)(const char * __restrict__, va_list))GetProcAddress(msvcrt, "_vscprintf"); | ||
| 74 | |||
| 75 | if (!func) | ||
| 76 | func = emu_vscprintf; | ||
| 77 | |||
| 78 | return (__MINGW_IMP_SYMBOL(_vscprintf) = func)(format, arglist); | ||
| 79 | } | ||
| 80 | |||
| 81 | #endif | ||
| 82 | |||
| 83 | int __cdecl _vscprintf(const char * __restrict__ format, va_list arglist) | ||
| 84 | { | ||
| 85 | return __MINGW_IMP_SYMBOL(_vscprintf)(format, arglist); | ||
| 86 | } | ||
lib/libc/mingw/stdio/acrt_iob_func.c deleted-15| ... | @@ -1,15 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <stdio.h> | ||
| 8 | |||
| 9 | FILE *__cdecl __acrt_iob_func(unsigned index) | ||
| 10 | { | ||
| 11 | return &(__iob_func()[index]); | ||
| 12 | } | ||
| 13 | |||
| 14 | typedef FILE *__cdecl (*_f__acrt_iob_func)(unsigned index); | ||
| 15 | _f__acrt_iob_func __MINGW_IMP_SYMBOL(__acrt_iob_func) = __acrt_iob_func; | ||
lib/libc/mingw/stdio/atoll.c deleted-13| ... | @@ -1,13 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #define __CRT__NO_INLINE | ||
| 7 | #include <stdlib.h> | ||
| 8 | |||
| 9 | long long __cdecl atoll(const char * nptr) { return strtoll(nptr, NULL, 10); } | ||
| 10 | long long (__cdecl *__MINGW_IMP_SYMBOL(atoll))(const char *) = atoll; | ||
| 11 | |||
| 12 | __int64 __attribute__((alias("atoll"))) __cdecl _atoi64(const char * nptr); | ||
| 13 | __int64 (__cdecl *__MINGW_IMP_SYMBOL(_atoi64))(const char *) = _atoi64; | ||
lib/libc/mingw/stdio/fseeki64.c deleted-50| ... | @@ -1,50 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <stdio.h> | ||
| 7 | #include <io.h> | ||
| 8 | #include <errno.h> | ||
| 9 | |||
| 10 | #if !defined(__arm__) && !defined(__aarch64__) /* we have F_ARM_ANY(_fseeki64) in msvcrt.def.in */ | ||
| 11 | int __cdecl _fseeki64(FILE* stream, __int64 offset, int whence) | ||
| 12 | { | ||
| 13 | fpos_t pos; | ||
| 14 | if (whence == SEEK_CUR) | ||
| 15 | { | ||
| 16 | /* If stream is invalid, fgetpos sets errno. */ | ||
| 17 | if (fgetpos (stream, &pos)) | ||
| 18 | return (-1); | ||
| 19 | pos += (fpos_t) offset; | ||
| 20 | } | ||
| 21 | else if (whence == SEEK_END) | ||
| 22 | { | ||
| 23 | /* If writing, we need to flush before getting file length. */ | ||
| 24 | fflush (stream); | ||
| 25 | pos = (fpos_t) (_filelengthi64 (_fileno (stream)) + offset); | ||
| 26 | } | ||
| 27 | else if (whence == SEEK_SET) | ||
| 28 | pos = (fpos_t) offset; | ||
| 29 | else | ||
| 30 | { | ||
| 31 | errno = EINVAL; | ||
| 32 | return (-1); | ||
| 33 | } | ||
| 34 | return fsetpos (stream, &pos); | ||
| 35 | } | ||
| 36 | |||
| 37 | int __cdecl (*__MINGW_IMP_SYMBOL(_fseeki64))(FILE*, __int64, int) = _fseeki64; | ||
| 38 | #endif /* !defined(__arm__) && !defined(__aarch64__) */ | ||
| 39 | |||
| 40 | __int64 __cdecl _ftelli64(FILE* stream) | ||
| 41 | { | ||
| 42 | fpos_t pos; | ||
| 43 | if (fgetpos (stream, &pos)) | ||
| 44 | return -1LL; | ||
| 45 | else | ||
| 46 | return (__int64) pos; | ||
| 47 | } | ||
| 48 | |||
| 49 | __int64 __cdecl (*__MINGW_IMP_SYMBOL(_ftelli64))(FILE*) = _ftelli64; | ||
| 50 | |||
lib/libc/mingw/stdio/mingw_dummy__lock.c deleted-12| ... | @@ -1,12 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <internal.h> | ||
| 8 | |||
| 9 | void __cdecl _lock(int locknum); | ||
| 10 | void __cdecl _unlock(int locknum); | ||
| 11 | void __cdecl _lock(__UNUSED_PARAM(int locknum)) { } | ||
| 12 | void __cdecl _unlock(__UNUSED_PARAM(int locknum)) { } | ||
lib/libc/mingw/stdio/mingw_lock.c deleted-102| ... | @@ -1,102 +0,0 @@ | ||
| 1 | #define _CRTIMP | ||
| 2 | #include <stdio.h> | ||
| 3 | #include <synchapi.h> | ||
| 4 | #include "internal.h" | ||
| 5 | |||
| 6 | /*** | ||
| 7 | * Copy of MS functions _lock_file, _unlock_file which are missing from | ||
| 8 | * msvcrt.dll and msvcr80.dll. They are needed to atomic/lock stdio | ||
| 9 | * functions (printf, fprintf, vprintf, vfprintf). We need exactly the same | ||
| 10 | * lock that MS uses in msvcrt.dll because we can mix mingw-w64 code with | ||
| 11 | * original MS functions (puts, fputs for example). | ||
| 12 | ***/ | ||
| 13 | |||
| 14 | |||
| 15 | _CRTIMP void __cdecl _lock(int locknum); | ||
| 16 | _CRTIMP void __cdecl _unlock(int locknum); | ||
| 17 | #define _STREAM_LOCKS 16 | ||
| 18 | #define _IOLOCKED 0x8000 | ||
| 19 | |||
| 20 | |||
| 21 | /*** | ||
| 22 | * _lock_file - Lock a FILE | ||
| 23 | * | ||
| 24 | *Purpose: | ||
| 25 | * Assert the lock for a stdio-level file | ||
| 26 | * | ||
| 27 | *Entry: | ||
| 28 | * pf = __piob[] entry (pointer to a FILE or _FILEX) | ||
| 29 | * | ||
| 30 | *Exit: | ||
| 31 | * | ||
| 32 | *Exceptions: | ||
| 33 | * | ||
| 34 | *******************************************************************************/ | ||
| 35 | |||
| 36 | void __cdecl _lock_file( FILE *pf ) | ||
| 37 | { | ||
| 38 | /* | ||
| 39 | * The way the FILE (pointed to by pf) is locked depends on whether | ||
| 40 | * it is part of _iob[] or not | ||
| 41 | */ | ||
| 42 | if ( (pf >= __acrt_iob_func(0)) && (pf <= __acrt_iob_func(_IOB_ENTRIES-1)) ) | ||
| 43 | { | ||
| 44 | /* | ||
| 45 | * FILE lies in _iob[] so the lock lies in _locktable[]. | ||
| 46 | */ | ||
| 47 | _lock( _STREAM_LOCKS + (int)(pf - __acrt_iob_func(0)) ); | ||
| 48 | /* We set _IOLOCKED to indicate we locked the stream */ | ||
| 49 | pf->_flag |= _IOLOCKED; | ||
| 50 | } | ||
| 51 | else | ||
| 52 | /* | ||
| 53 | * Not part of _iob[]. Therefore, *pf is a _FILEX and the | ||
| 54 | * lock field of the struct is an initialized critical | ||
| 55 | * section. | ||
| 56 | */ | ||
| 57 | EnterCriticalSection( &(((_FILEX *)pf)->lock) ); | ||
| 58 | } | ||
| 59 | |||
| 60 | void *__MINGW_IMP_SYMBOL(_lock_file) = _lock_file; | ||
| 61 | |||
| 62 | |||
| 63 | /*** | ||
| 64 | * _unlock_file - Unlock a FILE | ||
| 65 | * | ||
| 66 | *Purpose: | ||
| 67 | * Release the lock for a stdio-level file | ||
| 68 | * | ||
| 69 | *Entry: | ||
| 70 | * pf = __piob[] entry (pointer to a FILE or _FILEX) | ||
| 71 | * | ||
| 72 | *Exit: | ||
| 73 | * | ||
| 74 | *Exceptions: | ||
| 75 | * | ||
| 76 | *******************************************************************************/ | ||
| 77 | |||
| 78 | void __cdecl _unlock_file( FILE *pf ) | ||
| 79 | { | ||
| 80 | /* | ||
| 81 | * The way the FILE (pointed to by pf) is unlocked depends on whether | ||
| 82 | * it is part of _iob[] or not | ||
| 83 | */ | ||
| 84 | if ( (pf >= __acrt_iob_func(0)) && (pf <= __acrt_iob_func(_IOB_ENTRIES-1)) ) | ||
| 85 | { | ||
| 86 | /* | ||
| 87 | * FILE lies in _iob[] so the lock lies in _locktable[]. | ||
| 88 | * We reset _IOLOCKED to indicate we unlock the stream. | ||
| 89 | */ | ||
| 90 | pf->_flag &= ~_IOLOCKED; | ||
| 91 | _unlock( _STREAM_LOCKS + (int)(pf - __acrt_iob_func(0)) ); | ||
| 92 | } | ||
| 93 | else | ||
| 94 | /* | ||
| 95 | * Not part of _iob[]. Therefore, *pf is a _FILEX and the | ||
| 96 | * lock field of the struct is an initialized critical | ||
| 97 | * section. | ||
| 98 | */ | ||
| 99 | LeaveCriticalSection( &(((_FILEX *)pf)->lock) ); | ||
| 100 | } | ||
| 101 | |||
| 102 | void *__MINGW_IMP_SYMBOL(_unlock_file) = _unlock_file; | ||
lib/libc/mingw/stdio/snprintf_alias.c deleted-26| ... | @@ -1,26 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <stdarg.h> | ||
| 8 | #include <stddef.h> | ||
| 9 | |||
| 10 | /* Intentionally not including stdio.h, as it unconditionally defines the | ||
| 11 | * snprintf inline, and it can't be renamed with "#define snprintf othername" | ||
| 12 | * either, as stdio.h contains "#undef snprintf". */ | ||
| 13 | |||
| 14 | int __cdecl __ms_vsnprintf(char *buffer, size_t n, const char *format, va_list arg); | ||
| 15 | |||
| 16 | int __cdecl snprintf(char *buffer, size_t n, const char *format, ...); | ||
| 17 | int __cdecl snprintf(char *buffer, size_t n, const char *format, ...) | ||
| 18 | { | ||
| 19 | int retval; | ||
| 20 | va_list argptr; | ||
| 21 | |||
| 22 | va_start(argptr, format); | ||
| 23 | retval = __ms_vsnprintf(buffer, n, format, argptr); | ||
| 24 | va_end(argptr); | ||
| 25 | return retval; | ||
| 26 | } | ||
lib/libc/mingw/stdio/strtof.c deleted-27| ... | @@ -1,27 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include <float.h> | ||
| 8 | #include <errno.h> | ||
| 9 | #include <math.h> | ||
| 10 | |||
| 11 | float strtof( const char *nptr, char **endptr) | ||
| 12 | { | ||
| 13 | double ret = strtod(nptr, endptr); | ||
| 14 | if (isfinite(ret)) { | ||
| 15 | /* Check for cases that aren't out of range for doubles, but that are | ||
| 16 | * for floats. */ | ||
| 17 | if (ret > FLT_MAX) | ||
| 18 | errno = ERANGE; | ||
| 19 | else if (ret < -FLT_MAX) | ||
| 20 | errno = ERANGE; | ||
| 21 | else if (ret > 0 && ret < FLT_MIN) | ||
| 22 | errno = ERANGE; | ||
| 23 | else if (ret < 0 && ret > -FLT_MIN) | ||
| 24 | errno = ERANGE; | ||
| 25 | } | ||
| 26 | return ret; | ||
| 27 | } | ||
lib/libc/mingw/stdio/vsnprintf_alias.c deleted-20| ... | @@ -1,20 +0,0 @@ | ||
| 1 | /** | ||
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | ||
| 3 | * This file is part of the mingw-w64 runtime package. | ||
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <stdarg.h> | ||
| 8 | #include <stddef.h> | ||
| 9 | |||
| 10 | /* Intentionally not including stdio.h, as it unconditionally defines the | ||
| 11 | * vsnprintf inline, and it can't be renamed with "#define vsnprintf othername" | ||
| 12 | * either, as stdio.h contains "#undef vsnprintf". */ | ||
| 13 | |||
| 14 | int __cdecl __ms_vsnprintf(char *buffer, size_t n, const char *format, va_list arg); | ||
| 15 | |||
| 16 | int __cdecl vsnprintf(char *buffer, size_t n, const char *format, va_list arg); | ||
| 17 | int __cdecl vsnprintf(char *buffer, size_t n, const char *format, va_list arg) | ||
| 18 | { | ||
| 19 | return __ms_vsnprintf(buffer, n, format, arg); | ||
| 20 | } | ||
tools/update_mingw.zig+3| ... | @@ -148,7 +148,10 @@ const blacklist = [_][]const u8{ | ... | @@ -148,7 +148,10 @@ const blacklist = [_][]const u8{ |
| 148 | "msvcr80.def.in", | 148 | "msvcr80.def.in", |
| 149 | "msvcr90.def.in", | 149 | "msvcr90.def.in", |
| 150 | "msvcr90d.def.in", | 150 | "msvcr90d.def.in", |
| 151 | "msvcrt.def.in", | ||
| 151 | "msvcrt10.def.in", | 152 | "msvcrt10.def.in", |
| 152 | "msvcrt20.def.in", | 153 | "msvcrt20.def.in", |
| 153 | "msvcrt40.def.in", | 154 | "msvcrt40.def.in", |
| 155 | |||
| 156 | "crtdll.def.in", | ||
| 154 | }; | 157 | }; |