]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn.
authorHarlan Stenn <stenn@ntp.org>
Fri, 3 Jul 2015 19:27:53 +0000 (19:27 +0000)
committerHarlan Stenn <stenn@ntp.org>
Fri, 3 Jul 2015 19:27:53 +0000 (19:27 +0000)
bk: 5596e239scGhDnBAUIe1Y1nfaAjBJw

ChangeLog
sntp/tests/Makefile.am
sntp/unity/Makefile.am
sntp/unity/unity_config.h [new file with mode: 0644]
tests/bug-2803/Makefile.am
tests/libntp/Makefile.am
tests/ntpd/Makefile.am
tests/sandbox/Makefile.am
tests/sandbox/smeartest.c
tests/sec-2853/Makefile.am

index 7f44baea874024eadedfe4a85d2e589149ae97c4..63737822c4b9a00776ee19ec386499677494b022 100644 (file)
--- 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 <stenn@ntp.org>
 
index 2228aa0e73f20792a71d70e54d527c52ad6ec403..1a19068f4b724c0256685ed5e3111beab1852da5 100644 (file)
@@ -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)
 
index a09e36eb87952ef37c62e9432d272c03ac517bdc..3788146826601b21794ba2515ac228e900fed6ec 100644 (file)
@@ -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 (file)
index 0000000..a12fbfb
--- /dev/null
@@ -0,0 +1,8 @@
+/* unity_config.h */
+
+#ifndef UNITY_CONFIG_H
+#define UNITY_CONFIG_H
+
+#define UNITY_INCLUDE_DOUBLE
+
+#endif /* UNITY_CONFIG_H */
index eaf825feaab0a240b1f889f12789fabf75d870f1..1e0cd9cf373f861dc3a225b633cad8b68fb4fe67 100644 (file)
@@ -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)
 
index 288d38c79b7b0f2b0e4513b7f9342767666d5b97..3ff2c2248ed8e10695ef1570933a2f77bffca755 100644 (file)
@@ -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 =                    \
index c5df6e4a32c4213fffbec7b4721d4efdd8ebec99..96753e4205875d493cb56bb9fa1be832de94418c 100644 (file)
@@ -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)
 
index 489ceab57d0d61f0741130f563ee2dab6a1e24cb..75de59e02fb95b5526c2bac9ea1be62cdca6f888 100644 (file)
@@ -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)
 
index e1b04e5e375873e127773bb1009f70a3ab1c7787..a8ee2102e8742310793f91fd99f4f238e7862ddf 100644 (file)
@@ -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;
 }
index 417ff6bd9854f867069a50e34fe73670ca5d82fb..59734da1c4e14e80029d31de04446bbb9dfc2ee2 100644 (file)
@@ -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)