standalone-ruby 1.3.1 → 1.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -23
- data/bin/standalone-ruby +3 -3
- data/lib/data/exe_template/launcher_stub.c +35 -0
- data/lib/data/exe_template/launcher_stub.cpp +9 -0
- data/lib/data/tcc/include/_mingw.h +54 -0
- data/lib/data/tcc/include/assert.h +71 -0
- data/lib/data/tcc/include/conio.h +159 -0
- data/lib/data/tcc/include/ctype.h +232 -0
- data/lib/data/tcc/include/dir.h +26 -0
- data/lib/data/tcc/include/direct.h +95 -0
- data/lib/data/tcc/include/dirent.h +96 -0
- data/lib/data/tcc/include/dos.h +110 -0
- data/lib/data/tcc/include/errno.h +117 -0
- data/lib/data/tcc/include/excpt.h +20 -0
- data/lib/data/tcc/include/fcntl.h +135 -0
- data/lib/data/tcc/include/fenv.h +85 -0
- data/lib/data/tcc/include/float.h +224 -0
- data/lib/data/tcc/include/inttypes.h +275 -0
- data/lib/data/tcc/include/io.h +296 -0
- data/lib/data/tcc/include/limits.h +115 -0
- data/lib/data/tcc/include/locale.h +100 -0
- data/lib/data/tcc/include/malloc.h +87 -0
- data/lib/data/tcc/include/math.h +438 -0
- data/lib/data/tcc/include/mem.h +8 -0
- data/lib/data/tcc/include/memory.h +9 -0
- data/lib/data/tcc/include/process.h +158 -0
- data/lib/data/tcc/include/setjmp.h +72 -0
- data/lib/data/tcc/include/share.h +44 -0
- data/lib/data/tcc/include/signal.h +111 -0
- data/lib/data/tcc/include/stdarg.h +16 -0
- data/lib/data/tcc/include/stdbool.h +10 -0
- data/lib/data/tcc/include/stddef.h +26 -0
- data/lib/data/tcc/include/stdint.h +184 -0
- data/lib/data/tcc/include/stdio.h +413 -0
- data/lib/data/tcc/include/stdlib.h +482 -0
- data/lib/data/tcc/include/string.h +206 -0
- data/lib/data/tcc/include/sys/fcntl.h +8 -0
- data/lib/data/tcc/include/sys/file.h +9 -0
- data/lib/data/tcc/include/sys/locking.h +52 -0
- data/lib/data/tcc/include/sys/stat.h +190 -0
- data/lib/data/tcc/include/sys/time.h +3 -0
- data/lib/data/tcc/include/sys/timeb.h +82 -0
- data/lib/data/tcc/include/sys/types.h +118 -0
- data/lib/data/tcc/include/sys/unistd.h +9 -0
- data/lib/data/tcc/include/sys/utime.h +89 -0
- data/lib/data/tcc/include/tchar.h +367 -0
- data/lib/data/tcc/include/time.h +219 -0
- data/lib/data/tcc/include/unistd.h +10 -0
- data/lib/data/tcc/include/values.h +4 -0
- data/lib/data/tcc/include/varargs.h +11 -0
- data/lib/data/tcc/include/wchar.h +318 -0
- data/lib/data/tcc/include/wctype.h +127 -0
- data/lib/data/tcc/include/winapi/basetsd.h +119 -0
- data/lib/data/tcc/include/winapi/basetyps.h +144 -0
- data/lib/data/tcc/include/winapi/winbase.h +1852 -0
- data/lib/data/tcc/include/winapi/wincon.h +207 -0
- data/lib/data/tcc/include/winapi/windef.h +240 -0
- data/lib/data/tcc/include/winapi/windows.h +176 -0
- data/lib/data/tcc/include/winapi/winerror.h +1054 -0
- data/lib/data/tcc/include/winapi/wingdi.h +2843 -0
- data/lib/data/tcc/include/winapi/winnetwk.h +346 -0
- data/lib/data/tcc/include/winapi/winnls.h +651 -0
- data/lib/data/tcc/include/winapi/winnt.h +2667 -0
- data/lib/data/tcc/include/winapi/winreg.h +159 -0
- data/lib/data/tcc/include/winapi/winsvc.h +309 -0
- data/lib/data/tcc/include/winapi/winuser.h +3472 -0
- data/lib/data/tcc/include/winapi/winver.h +133 -0
- data/lib/data/tcc/lib/gdi32.def +337 -0
- data/lib/data/tcc/lib/kernel32.def +763 -0
- data/lib/data/tcc/lib/libtcc1.a +0 -0
- data/lib/data/tcc/lib/msvcrt.def +782 -0
- data/lib/data/tcc/lib/user32.def +654 -0
- data/lib/data/tcc/tcc.exe +0 -0
- data/lib/data/tcc/tiny_impdef.exe +0 -0
- data/lib/data/tcc/tiny_libmaker.exe +0 -0
- data/lib/data/vbs/default_vbs.txt +1 -1
- data/lib/data/vbs/vbs_gui.txt +1 -1
- data/lib/standalone_ruby.rb +6 -6
- data/lib/utils/config_generator.rb +5 -0
- data/lib/utils/displayer.rb +61 -59
- data/lib/utils/exe_packer.rb +68 -0
- data/lib/utils/launcher.rb +15 -16
- data/lib/utils/launcher_handler.rb +2 -0
- data/lib/utils/logger_helper.rb +24 -24
- data/lib/utils/parameter_parser.rb +206 -201
- data/lib/utils/ruby_copy.rb +26 -26
- metadata +77 -3
- data/lib/data/bat/default_bat.txt +0 -9
@@ -0,0 +1,438 @@
|
|
1
|
+
/*
|
2
|
+
* math.h
|
3
|
+
*
|
4
|
+
* Mathematical functions.
|
5
|
+
*
|
6
|
+
* This file is part of the Mingw32 package.
|
7
|
+
*
|
8
|
+
* Contributors:
|
9
|
+
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
10
|
+
*
|
11
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
12
|
+
*
|
13
|
+
* This source code is offered for use in the public domain. You may
|
14
|
+
* use, modify or distribute it freely.
|
15
|
+
*
|
16
|
+
* This code is distributed in the hope that it will be useful but
|
17
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
18
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
20
|
+
*
|
21
|
+
* $Revision: 1.2 $
|
22
|
+
* $Author: bellard $
|
23
|
+
* $Date: 2005/04/17 13:14:29 $
|
24
|
+
*
|
25
|
+
*/
|
26
|
+
|
27
|
+
#ifndef _MATH_H_
|
28
|
+
#define _MATH_H_
|
29
|
+
|
30
|
+
/* All the headers include this file. */
|
31
|
+
#include <_mingw.h>
|
32
|
+
|
33
|
+
/*
|
34
|
+
* Types for the _exception structure.
|
35
|
+
*/
|
36
|
+
|
37
|
+
#define _DOMAIN 1 /* domain error in argument */
|
38
|
+
#define _SING 2 /* singularity */
|
39
|
+
#define _OVERFLOW 3 /* range overflow */
|
40
|
+
#define _UNDERFLOW 4 /* range underflow */
|
41
|
+
#define _TLOSS 5 /* total loss of precision */
|
42
|
+
#define _PLOSS 6 /* partial loss of precision */
|
43
|
+
|
44
|
+
/*
|
45
|
+
* Exception types with non-ANSI names for compatibility.
|
46
|
+
*/
|
47
|
+
|
48
|
+
#ifndef __STRICT_ANSI__
|
49
|
+
#ifndef _NO_OLDNAMES
|
50
|
+
|
51
|
+
#define DOMAIN _DOMAIN
|
52
|
+
#define SING _SING
|
53
|
+
#define OVERFLOW _OVERFLOW
|
54
|
+
#define UNDERFLOW _UNDERFLOW
|
55
|
+
#define TLOSS _TLOSS
|
56
|
+
#define PLOSS _PLOSS
|
57
|
+
|
58
|
+
#endif /* Not _NO_OLDNAMES */
|
59
|
+
#endif /* Not __STRICT_ANSI__ */
|
60
|
+
|
61
|
+
|
62
|
+
/* These are also defined in Mingw float.h; needed here as well to work
|
63
|
+
around GCC build issues. */
|
64
|
+
#ifndef __STRICT_ANSI__
|
65
|
+
#ifndef __MINGW_FPCLASS_DEFINED
|
66
|
+
#define __MINGW_FPCLASS_DEFINED 1
|
67
|
+
/* IEEE 754 classication */
|
68
|
+
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
|
69
|
+
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
|
70
|
+
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
|
71
|
+
#define _FPCLASS_NN 0x0008 /* Negative Normal */
|
72
|
+
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
|
73
|
+
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
|
74
|
+
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
|
75
|
+
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
|
76
|
+
#define _FPCLASS_PN 0x0100 /* Positive Normal */
|
77
|
+
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
|
78
|
+
#endif /* __MINGW_FPCLASS_DEFINED */
|
79
|
+
#endif /* Not __STRICT_ANSI__ */
|
80
|
+
|
81
|
+
#ifndef RC_INVOKED
|
82
|
+
|
83
|
+
#ifdef __cplusplus
|
84
|
+
extern "C" {
|
85
|
+
#endif
|
86
|
+
|
87
|
+
/*
|
88
|
+
* HUGE_VAL is returned by strtod when the value would overflow the
|
89
|
+
* representation of 'double'. There are other uses as well.
|
90
|
+
*
|
91
|
+
* __imp__HUGE is a pointer to the actual variable _HUGE in
|
92
|
+
* MSVCRT.DLL. If we used _HUGE directly we would get a pointer
|
93
|
+
* to a thunk function.
|
94
|
+
*
|
95
|
+
* NOTE: The CRTDLL version uses _HUGE_dll instead.
|
96
|
+
*/
|
97
|
+
|
98
|
+
#ifndef __DECLSPEC_SUPPORTED
|
99
|
+
|
100
|
+
#ifdef __MSVCRT__
|
101
|
+
extern double* __imp__HUGE;
|
102
|
+
#define HUGE_VAL (*__imp__HUGE)
|
103
|
+
#else
|
104
|
+
/* CRTDLL */
|
105
|
+
extern double* __imp__HUGE_dll;
|
106
|
+
#define HUGE_VAL (*__imp__HUGE_dll)
|
107
|
+
#endif
|
108
|
+
|
109
|
+
#else /* __DECLSPEC_SUPPORTED */
|
110
|
+
|
111
|
+
#ifdef __MSVCRT__
|
112
|
+
__MINGW_IMPORT double _HUGE;
|
113
|
+
#define HUGE_VAL _HUGE
|
114
|
+
#else
|
115
|
+
/* CRTDLL */
|
116
|
+
__MINGW_IMPORT double _HUGE_dll;
|
117
|
+
#define HUGE_VAL _HUGE_dll
|
118
|
+
#endif
|
119
|
+
|
120
|
+
#endif /* __DECLSPEC_SUPPORTED */
|
121
|
+
|
122
|
+
struct _exception
|
123
|
+
{
|
124
|
+
int type;
|
125
|
+
char *name;
|
126
|
+
double arg1;
|
127
|
+
double arg2;
|
128
|
+
double retval;
|
129
|
+
};
|
130
|
+
|
131
|
+
|
132
|
+
double sin (double);
|
133
|
+
double cos (double);
|
134
|
+
double tan (double);
|
135
|
+
double sinh (double);
|
136
|
+
double cosh (double);
|
137
|
+
double tanh (double);
|
138
|
+
double asin (double);
|
139
|
+
double acos (double);
|
140
|
+
double atan (double);
|
141
|
+
double atan2 (double, double);
|
142
|
+
double exp (double);
|
143
|
+
double log (double);
|
144
|
+
double log10 (double);
|
145
|
+
double pow (double, double);
|
146
|
+
double sqrt (double);
|
147
|
+
double ceil (double);
|
148
|
+
double floor (double);
|
149
|
+
double fabs (double);
|
150
|
+
double ldexp (double, int);
|
151
|
+
double frexp (double, int*);
|
152
|
+
double modf (double, double*);
|
153
|
+
double fmod (double, double);
|
154
|
+
|
155
|
+
|
156
|
+
#ifndef __STRICT_ANSI__
|
157
|
+
|
158
|
+
/* Complex number (for cabs) */
|
159
|
+
struct _complex
|
160
|
+
{
|
161
|
+
double x; /* Real part */
|
162
|
+
double y; /* Imaginary part */
|
163
|
+
};
|
164
|
+
|
165
|
+
double _cabs (struct _complex);
|
166
|
+
double _hypot (double, double);
|
167
|
+
double _j0 (double);
|
168
|
+
double _j1 (double);
|
169
|
+
double _jn (int, double);
|
170
|
+
double _y0 (double);
|
171
|
+
double _y1 (double);
|
172
|
+
double _yn (int, double);
|
173
|
+
int _matherr (struct _exception *);
|
174
|
+
|
175
|
+
/* These are also declared in Mingw float.h; needed here as well to work
|
176
|
+
around GCC build issues. */
|
177
|
+
/* BEGIN FLOAT.H COPY */
|
178
|
+
/*
|
179
|
+
* IEEE recommended functions
|
180
|
+
*/
|
181
|
+
|
182
|
+
double _chgsign (double);
|
183
|
+
double _copysign (double, double);
|
184
|
+
double _logb (double);
|
185
|
+
double _nextafter (double, double);
|
186
|
+
double _scalb (double, long);
|
187
|
+
|
188
|
+
int _finite (double);
|
189
|
+
int _fpclass (double);
|
190
|
+
int _isnan (double);
|
191
|
+
|
192
|
+
/* END FLOAT.H COPY */
|
193
|
+
|
194
|
+
#if !defined (_NO_OLDNAMES) \
|
195
|
+
|| (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L )
|
196
|
+
|
197
|
+
/*
|
198
|
+
* Non-underscored versions of non-ANSI functions. These reside in
|
199
|
+
* liboldnames.a. They are now also ISO C99 standand names.
|
200
|
+
* Provided for extra portability.
|
201
|
+
*/
|
202
|
+
|
203
|
+
double cabs (struct _complex);
|
204
|
+
double hypot (double, double);
|
205
|
+
double j0 (double);
|
206
|
+
double j1 (double);
|
207
|
+
double jn (int, double);
|
208
|
+
double y0 (double);
|
209
|
+
double y1 (double);
|
210
|
+
double yn (int, double);
|
211
|
+
|
212
|
+
#endif /* Not _NO_OLDNAMES */
|
213
|
+
|
214
|
+
#endif /* Not __STRICT_ANSI__ */
|
215
|
+
|
216
|
+
#ifdef __cplusplus
|
217
|
+
}
|
218
|
+
#endif
|
219
|
+
#endif /* Not RC_INVOKED */
|
220
|
+
|
221
|
+
|
222
|
+
#ifndef __NO_ISOCEXT
|
223
|
+
|
224
|
+
#define INFINITY HUGE_VAL
|
225
|
+
#define NAN (0.0F/0.0F)
|
226
|
+
|
227
|
+
/*
|
228
|
+
Return values for fpclassify.
|
229
|
+
These are based on Intel x87 fpu condition codes
|
230
|
+
in the high byte of status word and differ from
|
231
|
+
the return values for MS IEEE 754 extension _fpclass()
|
232
|
+
*/
|
233
|
+
#define FP_NAN 0x0100
|
234
|
+
#define FP_NORMAL 0x0400
|
235
|
+
#define FP_INFINITE (FP_NAN | FP_NORMAL)
|
236
|
+
#define FP_ZERO 0x4000
|
237
|
+
#define FP_SUBNORMAL (FP_NORMAL | FP_ZERO)
|
238
|
+
/* 0x0200 is signbit mask */
|
239
|
+
|
240
|
+
#ifndef RC_INVOKED
|
241
|
+
#ifdef __cplusplus
|
242
|
+
extern "C" {
|
243
|
+
#endif
|
244
|
+
|
245
|
+
double nan(const char *tagp);
|
246
|
+
float nanf(const char *tagp);
|
247
|
+
|
248
|
+
#ifndef __STRICT_ANSI__
|
249
|
+
#define nan() nan("")
|
250
|
+
#define nanf() nanf("")
|
251
|
+
#endif
|
252
|
+
|
253
|
+
|
254
|
+
/*
|
255
|
+
We can't inline float, because we want to ensure truncation
|
256
|
+
to semantic type before classification. If we extend to long
|
257
|
+
double, we will also need to make double extern only.
|
258
|
+
(A normal long double value might become subnormal when
|
259
|
+
converted to double, and zero when converted to float.)
|
260
|
+
*/
|
261
|
+
extern __inline__ int __fpclassify (double x){
|
262
|
+
unsigned short sw;
|
263
|
+
__asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
|
264
|
+
return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
|
265
|
+
}
|
266
|
+
|
267
|
+
extern int __fpclassifyf (float);
|
268
|
+
|
269
|
+
#define fpclassify(x) ((sizeof(x) == sizeof(float)) ? __fpclassifyf(x) \
|
270
|
+
: __fpclassify(x))
|
271
|
+
|
272
|
+
/* We don't need to worry about trucation here:
|
273
|
+
A NaN stays a NaN. */
|
274
|
+
|
275
|
+
extern __inline__ int __isnan (double _x)
|
276
|
+
{
|
277
|
+
unsigned short sw;
|
278
|
+
__asm__ ("fxam;"
|
279
|
+
"fstsw %%ax": "=a" (sw) : "t" (_x));
|
280
|
+
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
281
|
+
== FP_NAN;
|
282
|
+
}
|
283
|
+
|
284
|
+
extern __inline__ int __isnanf (float _x)
|
285
|
+
{
|
286
|
+
unsigned short sw;
|
287
|
+
__asm__ ("fxam;"
|
288
|
+
"fstsw %%ax": "=a" (sw) : "t" (_x));
|
289
|
+
return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
|
290
|
+
== FP_NAN;
|
291
|
+
}
|
292
|
+
|
293
|
+
#define isnan(x) ((sizeof(x) == sizeof(float)) ? __isnanf(x) \
|
294
|
+
: __isnan(x))
|
295
|
+
|
296
|
+
|
297
|
+
#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
|
298
|
+
#define isinf(x) (fpclassify(x) == FP_INFINITE)
|
299
|
+
#define isnormal(x) (fpclassify(x) == FP_NORMAL)
|
300
|
+
|
301
|
+
|
302
|
+
extern __inline__ int __signbit (double x) {
|
303
|
+
unsigned short stw;
|
304
|
+
__asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
|
305
|
+
return stw & 0x0200;
|
306
|
+
}
|
307
|
+
|
308
|
+
extern __inline__ int __signbitf (float x) {
|
309
|
+
unsigned short stw;
|
310
|
+
__asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
|
311
|
+
return stw & 0x0200;
|
312
|
+
}
|
313
|
+
|
314
|
+
#define signbit(x) ((sizeof(x) == sizeof(float)) ? __signbitf(x) \
|
315
|
+
: __signbit(x))
|
316
|
+
/*
|
317
|
+
* With these functions, comparisons involving quiet NaNs set the FP
|
318
|
+
* condition code to "unordered". The IEEE floating-point spec
|
319
|
+
* dictates that the result of floating-point comparisons should be
|
320
|
+
* false whenever a NaN is involved, with the exception of the !=,
|
321
|
+
* which always returns true.
|
322
|
+
*/
|
323
|
+
|
324
|
+
#if __GNUC__ >= 3
|
325
|
+
|
326
|
+
#define isgreater(x, y) __builtin_isgreater(x, y)
|
327
|
+
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
|
328
|
+
#define isless(x, y) __builtin_isless(x, y)
|
329
|
+
#define islessequal(x, y) __builtin_islessequal(x, y)
|
330
|
+
#define islessgreater(x, y) __builtin_islessgreater(x, y)
|
331
|
+
#define isunordered(x, y) __builtin_isunordered(x, y)
|
332
|
+
|
333
|
+
#else
|
334
|
+
/* helper */
|
335
|
+
extern __inline__ int __fp_unordered_compare (double x, double y){
|
336
|
+
unsigned short retval;
|
337
|
+
__asm__ ("fucom %%st(1);"
|
338
|
+
"fnstsw;": "=a" (retval) : "t" (x), "u" (y));
|
339
|
+
return retval;
|
340
|
+
}
|
341
|
+
|
342
|
+
#define isgreater(x, y) ((__fp_unordered_compare(x, y) \
|
343
|
+
& 0x4500) == 0)
|
344
|
+
#define isless(x, y) ((__fp_unordered_compare (y, x) \
|
345
|
+
& 0x4500) == 0)
|
346
|
+
#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
|
347
|
+
& FP_INFINITE) == 0)
|
348
|
+
#define islessequal(x, y) ((__fp_unordered_compare(y, x) \
|
349
|
+
& FP_INFINITE) == 0)
|
350
|
+
#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
|
351
|
+
& FP_SUBNORMAL) == 0)
|
352
|
+
#define isunordered(x, y) ((__fp_unordered_compare(x, y) \
|
353
|
+
& 0x4500) == 0x4500)
|
354
|
+
|
355
|
+
#endif
|
356
|
+
|
357
|
+
/* round, using fpu control word settings */
|
358
|
+
extern __inline__ double rint (double x)
|
359
|
+
{
|
360
|
+
double retval;
|
361
|
+
__asm__ ("frndint;": "=t" (retval) : "0" (x));
|
362
|
+
return retval;
|
363
|
+
}
|
364
|
+
|
365
|
+
extern __inline__ float rintf (float x)
|
366
|
+
{
|
367
|
+
float retval;
|
368
|
+
__asm__ ("frndint;" : "=t" (retval) : "0" (x) );
|
369
|
+
return retval;
|
370
|
+
}
|
371
|
+
|
372
|
+
/* round away from zero, regardless of fpu control word settings */
|
373
|
+
extern double round (double);
|
374
|
+
extern float roundf (float);
|
375
|
+
|
376
|
+
/* round towards zero, regardless of fpu control word settings */
|
377
|
+
extern double trunc (double);
|
378
|
+
extern float truncf (float);
|
379
|
+
|
380
|
+
|
381
|
+
/* fmax and fmin.
|
382
|
+
NaN arguments are treated as missing data: if one argument is a NaN and the other numeric, then the
|
383
|
+
these functions choose the numeric value.
|
384
|
+
*/
|
385
|
+
|
386
|
+
extern double fmax (double, double);
|
387
|
+
extern double fmin (double, double);
|
388
|
+
extern float fmaxf (float, float);
|
389
|
+
float fminf (float, float);
|
390
|
+
|
391
|
+
/* return x * y + z as a ternary op */
|
392
|
+
extern double fma (double, double, double);
|
393
|
+
extern float fmaf (float, float, float);
|
394
|
+
|
395
|
+
/* one lonely transcendental */
|
396
|
+
extern double log2 (double _x);
|
397
|
+
extern float log2f (float _x);
|
398
|
+
|
399
|
+
/* The underscored versions are in MSVCRT.dll.
|
400
|
+
The stubs for these are in libmingwex.a */
|
401
|
+
|
402
|
+
double copysign (double, double);
|
403
|
+
float copysignf (float, float);
|
404
|
+
double logb (double);
|
405
|
+
float logbf (float);
|
406
|
+
double nextafter (double, double);
|
407
|
+
float nextafterf (float, float);
|
408
|
+
double scalb (double, long);
|
409
|
+
float scalbf (float, long);
|
410
|
+
|
411
|
+
#if !defined (__STRICT_ANSI__) /* inline using non-ANSI functions */
|
412
|
+
extern __inline__ double copysign (double x, double y)
|
413
|
+
{ return _copysign(x, y); }
|
414
|
+
extern __inline__ float copysignf (float x, float y)
|
415
|
+
{ return _copysign(x, y); }
|
416
|
+
extern __inline__ double logb (double x)
|
417
|
+
{ return _logb(x); }
|
418
|
+
extern __inline__ float logbf (float x)
|
419
|
+
{ return _logb(x); }
|
420
|
+
extern __inline__ double nextafter(double x, double y)
|
421
|
+
{ return _nextafter(x, y); }
|
422
|
+
extern __inline__ float nextafterf(float x, float y)
|
423
|
+
{ return _nextafter(x, y); }
|
424
|
+
extern __inline__ double scalb (double x, long i)
|
425
|
+
{ return _scalb (x, i); }
|
426
|
+
extern __inline__ float scalbf (float x, long i)
|
427
|
+
{ return _scalb(x, i); }
|
428
|
+
#endif /* (__STRICT_ANSI__) */
|
429
|
+
|
430
|
+
#ifdef __cplusplus
|
431
|
+
}
|
432
|
+
#endif
|
433
|
+
#endif /* Not RC_INVOKED */
|
434
|
+
|
435
|
+
#endif /* __NO_ISOCEXT */
|
436
|
+
|
437
|
+
#endif /* Not _MATH_H_ */
|
438
|
+
|
@@ -0,0 +1,158 @@
|
|
1
|
+
/*
|
2
|
+
* process.h
|
3
|
+
*
|
4
|
+
* Function calls for spawning child processes.
|
5
|
+
*
|
6
|
+
* This file is part of the Mingw32 package.
|
7
|
+
*
|
8
|
+
* Contributors:
|
9
|
+
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
10
|
+
*
|
11
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
12
|
+
*
|
13
|
+
* This source code is offered for use in the public domain. You may
|
14
|
+
* use, modify or distribute it freely.
|
15
|
+
*
|
16
|
+
* This code is distributed in the hope that it will be useful but
|
17
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
18
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
20
|
+
*
|
21
|
+
* $Revision: 1.2 $
|
22
|
+
* $Author: bellard $
|
23
|
+
* $Date: 2005/04/17 13:14:29 $
|
24
|
+
*
|
25
|
+
*/
|
26
|
+
|
27
|
+
#ifndef __STRICT_ANSI__
|
28
|
+
|
29
|
+
#ifndef _PROCESS_H_
|
30
|
+
#define _PROCESS_H_
|
31
|
+
|
32
|
+
/* All the headers include this file. */
|
33
|
+
#include <_mingw.h>
|
34
|
+
|
35
|
+
/* Includes a definition of _pid_t and pid_t */
|
36
|
+
#include <sys/types.h>
|
37
|
+
|
38
|
+
/*
|
39
|
+
* Constants for cwait actions.
|
40
|
+
* Obsolete for Win32.
|
41
|
+
*/
|
42
|
+
#define _WAIT_CHILD 0
|
43
|
+
#define _WAIT_GRANDCHILD 1
|
44
|
+
|
45
|
+
#ifndef _NO_OLDNAMES
|
46
|
+
#define WAIT_CHILD _WAIT_CHILD
|
47
|
+
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
|
48
|
+
#endif /* Not _NO_OLDNAMES */
|
49
|
+
|
50
|
+
/*
|
51
|
+
* Mode constants for spawn functions.
|
52
|
+
*/
|
53
|
+
#define _P_WAIT 0
|
54
|
+
#define _P_NOWAIT 1
|
55
|
+
#define _P_OVERLAY 2
|
56
|
+
#define _OLD_P_OVERLAY _P_OVERLAY
|
57
|
+
#define _P_NOWAITO 3
|
58
|
+
#define _P_DETACH 4
|
59
|
+
|
60
|
+
#ifndef _NO_OLDNAMES
|
61
|
+
#define P_WAIT _P_WAIT
|
62
|
+
#define P_NOWAIT _P_NOWAIT
|
63
|
+
#define P_OVERLAY _P_OVERLAY
|
64
|
+
#define OLD_P_OVERLAY _OLD_P_OVERLAY
|
65
|
+
#define P_NOWAITO _P_NOWAITO
|
66
|
+
#define P_DETACH _P_DETACH
|
67
|
+
#endif /* Not _NO_OLDNAMES */
|
68
|
+
|
69
|
+
|
70
|
+
#ifndef RC_INVOKED
|
71
|
+
|
72
|
+
#ifdef __cplusplus
|
73
|
+
extern "C" {
|
74
|
+
#endif
|
75
|
+
|
76
|
+
void _cexit(void);
|
77
|
+
void _c_exit(void);
|
78
|
+
|
79
|
+
int _cwait (int*, _pid_t, int);
|
80
|
+
|
81
|
+
_pid_t _getpid(void);
|
82
|
+
|
83
|
+
int _execl (const char*, const char*, ...);
|
84
|
+
int _execle (const char*, const char*, ...);
|
85
|
+
int _execlp (const char*, const char*, ...);
|
86
|
+
int _execlpe (const char*, const char*, ...);
|
87
|
+
int _execv (const char*, char* const*);
|
88
|
+
int _execve (const char*, char* const*, char* const*);
|
89
|
+
int _execvp (const char*, char* const*);
|
90
|
+
int _execvpe (const char*, char* const*, char* const*);
|
91
|
+
|
92
|
+
int _spawnl (int, const char*, const char*, ...);
|
93
|
+
int _spawnle (int, const char*, const char*, ...);
|
94
|
+
int _spawnlp (int, const char*, const char*, ...);
|
95
|
+
int _spawnlpe (int, const char*, const char*, ...);
|
96
|
+
int _spawnv (int, const char*, char* const*);
|
97
|
+
int _spawnve (int, const char*, char* const*, char* const*);
|
98
|
+
int _spawnvp (int, const char*, char* const*);
|
99
|
+
int _spawnvpe (int, const char*, char* const*, char* const*);
|
100
|
+
|
101
|
+
/*
|
102
|
+
* The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
|
103
|
+
* They are provided by MSVCRT.
|
104
|
+
*
|
105
|
+
* NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
|
106
|
+
* making for race conditions if you are not careful. Basically you have to
|
107
|
+
* make sure that no-one is going to do *anything* with the thread handle
|
108
|
+
* after the thread calls _endthread or returns from the thread function.
|
109
|
+
*
|
110
|
+
* NOTE: No old names for these functions. Use the underscore.
|
111
|
+
*/
|
112
|
+
unsigned long
|
113
|
+
_beginthread (void (*)(void *), unsigned, void*);
|
114
|
+
void _endthread (void);
|
115
|
+
|
116
|
+
#ifdef __MSVCRT__
|
117
|
+
unsigned long
|
118
|
+
_beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
|
119
|
+
void*, unsigned, unsigned*);
|
120
|
+
void _endthreadex (unsigned);
|
121
|
+
#endif
|
122
|
+
|
123
|
+
|
124
|
+
#ifndef _NO_OLDNAMES
|
125
|
+
/*
|
126
|
+
* Functions without the leading underscore, for portability. These functions
|
127
|
+
* live in liboldnames.a.
|
128
|
+
*/
|
129
|
+
int cwait (int*, pid_t, int);
|
130
|
+
pid_t getpid (void);
|
131
|
+
int execl (const char*, const char*, ...);
|
132
|
+
int execle (const char*, const char*, ...);
|
133
|
+
int execlp (const char*, const char*, ...);
|
134
|
+
int execlpe (const char*, const char*, ...);
|
135
|
+
int execv (const char*, char* const*);
|
136
|
+
int execve (const char*, char* const*, char* const*);
|
137
|
+
int execvp (const char*, char* const*);
|
138
|
+
int execvpe (const char*, char* const*, char* const*);
|
139
|
+
int spawnl (int, const char*, const char*, ...);
|
140
|
+
int spawnle (int, const char*, const char*, ...);
|
141
|
+
int spawnlp (int, const char*, const char*, ...);
|
142
|
+
int spawnlpe (int, const char*, const char*, ...);
|
143
|
+
int spawnv (int, const char*, char* const*);
|
144
|
+
int spawnve (int, const char*, char* const*, char* const*);
|
145
|
+
int spawnvp (int, const char*, char* const*);
|
146
|
+
int spawnvpe (int, const char*, char* const*, char* const*);
|
147
|
+
#endif /* Not _NO_OLDNAMES */
|
148
|
+
|
149
|
+
#ifdef __cplusplus
|
150
|
+
}
|
151
|
+
#endif
|
152
|
+
|
153
|
+
#endif /* Not RC_INVOKED */
|
154
|
+
|
155
|
+
#endif /* _PROCESS_H_ not defined */
|
156
|
+
|
157
|
+
#endif /* Not __STRICT_ANSI__ */
|
158
|
+
|
@@ -0,0 +1,72 @@
|
|
1
|
+
/*
|
2
|
+
* setjmp.h
|
3
|
+
*
|
4
|
+
* Declarations supporting setjmp and longjump, a method for avoiding
|
5
|
+
* the normal function call return sequence. (Bleah!)
|
6
|
+
*
|
7
|
+
* This file is part of the Mingw32 package.
|
8
|
+
*
|
9
|
+
* Contributors:
|
10
|
+
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
11
|
+
*
|
12
|
+
* THIS SOFTWARE IS NOT COPYRIGHTED
|
13
|
+
*
|
14
|
+
* This source code is offered for use in the public domain. You may
|
15
|
+
* use, modify or distribute it freely.
|
16
|
+
*
|
17
|
+
* This code is distributed in the hope that it will be useful but
|
18
|
+
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
19
|
+
* DISCLAIMED. This includes but is not limited to warranties of
|
20
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
21
|
+
*
|
22
|
+
* $Revision: 1.2 $
|
23
|
+
* $Author: bellard $
|
24
|
+
* $Date: 2005/04/17 13:14:29 $
|
25
|
+
*
|
26
|
+
*/
|
27
|
+
|
28
|
+
#ifndef _SETJMP_H_
|
29
|
+
#define _SETJMP_H_
|
30
|
+
|
31
|
+
/* All the headers include this file. */
|
32
|
+
#include <_mingw.h>
|
33
|
+
|
34
|
+
#ifndef RC_INVOKED
|
35
|
+
|
36
|
+
#ifdef __cplusplus
|
37
|
+
extern "C" {
|
38
|
+
#endif
|
39
|
+
|
40
|
+
/*
|
41
|
+
* The buffer used by setjmp to store the information used by longjmp
|
42
|
+
* to perform it's evil goto-like work. The size of this buffer was
|
43
|
+
* determined through experimentation; it's contents are a mystery.
|
44
|
+
* NOTE: This was determined on an i386 (actually a Pentium). The
|
45
|
+
* contents could be different on an Alpha or something else.
|
46
|
+
*/
|
47
|
+
#define _JBLEN 16
|
48
|
+
#define _JBTYPE int
|
49
|
+
typedef _JBTYPE jmp_buf[_JBLEN];
|
50
|
+
|
51
|
+
/*
|
52
|
+
* The function provided by CRTDLL which appears to do the actual work
|
53
|
+
* of setjmp.
|
54
|
+
*/
|
55
|
+
int _setjmp (jmp_buf);
|
56
|
+
|
57
|
+
#define setjmp(x) _setjmp(x)
|
58
|
+
|
59
|
+
/*
|
60
|
+
* Return to the last setjmp call and act as if setjmp had returned
|
61
|
+
* nVal (which had better be non-zero!).
|
62
|
+
*/
|
63
|
+
void longjmp (jmp_buf, int);
|
64
|
+
|
65
|
+
#ifdef __cplusplus
|
66
|
+
}
|
67
|
+
#endif
|
68
|
+
|
69
|
+
#endif /* Not RC_INVOKED */
|
70
|
+
|
71
|
+
#endif /* Not _SETJMP_H_ */
|
72
|
+
|