File:  [DVB] / dietlibc / lib / __fstat64.c
Revision 1.4: download - view: text, annotated - select for diffs
Thu May 31 16:12:27 2001 UTC (23 years ago) by fefe
Branches: MAIN
CVS tags: finnland_test_200301, branch_rc14_fieldtest_finnland, branch_rc13_fieldtest_finnland, branch_rc12_fieldtest_finnland, branch_rc10_fieldtest_finnland, RELEASE_finnland_200301_1, RC12_FIELDTEST_FINNLAND, RC10_FIELDTEST_FINNLAND, HEAD
cleaner errno vs. *__errno_location() handling.
add dummy iconv (iconv_open always returns EINVAL).
add expect() optimization in qsort.

#include <errno.h>
#include "dietfeatures.h"
#ifdef WANT_LARGEFILE_BACKCOMPAT
#include <sys/stat.h>
#ifndef __NO_STAT64

extern int __dietlibc_fstat64(int __fd, struct stat64 *__buf);
extern void __stat64_cvt(const struct stat *src,struct stat64 *dest);

int fstat64(int __fd, struct stat64 *__buf) {
  if (__dietlibc_fstat64(__fd,__buf)) {
    struct stat temp;
    if (errno!=ENOSYS) return -1;
    if (fstat(__fd,&temp)) return -1;
    __stat64_cvt(&temp,__buf);
  }
  return 0;
}
#endif
#endif

LinuxTV legacy CVS <linuxtv.org/cvs>