add ifndefs to all headers

This commit is contained in:
Antonio SJ Musumeci 2016-12-22 22:46:20 -05:00
parent e93c946198
commit a60d815e92
91 changed files with 444 additions and 12 deletions

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __ACCESS_HPP__
#define __ACCESS_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
int mask);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __ASSERT_HPP__
#define __ASSERT_HPP__
#define STATIC_ASSERT(cond) assert::StaticAssert< (cond) >()
#define STATIC_ARRAYLENGTH_ASSERT(array,size) STATIC_ASSERT(((sizeof(array)/sizeof(array[0]))==(size)))
@ -26,3 +29,5 @@ namespace assert
struct StaticAssert<true>
{};
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __BUILDMAP_HPP__
#define __BUILDMAP_HPP__
#include <algorithm>
template<typename K,typename V>
@ -41,3 +44,5 @@ public:
private:
std::map<K,V> _map;
};
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __BUILDVECTOR_HPP__
#define __BUILDVECTOR_HPP__
#include <algorithm>
template<typename V, bool SORT = false>
@ -41,3 +44,5 @@ public:
private:
std::vector<V> _vector;
};
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CHMOD_HPP__
#define __CHMOD_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
mode_t mode);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CHOWN_HPP__
#define __CHOWN_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +27,5 @@ namespace mergerfs
gid_t gid);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CREATE_HPP__
#define __CREATE_HPP__
#include <fuse.h>
#include <sys/types.h>
@ -28,3 +31,5 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __DESTROY_HPP__
#define __DESTROY_HPP__
namespace mergerfs
{
namespace fuse
@ -22,3 +25,5 @@ namespace mergerfs
destroy(void *);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __ERRNO_HPP__
#define __ERRNO_HPP__
#include <errno.h>
#if defined(ENODATA) && !defined(ENOATTR)
@ -27,3 +30,5 @@
#if !defined(ENOATTR) && !defined(ENODATA)
#error "Neither ENOATTR or ENODATA defined: please contact mergerfs author with platform information"
#endif
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FALLOCATE_HPP__
#define __FALLOCATE_HPP__
namespace mergerfs
{
namespace fuse
@ -26,3 +29,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FGETATTR_HPP__
#define __FGETATTR_HPP__
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@ -28,3 +31,5 @@ namespace mergerfs
fuse_file_info *fileinfo);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FLOCK_HPP__
#define __FLOCK_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +27,5 @@ namespace mergerfs
int op);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FLUSH_HPP__
#define __FLUSH_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -17,11 +17,11 @@
#ifndef __FS_HPP__
#define __FS_HPP__
#include <stdint.h>
#include <string>
#include <vector>
#include <stdint.h>
namespace fs
{
using std::string;

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_ACCESS_HPP__
#define __FS_BASE_ACCESS_HPP__
#include <string>
#include <fcntl.h>
@ -53,3 +56,5 @@ namespace fs
return fs::access(path,mode,AT_EACCESS);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CHMOD_HPP__
#define __FS_BASE_CHMOD_HPP__
#include <sys/stat.h>
namespace fs
@ -47,3 +50,5 @@ namespace fs
return ::fchmod(fd,st.st_mode);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CHOWN_HPP__
#define __FS_BASE_CHOWN_HPP__
#include <string>
#include <sys/stat.h>
@ -72,3 +75,5 @@ namespace fs
return fs::fchown(fd,st.st_uid,st.st_gid);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CLOSE_HPP__
#define __FS_BASE_CLOSE_HPP__
#include <unistd.h>
namespace fs
@ -28,3 +31,5 @@ namespace fs
return ::close(fd);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CLOSEDIR_HPP__
#define __FS_BASE_CLOSEDIR_HPP__
#include <dirent.h>
#include <sys/types.h>
@ -29,3 +32,5 @@ namespace fs
return ::closedir(dirp);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_DUP_HPP__
#define __FS_BASE_DUP_HPP__
#include <unistd.h>
namespace fs
@ -28,3 +31,5 @@ namespace fs
return ::dup(fd);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_FLOCK_HPP__
#define __FS_BASE_FLOCK_HPP__
#include <sys/file.h>
namespace fs
@ -29,3 +32,5 @@ namespace fs
return ::flock(fd,operation);
}
}
#endif

View File

