From 1e3523ff3abddf49d5cd04a63a9cd8e5cf88e4ef Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 6 Dec 2022 22:40:11 -0600 Subject: [PATCH] Bugfix: Add missing ifdefs for f_file_stat() and f_file_stat_at(). --- level_0/f_file/c/private-file.c | 8 ++++---- level_0/f_file/c/private-file.h | 21 ++++++++++++++++----- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/level_0/f_file/c/private-file.c b/level_0/f_file/c/private-file.c index fa01bb6..a714217 100644 --- a/level_0/f_file/c/private-file.c +++ b/level_0/f_file/c/private-file.c @@ -680,7 +680,7 @@ extern "C" { } #endif // !defined(_di_f_file_role_change_at_) || !defined(_di_f_file_copy_at_) -#if !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_is_) || !defined(_di_f_file_touch_) +#if !defined(_di_f_file_clone_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_group_read_) || !defined(_di_f_file_is_) || !defined(_di_f_file_link_read_) || !defined(_di_f_file_mode_read_) || !defined(_di_f_file_owner_read_) || !defined(_di_f_file_size_) || !defined(_di_f_file_stat_) || !defined(_di_f_file_touch_) || !defined(_di_f_file_type_) f_status_t private_f_file_stat(const f_string_static_t path, const bool dereference, struct stat * const file_stat) { if ((dereference ? stat(path.string, file_stat) : lstat(path.string, file_stat)) < 0) { @@ -699,9 +699,9 @@ extern "C" { return F_none; } -#endif // !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_is_) || !defined(_di_f_file_touch_) +#endif // !defined(_di_f_file_clone_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_group_read_) || !defined(_di_f_file_is_) || !defined(_di_f_file_link_read_) || !defined(_di_f_file_mode_read_) || !defined(_di_f_file_owner_read_) || !defined(_di_f_file_size_) || !defined(_di_f_file_stat_) || !defined(_di_f_file_touch_) || !defined(_di_f_file_type_) -#if !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_copy_at_) +#if !defined(_di_f_file_exists_at_) || !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_mode_read_at_) || !defined(_di_f_file_size_at_) || !defined(_di_f_file_stat_at_) || !defined(_di_f_file_touch_at_) || !defined(_di_f_file_type_at_) f_status_t private_f_file_stat_at(const f_file_t file, const f_string_static_t path, const int flag, struct stat * const file_stat) { if (fstatat(file.id, path.string, file_stat, flag) < 0) { @@ -721,7 +721,7 @@ extern "C" { return F_none; } -#endif // !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_touch_at_) +#endif // !defined(_di_f_file_exists_at_) || !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_mode_read_at_) || !defined(_di_f_file_size_at_) || !defined(_di_f_file_stat_at_) || !defined(_di_f_file_touch_at_) || !defined(_di_f_file_type_at_) #if !defined(_di_f_file_stat_by_id_) || !defined(_di_f_file_size_by_id_) f_status_t private_f_file_stat_by_id(const f_file_t file, struct stat * const file_stat) { diff --git a/level_0/f_file/c/private-file.h b/level_0/f_file/c/private-file.h index cfbd13e..e309910 100644 --- a/level_0/f_file/c/private-file.h +++ b/level_0/f_file/c/private-file.h @@ -867,15 +867,22 @@ extern "C" { * @see lstat() * @see stat() * + * @see f_file_clone() * @see f_file_copy() * @see f_file_exists() + * @see f_file_group_read() * @see f_file_is() + * @see f_file_link_read() + * @see f_file_mode_read() + * @see f_file_owner_read() + * @see f_file_size() * @see f_file_stat() * @see f_file_touch() + * @see f_file_type() */ -#if !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_is_) || !defined(_di_f_file_touch_) +#if !defined(_di_f_file_clone_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_group_read_) || !defined(_di_f_file_is_) || !defined(_di_f_file_link_read_) || !defined(_di_f_file_mode_read_) || !defined(_di_f_file_owner_read_) || !defined(_di_f_file_size_) || !defined(_di_f_file_stat_) || !defined(_di_f_file_touch_) || !defined(_di_f_file_type_) extern f_status_t private_f_file_stat(const f_string_static_t file_name, const bool dereference, struct stat * const file_stat) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_is_) || !defined(_di_f_file_touch_) +#endif // !defined(_di_f_file_clone_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_group_read_) || !defined(_di_f_file_is_) || !defined(_di_f_file_link_read_) || !defined(_di_f_file_mode_read_) || !defined(_di_f_file_owner_read_) || !defined(_di_f_file_size_) || !defined(_di_f_file_stat_) || !defined(_di_f_file_touch_) || !defined(_di_f_file_type_) /** * Private implementation of f_file_stat_at(). @@ -905,13 +912,17 @@ extern "C" { * * @see fstatat() * - * @see f_file_stat_at() * @see f_file_exists_at() + * @see f_file_link_read_at() + * @see f_file_mode_read_at() + * @see f_file_size_at() + * @see f_file_stat_at() * @see f_file_touch_at() + * @see f_file_type_at() */ -#if !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_touch_at_) +#if !defined(_di_f_file_exists_at_) || !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_mode_read_at_) || !defined(_di_f_file_size_at_) || !defined(_di_f_file_stat_at_) || !defined(_di_f_file_touch_at_) || !defined(_di_f_file_type_at_) extern f_status_t private_f_file_stat_at(const f_file_t directory, const f_string_static_t file_name, const int flag, struct stat * const file_stat) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_touch_at_) +#endif // !defined(_di_f_file_exists_at_) || !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_mode_read_at_) || !defined(_di_f_file_size_at_) || !defined(_di_f_file_stat_at_) || !defined(_di_f_file_touch_at_) || !defined(_di_f_file_type_at_) /** * Private implementation of f_file_stat_by_id(). -- 1.8.3.1