From 7e7353ed547e66c371ac3ea4bc2570707f3dbae1 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@gnat.com>
Date: Tue, 29 Mar 2005 08:51:59 +0000
Subject: [PATCH]         * elf.c (elfcore_grok_nto_status): Print tid as long.
         (elfcore_grok_nto_regs): Likewise.

---
 bfd/ChangeLog | 5 +++++
 bfd/elf.c     | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d8578384349..ee28ddbff3e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-29  Joel Brobecker  <brobecker@gnat.com>
+
+	* elf.c (elfcore_grok_nto_status): Print tid as long.
+	(elfcore_grok_nto_regs): Likewise.
+
 2005-03-29  Joel Brobecker  <brobecker@gnat.com>
 
         * irix-core.c: Remove some unnecessary prototypes.
diff --git a/bfd/elf.c b/bfd/elf.c
index 22230f2c777..4e2b21b415e 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7335,7 +7335,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
     elf_tdata (abfd)->core_lwpid = *tid;
 
   /* Make a ".qnx_core_status/%d" section.  */
-  sprintf (buf, ".qnx_core_status/%d", *tid);
+  sprintf (buf, ".qnx_core_status/%ld", (long) *tid);
 
   name = bfd_alloc (abfd, strlen (buf) + 1);
   if (name == NULL)
@@ -7365,7 +7365,7 @@ elfcore_grok_nto_regs (bfd *abfd,
   asection *sect;
 
   /* Make a "(base)/%d" section.  */
-  sprintf (buf, "%s/%d", base, tid);
+  sprintf (buf, "%s/%ld", base, (long) tid);
 
   name = bfd_alloc (abfd, strlen (buf) + 1);
   if (name == NULL)