Don't define time() manually; pull it in from <time.h>
authorTheodore Tso <tytso@mit.edu>
Tue, 8 Nov 1994 03:31:30 +0000 (03:31 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 8 Nov 1994 03:31:30 +0000 (03:31 +0000)
Add checking for whether we should be pulling in <time.h> and <sys/time.h>

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4636 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/telnet/telnetd/ChangeLog
src/appl/telnet/telnetd/configure.in
src/appl/telnet/telnetd/defs.h
src/appl/telnet/telnetd/sys_term.c

index 164778a1bafcb5785da197f14c47fadbb720bdf6..0c0cd286ba7e602888e6e3c9734cfb958d24c7df 100644 (file)
@@ -1,5 +1,11 @@
 Mon Nov  7 22:16:51 1994  Theodore Y. Ts'o  (tytso@dcl)
 
+        * configure.in: Check for sys/time.h and time.h.
+
+       * defs.h: Pull in <sys/time.h> and <time.h> as necessary.
+
+       * sys_term.c (startslave): Don't define time() manually.
+
        * configure.in: Add check for util library (needed for the Alpha)
 
 Thu Sep 29 22:51:52 1994  Theodore Y. Ts'o  (tytso@dcl)
index fca44b751fc1afdeaaa50a654fe0899efe191583..db8163f8dc3d654fc1ce7522a6e58286b03c74b0 100644 (file)
@@ -23,6 +23,8 @@ AC_COMPILE_CHECK([cc_t],[#include <termio.h>],
 [cc_t foo;],,AC_DEFINE(NO_CC_T))
 fi
 fi
+AC_HEADER_TIME
+AC_CHECK_HEADERS(sys/time.h)
 AC_HAVE_FUNCS(vhangup)
 AC_FUNC_CHECK(grantpt,AC_DEFINE(STREAMSPTY))
 AC_FUNC_CHECK(gettosbyname,AC_DEFINE(HAS_GETTOS))
index a73d4a6199783040814c84414b5396c37304d362..4b7b5204f55ed01d85cbea6b1ce581a62f3719d2 100644 (file)
 #include <fcntl.h>
 #include <sys/file.h>
 #include <sys/stat.h>
-#include <sys/time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
 #ifndef        FILIO_H
 #include <sys/ioctl.h>
 #else
index 12e734c78dd13cd9ed807db28a01f3a04b04f6d9..79ae78f1d45d54acc6b55d1d39b5da41d6c4bb3f 100644 (file)
@@ -1352,7 +1352,6 @@ startslave(host, autologin, autoname)
        char *autoname;
 {
        register int i;
-       long time();
 #ifdef NEWINIT
        extern char *ptyip;
        struct init_request request;