@ -16,9 +16,13 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <errno.h>
#ifndef __FS_BASE_FSYNC_HPP__
#define __FS_BASE_FSYNC_HPP__
#include <unistd.h>
#include "errno.hpp"
namespace fs
{
static
@ -41,3 +45,5 @@ namespace fs
#endif
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_FTRUNCATE_HPP__
#define __FS_BASE_FTRUNCATE_HPP__
#include <sys/types.h>
#include <unistd.h>
@ -30,3 +33,5 @@ namespace fs
return ::ftruncate(fd,size);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_GETXATTR_HPP__
#define __FS_BASE_GETXATTR_HPP__
#include <sys/types.h>
#include "errno.hpp"
@ -38,3 +41,5 @@ namespace fs
#endif
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_IOCTL_HPP__
#define __FS_BASE_IOCTL_HPP__
#include <sys/ioctl.h>
namespace fs
@ -30,3 +33,5 @@ namespace fs
return ::ioctl(fd,request,data);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_LINK_HPP__
#define __FS_BASE_LINK_HPP__
#include <string>
#include <unistd.h>
@ -31,3 +34,5 @@ namespace fs
return ::link(oldpath.c_str(),newpath.c_str());
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_LISTXATTR_HPP__
#define __FS_BASE_LISTXATTR_HPP__
#include <sys/types.h>
#include "errno.hpp"
@ -37,3 +40,5 @@ namespace fs
#endif
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_LSEEK_HPP__
#define __FS_BASE_LSEEK_HPP__
#include <sys/types.h>
#include <unistd.h>
@ -31,3 +34,5 @@ namespace fs
return ::lseek(fd,offset,whence);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_MKDIR_HPP__
#define __FS_BASE_MKDIR_HPP__
#include <string>
#include <sys/stat.h>
@ -32,3 +35,5 @@ namespace fs
return ::mkdir(path.c_str(),mode);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_MKNOD_HPP__
#define __FS_BASE_MKNOD_HPP__
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
@ -33,3 +36,5 @@ namespace fs
return ::mknod(path.c_str(),mode,dev);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_OPEN_HPP__
#define __FS_BASE_OPEN_HPP__
#include <string>
#include <fcntl.h>
@ -43,3 +46,5 @@ namespace fs
return ::open(path.c_str(),flags,mode);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_OPENDIR_HPP__
#define __FS_BASE_OPENDIR_HPP__
#include <string>
#include <dirent.h>
@ -31,3 +34,5 @@ namespace fs
return ::opendir(name.c_str());
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_READ_HPP__
#define __FS_BASE_READ_HPP__
#include <unistd.h>
namespace fs
@ -41,3 +44,5 @@ namespace fs
return ::pread(fd,buf,count,offset);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_READDIR_HPP__
#define __FS_BASE_READDIR_HPP__
#include <dirent.h>
namespace fs
@ -28,3 +31,5 @@ namespace fs
return ::readdir(dirp);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_READLINK_HPP__
#define __FS_BASE_READLINK_HPP__
#include <string>
#include <unistd.h>
@ -32,3 +35,5 @@ namespace fs
return ::readlink(path.c_str(),buf,bufsiz);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_REALPATH_HPP__
#define __FS_BASE_REALPATH_HPP__
#include <string>
#include <limits.h>
@ -40,3 +43,5 @@ namespace fs
return fs::realpath(path,NULL);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_REMOVE_HPP__
#define __FS_BASE_REMOVE_HPP__
#include <string>
#include <stdio.h>
@ -30,3 +33,5 @@ namespace fs
return ::remove(pathname.c_str());
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_REMOVEXATTR_HPP__
#define __FS_BASE_REMOVEXATTR_HPP__
#include <sys/types.h>
#include "errno.hpp"
@ -36,3 +39,5 @@ namespace fs
#endif
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_RENAME_HPP__
#define __FS_BASE_RENAME_HPP__
#include <stdio.h>
namespace fs
@ -29,3 +32,5 @@ namespace fs
return ::rename(oldpath.c_str(),newpath.c_str());
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_RMDIR_HPP__
#define __FS_BASE_RMDIR_HPP__
#include <string>
#include <unistd.h>
@ -30,3 +33,5 @@ namespace fs
return ::rmdir(path.c_str());
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_SETXATTR_HPP__
#define __FS_BASE_SETXATTR_HPP__
#include <sys/types.h>
#include "errno.hpp"
@ -39,3 +42,5 @@ namespace fs
#endif
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_STAT_HPP__
#define __FS_BASE_STAT_HPP__
#include <string>
#include <sys/stat.h>
@ -60,3 +63,5 @@ namespace fs
return ::fstat(fd,&st);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_STATVFS_HPP__
#define __FS_BASE_STATVFS_HPP__
#include <string>
#include <sys/statvfs.h>
@ -40,3 +43,5 @@ namespace fs
return fs::statvfs(path.c_str(),st);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_SYMLINK_HPP__
#define __FS_BASE_SYMLINK_HPP__
#include <string>
#include <unistd.h>
@ -40,3 +43,5 @@ namespace fs
return ::symlink(oldpath,newpath.c_str());
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_TRUNCATE_HPP__
#define __FS_BASE_TRUNCATE_HPP__
#include <string>
#include <sys/types.h>
@ -32,3 +35,5 @@ namespace fs
return ::truncate(path.c_str(),length);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UNLINK_HPP__
#define __FS_BASE_UNLINK_HPP__
#include <string>
#include <unistd.h>
@ -30,3 +33,5 @@ namespace fs
return ::unlink(path.c_str());
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UTIME_HPP__
#define __FS_BASE_UTIME_HPP__
#ifdef __linux__
# include "fs_base_utime_utimensat.hpp"
#elif __FreeBSD__ >= 11
@ -61,3 +64,5 @@ namespace fs
return fs::utime(AT_FDCWD,path,times,AT_SYMLINK_NOFOLLOW);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UTIME_GENERIC_HPP__
#define __FS_BASE_UTIME_GENERIC_HPP__
#include <string>
#include <fcntl.h>
@ -296,3 +299,5 @@ namespace fs
return ::futimes(fd,tvp);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UTIME_UTIMENSAT_HPP__
#define __FS_BASE_UTIME_UTIMENSAT_HPP__
#include <string>
#include <fcntl.h>
@ -43,3 +46,5 @@ namespace fs
return ::futimens(fd,times);
}
}
#endif

