- Couple of compile fixes.

This commit is contained in:
Andi Gutmans 2006-02-19 05:05:42 +00:00
parent 1efe984d08
commit c28cff57d1
2 changed files with 6 additions and 8 deletions

View file

@ -157,8 +157,8 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
#define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v); #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
#define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \ #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
if (((PG(open_basedir) && *PG(open_basedir))) && \ if ((PG(open_basedir) && *PG(open_basedir)) && \
strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \ strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \
{ \ { \
php_url *tmp_url; \ php_url *tmp_url; \
\ \
@ -167,8 +167,7 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
RETURN_FALSE; \ RETURN_FALSE; \
} \ } \
\ \
if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC)) \ if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC)) { \
) { \
php_url_free(tmp_url); \ php_url_free(tmp_url); \
RETURN_FALSE; \ RETURN_FALSE; \
} \ } \

View file

@ -32,10 +32,9 @@
/* open_basedir and safe_mode checks */ /* open_basedir and safe_mode checks */
#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \ #define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \
if (!filename || php_check_open_basedir(filename TSRMLS_CC)) \ if (!filename || php_check_open_basedir(filename TSRMLS_CC)) { \
) { \ php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \
php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \ RETURN_FALSE; \
RETURN_FALSE; \
} }
#define PHP_GDIMG_TYPE_GIF 1 #define PHP_GDIMG_TYPE_GIF 1