"Fossies" - the Fresh Open Source Software Archive

Member "usr/include/utmpx.h" (19 Aug 2019, 1170 Bytes) of package /windows/misc/cygwin-20190819-x86.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /* utmpx.h
    2 
    3    This software is a copyrighted work licensed under the terms of the
    4    Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
    5    details. */
    6 
    7 #ifndef UTMPX_H
    8 #define UTMPX_H
    9 
   10 #include <cygwin/utmp.h>
   11 #include <sys/time.h>
   12 
   13 #define _PATH_UTMPX _PATH_UTMP
   14 #define UTMPX_FILE _PATH_UTMP
   15 
   16 #ifdef __cplusplus
   17 extern "C" {
   18 #endif
   19 
   20 /* Must be kept in sync with struct utmp as defined in sys/utmp.h! */
   21 struct utmpx
   22 {
   23  short  ut_type;
   24  pid_t  ut_pid;
   25  char   ut_line[UT_LINESIZE];
   26  char   ut_id[UT_IDLEN];
   27  time_t ut_time;
   28  char   ut_user[UT_NAMESIZE];
   29  char   ut_host[UT_HOSTSIZE];
   30  long   ut_addr;
   31  struct timeval ut_tv;
   32 };
   33 
   34 #ifndef ut_name
   35 #define ut_name     ut_user
   36 #endif
   37 
   38 #ifndef ut_xtime
   39 #define ut_xtime    ut_tv.tv_sec
   40 #endif
   41 
   42 extern void endutxent (void);
   43 extern struct utmpx *getutxent (void);
   44 extern struct utmpx *getutxid (const struct utmpx *id);
   45 extern struct utmpx *getutxline (const struct utmpx *line);
   46 extern struct utmpx *pututxline (const struct utmpx *utmpx);
   47 extern void setutxent (void);
   48 extern int utmpxname (const char *file);
   49 extern void updwtmpx (const char *file, const struct utmpx *utmpx);
   50 
   51 #ifdef __cplusplus
   52 }
   53 #endif
   54 #endif /* UTMPX_H */