com php-src: fix ftell/fseek calls: sapi/cli/php_cli.c

From: Date: Sun, 14 Sep 2014 21:03:13 +0000
Subject: com php-src: fix ftell/fseek calls: sapi/cli/php_cli.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81607@lists.php.net to get a copy of this message
Commit: 534ee969649fc0a4d9c9a9467a616a6fab7acdbe Author: Anatol Belski <ab@php.net> Sun, 14 Sep 2014 23:03:13 +0200 Parents: 5cf17fc8bf9e42b181ba19c3761a38b2db2e44e9 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=534ee969649fc0a4d9c9a9467a616a6fab7acdbe Log: fix ftell/fseek calls Changed paths: M sapi/cli/php_cli.c Diff: diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 2e714c4..f3eec80 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;

« previous php.cvs (#81607) next »