2024-01-02 21:14:05 +03:00
|
|
|
/* Copyright (C) 2022-2024 mintsuki and contributors.
|
2023-12-05 14:25:52 +03:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
|
|
|
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
|
|
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2024-09-09 12:52:37 +03:00
|
|
|
#ifndef __FSTD_HDRS_STDARG_H
|
2023-04-16 08:24:29 +03:00
|
|
|
#define __FSTD_HDRS_STDARG_H 1
|
2022-02-15 07:46:37 +03:00
|
|
|
|
|
|
|
typedef __builtin_va_list va_list;
|
|
|
|
|
2023-04-26 00:25:39 +03:00
|
|
|
#undef va_start
|
2024-09-09 12:52:37 +03:00
|
|
|
#if defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L
|
|
|
|
# define va_start(v, ...) __builtin_va_start(v, 0)
|
|
|
|
#else
|
|
|
|
# define va_start(v, l) __builtin_va_start(v, l)
|
|
|
|
#endif
|
2023-04-26 00:25:39 +03:00
|
|
|
#undef va_end
|
2022-02-15 07:46:37 +03:00
|
|
|
#define va_end(v) __builtin_va_end(v)
|
2023-04-26 00:25:39 +03:00
|
|
|
#undef va_arg
|
2022-02-15 07:46:37 +03:00
|
|
|
#define va_arg(v, l) __builtin_va_arg(v, l)
|
2023-03-23 05:57:33 +03:00
|
|
|
#if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
|
2023-04-26 00:25:39 +03:00
|
|
|
# undef va_copy
|
2023-03-23 05:57:33 +03:00
|
|
|
# define va_copy(d, s) __builtin_va_copy(d, s)
|
|
|
|
#endif
|
2022-02-15 07:46:37 +03:00
|
|
|
|
|
|
|
#endif
|