From: Harlan Stenn Date: Fri, 3 Jul 2015 19:27:53 +0000 (+0000) Subject: Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a0749f7cefe3deb4ba3b92bd25153a3e655c9c7;p=thirdparty%2Fntp.git Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn. bk: 5596e239scGhDnBAUIe1Y1nfaAjBJw --- diff --git a/ChangeLog b/ChangeLog index 7f44baea8..63737822c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger * [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger * libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn. +* Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn. --- (4.2.8p3) 2015/06/29 Released by Harlan Stenn diff --git a/sntp/tests/Makefile.am b/sntp/tests/Makefile.am index 2228aa0e7..1a19068f4 100644 --- a/sntp/tests/Makefile.am +++ b/sntp/tests/Makefile.am @@ -37,9 +37,11 @@ base_SOURCES = \ tests_SOURCES = \ $(base_SOURCES) \ + g_fileHandlingTest.h \ g_networking.cpp \ g_packetHandling.cpp \ g_packetProcessing.cpp \ + g_sntptest.h \ $(NULL) # HMS: this test was for the 4.2.6 sntp code. @@ -57,8 +59,6 @@ tests_SOURCES = \ noinst_HEADERS = \ fileHandlingTest.h \ sntptest.h \ - g_fileHandlingTest.h \ - g_sntptest.h \ $(NULL) dist_check_SCRIPTS = tests-runner @@ -116,6 +116,8 @@ AM_CPPFLAGS += $(LIBOPTS_CFLAGS) AM_CPPFLAGS += $(CPPFLAGS_LIBEVENT) AM_CPPFLAGS += $(GTEST_CPPFLAGS) AM_CPPFLAGS += $(CPPFLAGS_NTP) +AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H +AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_LDFLAGS = $(LDFLAGS_NTP) diff --git a/sntp/unity/Makefile.am b/sntp/unity/Makefile.am index a09e36eb8..378814682 100644 --- a/sntp/unity/Makefile.am +++ b/sntp/unity/Makefile.am @@ -6,7 +6,7 @@ CLEANFILES = noinst_LIBRARIES = libunity.a libunity_a_CFLAGS = \ - -DUNITY_INCLUDE_DOUBLE \ + -DUNITY_INCLUDE_CONFIG_H \ $(NULL) libunity_a_SOURCES = \ diff --git a/sntp/unity/unity_config.h b/sntp/unity/unity_config.h new file mode 100644 index 000000000..a12fbfb3a --- /dev/null +++ b/sntp/unity/unity_config.h @@ -0,0 +1,8 @@ +/* unity_config.h */ + +#ifndef UNITY_CONFIG_H +#define UNITY_CONFIG_H + +#define UNITY_INCLUDE_DOUBLE + +#endif /* UNITY_CONFIG_H */ diff --git a/tests/bug-2803/Makefile.am b/tests/bug-2803/Makefile.am index eaf825fea..1e0cd9cf3 100644 --- a/tests/bug-2803/Makefile.am +++ b/tests/bug-2803/Makefile.am @@ -27,6 +27,8 @@ AM_CPPFLAGS = $(NTP_INCS) AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_CPPFLAGS += -I$(top_srcdir)/include AM_CPPFLAGS += $(CPPFLAGS_NTP) +AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H +AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_LDFLAGS = $(LDFLAGS_NTP) diff --git a/tests/libntp/Makefile.am b/tests/libntp/Makefile.am index 288d38c79..3ff2c2248 100644 --- a/tests/libntp/Makefile.am +++ b/tests/libntp/Makefile.am @@ -78,6 +78,8 @@ AM_CPPFLAGS = $(NTP_INCS) AM_CPPFLAGS += -I$(top_srcdir)/sntp AM_CPPFLAGS += $(GTEST_CPPFLAGS) AM_CPPFLAGS += $(CPPFLAGS_NTP) +AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H +AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_LDFLAGS = $(LDFLAGS_NTP) @@ -260,7 +262,6 @@ test_buftvtots_SOURCES = \ test_buftvtots_CFLAGS = \ -I$(top_srcdir)/sntp/unity \ - -DUNITY_INCLUDE_DOUBLE \ $(NULL) $(srcdir)/run-buftvtots.c: $(srcdir)/buftvtots.c $(std_unity_list) @@ -439,7 +440,6 @@ $(srcdir)/run-humandate.c: $(srcdir)/humandate.c $(std_unity_list) test_lfpfunc_CFLAGS = \ -I$(top_srcdir)/sntp/unity \ - -DUNITY_INCLUDE_DOUBLE \ $(NULL) test_lfpfunc_LDADD = \ @@ -656,7 +656,6 @@ $(srcdir)/run-refnumtoa.c: $(srcdir)/refnumtoa.c $(std_unity_list) test_sfptostr_CFLAGS = \ -I$(top_srcdir)/sntp/unity \ - -DUNITY_INCLUDE_DOUBLE \ $(NULL) test_sfptostr_LDADD = \ @@ -802,7 +801,6 @@ $(srcdir)/run-tstotv.c: $(srcdir)/tstotv.c $(std_unity_list) test_tvtots_CFLAGS = \ -I$(top_srcdir)/sntp/unity \ - -DUNITY_INCLUDE_DOUBLE \ $(NULL) test_tvtots_LDADD = \ diff --git a/tests/ntpd/Makefile.am b/tests/ntpd/Makefile.am index c5df6e4a3..96753e420 100644 --- a/tests/ntpd/Makefile.am +++ b/tests/ntpd/Makefile.am @@ -21,6 +21,8 @@ AM_CPPFLAGS += -I$(top_srcdir)/sntp AM_CPPFLAGS += -I$(top_srcdir)/ntpd AM_CPPFLAGS += $(GTEST_CPPFLAGS) AM_CPPFLAGS += $(CPPFLAGS_NTP) +AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H +AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_LDFLAGS = $(LDFLAGS_NTP) diff --git a/tests/sandbox/Makefile.am b/tests/sandbox/Makefile.am index 489ceab57..75de59e02 100644 --- a/tests/sandbox/Makefile.am +++ b/tests/sandbox/Makefile.am @@ -23,6 +23,8 @@ AM_CPPFLAGS = $(NTP_INCS) AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_CPPFLAGS += -I$(top_srcdir)/include AM_CPPFLAGS += $(CPPFLAGS_NTP) +AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H +AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_LDFLAGS = $(LDFLAGS_NTP) diff --git a/tests/sandbox/smeartest.c b/tests/sandbox/smeartest.c index e1b04e5e3..a8ee2102e 100644 --- a/tests/sandbox/smeartest.c +++ b/tests/sandbox/smeartest.c @@ -127,6 +127,8 @@ ltor(l_fp l) main() { + l_fp l; + int rc; rtol(0xfe800000); rtol(0xfe800001); @@ -164,5 +166,15 @@ main() rtoltor(0xfe7ffffe); rtoltor(0xfe7fffff); + rc = atolfp("-.932087", &l); + ltor(l); + rtol(0xfec458b0); + printf("%x -> %d.%d.%d.%d\n", + 0xfec458b0, + 0xfe, + 0xc4, + 0x58, + 0xb0); + return 0; } diff --git a/tests/sec-2853/Makefile.am b/tests/sec-2853/Makefile.am index 417ff6bd9..59734da1c 100644 --- a/tests/sec-2853/Makefile.am +++ b/tests/sec-2853/Makefile.am @@ -27,6 +27,8 @@ AM_CPPFLAGS = $(NTP_INCS) AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_CPPFLAGS += -I$(top_srcdir)/include AM_CPPFLAGS += $(CPPFLAGS_NTP) +AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H +AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity AM_LDFLAGS = $(LDFLAGS_NTP)