OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20010328-1.c] - Blame information for rev 301

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
typedef __SIZE_TYPE__ size_t;
2
typedef unsigned int __u_int;
3
typedef unsigned long __u_long;
4
 
5
__extension__ typedef unsigned long long int __u_quad_t;
6
__extension__ typedef long long int __quad_t;
7
 
8
typedef struct
9
  {
10
    int __val[2];
11
  } __fsid_t;
12
 
13
typedef long int __blksize_t;
14
typedef long int __blkcnt_t;
15
typedef __quad_t __blkcnt64_t;
16
typedef __u_long __fsblkcnt_t;
17
typedef __u_quad_t __fsblkcnt64_t;
18
typedef __u_long __fsfilcnt_t;
19
typedef __u_quad_t __fsfilcnt64_t;
20
typedef __u_quad_t __ino64_t;
21
 
22
extern void *memcpy (void *__restrict __dest,
23
                     __const void *__restrict __src, size_t __n) ;
24
 
25
struct statfs
26
  {
27
    int f_type;
28
    int f_bsize;
29
 
30
    __fsblkcnt_t f_blocks;
31
    __fsblkcnt_t f_bfree;
32
    __fsblkcnt_t f_bavail;
33
    __fsfilcnt_t f_files;
34
    __fsfilcnt_t f_ffree;
35
 
36
    __fsid_t f_fsid;
37
    int f_namelen;
38
    int f_spare[6];
39
  };
40
 
41
 
42
struct statfs64
43
  {
44
    int f_type;
45
    int f_bsize;
46
    __fsblkcnt64_t f_blocks;
47
    __fsblkcnt64_t f_bfree;
48
    __fsblkcnt64_t f_bavail;
49
    __fsfilcnt64_t f_files;
50
    __fsfilcnt64_t f_ffree;
51
    __fsid_t f_fsid;
52
    int f_namelen;
53
    int f_spare[6];
54
  };
55
 
56
extern int __statfs (__const char *__file, struct statfs *__buf);
57
extern int __statfs64 (__const char *__file, struct statfs64 *__buf);
58
 
59
 
60
int
61
__statfs64 (const char *file, struct statfs64 *buf)
62
{
63
  struct statfs buf32;
64
 
65
  if (__statfs (file, &buf32) < 0)
66
    return -1;
67
 
68
  buf->f_type = buf32.f_type;
69
  buf->f_bsize = buf32.f_bsize;
70
  buf->f_blocks = buf32.f_blocks;
71
  buf->f_bfree = buf32.f_bfree;
72
  buf->f_bavail = buf32.f_bavail;
73
  buf->f_files = buf32.f_files;
74
  buf->f_ffree = buf32.f_ffree;
75
  buf->f_fsid = buf32.f_fsid;
76
  buf->f_namelen = buf32.f_namelen;
77
  memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
78
 
79
  return 0;
80
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.