This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] bfd/rs6000-core.c


	The new AIX 4.3+ core support assumes a field in the core_dumpx
structure defined in /usr/include/sys/core.h that only exists in AIX 4.3.3
and not earlier releases.  This prevents binutils from building on AIX
4.3.2.  Albert and I have worked out the appended patch.

David


	* rs6000-core.c: Use autoconf variable HAVE_ST_C_IMPL to guard use
	of c_impl field.
	* configure.in: Auto-configure HAVE_ST_C_IMPL.
	* configure.in: Likewise.

--- bfd/configure.in.orig	Fri Jun 22 13:09:23 2001
+++ bfd/configure.in	Fri Jun 22 13:18:11 2001
@@ -301,6 +301,15 @@
 changequote([,])dnl
         COREFILE=rs6000-core.lo
 	COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
+
+	# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
+	# have c_impl as a member of struct core_dumpx
+	AC_MSG_CHECKING([for c_impl in struct core_dumpx])
+	AC_TRY_COMPILE([#include <core.h>],
+	  [struct core_dumpx c; c.c_impl = 0;],
+	  [AC_DEFINE(HAVE_ST_C_IMPL, 1,
+	    [Define if struct core_dumpx has member c_impl])
+	  AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
 	;;
   rs6000-*-aix4*)	COREFILE=rs6000-core.lo ;;
   rs6000-*-*)		COREFILE=rs6000-core.lo ;;
--- bfd/config.in.orig	Fri Jun 22 13:17:50 2001
+++ bfd/config.in	Fri Jun 22 13:18:31 2001
@@ -208,6 +208,9 @@
 /* Define if getenv is not declared in system header files. */
 #undef NEED_DECLARATION_GETENV
 
+/* Define if struct core_dumpx has member c_impl */
+#undef HAVE_ST_C_IMPL
+
 /* Define if <sys/procfs.h> has prstatus_t. */
 #undef HAVE_PRSTATUS_T
 
--- bfd/rs6000-core.c.orig	Fri Jun 22 13:11:09 2001
+++ bfd/rs6000-core.c	Fri Jun 22 13:11:26 2001
@@ -182,7 +182,7 @@
 
 /* Return the c_impl field from struct core_dumpx C.  */
 
-#ifdef AIX_CORE_DUMPX_CORE
+#ifdef HAVE_ST_C_IMPL
 # define CNEW_IMPL(c)	(c).c_impl
 #else
 # define CNEW_IMPL(c)	0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]