From c7f70893923cd0a9d3be79b352e2674a87ad8127 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 10 Sep 2018 15:55:39 -0400 Subject: [PATCH] drop patches on top of clang's C headers We now match clang 7.0.0rc3 exactly. See https://reviews.llvm.org/D51265 for more details. --- c_headers/stdarg.h | 7 ------- c_headers/stddef.h | 38 -------------------------------------- 2 files changed, 45 deletions(-) diff --git a/c_headers/stdarg.h b/c_headers/stdarg.h index d603d353f5..101426fff1 100644 --- a/c_headers/stdarg.h +++ b/c_headers/stdarg.h @@ -26,14 +26,10 @@ #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) @@ -50,9 +46,6 @@ typedef __builtin_va_list va_list; #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST 1 typedef __builtin_va_list __gnuc_va_list; -/* zig: added because glibc stdio.h was duplicately defining va_list - */ -#define _VA_LIST_DEFINED #endif #endif /* __STDARG_H */ diff --git a/c_headers/stddef.h b/c_headers/stddef.h index 3b55d42c30..7354996711 100644 --- a/c_headers/stddef.h +++ b/c_headers/stddef.h @@ -48,13 +48,7 @@ #if !__has_feature(modules) #define _PTRDIFF_T #endif - -/* Zig: wrap in _PTRDIFF_T_DEFINED to protect against mingw defining it twice */ -#if !defined(_PTRDIFF_T_DEFINED) typedef __PTRDIFF_TYPE__ ptrdiff_t; -#define _PTRDIFF_T_DEFINED -#endif - #endif #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ @@ -65,24 +59,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; #if !__has_feature(modules) #define _SIZE_T #endif - -/* Zig: added to avoid collisions with mingw */ -#if !defined(_SIZE_T_DEFINED_) -#if !defined(_SIZE_T_DEFINED) -#if !defined(_BSD_SIZE_T_DEFINED_) -#if !defined(_SIZE_T_DECLARED) typedef __SIZE_TYPE__ size_t; -#define _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED -#define _BSD_SIZE_T_DEFINED_ -#define _SIZE_T_DECLARED -#endif -#endif -#endif -#endif - - - #endif #undef __need_size_t #endif /*defined(__need_size_t) */ @@ -110,22 +87,7 @@ typedef __SIZE_TYPE__ rsize_t; #define _WCHAR_T_DEFINED #endif #endif - -/* zig added to prevent duplicate definition with mingw */ -#if !defined(__INT_WCHAR_T_H) -#if !defined(_GCC_WCHAR_T) -#if !defined(_WCHAR_T_DECLARED) -#if !defined(_WCHAR_T_DEFINED) -#define __INT_WCHAR_T_H -#define _GCC_WCHAR_T -#define _WCHAR_T_DECLARED -#define _WCHAR_T_DEFINED typedef __WCHAR_TYPE__ wchar_t; -#endif -#endif -#endif -#endif - #endif #endif #undef __need_wchar_t