]> git.ipfire.org Git - thirdparty/glibc.git/blob - include/sys/stat.h
72105a45a9b832e70ff09a435dbfd2e125dd413e
[thirdparty/glibc.git] / include / sys / stat.h
1 #ifndef _SYS_STAT_H
2 #include <io/sys/stat.h>
3
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)
21 #endif
22 extern __inline__ int __stat (__const char *__path, struct stat *__statbuf)
23 {
24 return __xstat (_STAT_VER, __path, __statbuf);
25 }
26 libc_hidden_proto (__xmknod)
27 extern __inline__ int __mknod (__const char *__path, __mode_t __mode,
28 __dev_t __dev)
29 {
30 return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
31 }
32 libc_hidden_proto (__xmknodat)
33
34 libc_hidden_proto (__fxstatat64)
35
36
37 /* The `stat', `fstat', `lstat' functions have to be handled special since
38 even while not compiling the library with optimization calls to these
39 functions in the shared library must reference the `xstat' etc functions.
40 We have to use macros but we cannot define them in the normal headers
41 since on user level we must use real functions. */
42 #define stat(fname, buf) __xstat (_STAT_VER, fname, buf)
43 #define lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
44 #define __lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
45 #define lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
46 #define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
47 #define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
48 #define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
49 #define __fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
50 #endif