Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/nathanw_sa]: src/include Catch up to -current.



details:   https://anonhg.NetBSD.org/src/rev/dcb4f7c8bfe0
branches:  nathanw_sa
changeset: 506086:dcb4f7c8bfe0
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Thu Aug 01 03:31:28 2002 +0000

description:
Catch up to -current.

diffstat:

 include/time.h  |  19 ++++++++++++++++---
 include/util.h  |   6 +++++-
 include/utmp.h  |   9 ++++++++-
 include/utmpx.h |  30 +++++++++++++++---------------
 4 files changed, 44 insertions(+), 20 deletions(-)

diffs (146 lines):

diff -r dadc6015df2a -r dcb4f7c8bfe0 include/time.h
--- a/include/time.h    Thu Aug 01 03:30:54 2002 +0000
+++ b/include/time.h    Thu Aug 01 03:31:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: time.h,v 1.25.2.1 2001/04/08 20:31:41 nathanw Exp $    */
+/*     $NetBSD: time.h,v 1.25.2.2 2002/08/01 03:31:28 nathanw Exp $    */
 
 /*
  * Copyright (c) 1989, 1993
@@ -46,7 +46,6 @@
 #include <sys/cdefs.h>
 #include <sys/featuretest.h>
 #include <machine/ansi.h>
-#include <machine/limits.h>    /* Include file containing CLK_TCK. */
 
 #include <sys/null.h>
 
@@ -104,7 +103,21 @@
 time_t time __P((time_t *));
 
 #if !defined(_ANSI_SOURCE)
-#define CLK_TCK                100
+
+#ifdef __LIBC12_SOURCE__
+#define CLK_TCK 100
+#else
+
+/*
+ * CLK_TCK uses libc's internal __sysconf() to retrieve the machine's
+ * HZ. The value of _SC_CLK_TCK is 39 -- we hard code it so we do not
+ * need to include unistd.h
+ */
+long __sysconf __P((int));
+#define CLK_TCK                (__sysconf(39))
+
+#endif
+
 extern __aconst char *tzname[2];
 void tzset __P((void));
 
diff -r dadc6015df2a -r dcb4f7c8bfe0 include/util.h
--- a/include/util.h    Thu Aug 01 03:30:54 2002 +0000
+++ b/include/util.h    Thu Aug 01 03:31:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.h,v 1.19.2.3 2002/06/21 18:17:09 nathanw Exp $    */
+/*     $NetBSD: util.h,v 1.19.2.4 2002/08/01 03:31:28 nathanw Exp $    */
 
 /*-
  * Copyright (c) 1995
@@ -43,6 +43,7 @@
 #include <pwd.h>
 #include <termios.h>
 #include <utmp.h>
+#include <utmpx.h>
 
 #define        PIDLOCK_NONBLOCK        1
 #define PIDLOCK_USEHOSTNAME    2
@@ -66,9 +67,12 @@
 int            getmaxpartitions(void);
 int            getrawpartition(void);
 void           login(const struct utmp *);
+void           loginx(const struct utmpx *);
 int            login_tty(int);
 int            logout(const char *);
+int            logoutx(const char *, int, int);
 void           logwtmp(const char *, const char *, const char *);
+void           logwtmpx(const char *, const char *, const char *, int, int);
 int            opendisk(const char *, int, char *, size_t, int);
 int            openpty(int *, int *, char *, struct termios *,
                        struct winsize *);
diff -r dadc6015df2a -r dcb4f7c8bfe0 include/utmp.h
--- a/include/utmp.h    Thu Aug 01 03:30:54 2002 +0000
+++ b/include/utmp.h    Thu Aug 01 03:31:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: utmp.h,v 1.6 1994/10/26 00:56:40 cgd Exp $     */
+/*     $NetBSD: utmp.h,v 1.6.20.1 2002/08/01 03:31:28 nathanw Exp $    */
 
 /*
  * Copyright (c) 1988, 1993
@@ -64,4 +64,11 @@
        time_t  ut_time;
 };
 
+__BEGIN_DECLS
+int utmpname __P((const char *));
+void setutent __P((void));
+struct utmp *getutent __P((void));
+void endutent __P((void));
+__END_DECLS
+
 #endif /* !_UTMP_H_ */
diff -r dadc6015df2a -r dcb4f7c8bfe0 include/utmpx.h
--- a/include/utmpx.h   Thu Aug 01 03:30:54 2002 +0000
+++ b/include/utmpx.h   Thu Aug 01 03:31:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: utmpx.h,v 1.5.2.4 2002/06/21 18:17:10 nathanw Exp $     */
+/*     $NetBSD: utmpx.h,v 1.5.2.5 2002/08/01 03:31:28 nathanw Exp $     */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -102,7 +102,7 @@
 
 #ifndef _XOPEN_SOURCE
 struct lastlogx {
-       struct timespec ll_time;        /* time entry was created */
+       struct timeval ll_tv;           /* time entry was created */
        char ll_line[_UTX_LINESIZE];    /* tty name */
        char ll_host[_UTX_HOSTSIZE];    /* host name */
        struct sockaddr_storage ll_ss;  /* address where entry was made from */
@@ -111,23 +111,23 @@
 
 __BEGIN_DECLS
 
-void setutxent(void);
-void endutxent(void);
-struct utmpx *getutxent(void);
-struct utmpx *getutxid(const struct utmpx *);
-struct utmpx *getutxline(const struct utmpx *);
-struct utmpx *pututxline(const struct utmpx *);
+void setutxent __P((void));
+void endutxent __P((void));
+struct utmpx *getutxent __P((void));
+struct utmpx *getutxid __P((const struct utmpx *));
+struct utmpx *getutxline __P((const struct utmpx *));
+struct utmpx *pututxline __P((const struct utmpx *));
 
 #ifndef _XOPEN_SOURCE
-void updwtmpx(const char *, const struct utmpx *);
-int lastlogxname(const char *);
-struct lastlogx *getlastlogxuid(uid_t);
-void updlastlogx(const char *, struct lastlogx *);
+int updwtmpx __P((const char *, const struct utmpx *));
+int lastlogxname __P((const char *));
+struct lastlogx *getlastlogx __P((uid_t, struct lastlogx *));
+int updlastlogx __P((const char *, uid_t, struct lastlogx *));
 struct utmp;
-void getutmp(const struct utmpx *, struct utmp *);
-void getutmpx(const struct utmp *, struct utmpx *);
+void getutmp __P((const struct utmpx *, struct utmp *));
+void getutmpx __P((const struct utmp *, struct utmpx *));
 
-int utmpxname(const char *);
+int utmpxname __P((const char *));
 
 #endif /* !_XOPEN_SOURCE */
 



Home | Main Index | Thread Index | Old Index