Skip to content

Commit 4557249

Browse files
committed
Add fclose
1 parent 679d28b commit 4557249

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docs/tcc-wasm.wasm

1.34 KB
Binary file not shown.

tcc-wasm.wasm

1.34 KB
Binary file not shown.

zig/tcc-wasm.zig

+5-3
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ export fn close(fd0: c_int) c_int {
9898
return 0;
9999
}
100100

101+
export fn fclose(stream: *FILE) c_int {
102+
debug("close: stream={*}", .{stream});
103+
return 0;
104+
}
105+
101106
export fn unlink(path: [*:0]const u8) c_int {
102107
debug("unlink: path={s}", .{path});
103108
return 0;
@@ -389,9 +394,6 @@ pub export fn atoi(_: c_int) c_int {
389394
pub export fn exit(_: c_int) c_int {
390395
@panic("TODO: exit");
391396
}
392-
pub export fn fclose(_: c_int) c_int {
393-
@panic("TODO: fclose");
394-
}
395397
pub export fn fopen(_: c_int) c_int {
396398
@panic("TODO: fopen");
397399
}

0 commit comments

Comments
 (0)