tony2001 Tue Jun 27 08:26:54 2006 UTC Modified files: /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c Log: fix #37920 (compilation problems on z/OS) http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.296&r2=1.297&diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.296 php-src/sapi/cgi/cgi_main.c:1.297 --- php-src/sapi/cgi/cgi_main.c:1.296 Sun Jun 25 19:17:20 2006 +++ php-src/sapi/cgi/cgi_main.c Tue Jun 27 08:26:53 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.296 2006/06/25 19:17:20 bjori Exp $ */ +/* $Id: cgi_main.c,v 1.297 2006/06/27 08:26:53 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -1525,12 +1525,12 @@ /* #!php support */ c = fgetc(file_handle.handle.fp); if (c == '#') { - while (c != 10 && c != 13) { + while (c != '\n' && c != '\r') { c = fgetc(file_handle.handle.fp); /* skip to end of line */ } /* handle situations where line is terminated by \r\n */ - if (c == 13) { - if (fgetc(file_handle.handle.fp) != 10) { + 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); } http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.159&r2=1.160&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.159 php-src/sapi/cli/php_cli.c:1.160 --- php-src/sapi/cli/php_cli.c:1.159 Sun Jun 25 19:17:20 2006 +++ php-src/sapi/cli/php_cli.c Tue Jun 27 08:26:54 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c,v 1.159 2006/06/25 19:17:20 bjori Exp $ */ +/* $Id: php_cli.c,v 1.160 2006/06/27 08:26:54 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -537,12 +537,12 @@ /* #!php support */ c = fgetc(file_handle->handle.fp); if (c == '#') { - while (c != 10 && c != 13) { + while (c != '\n' && c != '\r') { c = fgetc(file_handle->handle.fp); /* skip to end of line */ } /* handle situations where line is terminated by \r\n */ - if (c == 13) { - if (fgetc(file_handle->handle.fp) != 10) { + 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); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php