From: Anatol Belski Date: Sun, 14 Sep 2014 20:28:42 +0000 (+0200) Subject: fix ftell/fseek calls X-Git-Tag: PRE_NATIVE_TLS_MERGE~158^2~85^2~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b75a05881040e252e524898b0931542c40d68b8e;p=php fix ftell/fseek calls --- diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index d73c4a3e71..5c81c14cc1 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -2405,8 +2405,8 @@ consult the installation file that came with this distribution, or visit \n\ /* 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); } } CG(start_lineno) = 2;