mirror of
https://git.proxmox.com/git/wasi-libc
synced 2025-07-27 15:10:06 +00:00
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:
parent
1f40984219
commit
33e8b5189b
5
Makefile
5
Makefile
@ -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"
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user