[Git][NTPsec/ntpsec][master] 3 commits: Remove another unecessary (and technically perhaps not quite correct) union.
Eric S. Raymond
gitlab at mg.gitlab.com
Tue Nov 22 00:32:17 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
0dbe0abb by Eric S. Raymond at 2016-11-21T16:03:51-05:00
Remove another unecessary (and technically perhaps not quite correct) union.
- - - - -
7e7bccf7 by Eric S. Raymond at 2016-11-21T16:38:42-05:00
Add a loccount production.
- - - - -
1d01c498 by Eric S. Raymond at 2016-11-21T19:32:03-05:00
Avoid a stack trace if stout is closed, like "ntpq -p } hd -3".
The lines
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
are generated by the Pythion interpreter and do not seem to be
suppressible. See
http://stackoverflow.com/questions/12790328/how-to-silence-sys-excepthook-is-missing-error
for discussion.
- - - - -
3 changed files:
- include/ntp_types.h
- ntpq/ntpq
- wscript
Changes:
=====================================
include/ntp_types.h
=====================================
--- a/include/ntp_types.h
+++ b/include/ntp_types.h
@@ -92,10 +92,11 @@ typedef uint32_t tstamp_t; /* NTP seconds timestamp */
* Cloning malloc()'s behavior of always returning pointers suitably
* aligned for the strictest alignment requirement of any type is not
* easy to do portably, as the maximum alignment required is not
- * exposed. Use the size of a union of the types known to represent the
- * strictest alignment on some platform.
+ * exposed. Use the size of a struct of the types known to represent the
+ * strictest alignment on some platform. This will force the struct to
+ * have the strictest possible alignment.
*/
-typedef union max_alignment_tag {
+typedef struct max_alignment_tag {
double d;
} max_alignment;
=====================================
ntpq/ntpq
=====================================
--- a/ntpq/ntpq
+++ b/ntpq/ntpq
@@ -1592,4 +1592,6 @@ if __name__ == '__main__':
raise SystemExit(0)
except KeyboardInterrupt:
interpreter.say("\n")
+ except IOError:
+ print("Bailing out...")
# end
=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -246,6 +246,11 @@ def ifdex(ctx):
"Get a report on configuration symbols not accounted for."
ctx.exec_command("ifdex -X build/config.h -X devel/ifdex-ignores .")
+# See https://gitlab.com/esr/loccount
+def loccount(ctx):
+ "Report the SLOC count of the source tree."
+ ctx.exec_command("loccount -x=build .")
+
# The following sets edit modes for GNU EMACS
# Local Variables:
# mode:python
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/7b7ac6c1842cfc75f137ccaa009e5853537168f9...1d01c498d543c7bcd9e5ee7939731c720eefd6ce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161122/96064576/attachment.html>
More information about the vc
mailing list