Print this page
remove support for non-ANSI compilation


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*


  23  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*      Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T       */
  28 /*        All Rights Reserved   */
  29 
  30 /*
  31  * Portions of this source code were derived from Berkeley 4.3 BSD
  32  * under license from the Regents of the University of California.
  33  */
  34 
  35 #ifndef _UTMPX_H
  36 #define _UTMPX_H
  37 
  38 #pragma ident   "%Z%%M% %I%     %E% SMI"
  39 
  40 #include <sys/feature_tests.h>
  41 #include <sys/types.h>
  42 #include <sys/time.h>
  43 #include <utmp.h>
  44 
  45 #ifdef  __cplusplus
  46 extern "C" {
  47 #endif
  48 
  49 #define _UTMPX_FILE     "/var/adm/utmpx"
  50 #define _WTMPX_FILE     "/var/adm/wtmpx"
  51 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
  52 #define UTMPX_FILE      _UTMPX_FILE
  53 #define WTMPX_FILE      _WTMPX_FILE
  54 #endif
  55 
  56 #define ut_name ut_user
  57 #define ut_xtime ut_tv.tv_sec
  58 
  59 /*


 110                 int16_t e_termination;  /* process termination status */
 111                 int16_t e_exit;         /* process exit status */
 112         } ut_exit;                      /* exit status of a process */
 113         struct timeval32 ut_tv;         /* time entry was made */
 114         int32_t ut_session;             /* session ID, user for windowing */
 115         int32_t pad[5];                 /* reserved for future use */
 116         int16_t ut_syslen;              /* significant length of ut_host */
 117         char    ut_host[257];           /* remote host name */
 118 };
 119 
 120 #define MOD_WIN         10
 121 
 122 /*      Define and macro for determing if a normal user wrote the entry */
 123 /*      and marking the utmpx entry as a normal user */
 124 #define NONROOT_USRX    2
 125 #define nonuserx(utx)   ((utx).ut_exit.e_exit == NONROOT_USRX ? 1 : 0)
 126 #define setuserx(utx)   ((utx).ut_exit.e_exit = NONROOT_USRX)
 127 
 128 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 129 
 130 #if defined(__STDC__)
 131 
 132 extern void endutxent(void);
 133 extern struct utmpx *getutxent(void);
 134 extern struct utmpx *getutxid(const struct utmpx *);
 135 extern struct utmpx *getutxline(const struct utmpx *);
 136 extern struct utmpx *pututxline(const struct utmpx *);
 137 extern void setutxent(void);
 138 
 139 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 140 extern int utmpxname(const char *);
 141 extern struct utmpx *makeutx(const struct utmpx *);
 142 extern struct utmpx *modutx(const struct utmpx *);
 143 extern void getutmp(const struct utmpx *, struct utmp *);
 144 extern void getutmpx(const struct utmp *, struct utmpx *);
 145 extern void updwtmp(const char *, struct utmp *);
 146 extern void updwtmpx(const char *, struct utmpx *);
 147 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 148 
 149 #else /* __STDC__ */
 150 
 151 extern void endutxent();
 152 extern struct utmpx *getutxent();
 153 extern struct utmpx *getutxid();
 154 extern struct utmpx *getutxline();
 155 extern struct utmpx *pututxline();
 156 extern void setutxent();
 157 
 158 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 159 extern int utmpxname();
 160 extern struct utmpx *makeutx();
 161 extern struct utmpx *modutx();
 162 extern void getutmp();
 163 extern void getutmpx();
 164 extern void updwtmp();
 165 extern void updwtmpx();
 166 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 167 
 168 #endif /* __STDC__ */
 169 
 170 #ifdef  __cplusplus
 171 }
 172 #endif
 173 
 174 #endif  /* _UTMPX_H */


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24  *
  25  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29 /*      Copyright (c) 1983,1984,1985,1986,1987,1988,1989 AT&T       */
  30 /*        All Rights Reserved   */
  31 
  32 /*
  33  * Portions of this source code were derived from Berkeley 4.3 BSD
  34  * under license from the Regents of the University of California.
  35  */
  36 
  37 #ifndef _UTMPX_H
  38 #define _UTMPX_H
  39 


  40 #include <sys/feature_tests.h>
  41 #include <sys/types.h>
  42 #include <sys/time.h>
  43 #include <utmp.h>
  44 
  45 #ifdef  __cplusplus
  46 extern "C" {
  47 #endif
  48 
  49 #define _UTMPX_FILE     "/var/adm/utmpx"
  50 #define _WTMPX_FILE     "/var/adm/wtmpx"
  51 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
  52 #define UTMPX_FILE      _UTMPX_FILE
  53 #define WTMPX_FILE      _WTMPX_FILE
  54 #endif
  55 
  56 #define ut_name ut_user
  57 #define ut_xtime ut_tv.tv_sec
  58 
  59 /*


 110                 int16_t e_termination;  /* process termination status */
 111                 int16_t e_exit;         /* process exit status */
 112         } ut_exit;                      /* exit status of a process */
 113         struct timeval32 ut_tv;         /* time entry was made */
 114         int32_t ut_session;             /* session ID, user for windowing */
 115         int32_t pad[5];                 /* reserved for future use */
 116         int16_t ut_syslen;              /* significant length of ut_host */
 117         char    ut_host[257];           /* remote host name */
 118 };
 119 
 120 #define MOD_WIN         10
 121 
 122 /*      Define and macro for determing if a normal user wrote the entry */
 123 /*      and marking the utmpx entry as a normal user */
 124 #define NONROOT_USRX    2
 125 #define nonuserx(utx)   ((utx).ut_exit.e_exit == NONROOT_USRX ? 1 : 0)
 126 #define setuserx(utx)   ((utx).ut_exit.e_exit = NONROOT_USRX)
 127 
 128 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 129 


 130 extern void endutxent(void);
 131 extern struct utmpx *getutxent(void);
 132 extern struct utmpx *getutxid(const struct utmpx *);
 133 extern struct utmpx *getutxline(const struct utmpx *);
 134 extern struct utmpx *pututxline(const struct utmpx *);
 135 extern void setutxent(void);
 136 
 137 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 138 extern int utmpxname(const char *);
 139 extern struct utmpx *makeutx(const struct utmpx *);
 140 extern struct utmpx *modutx(const struct utmpx *);
 141 extern void getutmp(const struct utmpx *, struct utmp *);
 142 extern void getutmpx(const struct utmp *, struct utmpx *);
 143 extern void updwtmp(const char *, struct utmp *);
 144 extern void updwtmpx(const char *, struct utmpx *);
 145 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 146 





















 147 #ifdef  __cplusplus
 148 }
 149 #endif
 150 
 151 #endif  /* _UTMPX_H */