Commit 2a92c58e authored by Alexandre Julliard's avatar Alexandre Julliard

include: Use the standard va_list instead of __ms_va_list when building with msvcrt.

parent 29717168
...@@ -1998,7 +1998,7 @@ static WCHAR *create_temp_dir( MSIDATABASE *db ) ...@@ -1998,7 +1998,7 @@ static WCHAR *create_temp_dir( MSIDATABASE *db )
* A \ will not be added after the last segment, however if the * A \ will not be added after the last segment, however if the
* last segment is NULL, then the last character will be a \ * last segment is NULL, then the last character will be a \
*/ */
WCHAR *msi_build_directory_name( DWORD count, ... ) WCHAR * WINAPIV msi_build_directory_name( DWORD count, ... )
{ {
DWORD sz = 1, i; DWORD sz = 1, i;
WCHAR *dir; WCHAR *dir;
......
...@@ -1039,7 +1039,7 @@ extern MSIFOLDER *msi_get_loaded_folder(MSIPACKAGE *package, const WCHAR *dir) D ...@@ -1039,7 +1039,7 @@ extern MSIFOLDER *msi_get_loaded_folder(MSIPACKAGE *package, const WCHAR *dir) D
extern WCHAR *msi_create_temp_file(MSIDATABASE *db) DECLSPEC_HIDDEN; extern WCHAR *msi_create_temp_file(MSIDATABASE *db) DECLSPEC_HIDDEN;
extern void msi_free_action_script(MSIPACKAGE *package, UINT script) DECLSPEC_HIDDEN; extern void msi_free_action_script(MSIPACKAGE *package, UINT script) DECLSPEC_HIDDEN;
extern WCHAR *msi_build_icon_path(MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN; extern WCHAR *msi_build_icon_path(MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN;
extern WCHAR *msi_build_directory_name(DWORD , ...) DECLSPEC_HIDDEN; extern WCHAR * WINAPIV msi_build_directory_name(DWORD , ...) DECLSPEC_HIDDEN;
extern void msi_reduce_to_long_filename(WCHAR *) DECLSPEC_HIDDEN; extern void msi_reduce_to_long_filename(WCHAR *) DECLSPEC_HIDDEN;
extern WCHAR *msi_create_component_advertise_string(MSIPACKAGE *, MSICOMPONENT *, const WCHAR *) DECLSPEC_HIDDEN; extern WCHAR *msi_create_component_advertise_string(MSIPACKAGE *, MSICOMPONENT *, const WCHAR *) DECLSPEC_HIDDEN;
extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, MSIFEATURE *feature) DECLSPEC_HIDDEN; extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, MSIFEATURE *feature) DECLSPEC_HIDDEN;
......
...@@ -230,7 +230,7 @@ static char* str_array_get_ref(struct array* cref, unsigned idx) ...@@ -230,7 +230,7 @@ static char* str_array_get_ref(struct array* cref, unsigned idx)
* Helper for printf type of command (only %s and %c are implemented) * Helper for printf type of command (only %s and %c are implemented)
* while dynamically allocating the buffer * while dynamically allocating the buffer
*/ */
static char* str_printf(struct parsed_symbol* sym, const char* format, ...) static char* WINAPIV str_printf(struct parsed_symbol* sym, const char* format, ...)
{ {
va_list args; va_list args;
unsigned int len = 1, i, sz; unsigned int len = 1, i, sz;
......
...@@ -1029,7 +1029,7 @@ mp_clamp (mp_int * a) ...@@ -1029,7 +1029,7 @@ mp_clamp (mp_int * a)
} }
} }
void mp_clear_multi(mp_int *mp, ...) void WINAPIV mp_clear_multi(mp_int *mp, ...)
{ {
mp_int* next_mp = mp; mp_int* next_mp = mp;
va_list args; va_list args;
...@@ -2351,7 +2351,7 @@ int mp_init_copy (mp_int * a, const mp_int * b) ...@@ -2351,7 +2351,7 @@ int mp_init_copy (mp_int * a, const mp_int * b)
return mp_copy (b, a); return mp_copy (b, a);
} }
int mp_init_multi(mp_int *mp, ...) int WINAPIV mp_init_multi(mp_int *mp, ...)
{ {
mp_err res = MP_OKAY; /* Assume ok until proven otherwise */ mp_err res = MP_OKAY; /* Assume ok until proven otherwise */
int n = 0; /* Number of ok inits */ int n = 0; /* Number of ok inits */
......
...@@ -227,10 +227,10 @@ typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat); ...@@ -227,10 +227,10 @@ typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat);
char *mp_error_to_string(int code); char *mp_error_to_string(int code);
/* init a null terminated series of arguments */ /* init a null terminated series of arguments */
int mp_init_multi(mp_int *mp, ...); int WINAPIV mp_init_multi(mp_int *mp, ...);
/* clear a null terminated series of arguments */ /* clear a null terminated series of arguments */
void mp_clear_multi(mp_int *mp, ...); void WINAPIV mp_clear_multi(mp_int *mp, ...);
/* shrink ram required for a bignum */ /* shrink ram required for a bignum */
int mp_shrink(mp_int *a); int mp_shrink(mp_int *a);
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
#include <corecrt_stdio_config.h> #include <corecrt_stdio_config.h>
int __cdecl __stdio_common_vsprintf(unsigned __int64 options, char *str, size_t len, int __cdecl __stdio_common_vsprintf(unsigned __int64 options, char *str, size_t len,
const char *format, _locale_t locale, __ms_va_list valist); const char *format, _locale_t locale, va_list valist);
int __cdecl _vsnprintf( char *buf, size_t size, const char *fmt, __ms_va_list args ) int __cdecl _vsnprintf( char *buf, size_t size, const char *fmt, va_list args )
{ {
return __stdio_common_vsprintf( _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, return __stdio_common_vsprintf( _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR,
buf, size, fmt, NULL, args ); buf, size, fmt, NULL, args );
......
...@@ -122,22 +122,16 @@ ...@@ -122,22 +122,16 @@
# endif # endif
#endif #endif
#ifndef __ms_va_list #if (defined(__x86_64__) || (defined(__aarch64__) && __has_attribute(ms_abi))) && defined (__GNUC__)
# if (defined(__x86_64__) || (defined(__aarch64__) && __has_attribute(ms_abi))) && defined (__GNUC__) # include <stdarg.h>
# define __ms_va_list __builtin_ms_va_list # undef va_list
# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg) # undef va_start
# define __ms_va_end(list) __builtin_ms_va_end(list) # undef va_end
# define __ms_va_copy(dest,src) __builtin_ms_va_copy(dest,src) # undef va_copy
# else # define va_list __builtin_ms_va_list
# define __ms_va_list va_list # define va_start(list,arg) __builtin_ms_va_start(list,arg)
# define __ms_va_start(list,arg) va_start(list,arg) # define va_end(list) __builtin_ms_va_end(list)
# define __ms_va_end(list) va_end(list) # define va_copy(dest,src) __builtin_ms_va_copy(dest,src)
# ifdef va_copy
# define __ms_va_copy(dest,src) va_copy(dest,src)
# else
# define __ms_va_copy(dest,src) ((dest) = (src))
# endif
# endif
#endif #endif
#ifndef WINAPIV #ifndef WINAPIV
......
...@@ -567,7 +567,7 @@ static int dbg_error(const char* s) ...@@ -567,7 +567,7 @@ static int dbg_error(const char* s)
return 0; return 0;
} }
HANDLE parser_generate_command_file(const char* pmt, ...) HANDLE WINAPIV parser_generate_command_file(const char* pmt, ...)
{ {
HANDLE hFile; HANDLE hFile;
char path[MAX_PATH], file[MAX_PATH]; char path[MAX_PATH], file[MAX_PATH];
......
...@@ -311,7 +311,7 @@ extern int msgbox_res_id(HWND hwnd, UINT textId, UINT captionId, UI ...@@ -311,7 +311,7 @@ extern int msgbox_res_id(HWND hwnd, UINT textId, UINT captionId, UI
extern void parser_handle(HANDLE); extern void parser_handle(HANDLE);
extern int input_read_line(const char* pfx, char* buffer, int size); extern int input_read_line(const char* pfx, char* buffer, int size);
extern int input_fetch_entire_line(const char* pfx, char** line); extern int input_fetch_entire_line(const char* pfx, char** line);
extern HANDLE parser_generate_command_file(const char*, ...); extern HANDLE WINAPIV parser_generate_command_file(const char*, ...);
/* debug.l */ /* debug.l */
extern void lexeme_flush(void); extern void lexeme_flush(void);
...@@ -335,7 +335,7 @@ extern struct expr* expr_alloc_binary_op(int oper, struct expr*, struct expr ...@@ -335,7 +335,7 @@ extern struct expr* expr_alloc_binary_op(int oper, struct expr*, struct expr
extern struct expr* expr_alloc_unary_op(int oper, struct expr*); extern struct expr* expr_alloc_unary_op(int oper, struct expr*);
extern struct expr* expr_alloc_pstruct(struct expr*, const char* element); extern struct expr* expr_alloc_pstruct(struct expr*, const char* element);
extern struct expr* expr_alloc_struct(struct expr*, const char* element); extern struct expr* expr_alloc_struct(struct expr*, const char* element);
extern struct expr* expr_alloc_func_call(const char*, int nargs, ...); extern struct expr* WINAPIV expr_alloc_func_call(const char*, int nargs, ...);
extern struct expr* expr_alloc_typecast(struct type_expr_t*, struct expr*); extern struct expr* expr_alloc_typecast(struct type_expr_t*, struct expr*);
extern struct dbg_lvalue expr_eval(struct expr*); extern struct dbg_lvalue expr_eval(struct expr*);
extern struct expr* expr_clone(const struct expr* exp, BOOL *local_binding); extern struct expr* expr_clone(const struct expr* exp, BOOL *local_binding);
......
...@@ -245,7 +245,7 @@ struct expr* expr_alloc_pstruct(struct expr* exp, const char* element) ...@@ -245,7 +245,7 @@ struct expr* expr_alloc_pstruct(struct expr* exp, const char* element)
return ex; return ex;
} }
struct expr* expr_alloc_func_call(const char* funcname, int nargs, ...) struct expr* WINAPIV expr_alloc_func_call(const char* funcname, int nargs, ...)
{ {
struct expr* ex; struct expr* ex;
va_list ap; va_list ap;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment