]> granicus.if.org Git - php/commitdiff
fix ftell/fseek calls
authorAnatol Belski <ab@php.net>
Sun, 14 Sep 2014 20:28:42 +0000 (22:28 +0200)
committerAnatol Belski <ab@php.net>
Sun, 14 Sep 2014 20:28:42 +0000 (22:28 +0200)
sapi/cgi/cgi_main.c

index d73c4a3e71450c89be9cb8187e5b68510c3046c5..5c81c14cc12234d90d16c3c4cf522d1e7fac0014 100644 (file)
@@ -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;