From 3339178a7b37aca236756b5c97ee1a4fe72c768f Mon Sep 17 00:00:00 2001 From: bcook <> Date: Wed, 3 Dec 2014 22:14:38 +0000 Subject: Move Windows OS-specific functions to make porting easier. Several functions that need to be redefined for a Windows port are right in the middle of other code that is relatively portable. This patch isolates the functions that need Windows-specific implementations so they can be built conditionally in the portable tree. ok jsing@ deraadt@ --- src/lib/libcrypto/bio/b_sock.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'src/lib/libcrypto/bio/b_sock.c') diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index 92a62b2c4c..ece88277df 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: b_sock.c,v 1.60 2014/12/03 21:55:51 bcook Exp $ */ +/* $OpenBSD: b_sock.c,v 1.61 2014/12/03 22:14:38 bcook Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -65,7 +65,6 @@ #include #include -#include #include #include #include @@ -193,17 +192,6 @@ BIO_gethostbyname(const char *name) return gethostbyname(name); } -int -BIO_sock_init(void) -{ - return (1); -} - -void -BIO_sock_cleanup(void) -{ -} - int BIO_socket_ioctl(int fd, long type, void *arg) { @@ -454,14 +442,3 @@ BIO_set_tcp_ndelay(int s, int on) { return (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) == 0); } - -int -BIO_socket_nbio(int s, int mode) -{ - int flags = fcntl(s, F_GETFD); - if (mode && !(flags & O_NONBLOCK)) - return (fcntl(s, F_SETFL, flags | O_NONBLOCK) != -1); - else if (!mode && (flags & O_NONBLOCK)) - return (fcntl(s, F_SETFL, flags & ~O_NONBLOCK) != -1); - return (1); -} -- cgit v1.2.3-55-g6feb