summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:34:59 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:34:59 -0400
commitce7edc9b3c7370f32fec0bc7a8ec3e29ed9a5f61 (patch)
treeacdb9a8816483652a9db1a47db71df5df43707c5 /win32
parent10f5b47dc7c1cf2b9a00991629f43652710322d3 (diff)
downloadphp-ce7edc9b3c7370f32fec0bc7a8ec3e29ed9a5f61.tar.gz
Imported Upstream version 5.1.1upstream/5.1.1
Diffstat (limited to 'win32')
-rw-r--r--win32/build/Makefile8
-rw-r--r--win32/build/buildconf.js46
-rw-r--r--win32/build/config.w3252
-rw-r--r--win32/build/config.w32.h.in4
-rw-r--r--win32/build/confutils.js6
-rw-r--r--win32/build/cvsclean.js4
-rw-r--r--win32/build/deplister.c4
-rw-r--r--win32/build/mkdist.php2
-rwxr-xr-xwin32/build/registersyslog.php45
-rw-r--r--win32/build/template.rc4
-rw-r--r--win32/crypt_win32.c4
-rw-r--r--win32/crypt_win32.h4
-rwxr-xr-xwin32/globals.c102
-rw-r--r--win32/grp.h4
-rw-r--r--win32/md5crypt.c4
-rw-r--r--win32/md5crypt.h4
-rw-r--r--win32/php5dll.dsp52
-rw-r--r--win32/php5dllts.dsp75
-rw-r--r--win32/php5dllts.rc22
-rw-r--r--win32/php5ts.dsw15
-rw-r--r--win32/php5ts.rc22
-rw-r--r--win32/php5ts_cli.rc22
-rw-r--r--win32/php_modules.dsw48
-rwxr-xr-xwin32/php_win32_globals.h116
-rw-r--r--win32/pwd.c4
-rw-r--r--win32/pwd.h4
-rw-r--r--win32/select.c4
-rw-r--r--win32/select.h4
-rw-r--r--win32/sendmail.c78
-rw-r--r--win32/sendmail.h16
-rw-r--r--win32/syslog.h4
-rw-r--r--win32/syslog.reg5
-rw-r--r--win32/time.c2
-rw-r--r--win32/winutil.c4
-rw-r--r--win32/winutil.h2
-rw-r--r--win32/wsyslog.c9
36 files changed, 336 insertions, 409 deletions
diff --git a/win32/build/Makefile b/win32/build/Makefile
index d98798a50..ed144f57d 100644
--- a/win32/build/Makefile
+++ b/win32/build/Makefile
@@ -1,7 +1,7 @@
# +----------------------------------------------------------------------+
# | PHP Version 5 |
# +----------------------------------------------------------------------+
-# | Copyright (c) 1997-2004 The PHP Group |
+# | Copyright (c) 1997-2005 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 3.0 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
@@ -14,7 +14,7 @@
# | Author: Wez Furlong <wez@thebrainroom.com> |
# +----------------------------------------------------------------------+
#
-# $Id: Makefile,v 1.23.2.6 2005/08/01 20:43:04 edink Exp $
+# $Id: Makefile,v 1.35 2005/08/03 14:08:58 sniper Exp $
# This is the makefile template for the win32 build
CC="$(CL)"
@@ -30,7 +30,6 @@ build_dirs: $(BUILD_DIR) $(BUILD_DIRS_SUB)
generated_files: build_dirs Zend\zend_ini_parser.c \
Zend\zend_language_parser.c Zend\zend_ini_scanner.c \
Zend\zend_language_scanner.c \
- ext\standard\parsedate.c \
$(PHPDEF) $(MCFILE)
$(BUILD_DIR)\$(PHPDLL).def: $(PHP_DLL_DEF_SOURCES)
@@ -48,9 +47,6 @@ Zend\zend_ini_scanner.c: Zend\flex.skl Zend\zend_ini_scanner.l
Zend\zend_language_scanner.c: Zend\flex.skl Zend\zend_language_scanner.l
$(FLEX) -i -SZend/flex.skl -Pzend -oZend/zend_language_scanner.c Zend/zend_language_scanner.l
-ext\standard\parsedate.c ext\standard\parsedate.h: ext\standard\parsedate.y
- $(BISON) --output=ext/standard/parsedate.c -v -d ext/standard/parsedate.y
-
PHPDLL_RES=$(BUILD_DIR)\$(PHPDLL).res
$(MCFILE): win32\build\wsyslog.mc
diff --git a/win32/build/buildconf.js b/win32/build/buildconf.js
index 71c80a559..d9cb6cac6 100644
--- a/win32/build/buildconf.js
+++ b/win32/build/buildconf.js
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: buildconf.js,v 1.11.2.1 2005/07/22 18:09:33 wez Exp $ */
+/* $Id: buildconf.js,v 1.13.2.1 2005/09/17 20:00:01 edink Exp $ */
// This generates a configure script for win32 build
WScript.StdOut.WriteLine("Rebuilding configure.js");
@@ -25,6 +25,7 @@ var C = FSO.CreateTextFile("configure.js", true);
var modules = "";
var MODULES = WScript.CreateObject("Scripting.Dictionary");
+var module_dirs = new Array();
function file_get_contents(filename)
{
@@ -181,6 +182,31 @@ if (FSO.FileExists("ZendEngine2\\OBJECTS2_HOWTO")) {
FSO.MoveFolder("ZendEngine2", "Zend");
}
+// Process buildconf arguments
+function buildconf_process_args()
+{
+ args = WScript.Arguments;
+
+ for (i = 0; i < args.length; i++) {
+ arg = args(i);
+ // If it is --foo=bar, split on the equals sign
+ arg = arg.split("=", 2);
+ argname = arg[0];
+ if (arg.length > 1) {
+ argval = arg[1];
+ } else {
+ argval = null;
+ }
+
+ if (argname == '--add-modules-dir' && argval != null) {
+ WScript.StdOut.WriteLine("Adding " + argval + " to the module search path");
+ module_dirs[module_dirs.length] = argval;
+ }
+ }
+}
+
+buildconf_process_args();
+
// Write the head of the configure script
C.WriteLine("/* This file automatically generated from win32/build/confutils.js */");
C.Write(file_get_contents("win32/build/confutils.js"));
@@ -194,11 +220,17 @@ find_config_w32("sapi");
find_config_w32("ext");
emit_core_module_list();
-find_config_w32("pecl");
-find_config_w32("..\\pecl");
-find_config_w32("pecl\\rpc");
-find_config_w32("..\\pecl\\rpc");
-
+// If we have not specified any module dirs let's add some defaults
+if (module_dirs.length == 0) {
+ find_config_w32("pecl");
+ find_config_w32("..\\pecl");
+ find_config_w32("pecl\\rpc");
+ find_config_w32("..\\pecl\\rpc");
+} else {
+ for (i = 0; i < module_dirs.length; i++) {
+ find_config_w32(module_dirs[i]);
+ }
+}
// Now generate contents of module based on MODULES, chasing dependencies
// to ensure that dependent modules are emitted first
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index ca0fc323c..ced4de625 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -1,11 +1,32 @@
// vim:ft=javascript
-// $Id: config.w32,v 1.26.2.9 2005/07/22 18:09:33 wez Exp $
+// $Id: config.w32,v 1.40.2.4 2005/11/22 00:29:56 fmk Exp $
// "Master" config file; think of it as a configure.in
// equivalent.
ARG_WITH('cygwin', 'Path to cygwin utilities on your system', '\\cygwin');
PATH_PROG('cl');
+CL = PATH_PROG('cl');
+if (!CL) {
+ ERROR("MS C++ compiler is required");
+}
+// Which version of the compiler do we have ?
+function probe_msvc_compiler_version(CL)
+{
+ // tricky escapes to get stderr redirection to work
+ var banner = execute('cmd /c ""' + CL + '" 2>&1"');
+ if (banner.match(/(\d+)\.(\d+)\.(\d+)(\.(\d+))?/)) {
+ return RegExp.$1;
+ }
+ return 0;
+}
+VCVERS = probe_msvc_compiler_version(CL);
+STDOUT.WriteLine("Detected MS compiler version " + VCVERS);
+
+// 12 is VC6
+// 13 is vs.net 2003
+// 14 is vs.net 2005
+
// cygwin now ships with link.exe. Avoid searching the cygwin path
// for this, as we want the MS linker, not the fileutil
PATH_PROG('link', WshShell.Environment("Process").Item("PATH"));
@@ -52,7 +73,7 @@ if (PHP_PREFIX == '') {
}
DEFINE('PHP_PREFIX', PHP_PREFIX);
-DEFINE("BASE_INCLUDES", "/I . /I main /I regex /I Zend /I TSRM ");
+DEFINE("BASE_INCLUDES", "/I . /I main /I regex /I Zend /I TSRM /I ext ");
// CFLAGS for building the PHP dll
DEFINE("CFLAGS_PHP", "/D _USRDLL /D PHP5DLLTS_EXPORTS /D PHP_EXPORTS \
@@ -61,9 +82,30 @@ DEFINE("CFLAGS_PHP", "/D _USRDLL /D PHP5DLLTS_EXPORTS /D PHP_EXPORTS \
DEFINE('CFLAGS_PHP_OBJ', '$(CFLAGS_PHP) $(STATIC_EXT_CFLAGS)');
// General CFLAGS for building objects
-DEFINE("CFLAGS", "/nologo /YX /FD $(BASE_INCLUDES) /D _WINDOWS \
+DEFINE("CFLAGS", "/nologo /FD $(BASE_INCLUDES) /D _WINDOWS \
/D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS");
+if (VCVERS < 14) {
+ // Enable automatic precompiled headers
+ ADD_FLAG('CFLAGS', ' /YX ');
+
+ if (PHP_DEBUG == "yes") {
+ // Set some debug/release specific options
+ ADD_FLAG('CFLAGS', ' /GZ ');
+ }
+}
+
+if (VCVERS >= 14) {
+ // fun stuff: MS deprecated ANSI stdio and similar functions
+ // disable annoying warnings
+ ADD_FLAG('CFLAGS', ' /wd4996 ');
+
+ if (PHP_DEBUG == "yes") {
+ // Set some debug/release specific options
+ ADD_FLAG('CFLAGS', ' /RTC1 ');
+ }
+}
+
// General link flags
DEFINE("LDFLAGS", "/nologo /version:" +
PHP_VERSION + "." + PHP_MINOR_VERSION + "." + PHP_RELEASE_VERSION);
@@ -80,7 +122,7 @@ DEFINE("LIBS", "kernel32.lib ole32.lib user32.lib advapi32.lib shell32.lib ws2_3
// Set some debug/release specific options
if (PHP_DEBUG == "yes") {
- ADD_FLAG("CFLAGS", "/LDd /MDd /Gm /ZI /Od /GZ /D _DEBUG /D ZEND_DEBUG=1");
+ ADD_FLAG("CFLAGS", "/LDd /MDd /Gm /ZI /Od /D _DEBUG /D ZEND_DEBUG=1");
ADD_FLAG("LDFLAGS", "/debug");
// Avoid problems when linking to release libraries that use the release
// version of the libc
@@ -93,7 +135,7 @@ if (PHP_DEBUG == "yes") {
}
// Equivalent to Release_TSInline build -> best optimization
ADD_FLAG("CFLAGS", "/LD /MD /W3 /Ox /D NDebug /D NDEBUG \
-/D ZEND_WIN32_FORCE_INLINE /GB /GF /D ZEND_DEBUG=0");
+/D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0");
// if you have VS.Net /GS hardens the binary against buffer overruns
// ADD_FLAG("CFLAGS", "/GS");
}
diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in
index 0ae6e50eb..f1245b045 100644
--- a/win32/build/config.w32.h.in
+++ b/win32/build/config.w32.h.in
@@ -1,6 +1,6 @@
/*
Build Configuration Template for Win32.
- $Id: config.w32.h.in,v 1.5.2.1 2005/07/22 18:09:33 wez Exp $
+ $Id: config.w32.h.in,v 1.7.2.1 2005/09/21 08:41:16 derick Exp $
*/
/* Default PHP / PEAR directories */
@@ -117,7 +117,7 @@
#define SIZEOF_LONG 4
/* MSVC.6/NET don't allow 'long long' or know 'intmax_t' */
#define SIZEOF_LONG_LONG_INT 0
-#define SIZEOF_LONG_LONG 0
+#define SIZEOF_LONG_LONG 8 /* defined as __int64 */
#define SIZEOF_INTMAX_T 0
#define ssize_t SSIZE_T
#ifdef _WIN64
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 025816497..62a255de1 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -3,7 +3,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-// $Id: confutils.js,v 1.42.2.4 2005/07/22 18:09:33 wez Exp $
+// $Id: confutils.js,v 1.60 2005/08/03 14:08:58 sniper Exp $
var STDOUT = WScript.StdOut;
var STDERR = WScript.StdErr;
@@ -350,7 +350,7 @@ can be built that way. \
'php-build', 'snapshot-template',
'pcre-regex', 'fastcgi', 'force-cgi-redirect',
'path-info-check', 'zts', 'ipv6', 'memory-limit',
- 'zend-multibyte', 'fd-setsize', 'memory-manager'
+ 'zend-multibyte', 'fd-setsize', 'memory-manager', 't1lib'
);
var force;
diff --git a/win32/build/cvsclean.js b/win32/build/cvsclean.js
index 63bea9133..4251673ca 100644
--- a/win32/build/cvsclean.js
+++ b/win32/build/cvsclean.js
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cvsclean.js,v 1.4 2004/04/08 19:08:37 fmk Exp $ */
+/* $Id: cvsclean.js,v 1.5 2005/08/03 14:08:58 sniper Exp $ */
// Cleans up files that do not belong in CVS
var FSO = WScript.CreateObject("Scripting.FileSystemObject");
diff --git a/win32/build/deplister.c b/win32/build/deplister.c
index d6e7be65c..74464207f 100644
--- a/win32/build/deplister.c
+++ b/win32/build/deplister.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: deplister.c,v 1.2 2004/01/08 08:18:22 andi Exp $ */
+/* $Id: deplister.c,v 1.3 2005/08/03 14:08:58 sniper Exp $ */
/* This little application will list the DLL dependencies for a PE
* module to it's stdout for use by distro/installer building tools */
diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php
index bfcaf9493..d77e8b6be 100644
--- a/win32/build/mkdist.php
+++ b/win32/build/mkdist.php
@@ -1,4 +1,4 @@
-<?php # $Id: mkdist.php,v 1.10.2.2 2005/07/22 18:09:33 wez Exp $
+<?php # $Id: mkdist.php,v 1.13 2005/03/26 21:32:20 edink Exp $
/* piece together a windows binary distro */
$build_dir = $argv[1];
diff --git a/win32/build/registersyslog.php b/win32/build/registersyslog.php
new file mode 100755
index 000000000..73fef50f0
--- /dev/null
+++ b/win32/build/registersyslog.php
@@ -0,0 +1,45 @@
+<?php
+
+/* This script sets up an event source for use by the php syslog() function. */
+
+if (!extension_loaded("win32std")) {
+ dl("php_win32std.dll");
+}
+
+$PATH = "SYSTEM\\CurrentControlSet\\Services\\Eventlog\\Application\\PHP-" . phpversion();
+
+$dll = $argv[1];
+
+if (extension_loaded("win32std")) {
+ $key = @reg_create_key(HKEY_LOCAL_MACHINE, $PATH, KEY_ALL_ACCESS);
+
+ if (!$key)
+ $key = reg_open_key(HKEY_LOCAL_MACHINE, $PATH, KEY_ALL_ACCESS);
+
+ if ($key) {
+ reg_set_value($key, "TypesSupported", REG_DWORD, 7) or die("Types");
+ reg_set_value($key, "EventMessageFile", REG_SZ, $dll) or die("EventMessageFile");
+
+ define_syslog_variables();
+ syslog(LOG_NOTICE, "Registered PHP Event source");
+ } else {
+ echo "Could not register event source\n";
+ }
+}
+
+/* let's also generate/update the bundled .reg file */
+
+$dll = addslashes($dll);
+
+file_put_contents("win32/syslog.reg", <<<REG
+REGEDIT4
+
+[HKEY_LOCAL_MACHINE\\$PATH]
+"TypesSupported"=dword:00000007
+"EventMessageFile"="$dll"
+
+REG
+);
+
+
+?>
diff --git a/win32/build/template.rc b/win32/build/template.rc
index 914c07df8..f03575448 100644
--- a/win32/build/template.rc
+++ b/win32/build/template.rc
@@ -1,5 +1,5 @@
/* This is a template RC file.
- * $Id: template.rc,v 1.5.2.1 2005/07/22 18:09:34 wez Exp $
+ * $Id: template.rc,v 1.7 2005/08/03 14:08:58 sniper Exp $
* Do not edit with MSVC */
#ifdef APSTUDIO_INVOKED
# error dont edit with MSVC
@@ -47,7 +47,7 @@ BEGIN
VALUE "FileDescription", FILE_DESCRIPTION "\0"
VALUE "FileVersion", STRVER4(PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION, PHP_RELEASE_VERSION)
VALUE "InternalName", FILE_NAME "\0"
- VALUE "LegalCopyright", "Copyright © 1997-2004 The PHP Group\0"
+ VALUE "LegalCopyright", "Copyright © 1997-2005 The PHP Group\0"
VALUE "LegalTrademarks", "PHP\0"
VALUE "OriginalFilename", FILE_NAME "\0"
VALUE "PrivateBuild", "\0"
diff --git a/win32/crypt_win32.c b/win32/crypt_win32.c
index e2c796032..ecaed79dc 100644
--- a/win32/crypt_win32.c
+++ b/win32/crypt_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: crypt_win32.c,v 1.7 2004/01/08 08:18:21 andi Exp $ */
+/* $Id: crypt_win32.c,v 1.8 2005/08/03 14:08:57 sniper Exp $ */
/* This code is distributed under the PHP license with permission from
the author Jochen Obalek <jochen.obalek@bigfoot.de> */
diff --git a/win32/crypt_win32.h b/win32/crypt_win32.h
index f5d5741a9..0d4d93323 100644
--- a/win32/crypt_win32.h
+++ b/win32/crypt_win32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: crypt_win32.h,v 1.6 2004/01/08 17:33:28 sniper Exp $ */
+/* $Id: crypt_win32.h,v 1.7 2005/08/03 14:08:57 sniper Exp $ */
/* This code is distributed under the PHP license with permission from
the author Jochen Obalek <jochen.obalek@bigfoot.de> */
diff --git a/win32/globals.c b/win32/globals.c
index a3e736364..e966fa919 100755
--- a/win32/globals.c
+++ b/win32/globals.c
@@ -1,51 +1,51 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: Wez Furlong <wez@php.net> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id: globals.c,v 1.2.2.1 2004/07/30 14:24:59 wez Exp $ */
-
-#include "php.h"
-#include "php_win32_globals.h"
-
-#ifdef ZTS
-PHPAPI int php_win32_core_globals_id;
-#else
-php_win32_core_globals php_win32_core_globals;
-#endif
-
-void php_win32_core_globals_ctor(void *vg TSRMLS_DC)
-{
- php_win32_core_globals *wg = (php_win32_core_globals*)vg;
- memset(wg, 0, sizeof(*wg));
-}
-
-PHP_RSHUTDOWN_FUNCTION(win32_core_globals)
-{
- php_win32_core_globals *wg =
-#ifdef ZTS
- ts_resource(php_win32_core_globals_id)
-#else
- &php_win32_core_globals
-#endif
- ;
-
- STR_FREE(wg->login_name);
-
- memset(wg, 0, sizeof(*wg));
- return SUCCESS;
-}
-
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2005 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.0 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_0.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: Wez Furlong <wez@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id: globals.c,v 1.5 2005/08/03 14:08:57 sniper Exp $ */
+
+#include "php.h"
+#include "php_win32_globals.h"
+
+#ifdef ZTS
+PHPAPI int php_win32_core_globals_id;
+#else
+php_win32_core_globals the_php_win32_core_globals;
+#endif
+
+void php_win32_core_globals_ctor(void *vg TSRMLS_DC)
+{
+ php_win32_core_globals *wg = (php_win32_core_globals*)vg;
+ memset(wg, 0, sizeof(*wg));
+}
+
+PHP_RSHUTDOWN_FUNCTION(win32_core_globals)
+{
+ php_win32_core_globals *wg =
+#ifdef ZTS
+ ts_resource(php_win32_core_globals_id)
+#else
+ &the_php_win32_core_globals
+#endif
+ ;
+
+ STR_FREE(wg->login_name);
+
+ memset(wg, 0, sizeof(*wg));
+ return SUCCESS;
+}
+
diff --git a/win32/grp.h b/win32/grp.h
index 4f6e9d8b8..f5bcbe525 100644
--- a/win32/grp.h
+++ b/win32/grp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: grp.h,v 1.6 2004/01/08 17:33:28 sniper Exp $ */
+/* $Id: grp.h,v 1.7 2005/08/03 14:08:57 sniper Exp $ */
struct group {
char *gr_name;
diff --git a/win32/md5crypt.c b/win32/md5crypt.c
index 46af2f0aa..7bb1ea9fb 100644
--- a/win32/md5crypt.c
+++ b/win32/md5crypt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: md5crypt.c,v 1.5 2004/01/08 08:18:21 andi Exp $ */
+/* $Id: md5crypt.c,v 1.6 2005/08/03 14:08:57 sniper Exp $ */
/*
* ----------------------------------------------------------------------------
diff --git a/win32/md5crypt.h b/win32/md5crypt.h
index db742ac70..f30ed1ac7 100644
--- a/win32/md5crypt.h
+++ b/win32/md5crypt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: md5crypt.h,v 1.4 2004/01/08 17:33:28 sniper Exp $ */
+/* $Id: md5crypt.h,v 1.5 2005/08/03 14:08:57 sniper Exp $ */
#ifndef _MD5CRYPT_H_
#define _MD5CRYPT_H_
diff --git a/win32/php5dll.dsp b/win32/php5dll.dsp
index 542ce057f..891a0438f 100644
--- a/win32/php5dll.dsp
+++ b/win32/php5dll.dsp
@@ -260,10 +260,6 @@ SOURCE=..\main\getopt.h
# End Source File
# Begin Source File
-SOURCE=..\main\internal_functions_registry.h
-# End Source File
-# Begin Source File
-
SOURCE=..\main\logos.h
# End Source File
# Begin Source File
@@ -504,10 +500,6 @@ SOURCE=..\ext\standard\pageinfo.c
# End Source File
# Begin Source File
-SOURCE=..\ext\standard\parsedate.c
-# End Source File
-# Begin Source File
-
SOURCE=..\ext\standard\php_fopen_wrapper.c
# End Source File
# Begin Source File
@@ -1668,50 +1660,6 @@ SOURCE=..\win32\wfile.h
# End Source File
# End Group
# End Group
-# Begin Group "Parsers"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\ext\standard\parsedate.y
-
-!IF "$(CFG)" == "php5dll - Win32 Debug"
-
-# Begin Custom Build - Generating ext/standard/parsedate.c
-InputPath=..\ext\standard\parsedate.y
-
-"..\ext\standard\parsedate.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- cd ..\ext\standard
- bison --output=parsedate.c -v -d parsedate.y
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "php5dll - Win32 Release"
-
-# Begin Custom Build - Generating ext/standard/parsedate.c
-InputPath=..\ext\standard\parsedate.y
-
-"..\ext\standard\parsedate.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- cd ..\ext\standard
- bison --output=parsedate.c -v -d parsedate.y
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "php5dll - Win32 Release_inline"
-
-# Begin Custom Build - Generating ext/standard/parsedate.c
-InputPath=..\ext\standard\parsedate.y
-
-"..\ext\standard\parsedate.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- cd ..\ext\standard
- bison --output=parsedate.c -v -d parsedate.y
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
diff --git a/win32/php5dllts.dsp b/win32/php5dllts.dsp
index 60bbad92e..745d800f4 100644
--- a/win32/php5dllts.dsp
+++ b/win32/php5dllts.dsp
@@ -169,6 +169,10 @@ SOURCE="..\main\fopen_wrappers.c"
# End Source File
# Begin Source File
+SOURCE=.\globals.c
+# End Source File
+# Begin Source File
+
SOURCE=..\main\internal_functions_win32.c
# End Source File
# Begin Source File
@@ -209,10 +213,6 @@ SOURCE=..\main\php_scandir.c
# End Source File
# Begin Source File
-SOURCE=..\main\php_sprintf.c
-# End Source File
-# Begin Source File
-
SOURCE=..\main\php_ticks.c
# End Source File
# Begin Source File
@@ -285,10 +285,6 @@ SOURCE=..\main\getopt.h
# End Source File
# Begin Source File
-SOURCE=..\main\internal_functions_registry.h
-# End Source File
-# Begin Source File
-
SOURCE=..\main\logos.h
# End Source File
# Begin Source File
@@ -1524,6 +1520,10 @@ SOURCE=..\ext\zlib\zlib.c
# End Source File
# Begin Source File
+SOURCE=..\ext\zlib\zlib_filter.c
+# End Source File
+# Begin Source File
+
SOURCE=..\ext\zlib\zlib_fopen_wrapper.c
# End Source File
# End Group
@@ -1704,10 +1704,6 @@ SOURCE=..\ext\standard\pageinfo.c
# End Source File
# Begin Source File
-SOURCE=..\ext\standard\parsedate.c
-# End Source File
-# Begin Source File
-
SOURCE=..\ext\standard\php_fopen_wrapper.c
# End Source File
# Begin Source File
@@ -2148,61 +2144,6 @@ SOURCE=.\winutil.h
# End Source File
# End Group
# End Group
-# Begin Group "Parsers"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\ext\standard\parsedate.y
-
-!IF "$(CFG)" == "php5dllts - Win32 Debug_TS"
-
-# Begin Custom Build - Generating ext/standard/parsedate.c
-InputPath=..\ext\standard\parsedate.y
-
-"..\ext\standard\parsedate.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- cd ..\ext\standard
- bison --output=parsedate.c -v -d parsedate.y
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "php5dllts - Win32 Release_TS"
-
-# Begin Custom Build - Generating ext/standard/parsedate.c
-InputPath=..\ext\standard\parsedate.y
-
-"..\ext\standard\parsedate.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- cd ..\ext\standard
- bison --output=parsedate.c -v -d parsedate.y
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "php5dllts - Win32 Release_TS_inline"
-
-# Begin Custom Build - Generating ext/standard/parsedate.c
-InputPath=..\ext\standard\parsedate.y
-
-"..\ext\standard\parsedate.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- cd ..\ext\standard
- bison --output=parsedate.c -v -d parsedate.y
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "php5dllts - Win32 Release_TSDbg"
-
-# Begin Custom Build - Generating ext/standard/parsedate.c
-InputPath=..\ext\standard\parsedate.y
-
-"..\ext\standard\parsedate.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- cd ..\ext\standard
- bison --output=parsedate.c -v -d parsedate.y
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
diff --git a/win32/php5dllts.rc2 b/win32/php5dllts.rc2
index b6c76d18a..2bf465d01 100644
--- a/win32/php5dllts.rc2
+++ b/win32/php5dllts.rc2
@@ -40,7 +40,7 @@ BEGIN
VALUE "FileDescription", "PHP Script Interpreter\0"
VALUE "FileVersion", STRVER4(PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION, PHP_RELEASE_VERSION)
VALUE "InternalName", "php\0"
- VALUE "LegalCopyright", "Copyright © 1997-2004 The PHP Group\0"
+ VALUE "LegalCopyright", "Copyright © 1997-2005 The PHP Group\0"
VALUE "LegalTrademarks", "php\0"
VALUE "OriginalFilename", "php5ts.dll\0"
VALUE "PrivateBuild", "\0"
diff --git a/win32/php5ts.dsw b/win32/php5ts.dsw
index 029923a11..61ccd1c24 100644
--- a/win32/php5ts.dsw
+++ b/win32/php5ts.dsw
@@ -57,21 +57,6 @@ Package=<4>
###############################################################################
-Project: "php5activescript"=..\SAPI\activescript\php5activescript.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name php5dllts
- End Project Dependency
-}}}
-
-###############################################################################
-
Project: "php5aolserver"=..\sapi\aolserver\php5aolserver.dsp - Package Owner=<4>
Package=<5>
diff --git a/win32/php5ts.rc2 b/win32/php5ts.rc2
index a708ac5ea..4c9710527 100644
--- a/win32/php5ts.rc2
+++ b/win32/php5ts.rc2
@@ -40,7 +40,7 @@ BEGIN
VALUE "FileDescription", "PHP Script Interpreter\0"
VALUE "FileVersion", STRVER4(PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION, PHP_RELEASE_VERSION)
VALUE "InternalName", "php-cgi\0"
- VALUE "LegalCopyright", "Copyright © 1997-2004 The PHP Group\0"
+ VALUE "LegalCopyright", "Copyright © 1997-2005 The PHP Group\0"
VALUE "LegalTrademarks", "php\0"
VALUE "OriginalFilename", "php.exe\0"
VALUE "PrivateBuild", "\0"
diff --git a/win32/php5ts_cli.rc2 b/win32/php5ts_cli.rc2
index 2f1d9e343..c2c410a7f 100644
--- a/win32/php5ts_cli.rc2
+++ b/win32/php5ts_cli.rc2
@@ -40,7 +40,7 @@ BEGIN
VALUE "FileDescription", "PHP Script Interpreter\0"
VALUE "FileVersion", STRVER4(PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION, PHP_RELEASE_VERSION)
VALUE "InternalName", "php-cli\0"
- VALUE "LegalCopyright", "Copyright © 1997-2004 The PHP Group\0"
+ VALUE "LegalCopyright", "Copyright © 1997-2005 The PHP Group\0"
VALUE "LegalTrademarks", "php\0"
VALUE "OriginalFilename", "php.exe\0"
VALUE "PrivateBuild", "\0"
diff --git a/win32/php_modules.dsw b/win32/php_modules.dsw
index 37b0af64e..81f22fa44 100644
--- a/win32/php_modules.dsw
+++ b/win32/php_modules.dsw
@@ -15,18 +15,6 @@ Package=<4>
###############################################################################
-Project: "cpdf"=..\ext\cpdf\cpdf.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
Project: "ctype"=..\ext\ctype\ctype.dsp - Package Owner=<4>
Package=<5>
@@ -375,18 +363,6 @@ Package=<4>
###############################################################################
-Project: "pdf"=..\ext\pdf\pdf.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
Project: "pgsql"=..\ext\pgsql\pgsql.dsp - Package Owner=<4>
Package=<5>
@@ -459,18 +435,6 @@ Package=<4>
###############################################################################
-Project: "w32api"=..\ext\w32api\w32api.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
Project: "xmlrpc"=..\ext\xmlrpc\xmlrpc.dsp - Package Owner=<4>
Package=<5>
@@ -495,18 +459,6 @@ Package=<4>
###############################################################################
-Project: "yaz"=..\ext\yaz\yaz.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
Global:
Package=<5>
diff --git a/win32/php_win32_globals.h b/win32/php_win32_globals.h
index ff9abb30c..1ebe357f9 100755
--- a/win32/php_win32_globals.h
+++ b/win32/php_win32_globals.h
@@ -1,58 +1,58 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: Wez Furlong <wez@php.net> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id: php_win32_globals.h,v 1.1.2.1 2004/07/30 14:24:59 wez Exp $ */
-
-#ifndef PHP_WIN32_GLOBALS_H
-#define PHP_WIN32_GLOBALS_H
-
-/* misc globals for thread-safety under win32 */
-
-#include "pwd.h"
-
-typedef struct _php_win32_core_globals php_win32_core_globals;
-
-#ifdef ZTS
-# define PW32G(v) TSRMG(php_win32_core_globals_id, php_win32_core_globals*, v)
-extern PHPAPI int php_win32_core_globals_id;
-#else
-# define PW32G(v) (php_win32_core_globals.v)
-extern PHPAPI struct _php_win32_core_globals php_win32_core_globals;
-#endif
-
-struct _php_win32_core_globals {
- /* syslog */
- char *log_header;
- HANDLE log_source;
-
- /* getpwuid */
- struct passwd pwd;
-
- /* getlogin */
- char *login_name;
-
- /* time */
- struct timeval starttime;
- __int64 lasttime, freq;
-};
-
-void php_win32_core_globals_ctor(void *vg TSRMLS_DC);
-PHP_RSHUTDOWN_FUNCTION(win32_core_globals);
-
-#endif
-
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2005 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.0 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_0.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: Wez Furlong <wez@php.net> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id: php_win32_globals.h,v 1.4 2005/08/03 14:08:57 sniper Exp $ */
+
+#ifndef PHP_WIN32_GLOBALS_H
+#define PHP_WIN32_GLOBALS_H
+
+/* misc globals for thread-safety under win32 */
+
+#include "pwd.h"
+
+typedef struct _php_win32_core_globals php_win32_core_globals;
+
+#ifdef ZTS
+# define PW32G(v) TSRMG(php_win32_core_globals_id, php_win32_core_globals*, v)
+extern PHPAPI int php_win32_core_globals_id;
+#else
+# define PW32G(v) (the_php_win32_core_globals.v)
+extern PHPAPI struct _php_win32_core_globals the_php_win32_core_globals;
+#endif
+
+struct _php_win32_core_globals {
+ /* syslog */
+ char *log_header;
+ HANDLE log_source;
+
+ /* getpwuid */
+ struct passwd pwd;
+
+ /* getlogin */
+ char *login_name;
+
+ /* time */
+ struct timeval starttime;
+ __int64 lasttime, freq;
+};
+
+void php_win32_core_globals_ctor(void *vg TSRMLS_DC);
+PHP_RSHUTDOWN_FUNCTION(win32_core_globals);
+
+#endif
+
diff --git a/win32/pwd.c b/win32/pwd.c
index 24ceb70e3..2b43e244f 100644
--- a/win32/pwd.c
+++ b/win32/pwd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pwd.c,v 1.9.2.2 2004/09/27 22:21:52 edink Exp $ */
+/* $Id: pwd.c,v 1.12 2005/08/03 14:08:57 sniper Exp $ */
#include "php.h" /*php specific */
#include <lmaccess.h>
diff --git a/win32/pwd.h b/win32/pwd.h
index 68fab897a..3264bf9c5 100644
--- a/win32/pwd.h
+++ b/win32/pwd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pwd.h,v 1.7 2004/01/08 17:33:28 sniper Exp $ */
+/* $Id: pwd.h,v 1.8 2005/08/03 14:08:57 sniper Exp $ */
#ifndef PWD_H
#define PWD_H
diff --git a/win32/select.c b/win32/select.c
index b99869c14..117d4aa56 100644
--- a/win32/select.c
+++ b/win32/select.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -21,7 +21,7 @@
#ifdef PHP_WIN32
-/* $Id: select.c,v 1.9 2004/01/08 08:18:21 andi Exp $ */
+/* $Id: select.c,v 1.10 2005/08/03 14:08:58 sniper Exp $ */
/* Win32 select() will only work with sockets, so we roll our own implementation here.
* - If you supply only sockets, this simply passes through to winsock select().
diff --git a/win32/select.h b/win32/select.h
index e027fecda..bcb8a9bc3 100644
--- a/win32/select.h
+++ b/win32/select.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: select.h,v 1.3 2004/01/08 17:33:28 sniper Exp $ */
+/* $Id: select.h,v 1.4 2005/08/03 14:08:58 sniper Exp $ */
PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tv);
diff --git a/win32/sendmail.c b/win32/sendmail.c
index 57677556b..a466a599a 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -17,7 +17,7 @@
*
*/
-/* $Id: sendmail.c,v 1.59.2.4 2005/07/28 08:57:37 hyanantha Exp $ */
+/* $Id: sendmail.c,v 1.65 2005/08/07 22:06:29 sniper Exp $ */
#include "php.h" /*php specific */
#include <stdio.h>
@@ -42,23 +42,15 @@
#include "ext/pcre/php_pcre.h"
#endif
-#include "ext/standard/php_string.h"
+#include "ext/standard/php_string.h"
+#include "ext/date/php_date.h"
-/*
- extern int _daylight;
- extern long _timezone;
- */
/*enum
{
DO_CONNECT = WM_USER +1
};
*/
-static char *days[] =
-{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
-static char *months[] =
-{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
-
/* '*error_message' has to be passed around from php_mail() */
#define SMTP_ERROR_RESPONSE_SPEC "SMTP server response: %s"
/* Convinient way to handle error messages from the SMTP server.
@@ -98,8 +90,6 @@ char *php_mailer = "PHP 4 WIN32";
char *php_mailer = "PHP 4 NetWare";
#endif /* NETWARE */
-char *get_header(char *h, char *headers);
-
/* Error messages */
static char *ErrorMessages[] =
{
@@ -180,7 +170,8 @@ static char *php_win32_mail_trim_header(char *header TSRMLS_DC)
replace,
0,
&result_len,
- -1 TSRMLS_CC);
+ -1,
+ NULL TSRMLS_CC);
if (NULL == result) {
FREE_ZVAL(replace);
return NULL;
@@ -193,7 +184,8 @@ static char *php_win32_mail_trim_header(char *header TSRMLS_DC)
replace,
0,
&result_len,
- -1 TSRMLS_CC);
+ -1,
+ NULL TSRMLS_CC);
efree(result);
FREE_ZVAL(replace);
return result2;
@@ -218,13 +210,12 @@ static char *php_win32_mail_trim_header(char *header TSRMLS_DC)
//********************************************************************/
PHPAPI int TSendMail(char *host, int *error, char **error_message,
char *headers, char *Subject, char *mailTo, char *data,
- char *mailCc, char *mailBcc, char *mailRPath)
+ char *mailCc, char *mailBcc, char *mailRPath TSRMLS_DC)
{
int ret;
char *RPath = NULL;
char *headers_lc = NULL; /* headers_lc is only created if we've a header at all */
char *pos1 = NULL, *pos2 = NULL;
- TSRMLS_FETCH();
#ifndef NETWARE
WinsockStarted = FALSE;
@@ -309,7 +300,7 @@ PHPAPI int TSendMail(char *host, int *error, char **error_message,
MailHost, !INI_INT("smtp_port") ? 25 : INI_INT("smtp_port"));
return FAILURE;
} else {
- ret = SendText(RPath, Subject, mailTo, mailCc, mailBcc, data, headers, headers_lc, error_message);
+ ret = SendText(RPath, Subject, mailTo, mailCc, mailBcc, data, headers, headers_lc, error_message TSRMLS_CC);
TSMClose();
if (RPath) {
efree(RPath);
@@ -386,8 +377,8 @@ PHPAPI char *GetSMErrorText(int index)
// Author/Date: jcar 20/9/96
// History:
//*******************************************************************/
-int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char *mailBcc, char *data,
- char *headers, char *headers_lc, char **error_message)
+static int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char *mailBcc, char *data,
+ char *headers, char *headers_lc, char **error_message TSRMLS_DC)
{
int res;
char *p;
@@ -607,9 +598,9 @@ int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char *mailB
/* send message header */
if (Subject == NULL) {
- res = PostHeader(RPath, "No Subject", mailTo, stripped_header);
+ res = PostHeader(RPath, "No Subject", mailTo, stripped_header TSRMLS_CC);
} else {
- res = PostHeader(RPath, Subject, mailTo, stripped_header);
+ res = PostHeader(RPath, Subject, mailTo, stripped_header TSRMLS_CC);
}
if (stripped_header) {
efree(stripped_header);
@@ -663,7 +654,8 @@ int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char *mailB
return (SUCCESS);
}
-int addToHeader(char **header_buffer, const char *specifier, char *string) {
+static int addToHeader(char **header_buffer, const char *specifier, char *string)
+{
if (NULL == (*header_buffer = erealloc(*header_buffer, strlen(*header_buffer) + strlen(specifier) + strlen(string) + 1))) {
return 0;
}
@@ -682,16 +674,12 @@ int addToHeader(char **header_buffer, const char *specifier, char *string) {
// Author/Date: jcar 20/9/96
// History:
//********************************************************************/
-int PostHeader(char *RPath, char *Subject, char *mailTo, char *xheaders)
+static int PostHeader(char *RPath, char *Subject, char *mailTo, char *xheaders TSRMLS_DC)
{
-
/* Print message header according to RFC 822 */
/* Return-path, Received, Date, From, Subject, Sender, To, cc */
- time_t tNow = time(NULL);
- struct tm *tm = localtime(&tNow);
- int zoneh = abs(_timezone);
- int zonem, res;
+ int res;
char *header_buffer;
char *headers_lc = NULL;
size_t i;
@@ -709,21 +697,13 @@ int PostHeader(char *RPath, char *Subject, char *mailTo, char *xheaders)
efree(headers_lc);
return OUT_OF_MEMORY;
}
- zoneh /= (60 * 60);
- zonem = (abs(_timezone) / 60) - (zoneh * 60);
- if(!xheaders || !strstr(headers_lc, "date:")){
- sprintf(header_buffer, "Date: %s, %02d %s %04d %02d:%02d:%02d %s%02d%02d\r\n",
- days[tm->tm_wday],
- tm->tm_mday,
- months[tm->tm_mon],
- tm->tm_year + 1900,
- tm->tm_hour,
- tm->tm_min,
- tm->tm_sec,
- (_timezone <= 0) ? "+" : (_timezone > 0) ? "-" : "",
- zoneh,
- zonem);
+ if (!xheaders || !strstr(headers_lc, "date:")) {
+ time_t tNow = time(NULL);
+ char *dt = php_format_date("r", 1, tNow, 1 TSRMLS_CC);
+
+ sprintf(header_buffer, "Date: %s\r\n", dt);
+ efree(dt);
}
if (!headers_lc || !strstr(headers_lc, "from:")) {
@@ -779,7 +759,7 @@ PostHeader_outofmem:
// Author/Date: jcar 20/9/96
// History:
//********************************************************************/
-int MailConnect()
+static int MailConnect()
{
int res;
@@ -820,10 +800,6 @@ int MailConnect()
}
-
-
-
-
/*********************************************************************
// Name: Post
// Input:
@@ -832,7 +808,7 @@ int MailConnect()
// Author/Date: jcar 20/9/96
// History:
//********************************************************************/
-int Post(LPCSTR msg)
+static int Post(LPCSTR msg)
{
int len = strlen(msg);
int slen;
@@ -859,7 +835,7 @@ int Post(LPCSTR msg)
// Author/Date: jcar 20/9/96
// History:
//********************************************************************/
-int Ack(char **server_response)
+static int Ack(char **server_response)
{
static char buf[MAIL_BUFFER_SIZE];
int rlen;
@@ -919,7 +895,7 @@ int Ack(char **server_response)
// Author/Date: jcar 20/9/96
// History:
//********************************************************************/
-unsigned long GetAddr(LPSTR szHost)
+static unsigned long GetAddr(LPSTR szHost)
{
LPHOSTENT lpstHost;
u_long lAddr = INADDR_ANY;
diff --git a/win32/sendmail.h b/win32/sendmail.h
index 28b5d7349..0ec916d6c 100644
--- a/win32/sendmail.h
+++ b/win32/sendmail.h
@@ -36,15 +36,15 @@
PHPAPI int TSendMail(char *smtpaddr, int *returnerror, char **error_message,
char *RPath, char *Subject, char *mailTo, char *data,
- char *mailCc, char *mailBcc, char *mailRPath);
+ char *mailCc, char *mailBcc, char *mailRPath TSRMLS_DC);
PHPAPI void TSMClose(void);
-int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char *mailBcc, char *data,
- char *headers, char *headers_lc, char **error_message);
+static int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char *mailBcc, char *data,
+ char *headers, char *headers_lc, char **error_message TSRMLS_DC);
PHPAPI char *GetSMErrorText(int index);
-int MailConnect();
-int PostHeader(char *, char *, char *, char *);
-int Post(LPCSTR msg);
-int Ack(char **server_response);
-unsigned long GetAddr(LPSTR szHost);
+static int MailConnect();
+static int PostHeader(char *RPath, char *Subject, char *mailTo, char *xheaders TSRMLS_DC);
+static int Post(LPCSTR msg);
+static int Ack(char **server_response);
+static unsigned long GetAddr(LPSTR szHost);
#endif /* sendmail_h */
diff --git a/win32/syslog.h b/win32/syslog.h
index 46119510a..a88c0ba13 100644
--- a/win32/syslog.h
+++ b/win32/syslog.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: syslog.h,v 1.9 2004/01/08 17:33:28 sniper Exp $ */
+/* $Id: syslog.h,v 1.10 2005/08/03 14:08:58 sniper Exp $ */
#ifndef SYSLOG_H
#define SYSLOG_H
diff --git a/win32/syslog.reg b/win32/syslog.reg
new file mode 100644
index 000000000..2baa88e36
--- /dev/null
+++ b/win32/syslog.reg
@@ -0,0 +1,5 @@
+REGEDIT4
+
+[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\PHP-5.1.0-dev]
+"TypesSupported"=dword:00000007
+"EventMessageFile"="C:\\php5\\php5ts.dll"
diff --git a/win32/time.c b/win32/time.c
index 325f65ed4..115353294 100644
--- a/win32/time.c
+++ b/win32/time.c
@@ -11,7 +11,7 @@
*
*****************************************************************************/
-/* $Id: time.c,v 1.9.2.1 2004/07/30 14:24:59 wez Exp $ */
+/* $Id: time.c,v 1.10 2004/07/29 02:59:43 wez Exp $ */
/**
*
diff --git a/win32/winutil.c b/win32/winutil.c
index c0569920d..73cb800b8 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: winutil.c,v 1.15 2004/01/08 08:18:21 andi Exp $ */
+/* $Id: winutil.c,v 1.16 2005/08/03 14:08:58 sniper Exp $ */
#include "php.h"
diff --git a/win32/winutil.h b/win32/winutil.h
index 8fb1ce3d4..51c9f67f4 100644
--- a/win32/winutil.h
+++ b/win32/winutil.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2004 The PHP Group |
+ | Copyright (c) 1997-2005 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/win32/wsyslog.c b/win32/wsyslog.c
index ca1e45b9c..294b3976c 100644
--- a/win32/wsyslog.c
+++ b/win32/wsyslog.c
@@ -57,6 +57,7 @@
#include <process.h>
#include "php_win32_globals.h"
+#include "wsyslog.h"
void closelog(void)
{
@@ -78,6 +79,7 @@ void syslog(int priority, const char *message, ...)
LPTSTR strs[2];
unsigned short etype;
char *tmp = NULL;
+ DWORD evid;
TSRMLS_FETCH();
/* default event source */
@@ -87,19 +89,22 @@ void syslog(int priority, const char *message, ...)
switch (priority) { /* translate UNIX type into NT type */
case LOG_ALERT:
etype = EVENTLOG_ERROR_TYPE;
+ evid = PHP_SYSLOG_ERROR_TYPE;
break;
case LOG_INFO:
etype = EVENTLOG_INFORMATION_TYPE;
+ evid = PHP_SYSLOG_INFO_TYPE;
break;
default:
etype = EVENTLOG_WARNING_TYPE;
+ evid = PHP_SYSLOG_WARNING_TYPE;
}
va_start(args, message); /* initialize vararg mechanism */
vspprintf(&tmp, 0, message, args); /* build message */
strs[0] = PW32G(log_header); /* write header */
strs[1] = tmp; /* then the message */
/* report the event */
- ReportEvent(PW32G(log_source), etype, (unsigned short) priority, 2000, NULL, 2, 0, strs, NULL);
+ ReportEvent(PW32G(log_source), etype, (unsigned short) priority, evid, NULL, 2, 0, strs, NULL);
va_end(args);
efree(tmp);
}
@@ -121,6 +126,6 @@ void openlog(const char *ident, int logopt, int facility)
STR_FREE(PW32G(log_header));
- PW32G(log_source) = RegisterEventSource(NULL, ident);
+ PW32G(log_source) = RegisterEventSource(NULL, "PHP-" PHP_VERSION);
spprintf(&PW32G(log_header), 0, (logopt & LOG_PID) ? "%s[%d]" : "%s", ident, getpid());
}