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 |
33 |
|
|
34 |
|
#define START_VAL (5*(1+MAX_LOGIN_NAME_SIZE)) |
35 |
|
|
39 |
|
static user_stat_t user_stats; |
40 |
|
static int size_of_namelist=-1; |
41 |
|
char *tmp; |
42 |
< |
#if defined(SOLARIS) || defined(LINUX) |
42 |
> |
#if defined(SOLARIS) || defined(LINUX) || defined(CYGWIN) |
43 |
|
struct utmp *entry; |
44 |
|
#endif |
45 |
|
#ifdef ALLBSD |
59 |
|
/* Essentially blank the list, or give it a inital starting string */ |
60 |
|
strcpy(user_stats.name_list, ""); |
61 |
|
|
62 |
< |
#if defined(SOLARIS) || defined(LINUX) |
62 |
> |
#if defined(SOLARIS) || defined(LINUX) || defined(CYGWIN) |
63 |
|
setutent(); |
64 |
|
while((entry=getutent()) != NULL) { |
65 |
|
if(entry->ut_type==USER_PROCESS) { |