summaryrefslogtreecommitdiffstats
path: root/e_os.h
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-05-21 15:19:27 +0200
committerAndy Polyakov <appro@openssl.org>2005-05-21 15:19:27 +0200
commite476f9421288aedee52a65ec813c7683ff0ccf5f (patch)
tree05d8d5a11805f4e738d4eaf15d025dda2860024a /e_os.h
parentfix typo, add prototype (diff)
downloadopenssl-e476f9421288aedee52a65ec813c7683ff0ccf5f.tar.xz
openssl-e476f9421288aedee52a65ec813c7683ff0ccf5f.zip
Move _WIN32_WINNT definition from command line to e_os.h. The change is
inspired by VC6 failure report. In addition abstain from taking screen snapshots when running in NT service context.
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/e_os.h b/e_os.h
index 3ff9f3cd1c..cf76632b1e 100644
--- a/e_os.h
+++ b/e_os.h
@@ -235,6 +235,23 @@ extern "C" {
# define NO_DIRENT
# ifdef WINDOWS
+# ifndef _WIN32_WINNT
+ /*
+ * Defining _WIN32_WINNT here in e_os.h implies certain "discipline."
+ * Most notably we ought to check for availability of each specific
+ * routine with GetProcAddress() and/or quard NT-specific calls with
+ * GetVersion() < 0x80000000. One can argue that in latter "or" case
+ * we ought to /DELAYLOAD some .DLLs in order to protect ourselves
+ * against run-time link errors. This doesn't seem to be necessary,
+ * because it turned out that already Windows 95, first non-NT Win32
+ * implementation, is equipped with at least NT 3.51 stubs, dummy
+ * routines with same name, but which do nothing. Meaning that it's
+ * apparently appropriate to guard generic NT calls with GetVersion
+ * alone, while NT 4.0 and above calls ought to be additionally
+ * checked upon with GetProcAddress.
+ */
+# define _WIN32_WINNT 0x0400
+# endif
# include <windows.h>
# include <stddef.h>
# include <errno.h>