From 493b2f1623fc2aa44376f77a942eb668ca49ffe1 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 12 May 2022 14:01:39 -0400 Subject: stat: Rename some feature detection macros --- src/stat.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/stat.c b/src/stat.c index 47e60b6..1cd4658 100644 --- a/src/stat.c +++ b/src/stat.c @@ -1,6 +1,6 @@ /**************************************************************************** * bfs * - * Copyright (C) 2018-2019 Tavian Barnes * + * Copyright (C) 2018-2022 Tavian Barnes * * * * Permission to use, copy, modify, and/or distribute this software for any * * purpose with or without fee is hereby granted. * @@ -29,15 +29,15 @@ #endif #ifdef STATX_BASIC_STATS -# define HAVE_STATX true +# define BFS_LIBC_STATX true #elif __linux__ # include # include # include #endif -#if HAVE_STATX || defined(__NR_statx) -# define HAVE_BFS_STATX true +#if BFS_LIBC_STATX || defined(__NR_statx) +# define BFS_STATX true #endif #if __APPLE__ @@ -166,7 +166,7 @@ static int bfs_stat_impl(int at_fd, const char *at_path, int at_flags, enum bfs_ return ret; } -#if HAVE_BFS_STATX +#if BFS_STATX /** * Wrapper for the statx() system call, which had no glibc wrapper prior to 2.28. @@ -178,7 +178,7 @@ static int bfs_statx(int at_fd, const char *at_path, int at_flags, unsigned int memset(buf, 0, sizeof(*buf)); #endif -#if HAVE_STATX +#if BFS_LIBC_STATX return statx(at_fd, at_path, at_flags, mask, buf); #else return syscall(__NR_statx, at_fd, at_path, at_flags, mask, buf); @@ -285,13 +285,13 @@ static int bfs_statx_impl(int at_fd, const char *at_path, int at_flags, enum bfs return ret; } -#endif // HAVE_BFS_STATX +#endif // BFS_STATX /** * Allows calling stat with custom at_flags. */ static int bfs_stat_explicit(int at_fd, const char *at_path, int at_flags, enum bfs_stat_flags flags, struct bfs_stat *buf) { -#if HAVE_BFS_STATX +#if BFS_STATX static bool has_statx = true; if (has_statx) { -- cgit v1.2.3