Skip to content

Commit 682ca5f

Browse files
committed
Fix compilation with Firebird < 3
1 parent 78f23a6 commit 682ca5f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/pdo_firebird/firebird_statement.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,11 @@ static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */
229229
#endif
230230
col->param_type = PDO_PARAM_INT;
231231
break;
232+
#ifdef SQL_BOOLEAN
232233
case SQL_BOOLEAN:
233234
col->param_type = PDO_PARAM_BOOL;
234235
break;
236+
#endif
235237
default:
236238
col->param_type = PDO_PARAM_STR;
237239
break;
@@ -419,11 +421,13 @@ static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, /* {{
419421
*ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
420422
*len = slprintf(*ptr, CHAR_BUF_LEN, "%F" , *(double*)var->sqldata);
421423
break;
424+
#ifdef SQL_BOOLEAN
422425
case SQL_BOOLEAN:
423426
*len = sizeof(zend_bool);
424427
*ptr = FETCH_BUF(S->fetch_buf[colno], zend_bool, 1, NULL);
425428
*(zend_bool*)*ptr = *(FB_BOOLEAN*)var->sqldata;
426429
break;
430+
#endif
427431
case SQL_TYPE_DATE:
428432
isc_decode_sql_date((ISC_DATE*)var->sqldata, &t);
429433
fmt = S->H->date_format ? S->H->date_format : PDO_FB_DEF_DATE_FMT;

0 commit comments

Comments
 (0)