mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-25 14:56:28 -05:00
Fixed compile of the libraries with MinGW 4.8 on Windows.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6814 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9b8d597c0d
commit
13e7ac8b43
@ -58,7 +58,7 @@ win32 {
|
|||||||
QMAKE_CC = g++
|
QMAKE_CC = g++
|
||||||
OBJECTS_DIR = temp/obj
|
OBJECTS_DIR = temp/obj
|
||||||
MOC_DIR = temp/moc
|
MOC_DIR = temp/moc
|
||||||
DEFINES *= STATICLIB
|
DEFINES *= STATICLIB WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
||||||
# These have been replaced by _WIN32 && __MINGW32__
|
# These have been replaced by _WIN32 && __MINGW32__
|
||||||
#DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
|
#DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
|
@ -32,8 +32,6 @@
|
|||||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
#if defined(_WIN32) || defined(__MINGW32__)
|
#if defined(_WIN32) || defined(__MINGW32__)
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
#include <winsock2.h>
|
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
|
||||||
#include <stdio.h> /* for ssize_t */
|
#include <stdio.h> /* for ssize_t */
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <malloc.h>
|
||||||
#else
|
#else
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -201,8 +201,10 @@ win32 {
|
|||||||
QMAKE_CC = g++
|
QMAKE_CC = g++
|
||||||
OBJECTS_DIR = temp/obj
|
OBJECTS_DIR = temp/obj
|
||||||
MOC_DIR = temp/moc
|
MOC_DIR = temp/moc
|
||||||
DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
|
DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
||||||
DEFINES *= MINIUPNPC_VERSION=13
|
DEFINES *= MINIUPNPC_VERSION=13
|
||||||
|
# This defines the platform to be WinXP or later and is needed for getaddrinfo (_WIN32_WINNT_WINXP)
|
||||||
|
DEFINES *= WINVER=0x0501
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
|
|
||||||
# Switch on extra warnings
|
# Switch on extra warnings
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
|
||||||
#include "dlfcn_win32.h"
|
#include "dlfcn_win32.h"
|
||||||
|
|
||||||
|
@ -362,7 +362,11 @@ bool getLocalInterfaces(struct in_addr &routeAddr, std::list<struct in_addr> &ad
|
|||||||
addr.s_addr = ipaddr.dwAddr;
|
addr.s_addr = ipaddr.dwAddr;
|
||||||
rs_sprintf(out, "Iface(%ld) => %s\n", ipaddr.dwIndex, rs_inet_ntoa(addr).c_str());
|
rs_sprintf(out, "Iface(%ld) => %s\n", ipaddr.dwIndex, rs_inet_ntoa(addr).c_str());
|
||||||
|
|
||||||
|
#if __MINGW_MAJOR_VERSION <= 3
|
||||||
unsigned short wType = ipaddr.unused2; // should be wType
|
unsigned short wType = ipaddr.unused2; // should be wType
|
||||||
|
#else
|
||||||
|
unsigned short wType = ipaddr.wType;
|
||||||
|
#endif
|
||||||
if (wType & MIB_IPADDR_DISCONNECTED)
|
if (wType & MIB_IPADDR_DISCONNECTED)
|
||||||
{
|
{
|
||||||
pqioutput(PQL_DEBUG_BASIC, pqinetzone, "Interface disconnected, " + out);
|
pqioutput(PQL_DEBUG_BASIC, pqinetzone, "Interface disconnected, " + out);
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#ifdef WINDOWS_SYS
|
#ifdef WINDOWS_SYS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <malloc.h>
|
||||||
#else
|
#else
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -28,17 +28,8 @@
|
|||||||
#ifndef RSWIN_H_
|
#ifndef RSWIN_H_
|
||||||
#define RSWIN_H_
|
#define RSWIN_H_
|
||||||
|
|
||||||
|
|
||||||
#ifdef WINDOWS_SYS
|
#ifdef WINDOWS_SYS
|
||||||
|
|
||||||
#ifdef _WIN32_WINNT
|
|
||||||
#error "Please include \"util/rswin.h\" *before* any other one as _WIN32_WINNT needs to predefined"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// This defines the platform to be WinXP or later and is needed for getaddrinfo
|
|
||||||
// It must be declared before pthread.h includes windows.h
|
|
||||||
#define _WIN32_WINNT 0x0501
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG = staticlib debug
|
CONFIG += staticlib debug
|
||||||
|
|
||||||
DEFINES *= OPENSSL_NO_IDEA
|
DEFINES *= OPENSSL_NO_IDEA
|
||||||
|
|
||||||
@ -17,6 +17,8 @@ linux-* {
|
|||||||
}
|
}
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
|
DEFINES *= WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
||||||
|
|
||||||
# Switch off optimization for release version
|
# Switch off optimization for release version
|
||||||
QMAKE_CXXFLAGS_RELEASE -= -O2
|
QMAKE_CXXFLAGS_RELEASE -= -O2
|
||||||
QMAKE_CXXFLAGS_RELEASE += -O0
|
QMAKE_CXXFLAGS_RELEASE += -O0
|
||||||
|
@ -80,15 +80,15 @@ win32 {
|
|||||||
LIBS += -L"$$PWD/../../../lib"
|
LIBS += -L"$$PWD/../../../lib"
|
||||||
LIBS += -lssl -lcrypto -lminiupnpc -lz
|
LIBS += -lssl -lcrypto -lminiupnpc -lz
|
||||||
# added after bitdht
|
# added after bitdht
|
||||||
# LIBS += -lws2_32
|
# LIBS += -lcrypto -lws2_32 -lgdi32
|
||||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32
|
LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin
|
||||||
LIBS += -lole32 -lwinmm
|
LIBS += -lole32 -lwinmm
|
||||||
|
|
||||||
PROTOCPATH=$$PWD/../../../lib/bin/
|
PROTOCPATH=$$PWD/../../../lib/bin/
|
||||||
|
|
||||||
RC_FILE = resources/retroshare_win.rc
|
RC_FILE = resources/retroshare_win.rc
|
||||||
|
|
||||||
DEFINES *= WINDOWS_SYS
|
DEFINES *= WINDOWS_SYS _USE_32BIT_TIME_T
|
||||||
|
|
||||||
SSL_DIR = ../../../openssl-1.0.1c
|
SSL_DIR = ../../../openssl-1.0.1c
|
||||||
|
|
||||||
@ -325,5 +325,5 @@ protorpc {
|
|||||||
}
|
}
|
||||||
win32 {
|
win32 {
|
||||||
# must be added after ssh
|
# must be added after ssh
|
||||||
LIBS += -lws2_32 -lcrypto
|
LIBS += -lcrypto -lws2_32 -lgdi32
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,12 @@ win32 {
|
|||||||
QMAKE_CFLAGS_RELEASE += -O0
|
QMAKE_CFLAGS_RELEASE += -O0
|
||||||
|
|
||||||
CONFIG += dummy_glib
|
CONFIG += dummy_glib
|
||||||
|
|
||||||
|
DEFINES *= _USE_32BIT_TIME_T
|
||||||
|
|
||||||
|
# With GCC package 4.8, including io.h either directly or indirectly causes off64_t not to be defined when compiling with -ansi switch
|
||||||
|
DEFINES *= off64_t=_off64_t
|
||||||
|
DEFINES *= off_t=_off_t
|
||||||
}
|
}
|
||||||
|
|
||||||
################################# MacOSX ##########################################
|
################################# MacOSX ##########################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user