diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | acconfig.h | 1 | ||||
-rw-r--r-- | bsd-bindresvport.c | 2 | ||||
-rw-r--r-- | bsd-rresvport.c | 2 | ||||
-rw-r--r-- | configure.in | 14 | ||||
-rw-r--r-- | defines.h | 10 | ||||
-rw-r--r-- | includes.h | 1 | ||||
-rw-r--r-- | next-posix.h | 3 |
8 files changed, 32 insertions, 6 deletions
@@ -23,6 +23,11 @@ | |||
23 | - markus@cvs.openbsd.org 2001/01/08 21:48:17 | 23 | - markus@cvs.openbsd.org 2001/01/08 21:48:17 |
24 | [kex.c] | 24 | [kex.c] |
25 | missing free; thanks stevesk@pobox.com | 25 | missing free; thanks stevesk@pobox.com |
26 | - (bal) Detect if clock_t structure exists, if not define it. | ||
27 | - (bal) Detect if O_NONBLOCK exists, if not define it. | ||
28 | - (bal) removed news4-posix.h (now empty) | ||
29 | - (bal) changed bsd-bindresvport.c and bsd-rresvport.c to use 'socklen_t' | ||
30 | instead of 'int' | ||
26 | 31 | ||
27 | 20010108 | 32 | 20010108 |
28 | - (bal) Fixed another typo in cli.c | 33 | - (bal) Fixed another typo in cli.c |
diff --git a/acconfig.h b/acconfig.h index 494c06f7d..6f56deb0a 100644 --- a/acconfig.h +++ b/acconfig.h | |||
@@ -236,6 +236,7 @@ | |||
236 | #undef HAVE_SOCKLEN_T | 236 | #undef HAVE_SOCKLEN_T |
237 | #undef HAVE_SIZE_T | 237 | #undef HAVE_SIZE_T |
238 | #undef HAVE_SSIZE_T | 238 | #undef HAVE_SSIZE_T |
239 | #undef HAVE_CLOCK_T | ||
239 | #undef HAVE_MODE_T | 240 | #undef HAVE_MODE_T |
240 | #undef HAVE_PID_T | 241 | #undef HAVE_PID_T |
241 | #undef HAVE_SA_FAMILY_T | 242 | #undef HAVE_SA_FAMILY_T |
diff --git a/bsd-bindresvport.c b/bsd-bindresvport.c index fb3f6f2b8..536a5056f 100644 --- a/bsd-bindresvport.c +++ b/bsd-bindresvport.c | |||
@@ -62,7 +62,7 @@ bindresvport_af(sd, sa, af) | |||
62 | struct sockaddr_in6 *sin6; | 62 | struct sockaddr_in6 *sin6; |
63 | u_int16_t *portp; | 63 | u_int16_t *portp; |
64 | u_int16_t port; | 64 | u_int16_t port; |
65 | int salen; | 65 | socklen_t salen; |
66 | int i; | 66 | int i; |
67 | 67 | ||
68 | if (sa == NULL) { | 68 | if (sa == NULL) { |
diff --git a/bsd-rresvport.c b/bsd-rresvport.c index e8f822bf5..392768c02 100644 --- a/bsd-rresvport.c +++ b/bsd-rresvport.c | |||
@@ -59,7 +59,7 @@ rresvport_af(int *alport, sa_family_t af) | |||
59 | struct sockaddr *sa; | 59 | struct sockaddr *sa; |
60 | u_int16_t *portp; | 60 | u_int16_t *portp; |
61 | int s; | 61 | int s; |
62 | int salen; | 62 | socklen_t salen; |
63 | 63 | ||
64 | memset(&ss, '\0', sizeof ss); | 64 | memset(&ss, '\0', sizeof ss); |
65 | sa = (struct sockaddr *)&ss; | 65 | sa = (struct sockaddr *)&ss; |
diff --git a/configure.in b/configure.in index dd68daeb1..4730d3c4c 100644 --- a/configure.in +++ b/configure.in | |||
@@ -694,6 +694,20 @@ if test "x$ac_cv_have_ssize_t" = "xyes" ; then | |||
694 | AC_DEFINE(HAVE_SSIZE_T) | 694 | AC_DEFINE(HAVE_SSIZE_T) |
695 | fi | 695 | fi |
696 | 696 | ||
697 | AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [ | ||
698 | AC_TRY_COMPILE( | ||
699 | [ | ||
700 | #include <time.h> | ||
701 | ], | ||
702 | [ clock_t foo; foo = 1235; ], | ||
703 | [ ac_cv_have_clock_t="yes" ], | ||
704 | [ ac_cv_have_clock_t="no" ] | ||
705 | ) | ||
706 | ]) | ||
707 | if test "x$ac_cv_have_clock_t" = "xyes" ; then | ||
708 | AC_DEFINE(HAVE_CLOCK_T) | ||
709 | fi | ||
710 | |||
697 | AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ | 711 | AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ |
698 | AC_TRY_COMPILE( | 712 | AC_TRY_COMPILE( |
699 | [ | 713 | [ |
@@ -47,6 +47,7 @@ | |||
47 | 47 | ||
48 | #include <unistd.h> /* For STDIN_FILENO, etc */ | 48 | #include <unistd.h> /* For STDIN_FILENO, etc */ |
49 | #include <termios.h> /* Struct winsize */ | 49 | #include <termios.h> /* Struct winsize */ |
50 | #include <fcntl.h> /* For O_NONBLOCK */ | ||
50 | 51 | ||
51 | /* Constants */ | 52 | /* Constants */ |
52 | 53 | ||
@@ -88,6 +89,10 @@ enum | |||
88 | # define STDERR_FILENO 2 | 89 | # define STDERR_FILENO 2 |
89 | #endif | 90 | #endif |
90 | 91 | ||
92 | #ifndef O_NONBLOCK /* Non Blocking Open */ | ||
93 | # define O_NONBLOCK 00004 | ||
94 | #endif | ||
95 | |||
91 | #ifndef S_ISREG | 96 | #ifndef S_ISREG |
92 | # define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR)) | 97 | # define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR)) |
93 | # define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG)) | 98 | # define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG)) |
@@ -199,6 +204,11 @@ typedef int ssize_t; | |||
199 | # define HAVE_SSIZE_T | 204 | # define HAVE_SSIZE_T |
200 | #endif /* HAVE_SSIZE_T */ | 205 | #endif /* HAVE_SSIZE_T */ |
201 | 206 | ||
207 | #ifndef HAVE_CLOCK_T | ||
208 | typedef long clock_t; | ||
209 | # define HAVE_CLOCK_T | ||
210 | #endif; /* HAVE_CLOCK_T */ | ||
211 | |||
202 | #ifndef HAVE_SA_FAMILY_T | 212 | #ifndef HAVE_SA_FAMILY_T |
203 | typedef int sa_family_t; | 213 | typedef int sa_family_t; |
204 | # define HAVE_SA_FAMILY_T | 214 | # define HAVE_SA_FAMILY_T |
diff --git a/includes.h b/includes.h index c3309a501..96e97ca59 100644 --- a/includes.h +++ b/includes.h | |||
@@ -20,7 +20,6 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } | |||
20 | #include "config.h" | 20 | #include "config.h" |
21 | 21 | ||
22 | #include "next-posix.h" | 22 | #include "next-posix.h" |
23 | #include "news4-posix.h" | ||
24 | 23 | ||
25 | #include <sys/types.h> | 24 | #include <sys/types.h> |
26 | #include <sys/socket.h> | 25 | #include <sys/socket.h> |
diff --git a/next-posix.h b/next-posix.h index 92002060b..3e16dacb9 100644 --- a/next-posix.h +++ b/next-posix.h | |||
@@ -30,9 +30,6 @@ | |||
30 | /* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */ | 30 | /* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */ |
31 | #define dirent direct | 31 | #define dirent direct |
32 | 32 | ||
33 | /* FILE */ | ||
34 | #define O_NONBLOCK 00004 /* non-blocking open */ | ||
35 | |||
36 | /* Swap out NeXT's BSD wait() for a more POSIX complient one */ | 33 | /* Swap out NeXT's BSD wait() for a more POSIX complient one */ |
37 | pid_t posix_wait(int *status); | 34 | pid_t posix_wait(int *status); |
38 | #define wait(a) posix_wait(a) | 35 | #define wait(a) posix_wait(a) |