Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / rs6000-core.c
index 696e8fdd99105cb4b8222da76c4c19959bcc0279..74bde846dec2b811bad8256dd578da78b7955f59 100644 (file)
@@ -1,5 +1,5 @@
 /* IBM RS/6000 "XCOFF" back-end for BFD.
-   Copyright (C) 1990-2020 Free Software Foundation, Inc.
+   Copyright (C) 1990-2021 Free Software Foundation, Inc.
    Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
    Archive support from Damon A. Permezel.
    Contributed by IBM Corporation and Cygnus Support.
@@ -277,28 +277,27 @@ typedef union
 /* Define prototypes for certain functions, to avoid a compiler warning
    saying that they are missing.  */
 
-const bfd_cleanup rs6000coff_core_p (bfd *abfd);
-bfd_boolean rs6000coff_core_file_matches_executable_p (bfd *core_bfd,
-                                                      bfd *exec_bfd);
+bfd_cleanup rs6000coff_core_p (bfd *abfd);
+bool rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd);
 char * rs6000coff_core_file_failing_command (bfd *abfd);
 int rs6000coff_core_file_failing_signal (bfd *abfd);
 
 /* Try to read into CORE the header from the core file associated with ABFD.
    Return success.  */
 
-static bfd_boolean
+static bool
 read_hdr (bfd *abfd, CoreHdr *core)
 {
   bfd_size_type size;
 
   if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
-    return FALSE;
+    return false;
 
   /* Read the leading portion that old and new core dump structures have in
      common.  */
   size = CORE_COMMONSZ;
   if (bfd_bread (core, size, abfd) != size)
-    return FALSE;
+    return false;
 
   /* Read the trailing portion of the structure.  */
   if (CORE_NEW (*core))
@@ -697,7 +696,7 @@ rs6000coff_core_p (bfd *abfd)
 
 /* Return `TRUE' if given core is from the given executable.  */
 
-bfd_boolean
+bool
 rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
 {
   CoreHdr core;
@@ -705,11 +704,11 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
   char *path, *s;
   size_t alloc;
   const char *str1, *str2;
-  bfd_boolean ret;
+  bool ret;
   file_ptr c_loader;
 
   if (!read_hdr (core_bfd, &core))
-    return FALSE;
+    return false;
 
   if (CORE_NEW (core))
     c_loader = CNEW_LOADER (core.new_dump);
@@ -724,12 +723,12 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
     size = (int) ((LdInfo *) 0)->l32.ldinfo_filename;
 
   if (bfd_seek (core_bfd, c_loader + size, SEEK_SET) != 0)
-    return FALSE;
+    return false;
 
   alloc = 100;
   path = bfd_malloc ((bfd_size_type) alloc);
   if (path == NULL)
-    return FALSE;
+    return false;
   s = path;
 
   while (1)
@@ -737,7 +736,7 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
       if (bfd_bread (s, (bfd_size_type) 1, core_bfd) != 1)
        {
          free (path);
-         return FALSE;
+         return false;
        }
       if (*s == '\0')
        break;
@@ -751,7 +750,7 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
          if (n == NULL)
            {
              free (path);
-             return FALSE;
+             return false;
            }
          s = n + (path - s);
          path = n;
@@ -766,9 +765,9 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
   str2 = str2 != NULL ? str2 + 1 : bfd_get_filename (exec_bfd);
 
   if (strcmp (str1, str2) == 0)
-    ret = TRUE;
+    ret = true;
   else
-    ret = FALSE;
+    ret = false;
 
   free (path);
 
This page took 0.024829 seconds and 4 git commands to generate.