Issue 19 and comments on the 05076dbd

pull/35/head
Jeffrey Walton 2015-07-28 18:00:19 -04:00
parent cffba26fa1
commit 697ccb452b
2 changed files with 24 additions and 28 deletions

View File

@ -5,36 +5,27 @@
#ifdef SOCKETS_AVAILABLE
#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
// 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
#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

View File

@ -5,22 +5,17 @@
#ifdef WINDOWS_PIPES_AVAILABLE
#include "network.h"
#include "queue.h"
#include "trap.h"
// Using _WINSOCK_DEPRECATED_NO_WARNINGS disables warnings for application code, too
// Avoid _WINSOCK_DEPRECATED_NO_WARNINGS
#if (_MSC_VER)
# pragma warning (push)
# pragma warning (disable: 4996)
#endif
#include <winsock2.h>
#include "network.h"
#include "queue.h"
#include "trap.h"
// Using _WINSOCK_DEPRECATED_NO_WARNINGS disables warnings for application code, too
#if (_MSC_VER)
# pragma warning (pop)
#endif
#include <winsock2.h>
NAMESPACE_BEGIN(CryptoPP)
@ -150,6 +145,11 @@ private:
NAMESPACE_END
// Avoid _WINSOCK_DEPRECATED_NO_WARNINGS
#if (_MSC_VER)
# pragma warning (pop)
#endif
#endif
#endif