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:
Corinna Vinschen
2016-01-07 15:40:40 +01:00
parent b8f9d8de2c
commit 80a800978b
6 changed files with 21 additions and 8 deletions

View File

@ -40,7 +40,7 @@ extern struct utmp *getutline (const struct utmp *);
extern struct utmp *pututline (const struct utmp *);
extern void endutent (void);
extern void setutent (void);
extern void utmpname (const char *);
extern int utmpname (const char *);
void login (const struct utmp *);
int logout (const char *);