rt lib depenedency on MacOS
authorAnton Adamansky <adamansky@gmail.com>
Fri, 20 Mar 2015 09:38:22 +0000 (15:38 +0600)
committerAnton Adamansky <adamansky@gmail.com>
Fri, 20 Mar 2015 09:38:22 +0000 (15:38 +0600)
src/CMakeLists.txt
src/ejdb/ejdb.c
src/tcutil/tcutil.h

index 1ac32d7..a7eef76 100644 (file)
@@ -68,12 +68,11 @@ if (NOT WIN32)
        list(APPEND EJDB_LLIBRARIES ${CMAKE_THREAD_LIBS_INIT})
 endif()
 
-if (APPLE)
 find_library(RT_LIB rt)
-    if (NOT RT_LIB)
-        message(FATAL_ERROR "Library 'librt' not FOUND")
-    endif()
+if (RT_LIB)
     list(APPEND EJDB_LLIBRARIES "${RT_LIB}")
+else()
+    message(WARNING "Library 'librt' not FOUND")
 endif()
 
 find_library(M_LIB m)
index 0a9a814..aecf605 100644 (file)
@@ -163,7 +163,7 @@ extern const char *utf8proc_errmsg(ssize_t errcode);
 static const bool yes = true;
 
 const char *ejdbversion() {
-    return _TC_VERSION;
+    return tcversion;
 }
 
 const char* ejdberrmsg(int ecode) {
@@ -286,8 +286,7 @@ bool ejdbisopen(EJDB *jb) {
 }
 
 bool ejdbopen(EJDB *jb, const char *path, int mode) {
-    assert(jb && path);
-    assert(jb->metadb);
+    assert(jb && path && jb->metadb);
     if (!JBLOCKMETHOD(jb, true)) return false;
     if (JBISOPEN(jb)) {
         _ejdbsetecode(jb, TCEINVALID, __FILE__, __LINE__, __func__);
index b1bb329..3709262 100644 (file)
@@ -3720,7 +3720,6 @@ typedef unsigned char TCBITMAP; /* type of a bit map object */
 
 #include <stdio.h>
 
-#define _TC_VERSION    "1.1.26"
 #define _TC_LIBVER     911
 #define _TC_FORMATVER  "1.0"