X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Freadutmp.c;h=f39535299404e5702055be83f523a418150fd8da;hb=98a354147cdb6d15365600fac33d492d7387996f;hp=9fb4442c3018d2f363934cdd68a943b2dbd94eb5;hpb=ceaf650f32c8f1cb73a760c0db8f43eeb897d442;p=gnulib.git diff --git a/lib/readutmp.c b/lib/readutmp.c index 9fb4442c3..f39535299 100644 --- a/lib/readutmp.c +++ b/lib/readutmp.c @@ -70,12 +70,12 @@ read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf) Solaris' utmpname returns 1 upon success -- which is contrary to what the GNU libc version does. In addition, older GNU libc versions are actually void. */ - utmpname (filename); + UTMP_NAME_FUNCTION (filename); - setutent (); + SET_UTMP_ENT (); n_read = 0; - while ((u = getutent ()) != NULL) + while ((u = GET_UTMP_ENT ()) != NULL) { ++n_read; utmp = (STRUCT_UTMP *) realloc (utmp, n_read * sizeof (STRUCT_UTMP)); @@ -84,7 +84,7 @@ read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf) utmp[n_read - 1] = *u; } - endutent (); + END_UTMP_ENT (); *n_entries = n_read; *utmp_buf = utmp;