mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-23 20:10:25 -04:00
Fix header include for cross-compilation to Windows.
- On unix, filenames are case sensitive and all include files are lowercase - When crosscompiling to Windows, we use mingw32 and not msc. So we should not try to include "stdint4win.h" - Windows includes #define interface to struct. As we use interface as variable name, we need to undef interface
This commit is contained in:
parent
1d2a9879cc
commit
9aa7e371f7
@ -21,7 +21,7 @@
|
|||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,14 +27,14 @@
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
#if (_MSC_VER < 1600)
|
#if !defined(__MINGW32__) && (_MSC_VER < 1600)
|
||||||
#include "stdint4win.h"
|
#include "stdint4win.h"
|
||||||
#endif
|
#endif
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <WS2tcpip.h> // otherwise socklen_t is not a recognized type
|
#include <ws2tcpip.h> // otherwise socklen_t is not a recognized type
|
||||||
//#include <Windows.h> // otherwise int is not a recognized type
|
//#include <Windows.h> // otherwise int is not a recognized type
|
||||||
typedef int off_t;
|
//typedef int off_t;
|
||||||
typedef SSIZE_T ssize_t;
|
//typedef SSIZE_T ssize_t;
|
||||||
typedef UINT64 uint64_t;
|
typedef UINT64 uint64_t;
|
||||||
typedef UINT16 uint16_t;
|
typedef UINT16 uint16_t;
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -78,6 +78,10 @@ extern "C" {
|
|||||||
#include <ifaddrs.h>
|
#include <ifaddrs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef interface
|
||||||
|
#undef interface
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
static bool nosearchbarFlag = false;
|
static bool nosearchbarFlag = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user