Fix build on old Macs

This commit is contained in:
pancake 2017-11-28 13:21:49 +01:00
parent d909c3d333
commit fe649cf4e3
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,6 @@
ISPPC=$(shell uname -a | grep Power)
ifeq ($(ISPPC),)
BIN=libr2
ISLIB=1
BINDEPS=r_core r_parse r_search r_cons r_config
@ -22,3 +25,7 @@ include ../../shlr/ar/deps.mk
clean::
rm -f $(BIN).$(EXT_SO) $(BIN).o
else
all:
@echo Cant build preloaded lib in old Macs
endif

View File

@ -55,6 +55,7 @@ static inline RBIter bound_iter(RBNode *x, void *data, RBComparator cmp, bool up
return it;
}
/*
static void _check1(RBNode *x, int dep, int black, bool leftmost) {
static int black_;
if (x) {
@ -74,6 +75,7 @@ static void _check1(RBNode *x, int dep, int black, bool leftmost) {
static void _check(RBNode *x) {
_check1 (x, 0, 0, true);
}
*/
// Returns true if a node with an equal key is deleted
R_API bool r_rbtree_aug_delete(RBNode **root, void *data, RBComparator cmp, RBNodeFree freefn, RBNodeSum sum) {

View File

@ -265,8 +265,9 @@ R_API int r_sys_clearenv(void) {
return 0;
}
if (env) {
while (*environ) {
*environ++ = NULL;
char **e = env;
while (*e) {
*e++ = NULL;
}
}
#else