Update dependencies (#1929)
This commit is contained in:
59
vendor/modernc.org/libc/libc_windows_386.go
generated
vendored
59
vendor/modernc.org/libc/libc_windows_386.go
generated
vendored
@@ -11,6 +11,7 @@ import (
|
||||
"unsafe"
|
||||
|
||||
"modernc.org/libc/errno"
|
||||
"modernc.org/libc/sys/stat"
|
||||
"modernc.org/libc/sys/types"
|
||||
)
|
||||
|
||||
@@ -511,27 +512,33 @@ func X_gmtime32(t *TLS, sourceTime uintptr) uintptr {
|
||||
}
|
||||
|
||||
// LONG SetWindowLongW(
|
||||
// HWND hWnd,
|
||||
// int nIndex,
|
||||
// LONG dwNewLong
|
||||
//
|
||||
// HWND hWnd,
|
||||
// int nIndex,
|
||||
// LONG dwNewLong
|
||||
//
|
||||
// );
|
||||
func XSetWindowLongW(t *TLS, hwnd uintptr, nIndex int32, dwNewLong long) long {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// LONG GetWindowLongW(
|
||||
// HWND hWnd,
|
||||
// int nIndex
|
||||
//
|
||||
// HWND hWnd,
|
||||
// int nIndex
|
||||
//
|
||||
// );
|
||||
func XGetWindowLongW(t *TLS, hwnd uintptr, nIndex int32) long {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// LRESULT LRESULT DefWindowProcW(
|
||||
// HWND hWnd,
|
||||
// UINT Msg,
|
||||
// WPARAM wParam,
|
||||
// LPARAM lParam
|
||||
//
|
||||
// HWND hWnd,
|
||||
// UINT Msg,
|
||||
// WPARAM wParam,
|
||||
// LPARAM lParam
|
||||
//
|
||||
// );
|
||||
func XDefWindowProcW(t *TLS, _ ...interface{}) int32 {
|
||||
panic(todo(""))
|
||||
@@ -540,3 +547,37 @@ func XDefWindowProcW(t *TLS, _ ...interface{}) int32 {
|
||||
func XSendMessageTimeoutW(t *TLS, _ ...interface{}) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// int _fstat(
|
||||
//
|
||||
// int fd,
|
||||
// struct __stat *buffer
|
||||
//
|
||||
// );
|
||||
func X_fstat(t *TLS, fd int32, buffer uintptr) int32 {
|
||||
f, ok := fdToFile(fd)
|
||||
if !ok {
|
||||
t.setErrno(EBADF)
|
||||
return -1
|
||||
}
|
||||
|
||||
var d syscall.ByHandleFileInformation
|
||||
err := syscall.GetFileInformationByHandle(f.Handle, &d)
|
||||
if err != nil {
|
||||
t.setErrno(EBADF)
|
||||
return -1
|
||||
}
|
||||
|
||||
var bStat32 = (*stat.X_stat32)(unsafe.Pointer(buffer))
|
||||
var accessTime = int64(d.LastAccessTime.HighDateTime)<<32 + int64(d.LastAccessTime.LowDateTime)
|
||||
bStat32.Fst_atime = int32(WindowsTickToUnixSeconds(accessTime))
|
||||
var modTime = int64(d.LastWriteTime.HighDateTime)<<32 + int64(d.LastWriteTime.LowDateTime)
|
||||
bStat32.Fst_mtime = int32(WindowsTickToUnixSeconds(modTime))
|
||||
var crTime = int64(d.CreationTime.HighDateTime)<<32 + int64(d.CreationTime.LowDateTime)
|
||||
bStat32.Fst_ctime = int32(WindowsTickToUnixSeconds(crTime))
|
||||
var fSz = int64(d.FileSizeHigh)<<32 + int64(d.FileSizeLow)
|
||||
bStat32.Fst_size = int32(fSz)
|
||||
bStat32.Fst_mode = WindowsAttrbiutesToStat(d.FileAttributes)
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user