Commit 4ab02ea2 authored by Michael Natterer's avatar Michael Natterer 😴

app: store plug-in mtime as gint64 instead of time_t

This was an attempt to fix bug 703113 but didn't change anything,
however an explicit always-64 bit type is cleaner regardless, so here
it is.
parent 3cc923d5
......@@ -27,7 +27,6 @@
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
......@@ -37,10 +36,6 @@
#include <sys/wait.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
......
......@@ -199,7 +199,7 @@ gimp_plug_in_def_set_help_domain (GimpPlugInDef *plug_in_def,
void
gimp_plug_in_def_set_mtime (GimpPlugInDef *plug_in_def,
time_t mtime)
gint64 mtime)
{
GSList *list;
......
......@@ -21,8 +21,6 @@
#define __GIMP_PLUG_IN_DEF_H__
#include <time.h>
#include "core/gimpobject.h"
......@@ -45,7 +43,7 @@ struct _GimpPlugInDef
gchar *locale_domain_path;
gchar *help_domain_name;
gchar *help_domain_uri;
time_t mtime;
gint64 mtime;
gboolean needs_query; /* Does the plug-in need to be queried ? */
gboolean has_init; /* Does the plug-in need to be initialized ? */
};
......@@ -74,7 +72,7 @@ void gimp_plug_in_def_set_help_domain (GimpPlugInDef *plug_in_def,
const gchar *domain_uri);
void gimp_plug_in_def_set_mtime (GimpPlugInDef *plug_in_def,
time_t mtime);
gint64 mtime);
void gimp_plug_in_def_set_needs_query (GimpPlugInDef *plug_in_def,
gboolean needs_query);
void gimp_plug_in_def_set_has_init (GimpPlugInDef *plug_in_def,
......
......@@ -20,7 +20,6 @@
#ifndef __GIMP_PLUG_IN_PROCEDURE_H__
#define __GIMP_PLUG_IN_PROCEDURE_H__
#include <time.h> /* time_t */
#include <gdk-pixbuf/gdk-pixbuf.h>
......@@ -53,7 +52,7 @@ struct _GimpPlugInProcedure
guint8 *icon_data;
gchar *image_types;
GimpPlugInImageType image_types_val;
time_t mtime;
gint64 mtime;
gboolean installed_during_init;
/* file proc specific members */
......
......@@ -261,7 +261,7 @@ plug_in_def_deserialize (Gimp *gimp,
GimpPlugInProcedure *proc = NULL;
gchar *name;
gchar *path;
gint mtime;
gint64 mtime;
GTokenType token;
if (! gimp_scanner_parse_string (scanner, &name))
......@@ -273,7 +273,7 @@ plug_in_def_deserialize (Gimp *gimp,
plug_in_def = gimp_plug_in_def_new (path);
g_free (path);
if (! gimp_scanner_parse_int (scanner, &mtime))
if (! gimp_scanner_parse_int64 (scanner, &mtime))
{
g_object_unref (plug_in_def);
return G_TOKEN_INT;
......@@ -829,7 +829,8 @@ plug_in_rc_write (GSList *plug_in_defs,
gimp_config_writer_open (writer, "plug-in-def");
gimp_config_writer_string (writer, utf8);
gimp_config_writer_printf (writer, "%ld", plug_in_def->mtime);
gimp_config_writer_printf (writer, "%"G_GINT64_FORMAT,
plug_in_def->mtime);
g_free (utf8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment