triton-windows 3.3.0a0.post12__cp312-cp312-win_amd64.whl → 3.3.0a0.post13__cp312-cp312-win_amd64.whl
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.
Potentially problematic release.
This version of triton-windows might be problematic. Click here for more details.
- triton/_C/libtriton.pyd +0 -0
- triton/__init__.py +0 -12
- triton/backends/nvidia/compiler.py +3 -1
- triton/compiler/compiler.py +4 -4
- triton/runtime/build.py +29 -10
- triton/runtime/tcc/include/_mingw.h +170 -0
- triton/runtime/tcc/include/assert.h +57 -0
- triton/runtime/tcc/include/conio.h +409 -0
- triton/runtime/tcc/include/ctype.h +281 -0
- triton/runtime/tcc/include/dir.h +31 -0
- triton/runtime/tcc/include/direct.h +68 -0
- triton/runtime/tcc/include/dirent.h +135 -0
- triton/runtime/tcc/include/dos.h +55 -0
- triton/runtime/tcc/include/errno.h +75 -0
- triton/runtime/tcc/include/excpt.h +123 -0
- triton/runtime/tcc/include/fcntl.h +52 -0
- triton/runtime/tcc/include/fenv.h +108 -0
- triton/runtime/tcc/include/float.h +57 -0
- triton/runtime/tcc/include/inttypes.h +297 -0
- triton/runtime/tcc/include/io.h +418 -0
- triton/runtime/tcc/include/limits.h +111 -0
- triton/runtime/tcc/include/locale.h +91 -0
- triton/runtime/tcc/include/malloc.h +181 -0
- triton/runtime/tcc/include/math.h +737 -0
- triton/runtime/tcc/include/mem.h +13 -0
- triton/runtime/tcc/include/memory.h +40 -0
- triton/runtime/tcc/include/process.h +176 -0
- triton/runtime/tcc/include/sec_api/conio_s.h +42 -0
- triton/runtime/tcc/include/sec_api/crtdbg_s.h +19 -0
- triton/runtime/tcc/include/sec_api/io_s.h +33 -0
- triton/runtime/tcc/include/sec_api/mbstring_s.h +52 -0
- triton/runtime/tcc/include/sec_api/search_s.h +25 -0
- triton/runtime/tcc/include/sec_api/stdio_s.h +145 -0
- triton/runtime/tcc/include/sec_api/stdlib_s.h +67 -0
- triton/runtime/tcc/include/sec_api/stralign_s.h +30 -0
- triton/runtime/tcc/include/sec_api/string_s.h +41 -0
- triton/runtime/tcc/include/sec_api/sys/timeb_s.h +34 -0
- triton/runtime/tcc/include/sec_api/tchar_s.h +266 -0
- triton/runtime/tcc/include/sec_api/time_s.h +61 -0
- triton/runtime/tcc/include/sec_api/wchar_s.h +128 -0
- triton/runtime/tcc/include/setjmp.h +160 -0
- triton/runtime/tcc/include/share.h +28 -0
- triton/runtime/tcc/include/signal.h +63 -0
- triton/runtime/tcc/include/stdarg.h +79 -0
- triton/runtime/tcc/include/stdbool.h +11 -0
- triton/runtime/tcc/include/stddef.h +54 -0
- triton/runtime/tcc/include/stdint.h +212 -0
- triton/runtime/tcc/include/stdio.h +429 -0
- triton/runtime/tcc/include/stdlib.h +580 -0
- triton/runtime/tcc/include/string.h +164 -0
- triton/runtime/tcc/include/sys/fcntl.h +13 -0
- triton/runtime/tcc/include/sys/file.h +14 -0
- triton/runtime/tcc/include/sys/locking.h +30 -0
- triton/runtime/tcc/include/sys/stat.h +290 -0
- triton/runtime/tcc/include/sys/time.h +69 -0
- triton/runtime/tcc/include/sys/timeb.h +133 -0
- triton/runtime/tcc/include/sys/types.h +118 -0
- triton/runtime/tcc/include/sys/unistd.h +14 -0
- triton/runtime/tcc/include/sys/utime.h +146 -0
- triton/runtime/tcc/include/tcc/tcc_libm.h +201 -0
- triton/runtime/tcc/include/tcclib.h +80 -0
- triton/runtime/tcc/include/tchar.h +1102 -0
- triton/runtime/tcc/include/time.h +287 -0
- triton/runtime/tcc/include/vadefs.h +11 -0
- triton/runtime/tcc/include/values.h +4 -0
- triton/runtime/tcc/include/varargs.h +12 -0
- triton/runtime/tcc/include/wchar.h +873 -0
- triton/runtime/tcc/include/wctype.h +172 -0
- triton/runtime/tcc/include/winapi/basetsd.h +149 -0
- triton/runtime/tcc/include/winapi/basetyps.h +85 -0
- triton/runtime/tcc/include/winapi/guiddef.h +156 -0
- triton/runtime/tcc/include/winapi/poppack.h +8 -0
- triton/runtime/tcc/include/winapi/pshpack1.h +8 -0
- triton/runtime/tcc/include/winapi/pshpack2.h +8 -0
- triton/runtime/tcc/include/winapi/pshpack4.h +8 -0
- triton/runtime/tcc/include/winapi/pshpack8.h +8 -0
- triton/runtime/tcc/include/winapi/winbase.h +2951 -0
- triton/runtime/tcc/include/winapi/wincon.h +301 -0
- triton/runtime/tcc/include/winapi/windef.h +293 -0
- triton/runtime/tcc/include/winapi/windows.h +127 -0
- triton/runtime/tcc/include/winapi/winerror.h +3166 -0
- triton/runtime/tcc/include/winapi/wingdi.h +4080 -0
- triton/runtime/tcc/include/winapi/winnt.h +5835 -0
- triton/runtime/tcc/include/winapi/winreg.h +272 -0
- triton/runtime/tcc/include/winapi/winuser.h +5651 -0
- triton/runtime/tcc/include/winapi/winver.h +160 -0
- triton/runtime/tcc/lib/cuda.def +697 -0
- triton/runtime/tcc/lib/gdi32.def +337 -0
- triton/runtime/tcc/lib/kernel32.def +770 -0
- triton/runtime/tcc/lib/libtcc1-64.a +0 -0
- triton/runtime/tcc/lib/msvcrt.def +1399 -0
- triton/runtime/tcc/lib/python3.def +810 -0
- triton/runtime/tcc/lib/user32.def +658 -0
- triton/runtime/tcc/libtcc.dll +0 -0
- triton/runtime/tcc/tcc.exe +0 -0
- {triton_windows-3.3.0a0.post12.dist-info → triton_windows-3.3.0a0.post13.dist-info}/METADATA +1 -1
- {triton_windows-3.3.0a0.post12.dist-info → triton_windows-3.3.0a0.post13.dist-info}/RECORD +99 -9
- {triton_windows-3.3.0a0.post12.dist-info → triton_windows-3.3.0a0.post13.dist-info}/WHEEL +0 -0
- {triton_windows-3.3.0a0.post12.dist-info → triton_windows-3.3.0a0.post13.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file has no copyright assigned and is placed in the Public Domain.
|
|
3
|
+
* This file is part of the w64 mingw-runtime package.
|
|
4
|
+
* No warranty is given; refer to the file DISCLAIMER within this package.
|
|
5
|
+
*/
|
|
6
|
+
#ifndef _TIMEB_H_
|
|
7
|
+
#define _TIMEB_H_
|
|
8
|
+
|
|
9
|
+
#include <_mingw.h>
|
|
10
|
+
|
|
11
|
+
#ifndef _WIN32
|
|
12
|
+
#error Only Win32 target is supported!
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
#pragma pack(push,_CRT_PACKING)
|
|
16
|
+
|
|
17
|
+
#ifdef __cplusplus
|
|
18
|
+
extern "C" {
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
#ifndef _CRTIMP
|
|
22
|
+
#define _CRTIMP __declspec(dllimport)
|
|
23
|
+
#endif
|
|
24
|
+
|
|
25
|
+
#ifndef __TINYC__ /* gr */
|
|
26
|
+
#ifdef _USE_32BIT_TIME_T
|
|
27
|
+
#ifdef _WIN64
|
|
28
|
+
#undef _USE_32BIT_TIME_T
|
|
29
|
+
#endif
|
|
30
|
+
#else
|
|
31
|
+
#if _INTEGRAL_MAX_BITS < 64
|
|
32
|
+
#define _USE_32BIT_TIME_T
|
|
33
|
+
#endif
|
|
34
|
+
#endif
|
|
35
|
+
#endif
|
|
36
|
+
|
|
37
|
+
#ifndef _TIME32_T_DEFINED
|
|
38
|
+
typedef long __time32_t;
|
|
39
|
+
#define _TIME32_T_DEFINED
|
|
40
|
+
#endif
|
|
41
|
+
|
|
42
|
+
#ifndef _TIME64_T_DEFINED
|
|
43
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
|
44
|
+
typedef __int64 __time64_t;
|
|
45
|
+
#endif
|
|
46
|
+
#define _TIME64_T_DEFINED
|
|
47
|
+
#endif
|
|
48
|
+
|
|
49
|
+
#ifndef _TIME_T_DEFINED
|
|
50
|
+
#ifdef _USE_32BIT_TIME_T
|
|
51
|
+
typedef __time32_t time_t;
|
|
52
|
+
#else
|
|
53
|
+
typedef __time64_t time_t;
|
|
54
|
+
#endif
|
|
55
|
+
#define _TIME_T_DEFINED
|
|
56
|
+
#endif
|
|
57
|
+
|
|
58
|
+
#ifndef _TIMEB_DEFINED
|
|
59
|
+
#define _TIMEB_DEFINED
|
|
60
|
+
|
|
61
|
+
struct __timeb32 {
|
|
62
|
+
__time32_t time;
|
|
63
|
+
unsigned short millitm;
|
|
64
|
+
short timezone;
|
|
65
|
+
short dstflag;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
#ifndef NO_OLDNAMES
|
|
69
|
+
struct timeb {
|
|
70
|
+
time_t time;
|
|
71
|
+
unsigned short millitm;
|
|
72
|
+
short timezone;
|
|
73
|
+
short dstflag;
|
|
74
|
+
};
|
|
75
|
+
#endif
|
|
76
|
+
|
|
77
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
|
78
|
+
struct __timeb64 {
|
|
79
|
+
__time64_t time;
|
|
80
|
+
unsigned short millitm;
|
|
81
|
+
short timezone;
|
|
82
|
+
short dstflag;
|
|
83
|
+
};
|
|
84
|
+
#endif
|
|
85
|
+
|
|
86
|
+
#ifdef _USE_32BIT_TIME_T
|
|
87
|
+
#define _timeb __timeb32
|
|
88
|
+
//gr #define _ftime _ftime32
|
|
89
|
+
#define _ftime32 _ftime
|
|
90
|
+
#else
|
|
91
|
+
#define _timeb __timeb64
|
|
92
|
+
#define _ftime _ftime64
|
|
93
|
+
#endif
|
|
94
|
+
#endif
|
|
95
|
+
|
|
96
|
+
_CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time);
|
|
97
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
|
98
|
+
_CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time);
|
|
99
|
+
#endif
|
|
100
|
+
|
|
101
|
+
#ifndef _TIMESPEC_DEFINED
|
|
102
|
+
#define _TIMESPEC_DEFINED
|
|
103
|
+
struct timespec {
|
|
104
|
+
time_t tv_sec; /* Seconds */
|
|
105
|
+
long tv_nsec; /* Nanoseconds */
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
struct itimerspec {
|
|
109
|
+
struct timespec it_interval; /* Timer period */
|
|
110
|
+
struct timespec it_value; /* Timer expiration */
|
|
111
|
+
};
|
|
112
|
+
#endif
|
|
113
|
+
|
|
114
|
+
#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
|
|
115
|
+
#ifdef _USE_32BIT_TIME_T
|
|
116
|
+
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
|
|
117
|
+
_ftime32((struct __timeb32 *)_Tmb);
|
|
118
|
+
}
|
|
119
|
+
#else
|
|
120
|
+
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
|
|
121
|
+
_ftime64((struct __timeb64 *)_Tmb);
|
|
122
|
+
}
|
|
123
|
+
#endif
|
|
124
|
+
#endif
|
|
125
|
+
|
|
126
|
+
#ifdef __cplusplus
|
|
127
|
+
}
|
|
128
|
+
#endif
|
|
129
|
+
|
|
130
|
+
#pragma pack(pop)
|
|
131
|
+
|
|
132
|
+
#include <sec_api/sys/timeb_s.h>
|
|
133
|
+
#endif
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file has no copyright assigned and is placed in the Public Domain.
|
|
3
|
+
* This file is part of the w64 mingw-runtime package.
|
|
4
|
+
* No warranty is given; refer to the file DISCLAIMER within this package.
|
|
5
|
+
*/
|
|
6
|
+
#ifndef _INC_TYPES
|
|
7
|
+
#define _INC_TYPES
|
|
8
|
+
|
|
9
|
+
#ifndef _WIN32
|
|
10
|
+
#error Only Win32 target is supported!
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
#include <_mingw.h>
|
|
14
|
+
|
|
15
|
+
#ifndef __TINYC__ /* gr */
|
|
16
|
+
#ifdef _USE_32BIT_TIME_T
|
|
17
|
+
#ifdef _WIN64
|
|
18
|
+
#undef _USE_32BIT_TIME_T
|
|
19
|
+
#endif
|
|
20
|
+
#else
|
|
21
|
+
#if _INTEGRAL_MAX_BITS < 64
|
|
22
|
+
#define _USE_32BIT_TIME_T
|
|
23
|
+
#endif
|
|
24
|
+
#endif
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
#ifndef _TIME32_T_DEFINED
|
|
28
|
+
#define _TIME32_T_DEFINED
|
|
29
|
+
typedef long __time32_t;
|
|
30
|
+
#endif
|
|
31
|
+
|
|
32
|
+
#ifndef _TIME64_T_DEFINED
|
|
33
|
+
#define _TIME64_T_DEFINED
|
|
34
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
|
35
|
+
typedef __int64 __time64_t;
|
|
36
|
+
#endif
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
#ifndef _TIME_T_DEFINED
|
|
40
|
+
#define _TIME_T_DEFINED
|
|
41
|
+
#ifdef _USE_32BIT_TIME_T
|
|
42
|
+
typedef __time32_t time_t;
|
|
43
|
+
#else
|
|
44
|
+
typedef __time64_t time_t;
|
|
45
|
+
#endif
|
|
46
|
+
#endif
|
|
47
|
+
|
|
48
|
+
#ifndef _INO_T_DEFINED
|
|
49
|
+
#define _INO_T_DEFINED
|
|
50
|
+
typedef unsigned short _ino_t;
|
|
51
|
+
#ifndef NO_OLDNAMES
|
|
52
|
+
typedef unsigned short ino_t;
|
|
53
|
+
#endif
|
|
54
|
+
#endif
|
|
55
|
+
|
|
56
|
+
#ifndef _DEV_T_DEFINED
|
|
57
|
+
#define _DEV_T_DEFINED
|
|
58
|
+
typedef unsigned int _dev_t;
|
|
59
|
+
#ifndef NO_OLDNAMES
|
|
60
|
+
typedef unsigned int dev_t;
|
|
61
|
+
#endif
|
|
62
|
+
#endif
|
|
63
|
+
|
|
64
|
+
#ifndef _PID_T_
|
|
65
|
+
#define _PID_T_
|
|
66
|
+
#ifndef _WIN64
|
|
67
|
+
typedef int _pid_t;
|
|
68
|
+
#else
|
|
69
|
+
typedef __int64 _pid_t;
|
|
70
|
+
#endif
|
|
71
|
+
|
|
72
|
+
#ifndef NO_OLDNAMES
|
|
73
|
+
typedef _pid_t pid_t;
|
|
74
|
+
#endif
|
|
75
|
+
#endif /* Not _PID_T_ */
|
|
76
|
+
|
|
77
|
+
#ifndef _MODE_T_
|
|
78
|
+
#define _MODE_T_
|
|
79
|
+
typedef unsigned short _mode_t;
|
|
80
|
+
|
|
81
|
+
#ifndef NO_OLDNAMES
|
|
82
|
+
typedef _mode_t mode_t;
|
|
83
|
+
#endif
|
|
84
|
+
#endif /* Not _MODE_T_ */
|
|
85
|
+
|
|
86
|
+
#ifndef _OFF_T_DEFINED
|
|
87
|
+
#define _OFF_T_DEFINED
|
|
88
|
+
#ifndef _OFF_T_
|
|
89
|
+
#define _OFF_T_
|
|
90
|
+
typedef long _off_t;
|
|
91
|
+
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
|
92
|
+
typedef long off_t;
|
|
93
|
+
#endif
|
|
94
|
+
#endif
|
|
95
|
+
#endif
|
|
96
|
+
|
|
97
|
+
#ifndef _OFF64_T_DEFINED
|
|
98
|
+
#define _OFF64_T_DEFINED
|
|
99
|
+
typedef long long _off64_t;
|
|
100
|
+
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
|
101
|
+
typedef long long off64_t;
|
|
102
|
+
#endif
|
|
103
|
+
#endif
|
|
104
|
+
|
|
105
|
+
#ifndef _TIMESPEC_DEFINED
|
|
106
|
+
#define _TIMESPEC_DEFINED
|
|
107
|
+
struct timespec {
|
|
108
|
+
time_t tv_sec; /* Seconds */
|
|
109
|
+
long tv_nsec; /* Nanoseconds */
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
struct itimerspec {
|
|
113
|
+
struct timespec it_interval; /* Timer period */
|
|
114
|
+
struct timespec it_value; /* Timer expiration */
|
|
115
|
+
};
|
|
116
|
+
#endif
|
|
117
|
+
|
|
118
|
+
#endif
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file has no copyright assigned and is placed in the Public Domain.
|
|
3
|
+
* This file is part of the w64 mingw-runtime package.
|
|
4
|
+
* No warranty is given; refer to the file DISCLAIMER within this package.
|
|
5
|
+
*/
|
|
6
|
+
/*
|
|
7
|
+
* This file is part of the Mingw32 package.
|
|
8
|
+
*
|
|
9
|
+
* unistd.h maps (roughly) to io.h
|
|
10
|
+
*/
|
|
11
|
+
#ifndef __STRICT_ANSI__
|
|
12
|
+
#include <io.h>
|
|
13
|
+
#endif
|
|
14
|
+
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file has no copyright assigned and is placed in the Public Domain.
|
|
3
|
+
* This file is part of the w64 mingw-runtime package.
|
|
4
|
+
* No warranty is given; refer to the file DISCLAIMER within this package.
|
|
5
|
+
*/
|
|
6
|
+
#ifndef _INC_UTIME
|
|
7
|
+
#define _INC_UTIME
|
|
8
|
+
|
|
9
|
+
#ifndef _WIN32
|
|
10
|
+
#error Only Win32 target is supported!
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
#include <_mingw.h>
|
|
14
|
+
|
|
15
|
+
#pragma pack(push,_CRT_PACKING)
|
|
16
|
+
|
|
17
|
+
#ifdef __cplusplus
|
|
18
|
+
extern "C" {
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
#ifndef _CRTIMP
|
|
22
|
+
#define _CRTIMP __declspec(dllimport)
|
|
23
|
+
#endif
|
|
24
|
+
|
|
25
|
+
#ifndef _WCHAR_T_DEFINED
|
|
26
|
+
typedef unsigned short wchar_t;
|
|
27
|
+
#define _WCHAR_T_DEFINED
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
#ifndef __TINYC__ /* gr */
|
|
31
|
+
#ifdef _USE_32BIT_TIME_T
|
|
32
|
+
#ifdef _WIN64
|
|
33
|
+
#undef _USE_32BIT_TIME_T
|
|
34
|
+
#endif
|
|
35
|
+
#else
|
|
36
|
+
#if _INTEGRAL_MAX_BITS < 64
|
|
37
|
+
#define _USE_32BIT_TIME_T
|
|
38
|
+
#endif
|
|
39
|
+
#endif
|
|
40
|
+
#endif
|
|
41
|
+
|
|
42
|
+
#ifndef _TIME32_T_DEFINED
|
|
43
|
+
#define _TIME32_T_DEFINED
|
|
44
|
+
typedef long __time32_t;
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#ifndef _TIME64_T_DEFINED
|
|
48
|
+
#define _TIME64_T_DEFINED
|
|
49
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
|
50
|
+
typedef __int64 __time64_t;
|
|
51
|
+
#endif
|
|
52
|
+
#endif
|
|
53
|
+
|
|
54
|
+
#ifndef _TIME_T_DEFINED
|
|
55
|
+
#define _TIME_T_DEFINED
|
|
56
|
+
#ifdef _USE_32BIT_TIME_T
|
|
57
|
+
typedef __time32_t time_t;
|
|
58
|
+
#else
|
|
59
|
+
typedef __time64_t time_t;
|
|
60
|
+
#endif
|
|
61
|
+
#endif
|
|
62
|
+
|
|
63
|
+
#ifndef _UTIMBUF_DEFINED
|
|
64
|
+
#define _UTIMBUF_DEFINED
|
|
65
|
+
|
|
66
|
+
struct _utimbuf {
|
|
67
|
+
time_t actime;
|
|
68
|
+
time_t modtime;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
struct __utimbuf32 {
|
|
72
|
+
__time32_t actime;
|
|
73
|
+
__time32_t modtime;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
|
77
|
+
struct __utimbuf64 {
|
|
78
|
+
__time64_t actime;
|
|
79
|
+
__time64_t modtime;
|
|
80
|
+
};
|
|
81
|
+
#endif
|
|
82
|
+
|
|
83
|
+
#ifndef NO_OLDNAMES
|
|
84
|
+
struct utimbuf {
|
|
85
|
+
time_t actime;
|
|
86
|
+
time_t modtime;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
struct utimbuf32 {
|
|
90
|
+
__time32_t actime;
|
|
91
|
+
__time32_t modtime;
|
|
92
|
+
};
|
|
93
|
+
#endif
|
|
94
|
+
#endif
|
|
95
|
+
|
|
96
|
+
_CRTIMP int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Time);
|
|
97
|
+
_CRTIMP int __cdecl _futime32(int _FileDes,struct __utimbuf32 *_Time);
|
|
98
|
+
_CRTIMP int __cdecl _wutime32(const wchar_t *_Filename,struct __utimbuf32 *_Time);
|
|
99
|
+
#if _INTEGRAL_MAX_BITS >= 64
|
|
100
|
+
_CRTIMP int __cdecl _utime64(const char *_Filename,struct __utimbuf64 *_Time);
|
|
101
|
+
_CRTIMP int __cdecl _futime64(int _FileDes,struct __utimbuf64 *_Time);
|
|
102
|
+
_CRTIMP int __cdecl _wutime64(const wchar_t *_Filename,struct __utimbuf64 *_Time);
|
|
103
|
+
#endif
|
|
104
|
+
|
|
105
|
+
#ifndef RC_INVOKED
|
|
106
|
+
#ifdef _USE_32BIT_TIME_T
|
|
107
|
+
__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
|
|
108
|
+
return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
|
|
109
|
+
}
|
|
110
|
+
__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
|
|
111
|
+
return _futime32(_Desc,(struct __utimbuf32 *)_Utimbuf);
|
|
112
|
+
}
|
|
113
|
+
__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
|
|
114
|
+
return _wutime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
|
|
115
|
+
}
|
|
116
|
+
#else
|
|
117
|
+
__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
|
|
118
|
+
return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
|
|
119
|
+
}
|
|
120
|
+
__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
|
|
121
|
+
return _futime64(_Desc,(struct __utimbuf64 *)_Utimbuf);
|
|
122
|
+
}
|
|
123
|
+
__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
|
|
124
|
+
return _wutime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
|
|
125
|
+
}
|
|
126
|
+
#endif
|
|
127
|
+
|
|
128
|
+
#ifndef NO_OLDNAMES
|
|
129
|
+
#ifdef _USE_32BIT_TIME_T
|
|
130
|
+
__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
|
|
131
|
+
return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
|
|
132
|
+
}
|
|
133
|
+
#else
|
|
134
|
+
__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
|
|
135
|
+
return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
|
|
136
|
+
}
|
|
137
|
+
#endif
|
|
138
|
+
#endif
|
|
139
|
+
#endif
|
|
140
|
+
|
|
141
|
+
#ifdef __cplusplus
|
|
142
|
+
}
|
|
143
|
+
#endif
|
|
144
|
+
|
|
145
|
+
#pragma pack(pop)
|
|
146
|
+
#endif
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
#ifndef _TCC_LIBM_H_
|
|
2
|
+
#define _TCC_LIBM_H_
|
|
3
|
+
|
|
4
|
+
#include "../math.h"
|
|
5
|
+
|
|
6
|
+
/* TCC uses 8 bytes for double and long double, so effectively the l variants
|
|
7
|
+
* are never used. For now, they just run the normal (double) variant.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* most of the code in this file is taken from MUSL rs-1.0 (MIT license)
|
|
12
|
+
* - musl-libc: http://git.musl-libc.org/cgit/musl/tree/src/math?h=rs-1.0
|
|
13
|
+
* - License: http://git.musl-libc.org/cgit/musl/tree/COPYRIGHT?h=rs-1.0
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/*******************************************************************************
|
|
17
|
+
Start of code based on MUSL
|
|
18
|
+
*******************************************************************************/
|
|
19
|
+
/*
|
|
20
|
+
musl as a whole is licensed under the following standard MIT license:
|
|
21
|
+
|
|
22
|
+
----------------------------------------------------------------------
|
|
23
|
+
Copyright © 2005-2014 Rich Felker, et al.
|
|
24
|
+
|
|
25
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
26
|
+
a copy of this software and associated documentation files (the
|
|
27
|
+
"Software"), to deal in the Software without restriction, including
|
|
28
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
29
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
30
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
31
|
+
the following conditions:
|
|
32
|
+
|
|
33
|
+
The above copyright notice and this permission notice shall be
|
|
34
|
+
included in all copies or substantial portions of the Software.
|
|
35
|
+
|
|
36
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
37
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
38
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
39
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
40
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
41
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
42
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
43
|
+
----------------------------------------------------------------------
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/* fpclassify */
|
|
47
|
+
|
|
48
|
+
__CRT_INLINE int __cdecl __fpclassify (double x) {
|
|
49
|
+
union {double f; uint64_t i;} u = {x};
|
|
50
|
+
int e = u.i>>52 & 0x7ff;
|
|
51
|
+
if (!e) return u.i<<1 ? FP_SUBNORMAL : FP_ZERO;
|
|
52
|
+
if (e==0x7ff) return u.i<<12 ? FP_NAN : FP_INFINITE;
|
|
53
|
+
return FP_NORMAL;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
__CRT_INLINE int __cdecl __fpclassifyf (float x) {
|
|
57
|
+
union {float f; uint32_t i;} u = {x};
|
|
58
|
+
int e = u.i>>23 & 0xff;
|
|
59
|
+
if (!e) return u.i<<1 ? FP_SUBNORMAL : FP_ZERO;
|
|
60
|
+
if (e==0xff) return u.i<<9 ? FP_NAN : FP_INFINITE;
|
|
61
|
+
return FP_NORMAL;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
__CRT_INLINE int __cdecl __fpclassifyl (long double x) {
|
|
65
|
+
return __fpclassify(x);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/* signbit */
|
|
70
|
+
|
|
71
|
+
__CRT_INLINE int __cdecl __signbit (double x) {
|
|
72
|
+
union {double d; uint64_t i;} y = { x };
|
|
73
|
+
return y.i>>63;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
__CRT_INLINE int __cdecl __signbitf (float x) {
|
|
77
|
+
union {float f; uint32_t i; } y = { x };
|
|
78
|
+
return y.i>>31;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
__CRT_INLINE int __cdecl __signbitl (long double x) {
|
|
82
|
+
return __signbit(x);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
/* fmin*, fmax* */
|
|
87
|
+
|
|
88
|
+
#define TCCFP_FMIN_EVAL (isnan(x) ? y : \
|
|
89
|
+
isnan(y) ? x : \
|
|
90
|
+
(signbit(x) != signbit(y)) ? (signbit(x) ? x : y) : \
|
|
91
|
+
x < y ? x : y)
|
|
92
|
+
|
|
93
|
+
__CRT_INLINE double __cdecl fmin (double x, double y) {
|
|
94
|
+
return TCCFP_FMIN_EVAL;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
__CRT_INLINE float __cdecl fminf (float x, float y) {
|
|
98
|
+
return TCCFP_FMIN_EVAL;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
__CRT_INLINE long double __cdecl fminl (long double x, long double y) {
|
|
102
|
+
return TCCFP_FMIN_EVAL;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
#define TCCFP_FMAX_EVAL (isnan(x) ? y : \
|
|
106
|
+
isnan(y) ? x : \
|
|
107
|
+
(signbit(x) != signbit(y)) ? (signbit(x) ? y : x) : \
|
|
108
|
+
x < y ? y : x)
|
|
109
|
+
|
|
110
|
+
__CRT_INLINE double __cdecl fmax (double x, double y) {
|
|
111
|
+
return TCCFP_FMAX_EVAL;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
__CRT_INLINE float __cdecl fmaxf (float x, float y) {
|
|
115
|
+
return TCCFP_FMAX_EVAL;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
__CRT_INLINE long double __cdecl fmaxl (long double x, long double y) {
|
|
119
|
+
return TCCFP_FMAX_EVAL;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
/* *round* */
|
|
124
|
+
|
|
125
|
+
#define TCCFP_FORCE_EVAL(x) do { \
|
|
126
|
+
if (sizeof(x) == sizeof(float)) { \
|
|
127
|
+
volatile float __x; \
|
|
128
|
+
__x = (x); \
|
|
129
|
+
} else if (sizeof(x) == sizeof(double)) { \
|
|
130
|
+
volatile double __x; \
|
|
131
|
+
__x = (x); \
|
|
132
|
+
} else { \
|
|
133
|
+
volatile long double __x; \
|
|
134
|
+
__x = (x); \
|
|
135
|
+
} \
|
|
136
|
+
} while(0)
|
|
137
|
+
|
|
138
|
+
__CRT_INLINE double __cdecl round (double x) {
|
|
139
|
+
union {double f; uint64_t i;} u = {x};
|
|
140
|
+
int e = u.i >> 52 & 0x7ff;
|
|
141
|
+
double y;
|
|
142
|
+
|
|
143
|
+
if (e >= 0x3ff+52)
|
|
144
|
+
return x;
|
|
145
|
+
if (u.i >> 63)
|
|
146
|
+
x = -x;
|
|
147
|
+
if (e < 0x3ff-1) {
|
|
148
|
+
/* raise inexact if x!=0 */
|
|
149
|
+
TCCFP_FORCE_EVAL(x + 0x1p52);
|
|
150
|
+
return 0*u.f;
|
|
151
|
+
}
|
|
152
|
+
y = (double)(x + 0x1p52) - 0x1p52 - x;
|
|
153
|
+
if (y > 0.5)
|
|
154
|
+
y = y + x - 1;
|
|
155
|
+
else if (y <= -0.5)
|
|
156
|
+
y = y + x + 1;
|
|
157
|
+
else
|
|
158
|
+
y = y + x;
|
|
159
|
+
if (u.i >> 63)
|
|
160
|
+
y = -y;
|
|
161
|
+
return y;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
__CRT_INLINE long __cdecl lround (double x) {
|
|
165
|
+
return round(x);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
__CRT_INLINE long long __cdecl llround (double x) {
|
|
169
|
+
return round(x);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
__CRT_INLINE float __cdecl roundf (float x) {
|
|
173
|
+
return round(x);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
__CRT_INLINE long __cdecl lroundf (float x) {
|
|
177
|
+
return round(x);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
__CRT_INLINE long long __cdecl llroundf (float x) {
|
|
181
|
+
return round(x);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
__CRT_INLINE long double __cdecl roundl (long double x) {
|
|
185
|
+
return round(x);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
__CRT_INLINE long __cdecl lroundl (long double x) {
|
|
189
|
+
return round(x);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
__CRT_INLINE long long __cdecl llroundl (long double x) {
|
|
193
|
+
return round(x);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
/*******************************************************************************
|
|
198
|
+
End of code based on MUSL
|
|
199
|
+
*******************************************************************************/
|
|
200
|
+
|
|
201
|
+
#endif /* _TCC_LIBM_H_ */
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* Simple libc header for TCC
|
|
2
|
+
*
|
|
3
|
+
* Add any function you want from the libc there. This file is here
|
|
4
|
+
* only for your convenience so that you do not need to put the whole
|
|
5
|
+
* glibc include files on your floppy disk
|
|
6
|
+
*/
|
|
7
|
+
#ifndef _TCCLIB_H
|
|
8
|
+
#define _TCCLIB_H
|
|
9
|
+
|
|
10
|
+
#include <stddef.h>
|
|
11
|
+
#include <stdarg.h>
|
|
12
|
+
|
|
13
|
+
/* stdlib.h */
|
|
14
|
+
void *calloc(size_t nmemb, size_t size);
|
|
15
|
+
void *malloc(size_t size);
|
|
16
|
+
void free(void *ptr);
|
|
17
|
+
void *realloc(void *ptr, size_t size);
|
|
18
|
+
int atoi(const char *nptr);
|
|
19
|
+
long int strtol(const char *nptr, char **endptr, int base);
|
|
20
|
+
unsigned long int strtoul(const char *nptr, char **endptr, int base);
|
|
21
|
+
void exit(int);
|
|
22
|
+
|
|
23
|
+
/* stdio.h */
|
|
24
|
+
typedef struct __FILE FILE;
|
|
25
|
+
#define EOF (-1)
|
|
26
|
+
extern FILE *stdin;
|
|
27
|
+
extern FILE *stdout;
|
|
28
|
+
extern FILE *stderr;
|
|
29
|
+
FILE *fopen(const char *path, const char *mode);
|
|
30
|
+
FILE *fdopen(int fildes, const char *mode);
|
|
31
|
+
FILE *freopen(const char *path, const char *mode, FILE *stream);
|
|
32
|
+
int fclose(FILE *stream);
|
|
33
|
+
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
|
|
34
|
+
size_t fwrite(void *ptr, size_t size, size_t nmemb, FILE *stream);
|
|
35
|
+
int fgetc(FILE *stream);
|
|
36
|
+
char *fgets(char *s, int size, FILE *stream);
|
|
37
|
+
int getc(FILE *stream);
|
|
38
|
+
int getchar(void);
|
|
39
|
+
char *gets(char *s);
|
|
40
|
+
int ungetc(int c, FILE *stream);
|
|
41
|
+
int fflush(FILE *stream);
|
|
42
|
+
int putchar (int c);
|
|
43
|
+
|
|
44
|
+
int printf(const char *format, ...);
|
|
45
|
+
int fprintf(FILE *stream, const char *format, ...);
|
|
46
|
+
int sprintf(char *str, const char *format, ...);
|
|
47
|
+
int snprintf(char *str, size_t size, const char *format, ...);
|
|
48
|
+
int asprintf(char **strp, const char *format, ...);
|
|
49
|
+
int dprintf(int fd, const char *format, ...);
|
|
50
|
+
int vprintf(const char *format, va_list ap);
|
|
51
|
+
int vfprintf(FILE *stream, const char *format, va_list ap);
|
|
52
|
+
int vsprintf(char *str, const char *format, va_list ap);
|
|
53
|
+
int vsnprintf(char *str, size_t size, const char *format, va_list ap);
|
|
54
|
+
int vasprintf(char **strp, const char *format, va_list ap);
|
|
55
|
+
int vdprintf(int fd, const char *format, va_list ap);
|
|
56
|
+
|
|
57
|
+
void perror(const char *s);
|
|
58
|
+
|
|
59
|
+
/* string.h */
|
|
60
|
+
char *strcat(char *dest, const char *src);
|
|
61
|
+
char *strchr(const char *s, int c);
|
|
62
|
+
char *strrchr(const char *s, int c);
|
|
63
|
+
char *strcpy(char *dest, const char *src);
|
|
64
|
+
void *memcpy(void *dest, const void *src, size_t n);
|
|
65
|
+
void *memmove(void *dest, const void *src, size_t n);
|
|
66
|
+
void *memset(void *s, int c, size_t n);
|
|
67
|
+
char *strdup(const char *s);
|
|
68
|
+
size_t strlen(const char *s);
|
|
69
|
+
|
|
70
|
+
/* dlfcn.h */
|
|
71
|
+
#define RTLD_LAZY 0x001
|
|
72
|
+
#define RTLD_NOW 0x002
|
|
73
|
+
#define RTLD_GLOBAL 0x100
|
|
74
|
+
|
|
75
|
+
void *dlopen(const char *filename, int flag);
|
|
76
|
+
const char *dlerror(void);
|
|
77
|
+
void *dlsym(void *handle, char *symbol);
|
|
78
|
+
int dlclose(void *handle);
|
|
79
|
+
|
|
80
|
+
#endif /* _TCCLIB_H */
|