This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch 1/2] Rename COMPAT_VERSION to COMPAT_VERSION_SAMEPROTO


Hi,

jankratochvil/compatversion

in [patch 2/2] COMPAT_VERSION needs to be used with function of a different
prototype causing:

dwfl_report_elf.c:300:1: error: conflicting types for ‘_compat_without_add_p_vaddr_dwfl_report_elf’
dwfl_report_elf.c:297:1: note: previous declaration of ‘_compat_without_add_p_vaddr_dwfl_report_elf’ was here


Thanks,
Jan


commit 4cc52dbb6e9ab3773479a833282494ef47552d59
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 28 20:10:33 2013 +0200

    Rename COMPAT_VERSION to COMPAT_VERSION_SAMEPROTO.
    
    lib/
    	* eu-config.h (COMPAT_VERSION): Move its __typeof part ...
    	(COMPAT_VERSION_SAMEPROTO): ... into this new wrapper.  Twice.
    
    libdwfl/
    	* dwfl_module_build_id.c: Use COMPAT_VERSION_SAMEPROTO instead of
    	COMPAT_VERSION.
    
    Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>

diff --git a/lib/ChangeLog b/lib/ChangeLog
index 1fa4249..9af0655 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* eu-config.h (COMPAT_VERSION): Move its __typeof part ...
+	(COMPAT_VERSION_SAMEPROTO): ... into this new wrapper.  Twice.
+
 2013-04-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* system.h (LE64, BE64): Move here the definitions from
diff --git a/lib/eu-config.h b/lib/eu-config.h
index 68efb82..94eede8 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -171,12 +171,16 @@ asm (".section predict_data, \"aw\"; .previous\n"
 # define NEW_VERSION(name, version) \
   asm (".symver " #name "," #name "@@@" #version);
 # define COMPAT_VERSION(name, version, prefix) \
-  asm (".symver _compat." #version "." #name "," #name "@" #version); \
+  asm (".symver _compat." #version "." #name "," #name "@" #version);
+# define COMPAT_VERSION_SAMEPROTO(name, version, prefix) \
+  COMPAT_VERSION (name, version, prefix); \
   __typeof (name) _compat_##prefix##_##name asm ("_compat." #version "." #name);
 #else
 # define OLD_VERSION(name, version) /* Nothing for static linking.  */
 # define NEW_VERSION(name, version) /* Nothing for static linking.  */
 # define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SHARED"
+# define COMPAT_VERSION_SAMEPROTO(name, version, prefix) \
+  error "should use #ifdef SHARED"
 #endif
 
 
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 42f720c..c1a42d8 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwfl_module_build_id.c: Use COMPAT_VERSION_SAMEPROTO instead of
+	COMPAT_VERSION.
+
 2013-04-27  Mark Wielaard  <mjw@redhat.com>
 
 	* link_map.c: #include system.h.
diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c
index 660c733..84c0674 100644
--- a/libdwfl/dwfl_module_build_id.c
+++ b/libdwfl/dwfl_module_build_id.c
@@ -159,7 +159,7 @@ INTDEF (dwfl_module_build_id)
 NEW_VERSION (dwfl_module_build_id, ELFUTILS_0.138)
 
 #ifdef SHARED
-COMPAT_VERSION (dwfl_module_build_id, ELFUTILS_0.130, vaddr_at_end)
+COMPAT_VERSION_SAMEPROTO (dwfl_module_build_id, ELFUTILS_0.130, vaddr_at_end)
 
 int
 _compat_vaddr_at_end_dwfl_module_build_id (Dwfl_Module *mod,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]