#define _XOPEN_SOURCE
#endif
+#include <sys/stat.h>
+
#include <cmath>
#include <cstdlib>
#include <cstring>
+#include <ctime>
-#ifdef HAVE_LCMS
-/*** color support enabled ***/
+#include <glib.h>
-#ifdef HAVE_LCMS2
-#include <lcms2.h>
-#else
-#include <lcms.h>
-#endif
+#if HAVE_LCMS
+/*** color support enabled ***/
+# if HAVE_LCMS2
+# include <lcms2.h>
+# else
+# include <lcms.h>
+# endif
#endif
#include "cache.h"
#include "debug.h"
#include "exif.h"
#include "filecache.h"
+#include "filedata.h"
#include "glua.h"
#include "intl.h"
#include "jpeg-parser.h"
#include "main-defines.h"
#include "misc.h"
+#include "typedefs.h"
#include "ui-fileops.h"
#include "zonedetect.h"
+struct ExifData;
+struct ExifItem;
+struct FileCacheData;
+struct ZoneDetect;
+
static gdouble exif_rational_to_double(ExifRational *r, gint sign)
{
static gchar *exif_build_formatted_ColorProfile(ExifData *exif)
{
-#ifdef HAVE_LCMS2
+#if HAVE_LCMS2
cmsUInt8Number profileID[17];
#endif
const gchar *name = "";
else
{
source = _("embedded");
-#ifdef HAVE_LCMS
+#if HAVE_LCMS
{
cmsHPROFILE profile;
profile = cmsOpenProfileFromMem(profile_data, profile_len);
if (profile)
{
-#ifdef HAVE_LCMS2
+#if HAVE_LCMS2
profileID[16] = '\0';
cmsGetHeaderProfileID(profile, profileID);
name = reinterpret_cast<gchar *>(profileID);
* not writable directly, thus it should contain the most up-to-date version */
sidecar_path = nullptr;
-#ifdef HAVE_EXIV2
+#if HAVE_EXIV2
/* we are not able to handle XMP sidecars without exiv2 */
sidecar_path = cache_find_location(CACHE_TYPE_XMP_METADATA, fd->path);
return g_strdup("");
}
-#ifdef HAVE_LUA
+#if HAVE_LUA
gchar *metadata_lua_info(FileData *fd, const gchar *key, MetadataFormat)
{
gchar *script_name;