[lsb-discuss] stat(), lstat() and fstat()

Wichmann, Mats D mats.d.wichmann at intel.com
Wed Jan 26 04:33:39 PST 2011


lsb-discuss-bounces at lists.linux-foundation.org wrote:
> Sorry about the flood to your inbox. ;)
> 
> The LSB headers *do* define stat(), lstat() and fstat() in
> sys/stat.h, but I think incorrectly:
> 
>    extern int fstat(int __fd, struct stat *__buf);
>    extern int fstat64(int __fd, struct stat64 *__buf);
>    extern int lstat(const char *__file, struct stat *__buf);
>    extern int lstat64(const char *__file, struct stat64 *__buf);
>    extern int mknod(const char *__path, mode_t __mode, dev_t __dev);
>    extern int stat(const char *__file, struct stat *__buf);
>    extern int stat64(const char *__file, struct stat64 *__buf);
> 
> They are not binary-level functions according to the LSB spec,
> so they should be macros that forward to __xstat() and friends?

sorry, this family is really confusing, but it's
"not our fault" :)  the magic actually happens in
libc_nonshared.a rather than via a macro replacement.



More information about the lsb-discuss mailing list