Omit musl's stdarg.h and stddef.h from the sysroot.

We already use the compiler's versions of these; this just moves from
having libc #include_next them to having libc just omit them entirely,
which is simpler.

This removes the special code to define musl's include guard, however
I originally added that when I was still working out how WASI's stddef.h
would interact with other code. I believe it's no longer important.
This commit is contained in:
Dan Gohman 2019-04-29 05:52:26 -07:00
parent 1f40984219
commit 33e8b5189b
5 changed files with 5 additions and 20 deletions

View File

@ -243,6 +243,11 @@ override MUSL_OMIT_HEADERS += \
"bits/alltypes.h.in" \
"alltypes.h.in"
# Use the compiler's version of these headers.
override MUSL_OMIT_HEADERS += \
"stdarg.h" \
"stddef.h"
# Use the WASI errno definitions.
override MUSL_OMIT_HEADERS += \
"bits/errno.h"

View File

@ -120,10 +120,8 @@
#include <semaphore.h>
#include <signal.h>
#include <stdalign.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdc-predef.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdio_ext.h>

View File

@ -2370,7 +2370,6 @@
#define _STDALIGN_H
#define _STDBOOL_H
#define _STDC_PREDEF_H
#define _STDDEF_H
#define _STDINT_H
#define _STDIO_EXT_H
#define _STDIO_H

View File

@ -1,4 +1,3 @@
#ifdef __wasilibc_unmodified_upstream /* Use the compiler's stdarg.h */
#ifndef _STDARG_H
#define _STDARG_H
@ -20,7 +19,3 @@ extern "C" {
#endif
#endif
#else
/* Just use the compiler's stdarg.h. */
#include_next <stdarg.h>
#endif

View File

@ -1,4 +1,3 @@
#ifdef __wasilibc_unmodified_upstream /* Use the compiler's stddef.h */
#ifndef _STDDEF_H
#define _STDDEF_H
@ -24,14 +23,3 @@
#endif
#endif
#else
/* Just use the compiler's stddef.h. */
#include_next <stddef.h>
/* Define musl's include guard, in case any code depends on that. */
#if defined(__STDDEF_H) && !defined(_STDDEF_H)
#define _STDDEF_H
#endif
#endif