Skip to content

<cstdatomic> vs <atomic> #7

Closed
Closed

Description

@mdcallag

This check from build_tools/build_platform_detect won't define LEVELDB_CSTDATOMIC_PRESENT because doesn't exist for gcc 4.7. Maybe it did for older gcc versions, but I don't track modern gcc/g++ enough to understand it. I think the check might need to use "include " instead.

# If -std=c++0x works, use <cstdatomic>.  Otherwise use port_posix.h.
$CXX $CFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null  <<EOF
  #include <cstdatomic>
  int main() {}

EOF
if [ "$?" = 0 ]; then
COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX -DLEVELDB_CSTDATOMIC_PRESENT"
PLATFORM_CXXFLAGS="-std=c++0x"
else
COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX"
fi

Activity

  1. igorcanadi commented on Nov 18, 2013

    @igorcanadi
    Contributor

    Tnx Mark, addressing this.

  2. igorcanadi commented on Nov 18, 2013

    @igorcanadi
    Contributor

    Done, we're using now.

  3. added a commit that references this issue on Apr 25, 2014
  4. 68 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions