]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ChangeLog, ntpd.c, refclock_leitch.c, refclock_parse.c, ntpdate.c: NTP_4_0_96_P1
authorHarlan Stenn <stenn@ntp.org>
Thu, 12 Aug 1999 00:45:19 +0000 (00:45 -0000)
committerHarlan Stenn <stenn@ntp.org>
Thu, 12 Aug 1999 00:45:19 +0000 (00:45 -0000)
  * ntpd/ntpd.c (sys/resource.h): Include this file only #if
  HAVE_SYS_RESOURCE_H.
  (set_process_priority): Use TIOCNOTTY only if it is #define'd.
  * ntpd/refclock_parse.c (STREAM): STREAM does not imply HAVE_TERMIOS.
  (termios.h, termio.h, fcntl.h): Do not include those files here;
  they are already included by ntp_refclock.h or ntp_io.h.
  * ntpd/refclock_leitch.c (sgtty.h, termios.h, termio.h): Do not
  include those files here; they are already included by ntp_refclock.h.
  * ntpdate/ntpdate.c (sys/resource.h) : Include that file only #if
  HAVE_RESOURCE_H.
  From: Philippe De Muyter <phdm@macqel.be>

bk: 37b2191fT7NNCaXiG7ub5WvkldWWxA

ChangeLog
ntpd/ntpd.c
ntpd/refclock_leitch.c
ntpd/refclock_parse.c
ntpdate/ntpdate.c

index 861d11e27a396b2255b13aa5d251d188d3abf79d..f8ff6e218bcb19a240c331c75ef1acf4d0d37233 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 1999-08-11  Harlan Stenn  <stenn@whimsy.udel.edu>
 
+       * ntpd/ntpd.c (sys/resource.h): Include this file only #if
+       HAVE_SYS_RESOURCE_H.
+       (set_process_priority): Use TIOCNOTTY only if it is #define'd.
+       * ntpd/refclock_parse.c (STREAM): STREAM does not imply HAVE_TERMIOS.
+       (termios.h, termio.h, fcntl.h): Do not include those files here;
+       they are already included by ntp_refclock.h or ntp_io.h.
+       * ntpd/refclock_leitch.c (sgtty.h, termios.h, termio.h): Do not
+       include those files here; they are already included by ntp_refclock.h.
+       * ntpdate/ntpdate.c (sys/resource.h) : Include that file only #if
+       HAVE_RESOURCE_H.
+       From: Philippe De Muyter <phdm@macqel.be>
+       
        * ntptrace/ntptrace.c (input_handler): Make it a "normal" function 
        definition.
        Reported by: GIANNI_CATANIA@hp-italy-om6.om.hp.com
index d72451e9ebe130ad569d8c791914faf699b3ac39..7cfa01d9a1b71409502616637795847003443b65 100644 (file)
@@ -23,9 +23,9 @@
 #  include <sys/ioctl.h>
 # endif /* HAVE_SYS_IOCTL_H */
 # include <sys/time.h>
-# if !defined(VMS)     /*wjm*/
+# ifdef HAVE_SYS_RESOURCE_H
 #  include <sys/resource.h>
-# endif /* VMS */
+# endif /* HAVE_SYS_RESOURCE_H */
 #else
 # include <signal.h>
 # include <process.h>
@@ -412,6 +412,7 @@ ntpdmain(
 # endif
 #else /* HAVE_SETPGID || HAVE_SETSID */
                        {
+# if defined(TIOCNOTTY)
                                int fid;
 
                                fid = open("/dev/tty", 2);
@@ -420,6 +421,7 @@ ntpdmain(
                                        (void) ioctl(fid, (u_long) TIOCNOTTY, (char *) 0);
                                        (void) close(fid);
                                }
+# endif /* defined(TIOCNOTTY) */
 # ifdef HAVE_SETPGRP_0
                                (void) setpgrp();
 # else /* HAVE_SETPGRP_0 */
index f855e6ef1fd249ecbc13adc077b9c3302b36bbb7..edee3f805cefbfaf1ee8e991543a456e268b9899 100644 (file)
 #include "ntp_refclock.h"
 #include "ntp_unixtime.h"
 
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
 #ifdef STREAM
 #include <stropts.h>
 #if defined(LEITCHCLK)
index 5274cd0027763d4005ba18fb71adbdc7601271a2..4274564744b537d3d839416771730c49ab84600f 100644 (file)
@@ -96,20 +96,15 @@ extern int errno;
 #ifdef STREAM
 # include <sys/stream.h>
 # include <sys/stropts.h>
-# ifndef HAVE_TERMIOS
-#  define HAVE_TERMIOS
-# endif
 #endif
 
 #ifdef HAVE_TERMIOS
-# include <termios.h>
 # define TTY_GETATTR(_FD_, _ARG_) tcgetattr((_FD_), (_ARG_))
 # define TTY_SETATTR(_FD_, _ARG_) tcsetattr((_FD_), TCSANOW, (_ARG_))
 # undef HAVE_SYSV_TTYS
 #endif
 
 #ifdef HAVE_SYSV_TTYS
-# include <termio.h>
 # define TTY_GETATTR(_FD_, _ARG_) ioctl((_FD_), TCGETA, (_ARG_))
 # define TTY_SETATTR(_FD_, _ARG_) ioctl((_FD_), TCSETAW, (_ARG_))
 #endif
@@ -119,10 +114,6 @@ extern int errno;
 # include "Bletch: BSD TTY not currently supported"
 #endif
 
-#if    !defined(O_RDWR)        /* XXX SOLARIS */
-# include <fcntl.h>
-#endif /* !def(O_RDWR) */
-
 #ifdef HAVE_SYS_IOCTL_H
 # include <sys/ioctl.h>
 #endif
index 9f4e0a8f048bfc442b8e1b0153ec12f565eb3991..1797d4d91e823857177345ca219babfb7f21ae29 100644 (file)
 # include <netdb.h>
 # include <sys/signal.h>
 # include <sys/ioctl.h>
-# include <sys/time.h>
-# include <sys/resource.h>
-
-#else
-# include <sys/time.h>
 #endif /* SYS_WINNT */
+#include <sys/time.h>
+#ifdef HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif /* HAVE_SYS_RESOURCE_H */
 
 #ifdef SYS_VXWORKS
 # include "ioLib.h"