- AC found the header if HTTP_HAVE_[OPENSSL|GNUTLS] is defined
[m6w6/ext-http] / missing.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2007, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13 /* $Id$ */
14
15 #ifndef PHP_HTTP_MISSING
16 #define PHP_HTTP_MISSING
17
18 #include "php_version.h"
19
20 #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION == 0)
21 # define WONKY
22 #endif
23
24 #ifndef pemalloc_rel
25 # define pemalloc_rel(size, persistent) ((persistent)?malloc(size):emalloc_rel(size))
26 #endif
27
28 #ifndef ZEND_ACC_DEPRECATED
29 # define ZEND_ACC_DEPRECATED 0
30 #endif
31
32 #if PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION < 10
33 # define php_url_parse_ex(u, l) php_url_parse(u)
34 #endif
35
36 #ifndef TSRMLS_FETCH_FROM_CTX
37 # ifdef ZTS
38 # define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx
39 # else
40 # define TSRMLS_FETCH_FROM_CTX(ctx)
41 # endif
42 #endif
43
44 #ifndef TSRMLS_SET_CTX
45 # ifdef ZTS
46 # define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_ls
47 # else
48 # define TSRMLS_SET_CTX(ctx)
49 # endif
50 #endif
51
52 #ifndef ZVAL_ZVAL
53 #define ZVAL_ZVAL(z, zv, copy, dtor) { \
54 int is_ref, refcount; \
55 is_ref = (z)->is_ref; \
56 refcount = (z)->refcount; \
57 *(z) = *(zv); \
58 if (copy) { \
59 zval_copy_ctor(z); \
60 } \
61 if (dtor) { \
62 if (!copy) { \
63 ZVAL_NULL(zv); \
64 } \
65 zval_ptr_dtor(&zv); \
66 } \
67 (z)->is_ref = is_ref; \
68 (z)->refcount = refcount; \
69 }
70 #endif
71 #ifndef RETVAL_ZVAL
72 # define RETVAL_ZVAL(zv, copy, dtor) ZVAL_ZVAL(return_value, zv, copy, dtor)
73 #endif
74 #ifndef RETURN_ZVAL
75 # define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; }
76 #endif
77
78 #ifndef ZEND_MN
79 # define ZEND_MN(name) ZEND_FN(name)
80 #endif
81
82 #ifdef WONKY
83 extern int zend_declare_property_double(zend_class_entry *ce, char *name, int name_length, double value, int access_type TSRMLS_DC);
84 extern void zend_update_property_double(zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC);
85
86 extern int zend_declare_property_bool(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC);
87 extern void zend_update_property_bool(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC);
88
89 extern void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_len TSRMLS_DC);
90 #endif
91
92 #endif
93
94 /*
95 * Local variables:
96 * tab-width: 4
97 * c-basic-offset: 4
98 * End:
99 * vim600: noet sw=4 ts=4 fdm=marker
100 * vim<600: noet sw=4 ts=4
101 */
102