From: Michael Wallner Date: Wed, 30 Nov 2005 11:11:52 +0000 (+0000) Subject: - fix PHP4 build X-Git-Tag: RELEASE_2_0_2~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f79f89e2655589058a36605d1bd9b7e73544b5a5;p=php - fix PHP4 build --- diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 1a6fbc226d..8597041ae9 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -29,6 +29,12 @@ static int php_hash_le_hash; HashTable php_hash_hashtable; +#if (PHP_MAJOR_VERSION >= 5) +# define DEFAULT_CONTEXT FG(default_context) +#else +# define DEFAULT_CONTEXT NULL +#endif + /* Hash Registry Access */ PHP_HASH_API php_hash_ops *php_hash_fetch_ops(const char *algo, int algo_len) @@ -76,7 +82,7 @@ static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMETERS, int isfilename) RETURN_FALSE; } if (isfilename) { - stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL, FG(default_context)); + stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL, DEFAULT_CONTEXT); if (!stream) { /* Stream will report errors opening file */ RETURN_FALSE;