summaryrefslogtreecommitdiff
path: root/libs/c/include/stdarg.h
diff options
context:
space:
mode:
authorYanis002 <35189056+Yanis002@users.noreply.github.com>2025-02-12 12:50:35 +0100
committerYanis002 <35189056+Yanis002@users.noreply.github.com>2025-02-12 12:50:35 +0100
commit27ae64893aec81af4c78036f309b9aa9e7874c2e (patch)
tree18ca5109453698d6069817ce572c8aaef6eb8cf1 /libs/c/include/stdarg.h
parent142e17b99d097296027f576a7ac33ae209fa80df (diff)
started debug display/error
Diffstat (limited to 'libs/c/include/stdarg.h')
-rw-r--r--libs/c/include/stdarg.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/c/include/stdarg.h b/libs/c/include/stdarg.h
new file mode 100644
index 00000000..a47e0f01
--- /dev/null
+++ b/libs/c/include/stdarg.h
@@ -0,0 +1,24 @@
+#ifndef _C_STDARG_H
+#define _C_STDARG_H
+
+extern "C" {
+ typedef char* va_list;
+
+ #define __std(ref) ::std::ref
+ #define __fourbytealign(n) ((((unsigned long)(n)) + 3U) & ~3U)
+ #define __va_start(parm) ((__std(va_list)) ((char *)((unsigned long)(&parm) & ~3U) + __fourbytealign(sizeof(parm))))
+
+ #define va_start(ap, parm) ((ap) = __va_start(parm))
+ #define va_arg(ap, type) (*(type *)((ap += __fourbytealign(sizeof(type))) - __fourbytealign(sizeof(type))))
+ #define va_end(ap) ((void)0)
+}
+
+#if defined(__cplusplus)
+namespace std {
+ using ::va_list;
+};
+
+using std::va_list;
+#endif
+
+#endif