freebsd-ports/databases/libdbi/files/patch-src__dbi_result.c
Gerald Pfeifer ece3fc944f Update to libdbi version 0.9.0. [1]
This supports multiple independent "instances", which permits programs
to use several dlopen()ed modules which are linked against libdbi. Support
for transactions and savepoints has been added, and drivers now receive
additional hints to optimize sequential reads from result sets.

Convert to staging (simplifying PORTDOCS handling).

PR:		178779 [1]
Submitted by:	Douglas Carmichael <dcarmich@dcarmichael.net> [1]
Approved by:	maintainer timeout (clsung, >9 months) [1]
2014-03-03 20:36:13 +00:00

25 lines
1 KiB
C

*** ./src/dbi_result.c.orig Mon May 20 00:19:40 2013
--- ./src/dbi_result.c Mon May 20 00:20:19 2013
***************
*** 1470,1479 ****
switch (RESULT->field_attribs[fieldidx] & DBI_INTEGER_SIZEMASK) {
case DBI_INTEGER_SIZE1:
if (RESULT->field_attribs[fieldidx] & DBI_INTEGER_UNSIGNED) {
! snprintf(newstring, 32, "%hu", RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_char);
}
else {
! snprintf(newstring, 32, "%hd", RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_char);
}
break;
case DBI_INTEGER_SIZE2:
--- 1470,1479 ----
switch (RESULT->field_attribs[fieldidx] & DBI_INTEGER_SIZEMASK) {
case DBI_INTEGER_SIZE1:
if (RESULT->field_attribs[fieldidx] & DBI_INTEGER_UNSIGNED) {
! snprintf(newstring, 32, "%hhu", RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_char);
}
else {
! snprintf(newstring, 32, "%hhd", RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_char);
}
break;
case DBI_INTEGER_SIZE2: