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

Comparing projects/libstatgrab/src/libstatgrab/user_stats.c (file contents):
Revision 1.9 by tdb, Sun Aug 24 20:24:09 2003 UTC vs.
Revision 1.10 by ats, Sun Oct 19 02:03:02 2003 UTC

# Line 26 | Line 26
26   #include <stdio.h>
27   #include <string.h>
28   #include "statgrab.h"
29 < #ifdef FREEBSD
29 > #ifdef ALLBSD
30   #include <sys/types.h>
31   #endif
32   #include <utmp.h>
33 + #ifdef NETBSD
34 + #include <limits.h>
35 + #undef MAX_LOGIN_NAME_SIZE
36 + #define MAX_LOGIN_NAME_SIZE _POSIX_LOGIN_NAME_MAX
37 + #endif
38  
39   #define START_VAL (5*(1+MAX_LOGIN_NAME_SIZE))
40  
# Line 42 | Line 47 | user_stat_t *get_user_stats(){
47   #if defined(SOLARIS) || defined(LINUX)  
48          struct utmp *entry;
49   #endif
50 < #ifdef FREEBSD
50 > #ifdef ALLBSD
51          struct utmp entry;
52          FILE *f;
53   #endif
# Line 80 | Line 85 | user_stat_t *get_user_stats(){
85          }
86          endutent();
87   #endif
88 < #ifdef FREEBSD
88 > #ifdef ALLBSD
89          if ((f=fopen(_PATH_UTMP, "r")) == NULL){
90                  return NULL;
91          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines