From: Kevin Day Date: Sat, 30 Jul 2022 00:22:10 +0000 (-0500) Subject: Bugfix: private_f_file_open_at() has an incomplete set if ifdef conditions. X-Git-Tag: 0.6.0~9 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=1cdcc48d4e8ef9bdde1f6592c213da6e5b2d6000;p=fll Bugfix: private_f_file_open_at() has an incomplete set if ifdef conditions. The ifdef conditions for disabled functions is incomplete. This results in the private_f_file_open_at() becoming incorrectly unavailable when the appropriate disable defines are set. --- diff --git a/level_0/f_file/c/private-file.c b/level_0/f_file/c/private-file.c index b9e5b13..08ec107 100644 --- a/level_0/f_file/c/private-file.c +++ b/level_0/f_file/c/private-file.c @@ -547,7 +547,7 @@ extern "C" { } #endif // !defined(_di_f_file_open_) || !defined(_di_f_file_copy_) -#if !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) +#if !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_) || !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) f_status_t private_f_file_open_at(const int at_id, const f_string_static_t path, const mode_t mode, f_file_t * const file) { file->id = openat(at_id, path.string, file->flag, mode); @@ -579,7 +579,7 @@ extern "C" { return F_none; } -#endif // !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) +#endif // !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_) || !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) #if !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_) f_status_t private_f_file_role_change(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference) { diff --git a/level_0/f_file/c/private-file.h b/level_0/f_file/c/private-file.h index 9ec34e0..14ff1df 100644 --- a/level_0/f_file/c/private-file.h +++ b/level_0/f_file/c/private-file.h @@ -747,11 +747,14 @@ extern "C" { * * @see openat() * + * @see f_file_copy_at() + * @see f_file_clone_at() * @see f_file_open_at() + * @see f_file_copy_at() */ -#if !defined(_di_f_file_open_at_) +#if !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_) || !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) extern f_status_t private_f_file_open_at(const int at_id, const f_string_static_t path, const mode_t mode, f_file_t * const file) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_file_open_at_) +#endif // !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_) || !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_) /** * Private implementation of f_file_role_change().