diff --git a/qse/tools/Makefile.in b/qse/tools/Makefile.in index da4cf580..6d2a1436 100644 --- a/qse/tools/Makefile.in +++ b/qse/tools/Makefile.in @@ -91,11 +91,11 @@ subdir = tools ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \ $(top_srcdir)/m4/ax_cxx_namespace.m4 \ - $(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltargz.m4 \ - $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/ax_numval.m4 \ + $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltargz.m4 $(top_srcdir)/m4/ltdl.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/lx_find_mpi.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -197,6 +197,10 @@ MKDIR_P = @MKDIR_P@ MPICC = @MPICC@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_CLDFLAGS = @MPI_CLDFLAGS@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_CONFIG = @MYSQL_CONFIG@ +MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ +MYSQL_VERSION = @MYSQL_VERSION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ diff --git a/qse/tools/gencp1.awk b/qse/tools/gencp1.awk index dbc8eb68..d480c57e 100644 --- a/qse/tools/gencp1.awk +++ b/qse/tools/gencp1.awk @@ -147,7 +147,8 @@ function emit_bsearch (name, min, max, arr) { printf ("\t\tint left = 0, right = QSE_COUNTOF(%s_range) - 1, mid; while (left <= right) { - mid = (left + right) / 2; + mid = left + (right - left) / 2; + if (c >= %s_range[mid].first && c <= %s_range[mid].last) return %s_range[mid].seg[c - %s_range[mid].first]; else if (c > %s_range[mid].last)