Huw Davies : dbghelp: Add a couple of structures that are missing from the Android ndk.
Alexandre Julliard
julliard at winehq.org
Tue Sep 24 03:22:01 CDT 2013
Module: wine
Branch: master
Commit: 96e32da5c9f51fd7b8fd987b096d73b61e539ebd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=96e32da5c9f51fd7b8fd987b096d73b61e539ebd
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Sep 23 14:49:39 2013 +0100
dbghelp: Add a couple of structures that are missing from the Android ndk.
---
configure | 32 ++++++++++++++++++++++++++++++++
configure.ac | 8 ++++++++
dlls/dbghelp/elf_module.c | 26 ++++++++++++++++++++++++++
include/config.h.in | 6 ++++++
4 files changed, 72 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 7cbe217..2e21690 100755
--- a/configure
+++ b/configure
@@ -14220,6 +14220,38 @@ _ACEOF
fi
+ac_fn_c_check_type "$LINENO" "struct r_debug" "ac_cv_type_struct_r_debug" "#ifdef HAVE_LINK_H
+#include <link.h>
+#endif
+#ifdef HAVE_SYS_LINK_H
+#include <sys/link.h>
+#endif
+"
+if test "x$ac_cv_type_struct_r_debug" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_R_DEBUG 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "struct link_map" "ac_cv_type_struct_link_map" "#ifdef HAVE_LINK_H
+#include <link.h>
+#endif
+#ifdef HAVE_SYS_LINK_H
+#include <sys/link.h>
+#endif
+"
+if test "x$ac_cv_type_struct_link_map" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_LINK_MAP 1
+_ACEOF
+
+
+fi
+
+
ac_fn_c_check_member "$LINENO" "struct ff_effect" "direction" "ac_cv_member_struct_ff_effect_direction" "#ifdef HAVE_LINUX_INPUT_H
#include <linux/input.h>
#endif
diff --git a/configure.ac b/configure.ac
index 8b78cfe..d733610 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2203,6 +2203,14 @@ AC_CHECK_TYPES([struct xinpgen],,,
#include <netinet/in_pcb.h>
#endif])
+AC_CHECK_TYPES([struct r_debug, struct link_map],,,
+[#ifdef HAVE_LINK_H
+#include <link.h>
+#endif
+#ifdef HAVE_SYS_LINK_H
+#include <sys/link.h>
+#endif])
+
AC_CHECK_MEMBERS([struct ff_effect.direction],,,
[#ifdef HAVE_LINUX_INPUT_H
#include <linux/input.h>
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index f8015c1..8539d0c 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -60,6 +60,32 @@
#define NT_GNU_BUILD_ID 3
#endif
+#ifndef HAVE_STRUCT_R_DEBUG
+struct r_debug
+{
+ int r_version;
+ struct link_map *r_map;
+ ElfW(Addr) r_brk;
+ enum
+ {
+ RT_CONSISTENT,
+ RT_ADD,
+ RT_DELETE
+ } r_state;
+ ElfW(Addr) r_ldbase;
+};
+#endif /* HAVE_STRUCT_R_DEBUG */
+
+#ifndef HAVE_STRUCT_LINK_MAP
+struct link_map
+{
+ ElfW(Addr) l_addr;
+ char *l_name;
+ ElfW(Dyn) *l_ld;
+ struct link_map *l_next, *l_prev;
+};
+#endif /* HAVE_STRUCT_LINK_MAP */
+
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
struct elf_info
diff --git a/include/config.h.in b/include/config.h.in
index 1f0bfea..5863d10 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -825,6 +825,9 @@
/* Define to 1 if `ips_total' is a member of `struct ip_stats'. */
#undef HAVE_STRUCT_IP_STATS_IPS_TOTAL
+/* Define to 1 if the system has the type `struct link_map'. */
+#undef HAVE_STRUCT_LINK_MAP
+
/* Define to 1 if `msg_accrights' is a member of `struct msghdr'. */
#undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
@@ -840,6 +843,9 @@
/* Define to 1 if `name' is a member of `struct option'. */
#undef HAVE_STRUCT_OPTION_NAME
+/* Define to 1 if the system has the type `struct r_debug'. */
+#undef HAVE_STRUCT_R_DEBUG
+
/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */
#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
More information about the wine-cvs
mailing list