Blame sysdeps/gnu/utmpx.h

Packit 6c4009
/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef	_UTMPX_H
Packit 6c4009
#define	_UTMPX_H	1
Packit 6c4009
Packit 6c4009
#include <features.h>
Packit 6c4009
#include <sys/time.h>
Packit 6c4009
Packit 6c4009
/* Required according to Unix98.  */
Packit 6c4009
#ifndef __pid_t_defined
Packit 6c4009
typedef __pid_t pid_t;
Packit 6c4009
# define __pid_t_defined
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Get system dependent values and data structures.  */
Packit 6c4009
#include <bits/utmpx.h>
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
/* Compatibility names for the strings of the canonical file names.  */
Packit 6c4009
# define UTMPX_FILE	_PATH_UTMPX
Packit 6c4009
# define UTMPX_FILENAME	_PATH_UTMPX
Packit 6c4009
# define WTMPX_FILE	_PATH_WTMPX
Packit 6c4009
# define WTMPX_FILENAME	_PATH_WTMPX
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* For the getutmp{,x} functions we need the `struct utmp'.  */
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
struct utmp;
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
/* Open user accounting database.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern void setutxent (void);
Packit 6c4009
Packit 6c4009
/* Close user accounting database.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern void endutxent (void);
Packit 6c4009
Packit 6c4009
/* Get the next entry from the user accounting database.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern struct utmpx *getutxent (void);
Packit 6c4009
Packit 6c4009
/* Get the user accounting database entry corresponding to ID.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern struct utmpx *getutxid (const struct utmpx *__id);
Packit 6c4009
Packit 6c4009
/* Get the user accounting database entry corresponding to LINE.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern struct utmpx *getutxline (const struct utmpx *__line);
Packit 6c4009
Packit 6c4009
/* Write the entry UTMPX into the user accounting database.
Packit 6c4009
Packit 6c4009
   This function is a possible cancellation point and therefore not
Packit 6c4009
   marked with __THROW.  */
Packit 6c4009
extern struct utmpx *pututxline (const struct utmpx *__utmpx);
Packit 6c4009
Packit 6c4009
Packit 6c4009
#ifdef __USE_GNU
Packit 6c4009
/* Change name of the utmpx file to be examined.
Packit 6c4009
Packit 6c4009
   This function is not part of POSIX and therefore no official
Packit 6c4009
   cancellation point.  But due to similarity with an POSIX interface
Packit 6c4009
   or due to the implementation it is a cancellation point and
Packit 6c4009
   therefore not marked with __THROW.  */
Packit 6c4009
extern int utmpxname (const char *__file);
Packit 6c4009
Packit 6c4009
/* Append entry UTMP to the wtmpx-like file WTMPX_FILE.
Packit 6c4009
Packit 6c4009
   This function is not part of POSIX and therefore no official
Packit 6c4009
   cancellation point.  But due to similarity with an POSIX interface
Packit 6c4009
   or due to the implementation it is a cancellation point and
Packit 6c4009
   therefore not marked with __THROW.  */
Packit 6c4009
extern void updwtmpx (const char *__wtmpx_file,
Packit 6c4009
		      const struct utmpx *__utmpx);
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Copy the information in UTMPX to UTMP.
Packit 6c4009
Packit 6c4009
   This function is not part of POSIX and therefore no official
Packit 6c4009
   cancellation point.  But due to similarity with an POSIX interface
Packit 6c4009
   or due to the implementation it is a cancellation point and
Packit 6c4009
   therefore not marked with __THROW.  */
Packit 6c4009
extern void getutmp (const struct utmpx *__utmpx,
Packit 6c4009
		     struct utmp *__utmp);
Packit 6c4009
Packit 6c4009
/* Copy the information in UTMP to UTMPX.
Packit 6c4009
Packit 6c4009
   This function is not part of POSIX and therefore no official
Packit 6c4009
   cancellation point.  But due to similarity with an POSIX interface
Packit 6c4009
   or due to the implementation it is a cancellation point and
Packit 6c4009
   therefore not marked with __THROW.  */
Packit 6c4009
extern void getutmpx (const struct utmp *__utmp, struct utmpx *__utmpx);
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
__END_DECLS
Packit 6c4009
Packit 6c4009
#endif /* utmpx.h  */