2 #include <io/sys/stat.h>
4 /* Now define the internal interfaces. */
5 extern int __stat (__const
char *__file
, struct stat
*__buf
);
6 extern int __fstat (int __fd
, struct stat
*__buf
);
7 extern int __lstat (__const
char *__file
, struct stat
*__buf
);
8 extern int __chmod (__const
char *__file
, __mode_t __mode
);
9 extern int __fchmod (int __fd
, __mode_t __mode
);
10 extern __mode_t
__umask (__mode_t __mask
);
11 extern int __mkdir (__const
char *__path
, __mode_t __mode
);
12 extern int __mknod (__const
char *__path
,
13 __mode_t __mode
, __dev_t __dev
);
14 extern int __fxstat_internal (int __ver
, int __fildes
,
15 struct stat
*__stat_buf
) attribute_hidden
;
16 extern int __fxstat64_internal (int __ver
, int __fildes
,
17 struct stat64
*__stat_buf
) attribute_hidden
;
18 extern int __lxstat_internal (int __ver
, __const
char __file
,
19 struct stat
*__stat_buf
) attribute_hidden
;
20 extern int __lxstat64_internal (int __ver
, __const
char *__file
,
21 struct stat64
*__stat_buf
) attribute_hidden
;
22 extern __inline__
int __stat (__const
char *__path
, struct stat
*__statbuf
)
24 return __xstat (_STAT_VER
, __path
, __statbuf
);
26 extern __inline__
int __mknod (__const
char *__path
, __mode_t __mode
,
29 return __xmknod (_MKNOD_VER
, __path
, __mode
, &__dev
);
33 /* The `stat', `fstat', `lstat' functions have to be handled special since
34 even while not compiling the library with optimization calls to these
35 functions in the shared library must reference the `xstat' etc functions.
36 We have to use macros but we cannot define them in the normal headers
37 since on user level we must use real functions. */
38 #define stat(fname, buf) __xstat (_STAT_VER, fname, buf)
39 #define lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
40 #define __lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
41 #define lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
42 #define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
44 # define fstat64(fd, buf) INTUSE(__fxstat64) (_STAT_VER, fd, buf)
45 # define fstat(fd, buf) INTUSE(__fxstat) (_STAT_VER, fd, buf)
46 # define __fstat(fd, buf) INTUSE(__fxstat) (_STAT_VER, fd, buf)
48 # define __fxstat(ver, fd, buf) INTUSE(__fxstat) (ver, fd, buf)
49 # define __fxstat64(ver, fd, buf) INTUSE(__fxstat64) (ver, fd, buf)
50 # define __lxstat(ver, name, buf) INTUSE(__lxstat) (ver, name, buf)
51 # define __lxstat64(ver, name, buf) INTUSE(__lxstat64) (ver, name, buf)
53 # define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
54 # define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
55 # define __fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)