|
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> |
@@ -160,72 +160,72 @@ static zend_string* php_dba_make_key(HashTable *key) |
160 | 160 | /* {{{ globals */ |
161 | 161 |
|
162 | 162 | static dba_handler handler[] = { |
163 | | -#if DBA_GDBM |
| 163 | +#ifdef DBA_GDBM |
164 | 164 | DBA_HND(gdbm, DBA_LOCK_EXT) /* Locking done in library if set */ |
165 | 165 | #endif |
166 | | -#if DBA_DBM |
| 166 | +#ifdef DBA_DBM |
167 | 167 | DBA_HND(dbm, DBA_LOCK_ALL) /* No lock in lib */ |
168 | 168 | #endif |
169 | | -#if DBA_NDBM |
| 169 | +#ifdef DBA_NDBM |
170 | 170 | DBA_HND(ndbm, DBA_LOCK_ALL) /* Could be done in library: filemode = 0644 + S_ENFMT */ |
171 | 171 | #endif |
172 | | -#if DBA_CDB |
| 172 | +#ifdef DBA_CDB |
173 | 173 | DBA_HND(cdb, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */ |
174 | 174 | #endif |
175 | | -#if DBA_CDB_BUILTIN |
| 175 | +#ifdef DBA_CDB_BUILTIN |
176 | 176 | DBA_NAMED_HND(cdb_make, cdb, DBA_STREAM_OPEN|DBA_LOCK_ALL) /* No lock in lib */ |
177 | 177 | #endif |
178 | | -#if DBA_DB1 |
| 178 | +#ifdef DBA_DB1 |
179 | 179 | DBA_HND(db1, DBA_LOCK_ALL) /* No lock in lib */ |
180 | 180 | #endif |
181 | | -#if DBA_DB2 |
| 181 | +#ifdef DBA_DB2 |
182 | 182 | DBA_HND(db2, DBA_LOCK_ALL) /* No lock in lib */ |
183 | 183 | #endif |
184 | | -#if DBA_DB3 |
| 184 | +#ifdef DBA_DB3 |
185 | 185 | DBA_HND(db3, DBA_LOCK_ALL) /* No lock in lib */ |
186 | 186 | #endif |
187 | | -#if DBA_DB4 |
| 187 | +#ifdef DBA_DB4 |
188 | 188 | DBA_HND(db4, DBA_LOCK_ALL) /* No lock in lib */ |
189 | 189 | #endif |
190 | | -#if DBA_INIFILE |
| 190 | +#ifdef DBA_INIFILE |
191 | 191 | DBA_HND(inifile, DBA_STREAM_OPEN|DBA_LOCK_ALL|DBA_CAST_AS_FD) /* No lock in lib */ |
192 | 192 | #endif |
193 | | -#if DBA_FLATFILE |
| 193 | +#ifdef DBA_FLATFILE |
194 | 194 | DBA_HND(flatfile, DBA_STREAM_OPEN|DBA_LOCK_ALL|DBA_NO_APPEND) /* No lock in lib */ |
195 | 195 | #endif |
196 | | -#if DBA_QDBM |
| 196 | +#ifdef DBA_QDBM |
197 | 197 | DBA_HND(qdbm, DBA_LOCK_EXT) |
198 | 198 | #endif |
199 | | -#if DBA_TCADB |
| 199 | +#ifdef DBA_TCADB |
200 | 200 | DBA_HND(tcadb, DBA_LOCK_ALL) |
201 | 201 | #endif |
202 | | -#if DBA_LMDB |
| 202 | +#ifdef DBA_LMDB |
203 | 203 | DBA_HND(lmdb, DBA_LOCK_EXT) |
204 | 204 | #endif |
205 | 205 | { NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } |
206 | 206 | }; |
207 | 207 |
|
208 | | -#if DBA_FLATFILE |
| 208 | +#ifdef DBA_FLATFILE |
209 | 209 | #define DBA_DEFAULT "flatfile" |
210 | | -#elif DBA_DB4 |
| 210 | +#elif defined(DBA_DB4) |
211 | 211 | #define DBA_DEFAULT "db4" |
212 | | -#elif DBA_DB3 |
| 212 | +#elif defined(DBA_DB3) |
213 | 213 | #define DBA_DEFAULT "db3" |
214 | | -#elif DBA_DB2 |
| 214 | +#elif defined(DBA_DB2) |
215 | 215 | #define DBA_DEFAULT "db2" |
216 | | -#elif DBA_DB1 |
| 216 | +#elif defined(DBA_DB1) |
217 | 217 | #define DBA_DEFAULT "db1" |
218 | | -#elif DBA_GDBM |
| 218 | +#elif defined(DBA_GDBM) |
219 | 219 | #define DBA_DEFAULT "gdbm" |
220 | | -#elif DBA_NBBM |
| 220 | +#elif defined(DBA_NBBM) |
221 | 221 | #define DBA_DEFAULT "ndbm" |
222 | | -#elif DBA_DBM |
| 222 | +#elif defined(DBA_DBM) |
223 | 223 | #define DBA_DEFAULT "dbm" |
224 | | -#elif DBA_QDBM |
| 224 | +#elif defined(DBA_QDBM) |
225 | 225 | #define DBA_DEFAULT "qdbm" |
226 | | -#elif DBA_TCADB |
| 226 | +#elif defined(DBA_TCADB) |
227 | 227 | #define DBA_DEFAULT "tcadb" |
228 | | -#elif DBA_LMDB |
| 228 | +#elif defined(DBA_LMDB) |
229 | 229 | #define DBA_DEFAULT "lmdb" |
230 | 230 | #else |
231 | 231 | #define DBA_DEFAULT "" |
|
0 commit comments