Blame include/sys/stat.h

Packit 6c4009
#ifndef _SYS_STAT_H
Packit 6c4009
#include <io/sys/stat.h>
Packit 6c4009
Packit 6c4009
#ifndef _ISOMAC
Packit 6c4009
/* Now define the internal interfaces. */
Packit 6c4009
extern int __stat (const char *__file, struct stat *__buf);
Packit 6c4009
extern int __fstat (int __fd, struct stat *__buf);
Packit 6c4009
extern int __lstat (const char *__file, struct stat *__buf);
Packit 6c4009
extern int __chmod (const char *__file, __mode_t __mode);
Packit 6c4009
libc_hidden_proto (__chmod)
Packit 6c4009
extern int __fchmod (int __fd, __mode_t __mode);
Packit 6c4009
extern __mode_t __umask (__mode_t __mask);
Packit 6c4009
extern int __mkdir (const char *__path, __mode_t __mode);
Packit 6c4009
libc_hidden_proto (__mkdir)
Packit 6c4009
extern int __mknod (const char *__path,
Packit 6c4009
		    __mode_t __mode, __dev_t __dev);
Packit 6c4009
#if IS_IN (libc) || (IS_IN (rtld) && !defined NO_RTLD_HIDDEN)
Packit 6c4009
hidden_proto (__fxstat)
Packit 6c4009
hidden_proto (__fxstat64)
Packit 6c4009
hidden_proto (__lxstat)
Packit 6c4009
hidden_proto (__lxstat64)
Packit 6c4009
hidden_proto (__xstat)
Packit 6c4009
hidden_proto (__xstat64)
Packit 6c4009
#endif
Packit 6c4009
extern __inline__ int __stat (const char *__path, struct stat *__statbuf)
Packit 6c4009
{
Packit 6c4009
  return __xstat (_STAT_VER, __path, __statbuf);
Packit 6c4009
}
Packit 6c4009
libc_hidden_proto (__xmknod)
Packit 6c4009
extern __inline__ int __mknod (const char *__path, __mode_t __mode,
Packit 6c4009
			       __dev_t __dev)
Packit 6c4009
{
Packit 6c4009
  return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
Packit 6c4009
}
Packit 6c4009
libc_hidden_proto (__xmknodat)
Packit 6c4009
Packit 6c4009
libc_hidden_proto (__fxstatat)
Packit 6c4009
libc_hidden_proto (__fxstatat64)
Packit 6c4009
Packit 6c4009
# if IS_IN (rtld) && !defined NO_RTLD_HIDDEN
Packit 6c4009
extern __typeof (__fxstatat64) __fxstatat64 attribute_hidden;
Packit 6c4009
# endif
Packit 6c4009
Packit 6c4009
/* The `stat', `fstat', `lstat' functions have to be handled special since
Packit 6c4009
   even while not compiling the library with optimization calls to these
Packit 6c4009
   functions in the shared library must reference the `xstat' etc functions.
Packit 6c4009
   We have to use macros but we cannot define them in the normal headers
Packit 6c4009
   since on user level we must use real functions.  */
Packit 6c4009
#define stat(fname, buf) __xstat (_STAT_VER, fname, buf)
Packit 6c4009
#define lstat(fname, buf)  __lxstat (_STAT_VER, fname, buf)
Packit 6c4009
#define __lstat(fname, buf)  __lxstat (_STAT_VER, fname, buf)
Packit 6c4009
#define lstat64(fname, buf)  __lxstat64 (_STAT_VER, fname, buf)
Packit 6c4009
#define __lstat64(fname, buf)  __lxstat64 (_STAT_VER, fname, buf)
Packit 6c4009
#define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
Packit 6c4009
#define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
Packit 6c4009
#define __fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
Packit 6c4009
#define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
Packit 6c4009
#define __fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
Packit 6c4009
#define __fstatat(dfd, fname, buf, flag) \
Packit 6c4009
  __fxstatat (_STAT_VER, dfd, fname, buf, flag)
Packit 6c4009
#define __fstatat64(dfd, fname, buf, flag) \
Packit 6c4009
  __fxstatat64 (_STAT_VER, dfd, fname, buf, flag)
Packit 6c4009
#endif
Packit 6c4009
#endif