Skip to content

Commit 9e0171f

Browse files
committed
Fix [-Wundef] warning in PDO OCI extension
1 parent ed4d0ae commit 9e0171f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ext/pdo_oci/oci_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ static int oci_handle_preparer(pdo_dbh_t *dbh, const char *sql, size_t sql_len,
247247
size_t nsql_len = 0;
248248
int ret;
249249

250-
#if HAVE_OCISTMTFETCH2
250+
#ifdef HAVE_OCISTMTFETCH2
251251
S->exec_type = pdo_attr_lval(driver_options, PDO_ATTR_CURSOR,
252252
PDO_CURSOR_FWDONLY) == PDO_CURSOR_SCROLL ?
253253
OCI_STMT_SCROLLABLE_READONLY : OCI_DEFAULT;
@@ -727,7 +727,7 @@ static int pdo_oci_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* {{{ *
727727
H->prefetch = PDO_OCI_PREFETCH_DEFAULT;
728728

729729
/* allocate an environment */
730-
#if HAVE_OCIENVNLSCREATE
730+
#ifdef HAVE_OCIENVNLSCREATE
731731
if (vars[0].optval) {
732732
H->charset = OCINlsCharSetNameToId(pdo_oci_Env, (const oratext *)vars[0].optval);
733733
if (!H->charset) {

ext/pdo_oci/oci_statement.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,12 @@ static int oci_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *pa
458458

459459
static int oci_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zend_long offset) /* {{{ */
460460
{
461-
#if HAVE_OCISTMTFETCH2
461+
#ifdef HAVE_OCISTMTFETCH2
462462
ub4 ociori;
463463
#endif
464464
pdo_oci_stmt *S = (pdo_oci_stmt*)stmt->driver_data;
465465

466-
#if HAVE_OCISTMTFETCH2
466+
#ifdef HAVE_OCISTMTFETCH2
467467
switch (ori) {
468468
case PDO_FETCH_ORI_NEXT: ociori = OCI_FETCH_NEXT; break;
469469
case PDO_FETCH_ORI_PRIOR: ociori = OCI_FETCH_PRIOR; break;

ext/pdo_oci/pdo_oci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ PHP_RINIT_FUNCTION(pdo_oci)
116116
tsrm_mutex_lock(pdo_oci_env_mutex);
117117
if (!pdo_oci_Env) { // double-checked locking idiom
118118
#endif
119-
#if HAVE_OCIENVCREATE
119+
#ifdef HAVE_OCIENVCREATE
120120
OCIEnvCreate(&pdo_oci_Env, PDO_OCI_INIT_MODE, NULL, NULL, NULL, NULL, 0, NULL);
121121
#else
122122
OCIInitialize(PDO_OCI_INIT_MODE, NULL, NULL, NULL, NULL);

0 commit comments

Comments
 (0)