@@ -113,7 +113,7 @@ static php_mail_header_value_error_type php_mail_build_headers_check_field_value
113113}
114114
115115
116- static bool php_mail_build_headers_check_field_name (zend_string * key )
116+ static bool php_mail_build_headers_check_field_name (const zend_string * key )
117117{
118118 size_t len = 0 ;
119119
@@ -128,9 +128,9 @@ static bool php_mail_build_headers_check_field_name(zend_string *key)
128128}
129129
130130
131- static void php_mail_build_headers_elems (smart_str * s , zend_string * key , zval * val );
131+ static void php_mail_build_headers_elems (smart_str * s , const zend_string * key , zval * val );
132132
133- static void php_mail_build_headers_elem (smart_str * s , zend_string * key , zval * val )
133+ static void php_mail_build_headers_elem (smart_str * s , const zend_string * key , zval * val )
134134{
135135 switch (Z_TYPE_P (val )) {
136136 case IS_STRING :
@@ -174,7 +174,7 @@ static void php_mail_build_headers_elem(smart_str *s, zend_string *key, zval *va
174174}
175175
176176
177- static void php_mail_build_headers_elems (smart_str * s , zend_string * key , zval * val )
177+ static void php_mail_build_headers_elems (smart_str * s , const zend_string * key , zval * val )
178178{
179179 zend_string * tmp_key ;
180180 zval * tmp_val ;
@@ -208,7 +208,7 @@ do { \
208208 } \
209209} while(0)
210210
211- PHPAPI zend_string * php_mail_build_headers (HashTable * headers )
211+ PHPAPI zend_string * php_mail_build_headers (const HashTable * headers )
212212{
213213 zend_ulong idx ;
214214 zend_string * key ;
@@ -392,7 +392,7 @@ static void php_mail_log_to_syslog(char *message) {
392392}
393393
394394
395- static void php_mail_log_to_file (char * filename , char * message , size_t message_size ) {
395+ static void php_mail_log_to_file (const char * filename , const char * message , size_t message_size ) {
396396 /* Write 'message' to the given file. */
397397 uint32_t flags = REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR ;
398398 php_stream * stream = php_stream_open_wrapper (filename , "a" , flags , NULL );
@@ -446,7 +446,7 @@ PHPAPI bool php_mail(const char *to, const char *subject, const char *message, c
446446 FILE * sendmail ;
447447 char * sendmail_path = INI_STR ("sendmail_path" );
448448 char * sendmail_cmd = NULL ;
449- char * mail_log = INI_STR ("mail.log" );
449+ const char * mail_log = INI_STR ("mail.log" );
450450 const char * hdr = headers ;
451451 char * ahdr = NULL ;
452452#if PHP_SIGCHILD
@@ -495,7 +495,7 @@ PHPAPI bool php_mail(const char *to, const char *subject, const char *message, c
495495 MAIL_RET (false);
496496 }
497497
498- char * line_sep ;
498+ const char * line_sep ;
499499 zend_string * cr_lf_mode = PG (mail_cr_lf_mode );
500500
501501 if (cr_lf_mode && !zend_string_equals_literal (cr_lf_mode , "crlf" )) {
0 commit comments