mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-08-27 20:58:53 +02:00
* windows/pandora_wmi.cc: Fixed bug #2895307. * modules/pandora_module.cc: Fixed bug #2835450. * bin/pandora_agent.conf: Added xml_buffer configuration token. * ssh/libssh2/libssh2_config.h, ssh/libssh2/packet.c: Renamed usleep to u_sleep to avoid conflicts. * pandora_windows_service.cc: Fixed bug #2899257. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2115 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
39 lines
705 B
C
39 lines
705 B
C
#ifndef WIN32
|
|
#define WIN32
|
|
#endif
|
|
#include <winsock2.h>
|
|
#include <mswsock.h>
|
|
#include <ws2tcpip.h>
|
|
|
|
/* same as WSABUF */
|
|
struct iovec {
|
|
u_long iov_len;
|
|
char *iov_base;
|
|
};
|
|
|
|
#define inline __inline
|
|
|
|
static inline int writev(int sock, struct iovec *iov, int nvecs)
|
|
{
|
|
DWORD ret;
|
|
if (WSASend(sock, (LPWSABUF)iov, nvecs, &ret, 0, NULL, NULL) == 0) {
|
|
return ret;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/* not really usleep, but safe for the way we use it in this lib */
|
|
static inline int u_sleep(int udelay)
|
|
{
|
|
Sleep(udelay / 1000);
|
|
return 0;
|
|
}
|
|
|
|
#define snprintf _snprintf
|
|
|
|
/* Compile in zlib support */
|
|
#define LIBSSH2_HAVE_ZLIB 1
|
|
|
|
/* Enable newer diffie-hellman-group-exchange-sha1 syntax */
|
|
#define LIBSSH2_DH_GEX_NEW 1
|