|
21 | 21 |
|
22 | 22 | #include "php.h"
|
23 | 23 |
|
24 |
| -#if HAVE_DBA |
| 24 | +#ifdef HAVE_DBA |
25 | 25 |
|
26 | 26 | #include "php_ini.h"
|
27 | 27 | #include <stdio.h>
|
@@ -223,72 +223,72 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free)
|
223 | 223 | /* {{{ globals */
|
224 | 224 |
|
225 | 225 | static dba_handler handler[] = {
|
226 |
| -#if DBA_GDBM |
| 226 | +#ifdef DBA_GDBM |
227 | 227 | DBA_HND(gdbm, DBA_LOCK_EXT) /* Locking done in library if set */
|
228 | 228 | #endif
|
229 |
| -#if DBA_DBM |
| 229 | +#ifdef DBA_DBM |
230 | 230 | DBA_HND(dbm, DBA_LOCK_ALL) /* No lock in lib */
|
231 | 231 | #endif
|
232 |
| -#if DBA_NDBM |
| 232 | +#ifdef DBA_NDBM |
233 | 233 | DBA_HND(ndbm, DBA_LOCK_ALL) /* Could be done in library: filemode = 0644 + S_ENFMT */
|
234 | 234 | #endif
|
235 |
| -#if DBA_CDB |
| 235 | +#ifdef DBA_CDB |
236 | 236 | DBA_HND(cdb, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */
|
237 | 237 | #endif
|
238 |
| -#if DBA_CDB_BUILTIN |
| 238 | +#ifdef DBA_CDB_BUILTIN |
239 | 239 | DBA_NAMED_HND(cdb_make, cdb, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */
|
240 | 240 | #endif
|
241 |
| -#if DBA_DB1 |
| 241 | +#ifdef DBA_DB1 |
242 | 242 | DBA_HND(db1, DBA_LOCK_ALL) /* No lock in lib */
|
243 | 243 | #endif
|
244 |
| -#if DBA_DB2 |
| 244 | +#ifdef DBA_DB2 |
245 | 245 | DBA_HND(db2, DBA_LOCK_ALL) /* No lock in lib */
|
246 | 246 | #endif
|
247 |
| -#if DBA_DB3 |
| 247 | +#ifdef DBA_DB3 |
248 | 248 | DBA_HND(db3, DBA_LOCK_ALL) /* No lock in lib */
|
249 | 249 | #endif
|
250 |
| -#if DBA_DB4 |
| 250 | +#ifdef DBA_DB4 |
251 | 251 | DBA_HND(db4, DBA_LOCK_ALL) /* No lock in lib */
|
252 | 252 | #endif
|
253 |
| -#if DBA_INIFILE |
| 253 | +#ifdef DBA_INIFILE |
254 | 254 | DBA_HND(inifile, DBA_STREAM_OPEN|DBA_LOCK_ALL|DBA_CAST_AS_FD) /* No lock in lib */
|
255 | 255 | #endif
|
256 |
| -#if DBA_FLATFILE |
| 256 | +#ifdef DBA_FLATFILE |
257 | 257 | DBA_HND(flatfile, DBA_STREAM_OPEN|DBA_LOCK_ALL|DBA_NO_APPEND) /* No lock in lib */
|
258 | 258 | #endif
|
259 |
| -#if DBA_QDBM |
| 259 | +#ifdef DBA_QDBM |
260 | 260 | DBA_HND(qdbm, DBA_LOCK_EXT)
|
261 | 261 | #endif
|
262 |
| -#if DBA_TCADB |
| 262 | +#ifdef DBA_TCADB |
263 | 263 | DBA_HND(tcadb, DBA_LOCK_ALL)
|
264 | 264 | #endif
|
265 |
| -#if DBA_LMDB |
| 265 | +#ifdef DBA_LMDB |
266 | 266 | DBA_HND(lmdb, DBA_LOCK_EXT)
|
267 | 267 | #endif
|
268 | 268 | { NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
|
269 | 269 | };
|
270 | 270 |
|
271 |
| -#if DBA_FLATFILE |
| 271 | +#ifdef DBA_FLATFILE |
272 | 272 | #define DBA_DEFAULT "flatfile"
|
273 |
| -#elif DBA_DB4 |
| 273 | +#elif defined(DBA_DB4) |
274 | 274 | #define DBA_DEFAULT "db4"
|
275 |
| -#elif DBA_DB3 |
| 275 | +#elif defined(DBA_DB3) |
276 | 276 | #define DBA_DEFAULT "db3"
|
277 |
| -#elif DBA_DB2 |
| 277 | +#elif defined(DBA_DB2) |
278 | 278 | #define DBA_DEFAULT "db2"
|
279 |
| -#elif DBA_DB1 |
| 279 | +#elif defined(DBA_DB1) |
280 | 280 | #define DBA_DEFAULT "db1"
|
281 |
| -#elif DBA_GDBM |
| 281 | +#elif defined(DBA_GDBM) |
282 | 282 | #define DBA_DEFAULT "gdbm"
|
283 |
| -#elif DBA_NBBM |
| 283 | +#elif defined(DBA_NBBM) |
284 | 284 | #define DBA_DEFAULT "ndbm"
|
285 |
| -#elif DBA_DBM |
| 285 | +#elif defined(DBA_DBM) |
286 | 286 | #define DBA_DEFAULT "dbm"
|
287 |
| -#elif DBA_QDBM |
| 287 | +#elif defined(DBA_QDBM) |
288 | 288 | #define DBA_DEFAULT "qdbm"
|
289 |
| -#elif DBA_TCADB |
| 289 | +#elif defined(DBA_TCADB) |
290 | 290 | #define DBA_DEFAULT "tcadb"
|
291 |
| -#elif DBA_LMDB |
| 291 | +#elif defined(DBA_LMDB) |
292 | 292 | #define DBA_DEFAULT "lmdb"
|
293 | 293 | #else
|
294 | 294 | #define DBA_DEFAULT ""
|
|
0 commit comments