Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Nov 19, 2022
1 parent f359d92 commit 599e788
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions testdata/libc/libc_windows.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package libc

import (
"fmt"
unsafe "unsafe"
)

Expand Down Expand Up @@ -32,7 +33,7 @@ type struct_threadmbcinfostruct struct {
}

func __acrt_iob_func(index uint32) *struct__iobuf {
panic("notimpl")
return nil
}
func X__builtin_llabs(int64) int64 {
panic("notimpl")
Expand All @@ -49,9 +50,16 @@ func __mingw_strtod(*int8, **int8) float64 {
func __mingw_strtof(*int8, **int8) float32 {
panic("notimpl")
}
func __mingw_vfprintf(*struct__iobuf, *int8, []interface {
func __mingw_vfprintf(f *struct__iobuf, format *int8, args []interface {
}) int32 {
panic("notimpl")
goformat := gostring(format)
for i, arg := range args {
if v, ok := arg.(*int8); ok {
args[i] = gostring(v)
}
}
fmt.Printf(goformat, args...)
return 0
}
func __mingw_vfscanf(fp *struct__iobuf, Format *int8, argp []interface {
}) int32 {
Expand Down
1 change: 1 addition & 0 deletions testdata/libc/src/foo.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ typedef size_t foo_t;

foo_t foo();
void unknown();
int printf_x(const char *restrict fmt, ...);

0 comments on commit 599e788

Please sign in to comment.