php_http_buffer_t ranges;
struct {
- uint count;
+ uint32_t count;
double delay;
} retry;
}
}
-static ulong php_http_openssl_thread_id(void)
+static unsigned long php_http_openssl_thread_id(void)
{
- return (ulong) tsrm_thread_id();
+ return (unsigned long) tsrm_thread_id();
}
#endif
#if PHP_HTTP_NEED_GNUTLS_TSL
*decoded = ecalloc(1, encoded_len + 1);
while ((encoded + encoded_len - e_ptr) > 0) {
- ulong chunk_len = 0, rest;
+ unsigned long chunk_len = 0, rest;
chunk_len = strtoul(e_ptr, &n_ptr, 16);
struct dechunk_ctx {
php_http_buffer_t buffer;
- ulong hexlen;
+ unsigned long hexlen;
unsigned zeroed:1;
};
php_http_etag_t *e;
if (mode && (!strcasecmp(mode, "crc32b"))) {
- ctx = emalloc(sizeof(uint));
- *((uint *) ctx) = ~0;
+ ctx = emalloc(sizeof(uint32_t));
+ *((uint32_t *) ctx) = ~0;
} else if (mode && !strcasecmp(mode, "sha1")) {
PHP_SHA1Init(ctx = emalloc(sizeof(PHP_SHA1_CTX)));
} else if (mode && !strcasecmp(mode, "md5")) {
char *etag = NULL;
if (!strcasecmp(e->mode, "crc32b")) {
- uint e_ctx;
+ uint32_t e_ctx;
memcpy(&e_ctx, e->ctx, 4);
e_ctx = ntohl(~e_ctx);
etag = php_http_etag_digest((unsigned char *) &e_ctx, 4);
size_t php_http_etag_update(php_http_etag_t *e, const char *data_ptr, size_t data_len)
{
if (!strcasecmp(e->mode, "crc32b")) {
- uint i, c = *((uint *) e->ctx);
+ uint32_t i, c = *((uint32_t *) e->ctx);
for (i = 0; i < data_len; ++i) {
CRC32(c, data_ptr[i]);
}
- *((uint *) e->ctx) = c;
+ *((uint32_t *) e->ctx) = c;
} else if ((!strcasecmp(e->mode, "sha1"))) {
PHP_SHA1Update(e->ctx, (const unsigned char *) data_ptr, data_len);
} else if ((!strcasecmp(e->mode, "md5"))) {
typedef struct _http_chunked_decode_filter_buffer_t {
php_http_buffer_t buffer;
- ulong hexlen;
+ unsigned long hexlen;
} PHP_HTTP_FILTER_BUFFER(chunked_decode);
typedef php_http_encoding_stream_t PHP_HTTP_FILTER_BUFFER(stream);
}
if (content_range) {
- ulong total = 0, start = 0, end = 0;
+ unsigned long total = 0, start = 0, end = 0;
if (!strncasecmp(content_range->val, "bytes", lenof("bytes"))
&& ( content_range->val[lenof("bytes")] == ':'
}
}
-php_http_option_t *php_http_option_register(php_http_options_t *registry, const char *name_str, size_t name_len, ulong option, zend_uchar type)
+php_http_option_t *php_http_option_register(php_http_options_t *registry, const char *name_str, size_t name_len, unsigned long option, zend_uchar type)
{
php_http_option_t opt;
php_http_options_t suboptions;
zend_string *name;
- ulong option;
+ unsigned long option;
zend_uchar type;
unsigned flags;
zval defval;
PHP_HTTP_API void php_http_options_dtor(php_http_options_t *registry);
PHP_HTTP_API void php_http_options_free(php_http_options_t **registry);
-PHP_HTTP_API php_http_option_t *php_http_option_register(php_http_options_t *registry, const char *name_str, size_t name_len, ulong option, zend_uchar type);
+PHP_HTTP_API php_http_option_t *php_http_option_register(php_http_options_t *registry, const char *name_str, size_t name_len, unsigned long option, zend_uchar type);
PHP_HTTP_API zval *php_http_option_get(php_http_option_t *opt, HashTable *options, void *userdata);
#endif /* PHP_HTTP_OPTIONS_H */
}
}
-static inline void php_http_querystring_get(zval *instance, int type, char *name, uint name_len, zval *defval, zend_bool del, zval *return_value)
+static inline void php_http_querystring_get(zval *instance, int type, char *name, uint32_t name_len, zval *defval, zend_bool del, zval *return_value)
{
zval *arrval, qarray_tmp, *qarray = zend_read_property(php_http_querystring_class_entry, instance, ZEND_STRL("queryArray"), 0, &qarray_tmp);