diff options
| author | Jeffrey Walton <noloader@gmail.com> | 2015-07-28 18:00:19 -0400 |
|---|---|---|
| committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-28 18:00:19 -0400 |
| commit | 697ccb452b58a796dabc47736b87ecad5be47e27 (patch) | |
| tree | 57cd33131f6abba624e5eff1882bd301b9b639ea /socketft.h | |
| parent | cffba26fa183fced0edf1dadce6acb1b82f6fe50 (diff) | |
| download | cryptopp-git-697ccb452b58a796dabc47736b87ecad5be47e27.tar.gz | |
Issue 19 and comments on the 05076dbd
Diffstat (limited to 'socketft.h')
| -rw-r--r-- | socketft.h | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -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 |
