From 6d7b63c85d2150ebf95987636a85884ae4523318 Mon Sep 17 00:00:00 2001 From: adam Date: Fri, 26 Apr 2013 17:51:27 +0700 Subject: [PATCH] minors --- tcejdb/configure | 6 ++---- tcejdb/configure.ac | 6 ++---- tcejdb/debian/hints | 2 ++ tcejdb/tchdb.c | 2 +- tcejdb/tchdb.h | 6 +++--- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/tcejdb/configure b/tcejdb/configure index 4c6736b..65f22a1 100755 --- a/tcejdb/configure +++ b/tcejdb/configure @@ -3002,12 +3002,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu case $host_os in mingw*) - #durty hack fixes weird behaviour of gcc -O[123] optimizations with ejdb test cases on win32 - #CCOPT=`$CC -O2 -Q --help=optimizers | grep enabled | sed 's/\[[enabled\]]//' | tr '\n' ' ' | sed 's/[[[:blank:]]]\+/ /g'` - CCOPT="-O2 -mfpmath=sse -flto" + CCOPT="-O2" ;; *) - CCOPT="-O2 -mfpmath=sse -flto" + CCOPT="-O2" ;; esac diff --git a/tcejdb/configure.ac b/tcejdb/configure.ac index 0ae1de1..431c0d4 100644 --- a/tcejdb/configure.ac +++ b/tcejdb/configure.ac @@ -41,12 +41,10 @@ AC_PROG_CC case $host_os in mingw*) - #durty hack fixes weird behaviour of gcc -O[123] optimizations with ejdb test cases on win32 - #CCOPT=`$CC -O2 -Q --help=optimizers | grep enabled | sed 's/\[[enabled\]]//' | tr '\n' ' ' | sed 's/[[[:blank:]]]\+/ /g'` - CCOPT="-O2 -mfpmath=sse -flto" + CCOPT="-O2" ;; *) - CCOPT="-O2 -mfpmath=sse -flto" + CCOPT="-O2" ;; esac diff --git a/tcejdb/debian/hints b/tcejdb/debian/hints index a2266b3..e005be1 100644 --- a/tcejdb/debian/hints +++ b/tcejdb/debian/hints @@ -1,2 +1,4 @@ http://blogs.operationaldynamics.com/pmiller/sw/new-lintian1-changes-distribution-check debuild --changes-option=-DDistribution=`awk -F= '/CODENAME/{print $2}' /etc/lsb-release` -us -uc + +dpkg-gensymbols -v1.1.1 -elibtcejdb.so.9.11.0 -plibtcejdb9 -Odebian/libtcejdb9.symbols diff --git a/tcejdb/tchdb.c b/tcejdb/tchdb.c index 813c1aa..515acd5 100644 --- a/tcejdb/tchdb.c +++ b/tcejdb/tchdb.c @@ -2926,10 +2926,10 @@ static bool tchdbwriterec(TCHDB *hdb, TCHREC *rec, uint64_t bidx, off_t entoff) return false; } if (finc != 0) { + if (!HDBLOCKSMEM(hdb, false)) return false; hdb->fsiz += finc; uint64_t llnum = hdb->fsiz; llnum = TCHTOILL(llnum); - if (!HDBLOCKSMEM(hdb, false)) return false; memcpy((void *) (hdb->map + HDBFSIZOFF), &llnum, sizeof (llnum)); HDBUNLOCKSMEM(hdb); } diff --git a/tcejdb/tchdb.h b/tcejdb/tchdb.h index 492b7ad..e085831 100644 --- a/tcejdb/tchdb.h +++ b/tcejdb/tchdb.h @@ -38,8 +38,8 @@ __TCHDB_CLINKAGEBEGIN typedef struct { /* type of structure for a hash database */ + volatile bool tran; /* whether in the transaction */ bool ba64; /* using of 64-bit bucket array */ - bool tran; /* whether in the transaction */ bool zmode; /* whether compression is used */ bool async; /* whether asynchronous storing is called */ bool fatal; /* whether a fatal error occured */ @@ -67,13 +67,13 @@ typedef struct { /* type of structure for a hash database */ void *decop; /* opaque object for the decoding functions */ volatile int ecode; /* last happened error code */ int32_t fbpmax; /* maximum number of the free block pool */ - int32_t fbpnum; /* number of the free block pool */ int32_t fbpmis; /* number of missing retrieval of the free block pool */ uint32_t align; /* record alignment */ uint32_t runit; /* record reading unit */ uint32_t rcnum; /* maximum number of cached records */ uint32_t dfunit; /* unit step number of auto defragmentation */ - uint32_t dfcnt; /* counter of auto defragmentation */ + int32_t fbpnum; /* number of the free block pool */ + volatile uint32_t dfcnt; /* counter of auto defragmentation */ uint32_t omode; /* open mode */ HANDLE fd; /* file descriptor of the database file */ HANDLE walfd; /* file descriptor of write ahead logging */ -- 2.7.4