Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixup define checks. Cleans up some oopses from #5. #11

Merged
merged 1 commit into from
Aug 1, 2017

Conversation

theuni
Copy link

@theuni theuni commented Jul 31, 2017

  • use "#if defined(foo)" rather than "#if foo"
  • Use the same guard for the cpuid header and the function

- use "#if defined(foo)" rather than "#if foo"
- Use the same guard for the cpuid header and the function
@sipa
Copy link

sipa commented Aug 1, 2017

ACK

@sipa sipa merged commit 8b1cd37 into bitcoin-core:bitcoin-fork Aug 1, 2017
sipa added a commit that referenced this pull request Aug 1, 2017
8b1cd37 fixup define checks. Cleans up some oopses from #5. (Cory Fields)

Pull request description:

  - use "#if defined(foo)" rather than "#if foo"
  - Use the same guard for the cpuid header and the function

Tree-SHA512: fe83895055faf9f5491b9af44262a4dc15d9f56ec8f818e7d66c1002bb6568a90345662828abc7baab0772baa646f9cf13f8ba586ebad5fc3678731b27585885
@@ -8,7 +8,7 @@
#include <stdio.h>
#include <string.h>

#if defined(__GNUC__)
#if (defined(__x86_64__) || defined(__i386__)) && defined(__GNUC__)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be #if defined(ARCH_CPU_X86_FAMILY) && defined(__GNUC__)?

@@ -54,7 +54,7 @@ void InitOnce(OnceType* once, void (*initializer)()) {
}

bool HasAcceleratedCRC32C() {
#if (__x86_64__ || __i386__) && defined(__GNUC__)
#if (defined(__x86_64__) || defined(__i386__)) && defined(__GNUC__)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@@ -145,7 +145,7 @@ void AtomicPointer::NoBarrier_Store(void* v) {
}

bool HasAcceleratedCRC32C() {
#if (__x86_64__ || __i386__)
#if defined(__x86_64__) || defined(__i386__)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#if defined(ARCH_CPU_X86_FAMILY)?

laanwj added a commit to bitcoin/bitcoin that referenced this pull request Aug 2, 2017
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
sickpig pushed a commit to sickpig/BitcoinUnlimited that referenced this pull request Aug 17, 2017
b13a68e Squashed 'src/leveldb/' changes from 196962ff0..c521b3ac6 (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)
mempko pushed a commit to meritlabs/merit that referenced this pull request Sep 28, 2017
b13a68e Squashed 'src/leveldb/' changes from 196962ff0..c521b3ac6 (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
cculianu pushed a commit to cculianu/bitcoin-abc that referenced this pull request Oct 5, 2017
Summary:
Includes:

  bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from Bitcoin-ABC#5 (Cory Fields)

Removes many warnings on MacOSX of the form:

  In file included from leveldb/util/cache.cc:10:
  In file included from ./leveldb/port/port.h:14:
  In file included from ./leveldb/port/port_posix.h:47:
  ./leveldb/port/atomic_pointer.h:55:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use
      std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
        OSMemoryBarrier();
        ^

The bitcoin core patches have been included in BU already by sickpig.

Test Plan: make check.  Installed and running fine.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D584
protonn pushed a commit to argentumproject/argentum that referenced this pull request Jan 11, 2018
Summary:
Includes:

  bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Removes many warnings on MacOSX of the form:

  In file included from leveldb/util/cache.cc:10:
  In file included from ./leveldb/port/port.h:14:
  In file included from ./leveldb/port/port_posix.h:47:
  ./leveldb/port/atomic_pointer.h:55:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use
      std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
        OSMemoryBarrier();
        ^

The bitcoin core patches have been included in BU already by sickpig.

Test Plan: make check.  Installed and running fine.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D584
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 6, 2019
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 6, 2019
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 6, 2019
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 7, 2019
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 8, 2019
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 12, 2019
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
charlesrocket pushed a commit to AXErunners/axe that referenced this pull request Nov 30, 2019
b13a68e Squashed 'src/leveldb/' changes from 196962ff0..c521b3ac6 (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
b13a68e Squashed 'src/leveldb/' changes from 196962f..c521b3a (Pieter Wuille)

Pull request description:

  Includes:
  * bitcoin-core/leveldb-subtree#2: Prefer std::atomic over MemoryBarrier (Pieter Wuille)
  * bitcoin-core/leveldb-subtree#5: Move helper functions out of sse4.2 object (Cory Fields)
  * bitcoin-core/leveldb-subtree#6: Fixes typo (Dimitris Tsapakidis)
  * bitcoin-core/leveldb-subtree#10: Clean up compile-time warnings (gcc 7.1) (Matt Corallo)
  * bitcoin-core/leveldb-subtree#11: fixup define checks. Cleans up some oopses from #5 (Cory Fields)

Tree-SHA512: 2b88a99a86ed8c74c860de13a123ea7f5424d35d314be564820cf83aaae8308383403f7cd56f17c241cfee4885699796141fed666559c21044eaabaeea073315
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants