Skip to content

Commit 619568d

Browse files
committed
Make wasi-libc.h a public header.
1 parent 9f39f6f commit 619568d

4 files changed

Lines changed: 18 additions & 2 deletions

File tree

expected/wasm32-wasi/include-all.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
#include <unistd.h>
180180
#include <utime.h>
181181
#include <values.h>
182+
#include <wasi-libc.h>
182183
#include <wasi.h>
183184
#include <wchar.h>
184185
#include <wctype.h>

libc-bottom-half/headers/private/wasi-libc.h

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ifndef __wasilibc_wasilibc_h
2+
#define __wasilibc_wasilibc_h
3+
4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
7+
8+
int __wasilibc_register_preopened_fd(int fd, const char *path);
9+
int __wasilibc_fd_renumber(int fd, int newfd);
10+
11+
#ifdef __cplusplus
12+
}
13+
#endif
14+
15+
#endif

libc-top-half/musl/src/stdio/freopen.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#ifdef __wasilibc_unmodified_upstream
22
#include "stdio_impl.h"
3+
#else
4+
#include <wasi-libc.h>
35
#endif
46
#include <fcntl.h>
57
#include <unistd.h>

0 commit comments

Comments
 (0)