1 --- client.c 2008-09-27 21:56:02.000000000 +0200
2 +++ client.c 2008-09-27 20:49:05.000000000 +0200
7 - if (!explicit_handle_var || !explicit_generic_handle_var || !context_handle_var)
8 + if (!explicit_handle_var && !explicit_generic_handle_var && !context_handle_var)
10 error("%s() does not define an explicit binding handle!\n", def->name);
12 --- hash.c 2008-09-27 21:56:02.000000000 +0200
13 +++ hash.c 2008-09-22 00:14:35.703125000 +0200
21 +#include <host/nls.h>
26 case LANG_SWEDISH: case LANG_SYRIAC: case LANG_TAMIL:
27 case LANG_TATAR: case LANG_TELUGU: case LANG_THAI:
28 case LANG_UKRAINIAN: case LANG_URDU: case LANG_UZBEK:
30 case LANG_VIETNAMESE: case LANG_GAELIC: case LANG_MALTESE:
31 case LANG_TAJIK: case LANG_ROMANSH: case LANG_IRISH:
32 case LANG_SAMI: case LANG_UPPER_SORBIAN: case LANG_SUTU:
34 case LANG_XHOSA: case LANG_ZULU: case LANG_ESPERANTO:
35 case LANG_WALON: case LANG_CORNISH: case LANG_WELSH:
38 + case LANG_VIETNAMESE: case LANG_MALTESE: case LANG_IRISH:
39 + case LANG_SAMI: case LANG_UPPER_SORBIAN: case LANG_TSWANA:
40 + case LANG_XHOSA: case LANG_ZULU: case LANG_WELSH:
46 --- header.c 2008-09-27 21:56:02.000000000 +0200
47 +++ header.c 2008-09-27 20:49:05.000000000 +0200
49 const char *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);
50 int explicit_handle = is_attr(iface->attrs, ATTR_EXPLICIT_HANDLE);
51 const var_t* explicit_handle_var;
52 + const var_t* explicit_generic_handle_var = NULL;
53 + const var_t* context_handle_var = NULL;
55 int prefixes_differ = strcmp(prefix_client, prefix_server);
59 /* check for a defined binding handle */
60 explicit_handle_var = get_explicit_handle_var(cur);
61 + if (!explicit_handle_var)
63 + explicit_generic_handle_var = get_explicit_generic_handle_var(cur);
64 + if (!explicit_generic_handle_var)
65 + context_handle_var = get_context_handle_var(cur);
67 if (explicit_handle) {
68 - if (!explicit_handle_var) {
69 + if (!explicit_handle_var && !explicit_generic_handle_var && !context_handle_var) {
70 error("%s() does not define an explicit binding handle!\n", def->name);
73 --- header.h 2008-09-27 21:56:02.000000000 +0200
74 +++ header.h 2008-09-23 21:14:50.781250000 +0200
76 extern const var_t* get_explicit_handle_var(const func_t* func);
77 extern const type_t* get_explicit_generic_handle_type(const var_t* var);
78 extern const var_t* get_explicit_generic_handle_var(const func_t* func);
79 +extern const var_t* get_context_handle_var(const func_t* func);
80 extern int has_out_arg_or_return(const func_t *func);
81 extern void write_guid(FILE *f, const char *guid_prefix, const char *name,
85 static inline int is_context_handle(const type_t *type)
88 - for (t = type; is_ptr(t); t = t->ref)
89 - if (is_attr(t->attrs, ATTR_CONTEXTHANDLE))
90 + if (is_attr(type->attrs, ATTR_CONTEXTHANDLE))
95 + if (is_attr(type->attrs, ATTR_CONTEXTHANDLE))
98 + else if (type->kind == TKIND_ALIAS)
100 + else if (is_ptr(type))
107 --- proxy.c 2008-09-27 21:56:02.000000000 +0200
108 +++ proxy.c 2008-09-27 20:49:05.000000000 +0200
109 @@ -463,41 +463,45 @@
113 -static int write_proxy_methods(type_t *iface)
114 +static int write_proxy_methods(type_t *iface, int skip)
119 - if (iface->ref) i = write_proxy_methods(iface->ref);
120 + if (iface->ref) i = write_proxy_methods(iface->ref, iface->ref->ref != NULL);
121 if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) {
122 var_t *def = cur->def;
123 if (!is_callas(def->attrs)) {
124 if (i) fprintf(proxy, ",\n");
125 - print_proxy( "%s_", iface->name);
126 + print_proxy( "%s%s_", skip ? "0\t/* " : "", iface->name);
127 write_name(proxy, def);
128 - fprintf(proxy, "_Proxy");
129 + fprintf(proxy, "_Proxy%s", skip ? " */" : "");
136 -static int write_stub_methods(type_t *iface)
137 +static int write_stub_methods(type_t *iface, int skip)
142 - if (iface->ref) i = write_stub_methods(iface->ref);
143 + if (iface->ref) i = write_stub_methods(iface->ref, TRUE);
144 else return i; /* skip IUnknown */
146 if (iface->funcs) LIST_FOR_EACH_ENTRY( cur, iface->funcs, const func_t, entry ) {
147 var_t *def = cur->def;
148 if (!is_local(def->attrs)) {
149 - if (i) fprintf(proxy,",\n");
150 - print_proxy( "%s_", iface->name);
151 - write_name(proxy, def);
152 - fprintf(proxy, "_Stub");
155 + print_proxy("STUB_FORWARDING_FUNCTION,\n");
157 + if (i) fprintf(proxy,",\n");
158 + print_proxy( "%s_", iface->name);
159 + write_name(proxy, def);
160 + fprintf(proxy, "_Stub");
167 print_proxy( "},\n");
170 - write_proxy_methods(iface);
171 + write_proxy_methods(iface, FALSE);
172 fprintf(proxy, "\n");
176 print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name);
179 - stubs = write_stub_methods(iface);
180 + stubs = write_stub_methods(iface, FALSE);
181 fprintf(proxy, "\n");
183 fprintf(proxy, "};\n");
184 --- server.c 2008-09-27 21:56:02.000000000 +0200
185 +++ server.c 2008-09-27 20:49:05.000000000 +0200
187 LIST_FOR_EACH_ENTRY( func, iface->funcs, const func_t, entry )
189 const var_t *def = func->def;
190 + const var_t* context_handle_var = NULL;
191 + const var_t* explicit_generic_handle_var = NULL;
192 int has_full_pointer = is_full_pointer_function(func);
194 /* check for a defined binding handle */
195 explicit_handle_var = get_explicit_handle_var(func);
196 + if (!explicit_handle_var)
198 + explicit_generic_handle_var = get_explicit_generic_handle_var(func);
199 + if (!explicit_generic_handle_var)
200 + context_handle_var = get_context_handle_var(func);
204 - if (!explicit_handle_var)
205 + if (!explicit_handle_var && !explicit_generic_handle_var && !context_handle_var)
207 error("%s() does not define an explicit binding handle!\n", def->name);
210 print_server("/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name);
211 print_server("#include <string.h>\n");
212 fprintf(server, "\n");
213 + print_server("#define _SEH_NO_NATIVE_NLG\n");
214 print_server("#include \"%s\"\n", header_name);
215 fprintf(server, "\n");
217 --- typelib.c 2008-09-27 21:56:02.000000000 +0200
218 +++ typelib.c 2008-09-27 20:49:05.000000000 +0200
220 #define NONAMELESSUNION
221 #define NONAMELESSSTRUCT
224 -#include "winbase.h"
225 +#include <host/typedefs.h>
229 @@ -360,10 +359,10 @@
231 file_name = wpp_find_include(importlib->name, NULL);
233 - fd = open(file_name, O_RDONLY);
234 + fd = open(file_name, O_RDONLY | O_BINARY);
237 - fd = open(importlib->name, O_RDONLY);
238 + fd = open(importlib->name, O_RDONLY | O_BINARY);
242 --- typelib_struct.h 2008-09-27 21:56:02.000000000 +0200
243 +++ typelib_struct.h 2008-09-22 00:14:35.703125000 +0200
248 -#include "pshpack1.h"
249 +#include <host/pshpack1.h>
252 /*00*/ DWORD SLTG_magic; /* 0x47544c53 == "SLTG" */
257 -#include "poppack.h"
258 +#include <host/poppack.h>
260 /*---------------------------END--------------------------------------------*/
262 --- widl.c 2008-09-27 21:56:02.000000000 +0200
263 +++ widl.c 2008-09-27 20:49:05.000000000 +0200
265 token = xstrdup(name);
266 for (i=0; token[i]; i++) {
267 if (!isalnum(token[i])) token[i] = '_';
268 - else token[i] = toupper(token[i]);
269 + else token[i] = tolower(token[i]);
274 fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name);
275 fprintf(header, "#include <rpc.h>\n" );
276 fprintf(header, "#include <rpcndr.h>\n\n" );
277 - fprintf(header, "#ifndef __WIDL_%s\n", header_token);
278 - fprintf(header, "#define __WIDL_%s\n", header_token);
279 + fprintf(header, "#ifndef __%s__\n", header_token);
280 + fprintf(header, "#define __%s__\n", header_token);
281 start_cplusplus_guard(header);
285 fprintf(header, "/* End additional prototypes */\n");
286 fprintf(header, "\n");
287 end_cplusplus_guard(header);
288 - fprintf(header, "#endif /* __WIDL_%s */\n", header_token);
289 + fprintf(header, "#endif /* __%s__ */\n", header_token);
293 --- widltypes.h 2008-09-27 21:56:02.000000000 +0200
294 +++ widltypes.h 2008-09-26 19:42:52.859375000 +0200
296 #ifndef __WIDL_WIDLTYPES_H
297 #define __WIDL_WIDLTYPES_H
301 +#define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
302 +#define TYPE_E_IOERROR ((HRESULT)0x80028CA2L)
304 +#define max(a, b) ((a) > (b) ? a : b)
308 #include "wine/rpcfc.h"
318 #define RPC_FC_FUNCTION 0xfe
319 --- write_msft.c 2008-09-27 21:56:02.000000000 +0200
320 +++ write_msft.c 2008-09-27 20:49:05.000000000 +0200
322 #define NONAMELESSUNION
323 #define NONAMELESSSTRUCT
325 -#include "winerror.h"
327 -#include "winbase.h"
329 +#include <host/typedefs.h>
330 +#include <host/nls.h>
332 #include "widltypes.h"