Update.
[glibc.git] / include / sys / stat.h
blob768630fd3492d6dfbcffb644956931fe0849875b
1 #ifndef _SYS_STAT_H
2 #include <io/sys/stat.h>
4 /* Now define the internal interfaces. */
5 extern int __stat __P ((__const char *__file, struct stat *__buf));
6 extern int __fstat __P ((int __fd, struct stat *__buf));
7 extern int __lstat __P ((__const char *__file, struct stat *__buf));
8 extern int __chmod __P ((__const char *__file, __mode_t __mode));
9 extern int __fchmod __P ((int __fd, __mode_t __mode));
10 extern __mode_t __umask __P ((__mode_t __mask));
11 extern int __mkdir __P ((__const char *__path, __mode_t __mode));
12 extern int __mknod __P ((__const char *__path,
13 __mode_t __mode, __dev_t __dev));
14 extern __inline__ int __stat (__const char *__path, struct stat *__statbuf)
16 return __xstat (_STAT_VER, __path, __statbuf);
18 extern __inline__ int __lstat (__const char *__path, struct stat *__statbuf)
20 return __lxstat (_STAT_VER, __path, __statbuf);
22 extern __inline__ int __fstat (int __fd, struct stat *__statbuf)
24 return __fxstat (_STAT_VER, __fd, __statbuf);
26 extern __inline__ int __mknod (__const char *__path, __mode_t __mode,
27 __dev_t __dev)
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 fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
40 #define __fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
41 #define lstat(fname, buf) __lxstat (_STAT_VER, fname, buf)
42 #define __lstat(fname, buf) __lxstat (_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 lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
46 #endif