diff options
author | Michael Haubenwallner <haubi@gentoo.org> | 2019-02-18 13:20:00 +0100 |
---|---|---|
committer | Michael Haubenwallner <haubi@gentoo.org> | 2019-02-18 15:48:57 +0100 |
commit | 4e3b0bb26cca7fe669caed9d69158c82e0738bba (patch) | |
tree | 2d3242335e5044e2e36f0506c9e6eb8fa640b131 /dev-libs | |
parent | dev-libs/openssl: ignore MS Azure agent env vars (diff) | |
download | prefix-4e3b0bb26cca7fe669caed9d69158c82e0738bba.tar.gz prefix-4e3b0bb26cca7fe669caed9d69158c82e0738bba.tar.bz2 prefix-4e3b0bb26cca7fe669caed9d69158c82e0738bba.zip |
dev-libs/openssl: Cygwin wants setmode(0), not O_TEXT
In Cygwin, beyond the binary mode and the text mode there also is mode
zero, where the carriage return is created only for files opened on a
text mount point. Otherwise, Cygwin goes without the carriage return,
but O_TEXT would force the carriage return to be created.
Package-Manager: Portage-2.3.55.1-prefix, Repoman-2.3.12
Signed-off-by: Michael Haubenwallner <haubi@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/openssl/files/openssl-1.1.1a-cygwin-binmode.patch | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/dev-libs/openssl/files/openssl-1.1.1a-cygwin-binmode.patch b/dev-libs/openssl/files/openssl-1.1.1a-cygwin-binmode.patch index 7ab2fd5065..ce9cc4975c 100644 --- a/dev-libs/openssl/files/openssl-1.1.1a-cygwin-binmode.patch +++ b/dev-libs/openssl/files/openssl-1.1.1a-cygwin-binmode.patch @@ -1,24 +1,40 @@ For the setmode(O_TEXT), not submitted upstream yet: https://cygwin.com/ml/cygwin/2019-02/msg00150.html -https://cygwin.com/ml/cygwin/2019-02/msg00190.html +https://cygwin.com/ml/cygwin/2019-02/msg00280.html For the chmod 644, accepted upstream: https://github.com/openssl/openssl/pull/8226 --- openssl-1.1.1a/crypto/bio/bss_file.c.orig 2019-02-15 19:41:48.605378800 +0100 +++ openssl-1.1.1a/crypto/bio/bss_file.c 2019-02-15 19:42:53.136709200 +0100 -@@ -251,12 +251,6 @@ - } else - _setmode(fd, _O_BINARY); - } --# elif defined(OPENSSL_SYS_WIN32_CYGWIN) -- int fd = fileno((FILE *)ptr); -- if (num & BIO_FP_TEXT) +@@ -254,7 +254,7 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr) + # elif defined(OPENSSL_SYS_WIN32_CYGWIN) + int fd = fileno((FILE *)ptr); + if (num & BIO_FP_TEXT) - setmode(fd, O_TEXT); -- else -- setmode(fd, O_BINARY); ++ setmode(fd, 0); /* do not force O_TEXT in Cygwin */ + else + setmode(fd, O_BINARY); # endif +@@ -279,11 +279,15 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr) + ret = 0; + break; } - break; +-# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32_CYGWIN) ++# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) + if (!(num & BIO_FP_TEXT)) + OPENSSL_strlcat(p, "b", sizeof(p)); + else + OPENSSL_strlcat(p, "t", sizeof(p)); ++# elif defined(OPENSSL_SYS_WIN32_CYGWIN) ++ if (!(num & BIO_FP_TEXT)) ++ OPENSSL_strlcat(p, "b", sizeof(p)); ++ /* else do not force DOS text mode in Cygwin */ + # endif + fp = openssl_fopen(ptr, p); + if (fp == NULL) { +-- +2.19.2 + --- openssl-1.1.1a/Configurations/unix-Makefile.tmpl.orig 2019-02-15 19:47:36.464755100 +0100 +++ openssl-1.1.1a/Configurations/unix-Makefile.tmpl 2019-02-15 19:47:42.605379700 +0100 @@ -650,7 +650,7 @@ |