ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/swap_stats.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/swap_stats.c (file contents):
Revision 1.8 by ats, Fri Oct 24 17:26:43 2003 UTC vs.
Revision 1.9 by ats, Mon Nov 10 23:25:45 2003 UTC

# Line 29 | Line 29
29   #include <sys/swap.h>
30   #include <unistd.h>
31   #endif
32 < #ifdef LINUX
32 > #if defined(LINUX) || defined(CYGWIN)
33   #include <stdio.h>
34   #include <string.h>
35   #endif
# Line 47 | Line 47 | swap_stat_t *get_swap_stats(){
47          struct anoninfo ai;
48          int pagesize;
49   #endif
50 < #ifdef LINUX
50 > #if defined(LINUX) || defined(CYGWIN)
51          FILE *f;
52          char *line_ptr;
53          unsigned long long value;
# Line 72 | Line 72 | swap_stat_t *get_swap_stats(){
72          swap_stat.used = (long long)ai.ani_resv * (long long)pagesize;
73          swap_stat.free = swap_stat.total - swap_stat.used;
74   #endif
75 < #ifdef LINUX
75 > #if defined(LINUX) || defined(CYGWIN)
76          if ((f = fopen("/proc/meminfo", "r")) == NULL) {
77                  return NULL;
78          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines