From: Anatol Belski Date: Sun, 14 Sep 2014 21:03:13 +0000 (+0200) Subject: fix ftell/fseek calls X-Git-Tag: PRE_NATIVE_TLS_MERGE~158^2~85^2~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=534ee969649fc0a4d9c9a9467a616a6fab7acdbe;p=php fix ftell/fseek calls --- 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;