diff --git a/CMakeLists.txt b/CMakeLists.txt index da74bec..34139bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,8 +134,8 @@ int main(int argc, char* argv[]) { MACRO(CREATE_CHECK NAME) ADD_EXECUTABLE(${NAME} ${NAME}.c) TARGET_LINK_LIBRARIES(${NAME} ${COMMON_LIBRARIES}) -# SET_SOURCE_FILES_PROPERTIES( ${NAME}.c PROPERTIES LANGUAGE "CXX" ) -# SET_TARGET_PROPERTIES(${NAME} PROPERTIES LINKER_LANGUAGE "CXX") + #SET_SOURCE_FILES_PROPERTIES( ${NAME}.c PROPERTIES LANGUAGE "CXX" ) + #SET_TARGET_PROPERTIES(${NAME} PROPERTIES LINKER_LANGUAGE "CXX") ADD_TEST(${NAME} nice ./${NAME}) ENDMACRO(CREATE_CHECK) @@ -169,7 +169,7 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/src/stasis) IF ( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" ) SET(COMMON_LIBRARIES stasis m pthread stdc++ ${DBUG}) # profiler) SET(CMAKE_C_FLAGS "-g -Wall -Wextra -ansi -Wno-unused-parameter -pedantic -std=gnu99 -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_C_FLAGS}") - SET(CMAKE_CXX_FLAGS "-g -Wall -Wextra -ansi -Wno-unused-parameter -Wno-long-long -pedantic -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS "-g -Wall -Wextra -ansi -Wno-unused-parameter -std=c++98 -Wno-long-long -pedantic -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_CXX_FLAGS}") ELSEIF ( "${CMAKE_C_COMPILER_ID}" STREQUAL "SunPro" ) SET(COMMON_LIBRARIES stasis m pthread Crun Cstd) SET(CMAKE_C_FLAGS "-g -xc99=all -DPBL_COMPAT -D_FILE_OFFSET_BITS=64 ${CMAKE_C_FLAGS}") diff --git a/benchmarks/turbine.c b/benchmarks/turbine.c index 903f0df..3c5c2a9 100644 --- a/benchmarks/turbine.c +++ b/benchmarks/turbine.c @@ -4,8 +4,8 @@ * Created on: Aug 31, 2011 * Author: sears */ -#include #include +#include #include #include #include diff --git a/config.h.cmake b/config.h.cmake index d0ce7d6..2495e26 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,7 +1,8 @@ #ifndef STASIS_CONFIG_H #define STASIS_CONFIG_H -#define __USE_GNU +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #cmakedefine HAVE_POSIX_FALLOCATE #cmakedefine HAVE_POSIX_MEMALIGN #cmakedefine HAVE_POSIX_FADVISE diff --git a/stasis/util/rw.h b/stasis/util/rw.h index 5b60360..3c17a0b 100644 --- a/stasis/util/rw.h +++ b/stasis/util/rw.h @@ -20,7 +20,6 @@ */ #ifndef __LIBDFA_RW_H #define __LIBDFA_RW_H - #include #include #include diff --git a/stasis/util/time.h b/stasis/util/time.h index 2fae56e..9b8c964 100644 --- a/stasis/util/time.h +++ b/stasis/util/time.h @@ -15,7 +15,7 @@ static inline unsigned long long stasis_get_tsc(void) { unsigned long long tsc; - asm volatile ("rdtsc" : "=A" (tsc)); + __asm volatile ("rdtsc" : "=A" (tsc)); return tsc; } static inline struct timeval stasis_subtract_timeval(const struct timeval a, const struct timeval b) {