mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 08:04:14 +02:00
Improved MingW compatibility.
This commit is contained in:
parent
6f6cc52e20
commit
d130d6017f
@ -38,8 +38,6 @@ Application::Application(void)
|
|||||||
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0)
|
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0)
|
||||||
throw Win32Exception("WSAStartup failed", WSAGetLastError());
|
throw Win32Exception("WSAStartup failed", WSAGetLastError());
|
||||||
#else /* _WIN32 */
|
#else /* _WIN32 */
|
||||||
LTDL_SET_PRELOADED_SYMBOLS();
|
|
||||||
|
|
||||||
lt_dlinit();
|
lt_dlinit();
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
@ -21,12 +21,19 @@
|
|||||||
#define WIN32_H
|
#define WIN32_H
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#define _WIN32_WINNT 0x0502
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#include <imagehlp.h>
|
#include <imagehlp.h>
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
# ifndef IPV6_V6ONLY
|
||||||
|
# define IPV6_V6ONLY 27
|
||||||
|
# endif /* IPV6_V6ONLY */
|
||||||
|
#endif /* __MINGW32__ */
|
||||||
|
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
|
|
||||||
#define MAXPATHLEN MAX_PATH
|
#define MAXPATHLEN MAX_PATH
|
||||||
|
@ -37,7 +37,11 @@ AX_CXX_COMPILE_STDCXX_0X
|
|||||||
AX_CXX_GCC_ABI_DEMANGLE
|
AX_CXX_GCC_ABI_DEMANGLE
|
||||||
AX_PTHREAD
|
AX_PTHREAD
|
||||||
|
|
||||||
|
<<<<<<< Updated upstream
|
||||||
LT_INIT([dlopen disable-static])
|
LT_INIT([dlopen disable-static])
|
||||||
|
=======
|
||||||
|
LT_INIT([dlopen shared disable-static win32-dll])
|
||||||
|
>>>>>>> Stashed changes
|
||||||
LT_CONFIG_LTDL_DIR([ltdl])
|
LT_CONFIG_LTDL_DIR([ltdl])
|
||||||
LTDL_INIT
|
LTDL_INIT
|
||||||
|
|
||||||
@ -67,6 +71,8 @@ AC_CHECK_LIB(eay32, X509_NAME_oneline)
|
|||||||
AC_CHECK_LIB(m, floor)
|
AC_CHECK_LIB(m, floor)
|
||||||
AC_CHECK_LIB(pthread, pthread_create)
|
AC_CHECK_LIB(pthread, pthread_create)
|
||||||
AC_CHECK_LIB(socket, getsockname)
|
AC_CHECK_LIB(socket, getsockname)
|
||||||
|
AC_CHECK_LIB(ws2_32, getsockname)
|
||||||
|
AC_CHECK_LIB(shlwapi, PathRemoveFileSpecA)
|
||||||
|
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], [])],
|
[AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], [])],
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
|
|
||||||
#include <i2-icinga.h>
|
#include <i2-icinga.h>
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
# include <ltdl.h>
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,6 +34,8 @@ using namespace icinga;
|
|||||||
*/
|
*/
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
LTDL_SET_PRELOADED_SYMBOLS();
|
||||||
|
|
||||||
IcingaApplication::Ptr instance = make_shared<IcingaApplication>();
|
IcingaApplication::Ptr instance = make_shared<IcingaApplication>();
|
||||||
return instance->Run(argc, argv);
|
return instance->Run(argc, argv);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user