]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Rename readctx.{c,h} to .{cc,hh}
authorPetr Machata <pmachata@redhat.com>
Mon, 7 Mar 2011 12:35:53 +0000 (13:35 +0100)
committerPetr Machata <pmachata@redhat.com>
Mon, 7 Mar 2011 12:35:53 +0000 (13:35 +0100)
- I had something in mind that needed the C++ bits from the rest of
  dwarflint, but that turned out to be too convoluted to be practical

dwarflint/Makefile.am
dwarflint/checked_read.hh
dwarflint/main.cc
dwarflint/readctx.cc [moved from dwarflint/readctx.c with 95% similarity]
dwarflint/readctx.hh [moved from dwarflint/readctx.h with 100% similarity]
dwarflint/reloc.cc

index 05fea4d4606f5f098ccb3613fdc1c024ac5bd7df..d9ef2ab2dfc7023fae592fa2f200c457ecf4d994 100644 (file)
@@ -63,7 +63,7 @@ dwarflint_SOURCES = \
        misc.cc misc.hh \
        option.cc option.hh option.ii \
        pri.cc pri.hh \
-       readctx.c readctx.h \
+       readctx.cc readctx.hh \
        reloc.cc reloc.hh \
        section_id.cc section_id.hh \
        sections.cc sections.hh sections.ii \
index 0843aaf17fd9f2ccd11858fa0fb9afd3bb0ba50b..4171b57a6f3fbef8fb83d0b3fe65958907f36b4c 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef DWARFLINT_CHECKED_READ_HH
 #define DWARFLINT_CHECKED_READ_HH
 
-#include "readctx.h"
+#include "readctx.hh"
 #include "where.h"
 #include "dwarf_version.hh"
 
index c68e35da44fb783e00ebd922fd865de6a7648699..818d30f698c792155b1b01bcdde1ec808821bc88 100644 (file)
@@ -34,7 +34,7 @@
 #include <sstream>
 
 #include "dwarflint.hh"
-#include "readctx.h"
+#include "readctx.hh"
 #include "checks.hh"
 #include "option.hh"
 #include "messages.hh"
similarity index 95%
rename from dwarflint/readctx.c
rename to dwarflint/readctx.cc
index 8807215f6d0b9ed664b5af5dd360f6036271c1cb..d7ed1c1646b867c95a0a0830f29de366dcd08982 100644 (file)
@@ -24,7 +24,7 @@
    Network licensing program, please visit www.openinventionnetwork.com
    <http://www.openinventionnetwork.com>.  */
 
-#include "readctx.h"
+#include "readctx.hh"
 #include "../libdw/dwarf.h"
 
 #include <stdlib.h>
@@ -47,7 +47,7 @@ union unaligned
 static uint16_t
 read_2ubyte_unaligned (const void *p, bool other_byte_order)
 {
-  const union unaligned *up = p;
+  const union unaligned *up = (const union unaligned *)p;
   if (other_byte_order)
     return bswap_16 (up->u2);
   return up->u2;
@@ -58,7 +58,7 @@ read_2ubyte_unaligned (const void *p, bool other_byte_order)
 uint32_t
 dwarflint_read_4ubyte_unaligned (const void *p, bool other_byte_order)
 {
-  const union unaligned *up = p;
+  const union unaligned *up = (const union unaligned *)p;
   if (other_byte_order)
     return bswap_32 (up->u4);
   return up->u4;
@@ -67,7 +67,7 @@ dwarflint_read_4ubyte_unaligned (const void *p, bool other_byte_order)
 uint64_t
 dwarflint_read_8ubyte_unaligned (const void *p, bool other_byte_order)
 {
-  const union unaligned *up = p;
+  const union unaligned *up = (const union unaligned *)p;
   if (other_byte_order)
     return bswap_64 (up->u8);
   return up->u8;
@@ -98,9 +98,9 @@ read_ctx_init (struct read_ctx *ctx, Elf_Data *data, bool other_byte_order)
     abort ();
 
   ctx->data = data;
-  ctx->begin = data->d_buf;
-  ctx->end = data->d_buf + data->d_size;
-  ctx->ptr = data->d_buf;
+  ctx->begin = (const unsigned char *)data->d_buf;
+  ctx->end = (const unsigned char *)data->d_buf + data->d_size;
+  ctx->ptr = (const unsigned char *)data->d_buf;
   ctx->other_byte_order = other_byte_order;
 }
 
similarity index 100%
rename from dwarflint/readctx.h
rename to dwarflint/readctx.hh
index 8edc78b2dcc821daa878aea2eb68d50320b6abed..da389d930f04c61adfc53609190616c04844688c 100644 (file)
@@ -30,7 +30,7 @@
 #include "elf_file.hh"
 #include "messages.hh"
 #include "misc.hh"
-#include "readctx.h"
+#include "readctx.hh"
 
 #include <sstream>
 #include <libebl.h>