standalone-ruby 1.5.0 → 1.5.1

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 (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/lib/displayer.rb +2 -4
  4. data/lib/exe_packer.rb +1 -15
  5. data/lib/launcher.rb +4 -17
  6. data/lib/launcher_handler.rb +0 -12
  7. data/lib/parameter_parser.rb +0 -9
  8. data/lib/ruby_copy.rb +0 -6
  9. data/lib/sfx_generator.rb +0 -2
  10. data/lib/version/version.rb +1 -1
  11. metadata +2 -87
  12. data/lib/data/bat-cmd/default_bat_cmd.txt +0 -9
  13. data/lib/data/exe_template/launcher_stub.c +0 -30
  14. data/lib/data/exe_template/launcher_stub.cpp +0 -9
  15. data/lib/data/tcc/include/_mingw.h +0 -54
  16. data/lib/data/tcc/include/assert.h +0 -71
  17. data/lib/data/tcc/include/conio.h +0 -159
  18. data/lib/data/tcc/include/ctype.h +0 -232
  19. data/lib/data/tcc/include/dir.h +0 -26
  20. data/lib/data/tcc/include/direct.h +0 -95
  21. data/lib/data/tcc/include/dirent.h +0 -96
  22. data/lib/data/tcc/include/dos.h +0 -110
  23. data/lib/data/tcc/include/errno.h +0 -117
  24. data/lib/data/tcc/include/excpt.h +0 -20
  25. data/lib/data/tcc/include/fcntl.h +0 -135
  26. data/lib/data/tcc/include/fenv.h +0 -85
  27. data/lib/data/tcc/include/float.h +0 -224
  28. data/lib/data/tcc/include/inttypes.h +0 -275
  29. data/lib/data/tcc/include/io.h +0 -296
  30. data/lib/data/tcc/include/limits.h +0 -115
  31. data/lib/data/tcc/include/locale.h +0 -100
  32. data/lib/data/tcc/include/malloc.h +0 -87
  33. data/lib/data/tcc/include/math.h +0 -438
  34. data/lib/data/tcc/include/mem.h +0 -8
  35. data/lib/data/tcc/include/memory.h +0 -9
  36. data/lib/data/tcc/include/process.h +0 -158
  37. data/lib/data/tcc/include/setjmp.h +0 -72
  38. data/lib/data/tcc/include/share.h +0 -44
  39. data/lib/data/tcc/include/signal.h +0 -111
  40. data/lib/data/tcc/include/stdarg.h +0 -16
  41. data/lib/data/tcc/include/stdbool.h +0 -10
  42. data/lib/data/tcc/include/stddef.h +0 -26
  43. data/lib/data/tcc/include/stdint.h +0 -184
  44. data/lib/data/tcc/include/stdio.h +0 -413
  45. data/lib/data/tcc/include/stdlib.h +0 -482
  46. data/lib/data/tcc/include/string.h +0 -206
  47. data/lib/data/tcc/include/sys/fcntl.h +0 -8
  48. data/lib/data/tcc/include/sys/file.h +0 -9
  49. data/lib/data/tcc/include/sys/locking.h +0 -52
  50. data/lib/data/tcc/include/sys/stat.h +0 -190
  51. data/lib/data/tcc/include/sys/time.h +0 -3
  52. data/lib/data/tcc/include/sys/timeb.h +0 -82
  53. data/lib/data/tcc/include/sys/types.h +0 -118
  54. data/lib/data/tcc/include/sys/unistd.h +0 -9
  55. data/lib/data/tcc/include/sys/utime.h +0 -89
  56. data/lib/data/tcc/include/tchar.h +0 -367
  57. data/lib/data/tcc/include/time.h +0 -219
  58. data/lib/data/tcc/include/unistd.h +0 -10
  59. data/lib/data/tcc/include/values.h +0 -4
  60. data/lib/data/tcc/include/varargs.h +0 -11
  61. data/lib/data/tcc/include/wchar.h +0 -318
  62. data/lib/data/tcc/include/wctype.h +0 -127
  63. data/lib/data/tcc/include/winapi/basetsd.h +0 -119
  64. data/lib/data/tcc/include/winapi/basetyps.h +0 -144
  65. data/lib/data/tcc/include/winapi/winbase.h +0 -1852
  66. data/lib/data/tcc/include/winapi/wincon.h +0 -207
  67. data/lib/data/tcc/include/winapi/windef.h +0 -240
  68. data/lib/data/tcc/include/winapi/windows.h +0 -176
  69. data/lib/data/tcc/include/winapi/winerror.h +0 -1054
  70. data/lib/data/tcc/include/winapi/wingdi.h +0 -2843
  71. data/lib/data/tcc/include/winapi/winnetwk.h +0 -346
  72. data/lib/data/tcc/include/winapi/winnls.h +0 -651
  73. data/lib/data/tcc/include/winapi/winnt.h +0 -2667
  74. data/lib/data/tcc/include/winapi/winreg.h +0 -159
  75. data/lib/data/tcc/include/winapi/winsvc.h +0 -309
  76. data/lib/data/tcc/include/winapi/winuser.h +0 -3472
  77. data/lib/data/tcc/include/winapi/winver.h +0 -133
  78. data/lib/data/tcc/lib/gdi32.def +0 -337
  79. data/lib/data/tcc/lib/kernel32.def +0 -763
  80. data/lib/data/tcc/lib/libtcc1.a +0 -0
  81. data/lib/data/tcc/lib/msvcrt.def +0 -782
  82. data/lib/data/tcc/lib/user32.def +0 -654
  83. data/lib/data/tcc/tcc.exe +0 -0
  84. data/lib/data/tcc/tiny_impdef.exe +0 -0
  85. data/lib/data/tcc/tiny_libmaker.exe +0 -0
  86. data/lib/data/vbs/default_vbs.txt +0 -7
  87. data/lib/data/vbs/vbs_gui.txt +0 -8
  88. data/lib/logger_helper.rb +0 -24
  89. data/lib/utils/config_generator.rb +0 -5
  90. data/lib/utils/displayer.rb +0 -64
  91. data/lib/utils/exe_packer.rb +0 -72
  92. data/lib/utils/launcher.rb +0 -77
  93. data/lib/utils/launcher_handler.rb +0 -111
  94. data/lib/utils/logger_helper.rb +0 -24
  95. data/lib/utils/parameter_parser.rb +0 -211
  96. data/lib/utils/ruby_copy.rb +0 -26
@@ -1,117 +0,0 @@
1
- /*
2
- * errno.h
3
- *
4
- * Error numbers and access to error reporting.
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 _ERRNO_H_
28
- #define _ERRNO_H_
29
-
30
- /* All the headers include this file. */
31
- #include <_mingw.h>
32
-
33
- /*
34
- * Error numbers.
35
- * TODO: Can't be sure of some of these assignments, I guessed from the
36
- * names given by strerror and the defines in the Cygnus errno.h. A lot
37
- * of the names from the Cygnus errno.h are not represented, and a few
38
- * of the descriptions returned by strerror do not obviously match
39
- * their error naming.
40
- */
41
- #define EPERM 1 /* Operation not permitted */
42
- #define ENOFILE 2 /* No such file or directory */
43
- #define ENOENT 2
44
- #define ESRCH 3 /* No such process */
45
- #define EINTR 4 /* Interrupted function call */
46
- #define EIO 5 /* Input/output error */
47
- #define ENXIO 6 /* No such device or address */
48
- #define E2BIG 7 /* Arg list too long */
49
- #define ENOEXEC 8 /* Exec format error */
50
- #define EBADF 9 /* Bad file descriptor */
51
- #define ECHILD 10 /* No child processes */
52
- #define EAGAIN 11 /* Resource temporarily unavailable */
53
- #define ENOMEM 12 /* Not enough space */
54
- #define EACCES 13 /* Permission denied */
55
- #define EFAULT 14 /* Bad address */
56
- /* 15 - Unknown Error */
57
- #define EBUSY 16 /* strerror reports "Resource device" */
58
- #define EEXIST 17 /* File exists */
59
- #define EXDEV 18 /* Improper link (cross-device link?) */
60
- #define ENODEV 19 /* No such device */
61
- #define ENOTDIR 20 /* Not a directory */
62
- #define EISDIR 21 /* Is a directory */
63
- #define EINVAL 22 /* Invalid argument */
64
- #define ENFILE 23 /* Too many open files in system */
65
- #define EMFILE 24 /* Too many open files */
66
- #define ENOTTY 25 /* Inappropriate I/O control operation */
67
- /* 26 - Unknown Error */
68
- #define EFBIG 27 /* File too large */
69
- #define ENOSPC 28 /* No space left on device */
70
- #define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
71
- #define EROFS 30 /* Read-only file system */
72
- #define EMLINK 31 /* Too many links */
73
- #define EPIPE 32 /* Broken pipe */
74
- #define EDOM 33 /* Domain error (math functions) */
75
- #define ERANGE 34 /* Result too large (possibly too small) */
76
- /* 35 - Unknown Error */
77
- #define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
78
- #define EDEADLK 36
79
- /* 37 - Unknown Error */
80
- #define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
81
- #define ENOLCK 39 /* No locks available (46 in Cyg?) */
82
- #define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
83
- #define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
84
- #define EILSEQ 42 /* Illegal byte sequence */
85
-
86
- /*
87
- * NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
88
- * sockets.h header provided with windows32api-0.1.2.
89
- * You should go and put an #if 0 ... #endif around the whole block
90
- * of errors (look at the comment above them).
91
- */
92
-
93
- #ifndef RC_INVOKED
94
-
95
- #ifdef __cplusplus
96
- extern "C" {
97
- #endif
98
-
99
- /*
100
- * Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
101
- * stdlib.h.
102
- */
103
- #ifdef _UWIN
104
- #undef errno
105
- extern int errno;
106
- #else
107
- int* _errno(void);
108
- #define errno (*_errno())
109
- #endif
110
-
111
- #ifdef __cplusplus
112
- }
113
- #endif
114
-
115
- #endif /* Not RC_INVOKED */
116
-
117
- #endif /* Not _ERRNO_H_ */
@@ -1,20 +0,0 @@
1
- #ifndef _EXCPT_H
2
- #define _EXCPT_H
3
- #if __GNUC__ >=3
4
- #pragma GCC system_header
5
- #endif
6
-
7
- /* FIXME: This will make some code compile. The programs will most
8
- likely crash when an exception is raised, but at least they will
9
- compile. */
10
- #ifdef __GNUC__
11
- #define __try
12
- #define __except(x) if (0) /* don't execute handler */
13
- #define __finally
14
-
15
- #define _try __try
16
- #define _except __except
17
- #define _finally __finally
18
- #endif
19
-
20
- #endif
@@ -1,135 +0,0 @@
1
- /*
2
- * fcntl.h
3
- *
4
- * Access constants for _open. Note that the permissions constants are
5
- * in sys/stat.h (ick).
6
- *
7
- * This code 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 __STRICT_ANSI__
29
-
30
- #ifndef _FCNTL_H_
31
- #define _FCNTL_H_
32
-
33
- /* All the headers include this file. */
34
- #include <_mingw.h>
35
-
36
- /*
37
- * It appears that fcntl.h should include io.h for compatibility...
38
- */
39
- #include <io.h>
40
-
41
- /* Specifiy one of these flags to define the access mode. */
42
- #define _O_RDONLY 0
43
- #define _O_WRONLY 1
44
- #define _O_RDWR 2
45
-
46
- /* Mask for access mode bits in the _open flags. */
47
- #define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
48
-
49
- #define _O_APPEND 0x0008 /* Writes will add to the end of the file. */
50
-
51
- #define _O_RANDOM 0x0010
52
- #define _O_SEQUENTIAL 0x0020
53
- #define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
54
- * WARNING: Even if not created by _open! */
55
- #define _O_NOINHERIT 0x0080
56
-
57
- #define _O_CREAT 0x0100 /* Create the file if it does not exist. */
58
- #define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */
59
- #define _O_EXCL 0x0400 /* Open only if the file does not exist. */
60
-
61
- /* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
62
- #define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */
63
- #define _O_BINARY 0x8000 /* Input and output is not translated. */
64
- #define _O_RAW _O_BINARY
65
-
66
- #ifndef _NO_OLDNAMES
67
-
68
- /* POSIX/Non-ANSI names for increased portability */
69
- #define O_RDONLY _O_RDONLY
70
- #define O_WRONLY _O_WRONLY
71
- #define O_RDWR _O_RDWR
72
- #define O_ACCMODE _O_ACCMODE
73
- #define O_APPEND _O_APPEND
74
- #define O_CREAT _O_CREAT
75
- #define O_TRUNC _O_TRUNC
76
- #define O_EXCL _O_EXCL
77
- #define O_TEXT _O_TEXT
78
- #define O_BINARY _O_BINARY
79
- #define O_TEMPORARY _O_TEMPORARY
80
- #define O_NOINHERIT _O_NOINHERIT
81
- #define O_SEQENTIAL _O_SEQUENTIAL
82
- #define O_RANDOM _O_RANDOM
83
-
84
- #endif /* Not _NO_OLDNAMES */
85
-
86
-
87
- #ifndef RC_INVOKED
88
-
89
- /*
90
- * This variable determines the default file mode.
91
- * TODO: Which flags work?
92
- */
93
- #ifndef __DECLSPEC_SUPPORTED
94
-
95
- #ifdef __MSVCRT__
96
- extern unsigned int* __imp__fmode;
97
- #define _fmode (*__imp__fmode)
98
- #else
99
- /* CRTDLL */
100
- extern unsigned int* __imp__fmode_dll;
101
- #define _fmode (*__imp__fmode_dll)
102
- #endif
103
-
104
- #else /* __DECLSPEC_SUPPORTED */
105
-
106
- #ifdef __MSVCRT__
107
- __MINGW_IMPORT unsigned int _fmode;
108
- #else /* ! __MSVCRT__ */
109
- __MINGW_IMPORT unsigned int _fmode_dll;
110
- #define _fmode _fmode_dll
111
- #endif /* ! __MSVCRT__ */
112
-
113
- #endif /* __DECLSPEC_SUPPORTED */
114
-
115
-
116
- #ifdef __cplusplus
117
- extern "C" {
118
- #endif
119
-
120
- int _setmode (int, int);
121
-
122
- #ifndef _NO_OLDNAMES
123
- int setmode (int, int);
124
- #endif /* Not _NO_OLDNAMES */
125
-
126
- #ifdef __cplusplus
127
- }
128
- #endif
129
-
130
- #endif /* Not RC_INVOKED */
131
-
132
- #endif /* Not _FCNTL_H_ */
133
-
134
- #endif /* Not __STRICT_ANSI__ */
135
-
@@ -1,85 +0,0 @@
1
- #ifndef _FENV_H
2
- #define _FENV_H
3
-
4
- /*
5
- For now, support only for the basic abstraction of flags that are
6
- either set or clear. fexcept_t could be structure that holds more info
7
- about the fp environment.
8
- */
9
- typedef unsigned short fexcept_t;
10
-
11
- /* This 28-byte struct represents the entire floating point
12
- environment as stored by fnstenv or fstenv */
13
- typedef struct
14
- {
15
- unsigned short __control_word;
16
- unsigned short __unused0;
17
- unsigned short __status_word;
18
- unsigned short __unused1;
19
- unsigned short __tag_word;
20
- unsigned short __unused2;
21
- unsigned int __ip_offset; /* instruction pointer offset */
22
- unsigned short __ip_selector;
23
- unsigned short __opcode;
24
- unsigned int __data_offset;
25
- unsigned short __data_selector;
26
- unsigned short __unused3;
27
- } fenv_t;
28
-
29
-
30
- /* FPU status word exception flags */
31
- #define FE_INVALID 0x01
32
- #define FE_DENORMAL 0x02
33
- #define FE_DIVBYZERO 0x04
34
- #define FE_OVERFLOW 0x08
35
- #define FE_UNDERFLOW 0x10
36
- #define FE_INEXACT 0x20
37
- #define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
38
- | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
39
-
40
- /* FPU control word rounding flags */
41
- #define FE_TONEAREST 0x0000
42
- #define FE_DOWNWARD 0x0400
43
- #define FE_UPWARD 0x0800
44
- #define FE_TOWARDZERO 0x0c00
45
-
46
-
47
- /* The default floating point environment */
48
- #define FE_DFL_ENV ((const fenv_t *)-1)
49
-
50
-
51
- #ifndef RC_INVOKED
52
- #ifdef __cplusplus
53
- extern "C" {
54
- #endif
55
-
56
-
57
- /*TODO: Some of these could be inlined */
58
- /* 7.6.2 Exception */
59
-
60
- extern int feclearexcept (int);
61
- extern int fegetexceptflag (fexcept_t * flagp, int excepts);
62
- extern int feraiseexcept (int excepts );
63
- extern int fesetexceptflag (const fexcept_t *, int);
64
- extern int fetestexcept (int excepts);
65
-
66
-
67
- /* 7.6.3 Rounding */
68
-
69
- extern int fegetround (void);
70
- extern int fesetround (int mode);
71
-
72
-
73
- /* 7.6.4 Environment */
74
-
75
- extern int fegetenv (fenv_t * envp);
76
- extern int fesetenv (const fenv_t * );
77
- extern int feupdateenv (const fenv_t *);
78
- extern int feholdexcept (fenv_t *);
79
-
80
- #ifdef __cplusplus
81
- }
82
- #endif
83
- #endif /* Not RC_INVOKED */
84
-
85
- #endif /* ndef _FENV_H */
@@ -1,224 +0,0 @@
1
- /*
2
- * float.h
3
- *
4
- * Constants related to floating point arithmetic.
5
- *
6
- * Also included here are some non-ANSI bits for accessing the floating
7
- * point controller.
8
- *
9
- * NOTE: GCC provides float.h, and it is probably more accurate than this,
10
- * but it doesn't include the non-standard stuff for accessing the
11
- * fp controller. (TODO: Move those bits elsewhere?) Thus it is
12
- * probably not a good idea to use the GCC supplied version instead
13
- * of this header.
14
- *
15
- * This file is part of the Mingw32 package.
16
- *
17
- * Contributors:
18
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
19
- *
20
- * THIS SOFTWARE IS NOT COPYRIGHTED
21
- *
22
- * This source code is offered for use in the public domain. You may
23
- * use, modify or distribute it freely.
24
- *
25
- * This code is distributed in the hope that it will be useful but
26
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
27
- * DISCLAIMED. This includes but is not limited to warranties of
28
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29
- *
30
- * $Revision: 1.2 $
31
- * $Author: bellard $
32
- * $Date: 2005/04/17 13:14:29 $
33
- *
34
- */
35
-
36
- #ifndef _FLOAT_H_
37
- #define _FLOAT_H_
38
-
39
- /* All the headers include this file. */
40
- #include <_mingw.h>
41
-
42
- #define FLT_ROUNDS 1
43
- #define FLT_GUARD 1
44
- #define FLT_NORMALIZE 1
45
-
46
- /*
47
- * The characteristics of float.
48
- */
49
-
50
- /* The radix for floating point representation. */
51
- #define FLT_RADIX 2
52
-
53
- /* Decimal digits of precision. */
54
- #define FLT_DIG 6
55
-
56
- /* Smallest number such that 1+x != 1 */
57
- #define FLT_EPSILON 1.19209290e-07F
58
-
59
- /* The number of base FLT_RADIX digits in the mantissa. */
60
- #define FLT_MANT_DIG 24
61
-
62
- /* The maximum floating point number. */
63
- #define FLT_MAX 3.40282347e+38F
64
-
65
- /* Maximum n such that FLT_RADIX^n - 1 is representable. */
66
- #define FLT_MAX_EXP 128
67
-
68
- /* Maximum n such that 10^n is representable. */
69
- #define FLT_MAX_10_EXP 38
70
-
71
- /* Minimum normalized floating-point number. */
72
- #define FLT_MIN 1.17549435e-38F
73
-
74
- /* Minimum n such that FLT_RADIX^n is a normalized number. */
75
- #define FLT_MIN_EXP (-125)
76
-
77
- /* Minimum n such that 10^n is a normalized number. */
78
- #define FLT_MIN_10_EXP (-37)
79
-
80
-
81
- /*
82
- * The characteristics of double.
83
- */
84
- #define DBL_DIG 15
85
- #define DBL_EPSILON 1.1102230246251568e-16
86
- #define DBL_MANT_DIG 53
87
- #define DBL_MAX 1.7976931348623157e+308
88
- #define DBL_MAX_EXP 1024
89
- #define DBL_MAX_10_EXP 308
90
- #define DBL_MIN 2.2250738585072014e-308
91
- #define DBL_MIN_EXP (-1021)
92
- #define DBL_MIN_10_EXP (-307)
93
-
94
-
95
- /*
96
- * The characteristics of long double.
97
- * NOTE: long double is the same as double.
98
- */
99
- #define LDBL_DIG 15
100
- #define LDBL_EPSILON 1.1102230246251568e-16L
101
- #define LDBL_MANT_DIG 53
102
- #define LDBL_MAX 1.7976931348623157e+308L
103
- #define LDBL_MAX_EXP 1024
104
- #define LDBL_MAX_10_EXP 308
105
- #define LDBL_MIN 2.2250738585072014e-308L
106
- #define LDBL_MIN_EXP (-1021)
107
- #define LDBL_MIN_10_EXP (-307)
108
-
109
-
110
- /*
111
- * Functions and definitions for controlling the FPU.
112
- */
113
- #ifndef __STRICT_ANSI__
114
-
115
- /* TODO: These constants are only valid for x86 machines */
116
-
117
- /* Control word masks for unMask */
118
- #define _MCW_EM 0x0008001F /* Error masks */
119
- #define _MCW_IC 0x00040000 /* Infinity */
120
- #define _MCW_RC 0x00000300 /* Rounding */
121
- #define _MCW_PC 0x00030000 /* Precision */
122
-
123
- /* Control word values for unNew (use with related unMask above) */
124
- #define _EM_INVALID 0x00000010
125
- #define _EM_DENORMAL 0x00080000
126
- #define _EM_ZERODIVIDE 0x00000008
127
- #define _EM_OVERFLOW 0x00000004
128
- #define _EM_UNDERFLOW 0x00000002
129
- #define _EM_INEXACT 0x00000001
130
- #define _IC_AFFINE 0x00040000
131
- #define _IC_PROJECTIVE 0x00000000
132
- #define _RC_CHOP 0x00000300
133
- #define _RC_UP 0x00000200
134
- #define _RC_DOWN 0x00000100
135
- #define _RC_NEAR 0x00000000
136
- #define _PC_24 0x00020000
137
- #define _PC_53 0x00010000
138
- #define _PC_64 0x00000000
139
-
140
- /* These are also defined in Mingw math.h, needed to work around
141
- GCC build issues. */
142
- /* Return values for fpclass. */
143
- #ifndef __MINGW_FPCLASS_DEFINED
144
- #define __MINGW_FPCLASS_DEFINED 1
145
- #define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
146
- #define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
147
- #define _FPCLASS_NINF 0x0004 /* Negative Infinity */
148
- #define _FPCLASS_NN 0x0008 /* Negative Normal */
149
- #define _FPCLASS_ND 0x0010 /* Negative Denormal */
150
- #define _FPCLASS_NZ 0x0020 /* Negative Zero */
151
- #define _FPCLASS_PZ 0x0040 /* Positive Zero */
152
- #define _FPCLASS_PD 0x0080 /* Positive Denormal */
153
- #define _FPCLASS_PN 0x0100 /* Positive Normal */
154
- #define _FPCLASS_PINF 0x0200 /* Positive Infinity */
155
- #endif /* __MINGW_FPCLASS_DEFINED */
156
-
157
- /* invalid subconditions (_SW_INVALID also set) */
158
- #define _SW_UNEMULATED 0x0040 /* unemulated instruction */
159
- #define _SW_SQRTNEG 0x0080 /* square root of a neg number */
160
- #define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
161
- #define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
162
-
163
- /* Floating point error signals and return codes */
164
- #define _FPE_INVALID 0x81
165
- #define _FPE_DENORMAL 0x82
166
- #define _FPE_ZERODIVIDE 0x83
167
- #define _FPE_OVERFLOW 0x84
168
- #define _FPE_UNDERFLOW 0x85
169
- #define _FPE_INEXACT 0x86
170
- #define _FPE_UNEMULATED 0x87
171
- #define _FPE_SQRTNEG 0x88
172
- #define _FPE_STACKOVERFLOW 0x8a
173
- #define _FPE_STACKUNDERFLOW 0x8b
174
- #define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
175
-
176
- #ifndef RC_INVOKED
177
-
178
- #ifdef __cplusplus
179
- extern "C" {
180
- #endif
181
-
182
- /* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
183
- * i.e. change the bits in unMask to have the values they have in unNew,
184
- * leaving other bits unchanged. */
185
- unsigned int _controlfp (unsigned int unNew, unsigned int unMask);
186
- unsigned int _control87 (unsigned int unNew, unsigned int unMask);
187
-
188
-
189
- unsigned int _clearfp (void); /* Clear the FPU status word */
190
- unsigned int _statusfp (void); /* Report the FPU status word */
191
- #define _clear87 _clearfp
192
- #define _status87 _statusfp
193
-
194
- void _fpreset (void); /* Reset the FPU */
195
- void fpreset (void);
196
-
197
- /* Global 'variable' for the current floating point error code. */
198
- int * __fpecode(void);
199
- #define _fpecode (*(__fpecode()))
200
-
201
- /*
202
- * IEEE recommended functions
203
- */
204
-
205
- double _chgsign (double);
206
- double _copysign (double, double);
207
- double _logb (double);
208
- double _nextafter (double, double);
209
- double _scalb (double, long);
210
-
211
- int _finite (double);
212
- int _fpclass (double);
213
- int _isnan (double);
214
-
215
- #ifdef __cplusplus
216
- }
217
- #endif
218
-
219
- #endif /* Not RC_INVOKED */
220
-
221
- #endif /* Not __STRICT_ANSI__ */
222
-
223
- #endif /* _FLOAT_H_ */
224
-