@zigc/lib 0.16.0-dev.3121 → 0.16.0-dev.3132

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 (88) hide show
  1. package/c/math.zig +15 -13
  2. package/compiler/aro/backend/Ir/x86/Renderer.zig +3 -3
  3. package/compiler/build_runner.zig +1 -0
  4. package/compiler/resinator/compile.zig +2 -2
  5. package/compiler/test_runner.zig +191 -59
  6. package/fuzzer.zig +855 -307
  7. package/package.json +1 -1
  8. package/std/Build/Fuzz.zig +6 -19
  9. package/std/Build/Step/Run.zig +530 -68
  10. package/std/Build/abi.zig +39 -7
  11. package/std/Build.zig +3 -0
  12. package/std/Io/File/Reader.zig +3 -1
  13. package/std/Io/Kqueue.zig +2 -2
  14. package/std/Io.zig +2 -2
  15. package/std/bit_set.zig +22 -6
  16. package/std/compress/flate/Compress.zig +3 -3
  17. package/std/crypto/codecs/base64_hex_ct.zig +2 -2
  18. package/std/enums.zig +19 -25
  19. package/std/http/Client.zig +10 -6
  20. package/std/priority_dequeue.zig +13 -12
  21. package/std/priority_queue.zig +5 -4
  22. package/std/zig/Client.zig +8 -3
  23. package/std/zig/Server.zig +26 -0
  24. package/libc/mingw/complex/cabs.c +0 -48
  25. package/libc/mingw/complex/cabsf.c +0 -48
  26. package/libc/mingw/complex/cacos.c +0 -50
  27. package/libc/mingw/complex/cacosf.c +0 -50
  28. package/libc/mingw/complex/carg.c +0 -48
  29. package/libc/mingw/complex/cargf.c +0 -48
  30. package/libc/mingw/complex/casin.c +0 -50
  31. package/libc/mingw/complex/casinf.c +0 -50
  32. package/libc/mingw/complex/catan.c +0 -50
  33. package/libc/mingw/complex/catanf.c +0 -50
  34. package/libc/mingw/complex/ccos.c +0 -50
  35. package/libc/mingw/complex/ccosf.c +0 -50
  36. package/libc/mingw/complex/cexp.c +0 -48
  37. package/libc/mingw/complex/cexpf.c +0 -48
  38. package/libc/mingw/complex/cimag.c +0 -48
  39. package/libc/mingw/complex/cimagf.c +0 -48
  40. package/libc/mingw/complex/clog.c +0 -48
  41. package/libc/mingw/complex/clog10.c +0 -49
  42. package/libc/mingw/complex/clog10f.c +0 -49
  43. package/libc/mingw/complex/clogf.c +0 -48
  44. package/libc/mingw/complex/conj.c +0 -48
  45. package/libc/mingw/complex/conjf.c +0 -48
  46. package/libc/mingw/complex/cpow.c +0 -48
  47. package/libc/mingw/complex/cpowf.c +0 -48
  48. package/libc/mingw/complex/cproj.c +0 -48
  49. package/libc/mingw/complex/cprojf.c +0 -48
  50. package/libc/mingw/complex/creal.c +0 -48
  51. package/libc/mingw/complex/crealf.c +0 -48
  52. package/libc/mingw/complex/csin.c +0 -50
  53. package/libc/mingw/complex/csinf.c +0 -50
  54. package/libc/mingw/complex/csqrt.c +0 -48
  55. package/libc/mingw/complex/csqrtf.c +0 -48
  56. package/libc/mingw/complex/ctan.c +0 -50
  57. package/libc/mingw/complex/ctanf.c +0 -50
  58. package/libc/mingw/math/arm/s_rint.c +0 -86
  59. package/libc/mingw/math/arm/s_rintf.c +0 -51
  60. package/libc/mingw/math/bsd_private_base.h +0 -148
  61. package/libc/mingw/math/x86/acosf.c +0 -29
  62. package/libc/mingw/math/x86/atanf.c +0 -23
  63. package/libc/mingw/math/x86/atanl.c +0 -18
  64. package/libc/mingw/math/x86/ldexp.c +0 -23
  65. package/libc/mingw/math/x86/scalbn.S +0 -41
  66. package/libc/mingw/math/x86/scalbnf.S +0 -40
  67. package/libc/mingw/misc/btowc.c +0 -28
  68. package/libc/mingw/misc/wcstof.c +0 -66
  69. package/libc/mingw/misc/wcstoimax.c +0 -132
  70. package/libc/mingw/misc/wcstoumax.c +0 -126
  71. package/libc/mingw/misc/wctob.c +0 -29
  72. package/libc/mingw/misc/winbs_uint64.c +0 -6
  73. package/libc/mingw/misc/winbs_ulong.c +0 -6
  74. package/libc/mingw/misc/winbs_ushort.c +0 -6
  75. package/libc/mingw/stdio/_Exit.c +0 -10
  76. package/libc/mingw/stdio/_findfirst64i32.c +0 -21
  77. package/libc/mingw/stdio/_findnext64i32.c +0 -21
  78. package/libc/mingw/stdio/_fstat64i32.c +0 -37
  79. package/libc/mingw/stdio/_stat64i32.c +0 -37
  80. package/libc/mingw/stdio/_wfindfirst64i32.c +0 -21
  81. package/libc/mingw/stdio/_wfindnext64i32.c +0 -21
  82. package/libc/mingw/stdio/_wstat64i32.c +0 -37
  83. package/libc/musl/src/legacy/valloc.c +0 -8
  84. package/libc/musl/src/math/exp_data.c +0 -182
  85. package/libc/musl/src/math/exp_data.h +0 -26
  86. package/libc/musl/src/math/pow_data.c +0 -180
  87. package/libc/musl/src/math/pow_data.h +0 -22
  88. package/libc/wasi/libc-bottom-half/sources/reallocarray.c +0 -14
