mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-11 07:45:17 +00:00
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
This commit is contained in:
parent
383d9636a8
commit
185a2c8e83
@ -1,6 +1,7 @@
|
||||
// socketft.cpp - written and placed in the public domain by Wei Dai
|
||||
|
||||
#include "pch.h"
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
#include "socketft.h"
|
||||
#include "trap.h"
|
||||
|
||||
|
16
socketft.h
16
socketft.h
@ -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)
|
||||
|
11
winpipes.h
11
winpipes.h
@ -9,8 +9,19 @@
|
||||
#include "queue.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>
|
||||
|
||||
// Using _WINSOCK_DEPRECATED_NO_WARNINGS disables warnings for application code, too
|
||||
#if (_MSC_VER)
|
||||
# pragma warning (pop)
|
||||
#endif
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
//! Windows Handle
|
||||
|
Loading…
x
Reference in New Issue
Block a user