summaryrefslogtreecommitdiff
path: root/socketft.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-07-28 18:00:19 -0400
committerJeffrey Walton <noloader@gmail.com>2015-07-28 18:00:19 -0400
commit697ccb452b58a796dabc47736b87ecad5be47e27 (patch)
tree57cd33131f6abba624e5eff1882bd301b9b639ea /socketft.h
parentcffba26fa183fced0edf1dadce6acb1b82f6fe50 (diff)
downloadcryptopp-git-697ccb452b58a796dabc47736b87ecad5be47e27.tar.gz
Issue 19 and comments on the 05076dbd
Diffstat (limited to 'socketft.h')
-rw-r--r--socketft.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/socketft.h b/socketft.h
index 6bbd1d3f..4b2a68d7 100644
--- a/socketft.h
+++ b/socketft.h
@@ -5,36 +5,27 @@
#ifdef SOCKETS_AVAILABLE
+// Avoid _WINSOCK_DEPRECATED_NO_WARNINGS
+#if (_MSC_VER)
+# pragma warning (push)
+# pragma warning (disable: 4996)
+#endif
+
#include "network.h"
#include "queue.h"
#include "trap.h"
#ifdef USE_WINDOWS_STYLE_SOCKETS
-
# if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
# error Winsock 1 is not supported by this library. Please include this file or winsock2.h before windows.h.
# endif
-
-// Using _WINSOCK_DEPRECATED_NO_WARNINGS disables warnings for application code, too
-#if (_MSC_VER)
-# pragma warning (push)
-# pragma warning (disable: 4996)
-#endif
-
#include <winsock2.h>
#include "winpipes.h"
-
-#if (_MSC_VER)
-# pragma warning (pop)
-#endif
-
#else
-
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
-
#endif
NAMESPACE_BEGIN(CryptoPP)
@@ -235,6 +226,11 @@ private:
NAMESPACE_END
+// Avoid _WINSOCK_DEPRECATED_NO_WARNINGS
+#if (_MSC_VER)
+# pragma warning (pop)
+#endif
+
#endif // #ifdef SOCKETS_AVAILABLE
#endif