2 #include <io/sys/stat.h>
5 /* Now define the internal interfaces. */
6 extern int __stat (const char *__file
, struct stat
*__buf
);
7 extern int __fstat (int __fd
, struct stat
*__buf
);
8 extern int __lstat (const char *__file
, struct stat
*__buf
);
9 extern int __chmod (const char *__file
, __mode_t __mode
);
10 extern int __fchmod (int __fd
, __mode_t __mode
);
11 extern __mode_t
__umask (__mode_t __mask
);
12 extern int __mkdir (const char *__path
, __mode_t __mode
);
13 extern int __mknod (const char *__path
,
14 __mode_t __mode
, __dev_t __dev
);
15 #if !defined NOT_IN_libc || defined IS_IN_rtld
16 hidden_proto (__fxstat
)
17 hidden_proto (__fxstat64
)
18 hidden_proto (__lxstat
)
19 hidden_proto (__lxstat64
)
20 hidden_proto (__xstat
)
21 hidden_proto (__xstat64
)
23 extern __inline__
int __stat (const char *__path
, struct stat
*__statbuf
)
25 return __xstat (_STAT_VER
, __path
, __statbuf
);
27 libc_hidden_proto (__xmknod
)
28 extern __inline__
int __mknod (const char *__path
, __mode_t __mode
,
31 return __xmknod (_MKNOD_VER
, __path
, __mode
, &__dev
);
33 libc_hidden_proto (__xmknodat
)
35 libc_hidden_proto (__fxstatat
)
36 libc_hidden_proto (__fxstatat64
)
39 /* The `stat', `fstat', `lstat' functions have to be handled special since
40 even while not compiling the library with optimization calls to these
41 functions in the shared library must reference the `xstat' etc functions.
42 We have to use macros but we cannot define them in the normal headers
43 since on user level we must use real functions. */
44 #define stat(fname, buf) __xstat (_STAT_VER, fname, buf)
45 #define lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
46 #define __lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
47 #define lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
48 #define __lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
49 #define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
50 #define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
51 #define __fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
52 #define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
53 #define __fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
54 #define __fstatat(dfd, fname, buf, flag) \
55 __fxstatat (_STAT_VER, dfd, fname, buf, flag)
56 #define __fstatat64(dfd, fname, buf, flag) \
57 __fxstatat64 (_STAT_VER, dfd, fname, buf, flag)