Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GIMP
Commits
cfaaec63
Commit
cfaaec63
authored
Jan 02, 2023
by
Luca Bacci
Committed by
Jehan
Jan 24, 2023
Browse files
Use ExcHndlSetLogFileNameW ()
This is a Dr.MinGW function
parent
11801cf4
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/signals.c
View file @
cfaaec63
...
...
@@ -51,9 +51,12 @@ static void gimp_sigfatal_handler (gint sig_num) G_GNUC_NORETURN;
void
gimp_init_signal_handlers
(
gchar
**
backtrace_file
)
{
time_t
t
;
gchar
*
filename
;
gchar
*
dir
;
time_t
t
;
gchar
*
filename
;
gchar
*
dir
;
#if defined (G_OS_WIN32) && defined (HAVE_EXCHNDL)
wchar_t
*
backtrace_file_utf16
;
#endif
#ifdef G_OS_WIN32
/* This has to be the non-roaming directory (i.e., the local
...
...
@@ -92,7 +95,12 @@ gimp_init_signal_handlers (gchar **backtrace_file)
g_prevExceptionFilter
=
SetUnhandledExceptionFilter
(
gimp_sigfatal_handler
);
ExcHndlInit
();
ExcHndlSetLogFileNameA
(
*
backtrace_file
);
if
((
backtrace_file_utf16
=
g_utf8_to_utf16
(
*
backtrace_file
,
-
1
,
NULL
,
NULL
,
NULL
)))
{
ExcHndlSetLogFileNameW
(
backtrace_file_utf16
);
g_free
(
backtrace_file_utf16
);
}
#endif
/* HAVE_EXCHNDL */
...
...
configure.ac
View file @
cfaaec63
...
...
@@ -959,7 +959,7 @@ AC_MSG_RESULT([$with_win32_32bit_dll_folder])
enable_drmingw="no"
if test "x$platform_win32" = "xyes"; then
# Check for Dr. Mingw
AC_CHECK_LIB(exchndl, ExcHndlSetLogFileName
A
,
AC_CHECK_LIB(exchndl, ExcHndlSetLogFileName
W
,
[
AC_DEFINE(HAVE_EXCHNDL, 1, [Define to 1 when Dr. MingW is available])
LIBS="-lexchndl $LIBS"
...
...
@@ -968,7 +968,7 @@ if test "x$platform_win32" = "xyes"; then
[enable_drmingw="no (ExcHndl library missing)"]
)
fi
AM_CONDITIONAL(HAVE_EXCHNDL, test "x$ac_cv_lib_exchndl_ExcHndlSetLogFileName
A
" = "xyes")
AM_CONDITIONAL(HAVE_EXCHNDL, test "x$ac_cv_lib_exchndl_ExcHndlSetLogFileName
W
" = "xyes")
###########################
# Check for backtrace() API
...
...
libgimp/gimp.c
View file @
cfaaec63
...
...
@@ -224,9 +224,10 @@ gimp_main (GType plug_in_type,
#ifdef HAVE_EXCHNDL
/* Use Dr. Mingw (dumps backtrace on crash) if it is available. */
{
time_t
t
;
gchar
*
filename
;
gchar
*
dir
;
time_t
t
;
gchar
*
filename
;
gchar
*
dir
;
wchar_t
*
plug_in_backtrace_path_utf16
;
/* This has to be the non-roaming directory (i.e., the local
* directory) as backtraces correspond to the binaries on this
...
...
@@ -252,7 +253,14 @@ gimp_main (GType plug_in_type,
_prevExceptionFilter
=
SetUnhandledExceptionFilter
(
gimp_plugin_sigfatal_handler
);
ExcHndlInit
();
ExcHndlSetLogFileNameA
(
plug_in_backtrace_path
);
plug_in_backtrace_path_utf16
=
g_utf8_to_utf16
(
plug_in_backtrace_path
,
-
1
,
NULL
,
NULL
,
NULL
);
if
(
plug_in_backtrace_path_utf16
)
{
ExcHndlSetLogFileNameW
(
plug_in_backtrace_path_utf16
);
g_free
(
plug_in_backtrace_path_utf16
);
}
}
#endif
/* HAVE_EXCHNDL */
...
...
meson.build
View file @
cfaaec63
...
...
@@ -578,7 +578,7 @@ conf.set('HAVE_LIBUNWIND', libunwind.found())
drmingw
=
no_dep
if
platform_windows
exchndl
=
cc
.
find_library
(
'exchndl'
,
required
:
false
)
exchndl_fn
=
cc
.
has_function
(
'ExcHndlSetLogFileName
A
'
,
dependencies
:
exchndl
)
exchndl_fn
=
cc
.
has_function
(
'ExcHndlSetLogFileName
W
'
,
dependencies
:
exchndl
)
if
exchndl
.
found
()
and
exchndl_fn
drmingw
=
declare_dependency
(
dependencies
:
exchndl
)
endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment