use pragma once in headers

This commit is contained in:
Antonio SJ Musumeci 2017-06-30 11:15:20 -04:00
parent d66774d3f3
commit a7b126cb48
118 changed files with 128 additions and 472 deletions

View File

@ -92,10 +92,8 @@ authors:
src/version.hpp:
$(eval VERSION := $(shell $(GIT) describe --always --tags --dirty))
@echo "#ifndef _VERSION_HPP" > src/version.hpp
@echo "#define _VERSION_HPP" >> src/version.hpp
@echo "#pragma once" > src/version.hpp
@echo "static const char MERGERFS_VERSION[] = \"$(VERSION)\";" >> src/version.hpp
@echo "#endif" >> src/version.hpp
obj/obj-stamp:
$(MKDIR) -p obj

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __ACCESS_HPP__
#define __ACCESS_HPP__
#pragma once
namespace mergerfs
{
@ -26,5 +25,3 @@ namespace mergerfs
int mask);
}
}
#endif

View File

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

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __BUILDVECTOR_HPP__
#define __BUILDVECTOR_HPP__
#pragma once
#include <algorithm>
@ -44,5 +43,3 @@ public:
private:
std::vector<V> _vector;
};
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CATEGORY_HPP__
#define __CATEGORY_HPP__
#pragma once
#include <string>
#include <vector>
@ -86,5 +85,3 @@ namespace mergerfs
static const Category &search;
};
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CHMOD_HPP__
#define __CHMOD_HPP__
#pragma once
namespace mergerfs
{
@ -26,5 +25,3 @@ namespace mergerfs
mode_t mode);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CHOWN_HPP__
#define __CHOWN_HPP__
#pragma once
namespace mergerfs
{
@ -27,5 +26,3 @@ namespace mergerfs
gid_t gid);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CONFIG_HPP__
#define __CONFIG_HPP__
#pragma once
#include <fuse.h>
@ -106,5 +105,3 @@ namespace mergerfs
}
};
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __CREATE_HPP__
#define __CREATE_HPP__
#pragma once
#include <fuse.h>
@ -31,5 +30,3 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __DESTROY_HPP__
#define __DESTROY_HPP__
#pragma once
namespace mergerfs
{
@ -25,5 +24,3 @@ namespace mergerfs
destroy(void *);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __DIRINFO_HPP__
#define __DIRINFO_HPP__
#pragma once
#include <string>
@ -30,5 +29,3 @@ public:
public:
std::string fusepath;
};
#endif

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FALLOCATE_HPP__
#define __FALLOCATE_HPP__
#pragma once
namespace mergerfs
{
@ -29,5 +28,3 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FILEINFO_HPP__
#define __FILEINFO_HPP__
#pragma once
#include <string>
@ -33,5 +32,3 @@ public:
int fd;
std::string fusepath;
};
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FLOCK_HPP__
#define __FLOCK_HPP__
#pragma once
namespace mergerfs
{
@ -27,5 +26,3 @@ namespace mergerfs
int op);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FLUSH_HPP__
#define __FLUSH_HPP__
#pragma once
namespace mergerfs
{
@ -26,5 +25,3 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_HPP__
#define __FS_HPP__
#pragma once
#include <string>
#include <vector>
@ -67,5 +66,3 @@ namespace fs
const uint64_t minfreespace,
string &path);
};
#endif // __FS_HPP__

View File

@ -16,6 +16,8 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
#include <string>
namespace fs

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_ATTR_HPP__
#define __FS_ATTR_HPP__
#pragma once
#include <string>
@ -31,5 +30,3 @@ namespace fs
const string &to);
}
}
#endif // __FS_ATTR_HPP__

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CHMOD_HPP__
#define __FS_BASE_CHMOD_HPP__
#pragma once
#include <sys/stat.h>
@ -106,5 +105,3 @@ namespace fs
return 0;
}
}
#endif

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_CHOWN_HPP__
#define __FS_BASE_CHOWN_HPP__
#pragma once
#include <string>
@ -140,5 +139,3 @@ namespace fs
return 0;
}
}
#endif

View File

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

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_DIRFD_HPP__
#define __FS_DIRFD_HPP__
#pragma once
#include <dirent.h>
#include <sys/types.h>
@ -32,5 +31,3 @@ namespace fs
return ::dirfd(dirp);
}
}
#endif

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_FADVISE_HPP__
#define __FS_BASE_FADVISE_HPP__
#pragma once
namespace fs
{
@ -34,5 +33,3 @@ namespace fs
const off_t offset = 0,
const off_t len = 0);
}
#endif // __FS_FADVISE_HPP__

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_FALLOCATE_HPP__
#define __FS_BASE_FALLOCATE_HPP__
#pragma once
#include <fcntl.h>
@ -27,5 +26,3 @@ namespace fs
const off_t offset,
const off_t len);
}
#endif

