some msvc changes
This commit is contained in:
parent
34d23589a2
commit
b0fb7612ee
@ -21,9 +21,9 @@
|
||||
#include ASPELL_INCLUDE
|
||||
|
||||
#include <mutex>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "safeunistd.h"
|
||||
#include "dlib.h"
|
||||
#include "pathut.h"
|
||||
#include "execmd.h"
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <unordered_map>
|
||||
#include <iterator>
|
||||
|
||||
#include "cstr.h"
|
||||
#include "pathut.h"
|
||||
|
||||
@ -2939,6 +2939,7 @@ extern "C" {
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW64__)
|
||||
#if defined(__MINGW64__)
|
||||
static FILE *mz_fopen(const char *pFilename, const char *pMode)
|
||||
{
|
||||
FILE *pFile = NULL;
|
||||
@ -2952,11 +2953,17 @@ static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStream)
|
||||
return NULL;
|
||||
return pFile;
|
||||
}
|
||||
#endif /* MINGW64 */
|
||||
#ifndef MINIZ_NO_TIME
|
||||
#include <sys/utime.h>
|
||||
#endif
|
||||
#if defined(__MINGW64__)
|
||||
#define MZ_FOPENREAD mz_fopen
|
||||
#define MZ_FOPEN mz_fopen
|
||||
#else /*->msc*/
|
||||
#define MZ_FOPENREAD(f, m) _wfopen(f, m)
|
||||
#define MZ_FOPEN(f, m) fopen(f, m)
|
||||
#endif
|
||||
#define MZ_FCLOSE fclose
|
||||
#define MZ_FREAD fread
|
||||
#define MZ_FWRITE fwrite
|
||||
|
||||
@ -22,7 +22,11 @@
|
||||
#ifdef _WIN32
|
||||
// needed for localtime_r under mingw?
|
||||
#define _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#define localtime_r(a,b) localtime_s(b,a)
|
||||
#endif /* _MSC_VER */
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
1224
src/windows/dirent.h
Normal file
1224
src/windows/dirent.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -15,6 +15,8 @@ DEFINES += PSAPI_VERSION=1
|
||||
DEFINES += READFILE_ENABLE_MINIZ
|
||||
DEFINES += READFILE_ENABLE_MD5
|
||||
DEFINES += READFILE_ENABLE_ZLIB
|
||||
# VC only defines __WIN32, not __WIN32__ . For some reason xapian uses __WIN32__ which it actually defines in conf_post.h if __WIN32 is set. Reason: mystery.
|
||||
DEFINES += __WIN32__
|
||||
|
||||
# This is necessary to avoid an undefined impl__xmlFree.
|
||||
# See comment in libxml/xmlexports.h
|
||||
@ -115,7 +117,6 @@ SOURCES += \
|
||||
../../utils/miniz.cpp \
|
||||
../../utils/pathut.cpp \
|
||||
../../utils/pxattr.cpp \
|
||||
../../utils/rclionice.cpp \
|
||||
../../utils/rclutil.cpp \
|
||||
../../utils/readfile.cpp \
|
||||
../../utils/smallut.cpp \
|
||||
@ -129,22 +130,34 @@ INCLUDEPATH += ../../common ../../index ../../internfile ../../query \
|
||||
../../xaposix ../../confgui ../../bincimapmime
|
||||
|
||||
windows {
|
||||
contains(QMAKE_CC, gcc){
|
||||
# MingW
|
||||
QMAKE_CXXFLAGS += -std=c++11 -pthread -Wno-unused-parameter
|
||||
contains(QMAKE_CC, gcc){
|
||||
# MingW
|
||||
QMAKE_CXXFLAGS += -std=c++11 -pthread -Wno-unused-parameter
|
||||
LIBS += C:/recolldeps/libxslt/libxslt-1.1.29/win32/bin.mingw/libxslt.a \
|
||||
C:/recolldeps/libxml2/libxml2-2.9.4+dfsg1/win32/bin.mingw/libxml2.a \
|
||||
c:/recolldeps/xapian-core-1.4.11/.libs/libxapian-30.dll \
|
||||
c:/recolldeps/zlib-1.2.8/zlib1.dll \
|
||||
-liconv -lshlwapi -lpsapi -lkernel32
|
||||
INCLUDEPATH += ../../windows \
|
||||
C:/recolldeps/xapian-core-1.4.15/include \
|
||||
C:/recolldeps/libxslt/libxslt-1.1.29/ \
|
||||
C:/recolldeps/libxml2/libxml2-2.9.4+dfsg1/include
|
||||
}
|
||||
contains(QMAKE_CC, cl){
|
||||
# Visual Studio
|
||||
}
|
||||
LIBS += C:/recolldeps/libxslt/libxslt-1.1.29/win32/bin.mingw/libxslt.a \
|
||||
C:/recolldeps/libxml2/libxml2-2.9.4+dfsg1/win32/bin.mingw/libxml2.a \
|
||||
c:/recolldeps/xapian-core-1.4.11/.libs/libxapian-30.dll \
|
||||
c:/recolldeps/zlib-1.2.8/zlib1.dll \
|
||||
-liconv -lshlwapi -lpsapi -lkernel32
|
||||
INCLUDEPATH += ../../windows \
|
||||
C:/recolldeps/xapian-core-1.4.11/include \
|
||||
C:/recolldeps/libxslt/libxslt-1.1.29/ \
|
||||
C:/recolldeps/libxml2/libxml2-2.9.4+dfsg1/include
|
||||
contains(QMAKE_CC, cl){
|
||||
# Visual Studio
|
||||
LIBS += C:/users/bill/documents/recolldeps-vc/libxml2/libxml2-2.9.4+dfsg1/win32/bin.msvc/libxml2.lib \
|
||||
C:/users/bill/documents/recolldeps-vc/libxslt/libxslt-1.1.29/win32/bin.msvc/libxslt.lib \
|
||||
c:/users/bill/documents/recolldeps-vc/xapian-core-1.4.15/.libs/xapian.lib \
|
||||
c:/users/bill/documents/recolldeps-vc/zlib-1.2.11/zlib.lib \
|
||||
c:/users/bill/documents/recolldeps-vc/libiconv-for-windows/lib/libiconv.lib \
|
||||
-lshlwapi -lpsapi -lkernel32
|
||||
INCLUDEPATH += ../../windows \
|
||||
C:/users/bill/documents/recolldeps-vc/xapian-core-1.4.15/include \
|
||||
C:/users/bill/documents/recolldeps-vc/zlib-1.2.11/ \
|
||||
C:/users/bill/documents/recolldeps-vc/libxslt/libxslt-1.1.29/ \
|
||||
C:/users/bill/documents/recolldeps-vc/libxml2/libxml2-2.9.4+dfsg1/include \
|
||||
C:/users/bill/documents/recolldeps-vc/libiconv-for-windows/include
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user