]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Unify {BE,LE}{32,64} in lib/system.h.
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 26 Apr 2013 15:00:50 +0000 (17:00 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 26 Apr 2013 15:00:50 +0000 (17:00 +0200)
lib/
* system.h (LE64, BE64): Move here the definitions from
libdwfl/link_map.c.

libdwfl/
* link_map.c (BE32, BE64, LE32, LE64): Delete the definitions, move
them to lib/system.h.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
lib/ChangeLog
lib/system.h
libdwfl/ChangeLog
libdwfl/link_map.c

index b97aba38b4b44bbb6a278c8d19a3b17c2c308fcb..1fa42491d867e65ec2af20605fa44ccde462bec1 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * system.h (LE64, BE64): Move here the definitions from
+       libdwfl/link_map.c.
+
 2013-04-24  Mark Wielaard  <mjw@redhat.com>
 
        * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
index 8367f2bc01cedbace8ebe36d58659b5ce24887ae..f31cfd03e26f4d7ad99d4ef59bd99952ae857f60 100644 (file)
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 # define LE32(n)       (n)
+# define LE64(n)       (n)
 # define BE32(n)       bswap_32 (n)
+# define BE64(n)       bswap_64 (n)
 #elif __BYTE_ORDER == __BIG_ENDIAN
 # define BE32(n)       (n)
+# define BE64(n)       (n)
 # define LE32(n)       bswap_32 (n)
+# define LE64(n)       bswap_64 (n)
 #else
 # error "Unknown byte order"
 #endif
index e8285d14e651cd35aae3bbb74a251aee7850e50b..0160534e5aa9caf0da61ef26bab834ac505c2cf7 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * link_map.c (BE32, BE64, LE32, LE64): Delete the definitions, move
+       them to lib/system.h.
+
 2013-04-24  Mark Wielaard  <mjw@redhat.com>
 
        * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
index 00913fe2314c0948892375aac1c1b763adfd8b12..19f92df866a35af6964d1375bd920a71f67b9601 100644 (file)
 #define PROBE_VAL32    sizeof (Elf32_Phdr)
 #define PROBE_VAL64    sizeof (Elf64_Phdr)
 
-#if BYTE_ORDER == BIG_ENDIAN
-# define BE32(x)       (x)
-# define BE64(x)       (x)
-# define LE32(x)       bswap_32 (x)
-# define LE64(x)       bswap_64 (x)
-#else
-# define LE32(x)       (x)
-# define LE64(x)       (x)
-# define BE32(x)       bswap_32 (x)
-# define BE64(x)       bswap_64 (x)
-#endif
-
 
 /* Examine an auxv data block and determine its format.
    Return true iff we figured it out.  */