Commit 5fdaff05 authored by Benedikt Meurer's avatar Benedikt Meurer

2005-12-20 Benedikt Meurer <benny@xfce.org>

	* THANKS: Update credits.
	* README, configure.in.in, thunar-vfs/thunar-vfs-info.c,
	  thunar-vfs/thunar-vfs-mime-database.c,
	  thunar-vfs/thunar-vfs-mime-info.c, thunar-vfs/thunar-vfs-path.c,
	  thunar/main.c, thunar/thunar-file.c: Support four different levels
	  of debugging support. Default for SVN builds is `yes', while the
	  default for release builds is `minimum'. Closes bug #1254.




(Old svn revision: 19091)
parent 875d118b
2005-12-20 Benedikt Meurer <benny@xfce.org>
* THANKS: Update credits.
* README, configure.in.in, thunar-vfs/thunar-vfs-info.c,
thunar-vfs/thunar-vfs-mime-database.c,
thunar-vfs/thunar-vfs-mime-info.c, thunar-vfs/thunar-vfs-path.c,
thunar/main.c, thunar/thunar-file.c: Support four different levels
of debugging support. Default for SVN builds is `yes', while the
default for release builds is `minimum'. Closes bug #1254.
2005-12-13 Benedikt Meurer <benny@xfce.org>
* thunar-vfs/thunar-vfs-volume-bsd.c(thunar_vfs_volume_bsd_update):
......
......@@ -34,6 +34,29 @@ The file 'INSTALL' contains generic installation instructions. For more
detailed information, visit the Thunar website at http://thunar.xfce.org/.
Debugging Support
=================
Thunar currently supports four different levels of debugging support, which
can be setup using the configure flag `--enable-debug' (check the output of
`configure --help'):
`full' Use this if you want to debug Thunar to locate a bug. The
build will most probably be noticably slower. This is also
recommended for people that want to develop Thunar stuff.
`yes' This is the default for SVN snapshot builds. It adds all
kinds of checks to the code, and is therefore likely to run
slower. Use this if you want to develop for Thunar (e.g.
writing Thunar extensions and such).
`minimum' This is the default for release builds, and presents the
recommended behaviour.
`no' Disables all sanity checks. Don't use this unless you know
exactly what you do.
How to report bugs?
===================
......
......@@ -16,18 +16,31 @@ Translators (sorted by language):
----------------------------------
These people have translated Thunar to foreign languages.
Pau Rul·lan Ferragut <paurullan@bulma.net>
* ca translations
Stavros Giannouris <stavrosg2002@freemail.gr>
* el translations
Pablo Hernández-M. Saiz <homeless3d@gmail.com>
* es translations
Stephane Roy <sroy@j2n.net>
* fr translations
Szervác Attila <sas@321.hu>
* hu translations
Daichi Kawahata <daichik@users.sourceforge.net>
Daichi Kawahata <daichi@xfce.org>
* ja translations
Joao Pedrosa <joaopedrosa@gmail.com>
* pt_BR translations
Other contributors (sorted by name):
------------------------------------
Daichi Kawahata <daichi@xfce.org>
* i18n coordinator
......@@ -18,6 +18,11 @@ m4_define([thunar_version_build], [r@REVISION@])
m4_define([thunar_version_tag], [svn])
m4_define([thunar_version], [thunar_version_major().thunar_version_minor().thunar_version_micro()ifelse(thunar_version_tag(), [], [], [thunar_version_tag()-thunar_version_build()])])
dnl *******************************************
dnl *** Debugging support for SVN snapshots ***
dnl *******************************************
m4_define([thunar_debug_default], [ifelse(thunar_version_tag(), [], [minimum], [yes])])
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
......@@ -253,12 +258,11 @@ AC_CONFIG_LINKS(
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
AC_ARG_ENABLE([debug], AC_HELP_STRING([--disable-debug], [Disable debugging support]), [], [enable_debug=yes])
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes/full@:>@], [Turn on debugging @<:@default=thunar_debug_default@:>@]),
[], [enable_debug=thunar_debug_default])
AC_MSG_CHECKING([whether to enable debugging support])
if test x"$enable_debug" != x"no"; then
PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3 -DG_DISABLE_DEPRECATED -Werror -Wall"
AC_MSG_RESULT([yes])
if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
dnl Check whether the compiler accepts the -fno-strict-aliasing
dnl switch, as certain packages - like Glib - still don't work
dnl properly with newer compilers.
......@@ -272,21 +276,36 @@ if test x"$enable_debug" != x"no"; then
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
dnl Paranoia for --enable-debug=full
if test x"$enable_debug" = x"full"; then
PLATFORM_CFLAGS="$PLATFORM_CFLAGS -O0 -g3 -Werror -Wall"
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_DEPRECATED -DG_ENABLE_DEBUG"
fi
else
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS -DG_DISABLE_CHECKS"
AC_MSG_RESULT([no])
dnl Disable object cast checks
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_CAST_CHECKS"
AC_MSG_CHECKING([whether $LD accepts -O1])
case `$LD -O1 -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -Wl,-O1"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
dnl Disable all checks for --enable-debug=no
if test x"$enable_debug" = x"no"; then
PLATFORM_CPPFLAGS="$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
fi
fi
AC_MSG_RESULT([$enable_debug])
dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
AC_MSG_CHECKING([whether $LD accepts -O1])
case `$LD -O1 -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -Wl,-O1"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
dnl ****************************************
dnl *** Check for ELF visibility support ***
......@@ -321,8 +340,14 @@ AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])
dnl *********************************
dnl *** Substitute platform flags ***
dnl *********************************
AC_SUBST([PLATFORM_CFLAGS])
AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
AC_SUBST([PLATFORM_CPPFLAGS])
AC_MSG_CHECKING([PLATFORM_CFLAGS])
AC_MSG_RESULT([$PLATFORM_CFLAGS])
AC_SUBST([PLATFORM_CFLAGS])
AC_MSG_CHECKING([PLATFORM_LDFLAGS])
AC_MSG_RESULT([$PLATFORM_LDFLAGS])
AC_SUBST([PLATFORM_LDFLAGS])
dnl *****************************************
......
......@@ -143,7 +143,7 @@ thunar_vfs_info_unref (ThunarVfsInfo *info)
thunar_vfs_mime_info_unref (info->mime_info);
thunar_vfs_path_unref (info->path);
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
memset (info, 0xaa, sizeof (*info));
#endif
......
......@@ -710,7 +710,7 @@ thunar_vfs_mime_database_shutdown_stores (ThunarVfsMimeDatabase *database)
g_hash_table_destroy (store->mimeinfo_cache);
}
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
memset (database->stores, 0xaa, database->n_stores * sizeof (*store));
#endif
......
......@@ -166,7 +166,7 @@ thunar_vfs_mime_info_unref (ThunarVfsMimeInfo *info)
/* free the comment */
if (info->comment != NULL && info->comment != thunar_vfs_mime_info_get_name (info))
{
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
memset (info->comment, 0xaa, strlen (info->comment) + 1);
#endif
g_free (info->comment);
......@@ -175,7 +175,7 @@ thunar_vfs_mime_info_unref (ThunarVfsMimeInfo *info)
/* free the icon name if it isn't one of the statics */
if (G_LIKELY (!thunar_vfs_mime_info_is_static_icon_name (info)))
{
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
if (G_LIKELY (info->icon_name != NULL))
memset (info->icon_name, 0xaa, strlen (info->icon_name) + 1);
#endif
......@@ -446,7 +446,7 @@ _thunar_vfs_mime_info_invalidate_icon_name (ThunarVfsMimeInfo *info)
{
if (!thunar_vfs_mime_info_is_static_icon_name (info))
{
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
if (G_LIKELY (info->icon_name != NULL))
memset (info->icon_name, 0xaa, strlen (info->icon_name));
#endif
......
......@@ -79,7 +79,7 @@ static const gchar HEX_CHARS[16] = "0123456789ABCDEF";
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
G_LOCK_DEFINE_STATIC (debug_paths);
static GList *debug_paths = NULL;
#endif
......@@ -275,7 +275,7 @@ thunar_vfs_path_new (const gchar *identifier,
path->parent = thunar_vfs_path_ref (parent);
/* add the path to the debug list */
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
G_LOCK (debug_paths);
debug_paths = g_list_prepend (debug_paths, path);
G_UNLOCK (debug_paths);
......@@ -364,7 +364,7 @@ thunar_vfs_path_unref (ThunarVfsPath *path)
parent = path->parent;
/* remove the path from the debug list */
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
G_LOCK (debug_paths);
debug_paths = g_list_remove (debug_paths, path);
G_UNLOCK (debug_paths);
......@@ -505,7 +505,7 @@ thunar_vfs_path_relative (ThunarVfsPath *parent,
path->parent = thunar_vfs_path_ref (parent);
/* add the path to the debug list */
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
G_LOCK (debug_paths);
debug_paths = g_list_prepend (debug_paths, path);
G_UNLOCK (debug_paths);
......@@ -1002,7 +1002,7 @@ _thunar_vfs_path_shutdown (void)
g_return_if_fail (n_home_components != 0);
/* print out the list of leaked paths */
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
if (G_UNLIKELY (debug_paths != NULL))
{
GList *lp;
......
......@@ -46,7 +46,7 @@ main (int argc, char **argv)
/* setup application name */
g_set_application_name (_("Thunar"));
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
/* Do NOT remove this line for now, If something doesn't work,
* fix your code instead!
*/
......
......@@ -142,7 +142,7 @@ thunar_file_get_type (void)
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
static gboolean thunar_file_atexit_registered = FALSE;
static void
......@@ -179,7 +179,7 @@ thunar_file_class_init (ThunarFileClass *klass)
{
GObjectClass *gobject_class;
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
if (G_UNLIKELY (!thunar_file_atexit_registered))
{
g_atexit (thunar_file_atexit);
......@@ -299,7 +299,7 @@ thunar_file_finalize (GObject *object)
ThunarFile *file = THUNAR_FILE (object);
/* verify that nobody's watching the file anymore */
#ifndef G_DISABLE_CHECKS
#ifdef G_ENABLE_DEBUG
if (G_UNLIKELY (THUNAR_FILE_GET_WATCH_COUNT (file) != 0))
{
g_error ("Attempt to finalize a ThunarFile, which has an active "
......
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