diff options
author | Marcus Boerger <helly@php.net> | 2006-05-11 20:10:29 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2006-05-11 20:10:29 +0000 |
commit | b12bd4321fa20c2be00b0a2ffd121fc04985f76e (patch) | |
tree | afe158f1605da67f8a48b94383201e598054438f | |
parent | f1a98a1d523eb325a1f8920173b5f30da0699d8b (diff) | |
download | php-git-b12bd4321fa20c2be00b0a2ffd121fc04985f76e.tar.gz |
- Fix build
-rw-r--r-- | ext/dba/libflatfile/flatfile.c | 20 | ||||
-rw-r--r-- | ext/dba/libinifile/inifile.c | 2 |
2 files changed, 12 insertions, 10 deletions
diff --git a/ext/dba/libflatfile/flatfile.c b/ext/dba/libflatfile/flatfile.c index b16338c76c..45aa15a07c 100644 --- a/ext/dba/libflatfile/flatfile.c +++ b/ext/dba/libflatfile/flatfile.c @@ -37,6 +37,8 @@ #include "flatfile.h" +#define _php_stream_gets(stream, buf, len) php_stream_gets(stream, (zstr)((char*)buf), len) + #define FLATFILE_BLOCK_SIZE 1024 /* @@ -88,7 +90,7 @@ datum flatfile_fetch(flatfile *dba, datum key_datum TSRMLS_DC) { char buf[16]; if (flatfile_findkey(dba, key_datum TSRMLS_CC)) { - if (php_stream_gets(dba->fp, buf, sizeof(buf))) { + if (_php_stream_gets(dba->fp, buf, sizeof(buf))) { value_datum.dsize = atoi(buf); value_datum.dptr = safe_emalloc(value_datum.dsize, 1, 1); value_datum.dsize = php_stream_read(dba->fp, value_datum.dptr, value_datum.dsize); @@ -114,7 +116,7 @@ int flatfile_delete(flatfile *dba, datum key_datum TSRMLS_DC) { php_stream_rewind(dba->fp); while(!php_stream_eof(dba->fp)) { /* read in the length of the key name */ - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -140,7 +142,7 @@ int flatfile_delete(flatfile *dba, datum key_datum TSRMLS_DC) { } /* read in the length of the value */ - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -171,7 +173,7 @@ int flatfile_findkey(flatfile *dba, datum key_datum TSRMLS_DC) { php_stream_rewind(dba->fp); while (!php_stream_eof(dba->fp)) { - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -189,7 +191,7 @@ int flatfile_findkey(flatfile *dba, datum key_datum TSRMLS_DC) { break; } } - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -217,7 +219,7 @@ datum flatfile_firstkey(flatfile *dba TSRMLS_DC) { php_stream_rewind(dba->fp); while(!php_stream_eof(dba->fp)) { - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -235,7 +237,7 @@ datum flatfile_firstkey(flatfile *dba TSRMLS_DC) { res.dsize = num; return res; } - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -265,7 +267,7 @@ datum flatfile_nextkey(flatfile *dba TSRMLS_DC) { php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET); while(!php_stream_eof(dba->fp)) { - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -277,7 +279,7 @@ datum flatfile_nextkey(flatfile *dba TSRMLS_DC) { if (num < 0) { break; } - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); diff --git a/ext/dba/libinifile/inifile.c b/ext/dba/libinifile/inifile.c index 24f2673e73..e74eef7f47 100644 --- a/ext/dba/libinifile/inifile.c +++ b/ext/dba/libinifile/inifile.c @@ -169,7 +169,7 @@ static int inifile_read(inifile *dba, line_type *ln TSRMLS_DC) { char *pos; inifile_val_free(&ln->val); - while ((fline = php_stream_gets(dba->fp, NULL, 0)) != NULL) { + while ((fline = php_stream_gets(dba->fp, NULL_ZSTR, 0)) != NULL) { if (fline) { if (fline[0] == '[') { /* A value name cannot start with '[' |