dll: fuse: fsp_fuse_ntstatus_from_errno

This commit is contained in:
Bill Zissimopoulos
2016-06-08 12:01:35 -07:00
parent 1a406eb462
commit 6b99160625
9 changed files with 213 additions and 4 deletions

22
tools/gensrc/errno.sh Normal file
View 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