summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-14 23:03:13 +0200
committerAnatol Belski <ab@php.net>2014-09-14 23:03:13 +0200
commit534ee969649fc0a4d9c9a9467a616a6fab7acdbe (patch)
tree1c4cc9f44a83b6d9c84ec3a6dc9062d3daff1a1f /sapi/cli/php_cli.c
parent5cf17fc8bf9e42b181ba19c3761a38b2db2e44e9 (diff)
downloadphp-git-534ee969649fc0a4d9c9a9467a616a6fab7acdbe.tar.gz
fix ftell/fseek calls
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r--sapi/cli/php_cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 2e714c4a90..f3eec80283 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -627,8 +627,8 @@ static int cli_seek_file_begin(zend_file_handle *file_handle, char *script_file,
/* handle situations where line is terminated by \r\n */
if (c == '\r') {
if (fgetc(file_handle->handle.fp) != '\n') {
- long pos = ftell(file_handle->handle.fp);
- fseek(file_handle->handle.fp, pos - 1, SEEK_SET);
+ zend_long pos = zend_ftell(file_handle->handle.fp);
+ zend_fseek(file_handle->handle.fp, pos - 1, SEEK_SET);
}
}
*lineno = 2;