[Git][NTPsec/ntpsec][master] 5 commits: libisc: move libisc/net.c to libntp/isc_net.c

Gary E. Miller gitlab at mg.gitlab.com
Thu Jun 8 01:01:18 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
d1001224 by Gary E. Miller at 2017-06-07T17:38:12-07:00
libisc: move libisc/net.c to libntp/isc_net.c

- - - - -
a3ce7703 by Gary E. Miller at 2017-06-07T17:41:31-07:00
libisc: move libisc/error.c to libntp/isc_error.c

- - - - -
0c0eb1f5 by Gary E. Miller at 2017-06-07T17:45:38-07:00
libisc: move libisc/interfaceiter.c to libntp/isc_interfaceiter.c

All ISC code now removed or merged.  Just need to remove the
leftover waf stuff.

- - - - -
d8db8146 by Gary E. Miller at 2017-06-07T17:56:29-07:00
libisc: p00f!

“This parrot is no more. It has ceased to be. It's expired and gone
to meet its maker. This is a late parrot. It's a stiff. Bereft of life,
it rests in peace. If you hadn't nailed it to the perch, it would be
pushing up the daisies. It's rung down the curtain and joined the choir
invisible. This is an ex-parrot.” -- John Cleese

- - - - -
b4461e57 by Gary E. Miller at 2017-06-07T17:59:05-07:00
waf: remove uused variable srcnode.

- - - - -


17 changed files:

- README
- attic/wscript
- devel/hacking.txt
- include/isc_mem.h
- − libisc/README
- − libisc/wscript
- libisc/error.c → libntp/isc_error.c
- libisc/interfaceiter.c → libntp/isc_interfaceiter.c
- libisc/net.c → libntp/isc_net.c
- libntp/wscript
- libparse/wscript
- ntpd/wscript
- ntpfrob/wscript
- ntptime/wscript
- tests/wscript
- wafhelpers/waf.py
- wscript


Changes:

=====================================
README
=====================================
--- a/README
+++ b/README
@@ -44,9 +44,6 @@ etc/::		Directory containing a motley collection of configuration files
 include/::	Directory containing include header files used by most
 		programs in the distribution.
 
-libisc/::	Utility code from Internet Systems Consortium.  The local
-		copy has been significantly trimmed and modified.
-
 libjsmn/::	A minimal JSON library used by the GPSD-JSON driver.
 
 libntp/::	Directory containing library source code used by most


