basho / leveldb

Clone of http://code.google.com/p/leveldb/
BSD 3-Clause "New" or "Revised" License
408 stars 182 forks source link

using <atomic> , work on ARM64 CPU #235

Closed refactor closed 2 years ago

refactor commented 4 years ago

for AtomicPointer:

  1. use , instead of ;
  2. make it work on ARM64 CPU
seth-priya commented 4 years ago

This works for ppc64le as well!

aramallo commented 2 years ago

Hi, +1 on this one, any reason why it has not been merged?

martinsumner commented 2 years ago

Apologies for the delay, I didn't notice this at first ... and then it prompted some discussion within some of the bigger riak users.

All agreed now, thank-you for submitting, and thank-you to MVM for reviewing.

martinsumner commented 2 years ago

Issue with ubuntu 14:

Submodule path 'leveldb_ee': checked out '1d13c28cb198770e03f805c7dd32d6a58260c1e2'
make[1]: Entering directory `/dbroot/riak/_build/default/lib/eleveldb/c_src/leveldb'
cc  -I /dbroot/riak/_build/default/lib/eleveldb/c_src/system/include -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -DSNAPPY  -DLEVELDB_VSN="2.0.37" -O2 -g -DNDEBUG     -fPIC -MM -E -MT port/port_posix.d -MT port/port_posix.o -MF port/port_posix.d port/port_posix.cc
cc  -I /dbroot/riak/_build/default/lib/eleveldb/c_src/system/include -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -DSNAPPY  -DLEVELDB_VSN="2.0.37" -O2 -g -DNDEBUG     -fPIC -MM -E -MT util/throttle.d -MT util/throttle.o -MF util/throttle.d util/throttle.cc
cc  -I /dbroot/riak/_build/default/lib/eleveldb/c_src/system/include -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -DSNAPPY  -DLEVELDB_VSN="2.0.37" -O2 -g -DNDEBUG     -fPIC -MM -E -MT util/thread_tasks.d -MT util/thread_tasks.o -MF util/thread_tasks.d util/thread_tasks.cc
In file included from /usr/include/c++/4.8/atomic:38:0,
                 from ./port/atomic_pointer.h:23,
                 from ./port/port_posix.h:51,
                 from port/port_posix.cc:5:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

Guessing for older versions of linux we might need some Makefile changes to set the -std=c++11 flag?