]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Merge shiny.ad.hartbrothers.com:c:\ntp\ntp-stable-873
authorDave Hart <hart@ntp.org>
Fri, 20 Mar 2009 03:18:35 +0000 (03:18 +0000)
committerDave Hart <hart@ntp.org>
Fri, 20 Mar 2009 03:18:35 +0000 (03:18 +0000)
into  shiny.ad.hartbrothers.com:C:/ntp/ntp-stable-pull

bk: 49c30b0bJ7v0i7cRcxBwVBBXgWmg3A

1  2 
ChangeLog
ntpd/ntp_io.c
ports/winnt/ntpd/ntp_iocompletionport.c

diff --cc ChangeLog
index 8810c77511cca8d15933d881a59579c8d0ba004d,acdd4e3c180eba097e01ef3db7b34dc4c617626e..0dbf213cab293a825bf4e05cc5b325d84713f91c
+++ b/ChangeLog
@@@ -1,10 -1,5 +1,13 @@@
++
+ * [Bug 873] Windows serial refclock proper TTY line discipline emulation
 +* [Bug 1014] Enable building with VC9 (in Visual Studio 2008, Visual C++ 2008, or SDK)
 +* [Bug 1117] Deferred interface binding under Windows works only correctly
 +  if FORCE_DNSRETRY is defined
 +* [BUG 1124] Lock QueryPerformanceCounter() client threads to same CPU
 +* DPRINTF macro made safer, always evaluates to a statement and will not
 +  misassociate an else which follows the macro.
 +
  ---
  (4.2.4p6) 2009/01/08 Released by Harlan Stenn <stenn@ntp.org>
  
diff --cc ntpd/ntp_io.c
Simple merge
index 737aa1ea1e0fd335d81a041ac18ca8243274b9ad,7c7ec3b6787afcd6dbe1fd24e7f16e0b9d4c54a2..aade51964b0d26322f6abf8a87c91709e61d6c91
@@@ -42,9 -43,16 +43,20 @@@ typedef struct IoCompletionInfo 
  #define       recv_buf        buff_space.rbuf
  #define       trans_buf       buff_space.tbuf
  
++
+ #if !defined( _W64 )
+   /*
+    * if ULONG_PTR needs to be defined then the build environment
+    * is pure 32 bit Windows. Since ULONG_PTR and DWORD have 
+    * the same size in 32 bit Windows we can safely define
+    * a replacement.
+    */
+   typedef DWORD ULONG_PTR;
+ #endif
 +/* in nt_clockstuff.c */
 +extern void lock_thread_to_processor(HANDLE);
 +
  /*
   * local function definitions
   */
@@@ -147,18 -149,12 +153,21 @@@ iocompletionthread(void *NotUsed
        BOOL bSuccess = FALSE;
        int errstatus = 0;
        DWORD BytesTransferred = 0;
-       DWORD Key = 0;
+       ULONG_PTR Key = 0;
        IoCompletionInfo * lpo = NULL;
+       u_long time_next_ifscan_after_error = 0;
+       /* UNUSED_ARG(NotUsed); */
  
 +      /*
 +       *      socket and refclock receive call gettimeofday()
 +       *      so the I/O thread needs to be on the same 
 +       *      processor as the main and timing threads
 +       *      to ensure consistent QueryPerformanceCounter()
 +       *      results.
 +       */
 +      lock_thread_to_processor(GetCurrentThread());
 +
        /*      Set the thread priority high enough so I/O will
         *      preempt normal recv packet processing, but not
         *      higher than the timer sync thread.