mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 20:39:36 +08:00
3cd28420f1
This patch makes compile milvus under windows(MSYS), including: - some cpp adaptation for compile under msys/gcc-10.3 - install toolchain scripts for setup from MinGW/MSYS `scripts/install_deps_msys.sh` - adaptation for POSIX API use in golang * using gofrs/flock instead of syscall.Flock * using x/exp/mmap instead of syscall.Mmap - introducing github actions for build milvus.exe under windows/MSYS - rocksdb's patch for MSYS - adaptation for compile knowhere under windows - a windows package script for pack zip file, `scripts/package_windows.sh` issue #7706 Signed-off-by: Ji Bin <matrixji@live.com>
20 lines
303 B
Go
20 lines
303 B
Go
package cgoconverter
|
|
|
|
/*
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
*/
|
|
import "C"
|
|
import "unsafe"
|
|
|
|
func copyToCBytes(data []byte) unsafe.Pointer {
|
|
return C.CBytes(data)
|
|
}
|
|
|
|
func mallocCBytes(v byte, len int) unsafe.Pointer {
|
|
p := C.malloc(C.size_t(len))
|
|
C.memset(p, C.int(v), C.size_t(len))
|
|
|
|
return p
|
|
}
|