libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Make compilation of preloaded module glue -Wstrict-prototypes cl


From: Lennart Poettering
Subject: [PATCH] Make compilation of preloaded module glue -Wstrict-prototypes clean
Date: Sat, 21 Feb 2009 04:10:37 +0100
User-agent: Leviathan/19.8.0 [zh] (Cray 3; I; Solaris 4.711; Console)

When generating the glue code for preloaded modules libtool produces
invalid prototypes without argument lists. When compiling with
slightly fascist compiler options (-Wstrict-prototypes) this has the
effect of causing gcc to print gazillions of warnings when the final
libtool call is done -- for each symbol one.

The fix is trivial. The prototypes should have an argument list of void,
not empty.
---
 libltdl/m4/libtool.m4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index b75a55a..6f92d02 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -3308,7 +3308,7 @@ esac
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int 
\1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int 
\1(void);/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  
{\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  
{\"\2\", (void *) \&\2},/p'"
-- 
1.6.1.3

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]