This opensource after all, why not use them?tags/1.9.4
@@ -31,8 +31,8 @@ endif | |||||
32BIT_FLAGS = -m32 | 32BIT_FLAGS = -m32 | ||||
64BIT_FLAGS = -m64 | 64BIT_FLAGS = -m64 | ||||
BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 $(CFLAGS) | |||||
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x $(CXXFLAGS) | |||||
BUILD_C_FLAGS = $(BASE_FLAGS) -std=gnu99 $(CFLAGS) | |||||
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=gnu++0x $(CXXFLAGS) | |||||
LINK_FLAGS = $(LDFLAGS) | LINK_FLAGS = $(LDFLAGS) | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -8,7 +8,6 @@ include ../Makefile.mk | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
BUILD_C_FLAGS += -std=gnu99 | |||||
BUILD_CXX_FLAGS += -I../../libs/distrho | BUILD_CXX_FLAGS += -I../../libs/distrho | ||||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui gl) | BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui gl) | ||||
LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui gl) | LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui gl) | ||||
@@ -256,9 +256,13 @@ static inline void list_splice_init(struct list_head *list, struct list_head *he | |||||
* @type: the type of the struct this is embedded in. | * @type: the type of the struct this is embedded in. | ||||
* @member: the name of the list_struct within the struct. | * @member: the name of the list_struct within the struct. | ||||
*/ | */ | ||||
#define list_entry(ptr, type, member) \ | |||||
#ifdef __GNUC__ | |||||
# define list_entry(ptr, type, member) \ | |||||
container_of(ptr, type, member) | |||||
#else | |||||
# define list_entry(ptr, type, member) \ | |||||
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) | ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) | ||||
//container_of(ptr, type, member) | |||||
#endif | |||||
/** | /** | ||||
* list_for_each - iterate over a list | * list_for_each - iterate over a list | ||||
@@ -25,11 +25,6 @@ extern "C" { | |||||
#include "rtmempool/rtmempool.h" | #include "rtmempool/rtmempool.h" | ||||
} | } | ||||
// list_entry C++11 version (using nullptr instead of 0) | |||||
#undef list_entry | |||||
#define list_entry(ptr, type, member) \ | |||||
((type *)((char *)(ptr)-(unsigned long)(&((type *)nullptr)->member))) | |||||
// Declare non copyable and prevent heap allocation | // Declare non copyable and prevent heap allocation | ||||
#define LIST_DECLARATIONS(className) \ | #define LIST_DECLARATIONS(className) \ | ||||
className(const className&); \ | className(const className&); \ | ||||