diff options
Diffstat (limited to 'crypto')
| -rw-r--r-- | crypto/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | crypto/Makefile.am | 4 | ||||
| -rw-r--r-- | crypto/compat/ftruncate.c | 17 | ||||
| -rw-r--r-- | crypto/compat/posix_win.c | 8 |
4 files changed, 8 insertions, 25 deletions
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 491b9b4..0698ab4 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt | |||
| @@ -637,10 +637,6 @@ if(NOT HAVE_FREEZERO) | |||
| 637 | set(COMPAT_SRC ${COMPAT_SRC} compat/freezero.c) | 637 | set(COMPAT_SRC ${COMPAT_SRC} compat/freezero.c) |
| 638 | endif() | 638 | endif() |
| 639 | 639 | ||
| 640 | if(NOT HAVE_FTRUNCATE) | ||
| 641 | set(COMPAT_SRC ${COMPAT_SRC} compat/ftruncate.c) | ||
| 642 | endif() | ||
| 643 | |||
| 644 | if(NOT HAVE_GETDELIM) | 640 | if(NOT HAVE_GETDELIM) |
| 645 | set(COMPAT_SRC ${COMPAT_SRC} compat/getdelim.c) | 641 | set(COMPAT_SRC ${COMPAT_SRC} compat/getdelim.c) |
| 646 | endif() | 642 | endif() |
diff --git a/crypto/Makefile.am b/crypto/Makefile.am index f703e33..7969aee 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am | |||
| @@ -148,10 +148,6 @@ if !HAVE_FREEZERO | |||
| 148 | libcompat_la_SOURCES += compat/freezero.c | 148 | libcompat_la_SOURCES += compat/freezero.c |
| 149 | endif | 149 | endif |
| 150 | 150 | ||
| 151 | if !HAVE_FTRUNCATE | ||
| 152 | libcompat_la_SOURCES += compat/ftruncate.c | ||
| 153 | endif | ||
| 154 | |||
| 155 | if !HAVE_GETDELIM | 151 | if !HAVE_GETDELIM |
| 156 | libcompat_la_SOURCES += compat/getdelim.c | 152 | libcompat_la_SOURCES += compat/getdelim.c |
| 157 | endif | 153 | endif |
diff --git a/crypto/compat/ftruncate.c b/crypto/compat/ftruncate.c deleted file mode 100644 index e825e50..0000000 --- a/crypto/compat/ftruncate.c +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Public domain | ||
| 3 | * | ||
| 4 | * Kinichiro Inoguchi <inoguchi@openbsd.org> | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifdef _WIN32 | ||
| 8 | |||
| 9 | #include <unistd.h> | ||
| 10 | |||
| 11 | int | ||
| 12 | ftruncate(int fd, off_t length) | ||
| 13 | { | ||
| 14 | return _chsize(fd, length); | ||
| 15 | } | ||
| 16 | |||
| 17 | #endif | ||
diff --git a/crypto/compat/posix_win.c b/crypto/compat/posix_win.c index 4e98643..60b2896 100644 --- a/crypto/compat/posix_win.c +++ b/crypto/compat/posix_win.c | |||
| @@ -68,6 +68,14 @@ libressl_fstat(int fd, struct stat *statbuf) | |||
| 68 | return fstat(get_real_fd(fd), statbuf); | 68 | return fstat(get_real_fd(fd), statbuf); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | #ifndef HAVE_FTRUNCATE | ||
| 72 | int | ||
| 73 | ftruncate(int fd, off_t length) | ||
| 74 | { | ||
| 75 | return _chsize(get_real_fd(fd), length); | ||
| 76 | } | ||
| 77 | #endif | ||
| 78 | |||
| 71 | int | 79 | int |
| 72 | posix_open(const char *path, ...) | 80 | posix_open(const char *path, ...) |
| 73 | { | 81 | { |
