From f51d78a35d50cb0e4ffdc30f077ffd85318944e6 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sun, 29 Mar 2015 18:11:11 +0200 Subject: [PATCH] catch up with libmagic.orig that'll simplify future merges --- ext/fileinfo/libmagic/cdf.h | 3 +-- ext/fileinfo/libmagic/readcdf.c | 16 ++++------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/ext/fileinfo/libmagic/cdf.h b/ext/fileinfo/libmagic/cdf.h index c35fb41a28..9006a686ef 100644 --- a/ext/fileinfo/libmagic/cdf.h +++ b/ext/fileinfo/libmagic/cdf.h @@ -57,10 +57,9 @@ typedef int32_t cdf_secid_t; #define CDF_SECID_SECTOR_ALLOCATION_TABLE -3 #define CDF_SECID_MASTER_SECTOR_ALLOCATION_TABLE -4 -# define CDF_MAGIC 0xE11AB1A1E011CFD0LL - typedef struct { uint64_t h_magic; +#define CDF_MAGIC 0xE11AB1A1E011CFD0LL uint64_t h_uuid[2]; uint16_t h_revision; uint16_t h_version; diff --git a/ext/fileinfo/libmagic/readcdf.c b/ext/fileinfo/libmagic/readcdf.c index d38f36ea23..f6ed9c9e2f 100644 --- a/ext/fileinfo/libmagic/readcdf.c +++ b/ext/fileinfo/libmagic/readcdf.c @@ -86,11 +86,7 @@ static const struct cv { const char *mime; } clsid2mime[] = { { -#ifdef PHP_WIN32 - { 0x00000000000c1084ui64, 0x46000000000000c0ui64 }, -#else - { 0x00000000000c1084LLU, 0x46000000000000c0LLU }, -#endif + { 0x00000000000c1084ULL, 0x46000000000000c0ULL }, "x-msi", }, { { 0, 0 }, @@ -98,11 +94,7 @@ static const struct cv { } }, clsid2desc[] = { { -#ifdef PHP_WIN32 - { 0x00000000000c1084ui64, 0x46000000000000c0ui64 }, -#else - { 0x00000000000c1084LLU, 0x46000000000000c0LLU }, -#endif + { 0x00000000000c1084ULL, 0x46000000000000c0ULL }, "MSI Installer", }, { { 0, 0 }, @@ -219,8 +211,8 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info, case CDF_FILETIME: tp = info[i].pi_tp; if (tp != 0) { - char tbuf[64]; - if (tp < 1000000000000000LL) { + char tbuf[64]; + if (tp < 1000000000000000LL) { cdf_print_elapsed_time(tbuf, sizeof(tbuf), tp); if (NOTMIME(ms) && file_printf(ms, -- 2.40.0