diff options
author | 2014-04-19 16:31:51 +0000 | |
---|---|---|
committer | 2014-04-19 16:31:51 +0000 | |
commit | 3b0822d4c3b7e3c20ba277843ab835df9162a01c (patch) | |
tree | 2184ad5841bec809d17261a23326c09b7c5be91f /lib/libssl/src/apps/apps.c | |
parent | (void) cast a snprintf() call that cannot truncate (diff) | |
download | wireguard-openbsd-3b0822d4c3b7e3c20ba277843ab835df9162a01c.tar.xz wireguard-openbsd-3b0822d4c3b7e3c20ba277843ab835df9162a01c.zip |
ReadFile() and GetStdHandle() are not very POSIX.
ok beck jsing
Diffstat (limited to 'lib/libssl/src/apps/apps.c')
-rw-r--r-- | lib/libssl/src/apps/apps.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/libssl/src/apps/apps.c b/lib/libssl/src/apps/apps.c index 6413d5c4378..3a6c3b9bdd9 100644 --- a/lib/libssl/src/apps/apps.c +++ b/lib/libssl/src/apps/apps.c @@ -2513,40 +2513,3 @@ app_isdir(const char *name) return -1; #endif } - -/* raw_read|write section */ -#if defined(_WIN32) && defined(STD_INPUT_HANDLE) -int -raw_read_stdin(void *buf, int siz) -{ - DWORD n; - if (ReadFile(GetStdHandle(STD_INPUT_HANDLE), buf, siz, &n, NULL)) - return (n); - else - return (-1); -} -#else -int -raw_read_stdin(void *buf, int siz) -{ - return read(fileno(stdin), buf, siz); -} -#endif - -#if defined(_WIN32) && defined(STD_OUTPUT_HANDLE) -int -raw_write_stdout(const void *buf, int siz) -{ - DWORD n; - if (WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), buf, siz, &n, NULL)) - return (n); - else - return (-1); -} -#else -int -raw_write_stdout(const void *buf, int siz) -{ - return write(fileno(stdout), buf, siz); -} -#endif |