[PHP-CVS] cvs: php-src /main win95nt.h
pajoye Mon Jul 28 11:35:36 2008 UTC Modified files: /php-src/main win95nt.h Log: - silent warning with vc8 + dbg mode http://cvs.php.net/viewvc.cgi/php-src/main/win95nt.h?r1=1.26r2=1.27diff_format=u Index: php-src/main/win95nt.h diff -u php-src/main/win95nt.h:1.26 php-src/main/win95nt.h:1.27 --- php-src/main/win95nt.h:1.26 Sat Jul 5 18:50:10 2008 +++ php-src/main/win95nt.h Mon Jul 28 11:35:36 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: win95nt.h,v 1.26 2008/07/05 18:50:10 pajoye Exp $ */ +/* $Id: win95nt.h,v 1.27 2008/07/28 11:35:36 pajoye Exp $ */ /* Defines and types for Windows 95/NT */ #define HAVE_DECLARED_TIMEZONE @@ -48,7 +48,9 @@ #define rmdir(a) _rmdir(a) #define getpid _getpid #define php_sleep(t) Sleep(t*1000) +#ifndef getcwd #define getcwd(a, b) _getcwd(a, b) +#endif #define off_t _off_t typedef unsigned int uint; typedef unsigned long ulong; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main win95nt.h
pajoye Sat Jul 5 18:50:10 2008 UTC Modified files: /php-src/main win95nt.h Log: - don't redefine WINDOWS and pid_t http://cvs.php.net/viewvc.cgi/php-src/main/win95nt.h?r1=1.25r2=1.26diff_format=u Index: php-src/main/win95nt.h diff -u php-src/main/win95nt.h:1.25 php-src/main/win95nt.h:1.26 --- php-src/main/win95nt.h:1.25 Sat Jul 5 18:36:13 2008 +++ php-src/main/win95nt.h Sat Jul 5 18:50:10 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: win95nt.h,v 1.25 2008/07/05 18:36:13 pajoye Exp $ */ +/* $Id: win95nt.h,v 1.26 2008/07/05 18:50:10 pajoye Exp $ */ /* Defines and types for Windows 95/NT */ #define HAVE_DECLARED_TIMEZONE @@ -52,7 +52,7 @@ #define off_t _off_t typedef unsigned int uint; typedef unsigned long ulong; -#if !NSAPI +#if !NSAPI !defined(pid_t) typedef long pid_t; #endif @@ -72,7 +72,9 @@ #endif /* General Windows stuff */ -#define WINDOWS 1 +#ifndef WINDOWS +# define WINDOWS 1 +#endif /* Prevent use of VC5 OpenFile function */ #define NOOPENFILE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main win95nt.h
pajoye Sat Jul 5 18:36:13 2008 UTC Modified files: /php-src/main win95nt.h Log: - _getpid is in process.h http://cvs.php.net/viewvc.cgi/php-src/main/win95nt.h?r1=1.24r2=1.25diff_format=u Index: php-src/main/win95nt.h diff -u php-src/main/win95nt.h:1.24 php-src/main/win95nt.h:1.25 --- php-src/main/win95nt.h:1.24 Mon Dec 31 07:12:18 2007 +++ php-src/main/win95nt.h Sat Jul 5 18:36:13 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: win95nt.h,v 1.24 2007/12/31 07:12:18 sebastian Exp $ */ +/* $Id: win95nt.h,v 1.25 2008/07/05 18:36:13 pajoye Exp $ */ /* Defines and types for Windows 95/NT */ #define HAVE_DECLARED_TIMEZONE @@ -28,6 +28,8 @@ #include stdio.h #include stdarg.h #include sys/types.h +#include process.h + typedef int uid_t; typedef int gid_t; typedef char * caddr_t; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main win95nt.h /main/streams plain_wrapper.c
dmitry Thu Oct 19 09:49:56 2006 UTC Modified files: /php-src/main win95nt.h /php-src/main/streams plain_wrapper.c Log: Fixed mkdir(/tmp/foo//bar/log, 0777, true) http://cvs.php.net/viewvc.cgi/php-src/main/win95nt.h?r1=1.21r2=1.22diff_format=u Index: php-src/main/win95nt.h diff -u php-src/main/win95nt.h:1.21 php-src/main/win95nt.h:1.22 --- php-src/main/win95nt.h:1.21 Sun Jan 1 13:09:57 2006 +++ php-src/main/win95nt.h Thu Oct 19 09:49:56 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: win95nt.h,v 1.21 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: win95nt.h,v 1.22 2006/10/19 09:49:56 dmitry Exp $ */ /* Defines and types for Windows 95/NT */ #define HAVE_DECLARED_TIMEZONE @@ -41,7 +41,7 @@ #ifndef S_ISREG #define S_ISREG(m) (((m) S_IFMT) == S_IFREG) #endif -#define chdir(path) SetCurrentDirectory(path) +#define chdir(path) _chdir(path) #define mkdir(a, b)_mkdir(a) #define rmdir(a) _rmdir(a) #define getpid _getpid http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.73r2=1.74diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.73 php-src/main/streams/plain_wrapper.c:1.74 --- php-src/main/streams/plain_wrapper.c:1.73 Mon Oct 2 18:13:56 2006 +++ php-src/main/streams/plain_wrapper.cThu Oct 19 09:49:56 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.73 2006/10/02 18:13:56 pollita Exp $ */ +/* $Id: plain_wrapper.c,v 1.74 2006/10/19 09:49:56 dmitry Exp $ */ #include php.h #include php_globals.h @@ -1072,7 +1072,18 @@ int offset = 0; buf = estrndup(dir, dir_len); + +#ifdef PHP_WIN32 + e = buf; + while (*e) { + if (*e == '/') { + *e = DEFAULT_SLASH; + } + e++; + } +#else e = buf + dir_len; +#endif if ((p = memchr(buf, DEFAULT_SLASH, dir_len))) { offset = p - buf + 1; @@ -1084,9 +1095,21 @@ else { /* find a top level directory we need to create */ while ( (p = strrchr(buf + offset, DEFAULT_SLASH)) || (offset != 1 (p = strrchr(buf, DEFAULT_SLASH))) ) { + int n = 0; + *p = '\0'; + while (p buf *(p-1) == DEFAULT_SLASH) { + ++n; + --p; + *p = '\0'; + } if (VCWD_STAT(buf, sb) == 0) { - *p = DEFAULT_SLASH; + while (1) { + *p = DEFAULT_SLASH; + if (!n) break; + --n; + ++p; + } break; } } @@ -1100,9 +1123,10 @@ } /* create any needed directories if the creation of the 1st directory worked */ while (++p != e) { - if (*p == '\0' *(p + 1) != '\0') { + if (*p == '\0') { *p = DEFAULT_SLASH; - if ((ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { + if ((*(p+1) != '\0') + (ret = VCWD_MKDIR(buf, (mode_t)mode)) 0) { if (options REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php