]> granicus.if.org Git - php/commitdiff
Remove IGNORE_URL_WIN macro
authorChristoph M. Becker <cmbecker69@gmx.de>
Sun, 18 Oct 2020 16:27:01 +0000 (18:27 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sun, 18 Oct 2020 21:36:36 +0000 (23:36 +0200)
This macro is defined to zero as of PHP 5.0.0, and as the comment
indicates, is no longer relevant.  Thus, we remove the definition and
all usages from the core and bundled extensions.

Closes GH-6351.

UPGRADING
ext/gd/gd.c
ext/standard/basic_functions.c
ext/standard/mail.c
main/main.c
main/php_streams.h

index 715d0c35b7e29694fed7957fd5853f3f5b8d5260..b186fe0a2f27329b907511528a536ea2d2fc7ebd 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -63,6 +63,8 @@ PHP 8.1 UPGRADE NOTES
 12. Windows Support
 ========================================
 
+. The macro IGNORE_URL_WIN has been removed; it had no effect as of PHP 5.0.0.
+
 ========================================
 13. Other Changes
 ========================================
index 22473798846f4930240c97b0c084dc1e958e57ca..6ade5c7931d1af5281d16ed80f3e755911744e42 100644 (file)
@@ -625,7 +625,7 @@ PHP_FUNCTION(imageloadfont)
                RETURN_THROWS();
        }
 
-       stream = php_stream_open_wrapper(ZSTR_VAL(file), "rb", IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
+       stream = php_stream_open_wrapper(ZSTR_VAL(file), "rb", IGNORE_PATH | REPORT_ERRORS, NULL);
        if (stream == NULL) {
                RETURN_FALSE;
        }
@@ -1584,7 +1584,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
        }
 
 
-       stream = php_stream_open_wrapper(file, "rb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
+       stream = php_stream_open_wrapper(file, "rb", REPORT_ERRORS|IGNORE_PATH, NULL);
        if (stream == NULL)     {
                RETURN_FALSE;
        }
@@ -1883,7 +1883,7 @@ PHP_FUNCTION(imagexbm)
        im = php_gd_libgdimageptr_from_zval_p(imgind);
 
        if (file != NULL) {
-               stream = php_stream_open_wrapper(file, "wb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
+               stream = php_stream_open_wrapper(file, "wb", REPORT_ERRORS|IGNORE_PATH, NULL);
                if (stream == NULL) {
                        RETURN_FALSE;
                }
@@ -4092,7 +4092,7 @@ static gdIOCtx *create_stream_context_from_zval(zval *to_zval) {
                        return NULL;
                }
 
-               stream = php_stream_open_wrapper(Z_STRVAL_P(to_zval), "wb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
+               stream = php_stream_open_wrapper(Z_STRVAL_P(to_zval), "wb", REPORT_ERRORS|IGNORE_PATH, NULL);
                if (stream == NULL) {
                        return NULL;
                }
index 8a7d9ca895bfb7ac25e195b8e36fbb5d2ce0e773..14b80c57aa6ce69b7de688ce77b4fd789f92baa2 100755 (executable)
@@ -1472,7 +1472,7 @@ PHPAPI int _php_error_log_ex(int opt_err, const char *message, size_t message_le
                        return FAILURE;
 
                case 3:         /*save to a file */
-                       stream = php_stream_open_wrapper(opt, "a", IGNORE_URL_WIN | REPORT_ERRORS, NULL);
+                       stream = php_stream_open_wrapper(opt, "a", REPORT_ERRORS, NULL);
                        if (!stream) {
                                return FAILURE;
                        }
index 3080a3957bb9c901cff729ea1c97f8f3345c378b..4dfbfb03d00a3d0914d03568872d76b651142860 100644 (file)
@@ -371,7 +371,7 @@ void php_mail_log_to_syslog(char *message) {
 
 void php_mail_log_to_file(char *filename, char *message, size_t message_size) {
        /* Write 'message' to the given file. */
-       uint32_t flags = IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR;
+       uint32_t flags = REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR;
        php_stream *stream = php_stream_open_wrapper(filename, "a", flags, NULL);
        if (stream) {
                php_stream_write(stream, message, message_size);
index 4511453dcef6a69a3c529055ae65c20400155e0c..8a860505f98c619331c80227a9c11de29312750e 100644 (file)
@@ -1450,7 +1450,7 @@ PHP_FUNCTION(set_time_limit)
 /* {{{ php_fopen_wrapper_for_zend */
 static FILE *php_fopen_wrapper_for_zend(const char *filename, zend_string **opened_path)
 {
-       return php_stream_open_wrapper_as_file((char *)filename, "rb", USE_PATH|IGNORE_URL_WIN|REPORT_ERRORS|STREAM_OPEN_FOR_INCLUDE, opened_path);
+       return php_stream_open_wrapper_as_file((char *)filename, "rb", USE_PATH|REPORT_ERRORS|STREAM_OPEN_FOR_INCLUDE, opened_path);
 }
 /* }}} */
 
index 73740a7a7907c101f2811bf24c3715c8747d1aa6..1bd66686071da52317a841efd9447706b2d945fa 100644 (file)
@@ -550,9 +550,6 @@ END_EXTERN_C()
 /* Allow blocking reads on anonymous pipes on Windows. */
 #define STREAM_USE_BLOCKING_PIPE        0x00008000
 
-/* Antique - no longer has meaning */
-#define IGNORE_URL_WIN 0
-
 int php_init_stream_wrappers(int module_number);
 int php_shutdown_stream_wrappers(int module_number);
 void php_shutdown_stream_hashes(void);