Ticket #19425: endian.patch

File endian.patch, 1.4 KB (added by mtalexander (Mike Alexander), 15 years ago)

Corrected patch to fix endian problem in libdbi

  • dbi_result.c

    old src  
    891891
    892892  switch (RESULT->field_attribs[fieldidx] & DBI_INTEGER_SIZEMASK) {
    893893  case DBI_INTEGER_SIZE1:
     894    return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_char;
    894895  case DBI_INTEGER_SIZE2:
    895896    return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_short;
    896897  case DBI_INTEGER_SIZE3:
     
    947948
    948949  switch (RESULT->field_attribs[fieldidx] & DBI_INTEGER_SIZEMASK) {
    949950  case DBI_INTEGER_SIZE1:
     951    return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_char;
    950952  case DBI_INTEGER_SIZE2:
     953    return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_short;
    951954  case DBI_INTEGER_SIZE3:
    952955  case DBI_INTEGER_SIZE4:
    953956    return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_long;
     
    995998
    996999  switch (RESULT->field_attribs[fieldidx] & DBI_INTEGER_SIZEMASK) {
    9971000  case DBI_INTEGER_SIZE1:
     1001    return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_char;
    9981002  case DBI_INTEGER_SIZE2:
     1003    return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_short;
    9991004  case DBI_INTEGER_SIZE3:
    10001005  case DBI_INTEGER_SIZE4:
     1006    return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_long;
    10011007  case DBI_INTEGER_SIZE8:
    10021008    return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_longlong;
    10031009  default: