summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-11-25 08:37:02 +0000
committerkrakjoe <joe.watkins@live.co.uk>2014-11-25 08:37:02 +0000
commite07feeaf8b91f16a89e9903b461042a0f6a63ac0 (patch)
tree4a94cd382fcffefff920f7733562e1860a66cc44 /main
parent9b6836ebd36eccc9e81ca51e2efe172e1d334f0b (diff)
parentd4f42289ddde002cb4d3ed9d1a4f2219f68df48e (diff)
downloadphp-git-e07feeaf8b91f16a89e9903b461042a0f6a63ac0.tar.gz
Merge branch 'master' of https://github.com/php/php-src
Diffstat (limited to 'main')
-rw-r--r--main/main.c4
-rw-r--r--main/network.c8
-rw-r--r--main/snprintf.c4
-rw-r--r--main/snprintf.h2
-rw-r--r--main/streams/plain_wrapper.c2
-rw-r--r--main/streams/streams.c2
-rw-r--r--main/streams/xp_socket.c3
-rw-r--r--main/win95nt.h2
8 files changed, 15 insertions, 12 deletions
diff --git a/main/main.c b/main/main.c
index 828831545e..41e84a79f7 100644
--- a/main/main.c
+++ b/main/main.c
@@ -130,7 +130,7 @@ PHPAPI int core_globals_id;
#ifdef PHP_WIN32
#include "win32_internal_function_disabled.h"
-static php_win32_disable_functions(TSRMLS_D)
+static int php_win32_disable_functions(TSRMLS_D)
{
int i;
@@ -2278,7 +2278,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
/* load and startup extensions compiled as shared objects (aka DLLs)
as requested by php.ini entries
- theese are loaded after initialization of internal extensions
+ these are loaded after initialization of internal extensions
as extensions *might* rely on things from ext/standard
which is always an internal extension and to be initialized
ahead of all other internals
diff --git a/main/network.c b/main/network.c
index 9fd1285493..f44cad29a5 100644
--- a/main/network.c
+++ b/main/network.c
@@ -1126,17 +1126,19 @@ PHPAPI php_stream *_php_stream_sock_open_host(const char *host, unsigned short p
PHPAPI int php_set_sock_blocking(php_socket_t socketd, int block TSRMLS_DC)
{
int ret = SUCCESS;
- int flags;
- int myflag = 0;
#ifdef PHP_WIN32
+ u_long flags;
+
/* with ioctlsocket, a non-zero sets nonblocking, a zero sets blocking */
flags = !block;
if (ioctlsocket(socketd, FIONBIO, &flags) == SOCKET_ERROR) {
ret = FAILURE;
}
#else
- flags = fcntl(socketd, F_GETFL);
+ int myflag = 0;
+ int flags = fcntl(socketd, F_GETFL);
+
#ifdef O_NONBLOCK
myflag = O_NONBLOCK; /* POSIX version */
#elif defined(O_NDELAY)
diff --git a/main/snprintf.c b/main/snprintf.c
index 826880f62a..0b9182b614 100644
--- a/main/snprintf.c
+++ b/main/snprintf.c
@@ -1241,7 +1241,7 @@ static void strx_printv(int *ccp, char *buf, size_t len, const char *format, va_
PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) /* {{{ */
{
- unsigned int cc;
+ int cc;
va_list ap;
va_start(ap, format);
@@ -1257,7 +1257,7 @@ PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) /* {{{
PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list ap) /* {{{ */
{
- unsigned int cc;
+ int cc;
strx_printv(&cc, buf, len, format, ap);
if (cc >= len) {
diff --git a/main/snprintf.h b/main/snprintf.h
index 789ab7d41a..115a15aa58 100644
--- a/main/snprintf.h
+++ b/main/snprintf.h
@@ -31,7 +31,7 @@ sprintf offers the ability to make a lot of failures since it does not know
snprintf knows the buffers size and will not write behind it. But you will
have to use either a static buffer or allocate a dynamic buffer
- before beeing able to call the function. In other words you must
+ before being able to call the function. In other words you must
be sure that you really know the maximum size of the buffer required.
A bad thing is having a big maximum while in most cases you would
only need a small buffer. If the size of the resulting string is
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 1aa01f270d..8590647818 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -1399,7 +1399,7 @@ static php_stream_wrapper_ops php_plain_files_wrapper_ops = {
php_plain_files_metadata
};
-php_stream_wrapper php_plain_files_wrapper = {
+PHPAPI php_stream_wrapper php_plain_files_wrapper = {
&php_plain_files_wrapper_ops,
NULL,
0
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 13af362681..c6420dc0d0 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -1066,7 +1066,7 @@ PHPAPI zend_string *php_stream_get_record(php_stream *stream, size_t maxlen, con
* searched for the delimiter.
* The left part of the delimiter may still remain in the buffer,
* so subtract up to <delim_len - 1> from buffered_len, which is
- * the ammount of data we skip on this search as an optimization
+ * the amount of data we skip on this search as an optimization
*/
found_delim = _php_stream_search_delim(
stream, maxlen,
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index 746d9c93d9..7427a794b4 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -233,10 +233,11 @@ static int php_sockop_flush(php_stream *stream TSRMLS_DC)
static int php_sockop_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC)
{
- php_netstream_data_t *sock = (php_netstream_data_t*)stream->abstract;
#if ZEND_WIN32
return 0;
#else
+ php_netstream_data_t *sock = (php_netstream_data_t*)stream->abstract;
+
return zend_fstat(sock->socket, &ssb->sb);
#endif
}
diff --git a/main/win95nt.h b/main/win95nt.h
index 76bec05ea5..febffecadf 100644
--- a/main/win95nt.h
+++ b/main/win95nt.h
@@ -55,7 +55,7 @@ typedef char * caddr_t;
typedef unsigned int uint;
typedef unsigned long ulong;
#if !NSAPI
-typedef long pid_t;
+typedef int pid_t;
#endif
/* missing in vc5 math.h */