diff --git a/Makefile b/Makefile index 143eaffd..2e7c8aa8 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/src/access.hpp b/src/access.hpp index 1de24ee4..64e568b6 100644 --- a/src/access.hpp +++ b/src/access.hpp @@ -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 diff --git a/src/assert.hpp b/src/assert.hpp index 20997a30..3945ed19 100644 --- a/src/assert.hpp +++ b/src/assert.hpp @@ -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 {}; } - -#endif diff --git a/src/buildmap.hpp b/src/buildmap.hpp index 22293970..87a57d7f 100644 --- a/src/buildmap.hpp +++ b/src/buildmap.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __BUILDMAP_HPP__ -#define __BUILDMAP_HPP__ +#pragma once #include @@ -44,5 +43,3 @@ public: private: std::map _map; }; - -#endif diff --git a/src/buildvector.hpp b/src/buildvector.hpp index 50d028fc..bb2ff50d 100644 --- a/src/buildvector.hpp +++ b/src/buildvector.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __BUILDVECTOR_HPP__ -#define __BUILDVECTOR_HPP__ +#pragma once #include @@ -44,5 +43,3 @@ public: private: std::vector _vector; }; - -#endif diff --git a/src/category.hpp b/src/category.hpp index e36c5b6b..4c5644d1 100644 --- a/src/category.hpp +++ b/src/category.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __CATEGORY_HPP__ -#define __CATEGORY_HPP__ +#pragma once #include #include @@ -86,5 +85,3 @@ namespace mergerfs static const Category &search; }; } - -#endif diff --git a/src/chmod.hpp b/src/chmod.hpp index 84c920f0..e413abe3 100644 --- a/src/chmod.hpp +++ b/src/chmod.hpp @@ -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 diff --git a/src/chown.hpp b/src/chown.hpp index 2bdddf04..4b56c31b 100644 --- a/src/chown.hpp +++ b/src/chown.hpp @@ -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 diff --git a/src/config.hpp b/src/config.hpp index ef194f08..c8ae3daf 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __CONFIG_HPP__ -#define __CONFIG_HPP__ +#pragma once #include @@ -106,5 +105,3 @@ namespace mergerfs } }; } - -#endif diff --git a/src/create.hpp b/src/create.hpp index 2e509458..6935c692 100644 --- a/src/create.hpp +++ b/src/create.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __CREATE_HPP__ -#define __CREATE_HPP__ +#pragma once #include @@ -31,5 +30,3 @@ namespace mergerfs fuse_file_info *ffi); } } - -#endif diff --git a/src/destroy.hpp b/src/destroy.hpp index bd78427c..5b9727f5 100644 --- a/src/destroy.hpp +++ b/src/destroy.hpp @@ -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 diff --git a/src/dirinfo.hpp b/src/dirinfo.hpp index 007aa094..753b9393 100644 --- a/src/dirinfo.hpp +++ b/src/dirinfo.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __DIRINFO_HPP__ -#define __DIRINFO_HPP__ +#pragma once #include @@ -30,5 +29,3 @@ public: public: std::string fusepath; }; - -#endif diff --git a/src/errno.hpp b/src/errno.hpp index 9178b9d4..96be9595 100644 --- a/src/errno.hpp +++ b/src/errno.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __ERRNO_HPP__ -#define __ERRNO_HPP__ +#pragma once #include @@ -30,5 +29,3 @@ #if !defined(ENOATTR) && !defined(ENODATA) #error "Neither ENOATTR or ENODATA defined: please contact mergerfs author with platform information" #endif - -#endif diff --git a/src/fallocate.hpp b/src/fallocate.hpp index 743df140..4720c810 100644 --- a/src/fallocate.hpp +++ b/src/fallocate.hpp @@ -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 diff --git a/src/fgetattr.hpp b/src/fgetattr.hpp index f50e8463..1fc6b7e4 100644 --- a/src/fgetattr.hpp +++ b/src/fgetattr.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __FGETATTR_HPP__ -#define __FGETATTR_HPP__ +#pragma once #include #include @@ -31,5 +30,3 @@ namespace mergerfs fuse_file_info *fileinfo); } } - -#endif diff --git a/src/fileinfo.hpp b/src/fileinfo.hpp index b42f1c4b..4f4ed29d 100644 --- a/src/fileinfo.hpp +++ b/src/fileinfo.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __FILEINFO_HPP__ -#define __FILEINFO_HPP__ +#pragma once #include @@ -33,5 +32,3 @@ public: int fd; std::string fusepath; }; - -#endif diff --git a/src/flock.hpp b/src/flock.hpp index 1adaa461..868fb20b 100644 --- a/src/flock.hpp +++ b/src/flock.hpp @@ -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 diff --git a/src/flush.hpp b/src/flush.hpp index ef284486..84d37ead 100644 --- a/src/flush.hpp +++ b/src/flush.hpp @@ -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 diff --git a/src/fs.hpp b/src/fs.hpp index 89bda70a..a5926b67 100644 --- a/src/fs.hpp +++ b/src/fs.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __FS_HPP__ -#define __FS_HPP__ +#pragma once #include #include @@ -67,5 +66,3 @@ namespace fs const uint64_t minfreespace, string &path); }; - -#endif // __FS_HPP__ diff --git a/src/fs_acl.hpp b/src/fs_acl.hpp index d0a43174..f3b16e43 100644 --- a/src/fs_acl.hpp +++ b/src/fs_acl.hpp @@ -16,6 +16,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#pragma once + #include namespace fs diff --git a/src/fs_attr.hpp b/src/fs_attr.hpp index fb57033c..06210413 100644 --- a/src/fs_attr.hpp +++ b/src/fs_attr.hpp @@ -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 @@ -31,5 +30,3 @@ namespace fs const string &to); } } - -#endif // __FS_ATTR_HPP__ diff --git a/src/fs_base_access.hpp b/src/fs_base_access.hpp index f8b4defd..c11b25a8 100644 --- a/src/fs_base_access.hpp +++ b/src/fs_base_access.hpp @@ -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 @@ -56,5 +55,3 @@ namespace fs return fs::access(path,mode,AT_EACCESS); } } - -#endif diff --git a/src/fs_base_chmod.hpp b/src/fs_base_chmod.hpp index 2334def1..bab2cb4a 100644 --- a/src/fs_base_chmod.hpp +++ b/src/fs_base_chmod.hpp @@ -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 @@ -106,5 +105,3 @@ namespace fs return 0; } } - -#endif diff --git a/src/fs_base_chown.hpp b/src/fs_base_chown.hpp index a17fb60b..57ae30f8 100644 --- a/src/fs_base_chown.hpp +++ b/src/fs_base_chown.hpp @@ -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 @@ -140,5 +139,3 @@ namespace fs return 0; } } - -#endif diff --git a/src/fs_base_close.hpp b/src/fs_base_close.hpp index 7a7245a6..4d904907 100644 --- a/src/fs_base_close.hpp +++ b/src/fs_base_close.hpp @@ -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 @@ -31,5 +30,3 @@ namespace fs return ::close(fd); } } - -#endif diff --git a/src/fs_base_closedir.hpp b/src/fs_base_closedir.hpp index 6969c644..d5d9c46d 100644 --- a/src/fs_base_closedir.hpp +++ b/src/fs_base_closedir.hpp @@ -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 #include @@ -32,5 +31,3 @@ namespace fs return ::closedir(dirp); } } - -#endif diff --git a/src/fs_base_dirfd.hpp b/src/fs_base_dirfd.hpp index 06846fcf..293b2868 100644 --- a/src/fs_base_dirfd.hpp +++ b/src/fs_base_dirfd.hpp @@ -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 #include @@ -32,5 +31,3 @@ namespace fs return ::dirfd(dirp); } } - -#endif diff --git a/src/fs_base_dup.hpp b/src/fs_base_dup.hpp index 4b5d83c7..6cafbba9 100644 --- a/src/fs_base_dup.hpp +++ b/src/fs_base_dup.hpp @@ -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 @@ -31,5 +30,3 @@ namespace fs return ::dup(fd); } } - -#endif diff --git a/src/fs_base_fadvise.hpp b/src/fs_base_fadvise.hpp index ce9fc605..56335082 100644 --- a/src/fs_base_fadvise.hpp +++ b/src/fs_base_fadvise.hpp @@ -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__ diff --git a/src/fs_base_fallocate.hpp b/src/fs_base_fallocate.hpp index 2239ae4d..d6691472 100644 --- a/src/fs_base_fallocate.hpp +++ b/src/fs_base_fallocate.hpp @@ -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 @@ -27,5 +26,3 @@ namespace fs const off_t offset, const off_t len); } - -#endif diff --git a/src/fs_base_flock.hpp b/src/fs_base_flock.hpp index 6fb7a906..d7059e3b 100644 --- a/src/fs_base_flock.hpp +++ b/src/fs_base_flock.hpp @@ -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 @@ -32,5 +31,3 @@ namespace fs return ::flock(fd,operation); } } - -#endif diff --git a/src/fs_base_fsync.hpp b/src/fs_base_fsync.hpp index 4a7800ee..f4fe224b 100644 --- a/src/fs_base_fsync.hpp +++ b/src/fs_base_fsync.hpp @@ -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 - #include "errno.hpp" +#include + namespace fs { static @@ -49,5 +48,3 @@ namespace fs #endif } } - -#endif diff --git a/src/fs_base_ftruncate.hpp b/src/fs_base_ftruncate.hpp index 3ab3a72b..e204f4b7 100644 --- a/src/fs_base_ftruncate.hpp +++ b/src/fs_base_ftruncate.hpp @@ -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 #include @@ -33,5 +32,3 @@ namespace fs return ::ftruncate(fd,size); } } - -#endif diff --git a/src/fs_base_futimesat.hpp b/src/fs_base_futimesat.hpp index 20f0938a..e5c4bfdc 100644 --- a/src/fs_base_futimesat.hpp +++ b/src/fs_base_futimesat.hpp @@ -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 diff --git a/src/fs_base_getxattr.hpp b/src/fs_base_getxattr.hpp index cc3e26da..ebc67cdf 100644 --- a/src/fs_base_getxattr.hpp +++ b/src/fs_base_getxattr.hpp @@ -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 @@ -41,5 +40,3 @@ namespace fs #endif } } - -#endif diff --git a/src/fs_base_ioctl.hpp b/src/fs_base_ioctl.hpp index 980378b6..0fe1e188 100644 --- a/src/fs_base_ioctl.hpp +++ b/src/fs_base_ioctl.hpp @@ -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 @@ -33,5 +32,3 @@ namespace fs return ::ioctl(fd,request,data); } } - -#endif diff --git a/src/fs_base_link.hpp b/src/fs_base_link.hpp index c5fdff36..c733c4b8 100644 --- a/src/fs_base_link.hpp +++ b/src/fs_base_link.hpp @@ -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 @@ -34,5 +33,3 @@ namespace fs return ::link(oldpath.c_str(),newpath.c_str()); } } - -#endif diff --git a/src/fs_base_listxattr.hpp b/src/fs_base_listxattr.hpp index cbb2bbce..196dc703 100644 --- a/src/fs_base_listxattr.hpp +++ b/src/fs_base_listxattr.hpp @@ -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 @@ -40,5 +39,3 @@ namespace fs #endif } } - -#endif diff --git a/src/fs_base_lseek.hpp b/src/fs_base_lseek.hpp index eee9f152..94bdeb6e 100644 --- a/src/fs_base_lseek.hpp +++ b/src/fs_base_lseek.hpp @@ -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 #include @@ -34,5 +33,3 @@ namespace fs return ::lseek(fd,offset,whence); } } - -#endif diff --git a/src/fs_base_mkdir.hpp b/src/fs_base_mkdir.hpp index e3794520..b7237c40 100644 --- a/src/fs_base_mkdir.hpp +++ b/src/fs_base_mkdir.hpp @@ -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 @@ -35,5 +34,3 @@ namespace fs return ::mkdir(path.c_str(),mode); } } - -#endif diff --git a/src/fs_base_mknod.hpp b/src/fs_base_mknod.hpp index f39506aa..b80c9c27 100644 --- a/src/fs_base_mknod.hpp +++ b/src/fs_base_mknod.hpp @@ -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 #include @@ -36,5 +35,3 @@ namespace fs return ::mknod(path.c_str(),mode,dev); } } - -#endif diff --git a/src/fs_base_mkstemp.hpp b/src/fs_base_mkstemp.hpp index dcfa42a1..f4638266 100644 --- a/src/fs_base_mkstemp.hpp +++ b/src/fs_base_mkstemp.hpp @@ -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 #include @@ -46,5 +45,3 @@ namespace fs return fd; } } - -#endif diff --git a/src/fs_base_open.hpp b/src/fs_base_open.hpp index 38ffd56c..8a0a1de3 100644 --- a/src/fs_base_open.hpp +++ b/src/fs_base_open.hpp @@ -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 @@ -46,5 +45,3 @@ namespace fs return ::open(path.c_str(),flags,mode); } } - -#endif diff --git a/src/fs_base_opendir.hpp b/src/fs_base_opendir.hpp index 96dd735e..851463f6 100644 --- a/src/fs_base_opendir.hpp +++ b/src/fs_base_opendir.hpp @@ -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 @@ -34,5 +33,3 @@ namespace fs return ::opendir(name.c_str()); } } - -#endif diff --git a/src/fs_base_read.hpp b/src/fs_base_read.hpp index 5b7f3df0..c634b85a 100644 --- a/src/fs_base_read.hpp +++ b/src/fs_base_read.hpp @@ -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 @@ -44,5 +43,3 @@ namespace fs return ::pread(fd,buf,count,offset); } } - -#endif diff --git a/src/fs_base_readdir.hpp b/src/fs_base_readdir.hpp index 1fa956fa..b913d62e 100644 --- a/src/fs_base_readdir.hpp +++ b/src/fs_base_readdir.hpp @@ -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 @@ -31,5 +30,3 @@ namespace fs return ::readdir(dirp); } } - -#endif diff --git a/src/fs_base_readlink.hpp b/src/fs_base_readlink.hpp index efe7fa47..6c589b49 100644 --- a/src/fs_base_readlink.hpp +++ b/src/fs_base_readlink.hpp @@ -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 @@ -35,5 +34,3 @@ namespace fs return ::readlink(path.c_str(),buf,bufsiz); } } - -#endif diff --git a/src/fs_base_realpath.hpp b/src/fs_base_realpath.hpp index 0a51e055..16edeee8 100644 --- a/src/fs_base_realpath.hpp +++ b/src/fs_base_realpath.hpp @@ -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 @@ -43,5 +42,3 @@ namespace fs return fs::realpath(path,NULL); } } - -#endif diff --git a/src/fs_base_remove.hpp b/src/fs_base_remove.hpp index 3109d2a7..bed37c4c 100644 --- a/src/fs_base_remove.hpp +++ b/src/fs_base_remove.hpp @@ -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 @@ -33,5 +32,3 @@ namespace fs return ::remove(pathname.c_str()); } } - -#endif diff --git a/src/fs_base_removexattr.hpp b/src/fs_base_removexattr.hpp index 71b9c27a..39254229 100644 --- a/src/fs_base_removexattr.hpp +++ b/src/fs_base_removexattr.hpp @@ -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 @@ -39,5 +38,3 @@ namespace fs #endif } } - -#endif diff --git a/src/fs_base_rename.hpp b/src/fs_base_rename.hpp index c1f59cad..b218efea 100644 --- a/src/fs_base_rename.hpp +++ b/src/fs_base_rename.hpp @@ -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 @@ -32,5 +31,3 @@ namespace fs return ::rename(oldpath.c_str(),newpath.c_str()); } } - -#endif diff --git a/src/fs_base_rmdir.hpp b/src/fs_base_rmdir.hpp index 64b0ba27..3d9c02f2 100644 --- a/src/fs_base_rmdir.hpp +++ b/src/fs_base_rmdir.hpp @@ -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 @@ -33,5 +32,3 @@ namespace fs return ::rmdir(path.c_str()); } } - -#endif diff --git a/src/fs_base_setxattr.hpp b/src/fs_base_setxattr.hpp index db7851e4..ebac9070 100644 --- a/src/fs_base_setxattr.hpp +++ b/src/fs_base_setxattr.hpp @@ -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 @@ -42,5 +41,3 @@ namespace fs #endif } } - -#endif diff --git a/src/fs_base_stat.hpp b/src/fs_base_stat.hpp index 69632739..bbf1406c 100644 --- a/src/fs_base_stat.hpp +++ b/src/fs_base_stat.hpp @@ -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 @@ -113,5 +112,3 @@ namespace fs #endif } } - -#endif diff --git a/src/fs_base_statvfs.hpp b/src/fs_base_statvfs.hpp index 253e4144..14d7dcde 100644 --- a/src/fs_base_statvfs.hpp +++ b/src/fs_base_statvfs.hpp @@ -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 @@ -43,5 +42,3 @@ namespace fs return fs::statvfs(path.c_str(),st); } } - -#endif diff --git a/src/fs_base_symlink.hpp b/src/fs_base_symlink.hpp index df9e3d77..0f88926f 100644 --- a/src/fs_base_symlink.hpp +++ b/src/fs_base_symlink.hpp @@ -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 @@ -43,5 +42,3 @@ namespace fs return ::symlink(oldpath,newpath.c_str()); } } - -#endif diff --git a/src/fs_base_truncate.hpp b/src/fs_base_truncate.hpp index 8adb963d..aa7148a2 100644 --- a/src/fs_base_truncate.hpp +++ b/src/fs_base_truncate.hpp @@ -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 @@ -35,5 +34,3 @@ namespace fs return ::truncate(path.c_str(),length); } } - -#endif diff --git a/src/fs_base_unlink.hpp b/src/fs_base_unlink.hpp index c1be8b46..a3b2d72a 100644 --- a/src/fs_base_unlink.hpp +++ b/src/fs_base_unlink.hpp @@ -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 @@ -33,5 +32,3 @@ namespace fs return ::unlink(path.c_str()); } } - -#endif diff --git a/src/fs_base_utime.hpp b/src/fs_base_utime.hpp index 2def8d5c..8ab6f46b 100644 --- a/src/fs_base_utime.hpp +++ b/src/fs_base_utime.hpp @@ -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 diff --git a/src/fs_base_utime_generic.hpp b/src/fs_base_utime_generic.hpp index c49169ad..cdd90a14 100644 --- a/src/fs_base_utime_generic.hpp +++ b/src/fs_base_utime_generic.hpp @@ -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 @@ -312,5 +311,3 @@ namespace fs return ::futimes(fd,tvp); } } - -#endif diff --git a/src/fs_base_utime_utimensat.hpp b/src/fs_base_utime_utimensat.hpp index c9aafec0..7cb7000b 100644 --- a/src/fs_base_utime_utimensat.hpp +++ b/src/fs_base_utime_utimensat.hpp @@ -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 @@ -46,5 +45,3 @@ namespace fs return ::futimens(fd,times); } } - -#endif diff --git a/src/fs_base_write.hpp b/src/fs_base_write.hpp index a113b6b1..d5463205 100644 --- a/src/fs_base_write.hpp +++ b/src/fs_base_write.hpp @@ -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 @@ -44,5 +43,3 @@ namespace fs return ::pwrite(fd,buf,count,offset); } } - -#endif diff --git a/src/fs_clonefile.hpp b/src/fs_clonefile.hpp index f0400581..101514db 100644 --- a/src/fs_clonefile.hpp +++ b/src/fs_clonefile.hpp @@ -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 @@ -26,5 +25,3 @@ namespace fs int clonefile(const std::string &from, const std::string &to); } - -#endif diff --git a/src/fs_clonepath.hpp b/src/fs_clonepath.hpp index a3fd335e..be9f4aaa 100644 --- a/src/fs_clonepath.hpp +++ b/src/fs_clonepath.hpp @@ -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 @@ -28,5 +27,3 @@ namespace fs const std::string &to, const std::string &relative); } - -#endif diff --git a/src/fs_devid.hpp b/src/fs_devid.hpp index 2ed8547b..5ab5758f 100644 --- a/src/fs_devid.hpp +++ b/src/fs_devid.hpp @@ -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 #include @@ -40,5 +39,3 @@ namespace fs return st.st_dev; } } - -#endif diff --git a/src/fs_inode.hpp b/src/fs_inode.hpp index 37ef18a7..8d2256cd 100644 --- a/src/fs_inode.hpp +++ b/src/fs_inode.hpp @@ -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 #include @@ -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 diff --git a/src/fs_movefile.hpp b/src/fs_movefile.hpp index b4f4c2f3..69a8c3ab 100644 --- a/src/fs_movefile.hpp +++ b/src/fs_movefile.hpp @@ -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 #include @@ -28,5 +27,3 @@ namespace fs const size_t additional_size, int &origfd); } - -#endif diff --git a/src/fs_path.hpp b/src/fs_path.hpp index 2878f863..a8ef0aab 100644 --- a/src/fs_path.hpp +++ b/src/fs_path.hpp @@ -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 #include @@ -67,5 +66,3 @@ namespace fs } } }; - -#endif // __FS_PATH_HPP__ diff --git a/src/fs_sendfile.hpp b/src/fs_sendfile.hpp index eb814966..54238426 100644 --- a/src/fs_sendfile.hpp +++ b/src/fs_sendfile.hpp @@ -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__ diff --git a/src/fs_xattr.hpp b/src/fs_xattr.hpp index 66d411ab..cff2eacd 100644 --- a/src/fs_xattr.hpp +++ b/src/fs_xattr.hpp @@ -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 #include @@ -65,5 +64,3 @@ namespace fs const string &to); } } - -#endif // __FS_HPP__ diff --git a/src/fsync.hpp b/src/fsync.hpp index 00bec8d1..b59e85e3 100644 --- a/src/fsync.hpp +++ b/src/fsync.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __FSYNC_HPP__ -#define __FSYNC_HPP__ +#pragma once #include @@ -29,5 +28,3 @@ namespace mergerfs fuse_file_info *fi); } } - -#endif diff --git a/src/fsyncdir.hpp b/src/fsyncdir.hpp index 2a0794c2..17fa4cc0 100644 --- a/src/fsyncdir.hpp +++ b/src/fsyncdir.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __FSYNCDIR_HPP__ -#define __FSYNCDIR_HPP__ +#pragma once #include @@ -29,5 +28,3 @@ namespace mergerfs fuse_file_info *ffi); } } - -#endif diff --git a/src/ftruncate.hpp b/src/ftruncate.hpp index 1f0f6d9c..92db5db7 100644 --- a/src/ftruncate.hpp +++ b/src/ftruncate.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __FTRUNCATE_HPP__ -#define __FTRUNCATE_HPP__ +#pragma once #include @@ -32,5 +31,3 @@ namespace mergerfs fuse_file_info *fi); } } - -#endif diff --git a/src/fusefunc.hpp b/src/fusefunc.hpp index 7a05536a..d6190e48 100644 --- a/src/fusefunc.hpp +++ b/src/fusefunc.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __FUSEFUNC_HPP__ -#define __FUSEFUNC_HPP__ +#pragma once #include #include @@ -127,5 +126,3 @@ namespace mergerfs static const FuseFunc &utimens; }; } - -#endif diff --git a/src/getattr.hpp b/src/getattr.hpp index c499f0cf..819bc61c 100644 --- a/src/getattr.hpp +++ b/src/getattr.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __GETATTR_HPP__ -#define __GETATTR_HPP__ +#pragma once #include #include @@ -30,5 +29,3 @@ namespace mergerfs struct stat *buf); } } - -#endif diff --git a/src/getxattr.hpp b/src/getxattr.hpp index aefbf37e..2752e51d 100644 --- a/src/getxattr.hpp +++ b/src/getxattr.hpp @@ -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 diff --git a/src/gidcache.hpp b/src/gidcache.hpp index 1766a293..d4ac8f70 100644 --- a/src/gidcache.hpp +++ b/src/gidcache.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __GIDCACHE_HPP__ -#define __GIDCACHE_HPP__ +#pragma once #include #include @@ -54,5 +53,3 @@ public: initgroups(const uid_t uid, const gid_t gid); }; - -#endif diff --git a/src/init.hpp b/src/init.hpp index 17b3ad8a..64bc0cc3 100644 --- a/src/init.hpp +++ b/src/init.hpp @@ -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 diff --git a/src/ioctl.hpp b/src/ioctl.hpp index 53c8af3c..78cc6506 100644 --- a/src/ioctl.hpp +++ b/src/ioctl.hpp @@ -14,8 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __IOCTL_HPP__ -#define __IOCTL_HPP__ +#pragma once + +#include namespace mergerfs { @@ -30,5 +31,3 @@ namespace mergerfs void *data); } } - -#endif diff --git a/src/link.hpp b/src/link.hpp index 829a0ca3..115c0d7e 100644 --- a/src/link.hpp +++ b/src/link.hpp @@ -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 diff --git a/src/listxattr.hpp b/src/listxattr.hpp index ca540769..58c9156b 100644 --- a/src/listxattr.hpp +++ b/src/listxattr.hpp @@ -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 diff --git a/src/mergerfs.hpp b/src/mergerfs.hpp index 2be4ee41..f1ea00e4 100644 --- a/src/mergerfs.hpp +++ b/src/mergerfs.hpp @@ -14,7 +14,4 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __MERGER_HPP__ -#define __MERGER_HPP__ - -#endif +#pragma once diff --git a/src/mkdir.hpp b/src/mkdir.hpp index 4e85b54e..4837e400 100644 --- a/src/mkdir.hpp +++ b/src/mkdir.hpp @@ -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 diff --git a/src/mknod.hpp b/src/mknod.hpp index aa3ec348..cc7237ff 100644 --- a/src/mknod.hpp +++ b/src/mknod.hpp @@ -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 diff --git a/src/num.hpp b/src/num.hpp index 0d832884..49dcc28b 100644 --- a/src/num.hpp +++ b/src/num.hpp @@ -14,17 +14,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __NUM_HPP__ -#define __NUM_HPP__ - -#include +#pragma once #include +#include + 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 diff --git a/src/open.hpp b/src/open.hpp index 4435aab8..3950e4fc 100644 --- a/src/open.hpp +++ b/src/open.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __OPEN_HPP__ -#define __OPEN_HPP__ +#pragma once #include @@ -28,5 +27,3 @@ namespace mergerfs fuse_file_info *ffi); } } - -#endif diff --git a/src/opendir.hpp b/src/opendir.hpp index c77fc239..1d0e884e 100644 --- a/src/opendir.hpp +++ b/src/opendir.hpp @@ -14,8 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __OPENDIR_HPP__ -#define __OPENDIR_HPP__ +#pragma once + +#include #include @@ -28,5 +29,3 @@ namespace mergerfs fuse_file_info *ffi); } } - -#endif diff --git a/src/option_parser.hpp b/src/option_parser.hpp index 2e8ca6af..a76bb227 100644 --- a/src/option_parser.hpp +++ b/src/option_parser.hpp @@ -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 @@ -30,5 +29,3 @@ namespace mergerfs Config &config); } } - -#endif diff --git a/src/policy.hpp b/src/policy.hpp index 1fda5d9a..215a85ad 100644 --- a/src/policy.hpp +++ b/src/policy.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __POLICY_HPP__ -#define __POLICY_HPP__ +#pragma once #include #include @@ -190,5 +189,3 @@ namespace mergerfs static const Policy &rand; }; } - -#endif diff --git a/src/read.hpp b/src/read.hpp index 9c5b3ff7..0a2cf7f9 100644 --- a/src/read.hpp +++ b/src/read.hpp @@ -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 diff --git a/src/read_buf.hpp b/src/read_buf.hpp index d83c7682..46c0a55c 100644 --- a/src/read_buf.hpp +++ b/src/read_buf.hpp @@ -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 @@ -33,5 +32,3 @@ namespace mergerfs fuse_file_info *fi); } } - -#endif diff --git a/src/readdir.hpp b/src/readdir.hpp index ae523ddc..f6e3e153 100644 --- a/src/readdir.hpp +++ b/src/readdir.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __READDIR_HPP__ -#define __READDIR_HPP__ +#pragma once #include #include @@ -38,5 +37,3 @@ namespace mergerfs fuse_file_info *fi); } } - -#endif diff --git a/src/readlink.hpp b/src/readlink.hpp index 6aab4f41..e36bac71 100644 --- a/src/readlink.hpp +++ b/src/readlink.hpp @@ -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 diff --git a/src/release.hpp b/src/release.hpp index 890ca57b..a74ba121 100644 --- a/src/release.hpp +++ b/src/release.hpp @@ -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 diff --git a/src/releasedir.hpp b/src/releasedir.hpp index 0b5fd0b8..14c4cf59 100644 --- a/src/releasedir.hpp +++ b/src/releasedir.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __RELEASEDIR_HPP__ -#define __RELEASEDIR_HPP__ +#pragma once #include @@ -28,5 +27,3 @@ namespace mergerfs fuse_file_info *ffi); } } - -#endif diff --git a/src/removexattr.hpp b/src/removexattr.hpp index 90816bed..38e970e2 100644 --- a/src/removexattr.hpp +++ b/src/removexattr.hpp @@ -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 diff --git a/src/rename.hpp b/src/rename.hpp index c1a798da..f8cc0718 100644 --- a/src/rename.hpp +++ b/src/rename.hpp @@ -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 diff --git a/src/resources.hpp b/src/resources.hpp index f04677d7..160802c8 100644 --- a/src/resources.hpp +++ b/src/resources.hpp @@ -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 diff --git a/src/rmdir.hpp b/src/rmdir.hpp index 43a802a2..a5ee55ba 100644 --- a/src/rmdir.hpp +++ b/src/rmdir.hpp @@ -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 diff --git a/src/rv.hpp b/src/rv.hpp index b2ec9243..68e63fc6 100644 --- a/src/rv.hpp +++ b/src/rv.hpp @@ -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__ diff --git a/src/rwlock.hpp b/src/rwlock.hpp index 7684720e..54aeee2b 100644 --- a/src/rwlock.hpp +++ b/src/rwlock.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __RWLOCK_HPP__ -#define __RWLOCK_HPP__ +#pragma once #include @@ -66,5 +65,3 @@ namespace mergerfs }; } } - -#endif diff --git a/src/setxattr.hpp b/src/setxattr.hpp index a05e382a..e1d44901 100644 --- a/src/setxattr.hpp +++ b/src/setxattr.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __SETXATTR_HPP__ -#define __SETXATTR_HPP__ +#pragma once namespace mergerfs { @@ -29,5 +28,3 @@ namespace mergerfs int flags); } } - -#endif diff --git a/src/statfs.hpp b/src/statfs.hpp index 6e94be90..4377ad2c 100644 --- a/src/statfs.hpp +++ b/src/statfs.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __STATFS_HPP__ -#define __STATFS_HPP__ +#pragma once namespace mergerfs { @@ -26,5 +25,3 @@ namespace mergerfs struct statvfs *fsstat); } } - -#endif diff --git a/src/statvfs_util.hpp b/src/statvfs_util.hpp index 2011e322..246d621c 100644 --- a/src/statvfs_util.hpp +++ b/src/statvfs_util.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __STATVFS_UTIL_HPP__ -#define __STATVFS_UTIL_HPP__ +#pragma once #include @@ -49,5 +48,3 @@ namespace StatVFS return (st.f_frsize * (st.f_blocks - st.f_bavail)); } } - -#endif diff --git a/src/str.hpp b/src/str.hpp index 0369fb7a..3538ce48 100644 --- a/src/str.hpp +++ b/src/str.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __STR_HPP__ -#define __STR_HPP__ +#pragma once #include #include @@ -58,5 +57,3 @@ namespace str isprefix(const std::string &s0, const std::string &s1); } - -#endif diff --git a/src/strset.hpp b/src/strset.hpp index e055fe33..8fcfe857 100644 --- a/src/strset.hpp +++ b/src/strset.hpp @@ -16,8 +16,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __STRSET_HPP__ -#define __STRSET_HPP__ +#pragma once #include @@ -61,5 +60,3 @@ public: private: khash_t(strset) *_set; }; - -#endif diff --git a/src/success_fail.hpp b/src/success_fail.hpp index 8a73ea91..83cf43c9 100644 --- a/src/success_fail.hpp +++ b/src/success_fail.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __SUCCESS_FAIL_HPP__ -#define __SUCCESS_FAIL_HPP__ +#pragma once #define STATVFS_SUCCESS 0 #define STATVFS_SUCCEEDED(RV) ((RV) == STATVFS_SUCCESS) @@ -42,5 +41,3 @@ #define RENAME_FAIL -1 #define RENAME_FAILED(RV) ((RV) == RENAME_FAIL) #define RENAME_FAILED_WITH(RV,ERRNO) (((RV) == RENAME_FAIL) && (errno == ERRNO)) - -#endif diff --git a/src/symlink.hpp b/src/symlink.hpp index ccbdf23f..47f7cafc 100644 --- a/src/symlink.hpp +++ b/src/symlink.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __SYMLINK_HPP__ -#define __SYMLINK_HPP__ +#pragma once namespace mergerfs { @@ -26,5 +25,3 @@ namespace mergerfs const char *newpath); } } - -#endif diff --git a/src/symlinkify.hpp b/src/symlinkify.hpp index b38aedd5..9a10cd93 100644 --- a/src/symlinkify.hpp +++ b/src/symlinkify.hpp @@ -16,8 +16,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __SYMLINKIFY_HPP__ -#define __SYMLINKIFY_HPP__ +#pragma once #include #include @@ -48,5 +47,3 @@ namespace symlinkify return ((mode & ~S_IFMT) | S_IFLNK); } } - -#endif diff --git a/src/truncate.hpp b/src/truncate.hpp index 7eb65b7c..cbf677df 100644 --- a/src/truncate.hpp +++ b/src/truncate.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __TRUNCATE_HPP__ -#define __TRUNCATE_HPP__ +#pragma once #include @@ -28,5 +27,3 @@ namespace mergerfs off_t size); } } - -#endif diff --git a/src/ugid.hpp b/src/ugid.hpp index 2ea279ec..2860d7b5 100644 --- a/src/ugid.hpp +++ b/src/ugid.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __UGID_HPP__ -#define __UGID_HPP__ +#pragma once #include #include @@ -36,5 +35,3 @@ namespace mergerfs #else #include "ugid_rwlock.hpp" #endif - -#endif diff --git a/src/ugid_linux.hpp b/src/ugid_linux.hpp index a55a7abc..a81d8f4d 100644 --- a/src/ugid_linux.hpp +++ b/src/ugid_linux.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __UGID_LINUX_HPP__ -#define __UGID_LINUX_HPP__ +#pragma once #include #include @@ -90,5 +89,3 @@ namespace mergerfs }; } } - -#endif diff --git a/src/ugid_rwlock.hpp b/src/ugid_rwlock.hpp index 0c4dfd23..7ea91f01 100644 --- a/src/ugid_rwlock.hpp +++ b/src/ugid_rwlock.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __UGID_RWLOCK_HPP__ -#define __UGID_RWLOCK_HPP__ +#pragma once #include #include @@ -100,5 +99,3 @@ namespace mergerfs }; } } - -#endif diff --git a/src/unlink.hpp b/src/unlink.hpp index bb4d2c7c..e0ce8743 100644 --- a/src/unlink.hpp +++ b/src/unlink.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __UNLINK_HPP__ -#define __UNLINK_HPP__ +#pragma once namespace mergerfs { @@ -25,5 +24,3 @@ namespace mergerfs unlink(const char *fusepath); } } - -#endif diff --git a/src/utimens.hpp b/src/utimens.hpp index a22e287f..8d3b2af6 100644 --- a/src/utimens.hpp +++ b/src/utimens.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __UTIMENS_HPP__ -#define __UTIMENS_HPP__ +#pragma once namespace mergerfs { @@ -26,5 +25,3 @@ namespace mergerfs const timespec ts[2]); } } - -#endif diff --git a/src/write.hpp b/src/write.hpp index 1a736c4b..a2399b61 100644 --- a/src/write.hpp +++ b/src/write.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __WRITE_HPP__ -#define __WRITE_HPP__ +#pragma once namespace mergerfs { @@ -43,5 +42,3 @@ namespace mergerfs fuse_file_info *fi); } } - -#endif diff --git a/src/write_buf.hpp b/src/write_buf.hpp index 6063e9aa..e9872523 100644 --- a/src/write_buf.hpp +++ b/src/write_buf.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __WRITE_BUF_HPP__ -#define __WRITE_BUF_HPP__ +#pragma once #include @@ -38,5 +37,3 @@ namespace mergerfs fuse_file_info *fi); } } - -#endif diff --git a/src/xattr.hpp b/src/xattr.hpp index 181fedf8..75635e8c 100644 --- a/src/xattr.hpp +++ b/src/xattr.hpp @@ -14,8 +14,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef __XATTR_HPP__ -#define __XATTR_HPP__ +#pragma once #ifndef WITHOUT_XATTR #include @@ -28,5 +27,3 @@ #ifndef XATTR_REPLACE # define XATTR_REPLACE 0x2 #endif - -#endif