2001-02-28 Andreas Jaeger <aj@suse.de>
[deliverable/binutils-gdb.git] / bfd / hpux-core.c
index 3baefb18a1358f0acf65eb2cdf8907a6894f8538..cc8207769fd7e5b5a5550d4fe3bca3e0f85c72a4 100644 (file)
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "sysdep.h"
 #include "libbfd.h"
 
-#if defined (HOST_HPPAHPUX) || defined (HOST_HP300HPUX)
+#if defined (HOST_HPPAHPUX) || defined (HOST_HP300HPUX) || defined (HOST_HPPAMPEIX)
 
 /* FIXME: sys/core.h doesn't exist for HPUX version 7.  HPUX version
    5, 6, and 7 core files seem to be standard trad-core.c type core
@@ -46,7 +46,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #endif /* HOST_HPPABSD */
 
 #include <sys/param.h>
-#include <sys/dir.h>
+#ifdef HAVE_DIRENT_H
+# include <dirent.h>
+#else
+# ifdef HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif
+# ifdef HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif
+# ifdef HAVE_NDIR_H
+#  include <ndir.h>
+# endif
+#endif
 #include <signal.h>
 #include <machine/reg.h>
 #include <sys/user.h>          /* After a.out.h  */
@@ -73,7 +85,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* .lwpid and .user_tid are only valid if PROC_INFO_HAS_THREAD_ID, else they
    are set to 0.  Also, until HP-UX implements MxN threads, .user_tid and
    .lwpid are synonymous. */
-struct hpux_core_struct 
+struct hpux_core_struct
 {
   int sig;
   int lwpid;               /* Kernel thread ID. */
@@ -130,7 +142,6 @@ hpux_core_make_empty_symbol (abfd)
   return new;
 }
 
-
 /* this function builds a bfd target if the file is a corefile.
    It returns null or 0 if it finds out thaat it is not a core file.
    The way it checks this is by looking for allowed 'type' field values.
@@ -276,7 +287,7 @@ hpux_core_core_file_p (abfd)
              */
          unknown_sections++;
           break;
-       
+
          default: return 0; /*unrecognized core file type */
        }
     }
@@ -290,8 +301,9 @@ hpux_core_core_file_p (abfd)
      built.
      */
   if ((unknown_sections > 0) && (good_sections > 0))
-    warning ("%s appears to be a core file,\nbut contains unknown sections.  It may have been created on an incompatible\nversion of HP-UX.  As a result, some information may be unavailable.\n",
-             abfd->filename);
+    (*_bfd_error_handler)
+      ("%s appears to be a core file,\nbut contains unknown sections.  It may have been created on an incompatible\nversion of HP-UX.  As a result, some information may be unavailable.\n",
+       abfd->filename);
 
   return abfd->xvec;
 }
@@ -376,7 +388,7 @@ const bfd_target hpux_core_vec =
      bfd_false, bfd_false,
      bfd_false, bfd_false
     },
-    
+
        BFD_JUMP_TABLE_GENERIC (_bfd_generic),
        BFD_JUMP_TABLE_COPY (_bfd_generic),
        BFD_JUMP_TABLE_CORE (hpux_core),
@@ -387,5 +399,7 @@ const bfd_target hpux_core_vec =
        BFD_JUMP_TABLE_LINK (_bfd_nolink),
        BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
 
+    NULL,
+
     (PTR) 0                    /* backend_data */
 };
This page took 0.02668 seconds and 4 git commands to generate.