diff options
| author | Jeffrey Walton <noloader@gmail.com> | 2015-07-27 19:05:53 -0400 |
|---|---|---|
| committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-27 19:05:53 -0400 |
| commit | 185a2c8e830644a62eaedf21853abb3b7fd1254b (patch) | |
| tree | 94e6680f71e97bac982be805deecba0d9cb9ad45 /socketft.h | |
| parent | 383d9636a89fb640cae2276e5a0dc32549744d40 (diff) | |
| download | cryptopp-git-185a2c8e830644a62eaedf21853abb3b7fd1254b.tar.gz | |
Used pragmas to disable the deprecated warnings under Visual Studio rather than _WINSOCK_DEPRECATED_NO_WARNINGS. Using _WINSOCK_DEPRECATED_NO_WARNINGS could cross-pollintae out of the library and into user code
Diffstat (limited to 'socketft.h')
| -rw-r--r-- | socketft.h | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -10,17 +10,31 @@ #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 -#define _WINSOCK_DEPRECATED_NO_WARNINGS + +// 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) |
