OSDN Git Service

* cygwin.din (utmpxname): Export.
authorcorinna <corinna>
Thu, 3 Mar 2005 22:08:10 +0000 (22:08 +0000)
committercorinna <corinna>
Thu, 3 Mar 2005 22:08:10 +0000 (22:08 +0000)
* 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.

winsup/cygwin/ChangeLog
winsup/cygwin/cygwin.din
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/include/sys/utmp.h
winsup/cygwin/include/utmpx.h
winsup/cygwin/syscalls.cc

index 0ddf158..811acb9 100644 (file)
@@ -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
index 594f114..8a0585d 100644 (file)
@@ -1489,6 +1489,7 @@ utimes SIGFE
 _utimes = utimes SIGFE
 utmpname SIGFE
 _utmpname = utmpname SIGFE
+utmpxname SIGFE
 valloc SIGFE
 vasprintf SIGFE
 _vasprintf = vasprintf SIGFE
index 9128505..6d965fd 100644 (file)
@@ -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
index ebc70b9..435891b 100644 (file)
 extern "C" {
 #endif
 
-#define ut_name ut_user
+#ifndef ut_name
+#define ut_name                ut_user
+#endif
+
 
 struct utmp 
 {
index 395c7a0..0e24ce8 100644 (file)
@@ -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
 }
index 4eda42b..180a2e8 100644 (file)
@@ -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];