mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 15:54:22 +02:00
- (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'
This commit is contained in:
parent
48bd7c118a
commit
0d5af6017e
@ -23,6 +23,11 @@
|
|||||||
- markus@cvs.openbsd.org 2001/01/08 21:48:17
|
- markus@cvs.openbsd.org 2001/01/08 21:48:17
|
||||||
[kex.c]
|
[kex.c]
|
||||||
missing free; thanks stevesk@pobox.com
|
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
|
20010108
|
||||||
- (bal) Fixed another typo in cli.c
|
- (bal) Fixed another typo in cli.c
|
||||||
|
@ -236,6 +236,7 @@
|
|||||||
#undef HAVE_SOCKLEN_T
|
#undef HAVE_SOCKLEN_T
|
||||||
#undef HAVE_SIZE_T
|
#undef HAVE_SIZE_T
|
||||||
#undef HAVE_SSIZE_T
|
#undef HAVE_SSIZE_T
|
||||||
|
#undef HAVE_CLOCK_T
|
||||||
#undef HAVE_MODE_T
|
#undef HAVE_MODE_T
|
||||||
#undef HAVE_PID_T
|
#undef HAVE_PID_T
|
||||||
#undef HAVE_SA_FAMILY_T
|
#undef HAVE_SA_FAMILY_T
|
||||||
|
@ -62,7 +62,7 @@ bindresvport_af(sd, sa, af)
|
|||||||
struct sockaddr_in6 *sin6;
|
struct sockaddr_in6 *sin6;
|
||||||
u_int16_t *portp;
|
u_int16_t *portp;
|
||||||
u_int16_t port;
|
u_int16_t port;
|
||||||
int salen;
|
socklen_t salen;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (sa == NULL) {
|
if (sa == NULL) {
|
||||||
|
@ -59,7 +59,7 @@ rresvport_af(int *alport, sa_family_t af)
|
|||||||
struct sockaddr *sa;
|
struct sockaddr *sa;
|
||||||
u_int16_t *portp;
|
u_int16_t *portp;
|
||||||
int s;
|
int s;
|
||||||
int salen;
|
socklen_t salen;
|
||||||
|
|
||||||
memset(&ss, '\0', sizeof ss);
|
memset(&ss, '\0', sizeof ss);
|
||||||
sa = (struct sockaddr *)&ss;
|
sa = (struct sockaddr *)&ss;
|
||||||
|
14
configure.in
14
configure.in
@ -694,6 +694,20 @@ if test "x$ac_cv_have_ssize_t" = "xyes" ; then
|
|||||||
AC_DEFINE(HAVE_SSIZE_T)
|
AC_DEFINE(HAVE_SSIZE_T)
|
||||||
fi
|
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_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
|
||||||
AC_TRY_COMPILE(
|
AC_TRY_COMPILE(
|
||||||
[
|
[
|
||||||
|
10
defines.h
10
defines.h
@ -47,6 +47,7 @@
|
|||||||
|
|
||||||
#include <unistd.h> /* For STDIN_FILENO, etc */
|
#include <unistd.h> /* For STDIN_FILENO, etc */
|
||||||
#include <termios.h> /* Struct winsize */
|
#include <termios.h> /* Struct winsize */
|
||||||
|
#include <fcntl.h> /* For O_NONBLOCK */
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
|
|
||||||
@ -88,6 +89,10 @@ enum
|
|||||||
# define STDERR_FILENO 2
|
# define STDERR_FILENO 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef O_NONBLOCK /* Non Blocking Open */
|
||||||
|
# define O_NONBLOCK 00004
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef S_ISREG
|
#ifndef S_ISREG
|
||||||
# define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
|
# define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
|
||||||
# define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
|
# define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
|
||||||
@ -199,6 +204,11 @@ typedef int ssize_t;
|
|||||||
# define HAVE_SSIZE_T
|
# define HAVE_SSIZE_T
|
||||||
#endif /* 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
|
#ifndef HAVE_SA_FAMILY_T
|
||||||
typedef int sa_family_t;
|
typedef int sa_family_t;
|
||||||
# define HAVE_SA_FAMILY_T
|
# define HAVE_SA_FAMILY_T
|
||||||
|
@ -20,7 +20,6 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "next-posix.h"
|
#include "next-posix.h"
|
||||||
#include "news4-posix.h"
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
@ -30,9 +30,6 @@
|
|||||||
/* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */
|
/* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */
|
||||||
#define dirent direct
|
#define dirent direct
|
||||||
|
|
||||||
/* FILE */
|
|
||||||
#define O_NONBLOCK 00004 /* non-blocking open */
|
|
||||||
|
|
||||||
/* Swap out NeXT's BSD wait() for a more POSIX complient one */
|
/* Swap out NeXT's BSD wait() for a more POSIX complient one */
|
||||||
pid_t posix_wait(int *status);
|
pid_t posix_wait(int *status);
|
||||||
#define wait(a) posix_wait(a)
|
#define wait(a) posix_wait(a)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user