View File

@ -16,6 +16,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_WRITE_HPP__
#define __FS_BASE_WRITE_HPP__
#include <unistd.h>
namespace fs
@ -41,3 +44,5 @@ namespace fs
return ::pwrite(fd,buf,count,offset);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_CLONEFILE_HPP__
#define __FS_CLONEFILE_HPP__
#include <string>
namespace fs
@ -23,3 +26,5 @@ namespace fs
int clonefile(const std::string &from,
const std::string &to);
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_CLONEPATH_HPP__
#define __FS_CLONEPATH_HPP__
#include <string>
namespace fs
@ -25,3 +28,5 @@ namespace fs
const std::string &to,
const std::string &relative);
}
#endif

View File

@ -42,4 +42,3 @@ namespace fs
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FSYNC_HPP__
#define __FSYNC_HPP__
#include <fuse.h>
namespace mergerfs
@ -26,3 +29,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FTRUNCATE_HPP__
#define __FTRUNCATE_HPP__
#include <fuse.h>
#include <sys/types.h>
@ -29,3 +32,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __GETATTR_HPP__
#define __GETATTR_HPP__
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@ -27,3 +30,5 @@ namespace mergerfs
struct stat *buf);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __GETXATTR_HPP__
#define __GETXATTR_HPP__
namespace mergerfs
{
namespace fuse
@ -25,3 +28,5 @@ namespace mergerfs
size_t count);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __INIT_HPP__
#define __INIT_HPP__
namespace mergerfs
{
namespace fuse
@ -22,3 +25,5 @@ namespace mergerfs
init(fuse_conn_info *conn);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __IOCTL_HPP__
#define __IOCTL_HPP__
namespace mergerfs
{
namespace fuse
@ -27,3 +30,5 @@ namespace mergerfs
void *data);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __LINK_HPP__
#define __LINK_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
const char *to);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __LISTXATTR_HPP__
#define __LISTXATTR_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +27,5 @@ namespace mergerfs
size_t count);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MKDIR_HPP__
#define __MKDIR_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
mode_t mode);
}
}
#endif

View File

