Skip to content

Commit eb7230c

Browse files
authoredNov 4, 2019
Remove more unsupported headers. (WebAssembly#123)
utime.h, sysmacros.h, and libintl.h are all currently unsupported. Removing them helps programs that autodetect features based on the existence of headers.
1 parent ec3ee5e commit eb7230c

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed
 

‎Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ override MUSL_OMIT_HEADERS += \
305305
"net/route.h" \
306306
"netinet/if_ether.h" \
307307
"netinet/ether.h" \
308-
"sys/timerfd.h"
308+
"sys/timerfd.h" \
309+
"libintl.h" \
310+
"sys/sysmacros.h" \
311+
"utime.h"
309312

310313
ifeq ($(THREAD_MODEL), single)
311314
# Remove headers not supported in single-threaded mode.

‎expected/wasm32-wasi/include-all.c

-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
#include <iso646.h>
9595
#include <langinfo.h>
9696
#include <libgen.h>
97-
#include <libintl.h>
9897
#include <limits.h>
9998
#include <locale.h>
10099
#include <malloc.h>
@@ -148,7 +147,6 @@
148147
#include <sys/stropts.h>
149148
#include <sys/syscall.h>
150149
#include <sys/sysinfo.h>
151-
#include <sys/sysmacros.h>
152150
#include <sys/time.h>
153151
#include <sys/timeb.h>
154152
#include <sys/times.h>
@@ -166,7 +164,6 @@
166164
#include <time.h>
167165
#include <uchar.h>
168166
#include <unistd.h>
169-
#include <utime.h>
170167
#include <values.h>
171168
#include <wasi/core.h>
172169
#include <wasi/libc-find-relpath.h>

‎expected/wasm32-wasi/predefined-macros.txt

-8
Original file line numberDiff line numberDiff line change
@@ -2103,7 +2103,6 @@
21032103
#define _ISO646_H
21042104
#define _LANGINFO_H
21052105
#define _LIBGEN_H
2106-
#define _LIBINTL_H
21072106
#define _LIMITS_H
21082107
#define _LOCALE_H
21092108
#define _MALLOC_H
@@ -2391,7 +2390,6 @@
23912390
#define _SYS_STAT_H
23922391
#define _SYS_SYSCALL_H
23932392
#define _SYS_SYSINFO_H
2394-
#define _SYS_SYSMACROS_H
23952393
#define _SYS_TIMEB_H
23962394
#define _SYS_TIMES_H
23972395
#define _SYS_TIMEX_H
@@ -2407,7 +2405,6 @@
24072405
#define _TIME_H
24082406
#define _UCHAR_H
24092407
#define _UNISTD_H
2410-
#define _UTIME_H
24112408
#define _VALUES_H
24122409
#define _VA_LIST
24132410
#define _WCHAR_H
@@ -2561,7 +2558,6 @@
25612558
#define __compiler_ATOMIC_WCHAR_T_LOCK_FREE 2
25622559
#define __GNUC_STDC_INLINE__ 1
25632560
#define __GNUC_VA_LIST 1
2564-
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 1 : -1)
25652561
#define __GXX_ABI_VERSION 1002
25662562
#define __ILP32__ 1
25672563
#define __INT16_C_SUFFIX__
@@ -2883,7 +2879,6 @@
28832879
#define __UINT_LEAST8_MAX__ 255
28842880
#define __UINT_LEAST8_TYPE__ unsigned char
28852881
#define __USER_LABEL_PREFIX__
2886-
#define __USE_GNU_GETTEXT 1
28872882
#define __WASI_ADVICE_DONTNEED (UINT8_C(4))
28882883
#define __WASI_ADVICE_NOREUSE (UINT8_C(5))
28892884
#define __WASI_ADVICE_NORMAL (UINT8_C(0))
@@ -3327,10 +3322,7 @@
33273322
#define lseek(fd,offset,whence) ({ off_t __f = (fd); off_t __o = (offset); off_t __w = (whence); __builtin_constant_p((offset)) && __builtin_constant_p((whence)) && __o == 0 && __w == SEEK_CUR ? __wasilibc_tell(__f) : lseek(__f, __o, __w); })
33283323
#define lseek64 lseek
33293324
#define lstat64 lstat
3330-
#define major(x) ((unsigned)( (((x)>>31>>1) & 0xfffff000) | (((x)>>8) & 0x00000fff) ))
3331-
#define makedev(x,y) ( (((x)&0xfffff000ULL) << 32) | (((x)&0x00000fffULL) << 8) | (((y)&0xffffff00ULL) << 12) | (((y)&0x000000ffULL)) )
33323325
#define math_errhandling 2
3333-
#define minor(x) ((unsigned)( (((x)>>12) & 0xffffff00) | ((x) & 0x000000ff) ))
33343326
#define mld_cksum mld_icmp6_hdr.icmp6_cksum
33353327
#define mld_code mld_icmp6_hdr.icmp6_code
33363328
#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0]

0 commit comments

Comments
 (0)