From e247c90fbb1544cf247974cc50c7db8b1997ecdc Mon Sep 17 00:00:00 2001 From: Jay Carlson Date: Mon, 6 Jun 2016 14:18:39 -0400 Subject: [PATCH] Cleanups again --- 2GiveCoin.pro | 10 ++++++++-- src/qt/notificator.cpp | 9 +++++---- src/scrypt-x86_64.S | 18 ++++++++++++------ src/serialize.h | 2 ++ 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/2GiveCoin.pro b/2GiveCoin.pro index 571c744..2a56d4e 100644 --- a/2GiveCoin.pro +++ b/2GiveCoin.pro @@ -128,7 +128,7 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) { QMAKE_CXXFLAGS += -msse2 QMAKE_CFLAGS += -msse2 -QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector +QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -Wno-reserved-user-defined-literal # Input DEPENDPATH += src src/json src/qt @@ -380,6 +380,10 @@ isEmpty(BOOST_INCLUDE_PATH) { macx:BOOST_INCLUDE_PATH = /opt/local/include } +isEmpty(PCRE_INCLUDE_PATH) { + macx:PCRE_INCLUDE_PATH = /usr/local/opt/pcre/include +} + windows:DEFINES += WIN32 windows:RC_FILE = src/qt/res/bitcoin-qt.rc @@ -408,9 +412,11 @@ macx:TARGET = "2GiveCoin-Qt" macx:QMAKE_CFLAGS_THREAD += -pthread macx:QMAKE_LFLAGS_THREAD += -pthread macx:QMAKE_CXXFLAGS_THREAD += -pthread +macx:QRENCODE_LIB_PATH = /usr/local/opt/qrencode/lib +macx:QRENCODE_INCLUDE_PATH = /usr/local/opt/qrencode/include # Set libraries and includes at end, to use platform-defined defaults if not overridden -INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH +INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH $$PCRE_INCLUDE_PATH LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,) LIBS += -lssl -lcrypto -lpcre -lcurl -ldb_cxx$$BDB_LIB_SUFFIX # -lgdi32 has to happen after -lcrypto (see #681) diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp index 8028190..f4ea473 100644 --- a/src/qt/notificator.cpp +++ b/src/qt/notificator.cpp @@ -16,7 +16,8 @@ #include #endif -#ifdef Q_OS_MAC +#if QT_VERSION < 0x050000 && defined(Q_OS_MAC) +#define USING_GROWL 1 #include extern bool qt_mac_execute_apple_script(const QString &script, AEDesc *ret); #endif @@ -46,7 +47,7 @@ Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, mode = Freedesktop; } #endif -#ifdef Q_OS_MAC +#ifdef USING_GROWL // Check if Growl is installed (based on Qt's tray icon implementation) CFURLRef cfurl; OSStatus status = LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator, CFSTR("growlTicket"), kLSRolesAll, 0, &cfurl); @@ -225,7 +226,7 @@ void Notificator::notifySystray(Class cls, const QString &title, const QString & } // Based on Qt's tray icon implementation -#ifdef Q_OS_MAC +#ifdef USING_GROWL void Notificator::notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon) { const QString script( @@ -285,7 +286,7 @@ void Notificator::notify(Class cls, const QString &title, const QString &text, c case QSystemTray: notifySystray(cls, title, text, icon, millisTimeout); break; -#ifdef Q_OS_MAC +#ifdef USING_GROWL case Growl12: case Growl13: notifyGrowl(cls, title, text, icon); diff --git a/src/scrypt-x86_64.S b/src/scrypt-x86_64.S index f0a3fdd..17283a5 100644 --- a/src/scrypt-x86_64.S +++ b/src/scrypt-x86_64.S @@ -26,6 +26,12 @@ .section .note.GNU-stack,"",%progbits #endif +#ifdef __APPLE__ +#define CODE_ALIGN_SIZE 16 +#else +#define CODE_ALIGN_SIZE 32 +#endif + #if defined(__x86_64__) #define scrypt_shuffle(src, so, dest, do) \ @@ -175,7 +181,7 @@ .text - .align 32 + .align CODE_ALIGN_SIZE gen_salsa8_core: # 0: %rdx, %rdi, %rcx, %rsi movq 8(%rsp), %rdi @@ -274,7 +280,7 @@ gen_salsa8_core: .text - .align 32 + .align CODE_ALIGN_SIZE .globl scrypt_core .globl _scrypt_core scrypt_core: @@ -525,7 +531,7 @@ gen_scrypt_core_loop2: xmm_salsa8_core_doubleround(); \ - .align 32 + .align CODE_ALIGN_SIZE xmm_scrypt_core: # shuffle 1st block into %xmm8-%xmm11 movl 60(%rdi), %edx @@ -837,7 +843,7 @@ xmm_scrypt_core_loop2: .text - .align 32 + .align CODE_ALIGN_SIZE .globl scrypt_best_throughput .globl _scrypt_best_throughput scrypt_best_throughput: @@ -999,7 +1005,7 @@ scrypt_best_throughput_exit: .text - .align 32 + .align CODE_ALIGN_SIZE .globl scrypt_core_2way .globl _scrypt_core_2way scrypt_core_2way: @@ -1461,7 +1467,7 @@ scrypt_core_2way_loop2: .text - .align 32 + .align CODE_ALIGN_SIZE .globl scrypt_core_3way .globl _scrypt_core_3way scrypt_core_3way: diff --git a/src/serialize.h b/src/serialize.h index 3b3dcd4..ce8f1f3 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -824,6 +824,7 @@ class CDataStream vch.insert(it, first, last); } +#if 0 // this is considered a redeclaration on OS X 10.11 void insert(iterator it, std::vector::const_iterator first, std::vector::const_iterator last) { assert(last - first >= 0); @@ -836,6 +837,7 @@ class CDataStream else vch.insert(it, first, last); } +#endif #if !defined(_MSC_VER) || _MSC_VER >= 1300 void insert(iterator it, const char* first, const char* last)