[Git][NTPsec/ntpsec][master] 7 commits: Remove a now-unneeded layer of indirection.

Eric S. Raymond gitlab at mg.gitlab.com
Wed Jan 4 11:29:14 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
2abf3e5a by Eric S. Raymond at 2017-01-04T06:28:54-05:00
Remove a now-unneeded layer of indirection.

- - - - -
383711ea by Sanjeev Gupta at 2017-01-04T06:28:54-05:00
Parametrize install location in documentation

Replace "/usr/local" with a {prefixdir} defined
in asciidoc.conf

- - - - -
a46391bd by Sanjeev Gupta at 2017-01-04T06:28:54-05:00
No real change touch to force rebuild due to change in included file

- - - - -
3190b409 by Sanjeev Gupta at 2017-01-04T06:28:54-05:00
If prefixdir is changed for waf, do so for asciidoc.conf too

- - - - -
f3925b06 by Sanjeev Gupta at 2017-01-04T06:28:54-05:00
Clean up asciidoc.conf

- - - - -
b557bafa by Sanjeev Gupta at 2017-01-04T06:28:54-05:00
Improve commit based on review by Matt Selsky

- - - - -
d8504366 by Sanjeev Gupta at 2017-01-04T06:28:54-05:00
Fix error in ntp.conf default location

Thanks, Matt Selsky.  See
https://gitlab.com/NTPsec/ntpsec/merge_requests/255#note_20762354
for the review comment

- - - - -


9 changed files:

- INSTALL
- docs/asciidoc.conf
- docs/authopt.txt
- docs/build.txt
- docs/includes/auth-commands.txt
- docs/includes/ntpd-body.txt
- docs/includes/ntpkeygen-body.txt
- docs/ntpd.txt
- include/ntp_fp.h


Changes:

