standalone-ruby 1.4.2 → 1.5.0

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 (158) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -22
  3. data/lib/data/bat-cmd/default_bat_cmd.txt +9 -9
  4. data/lib/data/c_compilers/tcc/include/_mingw.h +54 -0
  5. data/lib/data/c_compilers/tcc/include/assert.h +71 -0
  6. data/lib/data/c_compilers/tcc/include/conio.h +159 -0
  7. data/lib/data/c_compilers/tcc/include/ctype.h +232 -0
  8. data/lib/data/c_compilers/tcc/include/dir.h +26 -0
  9. data/lib/data/c_compilers/tcc/include/direct.h +95 -0
  10. data/lib/data/c_compilers/tcc/include/dirent.h +96 -0
  11. data/lib/data/c_compilers/tcc/include/dos.h +110 -0
  12. data/lib/data/c_compilers/tcc/include/errno.h +117 -0
  13. data/lib/data/c_compilers/tcc/include/excpt.h +20 -0
  14. data/lib/data/c_compilers/tcc/include/fcntl.h +135 -0
  15. data/lib/data/c_compilers/tcc/include/fenv.h +85 -0
  16. data/lib/data/c_compilers/tcc/include/float.h +224 -0
  17. data/lib/data/c_compilers/tcc/include/inttypes.h +275 -0
  18. data/lib/data/c_compilers/tcc/include/io.h +296 -0
  19. data/lib/data/c_compilers/tcc/include/limits.h +115 -0
  20. data/lib/data/c_compilers/tcc/include/locale.h +100 -0
  21. data/lib/data/c_compilers/tcc/include/malloc.h +87 -0
  22. data/lib/data/c_compilers/tcc/include/math.h +438 -0
  23. data/lib/data/c_compilers/tcc/include/mem.h +8 -0
  24. data/lib/data/c_compilers/tcc/include/memory.h +9 -0
  25. data/lib/data/c_compilers/tcc/include/process.h +158 -0
  26. data/lib/data/c_compilers/tcc/include/setjmp.h +72 -0
  27. data/lib/data/c_compilers/tcc/include/share.h +44 -0
  28. data/lib/data/c_compilers/tcc/include/signal.h +111 -0
  29. data/lib/data/c_compilers/tcc/include/stdarg.h +16 -0
  30. data/lib/data/c_compilers/tcc/include/stdbool.h +10 -0
  31. data/lib/data/c_compilers/tcc/include/stddef.h +26 -0
  32. data/lib/data/c_compilers/tcc/include/stdint.h +184 -0
  33. data/lib/data/c_compilers/tcc/include/stdio.h +413 -0
  34. data/lib/data/c_compilers/tcc/include/stdlib.h +482 -0
  35. data/lib/data/c_compilers/tcc/include/string.h +206 -0
  36. data/lib/data/c_compilers/tcc/include/sys/fcntl.h +8 -0
  37. data/lib/data/c_compilers/tcc/include/sys/file.h +9 -0
  38. data/lib/data/c_compilers/tcc/include/sys/locking.h +52 -0
  39. data/lib/data/c_compilers/tcc/include/sys/stat.h +190 -0
  40. data/lib/data/c_compilers/tcc/include/sys/time.h +3 -0
  41. data/lib/data/c_compilers/tcc/include/sys/timeb.h +82 -0
  42. data/lib/data/c_compilers/tcc/include/sys/types.h +118 -0
  43. data/lib/data/c_compilers/tcc/include/sys/unistd.h +9 -0
  44. data/lib/data/c_compilers/tcc/include/sys/utime.h +89 -0
  45. data/lib/data/c_compilers/tcc/include/tchar.h +367 -0
  46. data/lib/data/c_compilers/tcc/include/time.h +219 -0
  47. data/lib/data/c_compilers/tcc/include/unistd.h +10 -0
  48. data/lib/data/c_compilers/tcc/include/values.h +4 -0
  49. data/lib/data/c_compilers/tcc/include/varargs.h +11 -0
  50. data/lib/data/c_compilers/tcc/include/wchar.h +318 -0
  51. data/lib/data/c_compilers/tcc/include/wctype.h +127 -0
  52. data/lib/data/c_compilers/tcc/include/winapi/basetsd.h +119 -0
  53. data/lib/data/c_compilers/tcc/include/winapi/basetyps.h +144 -0
  54. data/lib/data/c_compilers/tcc/include/winapi/winbase.h +1852 -0
  55. data/lib/data/c_compilers/tcc/include/winapi/wincon.h +207 -0
  56. data/lib/data/c_compilers/tcc/include/winapi/windef.h +240 -0
  57. data/lib/data/c_compilers/tcc/include/winapi/windows.h +176 -0
  58. data/lib/data/c_compilers/tcc/include/winapi/winerror.h +1054 -0
  59. data/lib/data/c_compilers/tcc/include/winapi/wingdi.h +2843 -0
  60. data/lib/data/c_compilers/tcc/include/winapi/winnetwk.h +346 -0
  61. data/lib/data/c_compilers/tcc/include/winapi/winnls.h +651 -0
  62. data/lib/data/c_compilers/tcc/include/winapi/winnt.h +2667 -0
  63. data/lib/data/c_compilers/tcc/include/winapi/winreg.h +159 -0
  64. data/lib/data/c_compilers/tcc/include/winapi/winsvc.h +309 -0
  65. data/lib/data/c_compilers/tcc/include/winapi/winuser.h +3472 -0
  66. data/lib/data/c_compilers/tcc/include/winapi/winver.h +133 -0
  67. data/lib/data/c_compilers/tcc/lib/gdi32.def +337 -0
  68. data/lib/data/c_compilers/tcc/lib/kernel32.def +763 -0
  69. data/lib/data/c_compilers/tcc/lib/libtcc1.a +0 -0
  70. data/lib/data/c_compilers/tcc/lib/msvcrt.def +782 -0
  71. data/lib/data/c_compilers/tcc/lib/user32.def +654 -0
  72. data/lib/data/c_compilers/tcc/tcc.exe +0 -0
  73. data/lib/data/exe_templates/launcher_stub.c +30 -0
  74. data/lib/data/exe_templates/launcher_stub.cpp +31 -0
  75. data/lib/data/launcher_templates/vbs/default_vbs.txt +7 -0
  76. data/lib/data/launcher_templates/vbs/vbs_gui.txt +8 -0
  77. data/lib/data/resource_files/default.rc +17 -0
  78. data/lib/data/tcc/include/_mingw.h +54 -54
  79. data/lib/data/tcc/include/assert.h +71 -71
  80. data/lib/data/tcc/include/conio.h +159 -159
  81. data/lib/data/tcc/include/ctype.h +232 -232
  82. data/lib/data/tcc/include/dir.h +26 -26
  83. data/lib/data/tcc/include/direct.h +95 -95
  84. data/lib/data/tcc/include/dirent.h +96 -96
  85. data/lib/data/tcc/include/dos.h +110 -110
  86. data/lib/data/tcc/include/errno.h +117 -117
  87. data/lib/data/tcc/include/excpt.h +20 -20
  88. data/lib/data/tcc/include/fcntl.h +135 -135
  89. data/lib/data/tcc/include/fenv.h +85 -85
  90. data/lib/data/tcc/include/float.h +224 -224
  91. data/lib/data/tcc/include/inttypes.h +275 -275
  92. data/lib/data/tcc/include/io.h +296 -296
  93. data/lib/data/tcc/include/limits.h +115 -115
  94. data/lib/data/tcc/include/locale.h +100 -100
  95. data/lib/data/tcc/include/malloc.h +87 -87
  96. data/lib/data/tcc/include/math.h +438 -438
  97. data/lib/data/tcc/include/mem.h +8 -8
  98. data/lib/data/tcc/include/memory.h +9 -9
  99. data/lib/data/tcc/include/process.h +158 -158
  100. data/lib/data/tcc/include/setjmp.h +72 -72
  101. data/lib/data/tcc/include/share.h +44 -44
  102. data/lib/data/tcc/include/signal.h +111 -111
  103. data/lib/data/tcc/include/stdarg.h +16 -16
  104. data/lib/data/tcc/include/stdbool.h +10 -10
  105. data/lib/data/tcc/include/stddef.h +26 -26
  106. data/lib/data/tcc/include/stdint.h +184 -184
  107. data/lib/data/tcc/include/stdio.h +413 -413
  108. data/lib/data/tcc/include/stdlib.h +482 -482
  109. data/lib/data/tcc/include/string.h +206 -206
  110. data/lib/data/tcc/include/sys/fcntl.h +8 -8
  111. data/lib/data/tcc/include/sys/file.h +9 -9
  112. data/lib/data/tcc/include/sys/locking.h +52 -52
  113. data/lib/data/tcc/include/sys/stat.h +190 -190
  114. data/lib/data/tcc/include/sys/time.h +3 -3
  115. data/lib/data/tcc/include/sys/timeb.h +82 -82
  116. data/lib/data/tcc/include/sys/types.h +118 -118
  117. data/lib/data/tcc/include/sys/unistd.h +9 -9
  118. data/lib/data/tcc/include/sys/utime.h +89 -89
  119. data/lib/data/tcc/include/tchar.h +367 -367
  120. data/lib/data/tcc/include/time.h +219 -219
  121. data/lib/data/tcc/include/unistd.h +10 -10
  122. data/lib/data/tcc/include/values.h +4 -4
  123. data/lib/data/tcc/include/varargs.h +11 -11
  124. data/lib/data/tcc/include/wchar.h +318 -318
  125. data/lib/data/tcc/include/wctype.h +127 -127
  126. data/lib/data/tcc/include/winapi/basetsd.h +119 -119
  127. data/lib/data/tcc/include/winapi/basetyps.h +144 -144
  128. data/lib/data/tcc/include/winapi/winbase.h +1852 -1852
  129. data/lib/data/tcc/include/winapi/wincon.h +207 -207
  130. data/lib/data/tcc/include/winapi/windef.h +240 -240
  131. data/lib/data/tcc/include/winapi/windows.h +176 -176
  132. data/lib/data/tcc/include/winapi/winerror.h +1054 -1054
  133. data/lib/data/tcc/include/winapi/wingdi.h +2843 -2843
  134. data/lib/data/tcc/include/winapi/winnetwk.h +346 -346
  135. data/lib/data/tcc/include/winapi/winnls.h +651 -651
  136. data/lib/data/tcc/include/winapi/winnt.h +2667 -2667
  137. data/lib/data/tcc/include/winapi/winreg.h +159 -159
  138. data/lib/data/tcc/include/winapi/winsvc.h +309 -309
  139. data/lib/data/tcc/include/winapi/winuser.h +3472 -3472
  140. data/lib/data/tcc/include/winapi/winver.h +133 -133
  141. data/lib/data/tcc/lib/gdi32.def +337 -337
  142. data/lib/data/tcc/lib/kernel32.def +763 -763
  143. data/lib/data/tcc/lib/msvcrt.def +782 -782
  144. data/lib/data/tcc/lib/user32.def +654 -654
  145. data/lib/data/vbs/default_vbs.txt +7 -7
  146. data/lib/data/vbs/vbs_gui.txt +8 -8
  147. data/lib/displayer.rb +66 -0
  148. data/lib/exe_packer.rb +82 -0
  149. data/lib/launcher.rb +84 -0
  150. data/lib/launcher_handler.rb +53 -0
  151. data/lib/logger_helper.rb +24 -0
  152. data/lib/parameter_parser.rb +210 -0
  153. data/lib/ruby_copy.rb +26 -0
  154. data/lib/sfx_generator.rb +11 -0
  155. data/lib/standalone_ruby.rb +1 -1
  156. data/lib/utils/launcher_handler.rb +110 -110
  157. data/lib/version/version.rb +1 -1
  158. metadata +85 -3
