Back to index

glibc  2.9
Go to the documentation of this file.
00001 #ifndef _SYS_STAT_H
00002 #include <io/sys/stat.h>
00004 /* Now define the internal interfaces. */
00005 extern int __stat (__const char *__file, struct stat *__buf);
00006 extern int __fstat (int __fd, struct stat *__buf);
00007 extern int __lstat (__const char *__file, struct stat *__buf);
00008 extern int __chmod (__const char *__file, __mode_t __mode);
00009 extern int __fchmod (int __fd, __mode_t __mode);
00010 extern __mode_t __umask (__mode_t __mask);
00011 extern int __mkdir (__const char *__path, __mode_t __mode);
00012 extern int __mknod (__const char *__path,
00013                   __mode_t __mode, __dev_t __dev);
00014 #if !defined NOT_IN_libc || defined IS_IN_rtld
00015 hidden_proto (__fxstat)
00016 hidden_proto (__fxstat64)
00017 hidden_proto (__lxstat)
00018 hidden_proto (__lxstat64)
00019 hidden_proto (__xstat)
00020 hidden_proto (__xstat64)
00021 #endif
00022 extern __inline__ int __stat (__const char *__path, struct stat *__statbuf)
00023 {
00024   return __xstat (_STAT_VER, __path, __statbuf);
00025 }
00026 libc_hidden_proto (__xmknod)
00027 extern __inline__ int __mknod (__const char *__path, __mode_t __mode,
00028                             __dev_t __dev)
00029 {
00030   return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
00031 }
00032 libc_hidden_proto (__xmknodat)
00034 libc_hidden_proto (__fxstatat)
00035 libc_hidden_proto (__fxstatat64)
00038 /* The `stat', `fstat', `lstat' functions have to be handled special since
00039    even while not compiling the library with optimization calls to these
00040    functions in the shared library must reference the `xstat' etc functions.
00041    We have to use macros but we cannot define them in the normal headers
00042    since on user level we must use real functions.  */
00043 #define stat(fname, buf) __xstat (_STAT_VER, fname, buf)
00044 #define lstat(fname, buf)  __lxstat (_STAT_VER, fname, buf)
00045 #define __lstat(fname, buf)  __lxstat (_STAT_VER, fname, buf)
00046 #define lstat64(fname, buf)  __lxstat64 (_STAT_VER, fname, buf)
00047 #define stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
00048 #define fstat64(fd, buf) __fxstat64 (_STAT_VER, fd, buf)
00049 #define fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
00050 #define __fstat(fd, buf) __fxstat (_STAT_VER, fd, buf)
00051 #endif