From fdaf3996af052a7e448581fcf924cda7d351a012 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 19 Feb 2014 11:01:42 +0100 Subject: [PATCH] remove PHP_API_VERSION < 20100412 check --- ext/fileinfo/libmagic/apprentice.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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); -- 2.50.1