From 8ef61d3ec1c1e78bae48209c6ae8e7c7d103bdea Mon Sep 17 00:00:00 2001 From: bcook <> Date: Wed, 3 Dec 2014 22:16:02 +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. Add calls to BIO_sock_init() as-needed to openssl(1) so that socket IO works on Windows. Sorry, these are no-op on other platforms. ok jsing@ deraadt@ --- src/usr.bin/openssl/apps.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'src/usr.bin/openssl/apps.c') diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index 78555528b6..a042f074f9 100644 --- a/src/usr.bin/openssl/apps.c +++ b/src/usr.bin/openssl/apps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apps.c,v 1.12 2014/11/07 14:16:48 jsing Exp $ */ +/* $OpenBSD: apps.c,v 1.13 2014/12/03 22:16:02 bcook Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -2205,27 +2205,6 @@ next_protos_parse(unsigned short *outlen, const char *in) #endif /* !OPENSSL_NO_NEXTPROTONEG */ -double -app_tminterval(int stop, int usertime) -{ - double ret = 0; - struct tms rus; - clock_t now = times(&rus); - static clock_t tmstart; - - if (usertime) - now = rus.tms_utime; - - if (stop == TM_START) - tmstart = now; - else { - long int tck = sysconf(_SC_CLK_TCK); - ret = (now - tmstart) / (double) tck; - } - - return (ret); -} - int app_isdir(const char *name) { @@ -2341,7 +2320,7 @@ options_parse(int argc, char **argv, struct option *opts, char **unnamed) if (opt->func(opt, NULL) != 0) return (1); break; - + case OPTION_FLAG: *opt->opt.flag = 1; break; -- cgit v1.2.3-55-g6feb