mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 19:53:32 +08:00
linux: Always define STAT_IS_KERNEL_STAT
It allows to check for its value instead of its existence. Checked with a build for all affected ABIS. Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
parent
c71d13a098
commit
90e1600f4f
@ -85,5 +85,6 @@ struct glibc21_stat
|
||||
long __glibc_reserved[4];
|
||||
};
|
||||
|
||||
#define STAT_IS_KERNEL_STAT 0
|
||||
#define XSTAT_IS_XSTAT64 1
|
||||
#define STATFS_IS_STATFS64 0
|
||||
|
@ -38,7 +38,7 @@ __fxstat (int vers, int fd, struct stat *buf)
|
||||
if (vers == _STAT_VER_KERNEL)
|
||||
return INLINE_SYSCALL (fstat, 2, fd, buf);
|
||||
|
||||
#ifdef STAT_IS_KERNEL_STAT
|
||||
#if STAT_IS_KERNEL_STAT
|
||||
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
|
||||
#else
|
||||
struct kernel_stat kbuf;
|
||||
|
@ -37,7 +37,7 @@ int
|
||||
__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
|
||||
{
|
||||
int result;
|
||||
#ifdef STAT_IS_KERNEL_STAT
|
||||
#if STAT_IS_KERNEL_STAT
|
||||
# define kst (*st)
|
||||
#else
|
||||
struct kernel_stat kst;
|
||||
@ -46,7 +46,7 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
|
||||
result = INTERNAL_SYSCALL_CALL (newfstatat, fd, file, &kst, flag);
|
||||
if (!__glibc_likely (INTERNAL_SYSCALL_ERROR_P (result)))
|
||||
{
|
||||
#ifdef STAT_IS_KERNEL_STAT
|
||||
#if STAT_IS_KERNEL_STAT
|
||||
return 0;
|
||||
#else
|
||||
return __xstat_conv (vers, &kst, st);
|
||||
|
@ -30,5 +30,6 @@ struct kernel_stat {
|
||||
#define _HAVE_STAT_NSEC
|
||||
#define _HAVE_STAT64_NSEC
|
||||
|
||||
#define STAT_IS_KERNEL_STAT 0
|
||||
#define XSTAT_IS_XSTAT64 0
|
||||
#define STATFS_IS_STATFS64 0
|
||||
|
@ -34,5 +34,6 @@ struct kernel_stat
|
||||
#define _HAVE_STAT64___ST_INO
|
||||
#define _HAVE_STAT64_NSEC
|
||||
|
||||
#define STAT_IS_KERNEL_STAT 0
|
||||
#define XSTAT_IS_XSTAT64 0
|
||||
#define STATFS_IS_STATFS64 0
|
||||
|
@ -37,7 +37,7 @@ __lxstat (int vers, const char *name, struct stat *buf)
|
||||
if (vers == _STAT_VER_KERNEL)
|
||||
return INLINE_SYSCALL (lstat, 2, name, buf);
|
||||
|
||||
#ifdef STAT_IS_KERNEL_STAT
|
||||
#if STAT_IS_KERNEL_STAT
|
||||
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
|
||||
#else
|
||||
struct kernel_stat kbuf;
|
||||
|
@ -48,5 +48,6 @@ struct kernel_stat
|
||||
#define _HAVE_STAT64___UNUSED5
|
||||
};
|
||||
|
||||
#define STAT_IS_KERNEL_STAT 0
|
||||
#define XSTAT_IS_XSTAT64 0
|
||||
#define STATFS_IS_STATFS64 0
|
||||
|
@ -56,5 +56,6 @@ struct kernel_stat
|
||||
};
|
||||
#endif
|
||||
|
||||
#define STAT_IS_KERNEL_STAT 0
|
||||
#define XSTAT_IS_XSTAT64 0
|
||||
#define STATFS_IS_STATFS64 0
|
||||
|
@ -47,5 +47,6 @@ struct kernel_stat
|
||||
#define _HAVE_STAT64___PAD2
|
||||
#define _HAVE_STAT64_NSEC
|
||||
|
||||
#define STAT_IS_KERNEL_STAT 0
|
||||
#define XSTAT_IS_XSTAT64 0
|
||||
#define STATFS_IS_STATFS64 0
|
||||
|
@ -31,5 +31,6 @@ struct kernel_stat
|
||||
#define _HAVE_STAT_NSEC
|
||||
#define _HAVE_STAT64_NSEC
|
||||
|
||||
#define STAT_IS_KERNEL_STAT 0
|
||||
#define XSTAT_IS_XSTAT64 0
|
||||
#define STATFS_IS_STATFS64 0
|
||||
|
@ -44,5 +44,6 @@ struct kernel_stat64
|
||||
long int __glibc_reserved[3];
|
||||
};
|
||||
|
||||
#define STAT_IS_KERNEL_STAT 0
|
||||
#define XSTAT_IS_XSTAT64 1
|
||||
#define STATFS_IS_STATFS64 0
|
||||
|
@ -37,7 +37,7 @@ __xstat (int vers, const char *name, struct stat *buf)
|
||||
if (vers == _STAT_VER_KERNEL)
|
||||
return INLINE_SYSCALL (stat, 2, name, buf);
|
||||
|
||||
#ifdef STAT_IS_KERNEL_STAT
|
||||
#if STAT_IS_KERNEL_STAT
|
||||
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
|
||||
#else
|
||||
struct kernel_stat kbuf;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <kernel_stat.h>
|
||||
|
||||
#ifdef STAT_IS_KERNEL_STAT
|
||||
#if STAT_IS_KERNEL_STAT
|
||||
|
||||
/* Dummy. */
|
||||
struct kernel_stat;
|
||||
|
@ -16,7 +16,7 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef STAT_IS_KERNEL_STAT
|
||||
#if !STAT_IS_KERNEL_STAT
|
||||
extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
|
||||
attribute_hidden;
|
||||
extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
|
||||
|
Loading…
Reference in New Issue
Block a user