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
parent
383d9636a8
commit
185a2c8e83
|
|
@ -1,6 +1,7 @@
|
||||||
// socketft.cpp - written and placed in the public domain by Wei Dai
|
// socketft.cpp - written and placed in the public domain by Wei Dai
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||||
#include "socketft.h"
|
#include "socketft.h"
|
||||||
#include "trap.h"
|
#include "trap.h"
|
||||||
|
|
||||||
|
|
|
||||||
16
socketft.h
16
socketft.h
|
|
@ -10,17 +10,31 @@
|
||||||
#include "trap.h"
|
#include "trap.h"
|
||||||
|
|
||||||
#ifdef USE_WINDOWS_STYLE_SOCKETS
|
#ifdef USE_WINDOWS_STYLE_SOCKETS
|
||||||
|
|
||||||
# if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
|
# if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
|
||||||
# error Winsock 1 is not supported by this library. Please include this file or winsock2.h before windows.h.
|
# error Winsock 1 is not supported by this library. Please include this file or winsock2.h before windows.h.
|
||||||
# endif
|
# 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 <winsock2.h>
|
||||||
#include "winpipes.h"
|
#include "winpipes.h"
|
||||||
|
|
||||||
|
#if (_MSC_VER)
|
||||||
|
# pragma warning (pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
|
||||||
11
winpipes.h
11
winpipes.h
|
|
@ -9,8 +9,19 @@
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "trap.h"
|
#include "trap.h"
|
||||||
|
|
||||||
|
// 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 <winsock2.h>
|
||||||
|
|
||||||
|
// Using _WINSOCK_DEPRECATED_NO_WARNINGS disables warnings for application code, too
|
||||||
|
#if (_MSC_VER)
|
||||||
|
# pragma warning (pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
//! Windows Handle
|
//! Windows Handle
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue