diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt index 7209e10c68b8..55268d19529c 100644 --- a/libc/include/CMakeLists.txt +++ b/libc/include/CMakeLists.txt @@ -255,6 +255,7 @@ add_header_macro( time.h DEPENDS .llvm_libc_common_h + .llvm-libc-macros.null_macro .llvm-libc-macros.time_macros .llvm-libc-types.clock_t .llvm-libc-types.time_t @@ -329,6 +330,7 @@ add_header_macro( stdio.h DEPENDS .llvm-libc-macros.file_seek_macros + .llvm-libc-macros.null_macro .llvm-libc-macros.stdio_macros .llvm-libc-types.FILE .llvm-libc-types.cookie_io_functions_t @@ -343,6 +345,7 @@ add_header_macro( ../libc/include/stdlib.yaml stdlib.h DEPENDS + .llvm-libc-macros.null_macro .llvm-libc-macros.stdlib_macros .llvm-libc-types.__atexithandler_t .llvm-libc-types.__qsortcompare_t @@ -709,6 +712,7 @@ add_header_macro( wchar.h DEPENDS .llvm_libc_common_h + .llvm-libc-macros.null_macro .llvm-libc-macros.wchar_macros .llvm-libc-types.mbstate_t .llvm-libc-types.size_t @@ -723,6 +727,7 @@ add_header_macro( DEPENDS .llvm_libc_common_h .llvm-libc-macros.locale_macros + .llvm-libc-macros.null_macro .llvm-libc-types.locale_t .llvm-libc-types.struct_lconv ) diff --git a/libc/include/locale.yaml b/libc/include/locale.yaml index 6c71b70e59f0..4566984ad83a 100644 --- a/libc/include/locale.yaml +++ b/libc/include/locale.yaml @@ -1,5 +1,8 @@ header: locale.h header_template: locale.h.def +macros: + - macro_name: NULL + macro_header: null-macro.h types: - type_name: locale_t - type_name: struct_lconv diff --git a/libc/include/stdio.yaml b/libc/include/stdio.yaml index 2619984cca26..3d5164fa10ff 100644 --- a/libc/include/stdio.yaml +++ b/libc/include/stdio.yaml @@ -1,6 +1,8 @@ header: stdio.h header_template: stdio.h.def macros: + - macro_name: NULL + macro_header: null-macro.h - macro_name: stdout macro_value: stdout - macro_name: stdin diff --git a/libc/include/stdlib.yaml b/libc/include/stdlib.yaml index f7155ba27a16..3b2ff13c684b 100644 --- a/libc/include/stdlib.yaml +++ b/libc/include/stdlib.yaml @@ -4,7 +4,9 @@ standards: - stdc merge_yaml_files: - stdlib-malloc.yaml -macros: [] +macros: + - macro_name: NULL + macro_header: null-macro.h types: - type_name: __atexithandler_t - type_name: __qsortcompare_t diff --git a/libc/include/string.h.def b/libc/include/string.h.def index 1bd2687db2be..339d005e43a4 100644 --- a/libc/include/string.h.def +++ b/libc/include/string.h.def @@ -11,8 +11,6 @@ #include "__llvm-libc-common.h" -#include "llvm-libc-macros/null-macro.h" - %%public_api() #endif // LLVM_LIBC_STRING_H diff --git a/libc/include/string.yaml b/libc/include/string.yaml index 9f72b8db6c1e..736deceb453d 100644 --- a/libc/include/string.yaml +++ b/libc/include/string.yaml @@ -1,6 +1,8 @@ header: string.h header_template: string.h.def -macros: [] +macros: + - macro_name: NULL + macro_header: null-macro.h types: - type_name: locale_t - type_name: size_t diff --git a/libc/include/time.yaml b/libc/include/time.yaml index 7bb25dbe85ac..3b9d77c0aaae 100644 --- a/libc/include/time.yaml +++ b/libc/include/time.yaml @@ -1,6 +1,8 @@ header: time.h header_template: time.h.def -macros: [] +macros: + - macro_name: NULL + macro_header: null-macro.h types: - type_name: struct_timeval - type_name: clockid_t diff --git a/libc/include/wchar.yaml b/libc/include/wchar.yaml index 877be48b6a10..57f4f6660827 100644 --- a/libc/include/wchar.yaml +++ b/libc/include/wchar.yaml @@ -1,6 +1,8 @@ header: wchar.h header_template: wchar.h.def -macros: [] +macros: + - macro_name: NULL + macro_header: null-macro.h types: - type_name: size_t - type_name: wint_t