Skip to content

Instantly share code, notes, and snippets.

TEST 1/1 [C:\Users\anbelski\dws\phpdev\php74\vc15\x64\php-src\sapi\cli\tests\bug44564.phpt]
========DIFF========
001+ string(13) "f^{o^}^<€^>"
002+ string(10) ""f~|;*Þ?""
003+ string(13) "^?€®đæ^?"
004+ string(10) ""aŊł€""
001- string(13) "f\{o\}\<€\>"
002- string(10) "'f~|;*Þ?'"
003- string(13) "\?€®đæ\?"
004- string(10) "'aŊł€'"
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 87483417eb..b75e4a900c 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -447,6 +447,11 @@ PHP_METHOD(Phar, mount)
fname_len = strlen(fname);
#ifdef PHP_WIN32
+ char cur_fname[PHP_WIN32_IOUTIL_MAXPATHLEN];
+ fname_len = PHP_WIN32_IOUTIL_MAXPATHLEN - 1 < fname_len ? PHP_WIN32_IOUTIL_MAXPATHLEN - 1 : fname_len;
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -305,7 +305,9 @@ static inline int accel_restart_is_active(void)
static inline int accel_activate_add(void)
{
#ifdef ZEND_WIN32
+ SHM_UNPROTECT();
INCREMENT(mem_usage);
+ SHM_PROTECT();
#else
<?php
error_reporting(E_ALL);
set_time_limit(0);
ob_implicit_flush();
$is_master_proc = !isset($argv[1]) || !$argv[1];
if ($is_master_proc) {
$address = 'localhost';
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
// Based on lexertl/iterator.hpp
#ifndef PARLE_LEXER_ITERATOR_HPP
#define PARLE_LEXER_ITERATOR_HPP
#include <iterator>
#include "lexertl/lookup.hpp"
#undef lookup
file.c:
#define f(a) ((a)>0)?1:0
#define p(...) ,##__VA_ARGS__
#define b(a,...) f(test(a p(__VA_ARGS__)))
int
main(int argc, char **argv)
{
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index 394819cf34..d57002a592 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -138,7 +138,8 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil
struct zip_file *zf;
struct zip_stat sb;
char b[8192];
- int n, len, ret;
+ zip_int64_t n;
#include <stdio.h>
#include <zip.h>
int
main(int argc, char **argv)
{
int err;
struct zip *z = zip_open("test_procedural.zip", 0, &err);
diff --git a/ext/zip/config.w32 b/ext/zip/config.w32
index 5460b6d6bd..18bad33c79 100644
--- a/ext/zip/config.w32
+++ b/ext/zip/config.w32
@@ -5,6 +5,20 @@ ARG_ENABLE("zip", "ZIP support", "yes");
if (PHP_ZIP != "no") {
if (CHECK_HEADER_ADD_INCLUDE("zlib.h", "CFLAGS_ZIP", "..\\zlib;" + PHP_ZIP) &&
+ CHECK_HEADER_ADD_INCLUDE("zip.h", "CFLAGS_ZIP", PHP_PHP_BUILD + "\\include;" + PHP_EXTRA_INCLUDES) &&
+ CHECK_HEADER_ADD_INCLUDE("zipconf.h", "CFLAGS_ZIP", PHP_PHP_BUILD + "\\lib\\libzip\\include;" + PHP_EXTRA_LIBS + "\\libzip\\include;" + PHP_ZIP) &&