Commit bf6ab281 authored by Nils Goroll's avatar Nils Goroll

add _xstat and _lxstat

parent af53ea31
...@@ -106,6 +106,8 @@ _xstat ...@@ -106,6 +106,8 @@ _xstat
lutimes lutimes
mkostemp mkostemp
mkostemps mkostemps
_xstat
_lxstat
) )
......
...@@ -73,6 +73,14 @@ FUNCTION(int, fsetxattr, int, const char *, const void *, size_t, int) ...@@ -73,6 +73,14 @@ FUNCTION(int, fsetxattr, int, const char *, const void *, size_t, int)
#endif #endif
#endif #endif
/* solaris legacy */
#ifdef HAVE__XSTAT
FUNCTION(int, _xstat, int, const char *, struct stat *)
#endif
#ifdef HAVE__LXSTAT
FUNCTION(int, _lxstat, int, const char *, struct stat *)
#endif
#if defined(INTERPOSE) && defined(TRACE) #if defined(INTERPOSE) && defined(TRACE)
FUNCTION(void *, dlopen, const char *, int mode) FUNCTION(void *, dlopen, const char *, int mode)
#endif #endif
...@@ -870,11 +870,32 @@ int ...@@ -870,11 +870,32 @@ int
our(stat)(const char *name, struct stat *sb) { our(stat)(const char *name, struct stat *sb) {
return our(fstatat)(AT_FDCWD, name, sb, 0); return our(fstatat)(AT_FDCWD, name, sb, 0);
} }
#ifdef HAVE__XSTAT
int
our(_xstat)(int ver, const char *name, struct stat *sb) {
if (ver != _STAT_VER) {
errno = EINVAL;
return -1;
}
return our(fstatat)(AT_FDCWD, name, sb, 0);
}
#endif
int int
our(lstat)(const char *name, struct stat *sb) { our(lstat)(const char *name, struct stat *sb) {
return our(fstatat)(AT_FDCWD, name, sb, AT_SYMLINK_NOFOLLOW); return our(fstatat)(AT_FDCWD, name, sb, AT_SYMLINK_NOFOLLOW);
} }
#ifdef HAVE__XSTAT
int
our(_lxstat)(int ver, const char *name, struct stat *sb) {
if (ver != _STAT_VER) {
errno = EINVAL;
return -1;
}
return our(fstatat)(AT_FDCWD, name, sb, AT_SYMLINK_NOFOLLOW);
}
#endif
#if !defined(_LP64) #if !defined(_LP64)
int int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment