/* {{{ http_module_dep */
#if ZEND_EXTENSION_API_NO >= 220050617
static zend_module_dep http_module_deps[] = {
-# if HTTP_HAVE_EXT(SPL)
+# ifdef HTTP_HAVE_SPL
ZEND_MOD_REQUIRED("spl")
# endif
-# if HTTP_HAVE_EXT_HASH
+# ifdef HTTP_HAVE_HASH
ZEND_MOD_REQUIRED("hash")
# endif
-# if HTTP_HAVE_EXT(SESSION)
+# ifdef HTTP_HAVE_SESSION
ZEND_MOD_REQUIRED("session")
# endif
-# if HTTP_HAVE_EXT(ICONV)
+# ifdef HTTP_HAVE_ICONV
ZEND_MOD_REQUIRED("iconv")
# endif
{NULL, NULL, NULL, 0}
#include "ext/standard/php_string.h"
#include "zend_operators.h"
-#if HTTP_HAVE_EXT(SESSION)
+#ifdef HTTP_HAVE_SESSION
# include "ext/session/php_session.h"
#endif
RETURN_FALSE;
}
-#if HTTP_HAVE_EXT(SESSION)
+#ifdef HTTP_HAVE_SESSION
/* append session info */
if (session) {
if (!params) {
#include "php_http_request_api.h"
#include "php_http_request_object.h"
-#if HTTP_HAVE_EXT(SPL) && !defined(WONKY)
+#if defined(HTTP_HAVE_SPL) && !defined(WONKY)
/* SPL doesn't install its headers */
extern PHPAPI zend_class_entry *spl_ce_Countable;
#endif
HTTP_REGISTER_CLASS_EX(HttpMessage, http_message_object, NULL, 0);
#ifndef WONKY
-# if HTTP_HAVE_EXT(SPL)
+# ifdef HTTP_HAVE_SPL
zend_class_implements(http_message_object_ce TSRMLS_CC, 3, spl_ce_Countable, zend_ce_serializable, zend_ce_iterator);
# else
zend_class_implements(http_message_object_ce TSRMLS_CC, 2, zend_ce_serializable, zend_ce_iterator);
#include "php_http.h"
#include "php_variables.h"
-#if HTTP_HAVE_EXT(ICONV)
+#ifdef HTTP_HAVE_ICONV
# undef PHP_ATOM_INC
# include "ext/iconv/php_iconv.h"
# include "ext/standard/url.h"
static inline int _http_querystring_modify_array(zval *qarray, zval *params TSRMLS_DC);
-#if HTTP_HAVE_EXT(ICONV)
+#ifdef HTTP_HAVE_ICONV
PHP_HTTP_API int _http_querystring_xlate(zval *array, zval *param, const char *ie, const char *oe TSRMLS_DC)
{
HashPosition pos;
HTTP_ARG_VAL(delete, 0)
HTTP_END_ARGS;
-#if HTTP_HAVE_EXT(ICONV)
+#ifdef HTTP_HAVE_ICONV
HTTP_BEGIN_ARGS(xlate, 2)
HTTP_ARG_VAL(from_encoding, 0)
HTTP_ARG_VAL(to_encoding, 0)
#ifndef WONKY
HTTP_QUERYSTRING_ME(singleton, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
#endif
-#if HTTP_HAVE_EXT(ICONV)
+#ifdef HTTP_HAVE_ICONV
HTTP_QUERYSTRING_ME(xlate, ZEND_ACC_PUBLIC)
#endif
HTTP_QUERYSTRING_GETTER(getObject, IS_OBJECT);
/* }}} */
-#if HTTP_HAVE_EXT(ICONV)
+#ifdef HTTP_HAVE_ICONV
/* {{{ proto bool HttpQueryString::xlate(string ie, string oe)
*
* Converts the query string from the source encoding ie to the target encoding oe.
</lead>
<date>2006-00-00</date>
<version>
- <release>1.0.0</release>
+ <release>1.0.1</release>
<api>1.0.0</api>
</version>
<stability>
</stability>
<license>BSD, revised</license>
<notes><![CDATA[
-+ Added --with[out]-http-shared-deps configure option (dependencies on shared extensions)
-+ Added INI entries: http.log.not_found, http.send.not_found_404
-+ Added HttpMessage::guessContentType()
-* Fixed build on Debian systems where access to Curl_* functions is prohibited
-* Fixed empty Cache-Control header if not customly set with HttpResponse
-* Reset Content-Disposition and Content-Type if file is not found by http_send_file() etc
+* Fixed build with gcc-2.95
]]></notes>
<contents>
<dir name="/">
#ifndef PHP_EXT_HTTP_H
#define PHP_EXT_HTTP_H
-#define PHP_EXT_HTTP_VERSION "1.0.0"
+#define PHP_EXT_HTTP_VERSION "1.0.1dev"
#ifdef HAVE_CONFIG_H
# include "config.h"
# define HTTP_G (&http_globals)
#endif
-#define HTTP_HAVE_EXT(EXT) ((defined(HAVE_##EXT) || defined(HAVE_PHP_##EXT) || defined(HAVE_##EXT##_EXT)) && (HTTP_SHARED_DEPS || !defined(COMPILE_DL_##EXT)))
+#if defined(HAVE_ICONV) && (HTTP_SHARED_DEPS || !defined(COMPILE_DL_ICONV))
+# define HTTP_HAVE_ICONV
+#endif
+
+#if defined(HAVE_PHP_SESSION) && (HTTP_SHARED_DEPS || !defined(COMPILE_DL_SESSION))
+# define HTTP_HAVE_SESSION
+#endif
+
+#if defined(HAVE_HASH_EXT) && (HTTP_SHARED_DEPS || !defined(COMPILE_DL_HASH) && defined(HTTP_HAVE_PHP_HASH_H))
+# define HTTP_HAVE_HASH
+#endif
+
+#if defined(HAVE_SPL)
+# define HTTP_HAVE_SPL
+#endif
PHP_FUNCTION(http_test);
PHP_FUNCTION(http_date);
#include "ext/standard/sha1.h"
#include "ext/standard/md5.h"
-#if defined(HTTP_HAVE_PHP_HASH_H) && HTTP_HAVE_EXT(HASH)
-# define HTTP_HAVE_EXT_HASH 1
+#ifdef HTTP_HAVE_HASH
# include "php_hash.h"
-#else
-# define HTTP_HAVE_EXT_HASH 0
#endif
#define http_etag_digest(d, l) _http_etag_digest((d), (l))
void *ctx = NULL;
char *mode = HTTP_G->etag.mode;
-#if HTTP_HAVE_EXT_HASH
+#ifdef HTTP_HAVE_HASH
php_hash_ops *eho = NULL;
if (mode && (eho = php_hash_fetch_ops(mode, strlen(mode)))) {
unsigned char digest[128] = {0};
char *etag = NULL, *mode = HTTP_G->etag.mode;
-#if HTTP_HAVE_EXT_HASH
+#ifdef HTTP_HAVE_HASH
php_hash_ops *eho = NULL;
if (mode && (eho = php_hash_fetch_ops(mode, strlen(mode)))) {
static inline void _http_etag_update(void *ctx, const char *data_ptr, size_t data_len TSRMLS_DC)
{
char *mode = HTTP_G->etag.mode;
-#if HTTP_HAVE_EXT_HASH
+#ifdef HTTP_HAVE_HASH
php_hash_ops *eho = NULL;
if (mode && (eho = php_hash_fetch_ops(mode, strlen(mode)))) {
#ifndef PHP_HTTP_QUERYSTRING_API_H
#define PHP_HTTP_QUERYSTRING_API_H
-#if HTTP_HAVE_EXT(ICONV)
+#ifdef HTTP_HAVE_ICONV
#define http_querystring_xlate(a, p, ie, oe) _http_querystring_xlate((a), (p), (ie), (oe) TSRMLS_CC)
PHP_HTTP_API int _http_querystring_xlate(zval *array, zval *param, const char *ie, const char *oe TSRMLS_DC);
#endif
PHP_METHOD(HttpQueryString, getString);
PHP_METHOD(HttpQueryString, getArray);
PHP_METHOD(HttpQueryString, getObject);
-#if HTTP_HAVE_EXT(ICONV)
+#ifdef HTTP_HAVE_ICONV
PHP_METHOD(HttpQueryString, xlate);
#endif
#ifndef WONKY