]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Add ChangeLog entries, Windows build tweaks to Juergen Perlinger's
authorDave Hart <hart@ntp.org>
Wed, 3 Nov 2010 21:24:43 +0000 (21:24 +0000)
committerDave Hart <hart@ntp.org>
Wed, 3 Nov 2010 21:24:43 +0000 (21:24 +0000)
  calendar refactoring and [Bug 1697]

bk: 4cd1d31bmLEuuJHg8Wcz7oxhh8SpAg

13 files changed:
ChangeLog
configure.ac
ports/winnt/include/config.h
ports/winnt/vc6/libntp.dsp
ports/winnt/vs2003/libntp.vcproj
ports/winnt/vs2005/libntp.vcproj
ports/winnt/vs2008/libntp/libntp.vcproj
sntp/configure.ac
sntp/tests/crypto.cpp
tests/libntp/a_md5encrypt.cpp
tests/libntp/authkeys.cpp
tests/libntp/refnumtoa.cpp
tests/libntp/ssl_init.cpp

index c1a6a7c45e047c7472c13490ce1870f44c32cd74..517ac246ec5998bb7254c9f28dfd6667ca9c4df9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+* [Bug 1697] filegen implementation should be improved.
+* Refactor calendar functions in terms of new common code.
 (4.2.7p77) 2010/11/03 Released by Harlan Stenn <stenn@ntp.org>
 * [Bug 1692] packageinfo.sh needs to be "sourced" using ./ .
 * [Bug 1695] ntpdate takes longer than necessary.
index 38c6d2bb67062dce324661016a6a8b77d0eb5ada..e089f4678699e35e71c92ef581dd05a44c958360 100644 (file)
@@ -1225,9 +1225,10 @@ case "$ac_cv_c_inline" in
 esac
 
 AC_C_CHAR_UNSIGNED             dnl CROSS_COMPILE?
-AC_CHECK_SIZEOF(signed char)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF([signed char])
+AC_CHECK_SIZEOF([short])
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([long])
 
 AC_CHECK_TYPES([s_char])
 case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
index aadca731f1edaf5692675b2e876cdd42e80b8d54..056d91e6100e2d367c3f679af8537f719efdf092 100644 (file)
@@ -353,6 +353,7 @@ typedef __int32 int32_t;    /* define a typedef for int32_t */
 # define HAVE_GETCLOCK
 
 # define SIZEOF_SIGNED_CHAR    1
+# define SIZEOF_SHORT          2
 # define SIZEOF_INT            4       /* for ntp_types.h */
 
 # define HAVE_SETVBUF
index 51d2904b7a47faffdce86b71a8cee02d1e878544..df3ee6b3365a551b36a8e2657efff314cb43e5dc 100644 (file)
@@ -318,6 +318,10 @@ SOURCE=..\..\..\lib\isc\netscope.c
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\..\libntp\ntp_calendar.c\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\..\libntp\ntp_lineedit.c\r
 # End Source File\r
 # Begin Source File\r
index 56873c17e170457a6a3108314a67eda4b82befba..fd65f2f33861aa054c9f00e3dfa395c1051f16e4 100644 (file)
                                                PreprocessorDefinitions=""/>
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath="..\..\..\libntp\ntp_calendar.c">
+                               <FileConfiguration
+                                       Name="Debug|Win32">
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"/>
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32">
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""/>
+                               </FileConfiguration>
+                       </File>
                        <File
                                RelativePath="..\..\..\libntp\ntp_lineedit.c">
                                <FileConfiguration
index 0bf1955bcdd85e52dd45e60f2a264a56140b25de..b3404ae1a55be640f98cfa0069eca8a4772736d6 100644 (file)
                                        />
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath="..\..\..\libntp\ntp_calendar.c"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
                        <File
                                RelativePath="..\..\..\libntp\ntp_lineedit.c"
                                >
index 115a70e138a87e1a65802d7c6e15464136eb4880..d8c64a3e362b88b829e7a2c8798c47ec8adc5ff1 100644 (file)
                                RelativePath="..\..\..\..\lib\isc\netscope.c"
                                >
                        </File>
+                       <File
+                               RelativePath="..\..\..\..\libntp\ntp_calendar.c"
+                               >
+                       </File>
                        <File
                                RelativePath="..\..\..\..\libntp\ntp_lineedit.c"
                                >
                                >
                        </File>
                        <File
-                               RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+                               RelativePath="..\..\include\sys\time.h"
                                >
                        </File>
                        <File
-                               RelativePath="..\..\include\sys\time.h"
+                               RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
                                >
                        </File>
                        <File
index c7e7bc8e809785046dfa813409e356346a76aeda..410103ab7e37aed7ee798150b622084b5cdfdf70 100644 (file)
@@ -207,6 +207,7 @@ esac
 
 AC_C_CHAR_UNSIGNED             dnl CROSS_COMPILE?
 AC_CHECK_SIZEOF([signed char])
+AC_CHECK_SIZEOF([short])
 AC_CHECK_SIZEOF([int])
 AC_CHECK_SIZEOF([long])
 
index ade6cfb0fd8bde47603309fa246ecc8e64094a7b..a6f89f5aa84214c9accd676af9b7bc67e970dbb9 100644 (file)
@@ -31,6 +31,7 @@ TEST_F(cryptoTest, MakeMd5Mac) {
        EXPECT_TRUE(memcmp(EXPECTED_DIGEST, actual, MD5_LENGTH) == 0);
 }
 
