* cygwin.din: Add utmpx symbols.
* syscalls.cc: Include utmpx.h. Implement utmpx functions as stubs to utmp functions. (copy_ut_to_utx): New static function. (pututline): Change from void to struct utmp * as on Linux. (setutxent): New function. (endutxent): New function. (getutxent): New function. (getutxid): New function. (getutxline): New function. (pututxline): New function. * include/utmpx.h: New file. * include/cygwin/utmp.h: New file. * include/cygwin/version.h: Bump API minor number. * include/sys/utmp.h: Include cygwin/utmp.h. Move stuff common with utmpx functionality there. (pututline): Declare struct utmp *.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/* sys/utmp.h
|
||||
|
||||
Copyright 2001 Red Hat, Inc.
|
||||
Copyright 2001, 2004 Red Hat, Inc.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of the
|
||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
@ -9,21 +9,14 @@
|
||||
#ifndef UTMP_H
|
||||
#define UTMP_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <paths.h>
|
||||
#include <cygwin/utmp.h>
|
||||
|
||||
#define UTMP_FILE _PATH_UTMP
|
||||
#define WTMP_FILE _PATH_WTMP
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UT_LINESIZE 16
|
||||
#define UT_NAMESIZE 16
|
||||
#define UT_HOSTSIZE 256
|
||||
#define UT_IDLEN 2
|
||||
#define ut_name ut_user
|
||||
|
||||
struct utmp
|
||||
@ -38,22 +31,12 @@ struct utmp
|
||||
long ut_addr;
|
||||
};
|
||||
|
||||
#define RUN_LVL 1
|
||||
#define BOOT_TIME 2
|
||||
#define NEW_TIME 3
|
||||
#define OLD_TIME 4
|
||||
|
||||
#define INIT_PROCESS 5
|
||||
#define LOGIN_PROCESS 6
|
||||
#define USER_PROCESS 7
|
||||
#define DEAD_PROCESS 8
|
||||
|
||||
extern struct utmp *_getutline (struct utmp *);
|
||||
extern struct utmp *getutent (void);
|
||||
extern struct utmp *getutid (struct utmp *);
|
||||
extern struct utmp *getutline (struct utmp *);
|
||||
extern struct utmp *pututline (struct utmp *);
|
||||
extern void endutent (void);
|
||||
extern void pututline (struct utmp *);
|
||||
extern void setutent (void);
|
||||
extern void utmpname (const char *);
|
||||
|
||||
|
Reference in New Issue
Block a user