diff options
Diffstat (limited to 'libparse')
-rw-r--r-- | libparse/Makefile.am | 15 | ||||
-rw-r--r-- | libparse/Makefile.in | 30 | ||||
-rw-r--r-- | libparse/clk_computime.c | 2 | ||||
-rw-r--r-- | libparse/clk_dcf7000.c | 2 | ||||
-rw-r--r-- | libparse/clk_hopf6021.c | 2 | ||||
-rw-r--r-- | libparse/clk_meinberg.c | 2 | ||||
-rw-r--r-- | libparse/clk_rawdcf.c | 2 | ||||
-rw-r--r-- | libparse/clk_rcc8000.c | 2 | ||||
-rw-r--r-- | libparse/clk_schmid.c | 2 | ||||
-rw-r--r-- | libparse/clk_sel240x.c | 2 | ||||
-rw-r--r-- | libparse/clk_trimtaip.c | 2 | ||||
-rw-r--r-- | libparse/clk_trimtsip.c | 2 | ||||
-rw-r--r-- | libparse/clk_varitext.c | 2 | ||||
-rw-r--r-- | libparse/clk_wharton.c | 2 | ||||
-rw-r--r-- | libparse/ieee754io.c | 25 | ||||
-rw-r--r-- | libparse/parse.c | 2 | ||||
-rw-r--r-- | libparse/parse_conf.c | 2 |
17 files changed, 55 insertions, 43 deletions
diff --git a/libparse/Makefile.am b/libparse/Makefile.am index a4a3ed264f2f..f88e3b2af36d 100644 --- a/libparse/Makefile.am +++ b/libparse/Makefile.am @@ -94,14 +94,9 @@ AM_LDFLAGS = $(NTP_HARD_LDFLAGS) EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed - sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new - sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new - mv -f info_trimble.new $@ - -#$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed -# sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new -# sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new -# mv -f info_trimble.new $@ + $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new + $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new + $(AM_V_at)mv -f info_trimble.new $@ kieee754io.o: $(srcdir)/ieee754io.c $(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@ @@ -165,11 +160,11 @@ parse: $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a parsesolaris.o: sys/systm.h -# [Bug3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the +# [Bug 3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the # ones from 'systm.h'. sys/systm.h: -mkdir sys - sed -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h + $(SED) -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h ## check-libparse is invoked by ntpd/Makefile.am check-libparse: $(noinst_LIBRARIES) diff --git a/libparse/Makefile.in b/libparse/Makefile.in index 07a0204c477b..75d5ad2a98c5 100644 --- a/libparse/Makefile.in +++ b/libparse/Makefile.in @@ -90,6 +90,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = parsestreams$(EXEEXT) parsesolaris$(EXEEXT) +@LIBNTP_SUBMAKES_TRUE@am__append_1 = check-libntp subdir = libparse ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \ @@ -423,6 +424,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@ +PATH_OPENSSL = @PATH_OPENSSL@ PATH_PERL = @PATH_PERL@ PATH_RUBY = @PATH_RUBY@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -522,9 +524,9 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ NULL = -BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER) check-libntp \ - .deps-ver -CLEANFILES = check-libntp .deps-ver +BUILT_SOURCES = $(VPHACK) info_trimble.c $(VPHACK_AFTER) \ + $(am__append_1) .deps-ver +CLEANFILES = .deps-ver DISTCLEANFILES = $(DEPDIR)/deps-ver noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@ EXTRA_LIBRARIES = libparse.a libparse_kernel.a @@ -998,14 +1000,9 @@ vphack_after: ) info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed - sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new - sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new - mv -f info_trimble.new $@ - -#$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed -# sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new -# sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new -# mv -f info_trimble.new $@ + $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new + $(AM_V_at)$(SED) -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new + $(AM_V_at)mv -f info_trimble.new $@ kieee754io.o: $(srcdir)/ieee754io.c $(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@ @@ -1069,20 +1066,19 @@ parse: $(parsesolaris_OBJECTS) libparse_kernel.a ../libntp/libntp.a parsesolaris.o: sys/systm.h -# [Bug3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the +# [Bug 3608] Solaris has inconsistent definitions of ffs() and fls(). Drop the # ones from 'systm.h'. sys/systm.h: -mkdir sys - sed -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h + $(SED) -e '/f[fl]s(.*)/d' < /usr/include/sys/systm.h > sys/systm.h check-libparse: $(noinst_LIBRARIES) @: do-nothing action to avoid default SCCS get -check-libntp: $(top_builddir)/libntp/libntp.a - @: avoid default SCCS get by some make implementations +.PHONY: check-libntp -$(top_builddir)/libntp/libntp.a: - cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a +@LIBNTP_SUBMAKES_TRUE@check-libntp: +@LIBNTP_SUBMAKES_TRUE@ cd $(top_builddir)/libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver @[ -f $@ ] || \ cp $(top_srcdir)/deps-ver $@ diff --git a/libparse/clk_computime.c b/libparse/clk_computime.c index 7273ac762e37..10ec9a7c1c97 100644 --- a/libparse/clk_computime.c +++ b/libparse/clk_computime.c @@ -182,7 +182,7 @@ inp_computime( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */ -int clk_computime_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_COMPUTIME) */ /* diff --git a/libparse/clk_dcf7000.c b/libparse/clk_dcf7000.c index 0621cd5649e4..4aeb4c39ba9f 100644 --- a/libparse/clk_dcf7000.c +++ b/libparse/clk_dcf7000.c @@ -176,7 +176,7 @@ inp_dcf7000( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */ -int clk_dcf7000_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_DCF7000) */ /* diff --git a/libparse/clk_hopf6021.c b/libparse/clk_hopf6021.c index b0b0c1ff2a73..436c92cb3b88 100644 --- a/libparse/clk_hopf6021.c +++ b/libparse/clk_hopf6021.c @@ -20,6 +20,8 @@ # include <config.h> #endif +#include "ntp_types.h" + #if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_HOPF6021) #include "ntp_fp.h" diff --git a/libparse/clk_meinberg.c b/libparse/clk_meinberg.c index e4ebf0acc605..1aa839bfd15a 100644 --- a/libparse/clk_meinberg.c +++ b/libparse/clk_meinberg.c @@ -733,7 +733,7 @@ gps_input( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */ -int clk_meinberg_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_MEINBERG) */ /* diff --git a/libparse/clk_rawdcf.c b/libparse/clk_rawdcf.c index 3fa74997c9bf..9b6eeafb163f 100644 --- a/libparse/clk_rawdcf.c +++ b/libparse/clk_rawdcf.c @@ -742,7 +742,7 @@ inp_rawdcf( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */ -int clk_rawdcf_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RAWDCF) */ /* diff --git a/libparse/clk_rcc8000.c b/libparse/clk_rcc8000.c index 11d52acc5a24..e9bb115da4f5 100644 --- a/libparse/clk_rcc8000.c +++ b/libparse/clk_rcc8000.c @@ -163,7 +163,7 @@ inp_rcc8000( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */ -int clk_rcc8000_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_RCC8000) */ /* diff --git a/libparse/clk_schmid.c b/libparse/clk_schmid.c index d85b1a5da512..5dd52047aa0f 100644 --- a/libparse/clk_schmid.c +++ b/libparse/clk_schmid.c @@ -222,7 +222,7 @@ inp_schmid( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */ -int clk_schmid_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SCHMID) */ /* diff --git a/libparse/clk_sel240x.c b/libparse/clk_sel240x.c index b1390b4cefb1..f27b662491f1 100644 --- a/libparse/clk_sel240x.c +++ b/libparse/clk_sel240x.c @@ -168,5 +168,5 @@ cvt_sel240x( unsigned char *buffer, } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */ -int clk_sel240x_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */ diff --git a/libparse/clk_trimtaip.c b/libparse/clk_trimtaip.c index a60d01ec1870..ce930952ffa2 100644 --- a/libparse/clk_trimtaip.c +++ b/libparse/clk_trimtaip.c @@ -181,7 +181,7 @@ inp_trimtaip( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */ -int clk_trimtaip_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTAIP) */ /* diff --git a/libparse/clk_trimtsip.c b/libparse/clk_trimtsip.c index 8cf5660657cc..5af69d349eea 100644 --- a/libparse/clk_trimtsip.c +++ b/libparse/clk_trimtsip.c @@ -388,7 +388,7 @@ cvt_trimtsip( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */ -int clk_trimtsip_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_TRIMTSIP && !PARSESTREAM) */ /* diff --git a/libparse/clk_varitext.c b/libparse/clk_varitext.c index 0d830354d799..a4c6d31b797a 100644 --- a/libparse/clk_varitext.c +++ b/libparse/clk_varitext.c @@ -252,7 +252,7 @@ inp_varitext( } #else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */ -int clk_varitext_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_VARITEXT) */ /* diff --git a/libparse/clk_wharton.c b/libparse/clk_wharton.c index fbe9cc95f5f7..2df425bc67b7 100644 --- a/libparse/clk_wharton.c +++ b/libparse/clk_wharton.c @@ -9,6 +9,8 @@ #include <config.h> #endif +#include "ntp_types.h" + #if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_WHARTON_400A) /* * Support for WHARTON 400A Series clock + 404.2 serial interface. diff --git a/libparse/ieee754io.c b/libparse/ieee754io.c index 61bc8533b0d7..b41a96c2170e 100644 --- a/libparse/ieee754io.c +++ b/libparse/ieee754io.c @@ -50,8 +50,6 @@ static void put_byte (unsigned char *, offsets_t, int *, unsigned char); #ifdef LIBDEBUG -#include "lib_strbuf.h" - static char * fmt_blong( unsigned long val, @@ -396,7 +394,22 @@ fetch_ieee754( } } } - + +/* + * DLH: This function is currently unused in ntpd. If you think about + * using it, be sure it does what you intend. I notice the bufpp arg + * is never referenced, and the calculated mantissa_high & mantissa_low + * are only referenced in debug output. It seems they're supposed to + * be composed into an ieee754-format float and stored at *bufpp or + * possibly **bufpp. Brought to my attention by this: + * + * ieee754io.c:414:10: warning: variable 'mantissa_low' set but not used + * [-Wunused-but-set-variable] + * + * To quiet it I'm #ifdef'ing the function away for now, here and below + * the call to it in main(). + */ +#ifdef PUT_IEEE754_UNUSED_FUNC int put_ieee754( unsigned char **bufpp, @@ -536,6 +549,7 @@ put_ieee754( } return IEEE_OK; } +#endif /* PUT_IEEE754_UNUSED_FUNC */ #if defined(DEBUG) && defined(LIBDEBUG) @@ -562,8 +576,11 @@ int main( printf("fetch from %f = %d\n", f, fetch_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off)); printf("fp [%s %s] = %s\n", fmt_blong(fp.l_ui, 32), fmt_blong(fp.l_uf, 32), mfptoa(fp.l_ui, fp.l_uf, 15)); f_p = &f; +#ifdef PUT_IEEE754_UNUSED_FUNC put_ieee754((void *)&f_p, IEEE_DOUBLE, &fp, native_off); - +/* there should be a check on *f_p (f) having the expected result here */ +#endif /* PUT_IEEE754_UNUSED_FUNC */ + return 0; } diff --git a/libparse/parse.c b/libparse/parse.c index 69395ac4a560..56f2c3702bd8 100644 --- a/libparse/parse.c +++ b/libparse/parse.c @@ -875,7 +875,7 @@ parse_setcs( } #else /* not (REFCLOCK && CLOCK_PARSE) */ -int parse_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE) */ /* diff --git a/libparse/parse_conf.c b/libparse/parse_conf.c index 37871c9de887..ad7a47aa937f 100644 --- a/libparse/parse_conf.c +++ b/libparse/parse_conf.c @@ -148,7 +148,7 @@ clockformat_t *clockformats[] = unsigned short nformats = sizeof(clockformats) / sizeof(clockformats[0]) - 1; #else /* not (REFCLOCK && CLOCK_PARSE) */ -int parse_conf_bs; +NONEMPTY_TRANSLATION_UNIT #endif /* not (REFCLOCK && CLOCK_PARSE) */ /* |