290: Add sysconf cache handling.
291: Export aligned_alloc, at_quick_exit, quick_exit.
292: Export rpmatch.
+ 293: Convert utmpname/utmpxname to int.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull,
sigaltstack, sethostname. */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 292
+#define CYGWIN_VERSION_API_MINOR 293
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
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 *);
#include <cygwin/utmp.h>
#include <sys/time.h>
+#define _PATH_UTMPX _PATH_UTMP
#define UTMPX_FILE _PATH_UTMP
#ifdef __cplusplus
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
- Fix (numeric and monetary) decimal point and thousands separator in
fa_IR and ps_AF locales to be aligned with Linux.
+- utmpname/utmpxname are now defined as int functions as on Linux.
+ Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00320.html
+
Bug Fixes
---------
}
}
-extern "C" void
+extern "C" int
utmpname (const char *file)
{
__try
{
endutent ();
utmp_file = strdup (file);
- debug_printf ("New UTMP file: %s", utmp_file);
- return;
+ if (utmp_file)
+ {
+ debug_printf ("New UTMP file: %s", utmp_file);
+ return 0;
+ }
}
}
- __except (NO_ERROR) {}
+ __except (EFAULT) {}
__endtry
- debug_printf ("Invalid file");
+ debug_printf ("Setting UTMP file failed");
+ return -1;
}
EXPORT_ALIAS (utmpname, utmpxname)
fa_IR and ps_AF locales to be aligned with Linux.
</para></listitem>
+<listitem><para>
+utmpname/utmpxname are now defined as int functions as on Linux.
+</para></listitem>
+
</itemizedlist>
</sect2>