You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.2 KiB
82 lines
2.2 KiB
|
8 years ago
|
Index: src/Makefile
|
||
|
|
--- src/Makefile.orig 2018-03-18 09:45:40.000000000 +0100
|
||
|
|
+++ src/Makefile 2018-03-18 09:59:38.696358000 +0100
|
||
|
|
@@ -5,24 +5,28 @@
|
||
|
|
export CC
|
||
|
|
|
||
|
|
# if DEBUG env var is set, we compile with "debug" cflags
|
||
|
|
-DEBUGFLAGS = -g -ggdb -O3
|
||
|
|
+DEBUGFLAGS =
|
||
|
|
ifeq ($(DEBUG), 1)
|
||
|
|
- DEBUGFLAGS = -g -ggdb -O0
|
||
|
|
+ DEBUGFLAGS =
|
||
|
|
endif
|
||
|
|
|
||
|
|
# Default CFLAGS
|
||
|
|
-CFLAGS = -Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-result -fPIC \
|
||
|
|
+CFLAGS += -fPIC -pthread \
|
||
|
|
-D_GNU_SOURCE -std=gnu99 -I"$(shell pwd)" -DREDIS_MODULE_TARGET \
|
||
|
|
-DREDISMODULE_EXPERIMENTAL_API
|
||
|
|
-CFLAGS += $(DEBUGFLAGS)
|
||
|
|
|
||
|
|
# Compile flags for linux / osx
|
||
|
|
ifeq ($(uname_S),Linux)
|
||
|
|
SHOBJ_LDFLAGS ?= -shared -Bsymbolic -Bsymbolic-functions -ldl -lpthread
|
||
|
|
else
|
||
|
|
+ifeq ($(uname_S),FreeBSD)
|
||
|
|
+ LD=$(CC)
|
||
|
|
+ SHOBJ_LDFLAGS ?= -shared -Bsymbolic -Bsymbolic-functions -pthread
|
||
|
|
+else
|
||
|
|
CFLAGS += -mmacosx-version-min=10.6
|
||
|
|
SHOBJ_LDFLAGS ?= -macosx_version_min 10.6 -exported_symbol _RedisModule_OnLoad -bundle -undefined dynamic_lookup -ldl -lpthread
|
||
|
|
endif
|
||
|
|
+endif
|
||
|
|
export CFLAGS
|
||
|
|
|
||
|
|
# Sources
|
||
|
|
Index: src/parser/token.h
|
||
|
|
--- src/parser/token.h.orig 2018-03-18 09:45:40.000000000 +0100
|
||
|
|
+++ src/parser/token.h 2018-03-18 09:58:40.125263000 +0100
|
||
|
|
@@ -1,5 +1,6 @@
|
||
|
|
#ifndef __TOKEN_H__
|
||
|
|
#define __TOKEN_H__
|
||
|
|
+#include <sys/types.h>
|
||
|
|
#include <stdlib.h>
|
||
|
|
|
||
|
|
typedef struct {
|
||
|
|
@@ -12,4 +13,4 @@
|
||
|
|
|
||
|
|
extern Token tok;
|
||
|
|
|
||
|
|
-#endif
|
||
|
|
\ No newline at end of file
|
||
|
|
+#endif
|
||
|
|
Index: src/util/triemap/triemap.h
|
||
|
|
--- src/util/triemap/triemap.h.orig 2018-03-18 09:45:40.000000000 +0100
|
||
|
|
+++ src/util/triemap/triemap.h 2018-03-18 09:58:40.125391000 +0100
|
||
|
|
@@ -1,6 +1,7 @@
|
||
|
|
#ifndef __TRIEMAP_H__
|
||
|
|
#define __TRIEMAP_H__
|
||
|
|
|
||
|
|
+#include <sys/types.h>
|
||
|
|
#include <stdint.h>
|
||
|
|
#include <stdio.h>
|
||
|
|
#include <stdlib.h>
|
||
|
|
@@ -142,4 +143,4 @@
|
||
|
|
int TrieMapIterator_Next(TrieMapIterator *it, char **ptr, tm_len_t *len,
|
||
|
|
void **value);
|
||
|
|
|
||
|
|
-#endif
|
||
|
|
\ No newline at end of file
|
||
|
|
+#endif
|
||
|
|
Index: src/value.h
|
||
|
|
--- src/value.h.orig 2018-03-18 09:45:40.000000000 +0100
|
||
|
|
+++ src/value.h 2018-03-18 09:58:40.125495000 +0100
|
||
|
|
@@ -1,5 +1,6 @@
|
||
|
|
#ifndef __SECONDARY_VALUE_H__
|
||
|
|
#define __SECONDARY_VALUE_H__
|
||
|
|
+#include <sys/types.h>
|
||
|
|
#include <stdlib.h>
|
||
|
|
#include <string.h>
|
||
|
|
#include "./rmutil/vector.h"
|