#define JOIN_IMPL(A, B) A##B #define JOIN(A, B) JOIN_IMPL(A, B) #define CHECK(FEATURE) \ (JOIN(PREFIX, JOIN(_COMPILER_, FEATURE)) == \ JOIN(EXPECTED_COMPILER_, FEATURE)) #if !CHECK(CXX_DELEGATING_CONSTRUCTORS) # error cxx_delegating_constructors expected availability did not match. #endif #if !CHECK(CXX_VARIADIC_TEMPLATES) # error cxx_variadic_templates expected availability did not match. #endif #if !CHECK(VERSION_MAJOR) # error Compiler major version did not match. #endif #if !CHECK(VERSION_MINOR) # error Compiler minor version did not match. #endif #if !CHECK(VERSION_PATCH) # error Compiler patch version did not match. #endif /td>
Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/win/stub16.c
blob: 70fc0519b1d272afe64ab771fddd1dbe254e0bd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/*
 * stub16.c
 *
 *	A helper program used for running 16-bit DOS applications under
 *	Windows 95.
 *
 * Copyright (c) 1996 by Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */

#define STRICT

#include <windows.h>
#include <stdio.h>

static HANDLE		CreateTempFile(void);

/*
 *---------------------------------------------------------------------------
 *
 * main
 *
 *	Entry point for the 32-bit console mode app used by Windows 95 to help
 *	run the 16-bit program specified on the command line.
 *
 *	1. EOF on a pipe that connects a detached 16-bit process and a 32-bit
 *	process is never seen. So, this process runs the 16-bit process
 *	_attached_, and then it is run detached from the calling 32-bit
 *	process.
 *
 *	2. If a 16-bit process blocks reading from or writing to a pipe, it