Alexandre Julliard : d3dcompiler: Use the standard va_list instead of __ms_va_list.

Alexandre Julliard julliard at winehq.org
Fri Oct 22 14:46:11 CDT 2021


Module: wine
Branch: master
Commit: bb2d48627d98301fe24ed74bd6897d1146e8dc1a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=bb2d48627d98301fe24ed74bd6897d1146e8dc1a

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Oct 22 11:11:28 2021 +0200

d3dcompiler: Use the standard va_list instead of __ms_va_list.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dcompiler_43/asmshader.y           |  6 +++---
 dlls/d3dcompiler_43/compiler.c            | 20 ++++++++++----------
 dlls/d3dcompiler_43/d3dcompiler_private.h |  2 +-
 dlls/d3dcompiler_43/ppl.l                 | 10 +++++-----
 dlls/d3dcompiler_43/preproc.c             |  6 +++---
 dlls/d3dcompiler_43/utils.c               |  2 +-
 6 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/dlls/d3dcompiler_43/asmshader.y b/dlls/d3dcompiler_43/asmshader.y
index 9e0fec618cd..f33be2259d9 100644
--- a/dlls/d3dcompiler_43/asmshader.y
+++ b/dlls/d3dcompiler_43/asmshader.y
@@ -30,11 +30,11 @@ struct asm_parser asm_ctx;
 
 void WINAPIV asmparser_message(struct asm_parser *ctx, const char *fmt, ...)
 {
-    __ms_va_list args;
+    va_list args;
 
-    __ms_va_start(args, fmt);
+    va_start(args, fmt);
     compilation_message(&ctx->messages, fmt, args);
-    __ms_va_end(args);
+    va_end(args);
 }
 
 static void asmshader_error(char const *s) {
diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c
index b75a1d0a6a5..112e82d6d44 100644
--- a/dlls/d3dcompiler_43/compiler.c
+++ b/dlls/d3dcompiler_43/compiler.c
@@ -83,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, __ms_va_list args)
+static void wpp_write_message(const char *fmt, va_list args)
 {
     char* newbuffer;
     int rc, newsize;
@@ -125,37 +125,37 @@ static void wpp_write_message(const char *fmt, __ms_va_list args)
 
 static void WINAPIV PRINTF_ATTR(1,2) wpp_write_message_var(const char *fmt, ...)
 {
-    __ms_va_list args;
+    va_list args;
 
-    __ms_va_start(args, fmt);
+    va_start(args, fmt);
     wpp_write_message(fmt, args);
-    __ms_va_end(args);
+    va_end(args);
 }
 
 int WINAPIV ppy_error(const char *msg, ...)
 {
-    __ms_va_list ap;
-    __ms_va_start(ap, msg);
+    va_list ap;
+    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");
-    __ms_va_end(ap);
+    va_end(ap);
     pp_status.state = 1;
     return 1;
 }
 
 int WINAPIV ppy_warning(const char *msg, ...)
 {
-    __ms_va_list ap;
-    __ms_va_start(ap, msg);
+    va_list ap;
+    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");
-    __ms_va_end(ap);
+    va_end(ap);
     return 0;
 }
 
diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h
index 49027d11851..713c900cee6 100644
--- a/dlls/d3dcompiler_43/d3dcompiler_private.h
+++ b/dlls/d3dcompiler_43/d3dcompiler_private.h
@@ -269,7 +269,7 @@ 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, __ms_va_list args) DECLSPEC_HIDDEN;
+void compilation_message(struct compilation_messages *msg, const char *fmt, va_list args) DECLSPEC_HIDDEN;
 void WINAPIV 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)
 {
diff --git a/dlls/d3dcompiler_43/ppl.l b/dlls/d3dcompiler_43/ppl.l
index 568ccb4e8df..1797b98eebf 100644
--- a/dlls/d3dcompiler_43/ppl.l
+++ b/dlls/d3dcompiler_43/ppl.l
@@ -287,7 +287,7 @@ includelogicentry_t *pp_includelogiclist = NULL;
 
 void WINAPIV pp_writestring(const char *format, ...)
 {
-	__ms_va_list valist;
+	va_list valist;
 	int len;
 	static char *buffer;
 	static int buffercapacity;
@@ -301,10 +301,10 @@ void WINAPIV pp_writestring(const char *format, ...)
 		buffercapacity = BUFFERINITIALCAPACITY;
 	}
 
-	__ms_va_start(valist, format);
+	va_start(valist, format);
 	len = vsnprintf(buffer, buffercapacity,
 			format, valist);
-	__ms_va_end(valist);
+	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)
@@ -318,10 +318,10 @@ void WINAPIV pp_writestring(const char *format, ...)
 		if(new_buffer == NULL)
 			return;
 		buffer = new_buffer;
-		__ms_va_start(valist, format);
+		va_start(valist, format);
 		len = vsnprintf(buffer, buffercapacity,
 				format, valist);
-		__ms_va_end(valist);
+		va_end(valist);
 	}
 
 	wpp_write(buffer, len);
diff --git a/dlls/d3dcompiler_43/preproc.c b/dlls/d3dcompiler_43/preproc.c
index be98e6f4194..3ea05a00a26 100644
--- a/dlls/d3dcompiler_43/preproc.c
+++ b/dlls/d3dcompiler_43/preproc.c
@@ -437,11 +437,11 @@ int pp_get_if_depth(void)
 
 void WINAPIV pp_internal_error(const char *file, int line, const char *s, ...)
 {
-	__ms_va_list ap;
-	__ms_va_start(ap, s);
+	va_list ap;
+	va_start(ap, s);
 	fprintf(stderr, "Internal error (please report) %s %d: ", file, line);
 	vfprintf(stderr, s, ap);
 	fprintf(stderr, "\n");
-	__ms_va_end(ap);
+	va_end(ap);
 	exit(3);
 }
diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c
index 0d20a85458e..2c5c903106e 100644
--- a/dlls/d3dcompiler_43/utils.c
+++ b/dlls/d3dcompiler_43/utils.c
@@ -716,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, __ms_va_list args)
+void compilation_message(struct compilation_messages *msg, const char *fmt, va_list args)
 {
     char* buffer;
     int rc, size;




More information about the wine-cvs mailing list