meta: move photon/libc to root

This commit is contained in:
2026-02-08 20:45:25 +00:00
parent f00e74260d
commit 345a37962e
140 changed files with 0 additions and 0 deletions

20
libc/include/stdarg.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef STDARG_H
#define STDARG_H
//typedef struct __va_list_tag *va_list;
typedef __builtin_va_list va_list;
# if defined(__GNUC__) && __GNUC__ >= 3
#define va_start(ap, arg) __builtin_va_start((ap), (arg))
#define va_arg __builtin_va_arg
#define va_copy __builtin_va_copy
#define va_end(ap) __builtin_va_end((ap))
#else
#error Unsupported compiler
#define va_start(ap, arg) ((ap) = ((va_list)&(arg)) + ((sizeof(long) > sizeof(arg)) ? sizeof(long) : sizeof(arg)))
#define va_arg(ap, type) *(type *)(ap), ((ap) += ((sizeof(long) > sizeof(type)) ? sizeof(long) : sizeof(type)))
#define va_copy(copy, arg) ((copy) = (arg))
#define va_end(ap)
#endif
#endif