[Git][NTPsec/ntpsec][master] Remove updwtmpx, more utmpx.h cleanup

Hal Murray gitlab at mg.gitlab.com
Wed Feb 10 19:56:44 UTC 2016


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
2edf6d81 by Hal Murray at 2016-02-10T11:54:58-08:00
Remove updwtmpx, more utmpx.h cleanup

It's a glibc addition, requires __GNU
Looks like it would duplicate the normal code.

- - - - -


2 changed files:

- libntp/systime.c
- pylib/configure.py


Changes:

=====================================
libntp/systime.c
=====================================
--- a/libntp/systime.c
+++ b/libntp/systime.c
@@ -485,22 +485,6 @@ step_systime(
 		pututxline(&utx);
 		endutxent();
 
-		/* Not POSIX - glibc extension */
-# ifdef HAVE_UPDWTMPX
-# define WTMPX_FILE "/var/log/wtmp"
-		/* WTMPX */
-		utx.ut_type = OLD_TIME;
-		utx.ut_tv.tv_sec = tvlast.tv_sec;
-		utx.ut_tv.tv_usec = tvlast.tv_usec;
-		strlcpy(utx.ut_line, OTIME_MSG, sizeof(utx.ut_line));
-		updwtmpx(WTMPX_FILE, &utx);
-		utx.ut_type = NEW_TIME;
-		utx.ut_tv.tv_sec = timetv.tv_sec;
-		utx.ut_tv.tv_usec = timetv.tv_usec;
-		strlcpy(utx.ut_line, NTIME_MSG, sizeof(utx.ut_line));
-		updwtmpx(WTMPX_FILE, &utx);
-# undef WTMPX_FILE
-# endif /* HAVE_UPDWTMPX */
 # undef OTIME_MSG
 # undef NTIME_MSG
 #endif


=====================================
pylib/configure.py
=====================================
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -287,8 +287,7 @@ def cmd_configure(ctx):
 		('strlcpy', ["string.h"]),
 		('strlcat', ["string.h"]),
 #HGM		('sysconf', ["unistd.h"]),
-		('timer_create', ["time.h"]),
-		('updwtmpx', ["utmpx.h"]),		# glibc
+		('timer_create', ["time.h"])
 		)
 	for ft in functions:
 		if len(ft) == 2:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/2edf6d815e10073219b9e860fa0055471c79a938
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160210/081442f4/attachment.html>


More information about the vc mailing list