Manual typos: Low-Level Terminal Interface
[glibc.git] / include / sys / stat.h
blob4f31c00ecaba221fae0e4f10fd1ed6fd6b17a92b
1 #ifndef _SYS_STAT_H
2 #include <io/sys/stat.h>
4 #ifndef _ISOMAC
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 IS_IN (libc) || 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)
22 #endif
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,
29 __dev_t __dev)
31 return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
33 libc_hidden_proto (__xmknodat)
35 libc_hidden_proto (__fxstatat)
36 libc_hidden_proto (__fxstatat64)
38 # if IS_IN (rtld)
39 extern __typeof (__fxstatat64) __fxstatat64 attribute_hidden;
40 # endif
42 /* The `stat', `fstat', `lstat' functions have to be handled special since
43 even while not compiling the library with optimization calls to these
44 functions in the shared library must reference the `xstat' etc functions.
45 We have to use macros but we cannot define them in the normal headers
46 since on user level we must use real functions. */
47 #define stat(fname, buf) __xstat (_STAT_VER, fname, buf)
48 #define lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
49 #define __lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
50 #define lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
51 #define __lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
52 #define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
53 #define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
54 #define __fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
55 #define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
56 #define __fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
57 #define __fstatat(dfd, fname, buf, flag) \
58 __fxstatat (_STAT_VER, dfd, fname, buf, flag)
59 #define __fstatat64(dfd, fname, buf, flag) \
60 __fxstatat64 (_STAT_VER, dfd, fname, buf, flag)
61 #endif
62 #endif