aboutsummaryrefslogtreecommitdiff
path: root/e_os.h
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2009-06-07 19:56:18 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2009-06-07 19:56:18 +0000
commit518099af59fbde0e7140459c76f59c9ac24bdf9c (patch)
tree873f9f63931a5d069bbcb053ea49eec4a92802dc /e_os.h
parentc285625302c2411508052af6f109be9f6b789379 (diff)
downloadsrc-518099af59fbde0e7140459c76f59c9ac24bdf9c.tar.gz
src-518099af59fbde0e7140459c76f59c9ac24bdf9c.zip
Import OpenSSL 0.9.8k.vendor/openssl/0.9.8k
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=193645 svn path=/vendor-crypto/openssl/0.9.8k/; revision=193646; tag=vendor/openssl/0.9.8k
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/e_os.h b/e_os.h
index acc6a15eb7c7..9c5c6fdb92f2 100644
--- a/e_os.h
+++ b/e_os.h
@@ -269,6 +269,7 @@ extern "C" {
# define _WIN32_WINNT 0x0400
# endif
# include <windows.h>
+# include <stdio.h>
# include <stddef.h>
# include <errno.h>
# include <string.h>
@@ -284,13 +285,38 @@ static unsigned int _strlen31(const char *str)
# endif
# include <malloc.h>
# if defined(_MSC_VER) && _MSC_VER<=1200 && defined(_MT) && defined(isspace)
- /* compensate for bug is VC6 ctype.h */
+ /* compensate for bug in VC6 ctype.h */
# undef isspace
# undef isdigit
# undef isalnum
# undef isupper
# undef isxdigit
# endif
+# if defined(_MSC_VER) && !defined(_DLL) && defined(stdin)
+# if _MSC_VER>=1300
+# undef stdin
+# undef stdout
+# undef stderr
+ FILE *__iob_func();
+# define stdin (&__iob_func()[0])
+# define stdout (&__iob_func()[1])
+# define stderr (&__iob_func()[2])
+# elif defined(I_CAN_LIVE_WITH_LNK4049)
+# undef stdin
+# undef stdout
+# undef stderr
+ /* pre-1300 has __p__iob(), but it's available only in msvcrt.lib,
+ * or in other words with /MD. Declaring implicit import, i.e.
+ * with _imp_ prefix, works correctly with all compiler options,
+ * but without /MD results in LINK warning LNK4049:
+ * 'locally defined symbol "__iob" imported'.
+ */
+ extern FILE *_imp___iob;
+# define stdin (&_imp___iob[0])
+# define stdout (&_imp___iob[1])
+# define stderr (&_imp___iob[2])
+# endif
+# endif
# endif
# include <io.h>
# include <fcntl.h>