=====================================
attic/wscript
=====================================
--- a/attic/wscript
+++ b/attic/wscript
@@ -6,7 +6,7 @@ def build(ctx):
     for name in util:
         ctx(
             target=name,
-            features="c cprogram bld_include src_include libisc_include",
+            features="c cprogram bld_include src_include",
             source=[name + ".c"],
             includes=["%s/%s/" % (bldnode, name)],
             use="ntp isc M SSL CRYPTO RT THR PTHREAD",


=====================================
devel/hacking.txt
=====================================
--- a/devel/hacking.txt
+++ b/devel/hacking.txt
@@ -69,8 +69,8 @@ Here are the non-standardized APIs that may be used:
 
 * getifaddrs(3) or an equivalent local API for iterating over the
   system's active UDP interfaces. However, the local details should be
-  hidden as an implementation of the interfaceiter.c functions under
-  libisc - not called directly from the rest of the code.
+  hidden as an implementation of the isc_interfaceiter.c functions,
+  not called directly from the rest of the code.
 
 === Banned functions ===
 


=====================================
include/isc_mem.h
=====================================
--- a/include/isc_mem.h
+++ b/include/isc_mem.h
@@ -1,9 +1,5 @@
 /*
- * libntp local override of isc/mem.h to stub it out.
- *
- * include/isc is searched before any of the libisc include
- * directories and should be used only for replacement NTP headers
- * overriding headers of the same name under libisc.
+ * libntp local copy of isc/mem.h.
  *
  * NOTE: this assumes the system malloc is thread-safe and does
  *	 not use any normal libisc locking.


=====================================
libisc/README deleted
=====================================
--- a/libisc/README
+++ /dev/null
@@ -1,16 +0,0 @@
-The code in this directory derives from an old version (91) of
-the ISC export library shipped with BIND9.  Most of the code in that
-library was not needed and has been discarded.
-
-It now defines a largish number of small convenience functions for working
-with sockets, and one non-trivial piece of machinery; iteration over
-the system's list of active TCP/IP sockets. This functionality is not
-standardized by POSIX, so here we provide a wrapper around three different
-platform-specific APIs:
-
-* The getifaddrs(3) library used on Linux and some *BSDs
-* The SIOCGLIFCONF ioctl used on Solaris and SunOS.
-* The sysctl() kernel call implemented on some BSDs.
-
-There are a few other entry points supporting cryptographic hashing,
-assertions, and error backtraces.


=====================================
libisc/wscript deleted
=====================================
--- a/libisc/wscript
+++ /dev/null
@@ -1,20 +0,0 @@
-
-def build(ctx):
-
-    libisc_source = [
-        "error.c",
-        "interfaceiter.c",
-        "net.c"
-    ]
-
-    ctx(
-        features="c bld_include src_include",
-        source=libisc_source,
-        target="libisc_obj",
-    )
-
-    ctx(
-        target="isc",
-        features="c cstlib bld_include src_include",
-        use="libisc_obj"
-    )


=====================================
libisc/error.c → libntp/isc_error.c
=====================================


=====================================
libisc/interfaceiter.c → libntp/isc_interfaceiter.c
=====================================


=====================================
libisc/net.c → libntp/isc_net.c
=====================================


=====================================
libntp/wscript
=====================================
--- a/libntp/wscript
+++ b/libntp/wscript
@@ -1,5 +1,4 @@
 def build(ctx):
-    srcnode = ctx.srcnode.abspath()
 
     libntp_source = [
         "assert.c",
@@ -11,6 +10,9 @@ def build(ctx):
         "getopt.c",
         "gpstolfp.c",
         "initnetwork.c",
+        "isc_error.c",
+        "isc_interfaceiter.c",
+        "isc_net.c",
         "macencrypt.c",
         "netof.c",
         "ntp_endian.c",


=====================================
libparse/wscript
=====================================
--- a/libparse/wscript
+++ b/libparse/wscript
@@ -23,6 +23,6 @@ def build(ctx):
 
     ctx(
         target="parse",
-        features="c cstlib bld_include src_include libisc_include",
+        features="c cstlib bld_include src_include",
         source=libparse_source,
     )


=====================================
ntpd/wscript
=====================================
--- a/ntpd/wscript
+++ b/ntpd/wscript
@@ -9,7 +9,7 @@ def build(ctx):
         bison_source = ["ntp_parser.y"]
 
         ctx(
-            features="c src_include bld_include libisc_include",
+            features="c src_include bld_include",
             includes=["%s/ntpd/" % srcnode,
                       "%s/" % ctx.bldnode.parent.abspath()
                       ],
@@ -31,7 +31,7 @@ def build(ctx):
         keyword_gen_source = ["keyword-gen.c", ]
 
         ctx(
-            features="c cprogram bld_include src_include libisc_include",
+            features="c cprogram bld_include src_include",
             includes=["%s/ntpd/" % bldnode,
                       "%s/" % ctx.bldnode.parent.abspath()
                       ],
@@ -68,7 +68,7 @@ def build(ctx):
     ]
 
     ctx(
-        features="c bld_include src_include libisc_include",
+        features="c bld_include src_include",
         includes=ctx.env.PLATFORM_INCLUDES,
         source=libntpd_source,
         target="libntpd_obj",
@@ -90,7 +90,7 @@ def build(ctx):
 
         ctx(
             target="refclock",
-            features="c bld_include src_include libisc_include",
+            features="c bld_include src_include",
             source=refclock_source,
         )
         use_refclock += "refclock"
@@ -98,7 +98,7 @@ def build(ctx):
         for file, define in ctx.env.REFCLOCK_SOURCE:
             ctx(
                 defines=["%s=1" % define],
-                features="c bld_include src_include libisc_include",
+                features="c bld_include src_include",
                 # XXX: These need to go into config.h
                 #      rather than the command line for the individual drivers
                 source="refclock_%s.c" % file,
@@ -122,8 +122,7 @@ def build(ctx):
     ]
 
     ctx(
-        features="c rtems_trace cprogram bld_include src_include "
-                 "libisc_include libisc_pthread_include",
+        features="c rtems_trace cprogram bld_include src_include",
         includes=["%s/host/ntpd/" % ctx.bldnode.parent.abspath(),
                   "%s/ntpd/" % srcnode,
                   ] + ctx.env.PLATFORM_INCLUDES,


=====================================
ntpfrob/wscript
=====================================
--- a/ntpfrob/wscript
+++ b/ntpfrob/wscript
@@ -5,7 +5,7 @@ def build(ctx):
                     'pps-api.c', 'tickadj.c']
 
     ctx(
-        features="c cprogram bld_include src_include libisc_include",
+        features="c cprogram bld_include src_include",
         includes=["%s/ntpfrob/" % bldnode],
         install_path='${BINDIR}',
         source=frob_sources,


=====================================
ntptime/wscript
=====================================
--- a/ntptime/wscript
+++ b/ntptime/wscript
@@ -5,7 +5,7 @@ def build(ctx):
 
         ctx(
             target="ntptime",
-            features="c cprogram bld_include src_include libisc_include",
+            features="c cprogram bld_include src_include",
             source=["ntptime.c"],
             includes=["%s/ntptime/" % bldnode,
                       "%s/ntptime/" % srcnode,


=====================================
tests/wscript
=====================================
--- a/tests/wscript
+++ b/tests/wscript
@@ -51,7 +51,7 @@ def build(ctx):
     ] + common_source
 
     ctx.ntp_test(
-        features="c cprogram bld_include src_include libisc_include test",
+        features="c cprogram bld_include src_include test",
         target="test_libntp",
         install_path=None,
         defines=unity_config + ["TEST_LIBNTP=1"],
@@ -75,7 +75,7 @@ def build(ctx):
 
         ctx.ntp_test(
             defines=unity_config + ["TEST_LIBPARSE=1"],
-            features="c cprogram bld_include src_include libisc_include test",
+            features="c cprogram bld_include src_include test",
             includes=["%s/tests/unity/" % srcnode,
                       "%s/tests/libparse/" % srcnode,
                       "%s/tests/common/" % srcnode
@@ -96,7 +96,7 @@ def build(ctx):
 
     ctx.ntp_test(
         defines=unity_config + ["TEST_NTPD=1"],
-        features="c cprogram bld_include src_include libisc_include test",
+        features="c cprogram bld_include src_include test",
         includes=["%s/tests/unity/" % srcnode,
                   "%s/ntpd/" % srcnode,
                   "%s/tests/libntp/" % srcnode,


=====================================
wafhelpers/waf.py
=====================================
--- a/wafhelpers/waf.py
+++ b/wafhelpers/waf.py
@@ -16,18 +16,6 @@ def insert_srcdir(self):
         self.includes += ["%s/include" % srcnode]
 
 
- at before_method('apply_incpaths')
- at feature('libisc_include')
-def insert_libiscdir(self):
-        srcnode = self.bld.srcnode.abspath()
-
-
- at before_method('apply_incpaths')
- at feature('libisc_pthread_include')
-def insert_libiscpthreaddir(self):
-        srcnode = self.bld.srcnode.abspath()
-
-
 def manpage_subst_fun(task, text):
         return text.replace("include::../docs/", "include::../../../docs/")
 


=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -1049,7 +1049,6 @@ def build(ctx):
         ctx.recurse("ntpd")
         return
 
-    ctx.recurse("libisc")
     if ctx.env.REFCLOCK_GENERIC:
         # Only required by the generic refclock
         ctx.recurse("libparse")



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/39e8006e049bc9d913ff915edcd88f74587349bc...b4461e57699f1f39b59cd90b3972c44f1fe1a307

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/39e8006e049bc9d913ff915edcd88f74587349bc...b4461e57699f1f39b59cd90b3972c44f1fe1a307
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170608/d2cd2c11/attachment.html>


More information about the vc mailing list