summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--test.c7
2 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 805c2c5..2fbfe1b 100644
--- a/Makefile
+++ b/Makefile
@@ -151,14 +151,14 @@ $(PKGCONFNAME): hiredis.h
@echo "Generating $@ for pkgconfig..."
@echo prefix=$(PREFIX) > $@
@echo exec_prefix=$${prefix} >> $@
- @echo libdir=$(INSTALL_LIBRARY_PATH) >> $@
- @echo includedir=$(INSTALL_INCLUDE_PATH) >> $@
+ @echo libdir=$(PREFIX)/$(INCLUDE_PATH) >> $@
+ @echo includedir=$(PREFIX)/$(LIBRARY_PATH) >> $@
@echo >> $@
@echo Name: hiredis >> $@
@echo Description: Minimalistic C client library for Redis. >> $@
@echo Version: $(HIREDIS_MAJOR).$(HIREDIS_MINOR).$(HIREDIS_PATCH) >> $@
- @echo Libs: -L$${libdir} -lhiredis >> $@
- @echo Cflags: -I$${includedir} -D_FILE_OFFSET_BITS=64 >> $@
+ @echo Libs: -L\$${libdir} -lhiredis >> $@
+ @echo Cflags: -I\$${includedir} -D_FILE_OFFSET_BITS=64 >> $@
install: $(DYLIBNAME) $(STLIBNAME)
mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
diff --git a/test.c b/test.c
index f1566fb..1b95215 100644
--- a/test.c
+++ b/test.c
@@ -43,6 +43,13 @@ static long long usec(void) {
return (((long long)tv.tv_sec)*1000000)+tv.tv_usec;
}
+/* The assert() calls below have side effects, so we need assert()
+ * even if we are compiling without asserts (-DNDEBUG). */
+#ifdef NDEBUG
+#undef assert
+#define assert(e) (void)(e)
+#endif
+
static redisContext *select_database(redisContext *c) {
redisReply *reply;