Commit e45fdcf7 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel
Browse files

close[t:4575] Merge fix for #4575 onto main. {{{svn merge -r40351:40366...

close[t:4575] Merge fix for #4575 onto main.  {{{svn merge -r40351:40366 ../tokudb.4575}}}. Closes #4575.

git-svn-id: file:///svn/toku/tokudb@40370 c7de825b-a66e-492c-adef-691d508d4ae1
parent 72cc3815
Loading
Loading
Loading
Loading
+5 −89
Original line number Diff line number Diff line
# How to build db.h_4_4
# 1. cd ../../berkeleydb/db-4.4.20; ../dist/configure; make; make install
# 2. on both 32 and 64 bit architectures
#	make sample_offsets_4_4
# 3. gather the sample_offsets_32/64_4_4.h files into a single directory
# 4. make db.h_4_4
#
# How to build all of the db.h files
# 1. install all of the bdb's
# 2. make samples
# 3. gather the generated sample_offsets header files
# 4. make hs

BDB = 4_6
BDBDIR = ../../../berkeleydb
MYSQL_H = -I$(BDBDIR)/db-4.1.25/build_unix/
@@ -23,83 +10,12 @@ endif
CFLAGS = $(GCC_VERSION_SPECIFIC_WARNINGS) -Wall -W -Werror -g $(OPTFLAGS)
CPPFLAGS = -I. -I../toku_include

runs: runs_mysql runs_installed
samples: sample_offsets_4_6 sample_offsets_4_5 sample_offsets_4_4 sample_offsets_4_3 sample_offsets_4_1
hs: db.h_4_6 db.h_4_5 db.h_4_4 db.h_4_3 db.h_4_1 tdb.h
# the mysql versions use the header in the mysql distribution.
runs_mysql: ./sample_offsets_mysql
	./sample_offsets_mysql
runs_installed: sample_offsets
	./sample_offsets
sample_offsets_mysql: CPPFLAGS+=$(MYSQL_H)
sample_offsets_mysql: sample_offsets.c
	$(CC) $(CFLAGS) -I../toku_include $(CPPFLAGS) $< -o $@

make_db_h_4_1.o: make_db_h.c sample_offsets_32_4_1.h sample_offsets_64_4_1.h
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.1.25/build_unix $< -c -o $@ -DUSE_MAJOR=4 -DUSE_MINOR=1 -DTDB_NATIVE=0
db.h_4_1: make_db_h_4_1
	./make_db_h_4_1 > $@
sample_offsets_4_1: sample_offsets.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.1.25/build_unix $< -o $@
	./sample_offsets_4_1

make_db_h_4_3.o: make_db_h.c sample_offsets_32_4_3.h sample_offsets_64_4_3.h
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.3.29/build_unix $< -c -o $@ -DUSE_MAJOR=4 -DUSE_MINOR=3 -DTDB_NATIVE=0
db.h_4_3: make_db_h_4_3
	./make_db_h_4_3 > $@
sample_offsets_4_3: sample_offsets.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.3.29/build_unix $< -o $@
	./sample_offsets_4_3

make_db_h_4_4.o: make_db_h.c sample_offsets_32_4_4.h sample_offsets_64_4_4.h
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.4.20/build_unix $< -c -o $@ -DUSE_MAJOR=4 -DUSE_MINOR=4 -DTDB_NATIVE=0
db.h_4_4: make_db_h_4_4
	./make_db_h_4_4 > $@
sample_offsets_4_4: sample_offsets.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.4.20/build_unix $< -o $@
	./sample_offsets_4_4

make_db_h_4_5.o: make_db_h.c sample_offsets_32_4_5.h sample_offsets_64_4_5.h
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.5.20/build_unix $< -c -o $@ -DUSE_MAJOR=4 -DUSE_MINOR=5 -DTDB_NATIVE=0
db.h_4_5: make_db_h_4_5
	./make_db_h_4_5 > $@
sample_offsets_4_5: sample_offsets.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.5.20/build_unix $< -o $@
	./sample_offsets_4_5
default: ../include/db.h

make_db_h_4_6.o: make_db_h.c sample_offsets_32_4_6.h sample_offsets_64_4_6.h
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.6.19/build_unix $< -c -o $@ -DUSE_MAJOR=4 -DUSE_MINOR=6 -DTDB_NATIVE=0
db.h_4_6: make_db_h_4_6
	./make_db_h_4_6 > $@
sample_offsets_4_6: sample_offsets.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.6.19/build_unix $< -o $@
	./sample_offsets_4_6
../include/db.h: make_tdb
	./make_tdb > $@

make_tdb_h.o: make_db_h.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -I$(BDBDIR)/db-4.6.19/build_unix $< -c -o $@ -DUSE_MAJOR=4 -DUSE_MINOR=6 -DTDB_NATIVE=1
tdb.h: make_tdb_h
	./make_tdb_h > $@

sample_offsets: CPPFLAGS+=-I../toku_include
sample_offsets_local: ./db.h
sample_offsets_local: sample_offsets.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -DLOCAL $< -o $@

hfiles: db.h_4_1 db.h_4_3 db.h_4_4 db.h_4_5 db.h_4_6 tdb.h

check32: sample_offsets_local
	./sample_offsets_local
	diff sample_offsets_local.h sample_offsets_32.h
hfiles: tdb.h

clean:
	rm -f sample_offsets_mysql sample_offsets sample_offsets_?_? *.o make_db_h_?_?
install: tdb.h
	cp tdb.h ../include/db.h
install_bdb_compatible: db.h_$(BDB)
	cp db.h_$(BDB) ../include/db.h

# Note: To make the compile work, you must cd to the ../../berkeleydb/db-4.1.25/build_unix
# and do ../dist/configure

# to build mysql-5.0.27 with berkeley db 4.1.25
# ./configure --with-berkeley-db=../../berkeleydb/db-4.1.25/build_unix
	rm -f *.o make_tdb
+2668 −0

File added.

Preview size limit exceeded, changes collapsed.

buildheader/db.h_4_1

deleted100644 → 0
+0 −465

File deleted.

Preview size limit exceeded, changes collapsed.

buildheader/db.h_4_3

deleted100644 → 0
+0 −479

File deleted.

Preview size limit exceeded, changes collapsed.

buildheader/db.h_4_4

deleted100644 → 0
+0 −11
Original line number Diff line number Diff line
#ifndef _DB_H
#define _DB_H
/* This code generated by make_db_h.   Copyright (c) 2007-2011 Tokutek */
#ident "Copyright (c) 2007-2011 Tokutek Inc.  All rights reserved."
#include <sys/types.h>
/*stdio is needed for the FILE* in db->verify*/
#include <stdio.h>
#include <stdint.h>
#if defined(__cplusplus)
extern "C" {
#endif
Loading