@@ -1,127 +1,127 @@
1
- /*
2
- * wctype.h
3
- *
4
- * Functions for testing wide character types and converting characters.
5
- *
6
- * This file is part of the Mingw32 package.
7
- *
8
- * Contributors:
9
- * Created by Mumit Khan <khan@xraylith.wisc.edu>
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
- */
22
-
23
- #ifndef _WCTYPE_H_
24
- #define _WCTYPE_H_
25
-
26
- /* All the headers include this file. */
27
- #include <_mingw.h>
28
-
29
- #define __need_wchar_t
30
- #define __need_wint_t
31
- #ifndef RC_INVOKED
32
- #include <stddef.h>
33
- #endif /* Not RC_INVOKED */
34
-
35
- /*
36
- * The following flags are used to tell iswctype and _isctype what character
37
- * types you are looking for.
38
- */
39
- #define _UPPER 0x0001
40
- #define _LOWER 0x0002
41
- #define _DIGIT 0x0004
42
- #define _SPACE 0x0008
43
- #define _PUNCT 0x0010
44
- #define _CONTROL 0x0020
45
- #define _BLANK 0x0040
46
- #define _HEX 0x0080
47
- #define _LEADBYTE 0x8000
48
-
49
- #define _ALPHA 0x0103
50
-
51
- #ifndef RC_INVOKED
52
-
53
- #ifdef __cplusplus
54
- extern "C" {
55
- #endif
56
-
57
- #ifndef WEOF
58
- #define WEOF (wchar_t)(0xFFFF)
59
- #endif
60
-
61
- #ifndef _WCTYPE_T_DEFINED
62
- typedef wchar_t wctype_t;
63
- #define _WCTYPE_T_DEFINED
64
- #endif
65
-
66
- /* Wide character equivalents - also in ctype.h */
67
- int iswalnum(wint_t);
68
- int iswalpha(wint_t);
69
- int iswascii(wint_t);
70
- int iswcntrl(wint_t);
71
- int iswctype(wint_t, wctype_t);
72
- int is_wctype(wint_t, wctype_t); /* Obsolete! */
73
- int iswdigit(wint_t);
74
- int iswgraph(wint_t);
75
- int iswlower(wint_t);
76
- int iswprint(wint_t);
77
- int iswpunct(wint_t);
78
- int iswspace(wint_t);
79
- int iswupper(wint_t);
80
- int iswxdigit(wint_t);
81
-
82
- wchar_t towlower(wchar_t);
83
- wchar_t towupper(wchar_t);
84
-
85
- int isleadbyte (int);
86
-
87
- /* Also in ctype.h */
88
-
89
- __MINGW_IMPORT unsigned short _ctype[];
90
- #ifdef __MSVCRT__
91
- __MINGW_IMPORT unsigned short* _pctype;
92
- #else
93
- __MINGW_IMPORT unsigned short* _pctype_dll;
94
- #define _pctype _pctype_dll
95
- #endif
96
-
97
- #if !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
98
- #define __WCTYPE_INLINES_DEFINED
99
- extern inline int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
100
- extern inline int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
101
- extern inline int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
102
- extern inline int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
103
- extern inline int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
104
- extern inline int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
105
- extern inline int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
106
- extern inline int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
107
- extern inline int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
108
- extern inline int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
109
- extern inline int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
110
- extern inline int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
111
- extern inline int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
112
- #endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
113
-
114
-
115
- typedef wchar_t wctrans_t;
116
- wint_t towctrans(wint_t, wctrans_t);
117
- wctrans_t wctrans(const char*);
118
- wctype_t wctype(const char*);
119
-
120
- #ifdef __cplusplus
121
- }
122
- #endif
123
-
124
- #endif /* Not RC_INVOKED */
125
-
126
- #endif /* Not _WCTYPE_H_ */
127
-
1
+ /*
2
+ * wctype.h
3
+ *
4
+ * Functions for testing wide character types and converting characters.
5
+ *
6
+ * This file is part of the Mingw32 package.
7
+ *
8
+ * Contributors:
9
+ * Created by Mumit Khan <khan@xraylith.wisc.edu>
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
+ */
22
+
23
+ #ifndef _WCTYPE_H_
24
+ #define _WCTYPE_H_
25
+
26
+ /* All the headers include this file. */
27
+ #include <_mingw.h>
28
+
29
+ #define __need_wchar_t
30
+ #define __need_wint_t
31
+ #ifndef RC_INVOKED
32
+ #include <stddef.h>
33
+ #endif /* Not RC_INVOKED */
34
+
35
+ /*
36
+ * The following flags are used to tell iswctype and _isctype what character
37
+ * types you are looking for.
38
+ */
39
+ #define _UPPER 0x0001
40
+ #define _LOWER 0x0002
41
+ #define _DIGIT 0x0004
42
+ #define _SPACE 0x0008
43
+ #define _PUNCT 0x0010
44
+ #define _CONTROL 0x0020
45
+ #define _BLANK 0x0040
46
+ #define _HEX 0x0080
47
+ #define _LEADBYTE 0x8000
48
+
49
+ #define _ALPHA 0x0103
50
+
51
+ #ifndef RC_INVOKED
52
+
53
+ #ifdef __cplusplus
54
+ extern "C" {
55
+ #endif
56
+
57
+ #ifndef WEOF
58
+ #define WEOF (wchar_t)(0xFFFF)
59
+ #endif
60
+
61
+ #ifndef _WCTYPE_T_DEFINED
62
+ typedef wchar_t wctype_t;
63
+ #define _WCTYPE_T_DEFINED
64
+ #endif
65
+
66
+ /* Wide character equivalents - also in ctype.h */
67
+ int iswalnum(wint_t);
68
+ int iswalpha(wint_t);
69
+ int iswascii(wint_t);
70
+ int iswcntrl(wint_t);
71
+ int iswctype(wint_t, wctype_t);
72
+ int is_wctype(wint_t, wctype_t); /* Obsolete! */
73
+ int iswdigit(wint_t);
74
+ int iswgraph(wint_t);
75
+ int iswlower(wint_t);
76
+ int iswprint(wint_t);
77
+ int iswpunct(wint_t);
78
+ int iswspace(wint_t);
79
+ int iswupper(wint_t);
80
+ int iswxdigit(wint_t);
81
+
82
+ wchar_t towlower(wchar_t);
83
+ wchar_t towupper(wchar_t);
84
+
85
+ int isleadbyte (int);
86
+
87
+ /* Also in ctype.h */
88
+
89
+ __MINGW_IMPORT unsigned short _ctype[];
90
+ #ifdef __MSVCRT__
91
+ __MINGW_IMPORT unsigned short* _pctype;
92
+ #else
93
+ __MINGW_IMPORT unsigned short* _pctype_dll;
94
+ #define _pctype _pctype_dll
95
+ #endif
96
+
97
+ #if !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED))
98
+ #define __WCTYPE_INLINES_DEFINED
99
+ extern inline int iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
100
+ extern inline int iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
101
+ extern inline int iswascii(wint_t wc) {return (((unsigned)wc & 0x7F) ==0);}
102
+ extern inline int iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
103
+ extern inline int iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
104
+ extern inline int iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
105
+ extern inline int iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
106
+ extern inline int iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
107
+ extern inline int iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
108
+ extern inline int iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
109
+ extern inline int iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
110
+ extern inline int iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
111
+ extern inline int isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
112
+ #endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
113
+
114
+
115
+ typedef wchar_t wctrans_t;
116
+ wint_t towctrans(wint_t, wctrans_t);
117
+ wctrans_t wctrans(const char*);
118
+ wctype_t wctype(const char*);
119
+
120
+ #ifdef __cplusplus
121
+ }
122
+ #endif
123
+
124
+ #endif /* Not RC_INVOKED */
125
+
126
+ #endif /* Not _WCTYPE_H_ */
127
+
@@ -1,119 +1,119 @@
1
- #ifndef _BASETSD_H
2
- #define _BASETSD_H
3
- #if __GNUC__ >=3
4
- #pragma GCC system_header
5
- #endif
6
-
7
- #ifdef __GNUC__
8
- #ifndef __int64
9
- #define __int64 long long
10
- #endif
11
- #endif
12
-
13
- #if defined(_WIN64)
14
- #define __int3264 __int64
15
- #define ADDRESS_TAG_BIT 0x40000000000UI64
16
- #else /* !_WIN64 */
17
- #define __int3264 __int32
18
- #define ADDRESS_TAG_BIT 0x80000000UL
19
- #define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
20
- #define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
21
- #define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
22
- #define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
23
- #define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
24
- #define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
25
- #define PtrToInt( p ) ((INT)(INT_PTR) (p) )
26
- #define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
27
- #define PtrToShort( p ) ((short)(LONG_PTR)(p) )
28
- #define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
29
- #define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
30
- #define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
31
- #define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
32
- #endif /* !_WIN64 */
33
-
34
- #define UlongToPtr(ul) ULongToPtr(ul)
35
- #define UintToPtr(ui) UIntToPtr(ui)
36
- #define MAXUINT_PTR (~((UINT_PTR)0))
37
- #define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
38
- #define MININT_PTR (~MAXINT_PTR)
39
- #define MAXULONG_PTR (~((ULONG_PTR)0))
40
- #define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
41
- #define MINLONG_PTR (~MAXLONG_PTR)
42
- #define MAXUHALF_PTR ((UHALF_PTR)~0)
43
- #define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
44
- #define MINHALF_PTR (~MAXHALF_PTR)
45
-
46
- #ifndef RC_INVOKED
47
- #ifdef __cplusplus
48
- extern "C" {
49
- #endif
50
- typedef int LONG32, *PLONG32;
51
- #ifndef XFree86Server
52
- typedef int INT32, *PINT32;
53
- #endif /* ndef XFree86Server */
54
- typedef unsigned int ULONG32, *PULONG32;
55
- typedef unsigned int DWORD32, *PDWORD32;
56
- typedef unsigned int UINT32, *PUINT32;
57
-
58
- #if defined(_WIN64)
59
- typedef __int64 INT_PTR, *PINT_PTR;
60
- typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
61
- typedef __int64 LONG_PTR, *PLONG_PTR;
62
- typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
63
- typedef unsigned __int64 HANDLE_PTR;
64
- typedef unsigned int UHALF_PTR, *PUHALF_PTR;
65
- typedef int HALF_PTR, *PHALF_PTR;
66
-
67
- #if 0 /* TODO when WIN64 is here */
68
- inline unsigned long HandleToUlong(const void* h )
69
- { return((unsigned long) h ); }
70
- inline long HandleToLong( const void* h )
71
- { return((long) h ); }
72
- inline void* LongToHandle( const long h )
73
- { return((void*) (INT_PTR) h ); }
74
- inline unsigned long PtrToUlong( const void* p)
75
- { return((unsigned long) p ); }
76
- inline unsigned int PtrToUint( const void* p )
77
- { return((unsigned int) p ); }
78
- inline unsigned short PtrToUshort( const void* p )
79
- { return((unsigned short) p ); }
80
- inline long PtrToLong( const void* p )
81
- { return((long) p ); }
82
- inline int PtrToInt( const void* p )
83
- { return((int) p ); }
84
- inline short PtrToShort( const void* p )
85
- { return((short) p ); }
86
- inline void* IntToPtr( const int i )
87
- { return( (void*)(INT_PTR)i ); }
88
- inline void* UIntToPtr(const unsigned int ui)
89
- { return( (void*)(UINT_PTR)ui ); }
90
- inline void* LongToPtr( const long l )
91
- { return( (void*)(LONG_PTR)l ); }
92
- inline void* ULongToPtr( const unsigned long ul )
93
- { return( (void*)(ULONG_PTR)ul ); }
94
- #endif /* 0_ */
95
-
96
- #else /* !_WIN64 */
97
- typedef int INT_PTR, *PINT_PTR;
98
- typedef unsigned int UINT_PTR, *PUINT_PTR;
99
- typedef long LONG_PTR, *PLONG_PTR;
100
- typedef unsigned long ULONG_PTR, *PULONG_PTR;
101
- typedef unsigned short UHALF_PTR, *PUHALF_PTR;
102
- typedef short HALF_PTR, *PHALF_PTR;
103
- typedef unsigned long HANDLE_PTR;
104
- #endif /* !_WIN64 */
105
-
106
- typedef ULONG_PTR SIZE_T, *PSIZE_T;
107
- typedef LONG_PTR SSIZE_T, *PSSIZE_T;
108
- typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
109
- typedef __int64 LONG64, *PLONG64;
110
- typedef __int64 INT64, *PINT64;
111
- typedef unsigned __int64 ULONG64, *PULONG64;
112
- typedef unsigned __int64 DWORD64, *PDWORD64;
113
- typedef unsigned __int64 UINT64, *PUINT64;
114
- #ifdef __cplusplus
115
- }
116
- #endif
117
- #endif /* !RC_INVOKED */
118
-
119
- #endif /* _BASETSD_H */
1
+ #ifndef _BASETSD_H
2
+ #define _BASETSD_H
3
+ #if __GNUC__ >=3
4
+ #pragma GCC system_header
5
+ #endif
6
+
7
+ #ifdef __GNUC__
8
+ #ifndef __int64
9
+ #define __int64 long long
10
+ #endif
11
+ #endif
12
+
13
+ #if defined(_WIN64)
14
+ #define __int3264 __int64
15
+ #define ADDRESS_TAG_BIT 0x40000000000UI64
16
+ #else /* !_WIN64 */
17
+ #define __int3264 __int32
18
+ #define ADDRESS_TAG_BIT 0x80000000UL
19
+ #define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
20
+ #define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
21
+ #define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
22
+ #define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
23
+ #define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
24
+ #define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
25
+ #define PtrToInt( p ) ((INT)(INT_PTR) (p) )
26
+ #define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
27
+ #define PtrToShort( p ) ((short)(LONG_PTR)(p) )
28
+ #define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
29
+ #define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
30
+ #define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
31
+ #define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
32
+ #endif /* !_WIN64 */
33
+
34
+ #define UlongToPtr(ul) ULongToPtr(ul)
35
+ #define UintToPtr(ui) UIntToPtr(ui)
36
+ #define MAXUINT_PTR (~((UINT_PTR)0))
37
+ #define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
38
+ #define MININT_PTR (~MAXINT_PTR)
39
+ #define MAXULONG_PTR (~((ULONG_PTR)0))
40
+ #define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
41
+ #define MINLONG_PTR (~MAXLONG_PTR)
42
+ #define MAXUHALF_PTR ((UHALF_PTR)~0)
43
+ #define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
44
+ #define MINHALF_PTR (~MAXHALF_PTR)
45
+
46
+ #ifndef RC_INVOKED
47
+ #ifdef __cplusplus
48
+ extern "C" {
49
+ #endif
50
+ typedef int LONG32, *PLONG32;
51
+ #ifndef XFree86Server
52
+ typedef int INT32, *PINT32;
53
+ #endif /* ndef XFree86Server */
54
+ typedef unsigned int ULONG32, *PULONG32;
55
+ typedef unsigned int DWORD32, *PDWORD32;
56
+ typedef unsigned int UINT32, *PUINT32;
57
+
58
+ #if defined(_WIN64)
59
+ typedef __int64 INT_PTR, *PINT_PTR;
60
+ typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
61
+ typedef __int64 LONG_PTR, *PLONG_PTR;
62
+ typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
63
+ typedef unsigned __int64 HANDLE_PTR;
64
+ typedef unsigned int UHALF_PTR, *PUHALF_PTR;
65
+ typedef int HALF_PTR, *PHALF_PTR;
66
+
67
+ #if 0 /* TODO when WIN64 is here */
68
+ inline unsigned long HandleToUlong(const void* h )
69
+ { return((unsigned long) h ); }
70
+ inline long HandleToLong( const void* h )
71
+ { return((long) h ); }
72
+ inline void* LongToHandle( const long h )
73
+ { return((void*) (INT_PTR) h ); }
74
+ inline unsigned long PtrToUlong( const void* p)
75
+ { return((unsigned long) p ); }
76
+ inline unsigned int PtrToUint( const void* p )
77
+ { return((unsigned int) p ); }
78
+ inline unsigned short PtrToUshort( const void* p )
79
+ { return((unsigned short) p ); }
80
+ inline long PtrToLong( const void* p )
81
+ { return((long) p ); }
82
+ inline int PtrToInt( const void* p )
83
+ { return((int) p ); }
84
+ inline short PtrToShort( const void* p )
85
+ { return((short) p ); }
86
+ inline void* IntToPtr( const int i )
87
+ { return( (void*)(INT_PTR)i ); }
88
+ inline void* UIntToPtr(const unsigned int ui)
89
+ { return( (void*)(UINT_PTR)ui ); }
90
+ inline void* LongToPtr( const long l )
91
+ { return( (void*)(LONG_PTR)l ); }
92
+ inline void* ULongToPtr( const unsigned long ul )
93
+ { return( (void*)(ULONG_PTR)ul ); }
94
+ #endif /* 0_ */
95
+
96
+ #else /* !_WIN64 */
97
+ typedef int INT_PTR, *PINT_PTR;
98
+ typedef unsigned int UINT_PTR, *PUINT_PTR;
99
+ typedef long LONG_PTR, *PLONG_PTR;
100
+ typedef unsigned long ULONG_PTR, *PULONG_PTR;
101
+ typedef unsigned short UHALF_PTR, *PUHALF_PTR;
102
+ typedef short HALF_PTR, *PHALF_PTR;
103
+ typedef unsigned long HANDLE_PTR;
104
+ #endif /* !_WIN64 */
105
+
106
+ typedef ULONG_PTR SIZE_T, *PSIZE_T;
107
+ typedef LONG_PTR SSIZE_T, *PSSIZE_T;
108
+ typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
109
+ typedef __int64 LONG64, *PLONG64;
110
+ typedef __int64 INT64, *PINT64;
111
+ typedef unsigned __int64 ULONG64, *PULONG64;
112
+ typedef unsigned __int64 DWORD64, *PDWORD64;
113
+ typedef unsigned __int64 UINT64, *PUINT64;
114
+ #ifdef __cplusplus
115
+ }
116
+ #endif
117
+ #endif /* !RC_INVOKED */
118
+
119
+ #endif /* _BASETSD_H */