View File

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

View File

@ -16,17 +16,16 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_FSYNC_HPP__
#define __FS_BASE_FSYNC_HPP__
#pragma once
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <unistd.h>
#include "errno.hpp"
#include <unistd.h>
namespace fs
{
static
@ -49,5 +48,3 @@ namespace fs
#endif
}
}
#endif

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_FUTIMESAT_HPP__
#define __FS_BASE_FUTIMESAT_HPP__
#pragma once
namespace fs
{
@ -26,5 +25,3 @@ namespace fs
const char *pathname,
const struct timeval times[2]);
}
#endif

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_GETXATTR_HPP__
#define __FS_BASE_GETXATTR_HPP__
#pragma once
#include <sys/types.h>
@ -41,5 +40,3 @@ namespace fs
#endif
}
}
#endif

View File

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

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_LISTXATTR_HPP__
#define __FS_BASE_LISTXATTR_HPP__
#pragma once
#include <sys/types.h>
@ -40,5 +39,3 @@ namespace fs
#endif
}
}
#endif

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_MKDIR_HPP__
#define __FS_BASE_MKDIR_HPP__
#pragma once
#include <string>
@ -35,5 +34,3 @@ namespace fs
return ::mkdir(path.c_str(),mode);
}
}
#endif

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_MKSTEMP_HPP__
#define __FS_BASE_MKSTEMP_HPP__
#pragma once
#include <stdlib.h>
#include <string.h>
@ -46,5 +45,3 @@ namespace fs
return fd;
}
}
#endif

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_REMOVEXATTR_HPP__
#define __FS_BASE_REMOVEXATTR_HPP__
#pragma once
#include <sys/types.h>
@ -39,5 +38,3 @@ namespace fs
#endif
}
}
#endif

View File

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

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_SETXATTR_HPP__
#define __FS_BASE_SETXATTR_HPP__
#pragma once
#include <sys/types.h>
@ -42,5 +41,3 @@ namespace fs
#endif
}
}
#endif

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_STAT_HPP__
#define __FS_BASE_STAT_HPP__
#pragma once
#include <string>
@ -113,5 +112,3 @@ namespace fs
#endif
}
}
#endif

View File

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

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_TRUNCATE_HPP__
#define __FS_BASE_TRUNCATE_HPP__
#pragma once
#include <string>
@ -35,5 +34,3 @@ namespace fs
return ::truncate(path.c_str(),length);
}
}
#endif

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UTIME_HPP__
#define __FS_BASE_UTIME_HPP__
#pragma once
#ifdef __linux__
# include "fs_base_utime_utimensat.hpp"
@ -66,5 +65,3 @@ namespace fs
return fs::utime(AT_FDCWD,path,times,AT_SYMLINK_NOFOLLOW);
}
}
#endif

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_BASE_UTIME_GENERIC_HPP__
#define __FS_BASE_UTIME_GENERIC_HPP__
#pragma once
#include <string>
@ -312,5 +311,3 @@ namespace fs
return ::futimes(fd,tvp);
}
}
#endif

View File

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

View File

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

View File

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

View File

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

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_DEVID_HPP__
#define __FS_DEVID_HPP__
#pragma once
#include <sys/stat.h>
#include <sys/types.h>
@ -40,5 +39,3 @@ namespace fs
return st.st_dev;
}
}
#endif

View File

