diff options
author | Andy Polyakov <appro@openssl.org> | 2018-03-21 11:16:50 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2018-03-22 11:48:43 +0100 |
commit | 96f1b64d8cdca10694f84fb3aabfdd35f0604555 (patch) | |
tree | 6cf303e3faf0ef758077cfc55fbd587d8bf00b6f /crypto | |
parent | aed3df20c105b6555ea2aeff559f2fab4ad4cefc (diff) |
o_fopen.c: compensate for e_os.h omission.
At earlier point e_os.h was omitted from a number of headers (in order
to emphasize OS neutrality), but this affected o_fopen.c, which is not
OS-neutral, and contains some DJGPP-specific code.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5708)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/o_fopen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/o_fopen.c b/crypto/o_fopen.c index 951d034dda..1b4028c9a8 100644 --- a/crypto/o_fopen.c +++ b/crypto/o_fopen.c @@ -15,6 +15,9 @@ # ifdef _WIN32 # include <windows.h> # endif +# ifdef __DJGPP__ +# include <unistd.h> +# endif FILE *openssl_fopen(const char *filename, const char *mode) { @@ -64,7 +67,7 @@ FILE *openssl_fopen(const char *filename, const char *mode) { char *newname = NULL; - if (!HAS_LFN_SUPPORT(filename)) { + if (pathconf(filename, _PC_NAME_MAX) <= 12) { /* 8.3 file system? */ char *iterator; char lastchar; |