mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-14 15:52:47 -05:00
dll: fuse: fsp_fuse_ntstatus_from_errno
This commit is contained in:
22
tools/gensrc/errno.sh
Normal file
22
tools/gensrc/errno.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd $(dirname "$0")
|
||||
|
||||
(
|
||||
echo '#include <errno.h>'
|
||||
echo '/*beginbeginbeginbegin*/'
|
||||
awk '{ printf "case %s: return %s;\n", $1, $2 }' errno.txt
|
||||
) > errno.src
|
||||
|
||||
echo "#if FSP_FUSE_ERRNO == 87 /* Windows */"
|
||||
echo
|
||||
vcvars="$(cygpath -aw "$VS140COMNTOOLS/../../VC/vcvarsall.bat")"
|
||||
cmd /c "call" "$vcvars" "x64" "&&" cl /nologo /EP /C errno.src 2>/dev/null | sed -e '1,/beginbeginbeginbegin/d'
|
||||
echo
|
||||
echo "#elif FSP_FUSE_ERRNO == 67 /* Cygwin */"
|
||||
echo
|
||||
cpp -C -P errno.src | sed -e '1,/beginbeginbeginbegin/d'
|
||||
echo
|
||||
echo "#endif"
|
||||
|
||||
rm errno.src
|
Reference in New Issue
Block a user