[Xfce4-commits] <thunar:master> Don't use g_atexit anymore.

Nick Schermer noreply at xfce.org
Thu Apr 19 21:20:01 CEST 2012


Updating branch refs/heads/master
         to 18c4dee71ff0e1de70c88d7517de214c850458fa (commit)
       from 9d2034567c1b3ff721e5dc3aeaeaa7ff98f34afa (commit)

commit 18c4dee71ff0e1de70c88d7517de214c850458fa
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Apr 19 21:18:55 2012 +0200

    Don't use g_atexit anymore.

 configure.in.in      |    2 +-
 thunar/thunar-file.c |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index e2b4795..4b543f6 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -138,7 +138,7 @@ dnl *** Check for standard functions ***
 dnl ************************************
 AC_FUNC_MMAP()
 AC_CHECK_FUNCS([localeconv mkdtemp pread pwrite sched_yield setgroupent \
-                setpassent strcoll strlcpy strptime symlink])
+                setpassent strcoll strlcpy strptime symlink atexit])
 
 dnl ******************************
 dnl *** Check for i18n support ***
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 4fbf03d..1aa17df 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -141,6 +141,7 @@ G_DEFINE_TYPE_WITH_CODE (ThunarFile, thunar_file, G_TYPE_OBJECT,
 
 
 #ifdef G_ENABLE_DEBUG
+#ifdef HAVE_ATEXIT
 static gboolean thunar_file_atexit_registered = FALSE;
 
 static void
@@ -176,6 +177,7 @@ thunar_file_atexit (void)
   G_UNLOCK (file_cache_mutex);
 }
 #endif
+#endif
 
 
 
@@ -185,12 +187,14 @@ thunar_file_class_init (ThunarFileClass *klass)
   GObjectClass *gobject_class;
 
 #ifdef G_ENABLE_DEBUG
+#ifdef HAVE_ATEXIT
   if (G_UNLIKELY (!thunar_file_atexit_registered))
     {
-      g_atexit (thunar_file_atexit);
+      atexit ((void (*)(void)) thunar_file_atexit);
       thunar_file_atexit_registered = TRUE;
     }
 #endif
+#endif
 
   /* pre-allocate the required quarks */
   thunar_file_thumb_path_quark = g_quark_from_static_string ("thunar-file-thumb-path");


More information about the Xfce4-commits mailing list