diff --git a/src/access.cpp b/src/access.cpp index f1a6e77c..64381b09 100644 --- a/src/access.cpp +++ b/src/access.cpp @@ -17,11 +17,11 @@ #include #include -#include #include #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rwlock.hpp" #include "ugid.hpp" diff --git a/src/chmod.cpp b/src/chmod.cpp index 30d5f189..6b13c331 100644 --- a/src/chmod.cpp +++ b/src/chmod.cpp @@ -16,11 +16,11 @@ #include -#include #include #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rv.hpp" #include "rwlock.hpp" diff --git a/src/chown.cpp b/src/chown.cpp index a5f09b16..0262af0f 100644 --- a/src/chown.cpp +++ b/src/chown.cpp @@ -16,12 +16,11 @@ #include -#include - #include #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rv.hpp" #include "rwlock.hpp" diff --git a/src/clone.cpp b/src/clone.cpp index 0f3cdd26..d10a1e8a 100644 --- a/src/clone.cpp +++ b/src/clone.cpp @@ -14,12 +14,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_clonefile.hpp" #include "fs_clonepath.hpp" diff --git a/src/config.cpp b/src/config.cpp index da67437d..829ff2a0 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -19,11 +19,11 @@ #include #include -#include #include "config.hpp" -#include "rwlock.hpp" +#include "errno.hpp" #include "fs.hpp" +#include "rwlock.hpp" #define MINFREESPACE_DEFAULT (4294967295ULL) #define POLICYINIT(X) X(policies[FuseFunc::Enum::X]) diff --git a/src/create.cpp b/src/create.cpp index 741e0d8f..1803c167 100644 --- a/src/create.cpp +++ b/src/create.cpp @@ -16,18 +16,18 @@ #include -#include -#include #include -#include +#include +#include #include #include #include "config.hpp" +#include "errno.hpp" #include "fileinfo.hpp" -#include "fs_path.hpp" #include "fs_clonepath.hpp" +#include "fs_path.hpp" #include "rwlock.hpp" #include "ugid.hpp" diff --git a/src/create.hpp b/src/create.hpp index f7e97d56..81a3263e 100644 --- a/src/create.hpp +++ b/src/create.hpp @@ -14,9 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include +#include + namespace mergerfs { namespace fuse diff --git a/src/errno.hpp b/src/errno.hpp new file mode 100644 index 00000000..fbb245bb --- /dev/null +++ b/src/errno.hpp @@ -0,0 +1,29 @@ +/* + Copyright (c) 2016, Antonio SJ Musumeci + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ + +#include + +#if defined(ENODATA) && !defined(ENOATTR) +#define ENOATTR ENODATA +#endif + +#if defined(ENOATTR) && !defined(ENODATA) +#define ENODATA ENOATTR +#endif + +#if !defined(ENOATTR) && !defined(ENODATA) +#error "Neither ENOATTR or ENODATA defined: please contact mergerfs author with platform information" +#endif diff --git a/src/fallocate.cpp b/src/fallocate.cpp index 349bcecc..5c1ea105 100644 --- a/src/fallocate.cpp +++ b/src/fallocate.cpp @@ -18,10 +18,9 @@ #include -#include - -#include "fs_fallocate.hpp" +#include "errno.hpp" #include "fileinfo.hpp" +#include "fs_fallocate.hpp" static int diff --git a/src/fgetattr.cpp b/src/fgetattr.cpp index 7f710022..1f370712 100644 --- a/src/fgetattr.cpp +++ b/src/fgetattr.cpp @@ -19,8 +19,8 @@ #include #include #include -#include +#include "errno.hpp" #include "fileinfo.hpp" static diff --git a/src/flush.cpp b/src/flush.cpp index 0305e2aa..2491e2e9 100644 --- a/src/flush.cpp +++ b/src/flush.cpp @@ -17,8 +17,8 @@ #include #include -#include +#include "errno.hpp" #include "fileinfo.hpp" static diff --git a/src/fs.cpp b/src/fs.cpp index 38c8692e..924e917e 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -29,6 +28,7 @@ #include #include +#include "errno.hpp" #include "fs_attr.hpp" #include "fs_path.hpp" #include "fs_xattr.hpp" diff --git a/src/fs_attr_linux.icpp b/src/fs_attr_linux.icpp index d9860f7b..d23c4dcb 100644 --- a/src/fs_attr_linux.icpp +++ b/src/fs_attr_linux.icpp @@ -14,7 +14,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include #include @@ -24,6 +23,8 @@ #include +#include "errno.hpp" + using std::string; namespace fs diff --git a/src/fs_attr_unsupported.icpp b/src/fs_attr_unsupported.icpp index 68c87b79..8be00461 100644 --- a/src/fs_attr_unsupported.icpp +++ b/src/fs_attr_unsupported.icpp @@ -14,7 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include +#include + +#include "errno.hpp" namespace fs { @@ -28,8 +30,8 @@ namespace fs } int - copy(const string &from, - const string &to) + copy(const std::string &from, + const std::string &to) { return ENOTSUP; } diff --git a/src/fs_clonefile.cpp b/src/fs_clonefile.cpp index d23554ee..069e49cf 100644 --- a/src/fs_clonefile.cpp +++ b/src/fs_clonefile.cpp @@ -14,7 +14,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include #include @@ -24,6 +23,7 @@ #include #include +#include "errno.hpp" #include "fs_attr.hpp" #include "fs_fadvise.hpp" #include "fs_fallocate.hpp" diff --git a/src/fs_clonepath.cpp b/src/fs_clonepath.cpp index 09baf04c..c9d27e5a 100644 --- a/src/fs_clonepath.cpp +++ b/src/fs_clonepath.cpp @@ -17,12 +17,12 @@ #include #include #include -#include #include -#include "fs_path.hpp" +#include "errno.h" #include "fs_attr.hpp" +#include "fs_path.hpp" #include "fs_xattr.hpp" using std::string; diff --git a/src/fs_fadvise_posix.icpp b/src/fs_fadvise_posix.icpp index c2585daf..66ae3daa 100644 --- a/src/fs_fadvise_posix.icpp +++ b/src/fs_fadvise_posix.icpp @@ -14,7 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include +#include "errno.hpp" namespace fs { diff --git a/src/fs_fadvise_unsupported.icpp b/src/fs_fadvise_unsupported.icpp index c36ab5e8..50701842 100644 --- a/src/fs_fadvise_unsupported.icpp +++ b/src/fs_fadvise_unsupported.icpp @@ -14,7 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include +#include "errno.hpp" namespace fs { diff --git a/src/fs_fallocate.cpp b/src/fs_fallocate.cpp index 98d3bb35..9bd15e9e 100644 --- a/src/fs_fallocate.cpp +++ b/src/fs_fallocate.cpp @@ -14,6 +14,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include + #ifdef __linux__ # include "fs_fallocate_linux.icpp" #elif _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L diff --git a/src/fs_fallocate.hpp b/src/fs_fallocate.hpp index 0e3cf3aa..074532ce 100644 --- a/src/fs_fallocate.hpp +++ b/src/fs_fallocate.hpp @@ -17,6 +17,8 @@ #ifndef __FS_FALLOCATE_HPP__ #define __FS_FALLOCATE_HPP__ +#include + namespace fs { int diff --git a/src/fs_fallocate_linux.icpp b/src/fs_fallocate_linux.icpp index c851ae1b..568a3a75 100644 --- a/src/fs_fallocate_linux.icpp +++ b/src/fs_fallocate_linux.icpp @@ -14,9 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include +#include "errno.hpp" #include "fs_fallocate.hpp" namespace fs diff --git a/src/fs_fallocate_osx.icpp b/src/fs_fallocate_osx.icpp index af2447e4..70894142 100644 --- a/src/fs_fallocate_osx.icpp +++ b/src/fs_fallocate_osx.icpp @@ -14,9 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include +#include "errno.hpp" #include "fs_fallocate.hpp" namespace fs diff --git a/src/fs_fallocate_posix.icpp b/src/fs_fallocate_posix.icpp index 759acd9d..ee14180a 100644 --- a/src/fs_fallocate_posix.icpp +++ b/src/fs_fallocate_posix.icpp @@ -14,9 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include +#include "errno.hpp" #include "fs_fallocate.hpp" namespace fs diff --git a/src/fs_fallocate_unsupported.icpp b/src/fs_fallocate_unsupported.icpp index 50c92f11..f32ae0ba 100644 --- a/src/fs_fallocate_unsupported.icpp +++ b/src/fs_fallocate_unsupported.icpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - +#include "errno.hpp" #include "fs_fallocate.hpp" namespace fs diff --git a/src/fs_movefile.cpp b/src/fs_movefile.cpp index 6f1589c0..d2afd189 100644 --- a/src/fs_movefile.cpp +++ b/src/fs_movefile.cpp @@ -14,18 +14,18 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include +#include #include +#include #include -#include #include #include #include "fs.hpp" -#include "fs_path.hpp" -#include "fs_clonepath.hpp" #include "fs_clonefile.hpp" +#include "fs_clonepath.hpp" +#include "fs_path.hpp" using std::string; using std::vector; diff --git a/src/fs_sendfile_linux.icpp b/src/fs_sendfile_linux.icpp index 344bc261..a6291ddc 100644 --- a/src/fs_sendfile_linux.icpp +++ b/src/fs_sendfile_linux.icpp @@ -14,9 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include +#include "errno.hpp" + namespace fs { ssize_t diff --git a/src/fs_sendfile_unsupported.icpp b/src/fs_sendfile_unsupported.icpp index 853c9b99..a08fc1a4 100644 --- a/src/fs_sendfile_unsupported.icpp +++ b/src/fs_sendfile_unsupported.icpp @@ -14,9 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include +#include "errno.hpp" + namespace fs { ssize_t diff --git a/src/fs_xattr.cpp b/src/fs_xattr.cpp index 4920e567..72108438 100644 --- a/src/fs_xattr.cpp +++ b/src/fs_xattr.cpp @@ -14,7 +14,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include #include @@ -26,6 +25,7 @@ #include #include +#include "errno.hpp" #include "str.hpp" #include "xattr.hpp" diff --git a/src/fsync.cpp b/src/fsync.cpp index 57f0c0e9..703e734a 100644 --- a/src/fsync.cpp +++ b/src/fsync.cpp @@ -24,8 +24,8 @@ #include #include -#include +#include "errno.hpp" #include "fileinfo.hpp" static diff --git a/src/ftruncate.cpp b/src/ftruncate.cpp index 3ccbabf7..3bd6fd44 100644 --- a/src/ftruncate.cpp +++ b/src/ftruncate.cpp @@ -18,8 +18,8 @@ #include #include -#include +#include "errno.hpp" #include "fileinfo.hpp" static diff --git a/src/ftruncate.hpp b/src/ftruncate.hpp index 2bd76e43..e7a7db84 100644 --- a/src/ftruncate.hpp +++ b/src/ftruncate.hpp @@ -16,8 +16,8 @@ #include -#include #include +#include namespace mergerfs { diff --git a/src/fusefunc.cpp b/src/fusefunc.cpp index 0f9c1ef0..7b3b3cd9 100644 --- a/src/fusefunc.cpp +++ b/src/fusefunc.cpp @@ -17,9 +17,9 @@ #include #include -#include "fusefunc.hpp" -#include "category.hpp" #include "buildvector.hpp" +#include "category.hpp" +#include "fusefunc.hpp" #define FUSEFUNC(X,Y) FuseFunc(FuseFunc::Enum::X,#X,Category::Enum::Y) diff --git a/src/getattr.cpp b/src/getattr.cpp index ca0b5b1d..1c39eae4 100644 --- a/src/getattr.cpp +++ b/src/getattr.cpp @@ -22,9 +22,9 @@ #include #include #include -#include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rwlock.hpp" #include "ugid.hpp" diff --git a/src/getxattr.cpp b/src/getxattr.cpp index 94094225..7f54dad7 100644 --- a/src/getxattr.cpp +++ b/src/getxattr.cpp @@ -21,13 +21,13 @@ #include #include -#include #include #include #include #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rwlock.hpp" #include "str.hpp" diff --git a/src/gidcache.cpp b/src/gidcache.cpp index ea91699a..6e2f59a5 100644 --- a/src/gidcache.cpp +++ b/src/gidcache.cpp @@ -14,10 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include +#include #include #include -#include -#include #include #if defined __linux__ and UGID_USE_RWLOCK == 0 diff --git a/src/ioctl.cpp b/src/ioctl.cpp index b362e375..410435c1 100644 --- a/src/ioctl.cpp +++ b/src/ioctl.cpp @@ -19,13 +19,13 @@ #include #include -#include #include #include #include #include #include "config.hpp" +#include "errno.hpp" #include "fileinfo.hpp" #include "fs_path.hpp" #include "rwlock.hpp" diff --git a/src/link.cpp b/src/link.cpp index 58bc3ee1..dd0a7492 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -19,10 +19,10 @@ #include #include -#include #include #include "config.hpp" +#include "errno.hpp" #include "fs_clonepath.hpp" #include "fs_path.hpp" #include "rv.hpp" diff --git a/src/listxattr.cpp b/src/listxattr.cpp index 1282c742..33441bb4 100644 --- a/src/listxattr.cpp +++ b/src/listxattr.cpp @@ -20,12 +20,12 @@ #include #include -#include #include #include "buildvector.hpp" #include "category.hpp" #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rwlock.hpp" #include "ugid.hpp" diff --git a/src/mkdir.cpp b/src/mkdir.cpp index 4c1baccb..51453645 100644 --- a/src/mkdir.cpp +++ b/src/mkdir.cpp @@ -16,7 +16,6 @@ #include -#include #include #include @@ -24,6 +23,7 @@ #include #include "config.hpp" +#include "errno.hpp" #include "fs_clonepath.hpp" #include "fs_path.hpp" #include "rv.hpp" diff --git a/src/mknod.cpp b/src/mknod.cpp index 6ccc3fcf..29b68c8b 100644 --- a/src/mknod.cpp +++ b/src/mknod.cpp @@ -19,13 +19,13 @@ #include #include -#include -#include -#include #include +#include +#include #include #include "config.hpp" +#include "errno.hpp" #include "fs_clonepath.hpp" #include "fs_path.hpp" #include "rv.hpp" diff --git a/src/open.cpp b/src/open.cpp index febc86d7..569d6252 100644 --- a/src/open.cpp +++ b/src/open.cpp @@ -16,14 +16,15 @@ #include -#include -#include #include -#include +#include +#include + #include #include #include "config.hpp" +#include "errno.hpp" #include "fileinfo.hpp" #include "fs_path.hpp" #include "rwlock.hpp" diff --git a/src/policy.cpp b/src/policy.cpp index f443045f..a9d48929 100644 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -16,9 +16,9 @@ #include -#include "policy.hpp" -#include "fs.hpp" #include "buildvector.hpp" +#include "fs.hpp" +#include "policy.hpp" #define POLICY(X,PP) (Policy(Policy::Enum::X,#X,Policy::Func::X,PP)) #define PRESERVES_PATH true diff --git a/src/policy_all.cpp b/src/policy_all.cpp index f23835fd..764ee8c6 100644 --- a/src/policy_all.cpp +++ b/src/policy_all.cpp @@ -14,11 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_epall.cpp b/src/policy_epall.cpp index a4fd5720..57fcf85b 100644 --- a/src/policy_epall.cpp +++ b/src/policy_epall.cpp @@ -14,11 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_epff.cpp b/src/policy_epff.cpp index b8981185..7b00b3de 100644 --- a/src/policy_epff.cpp +++ b/src/policy_epff.cpp @@ -14,11 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_eplfs.cpp b/src/policy_eplfs.cpp index 10ddf3c5..d1d0e00b 100644 --- a/src/policy_eplfs.cpp +++ b/src/policy_eplfs.cpp @@ -14,12 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_eplus.cpp b/src/policy_eplus.cpp index ee88ccb5..cbdcbfe5 100644 --- a/src/policy_eplus.cpp +++ b/src/policy_eplus.cpp @@ -14,12 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_epmfs.cpp b/src/policy_epmfs.cpp index c9a2db9f..fcde084a 100644 --- a/src/policy_epmfs.cpp +++ b/src/policy_epmfs.cpp @@ -14,12 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_eprand.cpp b/src/policy_eprand.cpp index 4e8ffb84..2620bc49 100644 --- a/src/policy_eprand.cpp +++ b/src/policy_eprand.cpp @@ -14,12 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - +#include #include #include -#include +#include "errno.hpp" #include "policy.hpp" #include "success_fail.hpp" diff --git a/src/policy_erofs.cpp b/src/policy_erofs.cpp index dc470139..ba8bd196 100644 --- a/src/policy_erofs.cpp +++ b/src/policy_erofs.cpp @@ -14,11 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include +#include "errno.hpp" #include "policy.hpp" using std::string; diff --git a/src/policy_ff.cpp b/src/policy_ff.cpp index 1e830277..eb5c5110 100644 --- a/src/policy_ff.cpp +++ b/src/policy_ff.cpp @@ -14,11 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_invalid.cpp b/src/policy_invalid.cpp index 2398009d..4bcddc0a 100644 --- a/src/policy_invalid.cpp +++ b/src/policy_invalid.cpp @@ -14,11 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include +#include "errno.hpp" #include "policy.hpp" using std::string; diff --git a/src/policy_lfs.cpp b/src/policy_lfs.cpp index e95aa7b7..3a880b6f 100644 --- a/src/policy_lfs.cpp +++ b/src/policy_lfs.cpp @@ -14,12 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_lus.cpp b/src/policy_lus.cpp index bfb34c4e..ea73648e 100644 --- a/src/policy_lus.cpp +++ b/src/policy_lus.cpp @@ -14,12 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_mfs.cpp b/src/policy_mfs.cpp index 17c80170..668dc0b1 100644 --- a/src/policy_mfs.cpp +++ b/src/policy_mfs.cpp @@ -14,11 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_newest.cpp b/src/policy_newest.cpp index f4edd2c2..1e905c08 100644 --- a/src/policy_newest.cpp +++ b/src/policy_newest.cpp @@ -14,13 +14,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include #include #include +#include "errno.hpp" #include "fs.hpp" #include "fs_path.hpp" #include "policy.hpp" diff --git a/src/policy_rand.cpp b/src/policy_rand.cpp index 687afb7b..a7aa1314 100644 --- a/src/policy_rand.cpp +++ b/src/policy_rand.cpp @@ -14,12 +14,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include - +#include #include #include -#include +#include "errno.hpp" #include "policy.hpp" #include "success_fail.hpp" diff --git a/src/read.cpp b/src/read.cpp index 4561bbfa..cf6d9a55 100644 --- a/src/read.cpp +++ b/src/read.cpp @@ -16,12 +16,12 @@ #include -#include -#include #include +#include #include +#include "errno.hpp" #include "fileinfo.hpp" static diff --git a/src/read_buf.cpp b/src/read_buf.cpp index 27c09f6a..58b49a0c 100644 --- a/src/read_buf.cpp +++ b/src/read_buf.cpp @@ -19,9 +19,9 @@ #include #include -#include #include +#include "errno.hpp" #include "fileinfo.hpp" typedef struct fuse_bufvec fuse_bufvec; diff --git a/src/readdir.cpp b/src/readdir.cpp index bf0fd3e1..ca4f8b5f 100644 --- a/src/readdir.cpp +++ b/src/readdir.cpp @@ -22,10 +22,10 @@ #include #include -#include #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "readdir.hpp" #include "rwlock.hpp" diff --git a/src/readlink.cpp b/src/readlink.cpp index cf0d6d32..3a82c092 100644 --- a/src/readlink.cpp +++ b/src/readlink.cpp @@ -16,13 +16,13 @@ #include -#include -#include -#include #include #include +#include +#include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rwlock.hpp" #include "ugid.hpp" diff --git a/src/release.cpp b/src/release.cpp index 07b63df9..a7dec87f 100644 --- a/src/release.cpp +++ b/src/release.cpp @@ -17,10 +17,10 @@ #include #include -#include #include +#include "errno.hpp" #include "fileinfo.hpp" static diff --git a/src/removexattr.cpp b/src/removexattr.cpp index 40fc1a22..21795f31 100644 --- a/src/removexattr.cpp +++ b/src/removexattr.cpp @@ -19,10 +19,10 @@ #include #include -#include #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rv.hpp" #include "rwlock.hpp" diff --git a/src/rename.cpp b/src/rename.cpp index bff0447c..b75a3b98 100644 --- a/src/rename.cpp +++ b/src/rename.cpp @@ -14,7 +14,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include @@ -24,6 +23,7 @@ #include #include "config.hpp" +#include "errno.hpp" #include "fs_clonepath.hpp" #include "fs_path.hpp" #include "rv.hpp" diff --git a/src/rmdir.cpp b/src/rmdir.cpp index 8c66f51b..70e79ed3 100644 --- a/src/rmdir.cpp +++ b/src/rmdir.cpp @@ -16,12 +16,12 @@ #include -#include #include #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rv.hpp" #include "rwlock.hpp" diff --git a/src/setxattr.cpp b/src/setxattr.cpp index aac13736..ce61e360 100644 --- a/src/setxattr.cpp +++ b/src/setxattr.cpp @@ -20,11 +20,11 @@ #include #include -#include -#include #include +#include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "num.hpp" #include "rv.hpp" diff --git a/src/statfs.cpp b/src/statfs.cpp index 2ac375e8..f9d564ae 100644 --- a/src/statfs.cpp +++ b/src/statfs.cpp @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -26,6 +25,7 @@ #include #include "config.hpp" +#include "errno.hpp" #include "rwlock.hpp" #include "success_fail.hpp" #include "ugid.hpp" diff --git a/src/symlink.cpp b/src/symlink.cpp index 64d38ce2..e76e210f 100644 --- a/src/symlink.cpp +++ b/src/symlink.cpp @@ -16,12 +16,13 @@ #include -#include #include #include + #include #include "config.hpp" +#include "errno.hpp" #include "fs_clonepath.hpp" #include "fs_path.hpp" #include "rv.hpp" diff --git a/src/truncate.cpp b/src/truncate.cpp index ba79c954..b67906a0 100644 --- a/src/truncate.cpp +++ b/src/truncate.cpp @@ -16,14 +16,14 @@ #include -#include #include -#include +#include #include #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rv.hpp" #include "rwlock.hpp" diff --git a/src/unlink.cpp b/src/unlink.cpp index d8ff0fac..cc711f7a 100644 --- a/src/unlink.cpp +++ b/src/unlink.cpp @@ -16,13 +16,13 @@ #include -#include #include #include #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rv.hpp" #include "rwlock.hpp" diff --git a/src/utimens.cpp b/src/utimens.cpp index 34d918af..15a81f44 100644 --- a/src/utimens.cpp +++ b/src/utimens.cpp @@ -16,7 +16,6 @@ #include -#include #include #include @@ -24,6 +23,7 @@ #include #include "config.hpp" +#include "errno.hpp" #include "fs_path.hpp" #include "rv.hpp" #include "rwlock.hpp" diff --git a/src/write.cpp b/src/write.cpp index f2767981..cdd0c1c5 100644 --- a/src/write.cpp +++ b/src/write.cpp @@ -16,10 +16,10 @@ #include -#include #include #include "config.hpp" +#include "errno.hpp" #include "fileinfo.hpp" #include "fs_movefile.hpp" #include "rwlock.hpp" diff --git a/src/write_buf.cpp b/src/write_buf.cpp index 204a465f..94abc86e 100644 --- a/src/write_buf.cpp +++ b/src/write_buf.cpp @@ -17,14 +17,15 @@ #if WRITE_BUF #include + #include -#include #include #include #include #include "config.hpp" +#include "errno.hpp" #include "fileinfo.hpp" #include "fs_movefile.hpp" #include "policy.hpp" diff --git a/src/xattr.hpp b/src/xattr.hpp index 98f5c0ec..45e0050a 100644 --- a/src/xattr.hpp +++ b/src/xattr.hpp @@ -18,22 +18,10 @@ #include #endif -#if defined(ENODATA) && !defined(ENOATTR) -#define ENOATTR ENODATA -#endif - -#if defined(ENOATTR) && !defined(ENODATA) -#define ENODATA ENOATTR -#endif - -#if !defined(ENOATTR) && !defined(ENODATA) -#error "Neither ENOATTR or ENODATA defined: please contact mergerfs author with platform information" -#endif - #ifndef XATTR_CREATE -#define XATTR_CREATE 0x1 +# define XATTR_CREATE 0x1 #endif #ifndef XATTR_REPLACE -#define XATTR_REPLACE 0x2 +# define XATTR_REPLACE 0x2 #endif diff --git a/tools/cppfind b/tools/cppfind index 30d64d9e..c833ce9d 100755 --- a/tools/cppfind +++ b/tools/cppfind @@ -1,6 +1,6 @@ #!/bin/sh -FUSE_CFLAGS=$(pkg-config --cflags fuse) +FUSE_CFLAGS="$(pkg-config --cflags fuse) -DFUSE_USE_VERSION=29" echo "#include " | cpp ${FUSE_CFLAGS} | grep -q "${1}"