Convert utmp{x}name to int, return useful value. Define _PATH_UTMPX
* syscalls.cc (utmpname): Convert to int. Return 0 if strdup worked, -1 otherwise. * include/utmpx.h (_PATH_UTMPX): Define as _PATH_UTMP. (utmpxname): Declare as int function. * include/sys/utmp.h (utmpname): Ditto. * include/cygwin/version.h: Bump API minor version. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include <cygwin/utmp.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#define _PATH_UTMPX _PATH_UTMP
|
||||
#define UTMPX_FILE _PATH_UTMP
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -46,7 +47,7 @@ extern struct utmpx *getutxid (const struct utmpx *id);
|
||||
extern struct utmpx *getutxline (const struct utmpx *line);
|
||||
extern struct utmpx *pututxline (const struct utmpx *utmpx);
|
||||
extern void setutxent (void);
|
||||
extern void utmpxname (const char *file);
|
||||
extern int utmpxname (const char *file);
|
||||
extern void updwtmpx (const char *file, const struct utmpx *utmpx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user