+#ifdef OPENSSL
 TEST_F(cryptoTest, MakeSHA1Mac) {
        const char* PKT_DATA = "abcdefgh0123";
        const int PKT_LEN = strlen(PKT_DATA);
@@ -51,6 +52,7 @@ TEST_F(cryptoTest, MakeSHA1Mac) {
 
        EXPECT_TRUE(memcmp(EXPECTED_DIGEST, actual, SHA1_LENGTH) == 0);
 }
+#endif /* OPENSSL */
 
 TEST_F(cryptoTest, VerifyCorrectMD5) {
        const char* PKT_DATA =
@@ -70,6 +72,7 @@ TEST_F(cryptoTest, VerifyCorrectMD5) {
        EXPECT_TRUE(auth_md5((char*)PKT_DATA, PKT_LEN, MD5_LENGTH, &md5));
 }
 
+#ifdef OPENSSL
 TEST_F(cryptoTest, VerifySHA1) {
        const char* PKT_DATA =
                "sometestdata"          // Data
@@ -87,6 +90,7 @@ TEST_F(cryptoTest, VerifySHA1) {
 
        EXPECT_TRUE(auth_md5((char*)PKT_DATA, PKT_LEN, SHA1_LENGTH, &sha1));
 }
+#endif /* OPENSSL */
 
 TEST_F(cryptoTest, VerifyFailure) {
        /* We use a copy of the MD5 verification code, but modify
index bcf76a0f3b88948312a8b0a043644aae0f2d7368..93170bcf49db2d87c53ce756f9164239600f0a05 100644 (file)
@@ -1,6 +1,11 @@
 #include "libntptest.h"
 
 extern "C" {
+#ifdef OPENSSL
+# include "openssl/err.h"
+# include "openssl/rand.h"
+# include "openssl/evp.h"
+#endif
 #include "ntp.h"
 #include "ntp_stdlib.h"
 };
index 276b292b199f725565d8c651ce6505e54c256a2c..b361124b1055f0956e6207369b24fadb14dd4cc1 100644 (file)
@@ -3,6 +3,11 @@
 #include "libntptest.h"
 
 extern "C" {
+#ifdef OPENSSL
+# include "openssl/err.h"
+# include "openssl/rand.h"
+# include "openssl/evp.h"
+#endif
 #include "ntp.h"
 #include "ntp_stdlib.h"
 };
index 20260f5722b8854d0f73af071b72b5efc8713e81..75460c0b52ba5c704b0ab6a54bbb8c28a6a01fe7 100644 (file)
@@ -11,6 +11,7 @@ protected:
        static const int UNUSED_REFCLOCK_ID = 250;
 };
 
+#ifdef REFCLOCK                /* clockname() is useless otherwise */
 TEST_F(refnumtoaTest, LocalClock) {
        /* We test with a refclock address of type LOCALCLOCK.
         * with id 8
@@ -29,7 +30,9 @@ TEST_F(refnumtoaTest, LocalClock) {
 
        EXPECT_STREQ(expected.str().c_str(), refnumtoa(&address));
 }
+#endif /* REFCLOCK */
 
+#ifdef REFCLOCK                /* refnumtoa() is useless otherwise */
 TEST_F(refnumtoaTest, UnknownId) {
        /* We test with a currently unused refclock ID */
        u_int32 addr = REFCLOCK_ADDR;
@@ -46,3 +49,4 @@ TEST_F(refnumtoaTest, UnknownId) {
 
        EXPECT_STREQ(expected.str().c_str(), refnumtoa(&address));
 }
+#endif /* REFCLOCK */
index 17f336cff16c9a8a85b17d39826f5d9e99b0202f..8812656c3142e5d755e0cb45dba04bfff2381a9c 100644 (file)
@@ -1,6 +1,11 @@
 #include "libntptest.h"
 
 extern "C" {
+#ifdef OPENSSL
+# include "openssl/err.h"
+# include "openssl/rand.h"
+# include "openssl/evp.h"
+#endif
 #include "ntp.h"
 };
 
@@ -23,6 +28,7 @@ TEST_F(ssl_initTest, MD5KeyTypeWithDigestLength) {
        EXPECT_EQ(expected, digestLength);
 }
 
+#ifdef OPENSSL
 TEST_F(ssl_initTest, SHA1KeyTypeWithDigestLength) {
        size_t digestLength;
        size_t expected = TEST_SHA1_DIGEST_LENGTH;
@@ -30,12 +36,15 @@ TEST_F(ssl_initTest, SHA1KeyTypeWithDigestLength) {
        EXPECT_EQ(NID_sha, keytype_from_text("SHA", &digestLength));
        EXPECT_EQ(expected, digestLength);
 }
+#endif /* OPENSSL */
 
 // keytype_name()
 TEST_F(ssl_initTest, MD5KeyName) {
        EXPECT_STREQ("MD5", keytype_name(KEY_TYPE_MD5));
 }
 
+#ifdef OPENSSL
 TEST_F(ssl_initTest, SHA1KeyName) {
        EXPECT_STREQ("SHA", keytype_name(NID_sha));
 }
+#endif /* OPENSSL */