@ -16,8 +16,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_INODE_HPP__
#define __FS_INODE_HPP__
#pragma once
#include <stdint.h>
#include <sys/stat.h>
@ -35,7 +34,7 @@ namespace fs
void
recompute(struct stat &st)
{
// not ideal to do this at runtime but usually gets optimized out
// not ideal to do this at runtime but likely gets optimized out
if(sizeof(st.st_ino) == 4)
st.st_ino |= ((uint32_t)st.st_dev << 16);
else
@ -43,5 +42,3 @@ namespace fs
}
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_MOVEFILE_HPP__
#define __FS_MOVEFILE_HPP__
#pragma once
#include <string>
#include <vector>
@ -28,5 +27,3 @@ namespace fs
const size_t additional_size,
int &origfd);
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_PATH_HPP__
#define __FS_PATH_HPP__
#pragma once
#include <string>
#include <vector>
@ -67,5 +66,3 @@ namespace fs
}
}
};
#endif // __FS_PATH_HPP__

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_SENDFILE_HPP__
#define __FS_SENDFILE_HPP__
#pragma once
namespace fs
{
@ -24,5 +23,3 @@ namespace fs
const int fdout,
const size_t count);
}
#endif // __FS_SENDFILE_HPP__

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FS_XATTR_HPP__
#define __FS_XATTR_HPP__
#pragma once
#include <string>
#include <vector>
@ -65,5 +64,3 @@ namespace fs
const string &to);
}
}
#endif // __FS_HPP__

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FSYNCDIR_HPP__
#define __FSYNCDIR_HPP__
#pragma once
#include <fuse.h>
@ -29,5 +28,3 @@ namespace mergerfs
fuse_file_info *ffi);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FTRUNCATE_HPP__
#define __FTRUNCATE_HPP__
#pragma once
#include <fuse.h>
@ -32,5 +31,3 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __FUSEFUNC_HPP__
#define __FUSEFUNC_HPP__
#pragma once
#include <string>
#include <vector>
@ -127,5 +126,3 @@ namespace mergerfs
static const FuseFunc &utimens;
};
}
#endif

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __GETXATTR_HPP__
#define __GETXATTR_HPP__
#pragma once
namespace mergerfs
{
@ -28,5 +27,3 @@ namespace mergerfs
size_t count);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __GIDCACHE_HPP__
#define __GIDCACHE_HPP__
#pragma once
#include <sys/types.h>
#include <unistd.h>
@ -54,5 +53,3 @@ public:
initgroups(const uid_t uid,
const gid_t gid);
};
#endif

View File

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

View File

@ -14,8 +14,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __IOCTL_HPP__
#define __IOCTL_HPP__
#pragma once
#include <fuse.h>
namespace mergerfs
{
@ -30,5 +31,3 @@ namespace mergerfs
void *data);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __LINK_HPP__
#define __LINK_HPP__
#pragma once
namespace mergerfs
{
@ -26,5 +25,3 @@ namespace mergerfs
const char *to);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __LISTXATTR_HPP__
#define __LISTXATTR_HPP__
#pragma once
namespace mergerfs
{
@ -27,5 +26,3 @@ namespace mergerfs
size_t count);
}
}
#endif

View File

@ -14,7 +14,4 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MERGER_HPP__
#define __MERGER_HPP__
#endif
#pragma once

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MKDIR_HPP__
#define __MKDIR_HPP__
#pragma once
namespace mergerfs
{
@ -26,5 +25,3 @@ namespace mergerfs
mode_t mode);
}
}
#endif

View File

@ -15,8 +15,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __MKNOD_HPP__
#define __MKNOD_HPP__
#pragma once
namespace mergerfs
{
@ -28,5 +27,3 @@ namespace mergerfs
dev_t rdev);
}
}
#endif

View File

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

View File

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

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __OPTION_PARSER_HPP__
#define __OPTION_PARSER_HPP__
#pragma once
#include <fuse.h>
@ -30,5 +29,3 @@ namespace mergerfs
Config &config);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __POLICY_HPP__
#define __POLICY_HPP__
#pragma once
#include <string>
#include <vector>
@ -190,5 +189,3 @@ namespace mergerfs
static const Policy &rand;
};
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __READ_HPP__
#define __READ_HPP__
#pragma once
namespace mergerfs
{
@ -43,5 +42,3 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __READ_BUF_HPP__
#define __READ_BUF_HPP__
#pragma once
#include <fuse.h>
@ -33,5 +32,3 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __READDIR_HPP__
#define __READDIR_HPP__
#pragma once
#include <string>
#include <vector>
@ -38,5 +37,3 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __READLINK_HPP__
#define __READLINK_HPP__
#pragma once
namespace mergerfs
{
@ -27,5 +26,3 @@ namespace mergerfs
size_t size);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RELEASE_HPP__
#define __RELEASE_HPP__
#pragma once
namespace mergerfs
{
@ -26,5 +25,3 @@ namespace mergerfs
fuse_file_info *fi);
}
}
#endif

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __REMOVEXATTR_HPP__
#define __REMOVEXATTR_HPP__
#pragma once
namespace mergerfs
{
@ -26,5 +25,3 @@ namespace mergerfs
const char *attrname);
}
}
#endif

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RENAME_HPP__
#define __RENAME_HPP__
#pragma once
namespace mergerfs
{
@ -26,5 +25,3 @@ namespace mergerfs
const char *to);
}
}
#endif

View File

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

View File

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

View File

@ -14,8 +14,7 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __RV_HPP__
#define __RV_HPP__
#pragma once
namespace error
{
@ -36,5 +35,3 @@ namespace error
return 0;
}
}
#endif // __RV_HPP__

Some files were not shown because too many files have changed in this diff Show More