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 #if !defined NOT_IN_libc || defined IS_IN_rtld
15 hidden_proto (__fxstat
)
16 hidden_proto (__fxstat64
)
17 hidden_proto (__lxstat
)
18 hidden_proto (__lxstat64
)
19 hidden_proto (__xstat
)
20 hidden_proto (__xstat64
)
22 extern __inline__
int __stat (__const
char *__path
, struct stat
*__statbuf
)
24 return __xstat (_STAT_VER
, __path
, __statbuf
);
26 libc_hidden_proto (__xmknod
)
27 extern __inline__
int __mknod (__const
char *__path
, __mode_t __mode
,
30 return __xmknod (_MKNOD_VER
, __path
, __mode
, &__dev
);
34 /* The `stat', `fstat', `lstat' functions have to be handled special since
35 even while not compiling the library with optimization calls to these
36 functions in the shared library must reference the `xstat' etc functions.
37 We have to use macros but we cannot define them in the normal headers
38 since on user level we must use real functions. */
39 #define stat(fname, buf) __xstat (_STAT_VER, fname, buf)
40 #define lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
41 #define __lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
42 #define lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
43 #define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
44 #define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
45 #define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
46 #define __fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)