summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:34:37 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:34:37 -0400
commit10f5b47dc7c1cf2b9a00991629f43652710322d3 (patch)
tree3b727a16f652b8042d573e90f003868ffb3b56c7 /win32
parent0e920280a2e04b110827bb766b9f29e3d581c4ee (diff)
downloadphp-10f5b47dc7c1cf2b9a00991629f43652710322d3.tar.gz
Imported Upstream version 5.0.5upstream/5.0.5
Diffstat (limited to 'win32')
-rw-r--r--win32/build/Makefile39
-rw-r--r--win32/build/buildconf.js6
-rw-r--r--win32/build/config.w3242
-rw-r--r--win32/build/config.w32.h.in2
-rw-r--r--win32/build/confutils.js17
-rw-r--r--win32/build/mkdist.php2
-rw-r--r--win32/build/template.rc7
-rwxr-xr-xwin32/build/wsyslog.mc28
-rw-r--r--win32/sendmail.c25
-rw-r--r--win32/sendmail.h11
10 files changed, 115 insertions, 64 deletions
diff --git a/win32/build/Makefile b/win32/build/Makefile
index 4efb935b7..d98798a50 100644
--- a/win32/build/Makefile
+++ b/win32/build/Makefile
@@ -14,19 +14,24 @@
# | Author: Wez Furlong <wez@thebrainroom.com> |
# +----------------------------------------------------------------------+
#
-# $Id: Makefile,v 1.23.2.4 2005/02/26 01:10:50 edink Exp $
+# $Id: Makefile,v 1.23.2.6 2005/08/01 20:43:04 edink Exp $
# This is the makefile template for the win32 build
CC="$(CL)"
LD="$(LINK)"
+MC="$(MC)"
-all: $(BUILD_DIR) $(BUILD_DIRS_SUB) generated_files $(EXT_TARGETS) $(PECL_TARGETS) $(SAPI_TARGETS)
+MCFILE=$(BUILD_DIR)\wsyslog.rc
-generated_files: Zend\zend_ini_parser.c \
+all: generated_files $(EXT_TARGETS) $(PECL_TARGETS) $(SAPI_TARGETS)
+
+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)
+ $(PHPDEF) $(MCFILE)
$(BUILD_DIR)\$(PHPDLL).def: $(PHP_DLL_DEF_SOURCES)
type $(PHP_DLL_DEF_SOURCES) > $(BUILD_DIR)\$(PHPDLL).def
@@ -48,13 +53,19 @@ ext\standard\parsedate.c ext\standard\parsedate.h: ext\standard\parsedate.y
PHPDLL_RES=$(BUILD_DIR)\$(PHPDLL).res
+$(MCFILE): win32\build\wsyslog.mc
+ $(MC) -h win32\ -r $(BUILD_DIR)\ -x $(BUILD_DIR)\ win32\build\wsyslog.mc
+
+# $(RC) /fo $(MCFILE) $(BUILD_DIR)\wsyslog.rc
+
$(PHPDLL_RES): win32\build\template.rc
$(RC) /fo $(PHPDLL_RES) /d FILE_DESCRIPTION="\"PHP Script Interpreter\"" \
/d FILE_NAME="\"$(PHPDLL)\"" /d PRODUCT_NAME="\"PHP Script Interpreter\"" \
- win32\build\template.rc
+ /I$(BUILD_DIR) /d MC_INCLUDE="\"$(MCFILE)\"" \
+ win32\build\template.rc
-$(BUILD_DIR)\$(PHPDLL): generated_files $(PHPDEF) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(PHPDLL_RES)
- $(LD) /out:$(BUILD_DIR)\$(PHPDLL) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES)
+$(BUILD_DIR)\$(PHPDLL): generated_files $(PHPDEF) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(PHPDLL_RES) $(MCFILE)
+ @$(LD) /out:$(BUILD_DIR)\$(PHPDLL) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES)
$(BUILD_DIR)\$(PHPLIB): $(BUILD_DIR)\$(PHPDLL)
@@ -86,7 +97,7 @@ set TEST_PHP_EXECUTABLE=$(BUILD_DIR)\php.exe
$(BUILD_DIR)\php.exe -d open_basedir= -d safe_mode=0 -d output_buffering=0 run-tests.php $(TESTS)
<<NOKEEP
-build-snap:
+build-snap: generated_files
@$(MAKE) "$(BUILD_DIR)\$(PHPDLL)"
-for %T in ($(SAPI_TARGETS)) do $(MAKE) /I /nologo "%T"
-for %T in ($(EXT_TARGETS)) do $(MAKE) /I /nologo "%T"
@@ -118,8 +129,16 @@ $(BUILD_DIR)\deplister.exe: win32\build\deplister.c
msi-installer: dist
$(BUILD_DIR)\php.exe ..\php-installer\build-installer.php "$(BUILD_DIR)" "$(PHPDLL)" "$(SAPI_TARGETS)" "$(EXT_TARGETS)" "$(PECL_TARGETS)"
-install: all
+# need to redirect, since INSTALL is a file in the root...
+install: really-install
+
+really-install:
@if not exist $(PHP_PREFIX) mkdir $(PHP_PREFIX)
+ @echo Installing files under $(PHP_PREFIX)
@copy $(BUILD_DIR)\*.exe $(PHP_PREFIX) /y >nul
@copy $(BUILD_DIR)\*.dll $(PHP_PREFIX) /y >nul
-
+ @echo Registering event source with syslog (requires admin rights)
+ @echo It's okay for this step to fail:
+ -$(PHP_PREFIX)\php.exe -n -dextension_dir=$(PHP_PREFIX) win32/build/registersyslog.php $(PHP_PREFIX)\$(PHPDLL)
+
+
diff --git a/win32/build/buildconf.js b/win32/build/buildconf.js
index 3a9f17715..71c80a559 100644
--- a/win32/build/buildconf.js
+++ b/win32/build/buildconf.js
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: buildconf.js,v 1.11 2004/02/12 12:30:41 wez Exp $ */
+/* $Id: buildconf.js,v 1.11.2.1 2005/07/22 18:09:33 wez Exp $ */
// This generates a configure script for win32 build
WScript.StdOut.WriteLine("Rebuilding configure.js");
@@ -209,7 +209,11 @@ re = new RegExp("(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");
calls = modules.match(re);
for (i = 0; i < calls.length; i++) {
item = calls[i];
+ C.WriteLine("try {");
C.WriteLine(item);
+ C.WriteLine("} catch (e) {");
+ C.WriteLine('\tSTDOUT.WriteLine("problem: " + e);');
+ C.WriteLine("}");
}
C.WriteBlankLines(1);
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index ce56f3ac0..ca0fc323c 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -1,22 +1,42 @@
// vim:ft=javascript
-// $Id: config.w32,v 1.26.2.8 2005/02/25 23:00:17 edink Exp $
+// $Id: config.w32,v 1.26.2.9 2005/07/22 18:09:33 wez 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');
-PATH_PROG('link');
+
+// 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"));
+
PATH_PROG('nmake');
+
// we don't want to define LIB, as that will override the default library path
// that is set in that env var
PATH_PROG('lib', null, 'MAKE_LIB');
-PATH_PROG('bison');
-PATH_PROG('flex');
+if (!PATH_PROG('bison')) {
+ ERROR('bison is required')
+}
+if (!PATH_PROG('flex')) {
+ ERROR('flex is required')
+}
PATH_PROG('re2c');
PATH_PROG('zip');
PATH_PROG('lemon');
+// avoid picking up midnight commander from cygwin
+PATH_PROG('mc', WshShell.Environment("Process").Item("PATH"));
+
+// stick objects somewhere outside of the source tree
+ARG_ENABLE('object-out-dir', 'Alternate location for binary objects during build', '');
+if (PHP_OBJECT_OUT_DIR.length) {
+ if (!FSO.FolderExists(PHP_OBJECT_OUT_DIR)) {
+ ERROR('you chosen output directory ' + PHP_OBJECT_OUT_DIR + ' does not exist');
+ }
+ PHP_OBJECT_OUT_DIR += '\\';
+}
+
ARG_ENABLE('debug', 'Compile with debugging symbols', "no");
ARG_ENABLE('debug-pack', 'Release binaries with external debug symbols (--enable-debug must not be specified)', 'no');
if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") {
@@ -87,19 +107,19 @@ ADD_FLAG("PHP_LDFLAGS", "/nodefaultlib:libcmt");
// set up the build dir and DLL name
if (PHP_DEBUG == "yes" && PHP_ZTS == "yes") {
- DEFINE("BUILD_DIR", "Debug_TS");
+ DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Debug_TS");
DEFINE("PHPDLL", "php5ts_debug.dll");
DEFINE("PHPLIB", "php5ts_debug.lib");
} else if (PHP_DEBUG == "yes" && PHP_ZTS == "no") {
- DEFINE("BUILD_DIR", "Debug");
+ DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Debug");
DEFINE("PHPDLL", "php5_debug.dll");
DEFINE("PHPLIB", "php5_debug.lib");
} else if (PHP_DEBUG == "no" && PHP_ZTS == "yes") {
- DEFINE("BUILD_DIR", "Release_TS");
+ DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Release_TS");
DEFINE("PHPDLL", "php5ts.dll");
DEFINE("PHPLIB", "php5ts.lib");
} else if (PHP_DEBUG == "no" && PHP_ZTS == "no") {
- DEFINE("BUILD_DIR", "Release");
+ DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Release");
DEFINE("PHPDLL", "php5.dll");
DEFINE("PHPLIB", "php5.lib");
}
@@ -228,9 +248,11 @@ ARG_ENABLE('fd-setsize', "Set maximum number of sockets for select(2)", "256");
ADD_FLAG("CFLAGS", "/D FD_SETSIZE=" + parseInt(PHP_FD_SETSIZE));
ARG_ENABLE("memory-limit", "Enable memory limit checking code", "no");
-
AC_DEFINE('MEMORY_LIMIT', PHP_MEMORY_LIMIT == "yes" ? 1 : 0);
+ARG_ENABLE("memory-manager", "Enable Zend memory manager", "yes");
+AC_DEFINE('USE_ZEND_ALLOC', PHP_MEMORY_MANAGER == "yes" ? 1 : 0);
+
ARG_ENABLE("zend-multibyte", "Enable Zend multibyte encoding support", "no");
if (PHP_ZEND_MULTIBYTE == "yes") {
STDOUT.WriteLine("Enabling Zend multibyte encoding support");
diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in
index f13518c58..0ae6e50eb 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 2004/04/29 00:17:09 wez Exp $
+ $Id: config.w32.h.in,v 1.5.2.1 2005/07/22 18:09:33 wez Exp $
*/
/* Default PHP / PEAR directories */
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index f06092211..025816497 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-// $Id: confutils.js,v 1.42.2.3 2005/02/26 01:10:50 edink Exp $
+// $Id: confutils.js,v 1.42.2.4 2005/07/22 18:09:33 wez 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'
+ 'zend-multibyte', 'fd-setsize', 'memory-manager'
);
var force;
@@ -815,10 +815,15 @@ function CHECK_HEADER_ADD_INCLUDE(header_name, flag_name, path_to_check, use_env
sym = header_name.toUpperCase();
sym = sym.replace(new RegExp("[\\\\/\.-]", "g"), "_");
+ if (typeof(add_to_flag_only) == "undefined" &&
+ flag_name.match(new RegExp("^CFLAGS_(.*)$"))) {
+ add_to_flag_only = true;
+ }
+
if (typeof(add_to_flag_only) != "undefined") {
ADD_FLAG(flag_name, "/DHAVE_" + sym + "=" + have);
} else {
- AC_DEFINE("HAVE_" + sym, have);
+ AC_DEFINE("HAVE_" + sym, have, "have the " + header_name + " header file");
}
return p;
@@ -871,7 +876,7 @@ function SAPI(sapiname, file_list, makefiletarget, cflags)
var SAPI = sapiname.toUpperCase();
var ldflags;
var resname;
- var ld = "$(LD)";
+ var ld = "@$(LD)";
STDOUT.WriteLine("Enabling SAPI " + configure_module_dirname);
@@ -1020,7 +1025,7 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
var libname = dllname.substring(0, dllname.length-4) + ".lib";
var resname = generate_version_info_resource(dllname, configure_module_dirname);
- var ld = "$(LD)";
+ var ld = "@$(LD)";
MFO.WriteLine("$(BUILD_DIR)\\" + dllname + " $(BUILD_DIR)\\" + libname + ": $(DEPS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\" + resname);
MFO.WriteLine("\t" + ld + " /out:$(BUILD_DIR)\\" + dllname + " $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_" + EXT + ") $(" + EXT + "_GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_" + EXT + ") $(LIBS) $(BUILD_DIR)\\" + resname);
@@ -1140,7 +1145,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
}
} else {
MFO.WriteLine(sub_build + obj + ": " + dir + "\\" + src);
- MFO.WriteLine("\t$(CC) $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") /c " + dir + "\\" + src + " /Fo" + sub_build + obj);
+ MFO.WriteLine("\t@$(CC) $(" + flags + ") $(CFLAGS) $(" + bd_flags_name + ") /c " + dir + "\\" + src + " /Fo" + sub_build + obj);
}
}
diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php
index 21f4e6c5e..bfcaf9493 100644
--- a/win32/build/mkdist.php
+++ b/win32/build/mkdist.php
@@ -1,4 +1,4 @@
-<?php # $Id: mkdist.php,v 1.10.2.1 2005/02/26 00:38:27 edink Exp $
+<?php # $Id: mkdist.php,v 1.10.2.2 2005/07/22 18:09:33 wez Exp $
/* piece together a windows binary distro */
$build_dir = $argv[1];
diff --git a/win32/build/template.rc b/win32/build/template.rc
index 6230e7390..914c07df8 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 2004/01/08 10:58:27 wez Exp $
+ * $Id: template.rc,v 1.5.2.1 2005/07/22 18:09:34 wez Exp $
* Do not edit with MSVC */
#ifdef APSTUDIO_INVOKED
# error dont edit with MSVC
@@ -62,3 +62,8 @@ BEGIN
VALUE "Translation", 0x409, 1200
END
END
+
+#ifdef MC_INCLUDE
+#include MC_INCLUDE
+#endif
+
diff --git a/win32/build/wsyslog.mc b/win32/build/wsyslog.mc
new file mode 100755
index 000000000..01d4d3a86
--- /dev/null
+++ b/win32/build/wsyslog.mc
@@ -0,0 +1,28 @@
+MessageId=1
+Severity=Success
+SymbolicName=PHP_SYSLOG_SUCCESS_TYPE
+Language=English
+%1 %2
+.
+
+MessageId=2
+Severity=Informational
+SymbolicName=PHP_SYSLOG_INFO_TYPE
+Language=English
+%1 %2
+.
+
+MessageId=3
+Severity=Warning
+SymbolicName=PHP_SYSLOG_WARNING_TYPE
+Language=English
+%1 %2
+.
+
+MessageId=4
+Severity=Error
+SymbolicName=PHP_SYSLOG_ERROR_TYPE
+Language=English
+%1 %2
+.
+
diff --git a/win32/sendmail.c b/win32/sendmail.c
index d0faf17bd..57677556b 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -17,7 +17,7 @@
*
*/
-/* $Id: sendmail.c,v 1.59.2.3 2005/03/11 10:48:06 hyanantha Exp $ */
+/* $Id: sendmail.c,v 1.59.2.4 2005/07/28 08:57:37 hyanantha Exp $ */
#include "php.h" /*php specific */
#include <stdio.h>
@@ -83,13 +83,11 @@ SOCKET sc;
#ifndef NETWARE
WSADATA Data;
struct hostent *adr;
-#endif /* NETWARE */
-SOCKADDR_IN sock_in;
-#ifndef NETWARE
int WinsockStarted;
/* values set by the constructor */
char *AppName;
#endif /* NETWARE */
+SOCKADDR_IN sock_in;
char MailHost[HOST_NAME_LEN];
char LocalHost[HOST_NAME_LEN];
#endif
@@ -346,14 +344,7 @@ PHPAPI void TSMClose()
*/
shutdown(sc, 0);
-#ifndef NETWARE
closesocket(sc);
-#else
- /* closesocket commented out since it was giving undefined symbol linker error
- * close added in its place
- */
- close(sc);
-#endif /* NETWARE */
}
@@ -841,11 +832,7 @@ int MailConnect()
// Author/Date: jcar 20/9/96
// History:
//********************************************************************/
-#ifndef NETWARE
int Post(LPCSTR msg)
-#else
-int Post(char *msg)
-#endif
{
int len = strlen(msg);
int slen;
@@ -932,11 +919,7 @@ int Ack(char **server_response)
// Author/Date: jcar 20/9/96
// History:
//********************************************************************/
-#ifndef NETWARE
unsigned long GetAddr(LPSTR szHost)
-#else
-unsigned long GetAddr(char * szHost)
-#endif
{
LPHOSTENT lpstHost;
u_long lAddr = INADDR_ANY;
@@ -952,11 +935,7 @@ unsigned long GetAddr(char * szHost)
lpstHost = gethostbyname(szHost);
if (lpstHost) { /* success */
-#ifndef NETWARE
lAddr = *((u_long FAR *) (lpstHost->h_addr));
-#else
- lAddr = *((u_long *) (lpstHost->h_addr));
-#endif /* NETWARE */
} else {
lAddr = INADDR_ANY; /* failure */
}
diff --git a/win32/sendmail.h b/win32/sendmail.h
index 3f3539e24..28b5d7349 100644
--- a/win32/sendmail.h
+++ b/win32/sendmail.h
@@ -44,18 +44,7 @@ PHPAPI char *GetSMErrorText(int index);
int MailConnect();
int PostHeader(char *, char *, char *, char *);
-#ifndef NETWARE
int Post(LPCSTR msg);
-#else
-int Post(char *msg);
-#endif
int Ack(char **server_response);
-#ifndef NETWARE
unsigned long GetAddr(LPSTR szHost);
-#else
-unsigned long GetAddr(char * szHost);
-#endif
-
-
-
#endif /* sendmail_h */