Fix macOS build: use system zlib and fix LZO types
This commit is contained in:
parent
ebee591530
commit
d0b8560913
@ -1,10 +1,13 @@
|
||||
#ifndef COMPRESSION_H
|
||||
#define COMPRESSION_H
|
||||
|
||||
#include "QtZlib/zlib.h"
|
||||
|
||||
//#include <windows.h>
|
||||
#include <QtGlobal>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include "QtZlib/zlib.h"
|
||||
#else
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include <QByteArray>
|
||||
#include <QVector>
|
||||
|
||||
@ -2847,7 +2847,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_LONG
|
||||
#elif (LZO_SIZEOF_INT == 2) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT16E_T == LZO_TYPEOF_SHORT)
|
||||
# define lzo_int16e_t int
|
||||
# define lzo_uint16e_t quint32
|
||||
# define lzo_uint16e_t unsigned int
|
||||
# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF_INT
|
||||
#elif (LZO_SIZEOF_SHORT == 2)
|
||||
# define lzo_int16e_t short int
|
||||
@ -2856,14 +2856,14 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
#elif 1 && !(LZO_CFG_TYPE_NO_MODE_HI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM)
|
||||
# if !(LZO_LANG_ASSEMBLER)
|
||||
typedef int lzo_int16e_hi_t__ __attribute__((__mode__(__HI__)));
|
||||
typedef quint32 lzo_uint16e_hi_t__ __attribute__((__mode__(__HI__)));
|
||||
typedef unsigned int lzo_uint16e_hi_t__ __attribute__((__mode__(__HI__)));
|
||||
# endif
|
||||
# define lzo_int16e_t lzo_int16e_hi_t__
|
||||
# define lzo_uint16e_t lzo_uint16e_hi_t__
|
||||
# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___MODE_HI
|
||||
#elif (LZO_SIZEOF___INT16 == 2)
|
||||
# define lzo_int16e_t __int16
|
||||
# define lzo_uint16e_t quint32
|
||||
# define lzo_uint16e_t unsigned int
|
||||
# define LZO_TYPEOF_LZO_INT16E_T LZO_TYPEOF___INT16
|
||||
#else
|
||||
#endif
|
||||
@ -2883,7 +2883,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_LONG
|
||||
#elif (LZO_SIZEOF_INT == 4)
|
||||
# define lzo_int32e_t int
|
||||
# define lzo_uint32e_t quint32
|
||||
# define lzo_uint32e_t unsigned int
|
||||
# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF_INT
|
||||
#elif (LZO_SIZEOF_SHORT == 4)
|
||||
# define lzo_int32e_t short int
|
||||
@ -2896,7 +2896,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
#elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x025f00ul) || LZO_CC_LLVM) && (__INT_MAX__+0 > 2147483647L)
|
||||
# if !(LZO_LANG_ASSEMBLER)
|
||||
typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__)));
|
||||
typedef quint32 lzo_uint32e_si_t__ __attribute__((__mode__(__SI__)));
|
||||
typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__)));
|
||||
# endif
|
||||
# define lzo_int32e_t lzo_int32e_si_t__
|
||||
# define lzo_uint32e_t lzo_uint32e_si_t__
|
||||
@ -2904,7 +2904,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
#elif 1 && !(LZO_CFG_TYPE_NO_MODE_SI) && (LZO_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L)
|
||||
# if !(LZO_LANG_ASSEMBLER)
|
||||
typedef int lzo_int32e_si_t__ __attribute__((__mode__(__SI__)));
|
||||
typedef quint32 lzo_uint32e_si_t__ __attribute__((__mode__(__SI__)));
|
||||
typedef unsigned int lzo_uint32e_si_t__ __attribute__((__mode__(__SI__)));
|
||||
# endif
|
||||
# define lzo_int32e_t lzo_int32e_si_t__
|
||||
# define lzo_uint32e_t lzo_uint32e_si_t__
|
||||
@ -2913,7 +2913,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___MODE_SI
|
||||
#elif (LZO_SIZEOF___INT32 == 4)
|
||||
# define lzo_int32e_t __int32
|
||||
# define lzo_uint32e_t quint32
|
||||
# define lzo_uint32e_t unsigned int
|
||||
# define LZO_TYPEOF_LZO_INT32E_T LZO_TYPEOF___INT32
|
||||
#else
|
||||
#endif
|
||||
@ -2937,7 +2937,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
#endif
|
||||
#if (LZO_SIZEOF_INT == 8) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG)
|
||||
# define lzo_int64e_t int
|
||||
# define lzo_uint64e_t quint32
|
||||
# define lzo_uint64e_t unsigned int
|
||||
# define LZO_TYPEOF_LZO_INT64E_T LZO_TYPEOF_INT
|
||||
#elif (LZO_SIZEOF_LONG == 8) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF_LONG_LONG) && !(LZO_CFG_PREFER_TYPEOF_ACC_INT64E_T == LZO_TYPEOF___INT64)
|
||||
# define lzo_int64e_t long int
|
||||
@ -2984,7 +2984,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
# define LZO_TYPEOF_LZO_INT32L_T LZO_TYPEOF_LZO_INT32E_T
|
||||
#elif (LZO_SIZEOF_INT >= 4) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG)
|
||||
# define lzo_int32l_t int
|
||||
# define lzo_uint32l_t quint32
|
||||
# define lzo_uint32l_t unsigned int
|
||||
# define LZO_SIZEOF_LZO_INT32L_T LZO_SIZEOF_INT
|
||||
# define LZO_TYPEOF_LZO_INT32L_T LZO_SIZEOF_INT
|
||||
#elif (LZO_SIZEOF_LONG >= 4)
|
||||
@ -3057,7 +3057,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
#elif (LZO_CC_MSC && (_MSC_VER >= 1300) && (LZO_SIZEOF_VOID_P == 4) && (LZO_SIZEOF_INT == 4))
|
||||
# if !(LZO_LANG_ASSEMBLER)
|
||||
typedef __w64 int lzo_intptr_t;
|
||||
typedef __w64 quint32 lzo_uintptr_t;
|
||||
typedef __w64 unsigned int lzo_uintptr_t;
|
||||
# endif
|
||||
# define lzo_intptr_t lzo_intptr_t
|
||||
# define lzo_uintptr_t lzo_uintptr_t
|
||||
@ -3070,7 +3070,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_SHORT
|
||||
#elif (LZO_SIZEOF_INT >= LZO_SIZEOF_VOID_P) && (LZO_SIZEOF_INT < LZO_SIZEOF_LONG)
|
||||
# define lzo_intptr_t int
|
||||
# define lzo_uintptr_t quint32
|
||||
# define lzo_uintptr_t unsigned int
|
||||
# define LZO_SIZEOF_LZO_INTPTR_T LZO_SIZEOF_INT
|
||||
# define LZO_TYPEOF_LZO_INTPTR_T LZO_TYPEOF_INT
|
||||
#elif (LZO_SIZEOF_LONG >= LZO_SIZEOF_VOID_P)
|
||||
@ -3104,7 +3104,7 @@ LZO_COMPILE_TIME_ASSERT_HEADER(LZO_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
|
||||
# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_LONG
|
||||
# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_LONG
|
||||
#elif (LZO_WORDSIZE == LZO_SIZEOF_INT)
|
||||
# define lzo_word_t quint32
|
||||
# define lzo_word_t unsigned int
|
||||
# define lzo_sword_t int
|
||||
# define LZO_SIZEOF_LZO_WORD_T LZO_SIZEOF_INT
|
||||
# define LZO_TYPEOF_LZO_WORD_T LZO_TYPEOF_INT
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include "enums.h"
|
||||
#ifdef Q_OS_WIN
|
||||
#include "QtZlib/zlib.h"
|
||||
#else
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
#include "qdir.h"
|
||||
#include "qfileinfo.h"
|
||||
#include "qicon.h"
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
#include <QtCore>
|
||||
#ifdef Q_OS_WIN
|
||||
#include "QtZlib/zlib.h"
|
||||
#else
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
#include "ecrypt-sync.h"
|
||||
#include "sha1.h"
|
||||
#include "encryption.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user