]> andersk Git - openssh.git/commitdiff
- (bal) Detect if clock_t structure exists, if not define it.
authormouring <mouring>
Tue, 9 Jan 2001 00:50:29 +0000 (00:50 +0000)
committermouring <mouring>
Tue, 9 Jan 2001 00:50:29 +0000 (00:50 +0000)
  - (bal) Detect if O_NONBLOCK exists, if not define it.
  - (bal) removed news4-posix.h (now empty)
  - (bal) changed bsd-bindresvport.c and bsd-rresvport.c to use 'socklen_t'
    instead of 'int'

ChangeLog
acconfig.h
bsd-bindresvport.c
bsd-rresvport.c
configure.in
defines.h
includes.h
next-posix.h

index b2118033507a51551921985113b76e2cb4706dac..54b3ac85ee7154f1f9288f0e523ddb5e39ae0bfa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - markus@cvs.openbsd.org 2001/01/08 21:48:17
      [kex.c]
      missing free; thanks stevesk@pobox.com
+  - (bal) Detect if clock_t structure exists, if not define it.
+  - (bal) Detect if O_NONBLOCK exists, if not define it.
+  - (bal) removed news4-posix.h (now empty)
+  - (bal) changed bsd-bindresvport.c and bsd-rresvport.c to use 'socklen_t'
+    instead of 'int'
 
 20010108
  - (bal) Fixed another typo in cli.c
index 494c06f7dfa19858f6c12b31688579b6bb9916cc..6f56deb0a394b20e06130fbe09473ea58fd1d502 100644 (file)
 #undef HAVE_SOCKLEN_T
 #undef HAVE_SIZE_T
 #undef HAVE_SSIZE_T
+#undef HAVE_CLOCK_T
 #undef HAVE_MODE_T
 #undef HAVE_PID_T
 #undef HAVE_SA_FAMILY_T
index fb3f6f2b85767a7a61faa71c0c170dc1356ffe46..536a5056f83e197fd878668885c3f87075f6aef9 100644 (file)
@@ -62,7 +62,7 @@ bindresvport_af(sd, sa, af)
        struct sockaddr_in6 *sin6;
        u_int16_t *portp;
        u_int16_t port;
-       int salen;
+       socklen_t salen;
        int i;
 
        if (sa == NULL) {
index e8f822bf56365587c6d45a7ed526984fccd3156a..392768c02f9012e1db7e4118c324af369589c9dc 100644 (file)
@@ -59,7 +59,7 @@ rresvport_af(int *alport, sa_family_t af)
        struct sockaddr *sa;
        u_int16_t *portp;
        int s;
-       int salen;
+       socklen_t salen;
 
        memset(&ss, '\0', sizeof ss);
        sa = (struct sockaddr *)&ss;
index dd68daeb178e00d3a6fcce9c94bb28f2057c5629..4730d3c4cd6e73d99f2aac061d903161c39a0126 100644 (file)
@@ -694,6 +694,20 @@ if test "x$ac_cv_have_ssize_t" = "xyes" ; then
        AC_DEFINE(HAVE_SSIZE_T)
 fi
 
+AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
+       AC_TRY_COMPILE(
+               [
+#include <time.h>
+               ],
+               [ clock_t foo; foo = 1235; ],
+               [ ac_cv_have_clock_t="yes" ],
+               [ ac_cv_have_clock_t="no" ]
+       )
+])
+if test "x$ac_cv_have_clock_t" = "xyes" ; then
+       AC_DEFINE(HAVE_CLOCK_T)
+fi
+
 AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
        AC_TRY_COMPILE(
                [
index 45a187c195bfa4c2f0fc52689d4e2edec2feaa0b..593fcd64c24f257733acdc788811553d6214958f 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -47,6 +47,7 @@
 
 #include <unistd.h> /* For STDIN_FILENO, etc */
 #include <termios.h> /* Struct winsize */
+#include <fcntl.h> /* For O_NONBLOCK */
 
 /* Constants */
 
@@ -88,6 +89,10 @@ enum
 # define STDERR_FILENO   2
 #endif                   
 
+#ifndef O_NONBLOCK     /* Non Blocking Open */
+# define O_NONBLOCK      00004 
+#endif
+
 #ifndef S_ISREG
 # define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
 # define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
@@ -199,6 +204,11 @@ typedef int ssize_t;
 # define HAVE_SSIZE_T
 #endif /* HAVE_SSIZE_T */
 
+#ifndef HAVE_CLOCK_T
+typedef long clock_t;
+# define HAVE_CLOCK_T
+#endif; /* HAVE_CLOCK_T */
+
 #ifndef HAVE_SA_FAMILY_T
 typedef int sa_family_t;
 # define HAVE_SA_FAMILY_T
index c3309a501ed3a77bbe0c281e992a4b3b238a0978..96e97ca591c7a37a78c11c99b486ec4b596a7fd8 100644 (file)
@@ -20,7 +20,6 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #include "config.h"
 
 #include "next-posix.h"
-#include "news4-posix.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
index 92002060bb8b25f6638f4358b42b89d2f411a042..3e16dacb9cb34a2a46078bde0f15f2c159f6171e 100644 (file)
@@ -30,9 +30,6 @@
 /* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */
 #define dirent direct
 
-/* FILE */
-#define O_NONBLOCK     00004   /* non-blocking open */
-
 /* Swap out NeXT's BSD wait() for a more POSIX complient one */
 pid_t posix_wait(int *status);
 #define wait(a) posix_wait(a)
This page took 0.109567 seconds and 5 git commands to generate.