|
|
Choosing A Webhost: |
CVS update of libmysequoia (debian/control debian/rules src/Utils.cpp): msg#00048db.carob.cvs
Date: Tuesday, February 14, 2006 @ 14:43:43 Author: csaba Path: /cvsroot/carob/libmysequoia Modified: debian/control (1.3 -> 1.4) debian/rules (1.5 -> 1.6) src/Utils.cpp (1.33 -> 1.34) Fixes to compile on Debian stable (gcc 3.3.5) ----------------+ debian/control | 2 +- debian/rules | 2 +- src/Utils.cpp | 26 ++++++++++++++++++++------ 3 files changed, 22 insertions(+), 8 deletions(-) Index: libmysequoia/debian/control diff -u libmysequoia/debian/control:1.3 libmysequoia/debian/control:1.4 --- libmysequoia/debian/control:1.3 Tue Feb 14 10:05:50 2006 +++ libmysequoia/debian/control Tue Feb 14 14:43:43 2006 @@ -1,7 +1,7 @@ Source: libmysequoia Priority: optional Maintainer: Csaba Simon <csaba.simon-NAAfj4rwCWC8rjiVs5Nzzw@xxxxxxxxxxxxxxxx> -Build-Depends: debhelper (>= 4.0.0), autotools-dev, liblog4cxx9-dev, doxygen +Build-Depends: debhelper (>= 4.0.0), autotools-dev, liblog4cxx-dev, doxygen Standards-Version: 3.6.2 Section: libs Index: libmysequoia/debian/rules diff -u libmysequoia/debian/rules:1.5 libmysequoia/debian/rules:1.6 --- libmysequoia/debian/rules:1.5 Mon Feb 13 11:46:32 2006 +++ libmysequoia/debian/rules Tue Feb 14 14:43:43 2006 @@ -37,7 +37,7 @@ config-stamp: dh_testdir # Add here commands to configure the package. - CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc/mysequoia --mandir=/usr/share/man --infodir=/usr/share/info + CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc/mysequoia --mandir=/usr/share/man --infodir=/usr/share/info --disable-cppunit --disable-gcov touch config-stamp build: build-stamp Index: libmysequoia/src/Utils.cpp diff -u libmysequoia/src/Utils.cpp:1.33 libmysequoia/src/Utils.cpp:1.34 --- libmysequoia/src/Utils.cpp:1.33 Tue Jan 31 16:31:52 2006 +++ libmysequoia/src/Utils.cpp Tue Feb 14 14:43:43 2006 @@ -345,9 +345,11 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: + { int len = snprintf((char *)bind->buffer, bind->buffer_length, "%hhd", is_unsigned ? *(unsigned char *)data : *(char *)data); error = (len < 0) || ((unsigned int)len >= bind->buffer_length); break; + } case MYSQL_TYPE_TIME: convertDateTime(&time, (MYSQL_TIME *)bind->buffer, MYSQL_TIMESTAMP_TIME, false); @@ -417,10 +419,12 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: + { int len = snprintf((char *)bind->buffer, bind->buffer_length, "%hd", is_unsigned ? *(unsigned short int *)data : *(short int *)data); error = (len < 0) || ((unsigned int)len >= bind->buffer_length); break; - + } + case MYSQL_TYPE_TIME: convertDateTime(&time, (MYSQL_TIME *)bind->buffer, MYSQL_TIMESTAMP_TIME, false); break; @@ -489,10 +493,12 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: + { int len = snprintf((char *)bind->buffer, bind->buffer_length, "%d", is_unsigned ? *(unsigned int *)data : *(int *)data); error = (len < 0) || ((unsigned int)len >= bind->buffer_length); break; - + } + case MYSQL_TYPE_TIME: convertDateTime(&time, (MYSQL_TIME *)bind->buffer, MYSQL_TIMESTAMP_TIME, false); break; @@ -564,10 +570,12 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: + { int len = snprintf((char *)bind->buffer, bind->buffer_length, "%lld", is_unsigned ? *(uint64_t *)data : *(int64_t *)data); error = (len < 0) || ((unsigned int)len >= bind->buffer_length); break; - + } + case MYSQL_TYPE_TIME: convertDateTime(data, (MYSQL_TIME *)bind->buffer, MYSQL_TIMESTAMP_TIME, false); error = true; @@ -639,11 +647,13 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: + { // TODO precision int len = snprintf((char *)bind->buffer, bind->buffer_length, "%.*f", (int)field->decimals, f); error = (len < 0) || ((unsigned int)len >= bind->buffer_length); break; - + } + case MYSQL_TYPE_TIME: convertDateTime(&datetime, (MYSQL_TIME *)bind->buffer, MYSQL_TIMESTAMP_TIME, false); error = true; @@ -716,10 +726,12 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: + { int len = snprintf((char *)bind->buffer, bind->buffer_length, "%.*f", (int)field->decimals, d); error = (len < 0) || ((unsigned int)len >= bind->buffer_length); break; - + } + case MYSQL_TYPE_TIME: convertDateTime(&datetime, (MYSQL_TIME *)bind->buffer, MYSQL_TIMESTAMP_TIME, false); error = true; @@ -819,6 +831,7 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: + { size_t length = min((size_t)max((int64_t)s_length - bind->offset, (int64_t)0), (size_t)bind->buffer_length); if (length) memcpy(bind->buffer, s->data()+bind->offset, length); @@ -827,7 +840,8 @@ *bind->length = s_length; error = s_length - bind->offset > bind->buffer_length; break; - + } + case MYSQL_TYPE_TIME: if (str_to_MYSQL_TIME(s->data(), (MYSQL_TIME *)bind->buffer)) {
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of carob (5 files), csaba-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of libmysequoia (README), csaba-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of carob (5 files), csaba-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of carob (19 files), gilles-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|