diff --git a/dlls/d3dcompiler_33/Makefile.in b/dlls/d3dcompiler_33/Makefile.in index 1e28779b017..926f38d8745 100644 --- a/dlls/d3dcompiler_33/Makefile.in +++ b/dlls/d3dcompiler_33/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=33 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_34/Makefile.in b/dlls/d3dcompiler_34/Makefile.in index ba104d43a31..cf8dc1112ea 100644 --- a/dlls/d3dcompiler_34/Makefile.in +++ b/dlls/d3dcompiler_34/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=34 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_35/Makefile.in b/dlls/d3dcompiler_35/Makefile.in index 6bba8a23bc2..07bae8f801d 100644 --- a/dlls/d3dcompiler_35/Makefile.in +++ b/dlls/d3dcompiler_35/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=35 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_36/Makefile.in b/dlls/d3dcompiler_36/Makefile.in index 5fd11b2d8af..a654b7a7cf0 100644 --- a/dlls/d3dcompiler_36/Makefile.in +++ b/dlls/d3dcompiler_36/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=36 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_37/Makefile.in b/dlls/d3dcompiler_37/Makefile.in index 3b92a7ace7d..8dfb36fdf89 100644 --- a/dlls/d3dcompiler_37/Makefile.in +++ b/dlls/d3dcompiler_37/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=37 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_38/Makefile.in b/dlls/d3dcompiler_38/Makefile.in index ab49c2860b4..6042b0d4706 100644 --- a/dlls/d3dcompiler_38/Makefile.in +++ b/dlls/d3dcompiler_38/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=38 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_39/Makefile.in b/dlls/d3dcompiler_39/Makefile.in index 96270268713..9690d08793c 100644 --- a/dlls/d3dcompiler_39/Makefile.in +++ b/dlls/d3dcompiler_39/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=39 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_40/Makefile.in b/dlls/d3dcompiler_40/Makefile.in index eb5c751339d..46cd563793b 100644 --- a/dlls/d3dcompiler_40/Makefile.in +++ b/dlls/d3dcompiler_40/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=40 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_41/Makefile.in b/dlls/d3dcompiler_41/Makefile.in index 557f7602db5..f19e1392113 100644 --- a/dlls/d3dcompiler_41/Makefile.in +++ b/dlls/d3dcompiler_41/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=41 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_42/Makefile.in b/dlls/d3dcompiler_42/Makefile.in index 199780460cb..25a02dcbcea 100644 --- a/dlls/d3dcompiler_42/Makefile.in +++ b/dlls/d3dcompiler_42/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=42 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_43/Makefile.in b/dlls/d3dcompiler_43/Makefile.in index 3fd11cf3807..d273e278c3b 100644 --- a/dlls/d3dcompiler_43/Makefile.in +++ b/dlls/d3dcompiler_43/Makefile.in @@ -2,6 +2,8 @@ MODULE = d3dcompiler_43.dll IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_43/asmparser.c b/dlls/d3dcompiler_43/asmparser.c index 2d167dece57..16e86d94dab 100644 --- a/dlls/d3dcompiler_43/asmparser.c +++ b/dlls/d3dcompiler_43/asmparser.c @@ -20,8 +20,6 @@ * */ -#include "config.h" -#include "wine/port.h" #include "wine/debug.h" #include "d3dcompiler_private.h" diff --git a/dlls/d3dcompiler_43/asmshader.l b/dlls/d3dcompiler_43/asmshader.l index 35a404817f5..63ecddd1899 100644 --- a/dlls/d3dcompiler_43/asmshader.l +++ b/dlls/d3dcompiler_43/asmshader.l @@ -20,8 +20,6 @@ */ %{ -#include "config.h" -#include "wine/port.h" #include "wine/debug.h" #include "d3dcompiler_private.h" diff --git a/dlls/d3dcompiler_43/asmshader.y b/dlls/d3dcompiler_43/asmshader.y index 5948d57d5ed..f5dbb6c8bfc 100644 --- a/dlls/d3dcompiler_43/asmshader.y +++ b/dlls/d3dcompiler_43/asmshader.y @@ -20,8 +20,6 @@ */ %{ -#include "config.h" -#include "wine/port.h" #include "wine/debug.h" #include "d3dcompiler_private.h" @@ -30,13 +28,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(asmshader); struct asm_parser asm_ctx; -void asmparser_message(struct asm_parser *ctx, const char *fmt, ...) +void __cdecl asmparser_message(struct asm_parser *ctx, const char *fmt, ...) { - va_list args; + __ms_va_list args; - va_start(args, fmt); + __ms_va_start(args, fmt); compilation_message(&ctx->messages, fmt, args); - va_end(args); + __ms_va_end(args); } static void asmshader_error(char const *s) { diff --git a/dlls/d3dcompiler_43/blob.c b/dlls/d3dcompiler_43/blob.c index 6c925af8a44..5cc49fe5699 100644 --- a/dlls/d3dcompiler_43/blob.c +++ b/dlls/d3dcompiler_43/blob.c @@ -19,9 +19,6 @@ * */ -#include "config.h" -#include "wine/port.h" - #include "d3dcompiler_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler); diff --git a/dlls/d3dcompiler_43/bytecodewriter.c b/dlls/d3dcompiler_43/bytecodewriter.c index a3e6f63fd92..14162ab212b 100644 --- a/dlls/d3dcompiler_43/bytecodewriter.c +++ b/dlls/d3dcompiler_43/bytecodewriter.c @@ -20,8 +20,6 @@ * */ -#include "config.h" -#include "wine/port.h" #include "wine/debug.h" #include "d3d9types.h" diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index a3c91641f5f..1b2107cc277 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -18,12 +18,9 @@ */ #define COBJMACROS -#include "config.h" -#include "wine/port.h" #include #include #include "wine/debug.h" -#include "wine/unicode.h" #include "d3dcompiler_private.h" #include "wpp_private.h" @@ -86,7 +83,7 @@ static CRITICAL_SECTION_DEBUG wpp_mutex_debug = static CRITICAL_SECTION wpp_mutex = { &wpp_mutex_debug, -1, 0, 0, 0, 0 }; /* Preprocessor error reporting functions */ -static void wpp_write_message(const char *fmt, va_list args) +static void wpp_write_message(const char *fmt, __ms_va_list args) { char* newbuffer; int rc, newsize; @@ -126,39 +123,39 @@ static void wpp_write_message(const char *fmt, va_list args) } } -static void PRINTF_ATTR(1,2) wpp_write_message_var(const char *fmt, ...) +static void __cdecl PRINTF_ATTR(1,2) wpp_write_message_var(const char *fmt, ...) { - va_list args; + __ms_va_list args; - va_start(args, fmt); + __ms_va_start(args, fmt); wpp_write_message(fmt, args); - va_end(args); + __ms_va_end(args); } -int ppy_error(const char *msg, ...) +int __cdecl ppy_error(const char *msg, ...) { - va_list ap; - va_start(ap, msg); + __ms_va_list ap; + __ms_va_start(ap, msg); wpp_write_message_var("%s:%d:%d: %s: ", pp_status.input ? pp_status.input : "'main file'", pp_status.line_number, pp_status.char_number, "Error"); wpp_write_message(msg, ap); wpp_write_message_var("\n"); - va_end(ap); + __ms_va_end(ap); pp_status.state = 1; return 1; } -int ppy_warning(const char *msg, ...) +int __cdecl ppy_warning(const char *msg, ...) { - va_list ap; - va_start(ap, msg); + __ms_va_list ap; + __ms_va_start(ap, msg); wpp_write_message_var("%s:%d:%d: %s: ", pp_status.input ? pp_status.input : "'main file'", pp_status.line_number, pp_status.char_number, "Warning"); wpp_write_message(msg, ap); wpp_write_message_var("\n"); - va_end(ap); + __ms_va_end(ap); return 0; } diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index dabe0dacc30..d2162c83553 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -285,8 +285,8 @@ struct bwriter_shader *parse_asm_shader(char **messages) DECLSPEC_HIDDEN; #define PRINTF_ATTR(fmt,args) #endif -void compilation_message(struct compilation_messages *msg, const char *fmt, va_list args) DECLSPEC_HIDDEN; -void asmparser_message(struct asm_parser *ctx, const char *fmt, ...) PRINTF_ATTR(2,3) DECLSPEC_HIDDEN; +void compilation_message(struct compilation_messages *msg, const char *fmt, __ms_va_list args) DECLSPEC_HIDDEN; +void __cdecl asmparser_message(struct asm_parser *ctx, const char *fmt, ...) PRINTF_ATTR(2,3) DECLSPEC_HIDDEN; static inline void set_parse_status(enum parse_status *current, enum parse_status update) { if (update == PARSE_ERR) @@ -1055,8 +1055,8 @@ enum hlsl_error_level HLSL_LEVEL_NOTE, }; -void hlsl_message(const char *fmt, ...) PRINTF_ATTR(1,2) DECLSPEC_HIDDEN; -void hlsl_report_message(const char *filename, DWORD line, DWORD column, +void __cdecl hlsl_message(const char *fmt, ...) PRINTF_ATTR(1,2) DECLSPEC_HIDDEN; +void __cdecl hlsl_report_message(const char *filename, DWORD line, DWORD column, enum hlsl_error_level level, const char *fmt, ...) PRINTF_ATTR(5,6) DECLSPEC_HIDDEN; static inline struct hlsl_ir_var *var_from_node(const struct hlsl_ir_node *node) diff --git a/dlls/d3dcompiler_43/hlsl.l b/dlls/d3dcompiler_43/hlsl.l index f40e3c9a049..2994c7dea62 100644 --- a/dlls/d3dcompiler_43/hlsl.l +++ b/dlls/d3dcompiler_43/hlsl.l @@ -20,8 +20,6 @@ */ %{ -#include "config.h" -#include "wine/port.h" #include "wine/debug.h" #define YY_NO_UNISTD_H diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index 358ed96ef48..139ab4cd6a7 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ %{ -#include "config.h" #include "wine/debug.h" #include @@ -35,13 +34,13 @@ struct hlsl_parse_ctx hlsl_ctx; struct YYLTYPE; static void set_location(struct source_location *loc, const struct YYLTYPE *l); -void hlsl_message(const char *fmt, ...) +void __cdecl hlsl_message(const char *fmt, ...) { - va_list args; + __ms_va_list args; - va_start(args, fmt); + __ms_va_start(args, fmt); compilation_message(&hlsl_ctx.messages, fmt, args); - va_end(args); + __ms_va_end(args); } static const char *hlsl_get_error_level_name(enum hlsl_error_level level) @@ -55,18 +54,18 @@ static const char *hlsl_get_error_level_name(enum hlsl_error_level level) return names[level]; } -void hlsl_report_message(const char *filename, DWORD line, DWORD column, +void __cdecl hlsl_report_message(const char *filename, DWORD line, DWORD column, enum hlsl_error_level level, const char *fmt, ...) { - va_list args; + __ms_va_list args; char *string = NULL; int rc, size = 0; while (1) { - va_start(args, fmt); + __ms_va_start(args, fmt); rc = vsnprintf(string, size, fmt, args); - va_end(args); + __ms_va_end(args); if (rc >= 0 && rc < size) break; diff --git a/dlls/d3dcompiler_43/main.c b/dlls/d3dcompiler_43/main.c index 929cec0a7a4..3404655ac8e 100644 --- a/dlls/d3dcompiler_43/main.c +++ b/dlls/d3dcompiler_43/main.c @@ -19,8 +19,6 @@ * */ -#include "config.h" - #include #include "windef.h" diff --git a/dlls/d3dcompiler_43/ppl.l b/dlls/d3dcompiler_43/ppl.l index 16c36900c52..2fd8c65b5c2 100644 --- a/dlls/d3dcompiler_43/ppl.l +++ b/dlls/d3dcompiler_43/ppl.l @@ -155,17 +155,7 @@ ul [uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL] #include #include -#ifndef LLONG_MAX -# define LLONG_MAX ((__int64)0x7fffffff << 32 | 0xffffffff) -# define LLONG_MIN (-LLONG_MAX - 1) -#endif -#ifndef ULLONG_MAX -# define ULLONG_MAX ((__int64)0xffffffff << 32 | 0xffffffff) -#endif - -#ifndef HAVE_UNISTD_H #define YY_NO_UNISTD_H -#endif #include "wpp_private.h" #include "ppy.tab.h" @@ -295,9 +285,9 @@ includelogicentry_t *pp_includelogiclist = NULL; #define BUFFERINITIALCAPACITY 256 -void pp_writestring(const char *format, ...) +void __cdecl pp_writestring(const char *format, ...) { - va_list valist; + __ms_va_list valist; int len; static char *buffer; static int buffercapacity; @@ -311,10 +301,10 @@ void pp_writestring(const char *format, ...) buffercapacity = BUFFERINITIALCAPACITY; } - va_start(valist, format); + __ms_va_start(valist, format); len = vsnprintf(buffer, buffercapacity, format, valist); - va_end(valist); + __ms_va_end(valist); /* If the string is longer than buffersize, vsnprintf returns * the string length with glibc >= 2.1, -1 with glibc < 2.1 */ while(len > buffercapacity || len < 0) @@ -326,15 +316,12 @@ void pp_writestring(const char *format, ...) new_buffer = pp_xrealloc(buffer, buffercapacity); if(new_buffer == NULL) - { - va_end(valist); return; - } buffer = new_buffer; - va_start(valist, format); + __ms_va_start(valist, format); len = vsnprintf(buffer, buffercapacity, format, valist); - va_end(valist); + __ms_va_end(valist); } wpp_write(buffer, len); diff --git a/dlls/d3dcompiler_43/ppy.y b/dlls/d3dcompiler_43/ppy.y index 95be50b9633..d520883faab 100644 --- a/dlls/d3dcompiler_43/ppy.y +++ b/dlls/d3dcompiler_43/ppy.y @@ -20,9 +20,6 @@ */ %{ -#include "config.h" -#include "wine/port.h" - #include #include #include diff --git a/dlls/d3dcompiler_43/preproc.c b/dlls/d3dcompiler_43/preproc.c index 95f93cd0752..43a7d24477d 100644 --- a/dlls/d3dcompiler_43/preproc.c +++ b/dlls/d3dcompiler_43/preproc.c @@ -16,9 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include #include #include @@ -26,9 +23,6 @@ #include #include #include -#ifdef HAVE_UNISTD_H -# include -#endif #include "wpp_private.h" @@ -441,13 +435,13 @@ int pp_get_if_depth(void) return if_stack_idx; } -void pp_internal_error(const char *file, int line, const char *s, ...) +void __cdecl pp_internal_error(const char *file, int line, const char *s, ...) { - va_list ap; - va_start(ap, s); + __ms_va_list ap; + __ms_va_start(ap, s); fprintf(stderr, "Internal error (please report) %s %d: ", file, line); vfprintf(stderr, s, ap); fprintf(stderr, "\n"); - va_end(ap); + __ms_va_end(ap); exit(3); } diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 7c67c929547..e492011c55f 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -18,9 +18,6 @@ * */ -#include "config.h" -#include "wine/port.h" - #include "initguid.h" #include "d3dcompiler_private.h" #include "winternl.h" diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index 95a1dbd3d51..a521eb65382 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -21,9 +21,6 @@ * */ -#include "config.h" -#include "wine/port.h" - #include #include "d3dcompiler_private.h" @@ -719,7 +716,7 @@ HRESULT dxbc_write_blob(struct dxbc *dxbc, ID3DBlob **blob) return S_OK; } -void compilation_message(struct compilation_messages *msg, const char *fmt, va_list args) +void compilation_message(struct compilation_messages *msg, const char *fmt, __ms_va_list args) { char* buffer; int rc, size; diff --git a/dlls/d3dcompiler_43/wpp_private.h b/dlls/d3dcompiler_43/wpp_private.h index b4892624a4c..77025db1f2e 100644 --- a/dlls/d3dcompiler_43/wpp_private.h +++ b/dlls/d3dcompiler_43/wpp_private.h @@ -209,9 +209,9 @@ int pp_get_if_depth(void); extern const struct wpp_callbacks *wpp_callbacks; -int ppy_error(const char *s, ...) __attribute__((format (printf, 1, 2))); -int ppy_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); -void pp_internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4))); +int __cdecl ppy_error(const char *s, ...) __attribute__((format (printf, 1, 2))); +int __cdecl ppy_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); +void __cdecl pp_internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4))); /* current preprocessor state */ /* everything is in this structure to avoid polluting the global symbol space */ @@ -240,7 +240,7 @@ void pp_do_include(char *fname, int type); void pp_push_ignore_state(void); void pp_pop_ignore_state(void); -void pp_writestring(const char *format, ...) __attribute__((format (printf, 1, 2))); +void __cdecl pp_writestring(const char *format, ...) __attribute__((format (printf, 1, 2))); /* * From ppy.y diff --git a/dlls/d3dcompiler_46/Makefile.in b/dlls/d3dcompiler_46/Makefile.in index f1bb6ac8dc2..6f32986af1e 100644 --- a/dlls/d3dcompiler_46/Makefile.in +++ b/dlls/d3dcompiler_46/Makefile.in @@ -3,6 +3,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=46 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \ diff --git a/dlls/d3dcompiler_47/Makefile.in b/dlls/d3dcompiler_47/Makefile.in index 3c9636108ed..df9cde05ca9 100644 --- a/dlls/d3dcompiler_47/Makefile.in +++ b/dlls/d3dcompiler_47/Makefile.in @@ -4,6 +4,8 @@ IMPORTS = dxguid uuid EXTRADEFS = -DD3D_COMPILER_VERSION=47 PARENTSRC = ../d3dcompiler_43 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ asmparser.c \ blob.c \