mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Lagom: Fix printf implementation on win32
It seems that Filip has already done the hard work, and found out the implementation different between unix* and windows. Borrowed from: https://github.com/SerenityOS/serenity/compare/master...filiphsps:serenity:dev-win32#diff-e3209c9a434a102d0d9459e31e33ddb729dff925b95f41b9d1e56c1e7f88c487R466 Co-authored-by: Filiph Sandström <filiph.sandstrom@filfatstudios.com>
This commit is contained in:
parent
18257604eb
commit
58a44036a9
Notes:
sideshowbarker
2024-07-17 07:38:17 +09:00
Author: https://github.com/elcuco Commit: https://github.com/SerenityOS/serenity/commit/58a44036a9 Pull-request: https://github.com/SerenityOS/serenity/pull/15293 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/linusg
1 changed files with 7 additions and 0 deletions
|
@ -463,7 +463,14 @@ template<typename T, typename V>
|
|||
struct VaArgNextArgument {
|
||||
ALWAYS_INLINE T operator()(V ap) const
|
||||
{
|
||||
#ifdef AK_OS_WINDOWS
|
||||
// GCC on msys2 complains about the type of ap,
|
||||
// so let's force the compiler to belive its a
|
||||
// va_list.
|
||||
return va_arg((va_list&)ap, T);
|
||||
#else
|
||||
return va_arg(ap, T);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue