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

Comparing projects/libstatgrab/src/libstatgrab/tools.c (file contents):
Revision 1.9 by ats, Sun Oct 19 02:03:02 2003 UTC vs.
Revision 1.12 by tdb, Mon Nov 10 21:07:04 2003 UTC

# Line 60 | Line 60 | char *get_string_match(char *line, regmatch_t *match){
60          return match_string;
61   }
62  
63 #ifdef HAVE_ATOLL
63   long long get_ll_match(char *line, regmatch_t *match){
64          char *ptr;
65          long long num;
66  
67          ptr=line+match->rm_so;
68 + #ifdef HAVE_ATOLL
69          num=atoll(ptr);
70 + #else
71 +        /* Don't have atoll, so use this bodge instead */
72 +        {
73 +                long numl;
74 +                numl=atol(ptr);
75 +                num=numl;
76 +        }
77 + #endif
78  
79          return num;
80   }
73 #endif
81  
82   #ifdef ALLBSD
83   kvm_t *get_kvm() {
# Line 114 | Line 121 | struct uvmexp *get_uvmexp() {
121   }
122   #endif
123  
124 + int statgrab_init(){
125 + #ifdef ALLBSD
126 +        {
127 +                kvm_t *kvmd = get_kvm();
128 +                if (kvmd == NULL) return 1;
129 +        }
130 + #endif
131 + #ifdef NETBSD
132 +        {
133 +                struct uvmexp *uvm = get_uvmexp();
134 +                if (uvm == NULL) return 1;
135 +        }
136 + #endif
137 +        return 0;
138 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines