libbacktrace: call GetModuleFileNameA on Windows

Patch from Björn Schäpers.

	* fileline.c: Include <windows.h> if available.
	(windows_get_executable_path): New static function.
	(fileline_initialize): Call windows_get_executable_path.
	* configure.ac: Checked for windows.h
	* configure: Regenerate.
	* config.h.in: Regenerate.
This commit is contained in:
Ian Lance Taylor
2023-11-29 14:01:49 -08:00
parent 9ae4f4ae44
commit 25889d241c
4 changed files with 66 additions and 2 deletions

View File

@@ -373,6 +373,8 @@ if test "$have_loadquery" = "yes"; then
AC_DEFINE(HAVE_LOADQUERY, 1, [Define if AIX loadquery is available.])
fi
AC_CHECK_HEADERS(windows.h)
# Check for the fcntl function.
if test -n "${with_target_subdir}"; then
case "${host}" in