add #warning to make it more obvious what versions of functions are used

This commit is contained in:
Antonio SJ Musumeci 2020-08-18 18:40:40 -04:00
parent 2fe20b888e
commit 7fd629ebf3
9 changed files with 38 additions and 18 deletions

View File

@ -15,7 +15,9 @@
*/
#ifdef __linux__
# include "fs_attr_linux.icpp"
#warning "using fs_attr_linux.icpp"
#include "fs_attr_linux.icpp"
#else
# include "fs_attr_unsupported.icpp"
#warning "using fs_attr_unsupported.icpp"
#include "fs_attr_unsupported.icpp"
#endif

View File

@ -17,7 +17,9 @@
*/
#ifdef __linux__
# include "fs_copy_file_range_linux.icpp"
#warning "using fs_copy_file_range_linux.icpp"
#include "fs_copy_file_range_linux.icpp"
#else
# include "fs_copy_file_range_unsupported.icpp"
#warning "using fs_copy_file_range_unsupported.icpp"
#include "fs_copy_file_range_unsupported.icpp"
#endif

View File

@ -17,9 +17,11 @@
#include <fcntl.h>
#if _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L
# include "fs_fadvise_posix.icpp"
#warning "using fs_fadvise_posix.icpp"
#include "fs_fadvise_posix.icpp"
#else
# include "fs_fadvise_unsupported.icpp"
#warning "using fs_fadvise_unsupported.icpp"
#include "fs_fadvise_unsupported.icpp"
#endif
#ifndef POSIX_FADV_NORMAL

View File

@ -17,7 +17,9 @@
*/
#ifdef __linux__
# include "fs_ficlone_linux.icpp"
#warning "using fs_ficlone_linux.icpp"
#include "fs_ficlone_linux.icpp"
#else
# include "fs_ficlone_unsupported.icpp"
#warning "using fs_ficlone_unsupported.icpp"
#include "fs_ficlone_unsupported.icpp"
#endif

View File

@ -23,11 +23,14 @@
#include <sys/stat.h>
#ifdef __linux__
# include "fs_futimens_linux.hpp"
#warning "using fs_futimens_linux.hpp"
#include "fs_futimens_linux.hpp"
#elif __FreeBSD__ >= 11
# include "fs_futimens_freebsd_11.hpp"
#warning "using fs_futimens_freebsd_11.hpp"
#include "fs_futimens_freebsd_11.hpp"
#else
# include "fs_futimens_generic.hpp"
#warning "using fs_futimens_generic.hpp"
#include "fs_futimens_generic.hpp"
#endif
namespace fs

View File

@ -17,7 +17,9 @@
*/
#if __APPLE__
# include "fs_futimesat_osx.icpp"
#warning "using fs_futimesat_osx.icpp"
#include "fs_futimesat_osx.icpp"
#else
# include "fs_futimesat_generic.icpp"
#warning "using fs_futimesat_generic.icpp"
#include "fs_futimesat_generic.icpp"
#endif

View File

@ -15,7 +15,9 @@
*/
#ifdef __linux__
# include "fs_sendfile_linux.icpp"
#warning "using fs_sendfile_linux.icpp"
#include "fs_sendfile_linux.icpp"
#else
# include "fs_sendfile_unsupported.icpp"
#warning "using fs_sendfile_unsupported.icpp"
#include "fs_sendfile_unsupported.icpp"
#endif

View File

@ -19,9 +19,12 @@
#pragma once
#ifdef __linux__
# include "fs_utimensat_linux.hpp"
#warning "using fs_utimensat_linux.hpp"
#include "fs_utimensat_linux.hpp"
#elif __FreeBSD__
# include "fs_utimensat_freebsd.hpp"
#warning "using fs_utimensat_freebsd.hpp"
#include "fs_utimensat_freebsd.hpp"
#else
# include "fs_utimensat_generic.hpp"
#warning "using fs_utimensat_generic.hpp"
#include "fs_utimensat_generic.hpp"
#endif

View File

@ -28,7 +28,9 @@ namespace ugid
}
#if defined __linux__ and UGID_USE_RWLOCK == 0
#warning "using ugid_linux.hpp"
#include "ugid_linux.hpp"
#else
#warning "using ugid_rwlock.hpp"
#include "ugid_rwlock.hpp"
#endif