summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch')
-rw-r--r--dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch b/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch
new file mode 100644
index 000000000000..f645199fba24
--- /dev/null
+++ b/dev-lang/php/files/5.0.4/php5.0.4-fopen_wrappers.patch
@@ -0,0 +1,46 @@
+--- main/fopen_wrappers.c 2005/03/11 06:55:22 1.170.2.2
++++ main/fopen_wrappers.c 2005/09/27 15:08:11 1.170.2.5
+@@ -17,7 +17,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: fopen_wrappers.c,v 1.170.2.2 2005/03/11 06:55:22 hyanantha Exp $ */
++/* $Id: fopen_wrappers.c,v 1.170.2.5 2005/09/27 15:08:11 iliaa Exp $ */
+
+ /* {{{ includes
+ */
+@@ -35,14 +35,6 @@
+ #ifdef PHP_WIN32
+ #define O_RDONLY _O_RDONLY
+ #include "win32/param.h"
+-#elif defined(NETWARE)
+-/*#include <ws2nlm.h>*/
+-/*#include <sys/socket.h>*/
+-#ifdef NEW_LIBC
+-#include <sys/param.h>
+-#else
+-#include "netware/param.h"
+-#endif
+ #else
+ #include <sys/param.h>
+ #endif
+@@ -117,8 +109,8 @@ PHPAPI int php_check_specific_open_based
+ /* Handler for basedirs that end with a / */
+ resolved_basedir_len = strlen(resolved_basedir);
+ if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) {
+- if (resolved_basedir[resolved_basedir_len - 1] == '/') {
+- resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR;
++ if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) {
++ resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR;
+ resolved_basedir[++resolved_basedir_len] = '\0';
+ }
+ }
+@@ -132,7 +124,7 @@ PHPAPI int php_check_specific_open_based
+ }
+
+ /* Check the path */
+-#ifdef PHP_WIN32
++#if defined(PHP_WIN32) || defined(NETWARE)
+ if (strncasecmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {
+ #else
+ if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) {