@@ -1,23 +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
- * Public domain.
9
- *
10
- */
11
-
12
- #include <math.h>
13
-
14
- float
15
- atanf (float x)
16
- {
17
- float res = 0.0F;
18
-
19
- asm volatile (
20
- "fld1\n\t"
21
- "fpatan" : "=t" (res) : "0" (x));
22
- return res;
23
- }
@@ -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
- long double atanl (long double x);
7
-
8
- long double
9
- atanl (long double x)
10
- {
11
- long double res = 0.0L;
12
-
13
- asm volatile (
14
- "fld1\n\t"
15
- "fpatan"
16
- : "=t" (res) : "0" (x));
17
- return res;
18
- }
@@ -1,23 +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 ldexp(double x, int expn)
10
- {
11
- double res = 0.0;
12
- if (!isfinite (x) || x == 0.0)
13
- return x;
14
-
15
- __asm__ __volatile__ ("fscale"
16
- : "=t" (res)
17
- : "0" (x), "u" ((double) expn));
18
-
19
- if (!isfinite (res) || res == 0.0L)
20
- errno = ERANGE;
21
-
22
- return res;
23
- }
@@ -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 <_mingw_mac.h>
7
-
8
- .file "scalbn.S"
9
- .text
10
- #ifdef __x86_64__
11
- .align 8
12
- #else
13
- .align 4
14
- #endif
15
- .globl __MINGW_USYMBOL(scalbn)
16
- .def __MINGW_USYMBOL(scalbn); .scl 2; .type 32; .endef
17
- __MINGW_USYMBOL(scalbn):
18
- #ifdef __x86_64__
19
- subq $24, %rsp
20
- movq %rdx,(%rsp)
21
- fildl (%rsp)
22
- movsd %xmm0,(%rsp)
23
- fldl (%rsp)
24
- fscale
25
- fstp %st(1)
26
- fstpl (%rsp)
27
- movsd (%rsp),%xmm0
28
- addq $24, %rsp
29
- ret
30
-
31
- #else
32
- fildl 12(%esp)
33
- fldl 4(%esp)
34
- fscale
35
- fstp %st(1)
36
- ret
37
- #endif
38
-
39
- .globl __MINGW_USYMBOL(scalbln)
40
- .set __MINGW_USYMBOL(scalbln),__MINGW_USYMBOL(scalbn)
41
-
@@ -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 "scalbnf.S"
9
- .text
10
- #ifdef __x86_64__
11
- .align 8
12
- #else
13
- .align 4
14
- #endif
15
- .globl __MINGW_USYMBOL(scalbnf)
16
- .def __MINGW_USYMBOL(scalbnf); .scl 2; .type 32; .endef
17
- __MINGW_USYMBOL(scalbnf):
18
- #ifdef __x86_64__
19
- subq $24, %rsp
20
- movq %rdx,(%rsp)
21
- fildl (%rsp)
22
- movss %xmm0,(%rsp)
23
- flds (%rsp)
24
- fscale
25
- fstp %st(1)
26
- fstps (%rsp)
27
- movss (%rsp),%xmm0
28
- addq $24, %rsp
29
- ret
30
- #else
31
- fildl 8(%esp)
32
- flds 4(%esp)
33
- fscale
34
- fstp %st(1)
35
- ret
36
- #endif
37
-
38
- .globl __MINGW_USYMBOL(scalblnf)
39
- .set __MINGW_USYMBOL(scalblnf),__MINGW_USYMBOL(scalbnf)
40
-
@@ -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
- #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 <windows.h>
13
-
14
- wint_t btowc (int c)
15
- {
16
- if (c == EOF)
17
- return (WEOF);
18
- else
19
- {
20
- unsigned char ch = c;
21
- wchar_t wc = WEOF;
22
- if (!MultiByteToWideChar (___lc_codepage_func(), MB_ERR_INVALID_CHARS,
23
- (char*)&ch, 1, &wc, 1))
24
- return WEOF;
25
-
26
- return wc;
27
- }
28
- }
@@ -1,66 +0,0 @@
1
- /* Wide char wrapper for strtof
2
- * Revision history:
3
- * 25 Aug 2006 Initial version.
4
- *
5
- * Contributor: Danny Smith <dannysmith@users.sourceforege.net>
6
- */
7
-
8
- /* This routine has been placed in the public domain.*/
9
-
10
- #define WIN32_LEAN_AND_MEAN
11
- #include <windows.h>
12
- #include <locale.h>
13
- #include <wchar.h>
14
- #include <stdlib.h>
15
- #include <string.h>
16
- #include <mbstring.h>
17
-
18
- #include "mb_wc_common.h"
19
-
20
- float wcstof (const wchar_t * __restrict__ wcs, wchar_t ** __restrict__ wcse)
21
- {
22
- char * cs;
23
- char * cse;
24
- unsigned int i;
25
- float ret;
26
- const unsigned int cp = ___lc_codepage_func();
27
-
28
- /* Allocate enough room for (possibly) mb chars */
29
- cs = (char *) malloc ((wcslen(wcs)+1) * MB_CUR_MAX);
30
-
31
- if (cp == 0) /* C locale */
32
- {
33
- for (i = 0; (wcs[i] != 0) && wcs[i] <= 255; i++)
34
- cs[i] = (char) wcs[i];
35
- cs[i] = '\0';
36
- }
37
- else
38
- {
39
- int nbytes = -1;
40
- int mb_len = 0;
41
- /* loop through till we hit null or invalid character */
42
- for (i = 0; (wcs[i] != 0) && (nbytes != 0); i++)
43
- {
44
- nbytes = WideCharToMultiByte(cp, WC_COMPOSITECHECK | WC_SEPCHARS,
45
- wcs + i, 1, cs + mb_len, MB_CUR_MAX,
46
- NULL, NULL);
47
- mb_len += nbytes;
48
- }
49
- cs[mb_len] = '\0';
50
- }
51
-
52
- ret = strtof (cs, &cse);
53
-
54
- if (wcse)
55
- {
56
- /* Make sure temp mbstring cs has 0 at cse. */
57
- *cse = '\0';
58
- i = MultiByteToWideChar (cp, MB_ERR_INVALID_CHARS, cs, -1, NULL, 0);
59
- if (i > 0)
60
- i -= 1; /* Remove zero terminator from length. */
61
- *wcse = (wchar_t *) wcs + i;
62
- }
63
- free (cs);
64
-
65
- return ret;
66
- }
@@ -1,132 +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
- intmax_t
36
- __cdecl
37
- wcstoimax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int base)
38
- {
39
- register uintmax_t accum; /* accumulates converted value */
40
- register int n; /* numeral from digit character */
41
- int minus; /* set iff minus sign seen */
42
- int toobig; /* set iff value overflows */
43
-
44
- if ( endptr != NULL )
45
- *endptr = (wchar_t *)nptr; /* in case no conv performed */
46
-
47
- if ( base < 0 || base == 1 || base > 36 )
48
- {
49
- errno = EDOM;
50
- return 0; /* unspecified behavior */
51
- }
52
-
53
- /* skip initial, possibly empty sequence of white-space w.characters */
54
-
55
- while ( iswspace(*nptr) )
56
- ++nptr;
57
-
58
- /* process subject sequence: */
59
-
60
- /* optional sign */
61
-
62
- if ( (minus = *nptr == L'-') || *nptr == L'+' )
63
- ++nptr;
64
-
65
- if ( base == 0 )
66
- {
67
- if ( *nptr == L'0' )
68
- {
69
- if ( nptr[1] == L'X' || nptr[1] == L'x' )
70
- base = 16;
71
- else
72
- base = 8;
73
- }
74
- else
75
- base = 10;
76
- }
77
- /* optional "0x" or "0X" for base 16 */
78
-
79
- if ( base == 16 && *nptr == L'0'
80
- && (nptr[1] == L'X' || nptr[1] == L'x')
81
- )
82
- nptr += 2; /* skip past this prefix */
83
-
84
- /* check whether there is at least one valid digit */
85
-
86
- n = ToWNumber(*nptr);
87
- ++nptr;
88
-
89
- if ( !valid(n, base) )
90
- return 0; /* subject seq. not of expected form */
91
-
92
- accum = n;
93
-
94
- for ( toobig = 0; n = ToWNumber(*nptr), valid(n, base); ++nptr )
95
- if ( accum > (uintmax_t)(INTMAX_MAX / base + 2) ) /* major wrap-around */
96
- toobig = 1; /* but keep scanning */
97
- else
98
- accum = base * accum + n;
99
-
100
- if ( endptr != NULL )
101
- *endptr = (wchar_t *)nptr; /* -> first not-valid-digit */
102
-
103
- if ( minus )
104
- {
105
- if ( accum > (uintmax_t)INTMAX_MAX + 1 )
106
- toobig = 1;
107
- }
108
- else
109
- if ( accum > (uintmax_t)INTMAX_MAX )
110
- toobig = 1;
111
-
112
- if ( toobig )
113
- {
114
- errno = ERANGE;
115
- return minus ? INTMAX_MIN : INTMAX_MAX;
116
- }
117
- else
118
- return (intmax_t)(minus ? -accum : accum);
119
- }
120
- intmax_t (__cdecl *__MINGW_IMP_SYMBOL(wcstoimax))(const wchar_t * __restrict__, wchar_t ** __restrict__, int) = wcstoimax;
121
-
122
- long long __attribute__ ((alias ("wcstoimax")))
123
- __cdecl
124
- wcstoll (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
125
- extern long long __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(wcstoimax)))))
126
- (__cdecl *__MINGW_IMP_SYMBOL(wcstoll))(const wchar_t * __restrict__, wchar_t ** __restrict__, int);
127
-
128
- long long __attribute__ ((alias ("wcstoimax")))
129
- __cdecl
130
- _wcstoi64 (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
131
- extern long long __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(wcstoimax)))))
132
- (__cdecl *__MINGW_IMP_SYMBOL(_wcstoi64))(const wchar_t * __restrict__, wchar_t ** __restrict__, int);
@@ -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;