From: Anatol Belski Date: Wed, 19 Feb 2014 10:01:42 +0000 (+0100) Subject: remove PHP_API_VERSION < 20100412 check X-Git-Tag: php-5.6.0alpha3~1^2~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdaf3996af052a7e448581fcf924cda7d351a012;p=php remove PHP_API_VERSION < 20100412 check --- diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c index dca7b73f74..4196e17afa 100644 --- a/ext/fileinfo/libmagic/apprentice.c +++ b/ext/fileinfo/libmagic/apprentice.c @@ -961,11 +961,7 @@ load_1(struct magic_set *ms, int action, const char *fn, int *errs, TSRMLS_FETCH(); ms->file = fn; -#if PHP_API_VERSION < 20100412 - stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); -#else stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS, NULL); -#endif if (stream == NULL) { if (errno != ENOENT) @@ -2770,12 +2766,8 @@ apprentice_compile(struct magic_set *ms, struct magic_map *map, const char *fn) if (dbname == NULL) goto out; -/* wb+ == O_WRONLY|O_CREAT|O_TRUNC|O_BINARY */ -#if PHP_API_VERSION < 20100412 - stream = php_stream_open_wrapper((char *)fn, "wb+", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); -#else + /* wb+ == O_WRONLY|O_CREAT|O_TRUNC|O_BINARY */ stream = php_stream_open_wrapper((char *)fn, "wb+", REPORT_ERRORS, NULL); -#endif if (!stream) { file_error(ms, errno, "cannot open `%s'", dbname);