tony2001                Tue Jun 27 08:27:10 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/sapi/cgi   cgi_main.c 
    /php-src/sapi/cli   php_cli.c 
  Log:
  MFH: fix #37920 (compilation problems on z/OS)
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.8&r2=1.267.2.15.2.9&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.8 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.9
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.8  Mon Jun 19 17:49:26 2006
+++ php-src/sapi/cgi/cgi_main.c Tue Jun 27 08:27:10 2006
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.8 2006/06/19 17:49:26 tony2001 Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.9 2006/06/27 08:27:10 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1588,12 +1588,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.129.2.13.2.5&r2=1.129.2.13.2.6&diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.5 
php-src/sapi/cli/php_cli.c:1.129.2.13.2.6
--- php-src/sapi/cli/php_cli.c:1.129.2.13.2.5   Tue Jun 20 12:55:26 2006
+++ php-src/sapi/cli/php_cli.c  Tue Jun 27 08:27:10 2006
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_cli.c,v 1.129.2.13.2.5 2006/06/20 12:55:26 tony2001 Exp $ */
+/* $Id: php_cli.c,v 1.129.2.13.2.6 2006/06/27 08:27:10 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -545,12 +545,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

Reply via email to