Skip to content

Instantly share code, notes, and snippets.

$ diff -ru riack.orig riack
Only in riack.orig: .git
diff -ru riack.orig/src/ints.h riack/src/ints.h
--- riack.orig/src/ints.h Sun Sep 15 01:20:33 2013
+++ riack/src/ints.h Sun Sep 15 01:22:25 2013
@@ -5,7 +5,7 @@
#include "riack-config.h"
#endif
-#if defined(HAVE_STDINT_H)
@weltling
weltling / gist:6606099
Created September 18, 2013 08:09
php sundown patch
$ diff -u sundown.orig/src/buffer.h sundown/src/buffer.h
--- sundown.orig/src/buffer.h Sun Sep 30 10:00:24 2012
+++ sundown/src/buffer.h Wed Sep 18 10:04:26 2013
@@ -20,7 +20,11 @@
#include <stddef.h>
#include <stdarg.h>
-#include <stdint.h>
+#ifdef PHP_WIN32
+# include "win32/php_stdint.h"
diff --git a/fann.c b/fann.c
index 9cb3171..531ad19 100644
--- a/fann.c
+++ b/fann.c
@@ -933,7 +933,9 @@ ZEND_GET_MODULE(fann)
/* macro for chencking fann_error structs */
#define PHP_FANN_ERROR_CHECK(__fann_struct) \
- if (fann_get_errno((struct fann_error *) __fann_struct) != 0) { \
+ if (NULL == __fann_struct) { \
<?php
ob_start();
session_save_path("/tmp");
$sid = md5(uniqid());
class CustomReadHandler extends SessionHandler {
public function read($session_id)
{
Application cmdline: "c:\tmp\drmemory_test\php.exe -d output_handler= -d open_basedir= -d safe_mode=0 -d disable_functions= -d output_buffering=Off -d error_reporting=32767 -d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d html_errors=0 -d track_errors=1 -d report_memleaks=1 -d report_zend_debug=0 -d docref_root= -d docref_ext=.html -d error_prepend_string= -d error_append_string= -d auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0 -d ignore_repeated_errors=0 -d precision=14 -d memory_limit=128M -d log_errors_max_len=0 -d opcache.fast_shutdown=0 -d opcache.file_update_protection=0 -f C:\php-sdk\php70\vc14\x86\php-src\Zend\tests\break_error_001.php"
Recorded 116 suppression(s) from default c:\tmp\drmemory_test\DrMemory-Windows-1.9.0-4\bin\suppress-default.txt
Recorded 2 suppression(s) from user c:\tmp\drmemory_test\suppress.txt
WARNING: application is missing line number information.
Error #1: LEAK 132 direct bytes 0x00ef2df0-0x00ef2e74 + 2052 indirect bytes
# 0 replace_mall
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 461bef4..d15c8a0 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -50,6 +50,10 @@
#include <unistd.h>
#endif
+#if HAVE_LIMITS_H
+#include <limits.h>
#! /bin/sh
#
# Created by configure
'./configure' \
'--build=x86_64-linux-gnu' \
'--host=x86_64-linux-gnu' \
'--prefix=/home/weltling/dws/root/php-7.0.8-ts-httpd-2.4' \
'--with-config-file-path=/home/weltling/dws/root/php-7.0.8-ts-httpd-2.4/etc' \
'--with-regex=php' \
diff --git a/ext/pcre/tests/bug72463.phpt b/ext/pcre/tests/bug72463.phpt
index b6ac971..3d38494 100644
--- a/ext/pcre/tests/bug72463.phpt
+++ b/ext/pcre/tests/bug72463.phpt
@@ -3,11 +3,16 @@ Bug #72463 mail fails with invalid argument
--FILE--
<?php
+if(substr(PHP_OS, 0, 3) == "WIN") {
+ ini_set("smtp", "non.existent.smtp.server");
--- a/xdebug_com.c
+++ b/xdebug_com.c
@@ -59,17 +59,18 @@ int xdebug_create_socket(const char *hostname, int dport TSRMLS_DC)
int actually_connected;
struct sockaddr_in6 sa;
socklen_t size = sizeof(sa);
- struct pollfd ufds[1];
#if WIN32|WINNT
+ WSAPOLLFD ufds[1];
WORD wVersionRequested;
--- a/xdebug_com.c
+++ b/xdebug_com.c
@@ -60,7 +60,7 @@ int xdebug_create_socket(const char *hostname, int dport TSRMLS_DC)
struct sockaddr_in6 sa;
socklen_t size = sizeof(sa);
#if WIN32|WINNT
- WSAPOLLFD ufds[1];
+ WSAPOLLFD ufds[1] = {0};
WORD wVersionRequested;
WSADATA wsaData;