Index: sapi/cgi/cgi_main.c =================================================================== RCS file: /repository/php-src/sapi/cgi/cgi_main.c,v retrieving revision 1.267.2.15.2.8 diff -u -p -d -r1.267.2.15.2.8 cgi_main.c --- sapi/cgi/cgi_main.c 19 Jun 2006 17:49:26 -0000 1.267.2.15.2.8 +++ sapi/cgi/cgi_main.c 27 Jun 2006 08:17:15 -0000 @@ -1588,12 +1588,12 @@ consult the installation file that came /* #!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); } Index: sapi/cli/php_cli.c =================================================================== RCS file: /repository/php-src/sapi/cli/php_cli.c,v retrieving revision 1.129.2.13.2.5 diff -u -p -d -r1.129.2.13.2.5 php_cli.c --- sapi/cli/php_cli.c 20 Jun 2006 12:55:26 -0000 1.129.2.13.2.5 +++ sapi/cli/php_cli.c 27 Jun 2006 08:17:15 -0000 @@ -545,12 +545,12 @@ static int cli_seek_file_begin(zend_file /* #!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); }