d3dcompiler: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-07-02 13:37:18 +02:00
parent 011b2eca46
commit c8d34ef088
29 changed files with 70 additions and 91 deletions

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=33
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=34
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=35
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=36
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=37
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=38
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=39
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=40
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=41
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=42
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -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 \

View File

@ -20,8 +20,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "d3dcompiler_private.h"

View File

@ -20,8 +20,6 @@
*/
%{
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "d3dcompiler_private.h"

View File

@ -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) {

View File

@ -19,9 +19,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include "d3dcompiler_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);

View File

@ -20,8 +20,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "d3d9types.h"

View File

@ -18,12 +18,9 @@
*/
#define COBJMACROS
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <time.h>
#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;
}

View File

@ -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)

View File

@ -20,8 +20,6 @@
*/
%{
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#define YY_NO_UNISTD_H

View File

@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
%{
#include "config.h"
#include "wine/debug.h"
#include <stdio.h>
@ -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;

View File

@ -19,8 +19,6 @@
*
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"

View File

@ -155,17 +155,7 @@ ul [uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL]
#include <errno.h>
#include <limits.h>
#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);

View File

@ -20,9 +20,6 @@
*/
%{
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

View File

@ -16,9 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
@ -26,9 +23,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#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);
}

View File

@ -18,9 +18,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include "initguid.h"
#include "d3dcompiler_private.h"
#include "winternl.h"

View File

@ -21,9 +21,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#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;

View File

@ -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

View File

@ -3,6 +3,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=46
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \

View File

@ -4,6 +4,8 @@ IMPORTS = dxguid uuid
EXTRADEFS = -DD3D_COMPILER_VERSION=47
PARENTSRC = ../d3dcompiler_43
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
asmparser.c \
blob.c \