=====================================
INSTALL
=====================================
--- a/INSTALL
+++ b/INSTALL
@@ -182,6 +182,10 @@ By default, `waf install' will install the package's files in
 installation prefix other than `/usr/local' by giving waf the
 option `--prefix=PATH'.
 
+If you do so, please also modify the prefixdir variable in
+asciidoc.conf , so that the documentation is built pointing
+to your new locations.
+
 You should read the section "Path problems with the test tools" in
 devel/testing.txt before setting a non-default prefix.
 


=====================================
docs/asciidoc.conf
=====================================
--- a/docs/asciidoc.conf
+++ b/docs/asciidoc.conf
@@ -25,3 +25,7 @@ ntptimeman=ntptime(8)
 ntpwaitman=ntpwait(8)
 ntpdigman=ntpdig(1)
 ntpvizman=ntpviz(1)
+# This is to help distribution packagers
+# Change this to match install paths, and then build documentation
+prefixdir=/usr/local
+


=====================================
docs/authopt.txt
=====================================
--- a/docs/authopt.txt
+++ b/docs/authopt.txt
@@ -1,13 +1,13 @@
 = Authentication Commands and Options =
 
 [cols="10%,90%",frame="none",grid="none",style="verse"]
-|==============================
+|===============================
 |image:pic/alice44.gif[]|
 {millshome}pictures.html[from 'Alice's Adventures in Wonderland', Lewis Carroll]
 
 Our resident cryptographer; now you see him, now you don't.
 
-|==============================
+|===============================
 
 == Related Links ==
 


=====================================
docs/build.txt
=====================================
--- a/docs/build.txt
+++ b/docs/build.txt
@@ -67,6 +67,10 @@ configures the build process accordingly. Use the +./waf build+ command to
 compile and link the distribution and the +./waf install+ command to install
 the executables by default in +/usr/local/bin+.
 
+NOTE: Distribution packagers: If you modify the prefix parameter to
++waf+ to install the executables, please also modify the appropriate
+defines in +asciidoc.conf+ to specify document installation.
+
 [[conf]]
 == Configuration ==
 


=====================================
docs/includes/auth-commands.txt
=====================================
--- a/docs/includes/auth-commands.txt
+++ b/docs/includes/auth-commands.txt
@@ -15,7 +15,7 @@
   are used as described above. Unless the complete path and name of the
   file are specified, the location of a file is relative to the keys
   directory specified in the +keysdir+ command or default
-  +/usr/local/etc+. Following are the subcommands:
+  +{prefixdir}/etc+. Following are the subcommands:
 
   +cert+ _file_;;
     Specifies the location of the required host public certificate file.
@@ -64,7 +64,7 @@
 
 +keysdir+ _path_::
   This command specifies the default directory path for cryptographic
-  keys, parameters and certificates. The default is +/usr/local/etc/+.
+  keys, parameters and certificates. The default is +{prefixdir}/etc/+.
 
 [[trustedkey]]
 +trustedkey+ _key..._ ::


=====================================
docs/includes/ntpd-body.txt
=====================================
--- a/docs/includes/ntpd-body.txt
+++ b/docs/includes/ntpd-body.txt
@@ -502,17 +502,17 @@ as described in {ntpdconfman}.
 == FILES ==
 
 [options="header"]
-|================================================================
-|File               |Default         |Option      |Option
-|configuration file |+/etc/{ntpconf}+|+-c+        |+conffile+
-|frequency file     |none            |+-f+        |+driftfile+
-|leapseconds file   |none            |            |+leapfile+
-|process ID file    |none            |+-p+        |+pidfile+
-|log file           |system log      |+-l+        |+logfile+
-|include file       |none            |none        |+includefile+
-|statistics path    |+/var/NTP+      |+-s+        |+statsdir+
-|keys path          |+/usr/local/etc+|none        |+keysdir+
-|================================================================
+|===================================================================
+|File               |Default           |Option      |Option
+|configuration file |+/etc/{ntpconf}+  |+-c+        |+conffile+
+|frequency file     |none              |+-f+        |+driftfile+
+|leapseconds file   |none              |            |+leapfile+
+|process ID file    |none              |+-p+        |+pidfile+
+|log file           |system log        |+-l+        |+logfile+
+|include file       |none              |none        |+includefile+
+|statistics path    |+/var/NTP+        |+-s+        |+statsdir+
+|keys path          |+{prefixdir}/etc+ |none        |+keysdir+
+|===================================================================
 
 [[signals]]
 == SIGNALS ==


=====================================
docs/includes/ntpkeygen-body.txt
=====================================
--- a/docs/includes/ntpkeygen-body.txt
+++ b/docs/includes/ntpkeygen-body.txt
@@ -34,7 +34,7 @@ defined as passwords for the link:ntpq.html[+ntpq+] utility program.
 
 The safest way to run the +ntpkeygen+ program is logged in directly as
 root. The recommended procedure is change to the keys directory, usually
-+/usr/local/etc+, then run the program.
++{prefixdir}/etc+, then run the program.
 
 Installing the keys as root might not work in NFS-mounted shared file
 systems, as NFS clients may not be able to write to the shared keys
@@ -62,7 +62,7 @@ files generated at a specific time can be removed by a _rm_ _*filestamp_
 command.
 
 All files are installed by default in the keys directory
-+/usr/local/etc+, which is normally in a shared filesystem in
++{prefixdir}/etc+, which is normally in a shared filesystem in
 NFS-mounted networks. The actual location of the keys directory and each
 file can be overridden by configuration commands, but this is not
 recommended. Normally, the files for each host are generated by that


=====================================
docs/ntpd.txt
=====================================
--- a/docs/ntpd.txt
+++ b/docs/ntpd.txt
@@ -1,13 +1,13 @@
 = ntpd - Network Time Protocol (NTP) Daemon =
 
 [cols="10%,90%",frame="none",grid="none",style="verse"]
-|==============================
+|===============================
 |image:pic/wingdorothy.gif[]|
 {millshome}pictures.html[from 'The Wizard of Oz', L. Frank Baum]
 
 You need help from the monkeys.
 
-|==============================
+|===============================
 
 
 == Table of Contents ==


=====================================
include/ntp_fp.h
=====================================
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -31,41 +31,34 @@
  */
 typedef struct {
 	union {
-		uint32_t Xl_ui;
-		int32_t Xl_i;
+		uint32_t Xl_ui;		/* unsigned integral part */
+		int32_t Xl_i;		/* signed integral part */
 	} Ul_i;
 	uint32_t	l_uf;
 } l_fp;
 
-#define l_ui	Ul_i.Xl_ui		/* unsigned integral part */
-#define	l_i	Ul_i.Xl_i		/* signed integral part */
-
 #define lfpfrac(n)		((n).l_uf)
 #define setlfpfrac(n, v)	(n).l_uf = (v)
-#define lfpsint(n)		(n).l_i
-#define setlfpsint(n, v)	(n).l_i = (v)
-#define bumplfpsint(n, i)	(n).l_i += (i)
-#define lfpuint(n)		(n).l_ui
-#define setlfpuint(n, v)	(n).l_ui = (v)
-#define bumplfpuint(n, i)	(n).l_ui += (i)
-
-static inline uint64_t lfp_to_uint64(const l_fp lfp) {
+#define lfpsint(n)		(n).Ul_i.Xl_i
+#define setlfpsint(n, v)	(n).Ul_i.Xl_i = (v)
+#define bumplfpsint(n, i)	(n).Ul_i.Xl_i += (i)
+#define lfpuint(n)		(n).Ul_i.Xl_ui
+#define setlfpuint(n, v)	(n).Ul_i.Xl_ui = (v)
+#define bumplfpuint(n, i)	(n).Ul_i.Xl_ui += (i)
+
+static inline uint64_t lfp_to_uint64(const l_fp lfp)
+{
     return (uint64_t)lfpuint(lfp) << 32 | (uint64_t)lfpfrac(lfp);
 }
 
-static inline l_fp uint64_to_lfp(uint64_t x) {
+static inline l_fp uint64_to_lfp(uint64_t x)
+{
     l_fp fp;
     setlfpuint(fp, x >> 32);
     setlfpfrac(fp, x & 0xFFFFFFFFUL);
     return fp;
 }
 
-/*
- * Fractional precision (of an l_fp) is actually the number of
- * bits in an int32_t/uint32_t.
- */
-#define	FRACTION_PREC	(32)
-
 static inline l_fp lfpinit(int32_t hi, uint32_t lo)
 {
     l_fp tmp;
@@ -75,6 +68,12 @@ static inline l_fp lfpinit(int32_t hi, uint32_t lo)
 }
 
 /*
+ * Fractional precision (of an l_fp) is actually the number of
+ * bits in an int32_t/uint32_t.
+ */
+#define	FRACTION_PREC	(32)
+
+/*
  * The second fixed point format is 32 bits, with the decimal between
  * bits 15 and 16.  There is a signed version (s_fp) and an unsigned
  * version (u_fp).  This is used to represent synchronizing distance



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/98cdb484a80fb6e9c1f4cc85effe4ae49440cc5b...d85043666c5d2d2b345246c5d08250e120639df2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170104/e389a64c/attachment.html>


More information about the vc mailing list