- (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'
- 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
#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
struct sockaddr_in6 *sin6;
u_int16_t *portp;
u_int16_t port;
- int salen;
+ socklen_t salen;
int i;
if (sa == NULL) {
struct sockaddr *sa;
u_int16_t *portp;
int s;
- int salen;
+ socklen_t salen;
memset(&ss, '\0', sizeof ss);
sa = (struct sockaddr *)&ss;
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(
[
#include <unistd.h> /* For STDIN_FILENO, etc */
#include <termios.h> /* Struct winsize */
+#include <fcntl.h> /* For O_NONBLOCK */
/* Constants */
# 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))
# 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
#include "config.h"
#include "next-posix.h"
-#include "news4-posix.h"
#include <sys/types.h>
#include <sys/socket.h>
/* 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)