@zigc/lib 0.16.0-dev.3091 → 0.16.0-dev.3128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/c/math.zig +121 -30
  2. package/compiler/build_runner.zig +1 -0
  3. package/compiler/test_runner.zig +191 -59
  4. package/compiler_rt/cos.zig +141 -52
  5. package/compiler_rt/long_double.zig +37 -0
  6. package/compiler_rt/rem_pio2l.zig +173 -0
  7. package/compiler_rt/sin.zig +140 -55
  8. package/compiler_rt/sincos.zig +279 -72
  9. package/compiler_rt/tan.zig +118 -47
  10. package/compiler_rt/trig.zig +256 -6
  11. package/fuzzer.zig +855 -307
  12. package/package.json +1 -1
  13. package/std/Build/Fuzz.zig +6 -19
  14. package/std/Build/Step/Run.zig +530 -68
  15. package/std/Build/abi.zig +39 -7
  16. package/std/Build.zig +3 -0
  17. package/std/compress/flate/Compress.zig +3 -3
  18. package/std/debug/Info.zig +4 -0
  19. package/std/heap/ArenaAllocator.zig +145 -154
  20. package/std/mem/Allocator.zig +4 -5
  21. package/std/mem.zig +48 -0
  22. package/std/priority_dequeue.zig +13 -12
  23. package/std/priority_queue.zig +5 -4
  24. package/std/zig/Client.zig +8 -3
  25. package/std/zig/Server.zig +26 -0
  26. package/libc/mingw/complex/cabs.c +0 -48
  27. package/libc/mingw/complex/cabsf.c +0 -48
  28. package/libc/mingw/complex/cacos.c +0 -50
  29. package/libc/mingw/complex/cacosf.c +0 -50
  30. package/libc/mingw/complex/carg.c +0 -48
  31. package/libc/mingw/complex/cargf.c +0 -48
  32. package/libc/mingw/complex/casin.c +0 -50
  33. package/libc/mingw/complex/casinf.c +0 -50
  34. package/libc/mingw/complex/catan.c +0 -50
  35. package/libc/mingw/complex/catanf.c +0 -50
  36. package/libc/mingw/complex/ccos.c +0 -50
  37. package/libc/mingw/complex/ccosf.c +0 -50
  38. package/libc/mingw/complex/cexp.c +0 -48
  39. package/libc/mingw/complex/cexpf.c +0 -48
  40. package/libc/mingw/complex/cimag.c +0 -48
  41. package/libc/mingw/complex/cimagf.c +0 -48
  42. package/libc/mingw/complex/clog.c +0 -48
  43. package/libc/mingw/complex/clog10.c +0 -49
  44. package/libc/mingw/complex/clog10f.c +0 -49
  45. package/libc/mingw/complex/clogf.c +0 -48
  46. package/libc/mingw/complex/conj.c +0 -48
  47. package/libc/mingw/complex/conjf.c +0 -48
  48. package/libc/mingw/complex/cpow.c +0 -48
  49. package/libc/mingw/complex/cpowf.c +0 -48
  50. package/libc/mingw/complex/cproj.c +0 -48
  51. package/libc/mingw/complex/cprojf.c +0 -48
  52. package/libc/mingw/complex/creal.c +0 -48
  53. package/libc/mingw/complex/crealf.c +0 -48
  54. package/libc/mingw/complex/csin.c +0 -50
  55. package/libc/mingw/complex/csinf.c +0 -50
  56. package/libc/mingw/complex/csqrt.c +0 -48
  57. package/libc/mingw/complex/csqrtf.c +0 -48
  58. package/libc/mingw/complex/ctan.c +0 -50
  59. package/libc/mingw/complex/ctanf.c +0 -50
  60. package/libc/mingw/math/arm/s_rint.c +0 -86
  61. package/libc/mingw/math/arm/s_rintf.c +0 -51
  62. package/libc/mingw/math/arm/sincos.S +0 -30
  63. package/libc/mingw/math/arm-common/sincosl.c +0 -13
  64. package/libc/mingw/math/arm64/rint.c +0 -12
  65. package/libc/mingw/math/arm64/rintf.c +0 -12
  66. package/libc/mingw/math/arm64/sincos.S +0 -32
  67. package/libc/mingw/math/bsd_private_base.h +0 -148
  68. package/libc/mingw/math/frexpf.c +0 -13
  69. package/libc/mingw/math/frexpl.c +0 -71
  70. package/libc/mingw/math/x86/acosf.c +0 -29
  71. package/libc/mingw/math/x86/atanf.c +0 -23
  72. package/libc/mingw/math/x86/atanl.c +0 -18
  73. package/libc/mingw/math/x86/cos.def.h +0 -65
  74. package/libc/mingw/math/x86/cosl.c +0 -46
  75. package/libc/mingw/math/x86/cosl_internal.S +0 -55
  76. package/libc/mingw/math/x86/ldexp.c +0 -23
  77. package/libc/mingw/math/x86/scalbn.S +0 -41
  78. package/libc/mingw/math/x86/scalbnf.S +0 -40
  79. package/libc/mingw/math/x86/sin.def.h +0 -65
  80. package/libc/mingw/math/x86/sinl.c +0 -46
  81. package/libc/mingw/math/x86/sinl_internal.S +0 -58
  82. package/libc/mingw/math/x86/tanl.S +0 -62
  83. package/libc/mingw/misc/btowc.c +0 -28
  84. package/libc/mingw/misc/wcstof.c +0 -66
  85. package/libc/mingw/misc/wcstoimax.c +0 -132
  86. package/libc/mingw/misc/wcstoumax.c +0 -126
  87. package/libc/mingw/misc/wctob.c +0 -29
  88. package/libc/mingw/misc/winbs_uint64.c +0 -6
  89. package/libc/mingw/misc/winbs_ulong.c +0 -6
  90. package/libc/mingw/misc/winbs_ushort.c +0 -6
  91. package/libc/mingw/stdio/_Exit.c +0 -10
  92. package/libc/mingw/stdio/_findfirst64i32.c +0 -21
  93. package/libc/mingw/stdio/_findnext64i32.c +0 -21
  94. package/libc/mingw/stdio/_fstat64i32.c +0 -37
  95. package/libc/mingw/stdio/_stat64i32.c +0 -37
  96. package/libc/mingw/stdio/_wfindfirst64i32.c +0 -21
  97. package/libc/mingw/stdio/_wfindnext64i32.c +0 -21
  98. package/libc/mingw/stdio/_wstat64i32.c +0 -37
  99. package/libc/musl/src/legacy/valloc.c +0 -8
  100. package/libc/musl/src/math/__cosl.c +0 -96
  101. package/libc/musl/src/math/__sinl.c +0 -78
  102. package/libc/musl/src/math/__tanl.c +0 -143
  103. package/libc/musl/src/math/aarch64/lrint.c +0 -10
  104. package/libc/musl/src/math/aarch64/lrintf.c +0 -10
  105. package/libc/musl/src/math/aarch64/rintf.c +0 -7
  106. package/libc/musl/src/math/cosl.c +0 -39
  107. package/libc/musl/src/math/exp_data.c +0 -182
  108. package/libc/musl/src/math/exp_data.h +0 -26
  109. package/libc/musl/src/math/finite.c +0 -7
  110. package/libc/musl/src/math/finitef.c +0 -7
  111. package/libc/musl/src/math/frexp.c +0 -23
  112. package/libc/musl/src/math/frexpf.c +0 -23
  113. package/libc/musl/src/math/frexpl.c +0 -29
  114. package/libc/musl/src/math/i386/lrint.c +0 -8
  115. package/libc/musl/src/math/i386/lrintf.c +0 -8
  116. package/libc/musl/src/math/i386/rintf.c +0 -7
  117. package/libc/musl/src/math/lrint.c +0 -72
  118. package/libc/musl/src/math/lrintf.c +0 -8
  119. package/libc/musl/src/math/pow_data.c +0 -180
  120. package/libc/musl/src/math/pow_data.h +0 -22
  121. package/libc/musl/src/math/powerpc64/lrint.c +0 -16
  122. package/libc/musl/src/math/powerpc64/lrintf.c +0 -16
  123. package/libc/musl/src/math/rintf.c +0 -30
  124. package/libc/musl/src/math/s390x/rintf.c +0 -15
  125. package/libc/musl/src/math/sincosl.c +0 -60
  126. package/libc/musl/src/math/sinl.c +0 -41
  127. package/libc/musl/src/math/tanl.c +0 -29
  128. package/libc/musl/src/math/x32/lrint.s +0 -5
  129. package/libc/musl/src/math/x32/lrintf.s +0 -5
  130. package/libc/musl/src/math/x86_64/lrint.c +0 -8
  131. package/libc/musl/src/math/x86_64/lrintf.c +0 -8
  132. package/libc/wasi/libc-bottom-half/sources/reallocarray.c +0 -14
