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
# 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>
# endif
#else /* HAVE_SETPGID || HAVE_SETSID */
{
+# if defined(TIOCNOTTY)
int fid;
fid = open("/dev/tty", 2);
(void) ioctl(fid, (u_long) TIOCNOTTY, (char *) 0);
(void) close(fid);
}
+# endif /* defined(TIOCNOTTY) */
# ifdef HAVE_SETPGRP_0
(void) setpgrp();
# else /* HAVE_SETPGRP_0 */
#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)
#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
# 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
# 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"