Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-03-04 01:08:12 +0300
committerCorinna Vinschen <corinna@vinschen.de>2005-03-04 01:08:12 +0300
commit6b76b0c5d4cfa2ba26b33ce375f83642eb071600 (patch)
tree6ba0d85073a00fb816bcea853d0797b99a9de89f
parent33aca5632219e9ca6ca44b6257c53618249bf3c3 (diff)
* cygwin.din (utmpxname): Export.
* syscalls.cc (utmpxname): Create export alias to utmpname. * include/utmpx.h: Define ut_name and ut_xtime if not already defined. (utmpxname): Add prototype. * include/sys/utmp.h: Only define ut_name if not already defined. * include/cygwin/version.h: Bump API minor version.
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/cygwin.din1
-rw-r--r--winsup/cygwin/include/cygwin/version.h3
-rw-r--r--winsup/cygwin/include/sys/utmp.h5
-rw-r--r--winsup/cygwin/include/utmpx.h9
-rw-r--r--winsup/cygwin/syscalls.cc1
6 files changed, 26 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0ddf15893..811acb965 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,12 @@
+2005-03-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwin.din (utmpxname): Export.
+ * syscalls.cc (utmpxname): Create export alias to utmpname.
+ * include/utmpx.h: Define ut_name and ut_xtime if not already defined.
+ (utmpxname): Add prototype.
+ * include/sys/utmp.h: Only define ut_name if not already defined.
+ * include/cygwin/version.h: Bump API minor version.
+
2005-03-03 Christopher Faylor <cgf@timesys.com>
* cygthread.cc (cygthread::detach): Use a slightly higher priority when
diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din
index 594f114e7..8a0585de6 100644
--- a/winsup/cygwin/cygwin.din
+++ b/winsup/cygwin/cygwin.din
@@ -1489,6 +1489,7 @@ utimes SIGFE
_utimes = utimes SIGFE
utmpname SIGFE
_utmpname = utmpname SIGFE
+utmpxname SIGFE
valloc SIGFE
vasprintf SIGFE
_vasprintf = vasprintf SIGFE
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 9128505ef..6d965fdff 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -249,12 +249,13 @@ details. */
119: Export fdatasync.
120: Export basename, dirname.
122: Export statvfs, fstatvfs.
+ 123: Export utmpxname.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 122
+#define CYGWIN_VERSION_API_MINOR 123
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/include/sys/utmp.h b/winsup/cygwin/include/sys/utmp.h
index ebc70b9bc..435891b18 100644
--- a/winsup/cygwin/include/sys/utmp.h
+++ b/winsup/cygwin/include/sys/utmp.h
@@ -17,7 +17,10 @@
extern "C" {
#endif
-#define ut_name ut_user
+#ifndef ut_name
+#define ut_name ut_user
+#endif
+
struct utmp
{
diff --git a/winsup/cygwin/include/utmpx.h b/winsup/cygwin/include/utmpx.h
index 395c7a09a..0e24ce884 100644
--- a/winsup/cygwin/include/utmpx.h
+++ b/winsup/cygwin/include/utmpx.h
@@ -32,12 +32,21 @@ struct utmpx
struct timeval ut_tv;
};
+#ifndef ut_name
+#define ut_name ut_user
+#endif
+
+#ifndef ut_xtime
+#define ut_xtime ut_tv.tv_sec
+#endif
+
extern void endutxent (void);
extern struct utmpx *getutxent (void);
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);
#ifdef __cplusplus
}
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 4eda42bee..180a2e808 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -2597,6 +2597,7 @@ utmpname (const char *file)
utmp_file = strdup (file);
debug_printf ("New UTMP file: %s", utmp_file);
}
+EXPORT_ALIAS (utmpname, utmpxname)
/* Note: do not make NO_COPY */
static struct utmp utmp_data_buf[16];