RETURN_FALSE;
}
- outstream = php_stream_fopen(local, "wb", NULL TSRMLS_C);
+ outstream = php_stream_fopen(local, "wb", NULL TSRMLS_CC);
if (outstream == NULL) {
php_stream_close(tmpstream);
ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, &z_ftp, -1, le_ftpbuf_name, le_ftpbuf);
XTYPE(xtype, mode);
- instream = php_stream_fopen(local, "rb", NULL TSRMLS_C);
+ instream = php_stream_fopen(local, "rb", NULL TSRMLS_CC);
if (instream == NULL) {
RETURN_FALSE;
size_t bcount = 0;
int ready = 0;
char buf[8192];
+#ifdef HAVE_MMAP
int fd;
+#endif
#ifdef HAVE_MMAP
if (!php_stream_is(stream, PHP_STREAM_IS_SOCKET)
}
else
#endif
- stream = php_stream_sock_open_host(host, port, socktype, timeout, persistent);
+ stream = php_stream_sock_open_host(host, port, socktype, (int)timeout, persistent);
#if HAVE_OPENSSL_EXT
if (stream) {
*/
PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *newlen, int all, int quote_style, char *hint_charset)
{
- int i, maxlen, len, retlen;
+ int retlen;
int j, k;
char *replaced, *ret;
enum entity_charset charset = determine_charset(hint_charset);
- int matches_map;
unsigned char replacement[15];
ret = estrdup(old);
if (basic_entities[j].flags && (quote_style & basic_entities[j].flags) == 0)
continue;
- replacement[0] = basic_entities[j].charcode;
+ replacement[0] = (unsigned char)basic_entities[j].charcode;
replacement[1] = '\0';
replaced = php_str_to_str(ret, retlen, basic_entities[j].entity, basic_entities[j].entitylen, replacement, 1, &retlen);
if (basic_entities[j].flags && (quote_style & basic_entities[j].flags) == 0)
continue;
- ind[0] = basic_entities[j].charcode;
+ ind[0] = (unsigned char)basic_entities[j].charcode;
add_assoc_string(return_value, ind, basic_entities[j].entity, 1);
}
break;
#define shutdown(s,n) /* nothing */
#endif
+#ifdef PHP_WIN32
+#define EWOULDBLOCK WSAEWOULDBLOCK
+# define fsync _commit
+# define ftruncate(a, b) chsize(a, b)
+#endif /* defined(PHP_WIN32) */
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#include <openssl/ssl.h>
#endif
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
#ifdef HAVE_SOCKADDR_STORAGE
typedef struct sockaddr_storage php_sockaddr_storage;
#else