@@ -1,126 +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
-
10
- last edit: 1999/11/05 gwyn@arl.mil
11
-
12
- Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
13
-
14
- This particular implementation requires the matching <inttypes.h>.
15
- It also assumes that character codes for A..Z and a..z are in
16
- contiguous ascending order; this is true for ASCII but not EBCDIC.
17
- */
18
-
19
- #include <wchar.h>
20
- #include <errno.h>
21
- #include <ctype.h>
22
- #include <inttypes.h>
23
-
24
- /* convert digit wide character to number, in any base */
25
-
26
- #define ToWNumber(c) (iswdigit(c) ? (c) - L'0' : \
27
- iswupper(c) ? (c) - L'A' + 10 : \
28
- iswlower(c) ? (c) - L'a' + 10 : \
29
- -1 /* "invalid" flag */ \
30
- )
31
-
32
- /* validate converted digit character for specific base */
33
- #define valid(n, b) ((n) >= 0 && (n) < (b))
34
-
35
- uintmax_t
36
- __cdecl
37
- wcstoumax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int base)
38
- {
39
- register uintmax_t accum; /* accumulates converted value */
40
- register uintmax_t next; /* for computing next value of accum */
41
- register int n; /* numeral from digit character */
42
- int minus; /* set iff minus sign seen (yes!) */
43
- int toobig; /* set iff value overflows */
44
-
45
- if ( endptr != NULL )
46
- *endptr = (wchar_t *)nptr; /* in case no conv performed */
47
-
48
- if ( base < 0 || base == 1 || base > 36 )
49
- {
50
- errno = EDOM;
51
- return 0; /* unspecified behavior */
52
- }
53
-
54
- /* skip initial, possibly empty sequence of white-space w.characters */
55
-
56
- while ( iswspace(*nptr) )
57
- ++nptr;
58
-
59
- /* process subject sequence: */
60
-
61
- /* optional sign */
62
-
63
- if ( (minus = *nptr == L'-') || *nptr == L'+' )
64
- ++nptr;
65
-
66
- if ( base == 0 )
67
- {
68
- if ( *nptr == L'0' )
69
- {
70
- if ( nptr[1] == L'X' || nptr[1] == L'x' )
71
- base = 16;
72
- else
73
- base = 8;
74
- }
75
- else
76
- base = 10;
77
- }
78
- /* optional "0x" or "0X" for base 16 */
79
-
80
- if ( base == 16 && *nptr == L'0'
81
- && (nptr[1] == L'X' || nptr[1] == L'x')
82
- )
83
- nptr += 2; /* skip past this prefix */
84
-
85
- /* check whether there is at least one valid digit */
86
-
87
- n = ToWNumber(*nptr);
88
- ++nptr;
89
-
90
- if ( !valid(n, base) )
91
- return 0; /* subject seq. not of expected form */
92
-
93
- accum = n;
94
-
95
- for ( toobig = 0; n = ToWNumber(*nptr), valid(n, base); ++nptr )
96
- if ( accum > UINTMAX_MAX / base + 1 /* major wrap-around */
97
- || (next = base * accum + n) < accum /* minor wrap-around */
98
- )
99
- toobig = 1; /* but keep scanning */
100
- else
101
- accum = next;
102
-
103
- if ( endptr != NULL )
104
- *endptr = (wchar_t *)nptr; /* -> first not-valid-digit */
105
-
106
- if ( toobig )
107
- {
108
- errno = ERANGE;
109
- return UINTMAX_MAX;
110
- }
111
- else
112
- return minus ? -accum : accum; /* (yes!) */
113
- }
114
- uintmax_t (__cdecl *__MINGW_IMP_SYMBOL(wcstoumax))(const wchar_t * __restrict__, wchar_t ** __restrict__, int) = wcstoumax;
115
-
116
- unsigned long long __attribute__ ((alias ("wcstoumax")))
117
- __cdecl
118
- wcstoull (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
119
- extern unsigned long long __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(wcstoumax)))))
120
- (__cdecl *__MINGW_IMP_SYMBOL(wcstoull))(const wchar_t * __restrict__, wchar_t ** __restrict__, int);
121
-
122
- unsigned long long __attribute__ ((alias ("wcstoumax")))
123
- __cdecl
124
- _wcstoui64 (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
125
- extern unsigned long long __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(wcstoumax)))))
126
- (__cdecl *__MINGW_IMP_SYMBOL(_wcstoui64))(const wchar_t * __restrict__, wchar_t ** __restrict__, int);
@@ -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
- #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 <stdio.h>
12
- #include <stdlib.h>
13
- #include <errno.h>
14
- #include <windows.h>
15
-
16
- /* Return just the first byte after translating to multibyte. */
17
- int wctob (wint_t wc )
18
- {
19
- wchar_t w = wc;
20
- char c;
21
- int invalid_char = 0;
22
- if (!WideCharToMultiByte (___lc_codepage_func(),
23
- 0 /* Is this correct flag? */,
24
- &w, 1, &c, 1, NULL, &invalid_char)
25
- || invalid_char)
26
- return EOF;
27
-
28
- return (unsigned char) c;
29
- }
@@ -1,6 +0,0 @@
1
- unsigned long long __cdecl _byteswap_uint64(unsigned long long _Int64);
2
-
3
- unsigned long long __cdecl _byteswap_uint64(unsigned long long _Int64)
4
- {
5
- return __builtin_bswap64(_Int64);
6
- }
@@ -1,6 +0,0 @@
1
- unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
2
-
3
- unsigned long __cdecl _byteswap_ulong (unsigned long _Long)
4
- {
5
- return __builtin_bswap32(_Long);
6
- }
@@ -1,6 +0,0 @@
1
- unsigned short __cdecl _byteswap_ushort(unsigned short _Short);
2
-
3
- unsigned short __cdecl _byteswap_ushort(unsigned short _Short)
4
- {
5
- return __builtin_bswap16(_Short);
6
- }
@@ -1,10 +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
- void _Exit(int status)
10
- { _exit(status); }
@@ -1,21 +0,0 @@
1
- #define __CRT__NO_INLINE
2
- #include <io.h>
3
- #include <string.h>
4
-
5
- intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData)
6
- {
7
- struct __finddata64_t fd;
8
- intptr_t ret = _findfirst64(_Filename,&fd);
9
- if (ret == -1) {
10
- *_FindData = (struct _finddata64i32_t){0};
11
- return -1;
12
- }
13
- _FindData->attrib=fd.attrib;
14
- _FindData->time_create=fd.time_create;
15
- _FindData->time_access=fd.time_access;
16
- _FindData->time_write=fd.time_write;
17
- _FindData->size=(_fsize_t) fd.size;
18
- strncpy(_FindData->name,fd.name,260);
19
- return ret;
20
- }
21
-
@@ -1,21 +0,0 @@
1
- #define __CRT__NO_INLINE
2
- #include <io.h>
3
- #include <string.h>
4
-
5
- int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData)
6
- {
7
- struct __finddata64_t fd;
8
- int ret = _findnext64(_FindHandle,&fd);
9
- if (ret == -1) {
10
- *_FindData = (struct _finddata64i32_t){0};
11
- return -1;
12
- }
13
- _FindData->attrib=fd.attrib;
14
- _FindData->time_create=fd.time_create;
15
- _FindData->time_access=fd.time_access;
16
- _FindData->time_write=fd.time_write;
17
- _FindData->size=(_fsize_t) fd.size;
18
- strncpy(_FindData->name,fd.name,260);
19
- return ret;
20
- }
21
-
@@ -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
- #include <sys/stat.h>
8
-
9
- /* When the file size does not fit into the st_size field:
10
- * crtdll-msvcr90 msvcr100 msvcr110+
11
- * st_size truncate 0 0
12
- * errno no change no change EOVERFLOW
13
- * returns 0 -1 -1
14
- *
15
- * This file is used only for pre-msvcr80 builds,
16
- * So use the pre-msvcr80 behavior - truncate without error.
17
- */
18
- int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat)
19
- {
20
- struct _stat64 st;
21
- int ret=_fstat64(_FileDes,&st);
22
- if (ret != 0)
23
- return ret;
24
- _Stat->st_dev=st.st_dev;
25
- _Stat->st_ino=st.st_ino;
26
- _Stat->st_mode=st.st_mode;
27
- _Stat->st_nlink=st.st_nlink;
28
- _Stat->st_uid=st.st_uid;
29
- _Stat->st_gid=st.st_gid;
30
- _Stat->st_rdev=st.st_rdev;
31
- _Stat->st_size=(_off_t) st.st_size; /* truncate 64-bit st_size to 32-bit */
32
- _Stat->st_atime=st.st_atime;
33
- _Stat->st_mtime=st.st_mtime;
34
- _Stat->st_ctime=st.st_ctime;
35
- return 0;
36
- }
37
- int (__cdecl *__MINGW_IMP_SYMBOL(_fstat64i32))(int, struct _stat64i32 *) = _fstat64i32;
@@ -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
- #include <sys/stat.h>
8
-
9
- /* When the file size does not fit into the st_size field:
10
- * crtdll-msvcr90 msvcr100 msvcr110+
11
- * st_size truncate 0 0
12
- * errno no change no change EOVERFLOW
13
- * returns 0 -1 -1
14
- *
15
- * This file is used only for pre-msvcr80 builds,
16
- * So use the pre-msvcr80 behavior - truncate without error.
17
- */
18
- int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat)
19
- {
20
- struct _stat64 st;
21
- int ret=_stat64(_Name,&st);
22
- if (ret != 0)
23
- return ret;
24
- _Stat->st_dev=st.st_dev;
25
- _Stat->st_ino=st.st_ino;
26
- _Stat->st_mode=st.st_mode;
27
- _Stat->st_nlink=st.st_nlink;
28
- _Stat->st_uid=st.st_uid;
29
- _Stat->st_gid=st.st_gid;
30
- _Stat->st_rdev=st.st_rdev;
31
- _Stat->st_size=(_off_t) st.st_size; /* truncate 64-bit st_size to 32-bit */
32
- _Stat->st_atime=st.st_atime;
33
- _Stat->st_mtime=st.st_mtime;
34
- _Stat->st_ctime=st.st_ctime;
35
- return 0;
36
- }
37
- int (__cdecl *__MINGW_IMP_SYMBOL(_stat64i32))(const char *, struct _stat64i32 *) = _stat64i32;
@@ -1,21 +0,0 @@
1
- #define __CRT__NO_INLINE
2
- #include <io.h>
3
- #include <string.h>
4
-
5
- intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData)
6
- {
7
- struct _wfinddata64_t fd;
8
- intptr_t ret = _wfindfirst64(_Filename,&fd);
9
- if (ret == -1) {
10
- *_FindData = (struct _wfinddata64i32_t){0};
11
- return -1;
12
- }
13
- _FindData->attrib=fd.attrib;
14
- _FindData->time_create=fd.time_create;
15
- _FindData->time_access=fd.time_access;
16
- _FindData->time_write=fd.time_write;
17
- _FindData->size=(_fsize_t) fd.size;
18
- memcpy(_FindData->name,fd.name,260*sizeof(wchar_t));
19
- return ret;
20
- }
21
-
@@ -1,21 +0,0 @@
1
- #define __CRT__NO_INLINE
2
- #include <io.h>
3
- #include <string.h>
4
-
5
- int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData)
6
- {
7
- struct _wfinddata64_t fd;
8
- int ret = _wfindnext64(_FindHandle,&fd);
9
- if (ret == -1) {
10
- *_FindData = (struct _wfinddata64i32_t){0};
11
- return -1;
12
- }
13
- _FindData->attrib=fd.attrib;
14
- _FindData->time_create=fd.time_create;
15
- _FindData->time_access=fd.time_access;
16
- _FindData->time_write=fd.time_write;
17
- _FindData->size=(_fsize_t) fd.size;
18
- memcpy(_FindData->name,fd.name,260*sizeof(wchar_t));
19
- return ret;
20
- }
21
-
@@ -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
- #include <sys/stat.h>
8
-
9
- /* When the file size does not fit into the st_size field:
10
- * crtdll-msvcr90 msvcr100 msvcr110+
11
- * st_size truncate 0 0
12
- * errno no change no change EOVERFLOW
13
- * returns 0 -1 -1
14
- *
15
- * This file is used only for pre-msvcr80 builds,
16
- * So use the pre-msvcr80 behavior - truncate without error.
17
- */
18
- int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat)
19
- {
20
- struct _stat64 st;
21
- int ret=_wstat64(_Name,&st);
22
- if (ret != 0)
23
- return ret;
24
- _Stat->st_dev=st.st_dev;
25
- _Stat->st_ino=st.st_ino;
26
- _Stat->st_mode=st.st_mode;
27
- _Stat->st_nlink=st.st_nlink;
28
- _Stat->st_uid=st.st_uid;
29
- _Stat->st_gid=st.st_gid;
30
- _Stat->st_rdev=st.st_rdev;
31
- _Stat->st_size=(_off_t) st.st_size; /* truncate 64-bit st_size to 32-bit */
32
- _Stat->st_atime=st.st_atime;
33
- _Stat->st_mtime=st.st_mtime;
34
- _Stat->st_ctime=st.st_ctime;
35
- return 0;
36
- }
37
- int (__cdecl *__MINGW_IMP_SYMBOL(_wstat64i32))(const wchar_t *, struct _stat64i32 *) = _wstat64i32;
@@ -1,8 +0,0 @@
1
- #define _BSD_SOURCE
2
- #include <stdlib.h>
3
- #include "libc.h"
4
-
5
- void *valloc(size_t size)
6
- {
7
- return memalign(PAGE_SIZE, size);
8
- }
@@ -1,96 +0,0 @@
1
- /* origin: FreeBSD /usr/src/lib/msun/ld80/k_cosl.c */
2
- /* origin: FreeBSD /usr/src/lib/msun/ld128/k_cosl.c */
3
- /*
4
- * ====================================================
5
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6
- * Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans.
7
- *
8
- * Developed at SunSoft, a Sun Microsystems, Inc. business.
9
- * Permission to use, copy, modify, and distribute this
10
- * software is freely granted, provided that this notice
11
- * is preserved.
12
- * ====================================================
13
- */
14
-
15
-
16
- #include "libm.h"
17
-
18
- #if (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
19
- #if LDBL_MANT_DIG == 64
20
- /*
21
- * ld80 version of __cos.c. See __cos.c for most comments.
22
- */
23
- /*
24
- * Domain [-0.7854, 0.7854], range ~[-2.43e-23, 2.425e-23]:
25
- * |cos(x) - c(x)| < 2**-75.1
26
- *
27
- * The coefficients of c(x) were generated by a pari-gp script using
28
- * a Remez algorithm that searches for the best higher coefficients
29
- * after rounding leading coefficients to a specified precision.
30
- *
31
- * Simpler methods like Chebyshev or basic Remez barely suffice for
32
- * cos() in 64-bit precision, because we want the coefficient of x^2
33
- * to be precisely -0.5 so that multiplying by it is exact, and plain
34
- * rounding of the coefficients of a good polynomial approximation only
35
- * gives this up to about 64-bit precision. Plain rounding also gives
36
- * a mediocre approximation for the coefficient of x^4, but a rounding
37
- * error of 0.5 ulps for this coefficient would only contribute ~0.01
38
- * ulps to the final error, so this is unimportant. Rounding errors in
39
- * higher coefficients are even less important.
40
- *
41
- * In fact, coefficients above the x^4 one only need to have 53-bit
42
- * precision, and this is more efficient. We get this optimization
43
- * almost for free from the complications needed to search for the best
44
- * higher coefficients.
45
- */
46
- static const long double
47
- C1 = 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68 */
48
- static const double
49
- C2 = -0.0013888888888888874, /* -0x16c16c16c16c10.0p-62 */
50
- C3 = 0.000024801587301571716, /* 0x1a01a01a018e22.0p-68 */
51
- C4 = -0.00000027557319215507120, /* -0x127e4fb7602f22.0p-74 */
52
- C5 = 0.0000000020876754400407278, /* 0x11eed8caaeccf1.0p-81 */
53
- C6 = -1.1470297442401303e-11, /* -0x19393412bd1529.0p-89 */
54
- C7 = 4.7383039476436467e-14; /* 0x1aac9d9af5c43e.0p-97 */
55
- #define POLY(z) (z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*(C6+z*C7)))))))
56
- #elif LDBL_MANT_DIG == 113
57
- /*
58
- * ld128 version of __cos.c. See __cos.c for most comments.
59
- */
60
- /*
61
- * Domain [-0.7854, 0.7854], range ~[-1.80e-37, 1.79e-37]:
62
- * |cos(x) - c(x))| < 2**-122.0
63
- *
64
- * 113-bit precision requires more care than 64-bit precision, since
65
- * simple methods give a minimax polynomial with coefficient for x^2
66
- * that is 1 ulp below 0.5, but we want it to be precisely 0.5. See
67
- * above for more details.
68
- */
69
- static const long double
70
- C1 = 0.04166666666666666666666666666666658424671L,
71
- C2 = -0.001388888888888888888888888888863490893732L,
72
- C3 = 0.00002480158730158730158730158600795304914210L,
73
- C4 = -0.2755731922398589065255474947078934284324e-6L,
74
- C5 = 0.2087675698786809897659225313136400793948e-8L,
75
- C6 = -0.1147074559772972315817149986812031204775e-10L,
76
- C7 = 0.4779477332386808976875457937252120293400e-13L;
77
- static const double
78
- C8 = -0.1561920696721507929516718307820958119868e-15,
79
- C9 = 0.4110317413744594971475941557607804508039e-18,
80
- C10 = -0.8896592467191938803288521958313920156409e-21,
81
- C11 = 0.1601061435794535138244346256065192782581e-23;
82
- #define POLY(z) (z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*(C6+z*(C7+ \
83
- z*(C8+z*(C9+z*(C10+z*C11)))))))))))
84
- #endif
85
-
86
- long double __cosl(long double x, long double y)
87
- {
88
- long double hz,z,r,w;
89
-
90
- z = x*x;
91
- r = POLY(z);
92
- hz = 0.5*z;
93
- w = 1.0-hz;
94
- return w + (((1.0-w)-hz) + (z*r-x*y));
95
- }
96
- #endif
@@ -1,78 +0,0 @@
1
- /* origin: FreeBSD /usr/src/lib/msun/ld80/k_sinl.c */
2
- /* origin: FreeBSD /usr/src/lib/msun/ld128/k_sinl.c */
3
- /*
4
- * ====================================================
5
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6
- * Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans.
7
- *
8
- * Developed at SunSoft, a Sun Microsystems, Inc. business.
9
- * Permission to use, copy, modify, and distribute this
10
- * software is freely granted, provided that this notice
11
- * is preserved.
12
- * ====================================================
13
- */
14
-
15
- #include "libm.h"
16
-
17
- #if (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
18
- #if LDBL_MANT_DIG == 64
19
- /*
20
- * ld80 version of __sin.c. See __sin.c for most comments.
21
- */
22
- /*
23
- * Domain [-0.7854, 0.7854], range ~[-1.89e-22, 1.915e-22]
24
- * |sin(x)/x - s(x)| < 2**-72.1
25
- *
26
- * See __cosl.c for more details about the polynomial.
27
- */
28
- static const long double
29
- S1 = -0.166666666666666666671L; /* -0xaaaaaaaaaaaaaaab.0p-66 */
30
- static const double
31
- S2 = 0.0083333333333333332, /* 0x11111111111111.0p-59 */
32
- S3 = -0.00019841269841269427, /* -0x1a01a01a019f81.0p-65 */
33
- S4 = 0.0000027557319223597490, /* 0x171de3a55560f7.0p-71 */
34
- S5 = -0.000000025052108218074604, /* -0x1ae64564f16cad.0p-78 */
35
- S6 = 1.6059006598854211e-10, /* 0x161242b90243b5.0p-85 */
36
- S7 = -7.6429779983024564e-13, /* -0x1ae42ebd1b2e00.0p-93 */
37
- S8 = 2.6174587166648325e-15; /* 0x179372ea0b3f64.0p-101 */
38
- #define POLY(z) (S2+z*(S3+z*(S4+z*(S5+z*(S6+z*(S7+z*S8))))))
39
- #elif LDBL_MANT_DIG == 113
40
- /*
41
- * ld128 version of __sin.c. See __sin.c for most comments.
42
- */
43
- /*
44
- * Domain [-0.7854, 0.7854], range ~[-1.53e-37, 1.659e-37]
45
- * |sin(x)/x - s(x)| < 2**-122.1
46
- *
47
- * See __cosl.c for more details about the polynomial.
48
- */
49
- static const long double
50
- S1 = -0.16666666666666666666666666666666666606732416116558L,
51
- S2 = 0.0083333333333333333333333333333331135404851288270047L,
52
- S3 = -0.00019841269841269841269841269839935785325638310428717L,
53
- S4 = 0.27557319223985890652557316053039946268333231205686e-5L,
54
- S5 = -0.25052108385441718775048214826384312253862930064745e-7L,
55
- S6 = 0.16059043836821614596571832194524392581082444805729e-9L,
56
- S7 = -0.76471637318198151807063387954939213287488216303768e-12L,
57
- S8 = 0.28114572543451292625024967174638477283187397621303e-14L;
58
- static const double
59
- S9 = -0.82206352458348947812512122163446202498005154296863e-17,
60
- S10 = 0.19572940011906109418080609928334380560135358385256e-19,
61
- S11 = -0.38680813379701966970673724299207480965452616911420e-22,
62
- S12 = 0.64038150078671872796678569586315881020659912139412e-25;
63
- #define POLY(z) (S2+z*(S3+z*(S4+z*(S5+z*(S6+z*(S7+z*(S8+ \
64
- z*(S9+z*(S10+z*(S11+z*S12))))))))))
65
- #endif
66
-
67
- long double __sinl(long double x, long double y, int iy)
68
- {
69
- long double z,r,v;
70
-
71
- z = x*x;
72
- v = z*x;
73
- r = POLY(z);
74
- if (iy == 0)
75
- return x+v*(S1+z*r);
76
- return x-((z*(0.5*y-v*r)-y)-v*S1);
77
- }
78
- #endif