summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-16 11:16:11 +0200
committerAnatol Belski <ab@php.net>2014-08-16 11:16:11 +0200
commit8ee2a4a9b5de682c0b37670e1f4f86242b1650ce (patch)
tree7768898294c125f79de082a986e962aa6cb23094 /win32
parent735ec33b828bc4429c4ec8de7ba547925a4b44e3 (diff)
downloadphp-git-8ee2a4a9b5de682c0b37670e1f4f86242b1650ce.tar.gz
first shot on merging the core fro the int64 branch
Diffstat (limited to 'win32')
-rw-r--r--win32/glob.c10
-rw-r--r--win32/glob.h6
-rw-r--r--win32/php_stdint.h2
-rw-r--r--win32/registry.c6
-rw-r--r--win32/sendmail.c3
-rw-r--r--win32/winutil.c2
-rw-r--r--win32/winutil.h2
7 files changed, 18 insertions, 13 deletions
diff --git a/win32/glob.c b/win32/glob.c
index 8111daba1c..95160f9963 100644
--- a/win32/glob.c
+++ b/win32/glob.c
@@ -146,10 +146,10 @@ typedef char Char;
static int compare(const void *, const void *);
static int g_Ctoc(const Char *, char *, u_int);
-static int g_lstat(Char *, struct stat *, glob_t *);
+static int g_lstat(Char *, php_stat_t *, glob_t *);
static DIR *g_opendir(Char *, glob_t *);
static Char *g_strchr(Char *, int);
-static int g_stat(Char *, struct stat *, glob_t *);
+static int g_stat(Char *, php_stat_t *, glob_t *);
static int glob0(const Char *, glob_t *);
static int glob1(Char *, Char *, glob_t *, size_t *);
static int glob2(Char *, Char *, Char *, Char *, Char *, Char *,
@@ -559,7 +559,7 @@ glob2(pathbuf, pathbuf_last, pathend, pathend_last, pattern,
glob_t *pglob;
size_t *limitp;
{
- struct stat sb;
+ php_stat_t sb;
Char *p, *q;
int anymeta;
@@ -856,7 +856,7 @@ g_opendir(str, pglob)
static int
g_lstat(fn, sb, pglob)
register Char *fn;
- struct stat *sb;
+ php_stat_t *sb;
glob_t *pglob;
{
char buf[MAXPATHLEN];
@@ -871,7 +871,7 @@ g_lstat(fn, sb, pglob)
static int
g_stat(fn, sb, pglob)
register Char *fn;
- struct stat *sb;
+ php_stat_t *sb;
glob_t *pglob;
{
char buf[MAXPATHLEN];
diff --git a/win32/glob.h b/win32/glob.h
index 3f7a57a0b3..a03fda9199 100644
--- a/win32/glob.h
+++ b/win32/glob.h
@@ -47,7 +47,7 @@
# include <sys/cdefs.h>
#endif
-struct stat;
+php_stat_t;
typedef struct {
int gl_pathc; /* Count of total paths so far. */
int gl_matchc; /* Count of paths matching pattern. */
@@ -65,8 +65,8 @@ typedef struct {
void (*gl_closedir)(void *);
struct dirent *(*gl_readdir)(void *);
void *(*gl_opendir)(const char *);
- int (*gl_lstat)(const char *, struct stat *);
- int (*gl_stat)(const char *, struct stat *);
+ int (*gl_lstat)(const char *, php_stat_t *);
+ int (*gl_stat)(const char *, php_stat_t *);
} glob_t;
/* Flags */
diff --git a/win32/php_stdint.h b/win32/php_stdint.h
index 0d63615c6b..4e9b869483 100644
--- a/win32/php_stdint.h
+++ b/win32/php_stdint.h
@@ -130,6 +130,7 @@ typedef uint64_t uintmax_t;
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
// 7.18.2.1 Limits of exact-width integer types
+#if _MSC_VER >= 1700 && !defined(_INTSAFE_H_INCLUDED_)
#define INT8_MIN ((int8_t)_I8_MIN)
#define INT8_MAX _I8_MAX
#define INT16_MIN ((int16_t)_I16_MIN)
@@ -142,6 +143,7 @@ typedef uint64_t uintmax_t;
#define UINT16_MAX _UI16_MAX
#define UINT32_MAX _UI32_MAX
#define UINT64_MAX _UI64_MAX
+#endif
// 7.18.2.2 Limits of minimum-width integer types
#define INT_LEAST8_MIN INT8_MIN
diff --git a/win32/registry.c b/win32/registry.c
index ade09aa486..75854910e0 100644
--- a/win32/registry.c
+++ b/win32/registry.c
@@ -240,18 +240,18 @@ void UpdateIniFromRegistry(char *path TSRMLS_DC)
if (pht != NULL) {
HashTable *ht = pht;
zend_string *index;
- ulong num;
+ php_uint_t num;
zval *data;
ZEND_HASH_FOREACH_KEY_VAL(ht, num, index, data) {
- zend_alter_ini_entry(index, Z_STRVAL_P(data), Z_STRLEN_P(data), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
+ zend_alter_ini_entry(index, Z_STRVAL_P(data), Z_STRSIZE_P(data), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
} ZEND_HASH_FOREACH_END();
/*
for (zend_hash_internal_pointer_reset_ex(ht, &pos);
zend_hash_get_current_data_ex(ht, (void**)&data, &pos) == SUCCESS &&
zend_hash_get_current_key_ex(ht, &index, &index_len, &num, 0, &pos) == HASH_KEY_IS_STRING;
zend_hash_move_forward_ex(ht, &pos)) {
- zend_alter_ini_entry(index, index_len, Z_STRVAL_PP(data), Z_STRLEN_PP(data), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
+ zend_alter_ini_entry(index, index_len, Z_STRVAL_PP(data), Z_STRSIZE_PP(data), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
}
break;
*/
diff --git a/win32/sendmail.c b/win32/sendmail.c
index c191e0f3aa..85a2e5b4c5 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -360,6 +360,9 @@ PHPAPI char *GetSMErrorText(int index)
}
}
+PHPAPI zend_string *php_str_to_str(char *haystack, int length, char *needle,
+ int needle_len, char *str, int str_len);
+
/*********************************************************************
// Name: SendText
diff --git a/win32/winutil.c b/win32/winutil.c
index 22e2d45304..9984d3addc 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -22,7 +22,7 @@
#include "php.h"
#include <wincrypt.h>
-PHPAPI char *php_win32_error_to_msg(int error)
+PHPAPI char *php_win32_error_to_msg(HRESULT error)
{
char *buf = NULL;
diff --git a/win32/winutil.h b/win32/winutil.h
index 773063e5f6..e0193d33f3 100644
--- a/win32/winutil.h
+++ b/win32/winutil.h
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-PHPAPI char *php_win32_error_to_msg(int error);
+PHPAPI char *php_win32_error_to_msg(HRESULT error);
#define php_win_err() php_win32_error_to_msg(GetLastError())
int php_win32_check_trailing_space(const char * path, const int path_len);