summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2008-12-03 20:30:45 +0000
committerSVN Migration <svn@php.net>2008-12-03 20:30:45 +0000
commit2876046398950e59c3b3c460e67e6fec7ff2ba3c (patch)
tree33b2b8b4b859960a6446ad19d0ada1c55f9cfcda /win32
parent3fb86b0b9e79e6a3312b694f30ee627e2e1b325c (diff)
downloadphp-git-php-5.3.0alpha2.tar.gz
This commit was manufactured by cvs2svn to create tag 'php_5_3_0alpha2'.php-5.3.0alpha2
Diffstat (limited to 'win32')
-rw-r--r--win32/build/Makefile17
-rw-r--r--win32/build/config.w3211
-rw-r--r--win32/build/config.w32.h.in1
-rw-r--r--win32/build/confutils.js15
-rw-r--r--win32/build/mkdist.php53
-rwxr-xr-xwin32/build/registersyslog.php1
-rw-r--r--win32/build/template.rc2
-rw-r--r--win32/inet.c5
-rw-r--r--win32/php5dll.dsp4
-rw-r--r--win32/php5dllts.dsp4
-rw-r--r--win32/php5ts_cli.rc22
-rw-r--r--win32/php_strtoi64.h7
-rw-r--r--win32/strtoi64.c122
13 files changed, 24 insertions, 220 deletions
diff --git a/win32/build/Makefile b/win32/build/Makefile
index fd8ff43b8a..729fc25db6 100644
--- a/win32/build/Makefile
+++ b/win32/build/Makefile
@@ -22,7 +22,6 @@ LD="$(LINK)"
MC="$(MC)"
MT="$(MT)"
RE2C="$(RE2C)"
-PHP_BUILD=$(PHP_BUILD)
MCFILE=$(BUILD_DIR)\wsyslog.rc
@@ -119,7 +118,6 @@ $(BUILD_DIR)\php.exe -d open_basedir= -d safe_mode=0 -d output_buffering=0 run-t
<<NOKEEP
build-snap: generated_files
- SET PATH=$(PATH);$(PHP_BUILD)\bin
@$(MAKE) "$(BUILD_DIR)\$(PHPDLL)"
-for %T in ($(SAPI_TARGETS)) do $(MAKE) /I /nologo "%T"
-for %T in ($(EXT_TARGETS)) do $(MAKE) /I /nologo "%T"
@@ -128,21 +126,18 @@ build-snap: generated_files
build-dist: $(BUILD_DIR)\deplister.exe
-rd /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
-rd /s /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
- -del /f /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
- -del /f /q $(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
- -del /f /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
+ -del /f /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)-Win32.zip
+ -del /f /q $(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRING)-Win32.zip
+ -del /f /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)-Win32.zip
$(BUILD_DIR)\php.exe -n win32/build/mkdist.php "$(BUILD_DIR)" "$(PHPDLL)" "$(SAPI_TARGETS)" "$(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES)" "$(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES)" "$(SNAPSHOT_TEMPLATE)"
cd $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
- -$(ZIP) -9 -q -r ..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip .
+ -$(ZIP) -9 -r ..\php-$(PHP_VERSION_STRING)-Win32.zip .
cd ..\..
cd $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
- -$(ZIP) -9 -q -r ..\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip .
- cd ..\..
- cd $(BUILD_DIR)\php-test-pack-$(PHP_VERSION_STRING)
- -$(ZIP) -9 -q -r ..\php-test-pack-$(PHP_VERSION_STRING).zip .
+ -$(ZIP) -9 -r ..\pecl-$(PHP_VERSION_STRING)-Win32.zip .
cd ..\..
cd $(BUILD_DIR)
- -$(ZIP) -9 -q php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip *.pdb
+ -$(ZIP) -9 php-debug-pack-$(PHP_VERSION_STRING)-Win32.zip *.pdb
cd ..\..
dist: all build-dist
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index 591f11cc49..54b940049c 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -19,7 +19,6 @@ if (!CL) {
VCVERS = probe_binary(CL).substr(0, 5).replace('.', '');
STDOUT.WriteLine(" Detected compiler " + VC_VERSIONS[VCVERS]);
AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version");
-DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
// do we use x64 or 80x86 version of compiler?
X64 = probe_binary(CL, 64);
@@ -29,7 +28,6 @@ if (X64) {
STDOUT.WriteLine(" Detected 32-bit compiler");
}
AC_DEFINE('ARCHITECTURE', X64 ? 'x64' : 'x86', "Detected compiler architecture");
-DEFINE("PHP_ARCHITECTURE", X64 ? 'x64' : 'x86');
// cygwin now ships with link.exe. Avoid searching the cygwin path
// for this, as we want the MS linker, not the fileutil
@@ -184,9 +182,6 @@ if (PHP_ZTS == "yes") {
ADD_FLAG("CFLAGS", "/D ZTS=1");
}
-DEFINE("PHP_ZTS_ARCHIVE_POSTFIX", PHP_ZTS == "yes" ? '' : "-nts");
-
-
// we want msvcrt in the PHP DLL
ADD_FLAG("PHP_LDFLAGS", "/nodefaultlib:libcmt");
@@ -236,7 +231,6 @@ if (PHP_PHP_BUILD == 'no') {
}
}
}
-DEFINE("PHP_BUILD", PHP_PHP_BUILD);
ARG_WITH('extra-includes', 'Extra include path to use when building everything', '');
ARG_WITH('extra-libs', 'Extra library path to use when linking everything', '');
@@ -311,11 +305,6 @@ ADD_SOURCES("main", "main.c snprintf.c spprintf.c safe_mode.c getopt.c fopen_wra
php_open_temporary_file.c php_logos.c output.c internal_functions.c php_sprintf.c");
ADD_SOURCES("win32", "inet.c");
-// Newer versions have it
-if (VCVERS <= 1300) {
- ADD_SOURCES("win32", "strtoi64.c");
-}
-
ADD_SOURCES("main/streams", "streams.c cast.c memory.c filter.c plain_wrapper.c \
userspace.c transports.c xp_socket.c mmap.c glob_wrapper.c");
diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in
index 820fe3fe8f..d12599d77f 100644
--- a/win32/build/config.w32.h.in
+++ b/win32/build/config.w32.h.in
@@ -159,3 +159,4 @@
# define _USE_32BIT_TIME_T 1
#endif
#define HAVE_STDLIB_H 1
+
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index b782751d78..7c7b9eb98a 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-// $Id: confutils.js,v 1.60.2.1.2.8.2.31 2008-11-21 14:17:33 pajoye Exp $
+// $Id: confutils.js,v 1.60.2.1.2.8.2.29 2008-07-25 12:40:45 pajoye Exp $
var STDOUT = WScript.StdOut;
var STDERR = WScript.StdErr;
@@ -42,13 +42,6 @@ VC_VERSIONS[1310] = 'MSVC7.1 (Visual C++ 2003)';
VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)';
VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)';
-var VC_VERSIONS_SHORT = new Array();
-VC_VERSIONS_SHORT[1200] = 'VC6';
-VC_VERSIONS_SHORT[1300] = 'VC7';
-VC_VERSIONS_SHORT[1310] = 'VC7.1';
-VC_VERSIONS_SHORT[1400] = 'VC8';
-VC_VERSIONS_SHORT[1500] = 'VC9';
-
if (PROGRAM_FILES == null) {
PROGRAM_FILES = "C:\\Program Files";
}
@@ -1481,10 +1474,8 @@ function write_summary()
output_as_table(["Sapi Name"], sapi_enabled);
STDOUT.WriteBlankLines(2);
- ar[0] = ['Build type', PHP_DEBUG == "yes" ? "Debug" : "Release"];
- ar[1] = ['Thread Safety', PHP_ZTS == "yes" ? "Yes" : "No"];
- ar[2] = ['Compiler', VC_VERSIONS[VCVERS]];
- ar[3] = ['Architecture', X64 ? 'x64' : 'x86'];
+ ar[0] = ['Compiler', VC_VERSIONS[VCVERS]];
+ ar[1] = ['Architecture', X64 ? 'x64' : 'x86'];
output_as_table(["",""], ar);
STDOUT.WriteBlankLines(2);
diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php
index 1d63db40e7..ad719e494b 100644
--- a/win32/build/mkdist.php
+++ b/win32/build/mkdist.php
@@ -13,7 +13,6 @@ $is_debug = preg_match("/^debug/i", $build_dir);
echo "Making dist for $build_dir\n";
$dist_dir = $build_dir . "/php-" . phpversion();
-$test_dir = $build_dir . "/php-test-pack-" . phpversion();
$pecl_dir = $build_dir . "/pecl-" . phpversion();
@mkdir($dist_dir);
@@ -347,58 +346,6 @@ function copy_dir($source, $dest)
closedir($d);
}
-
-
-function copy_test_dir($directory, $dest)
-{
- if(substr($directory,-1) == '/') {
- $directory = substr($directory,0,-1);
- }
-
- if ($directory == 'tests') {
- mkdir($dest . '/tests', 0775, true);
- copy_dir($directory, $dest . '/tests/');
-
- return false;
- }
-
- if(!file_exists($directory) || !is_dir($directory)) {
- echo "failed... $directory\n";
- return FALSE;
- }
-
- $directory_list = opendir($directory);
-
- while (FALSE !== ($file = readdir($directory_list))) {
- $full_path = $directory . '/' . $file;
- if($file != '.' && $file != '..' && $file != 'CVS' && is_dir($full_path)) {
- if ($file == 'tests') {
- mkdir($dest . '/' . $full_path , 0775, true);
- copy_dir($full_path, $dest . '/' . $full_path . '/');
- continue;
- } else {
- copy_test_dir($full_path, $dest);
- }
- }
- }
-
- closedir($directory_list);
-}
-
-if (!is_dir($test_dir)) {
- mkdir($test_dir);
-}
-
-$dirs = array(
- 'ext',
- 'Sapi',
- 'Zend',
- 'tests'
-);
-foreach ($dirs as $dir) {
- copy_test_dir($dir, $test_dir);
-}
-
/* change this next line to true to use good-old
* hand-assembled go-pear-bundle from the snapshot template */
$use_pear_template = true;
diff --git a/win32/build/registersyslog.php b/win32/build/registersyslog.php
index e5aa1d92c0..db5f459f73 100755
--- a/win32/build/registersyslog.php
+++ b/win32/build/registersyslog.php
@@ -20,6 +20,7 @@ if (extension_loaded("win32std")) {
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";
diff --git a/win32/build/template.rc b/win32/build/template.rc
index 1cd5cb7d93..fbeae42b6a 100644
--- a/win32/build/template.rc
+++ b/win32/build/template.rc
@@ -5,7 +5,7 @@
# error dont edit with MSVC
#endif
-#include "winresrc.h"
+#include "winres.h"
#include "main/php_version.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
diff --git a/win32/inet.c b/win32/inet.c
index b794bcaeb4..02d00ca474 100644
--- a/win32/inet.c
+++ b/win32/inet.c
@@ -1,5 +1,5 @@
#include "config.w32.h"
-#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */
+#if (_WIN32_WINNT < 0x0600) /* Vita/2k8 have these functions */
#include "php.h"
#include <winsock2.h>
#include <windows.h>
@@ -7,7 +7,8 @@
#include "inet.h"
-PHPAPI int inet_pton(int af, const char* src, void* dst)
+PHPAPI int
+inet_pton(int af, const char* src, void* dst)
{
int address_length;
struct sockaddr_storage sa;
diff --git a/win32/php5dll.dsp b/win32/php5dll.dsp
index b0a26bcfc6..24e4227a04 100644
--- a/win32/php5dll.dsp
+++ b/win32/php5dll.dsp
@@ -1576,6 +1576,10 @@ SOURCE=..\win32\wfile.c
# End Source File
# Begin Source File
+SOURCE=..\ext\snmp\winsnmp.c
+# End Source File
+# Begin Source File
+
SOURCE=..\win32\winutil.c
# End Source File
# Begin Source File
diff --git a/win32/php5dllts.dsp b/win32/php5dllts.dsp
index 0faddf954d..d9bf1882a1 100644
--- a/win32/php5dllts.dsp
+++ b/win32/php5dllts.dsp
@@ -2415,6 +2415,10 @@ SOURCE=..\win32\wfile.c
# End Source File
# Begin Source File
+SOURCE=..\ext\snmp\winsnmp.c
+# End Source File
+# Begin Source File
+
SOURCE=..\win32\winutil.c
# End Source File
# Begin Source File
diff --git a/win32/php5ts_cli.rc2 b/win32/php5ts_cli.rc2
index 517bd4ab34..ef51813a42 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-2006 The PHP Group\0"
+ VALUE "LegalCopyright", "Copyright © 1997-2007 The PHP Group\0"
VALUE "LegalTrademarks", "php\0"
VALUE "OriginalFilename", "php.exe\0"
VALUE "PrivateBuild", "\0"
diff --git a/win32/php_strtoi64.h b/win32/php_strtoi64.h
deleted file mode 100644
index 633ecb1059..0000000000
--- a/win32/php_strtoi64.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#if _MSC_VERS <= 1300
-#include "php.h"
-#include "php_stdint.h"
-
-PHPAPI int64_t _strtoi64(const char *nptr, char **endptr, int base);
-#define _strtoui64 _strtoi64
-#endif
diff --git a/win32/strtoi64.c b/win32/strtoi64.c
deleted file mode 100644
index 689cc0984b..0000000000
--- a/win32/strtoi64.c
+++ /dev/null
@@ -1,122 +0,0 @@
-#if _MSC_VERS <= 1300
-#include "php_strtoi64.h"
-/*
- From APR, apr_strings.c
- See http://www.apache.org/licenses/LICENSE-2.0
-*/
-
-PHPAPI int64_t _strtoi64(const char *nptr, char **endptr, int base)
-{
- const char *s;
- int64_t acc;
- int64_t val;
- int neg, any;
- char c;
-
- /*
- * Skip white space and pick up leading +/- sign if any.
- * If base is 0, allow 0x for hex and 0 for octal, else
- * assume decimal; if base is already 16, allow 0x.
- */
- s = nptr;
- do {
- c = *s++;
- } while (isspace((unsigned char)c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else {
- neg = 0;
- if (c == '+') {
- c = *s++;
- }
- }
-
- if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0) {
- base = c == '0' ? 8 : 10;
- }
- acc = any = 0;
- if (base < 2 || base > 36) {
- errno = EINVAL;
- if (endptr != NULL) {
- *endptr = (char *)(any ? s - 1 : nptr);
- }
- return acc;
- }
-
- /* The classic bsd implementation requires div/mod operators
- * to compute a cutoff. Benchmarking proves that iss very, very
- * evil to some 32 bit processors. Instead, look for underflow
- * in both the mult and add/sub operation. Unlike the bsd impl,
- * we also work strictly in a signed int64 word as we haven't
- * implemented the unsigned type in win32.
- *
- * Set 'any' if any `digits' consumed; make it negative to indicate
- * overflow.
- */
- val = 0;
- for ( ; ; c = *s++) {
- if (c >= '0' && c <= '9')
- c -= '0';
-
-#if (('Z' - 'A') == 25)
- else if (c >= 'A' && c <= 'Z')
- c -= 'A' - 10;
- else if (c >= 'a' && c <= 'z')
- c -= 'a' - 10;
-#elif APR_CHARSET_EBCDIC
- else if (c >= 'A' && c <= 'I')
- c -= 'A' - 10;
- else if (c >= 'J' && c <= 'R')
- c -= 'J' - 19;
- else if (c >= 'S' && c <= 'Z')
- c -= 'S' - 28;
- else if (c >= 'a' && c <= 'i')
- c -= 'a' - 10;
- else if (c >= 'j' && c <= 'r')
- c -= 'j' - 19;
- else if (c >= 's' && c <= 'z')
- c -= 'z' - 28;
-#else
-# error "CANNOT COMPILE apr_strtoi64(), only ASCII and EBCDIC supported"
-#endif
- else {
- break;
- }
-
- if (c >= base) {
- break;
- }
-
- val *= base;
- if ( (any < 0) /* already noted an over/under flow - short circuit */
- || (neg && (val > acc || (val -= c) > acc)) /* underflow */
- || (val < acc || (val += c) < acc)) { /* overflow */
- any = -1; /* once noted, over/underflows never go away */
-#ifdef APR_STRTOI64_OVERFLOW_IS_BAD_CHAR
- break;
-#endif
- } else {
- acc = val;
- any = 1;
- }
- }
-
- if (any < 0) {
- acc = neg ? INT64_MIN : INT64_MAX;
- errno = ERANGE;
- } else if (!any) {
- errno = EINVAL;
- }
-
- if (endptr != NULL) {
- *endptr = (char *)(any ? s - 1 : nptr);
- }
- return (acc);
-}
-#endif