widl: Store the size of a pointer in a variable instead of hardcoding the value of the host compiler.
This commit is contained in:
parent
a011f0cd5b
commit
9ca1382eae
@ -510,6 +510,8 @@ void write_client(const statement_list_t *stmts)
|
|||||||
if (!client)
|
if (!client)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
pointer_size = sizeof(void*);
|
||||||
|
|
||||||
write_formatstringsdecl(client, indent, stmts, need_stub);
|
write_formatstringsdecl(client, indent, stmts, need_stub);
|
||||||
expr_eval_routines = write_expr_eval_routines(client, client_token);
|
expr_eval_routines = write_expr_eval_routines(client, client_token);
|
||||||
if (expr_eval_routines)
|
if (expr_eval_routines)
|
||||||
|
@ -127,8 +127,6 @@ static void init_proxy(const statement_list_t *stmts)
|
|||||||
print_proxy( " return (__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE);\n");
|
print_proxy( " return (__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE);\n");
|
||||||
print_proxy( "}\n");
|
print_proxy( "}\n");
|
||||||
print_proxy( "\n");
|
print_proxy( "\n");
|
||||||
write_formatstringsdecl(proxy, indent, stmts, need_proxy);
|
|
||||||
write_stubdescproto();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clear_output_vars( const var_list_t *args )
|
static void clear_output_vars( const var_list_t *args )
|
||||||
@ -757,6 +755,10 @@ void write_proxies(const statement_list_t *stmts)
|
|||||||
init_proxy(stmts);
|
init_proxy(stmts);
|
||||||
if(!proxy) return;
|
if(!proxy) return;
|
||||||
|
|
||||||
|
pointer_size = sizeof(void*);
|
||||||
|
|
||||||
|
write_formatstringsdecl(proxy, indent, stmts, need_proxy);
|
||||||
|
write_stubdescproto();
|
||||||
write_proxy_stmts(stmts, &proc_offset);
|
write_proxy_stmts(stmts, &proc_offset);
|
||||||
|
|
||||||
expr_eval_routines = write_expr_eval_routines(proxy, proxy_token);
|
expr_eval_routines = write_expr_eval_routines(proxy, proxy_token);
|
||||||
|
@ -450,6 +450,8 @@ void write_server(const statement_list_t *stmts)
|
|||||||
if (!server)
|
if (!server)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
pointer_size = sizeof(void*);
|
||||||
|
|
||||||
write_formatstringsdecl(server, indent, stmts, need_stub);
|
write_formatstringsdecl(server, indent, stmts, need_stub);
|
||||||
expr_eval_routines = write_expr_eval_routines(server, server_token);
|
expr_eval_routines = write_expr_eval_routines(server, server_token);
|
||||||
if (expr_eval_routines)
|
if (expr_eval_routines)
|
||||||
|
@ -1018,7 +1018,8 @@ size_t type_memsize(const type_t *t, unsigned int *align)
|
|||||||
}
|
}
|
||||||
else if (is_ptr(t) || is_conformant_array(t))
|
else if (is_ptr(t) || is_conformant_array(t))
|
||||||
{
|
{
|
||||||
size = sizeof(void *);
|
assert( pointer_size );
|
||||||
|
size = pointer_size;
|
||||||
if (size > *align) *align = size;
|
if (size > *align) *align = size;
|
||||||
}
|
}
|
||||||
else switch (t->type)
|
else switch (t->type)
|
||||||
|
@ -132,6 +132,8 @@ FILE *local_stubs;
|
|||||||
FILE *proxy;
|
FILE *proxy;
|
||||||
FILE *idfile;
|
FILE *idfile;
|
||||||
|
|
||||||
|
size_t pointer_size = 0;
|
||||||
|
|
||||||
time_t now;
|
time_t now;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -59,6 +59,7 @@ extern char *server_name;
|
|||||||
extern char *server_token;
|
extern char *server_token;
|
||||||
extern const char *prefix_client;
|
extern const char *prefix_client;
|
||||||
extern const char *prefix_server;
|
extern const char *prefix_server;
|
||||||
|
extern size_t pointer_size;
|
||||||
extern time_t now;
|
extern time_t now;
|
||||||
|
|
||||||
extern int line_number;
|
extern int line_number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user