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 )
* A \ will not be added after the last segment, however if the
* 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;
WCHAR *dir;
......
......@@ -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 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_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 WCHAR *msi_create_component_advertise_string(MSIPACKAGE *, MSICOMPONENT *, const WCHAR *) 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)
* Helper for printf type of command (only %s and %c are implemented)
* 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;
unsigned int len = 1, i, sz;
......
......@@ -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;
va_list args;
......@@ -2351,7 +2351,7 @@ int mp_init_copy (mp_int * a, const mp_int * b)
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 */
int n = 0; /* Number of ok inits */
......
......@@ -227,10 +227,10 @@ typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat);
char *mp_error_to_string(int code);
/* 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 */
void mp_clear_multi(mp_int *mp, ...);
void WINAPIV mp_clear_multi(mp_int *mp, ...);
/* shrink ram required for a bignum */
int mp_shrink(mp_int *a);
......
......@@ -25,9 +25,9 @@
#include <corecrt_stdio_config.h>
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,
buf, size, fmt, NULL, args );
......
......@@ -122,22 +122,16 @@
# endif
#endif
#ifndef __ms_va_list
# if (defined(__x86_64__) || (defined(__aarch64__) && __has_attribute(ms_abi))) && defined (__GNUC__)
# define __ms_va_list __builtin_ms_va_list
# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
# define __ms_va_end(list) __builtin_ms_va_end(list)
# define __ms_va_copy(dest,src) __builtin_ms_va_copy(dest,src)
# else
# define __ms_va_list va_list
# define __ms_va_start(list,arg) va_start(list,arg)
# define __ms_va_end(list) va_end(list)
# ifdef va_copy
# define __ms_va_copy(dest,src) va_copy(dest,src)
# else
# define __ms_va_copy(dest,src) ((dest) = (src))
# endif
# endif
#if (defined(__x86_64__) || (defined(__aarch64__) && __has_attribute(ms_abi))) && defined (__GNUC__)
# include <stdarg.h>
# undef va_list
# undef va_start
# undef va_end
# undef va_copy
# define va_list __builtin_ms_va_list
# define va_start(list,arg) __builtin_ms_va_start(list,arg)
# define va_end(list) __builtin_ms_va_end(list)
# define va_copy(dest,src) __builtin_ms_va_copy(dest,src)
#endif
#ifndef WINAPIV
......
......@@ -567,7 +567,7 @@ static int dbg_error(const char* s)
return 0;
}
HANDLE parser_generate_command_file(const char* pmt, ...)
HANDLE WINAPIV parser_generate_command_file(const char* pmt, ...)
{
HANDLE hFile;
char path[MAX_PATH], file[MAX_PATH];
......
......@@ -311,7 +311,7 @@ extern int msgbox_res_id(HWND hwnd, UINT textId, UINT captionId, UI
extern void parser_handle(HANDLE);
extern int input_read_line(const char* pfx, char* buffer, int size);
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 */
extern void lexeme_flush(void);
......@@ -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_pstruct(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 dbg_lvalue expr_eval(struct expr*);
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)
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;
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