add guard to c_headers for duplicate va_list on darwin

This commit is contained in:
Andrew Kelley 2017-10-26 01:11:57 -04:00
parent c7053bea20
commit f4ca3482f1

View File

@ -26,10 +26,14 @@
#ifndef __STDARG_H
#define __STDARG_H
/* zig: added because macos _va_list.h was duplicately defining va_list
*/
#ifndef _VA_LIST
#ifndef _VA_LIST_T
typedef __builtin_va_list va_list;
#define _VA_LIST
#endif
#endif
#define va_start(ap, param) __builtin_va_start(ap, param)
#define va_end(ap) __builtin_va_end(ap)
#define va_arg(ap, type) __builtin_va_arg(ap, type)