]> granicus.if.org Git - php/commitdiff
keep PHP_5_4 in sync with PHP_5_3 branch
authorGeorge Wang <gwang@php.net>
Wed, 16 Nov 2011 03:44:42 +0000 (03:44 +0000)
committerGeorge Wang <gwang@php.net>
Wed, 16 Nov 2011 03:44:42 +0000 (03:44 +0000)
sapi/litespeed/lsapi_main.c

index 76c77fcefafb83867c20a30cba8d1684966d6da9..de1d0948b0ad054d3a96652a7f794ce3efe11f53 100644 (file)
@@ -225,6 +225,7 @@ static int add_variable( const char * pKey, int keyLen, const char * pValue, int
 }
 
 
+#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5)
 static int add_variable_magic_quote( const char * pKey, int keyLen, const char * pValue, int valLen, 
                          void * arg )
 {
@@ -244,6 +245,8 @@ static int add_variable_magic_quote( const char * pKey, int keyLen, const char *
     return 1;
 }
 
+#endif
+
 /* {{{ sapi_lsapi_register_variables
  */
 static void sapi_lsapi_register_variables(zval *track_vars_array TSRMLS_DC)
@@ -253,15 +256,19 @@ static void sapi_lsapi_register_variables(zval *track_vars_array TSRMLS_DC)
         if ( (SG(request_info).request_uri ) )
             php_self = (SG(request_info).request_uri );
 
+#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5)
         if (!PG(magic_quotes_gpc)) {
+#endif
             LSAPI_ForeachHeader( add_variable, track_vars_array );
             LSAPI_ForeachEnv( add_variable, track_vars_array );
             add_variable("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array );
+#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || PHP_MAJOR_VERSION < 5)
         } else {
             LSAPI_ForeachHeader( add_variable_magic_quote, track_vars_array );
             LSAPI_ForeachEnv( add_variable_magic_quote, track_vars_array );
             add_variable_magic_quote("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array );
         }
+#endif
         php_import_environment_variables(track_vars_array TSRMLS_CC);
     } else {
         php_import_environment_variables(track_vars_array TSRMLS_CC);
@@ -344,7 +351,7 @@ static int sapi_lsapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
 
 /* {{{ sapi_lsapi_send_headers
  */
-static void sapi_lsapi_log_message(char *message)
+static void sapi_lsapi_log_message(char *message TSRMLS_DC)
 {
     int len = strlen( message );
     LSAPI_Write_Stderr( message, len);