/[inetutils]/inetutils/libinetutils/logwtmp.c
ViewVC logotype

Diff of /inetutils/libinetutils/logwtmp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by ams, Sun Apr 28 17:10:59 2002 UTC revision 1.5 by gray, Tue May 14 15:13:56 2002 UTC
# Line 56  Line 56 
56  #include <string.h>  #include <string.h>
57  #endif  #endif
58    
59  #ifndef HAVE_DECL_ERRNO  #if !HAVE_DECL_ERRNO
60  extern int errno;  extern int errno;
61  #endif  #endif
62    
# Line 113  logwtmp (char *line, char *name, char *h Line 113  logwtmp (char *line, char *name, char *h
113    
114    /* Set information in new entry.  */    /* Set information in new entry.  */
115    bzero (&ut, sizeof (ut));    bzero (&ut, sizeof (ut));
116  #ifdef HAVE_UTMP_UT_TYPE  #ifdef HAVE_STRUCT_UTMP_UT_TYPE
117    ut.ut_type = USER_PROCESS;    ut.ut_type = USER_PROCESS;
118  #endif  #endif
119    strncpy (ut.ut_line, line, sizeof ut.ut_line);    strncpy (ut.ut_line, line, sizeof ut.ut_line);
120    strncpy (ut.ut_name, name, sizeof ut.ut_name);    strncpy (ut.ut_name, name, sizeof ut.ut_name);
121  #ifdef HAVE_UTMP_UT_HOST  #ifdef HAVE_STRUCT_UTMP_UT_HOST
122    strncpy (ut.ut_host, host, sizeof ut.ut_host);    strncpy (ut.ut_host, host, sizeof ut.ut_host);
123  #endif  #endif
124    
125  #ifdef HAVE_UTMP_UT_TV  #ifdef HAVE_STRUCT_UTMP_UT_TV
126    gettimeofday (&ut.ut_tv, NULL);    gettimeofday (&ut.ut_tv, NULL);
127  #else  #else
128    time (&ut.ut_time);    time (&ut.ut_time);

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26