@ -1,3 +1,4 @@
/*
Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link>
@ -14,6 +15,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MKNOD_HPP__
#define __MKNOD_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +28,5 @@ namespace mergerfs
dev_t rdev);
}
}
#endif

View File

@ -14,11 +14,16 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdint.h>
#ifndef __NUM_HPP__
#define __NUM_HPP__
#include <string>
#include <stdint.h>
namespace num
{
int to_uint64_t(const std::string &str, uint64_t &value);
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __OPEN_HPP__
#define __OPEN_HPP__
#include <fuse.h>
namespace mergerfs
@ -25,3 +28,5 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __OPENDIR_HPP__
#define __OPENDIR_HPP__
#include <vector>
namespace mergerfs
@ -25,3 +28,5 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __OPTION_PARSER_HPP__
#define __OPTION_PARSER_HPP__
#include <fuse.h>
#include "config.hpp"
@ -27,3 +30,5 @@ namespace mergerfs
Config &config);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __READ_HPP__
#define __READ_HPP__
namespace mergerfs
{
namespace fuse
@ -33,3 +36,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,14 +14,14 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MERGERFS_READDIR_HPP__
#define __MERGERFS_READDIR_HPP__
#include <fuse.h>
#ifndef __READDIR_HPP__
#define __READDIR_HPP__
#include <string>
#include <vector>
#include <fuse.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __READLINK_HPP__
#define __READLINK_HPP__
namespace mergerfs
{
namespace fuse
@ -24,3 +27,5 @@ namespace mergerfs
size_t size);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RELEASE_HPP__
#define __RELEASE_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RELEASEDIR_HPP__
#define __RELEASEDIR_HPP__
#include <fuse.h>
namespace mergerfs
@ -25,3 +28,5 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __REMOVEXATTR_HPP__
#define __REMOVEXATTR_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
const char *attrname);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RENAME_HPP__
#define __RENAME_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
const char *to);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RESOURCES_HPP__
#define __RESOURCES_HPP__
namespace mergerfs
{
namespace resources
@ -25,3 +28,5 @@ namespace mergerfs
int setpriority(const int prio);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RMDIR_HPP__
#define __RMDIR_HPP__
namespace mergerfs
{
namespace fuse
@ -22,3 +25,5 @@ namespace mergerfs
rmdir(const char *fusepath);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RWLOCK_HPP__
#define __RWLOCK_HPP__
#include <pthread.h>
namespace mergerfs
@ -63,3 +66,5 @@ namespace mergerfs
};
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __SETXATTR_HPP__
#define __SETXATTR_HPP__
namespace mergerfs
{
namespace fuse
@ -26,3 +29,5 @@ namespace mergerfs
int flags);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __STATFS_HPP__
#define __STATFS_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
struct statvfs *fsstat);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __STATVFS_UTIL_HPP__
#define __STATVFS_UTIL_HPP__
#include <string>
#include <sys/statvfs.h>
@ -46,3 +49,5 @@ namespace StatVFS
return (st.f_frsize * (st.f_blocks - st.f_bavail));
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __STR_HPP__
#define __STR_HPP__
#include <string>
#include <vector>
@ -55,3 +58,5 @@ namespace str
isprefix(const std::string &s0,
const std::string &s1);
}
#endif

View File

@ -14,7 +14,8 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MERGERFS_SUCCESS_FAIL_HPP__
#ifndef __SUCCESS_FAIL_HPP__
#define __SUCCESS_FAIL_HPP__
#define STATVFS_SUCCESS 0
#define STATVFS_SUCCEEDED(RV) ((RV) == STATVFS_SUCCESS)
@ -42,4 +43,4 @@
#define RENAME_FAILED(RV) ((RV) == RENAME_FAIL)
#define RENAME_FAILED_WITH(RV,ERRNO) (((RV) == RENAME_FAIL) && (errno == ERRNO))
#endif /*__MERGERFS_SUCCESS_FAIL_HPP__ */
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __SYMLINK_HPP__
#define __SYMLINK_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
const char *newpath);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __TRUNCATE_HPP__
#define __TRUNCATE_HPP__
#include <sys/types.h>
namespace mergerfs
@ -25,3 +28,5 @@ namespace mergerfs
off_t size);
}
}
#endif

View File

@ -37,4 +37,4 @@ namespace mergerfs
#include "ugid_rwlock.hpp"
#endif
#endif /* __UGID_HPP__ */
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __UGID_LINUX_HPP__
#define __UGID_LINUX_HPP__
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
@ -87,3 +90,5 @@ namespace mergerfs
};
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __UGID_RWLOCK_HPP__
#define __UGID_RWLOCK_HPP__
#include <pthread.h>
#include <sys/stat.h>
#include <sys/types.h>
@ -97,3 +100,5 @@ namespace mergerfs
};
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __UNLINK_HPP__
#define __UNLINK_HPP__
namespace mergerfs
{
namespace fuse
@ -22,3 +25,5 @@ namespace mergerfs
unlink(const char *fusepath);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __UTIMENS_HPP__
#define __UTIMENS_HPP__
namespace mergerfs
{
namespace fuse
@ -23,3 +26,5 @@ namespace mergerfs
const timespec ts[2]);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __WRITE_HPP__
#define __WRITE_HPP__
namespace mergerfs
{
namespace fuse
@ -33,3 +36,5 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,6 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __XATTR_HPP__
#define __XATTR_HPP__
#ifndef WITHOUT_XATTR
#include <attr/xattr.h>
#endif
@ -25,3 +28,5 @@
#ifndef XATTR_REPLACE
# define XATTR_REPLACE 0x2
#endif
#endif