rpcrt4/tests: Avoid type redefinition.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46680
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-03-07 14:00:51 +01:00 committed by Alexandre Julliard
parent 50a4c4642a
commit 994976dcb3
2 changed files with 28 additions and 24 deletions

View File

@ -27,7 +27,7 @@
#include <netfw.h>
#include "wine/test.h"
#include "server.h"
#define SKIP_STRUCT_DECLS
#define SKIP_TYPE_DECLS
#include "server_interp.h"
#include "server_defines.h"

View File

@ -37,16 +37,16 @@ import "objidl.idl";
#define ISERVER_UUID 00000000-4114-0704-2301-000000000000
#endif
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct tag_vector
{
int x;
int y;
int z;
} vector_t;
cpp_quote("#endif")
typedef int fnprintf(const char *format, ...);
cpp_quote("#endif")
[
uuid(ISERVER_UUID),
@ -58,7 +58,7 @@ cpp_quote("#if 0")
typedef wchar_t WCHAR;
cpp_quote("#endif")
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef [string] char *str_t;
typedef [string] WCHAR *wstr_t;
@ -121,7 +121,7 @@ cpp_quote("#endif")
double ptypes_sum(ptypes_t *ptypes);
int dot_pvectors(pvectors_t *pvectors);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
/* don't use this anywhere except in sp_t */
typedef struct
{
@ -138,7 +138,7 @@ cpp_quote("#endif")
int sum_sp(sp_t *sp);
double square_sun(sun_t *su);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct test_list
{
int t;
@ -162,7 +162,7 @@ cpp_quote("#endif")
int dot_two_vectors(vector_t vs[2]);
void get_number_array([out, length_is(*n)] int x[20], [out] int *n);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
int n;
@ -192,10 +192,12 @@ cpp_quote("#endif")
int get_cpsc(int n, [out] cpsc_t *cpsc );
int sum_complex_array(int n, [size_is(n)] refpint_t pi[]);
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef [wire_marshal(int)] void *puint_t;
cpp_quote("#endif")
int square_puint(puint_t p);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
[size_is(n)] puint_t *ps;
@ -214,7 +216,7 @@ cpp_quote("#endif")
int sum_cpuints(cpuints_t *p);
int dot_copy_vectors(vector_t u, vector_t v);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct wire_us *wire_us_t;
typedef [wire_marshal(wire_us_t)] struct us us_t;
struct us
@ -233,7 +235,7 @@ cpp_quote("#endif")
int square_test_us(test_us_t *tus);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef union encu switch (int t)
{
case ENCU_I: int i;
@ -277,7 +279,7 @@ cpp_quote("#endif")
int sum_toplev_conf_2n([size_is(n * 2)] int *x, int n);
int sum_toplev_conf_cond([size_is(c ? a : b)] int *x, int a, int b, int c);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
char c;
@ -289,7 +291,7 @@ cpp_quote("#endif")
double sum_aligns(aligns_t *a);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
int i;
@ -301,7 +303,7 @@ cpp_quote("#endif")
int sum_padded2(padded_t ps[2]);
int sum_padded_conf([size_is(n)] padded_t *ps, int n);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
int *p1;
@ -319,7 +321,7 @@ cpp_quote("#endif")
int sum_bogus(bogus_t *b);
void check_null([unique] int *null);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
str_t s;
@ -334,7 +336,7 @@ cpp_quote("#endif")
int str_struct_len(str_struct_t *s);
int wstr_struct_len(wstr_struct_t *s);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
unsigned int n;
@ -351,19 +353,19 @@ cpp_quote("#endif")
int sum_doub_carr(doub_carr_t *dc);
void make_pyramid_doub_carr(unsigned char n, [out] doub_carr_t **dc);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
short n;
[size_is(n)] short data[];
} user_bstr_t;
cpp_quote("#endif")
typedef [unique] user_bstr_t *wire_bstr_t;
typedef [wire_marshal(wire_bstr_t)] short *bstr_t;
cpp_quote("#endif")
unsigned hash_bstr(bstr_t s);
void get_a_bstr([out]bstr_t *s);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
[string, size_is(size)] char *name;
@ -372,15 +374,17 @@ cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#endif")
void get_name([in,out] name_t *name);
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef char **str_array_t;
void get_names([out] int *n, [out, string, size_is(,*n)] str_array_t *names);
typedef WCHAR **wstr_array_t;
cpp_quote("#endif")
void get_names([out] int *n, [out, string, size_is(,*n)] str_array_t *names);
void get_namesw([out] int *n, [out, string, size_is(,*n)] wstr_array_t *names);
int sum_pcarr2(int n, [size_is(, n)] int **pa);
int sum_L1_norms(int n, [size_is(n)] vector_t *vs);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
/* Don't use this except in the get_s123 test. */
typedef struct
{
@ -394,7 +398,7 @@ cpp_quote("#endif")
type as a return value. */
s123_t *get_s123(void);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef struct
{
unsigned int length;
@ -408,7 +412,7 @@ cpp_quote("#endif")
str_t get_filename(void);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
enum renum
{
RE0,
@ -435,7 +439,7 @@ cpp_quote("#endif")
void stop(void);
void stop_autolisten(void);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef union ipu switch(int t)
{
default: IStream *stream;
@ -447,7 +451,7 @@ cpp_quote("#endif")
int sum_ptr_array([in] int *a[2]);
int sum_array_ptr([in] int (*a)[2]);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
cpp_quote("#ifndef SKIP_TYPE_DECLS")
typedef [context_handle] void *ctx_handle_t;
cpp_quote("#endif")