Jacek Caban : dbghelp: Don't use system headers for ELF declarations.

Alexandre Julliard julliard at winehq.org
Tue Mar 31 16:44:25 CDT 2020


Module: wine
Branch: master
Commit: b664ae8e60e08224cdc3025c28a37cb22356aaa4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b664ae8e60e08224cdc3025c28a37cb22356aaa4

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Mar 31 18:23:45 2020 +0200

dbghelp: Don't use system headers for ELF declarations.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure                    | 34 ----------------------------------
 configure.ac                 | 10 ----------
 dlls/dbghelp/elf_module.c    |  6 +-----
 dlls/dbghelp/image_private.h | 17 -----------------
 include/config.h.in          | 12 ------------
 5 files changed, 1 insertion(+), 78 deletions(-)

diff --git a/configure b/configure
index ee1ebe8066..018fb1bfd7 100755
--- a/configure
+++ b/configure
@@ -7438,10 +7438,8 @@ for ac_header in \
 	sys/attr.h \
 	sys/auxv.h \
 	sys/cdio.h \
-	sys/elf32.h \
 	sys/epoll.h \
 	sys/event.h \
-	sys/exec_elf.h \
 	sys/filio.h \
 	sys/ioctl.h \
 	sys/ipc.h \
@@ -18571,38 +18569,6 @@ _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 b05a0f540a..9bae6a5dda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -498,10 +498,8 @@ AC_CHECK_HEADERS(\
 	sys/attr.h \
 	sys/auxv.h \
 	sys/cdio.h \
-	sys/elf32.h \
 	sys/epoll.h \
 	sys/event.h \
-	sys/exec_elf.h \
 	sys/filio.h \
 	sys/ioctl.h \
 	sys/ipc.h \
@@ -2313,14 +2311,6 @@ 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 ae25170bfc..23cb8a54b7 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -24,9 +24,6 @@
 
 #if defined(__svr4__) || defined(__sun)
 #define __ELF__ 1
-/* large files are not supported by libelf */
-#undef _FILE_OFFSET_BITS
-#define _FILE_OFFSET_BITS 32
 #endif
 
 #include <assert.h>
@@ -34,9 +31,8 @@
 #include <stdlib.h>
 
 #include "dbghelp_private.h"
-#include "winternl.h"
-
 #include "image_private.h"
+#include "winternl.h"
 
 #include "wine/debug.h"
 #include "wine/heap.h"
diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h
index 8c6f463ecb..2b414b9607 100644
--- a/dlls/dbghelp/image_private.h
+++ b/dlls/dbghelp/image_private.h
@@ -19,23 +19,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#ifdef HAVE_ELF_H
-# include <elf.h>
-#endif
-#ifdef HAVE_SYS_ELF32_H
-# include <sys/elf32.h>
-#endif
-#ifdef HAVE_SYS_EXEC_ELF_H
-# include <sys/exec_elf.h>
-#endif
-#if !defined(DT_NUM)
-# if defined(DT_COUNT)
-#  define DT_NUM DT_COUNT
-# else
-/* this seems to be a satisfactory value on Solaris, which doesn't support this AFAICT */
-#  define DT_NUM 24
-# endif
-#endif
 #ifdef HAVE_LINK_H
 # include <link.h>
 #endif
diff --git a/include/config.h.in b/include/config.h.in
index d670f2b51a..b6da8d8684 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -887,9 +887,6 @@
 /* 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
 
@@ -905,9 +902,6 @@
 /* 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
 
@@ -1018,18 +1012,12 @@
 /* Define to 1 if you have the <sys/cdio.h> header file. */
 #undef HAVE_SYS_CDIO_H
 
-/* Define to 1 if you have the <sys/elf32.h> header file. */
-#undef HAVE_SYS_ELF32_H
-
 /* Define to 1 if you have the <sys/epoll.h> header file. */
 #undef HAVE_SYS_EPOLL_H
 
 /* Define to 1 if you have the <sys/event.h> header file. */
 #undef HAVE_SYS_EVENT_H
 
-/* Define to 1 if you have the <sys/exec_elf.h> header file. */
-#undef HAVE_SYS_EXEC_ELF_H
-
 /* Define to 1 if you have the <sys/filio.h> header file. */
 #undef HAVE_SYS_FILIO_H
 




More information about the wine-cvs mailing list