From 13f3bcd59c2055d53e4759b0c3356b001eca44b0 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 30 Nov 2012 12:30:51 -0800 Subject: [PATCH] Rename libmdb to liblmdb, lmdb.h Avoid naming conflicts with other mdb* packages. Bump version to 0.9.5 --- libraries/libmdb/Makefile | 30 +++++++++++++++--------------- libraries/libmdb/{mdb.h => lmdb.h} | 18 +++++++++--------- libraries/libmdb/mdb.c | 2 +- libraries/libmdb/mdb_copy.c | 2 +- libraries/libmdb/mdb_stat.c | 2 +- libraries/libmdb/mfree.c | 2 +- libraries/libmdb/mtest.c | 2 +- libraries/libmdb/mtest2.c | 2 +- libraries/libmdb/mtest3.c | 2 +- libraries/libmdb/mtest4.c | 2 +- libraries/libmdb/mtest5.c | 2 +- libraries/libmdb/mtest6.c | 2 +- 12 files changed, 34 insertions(+), 34 deletions(-) rename libraries/libmdb/{mdb.h => lmdb.h} (99%) diff --git a/libraries/libmdb/Makefile b/libraries/libmdb/Makefile index 67a2007bb8..5c206f2238 100644 --- a/libraries/libmdb/Makefile +++ b/libraries/libmdb/Makefile @@ -6,7 +6,7 @@ LDLIBS = SOLIBS = PROGS = mdb_stat mdb_copy mtest mtest2 mtest3 mtest4 mtest5 -all: libmdb.a libmdb.so $(PROGS) +all: liblmdb.a liblmdb.so $(PROGS) clean: rm -rf $(PROGS) *.[ao] *.so *~ testdb @@ -15,23 +15,23 @@ test: all mkdir testdb ./mtest && ./mdb_stat testdb -libmdb.a: mdb.o midl.o +liblmdb.a: mdb.o midl.o ar rs $@ mdb.o midl.o -libmdb.so: mdb.o midl.o +liblmdb.so: mdb.o midl.o gcc -pthread -shared -o $@ mdb.o midl.o $(SOLIBS) -mdb_stat: mdb_stat.o libmdb.a -mdb_copy: mdb_copy.o libmdb.a -mtest: mtest.o libmdb.a -mtest2: mtest2.o libmdb.a -mtest3: mtest3.o libmdb.a -mtest4: mtest4.o libmdb.a -mtest5: mtest5.o libmdb.a -mtest6: mtest6.o libmdb.a -mfree: mfree.o libmdb.a - -mdb.o: mdb.c mdb.h midl.h +mdb_stat: mdb_stat.o liblmdb.a +mdb_copy: mdb_copy.o liblmdb.a +mtest: mtest.o liblmdb.a +mtest2: mtest2.o liblmdb.a +mtest3: mtest3.o liblmdb.a +mtest4: mtest4.o liblmdb.a +mtest5: mtest5.o liblmdb.a +mtest6: mtest6.o liblmdb.a +mfree: mfree.o liblmdb.a + +mdb.o: mdb.c lmdb.h midl.h $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c mdb.c midl.o: midl.c midl.h @@ -40,5 +40,5 @@ midl.o: midl.c midl.h %: %.o $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ -%.o: %.c mdb.h +%.o: %.c lmdb.h $(CC) $(CFLAGS) $(CPPFLAGS) -c $< diff --git a/libraries/libmdb/mdb.h b/libraries/libmdb/lmdb.h similarity index 99% rename from libraries/libmdb/mdb.h rename to libraries/libmdb/lmdb.h index 784c5ee0ad..a2118b5bac 100644 --- a/libraries/libmdb/mdb.h +++ b/libraries/libmdb/lmdb.h @@ -1,7 +1,7 @@ -/** @file mdb.h - * @brief memory-mapped database library +/** @file lmdb.h + * @brief Lightning memory-mapped database library * - * @mainpage MDB Memory-Mapped Database Manager + * @mainpage MDB Lightning Memory-Mapped Database Manager * * @section intro_sec Introduction * MDB is a Btree-based database management library modeled loosely on the @@ -127,8 +127,8 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _MDB_H_ -#define _MDB_H_ +#ifndef _LMDB_H_ +#define _LMDB_H_ #include @@ -138,7 +138,7 @@ extern "C" { /** @defgroup mdb MDB API * @{ - * @brief OpenLDAP Memory-Mapped Database Manager + * @brief OpenLDAP Lightning Memory-Mapped Database Manager */ /** @defgroup Version Version Macros * @{ @@ -148,7 +148,7 @@ extern "C" { /** Library minor version */ #define MDB_VERSION_MINOR 9 /** Library patch version */ -#define MDB_VERSION_PATCH 4 +#define MDB_VERSION_PATCH 5 /** Combine args a,b,c into a single integer for easy version comparisons */ #define MDB_VERINT(a,b,c) (((a) << 24) | ((b) << 16) | (c)) @@ -158,7 +158,7 @@ extern "C" { MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH) /** The release date of this library version */ -#define MDB_VERSION_DATE "September 14, 2012" +#define MDB_VERSION_DATE "November 30, 2012" /** A stringifier for the version info */ #define MDB_VERSTR(a,b,c,d) "MDB " #a "." #b "." #c ": (" d ")" @@ -1160,4 +1160,4 @@ int mdb_dcmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b); #ifdef __cplusplus } #endif -#endif /* _MDB_H_ */ +#endif /* _LMDB_H_ */ diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 117b40230a..61c948cc9b 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -117,7 +117,7 @@ #define MISALIGNED_OK 1 #endif -#include "mdb.h" +#include "lmdb.h" #include "midl.h" #if (BYTE_ORDER == LITTLE_ENDIAN) == (BYTE_ORDER == BIG_ENDIAN) diff --git a/libraries/libmdb/mdb_copy.c b/libraries/libmdb/mdb_copy.c index 3eae9ba7d1..bd0b859110 100644 --- a/libraries/libmdb/mdb_copy.c +++ b/libraries/libmdb/mdb_copy.c @@ -13,7 +13,7 @@ */ #include #include -#include "mdb.h" +#include "lmdb.h" int main(int argc,char * argv[]) { diff --git a/libraries/libmdb/mdb_stat.c b/libraries/libmdb/mdb_stat.c index 88ac801807..4dfcf49645 100644 --- a/libraries/libmdb/mdb_stat.c +++ b/libraries/libmdb/mdb_stat.c @@ -15,7 +15,7 @@ #include #include #include -#include "mdb.h" +#include "lmdb.h" static void prstat(MDB_stat *ms) { diff --git a/libraries/libmdb/mfree.c b/libraries/libmdb/mfree.c index b0e6980026..79cce66fa6 100644 --- a/libraries/libmdb/mfree.c +++ b/libraries/libmdb/mfree.c @@ -15,7 +15,7 @@ #include #include #include -#include "mdb.h" +#include "lmdb.h" #include "midl.h" int main(int argc,char * argv[]) diff --git a/libraries/libmdb/mtest.c b/libraries/libmdb/mtest.c index bb5ec816b6..8c8dd57835 100644 --- a/libraries/libmdb/mtest.c +++ b/libraries/libmdb/mtest.c @@ -15,7 +15,7 @@ #include #include #include -#include "mdb.h" +#include "lmdb.h" int main(int argc,char * argv[]) { diff --git a/libraries/libmdb/mtest2.c b/libraries/libmdb/mtest2.c index a0e9914417..44d1de7ccd 100644 --- a/libraries/libmdb/mtest2.c +++ b/libraries/libmdb/mtest2.c @@ -18,7 +18,7 @@ #include #include #include -#include "mdb.h" +#include "lmdb.h" int main(int argc,char * argv[]) { diff --git a/libraries/libmdb/mtest3.c b/libraries/libmdb/mtest3.c index eb9723ba2e..c189eaa952 100644 --- a/libraries/libmdb/mtest3.c +++ b/libraries/libmdb/mtest3.c @@ -18,7 +18,7 @@ #include #include #include -#include "mdb.h" +#include "lmdb.h" int main(int argc,char * argv[]) { diff --git a/libraries/libmdb/mtest4.c b/libraries/libmdb/mtest4.c index b2f5d931c6..e0ba7e20b6 100644 --- a/libraries/libmdb/mtest4.c +++ b/libraries/libmdb/mtest4.c @@ -18,7 +18,7 @@ #include #include #include -#include "mdb.h" +#include "lmdb.h" int main(int argc,char * argv[]) { diff --git a/libraries/libmdb/mtest5.c b/libraries/libmdb/mtest5.c index c63402ed6b..bc472fa093 100644 --- a/libraries/libmdb/mtest5.c +++ b/libraries/libmdb/mtest5.c @@ -18,7 +18,7 @@ #include #include #include -#include "mdb.h" +#include "lmdb.h" int main(int argc,char * argv[]) { diff --git a/libraries/libmdb/mtest6.c b/libraries/libmdb/mtest6.c index a5bf3a2119..0bf26ccc45 100644 --- a/libraries/libmdb/mtest6.c +++ b/libraries/libmdb/mtest6.c @@ -18,7 +18,7 @@ #include #include #include -#include "mdb.h" +#include "lmdb.h" char dkbuf[1024]; -- 2.39.5