more cleanup of include directives; keyword use

This commit is contained in:
Russell Sears 2013-02-13 17:23:58 -08:00
parent 610096a965
commit 1a94f8bf89
5 changed files with 7 additions and 7 deletions

View file

@ -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}")

View file

@ -4,8 +4,8 @@
* Created on: Aug 31, 2011
* Author: sears
*/
#include <assert.h>
#include <config.h>
#include <assert.h>
#include <stasis/common.h>
#include <stasis/util/latches.h>
#include <stasis/util/time.h>

View file

@ -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

View file

@ -20,7 +20,6 @@
*/
#ifndef __LIBDFA_RW_H
#define __LIBDFA_RW_H
#include <stasis/common.h>
#include <pthread.h>
#include <stdio.h>

View file

@ -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) {