From 8835a1a2320abfb89f2ea438852348f6f5e4618b Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Fri, 28 Feb 2025 16:18:27 +0800 Subject: [PATCH 1/2] c:some type --- c/c.go | 11 +++++++++++ c/llcppg.pub | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/c/c.go b/c/c.go index 6c9c5713..918a6716 100644 --- a/c/c.go +++ b/c/c.go @@ -56,6 +56,7 @@ type integer interface { } type SizeT = uintptr +type SsizeT = Long type IntptrT = uintptr type UintptrT = uintptr @@ -72,6 +73,8 @@ type Uint64T = uint64 type IntmaxT = LongLong type UintmaxT = UlongLong +type VaList = Pointer + //go:linkname Str llgo.cstr func Str(string) *Char @@ -257,6 +260,14 @@ func Perror(s *Char) // ----------------------------------------------------------------------------- +type IconvT = Pointer + +// ----------------------------------------------------------------------------- + +type LocaleT = Pointer + +// ----------------------------------------------------------------------------- + //go:linkname Usleep C.usleep func Usleep(useconds Uint) Int diff --git a/c/llcppg.pub b/c/llcppg.pub index 85047998..bb117a59 100644 --- a/c/llcppg.pub +++ b/c/llcppg.pub @@ -1,5 +1,6 @@ FILE size_t SizeT +ssize_t SsizeT intptr_t IntptrT uintptr_t UintptrT int8_t Int8T @@ -12,4 +13,7 @@ uint32_t Uint32T uint64_t Uint64T intmax_t IntmaxT uintmax_t UintmaxT +va_list VaList +iconv_t IconvT +locale_t LocaleT option Option From 2e148d6d0ee0ecfd3449fbd32e235dbe150f0049 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Fri, 28 Feb 2025 16:21:12 +0800 Subject: [PATCH 2/2] c/pub:fix stat --- c/os/llcppg.pub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/os/llcppg.pub b/c/os/llcppg.pub index 1bf6b929..5754f2a3 100644 --- a/c/os/llcppg.pub +++ b/c/os/llcppg.pub @@ -3,5 +3,5 @@ uid_t UidT gid_t GidT off_t OffT dev_t DevT -Stat_t StatT +stat StatT pid_t PidT