Nmap Development mailing list archives

[Exp PATCH] Stop tons of 'visibility' warnings when compiling liblua


From: Kris Katterjohn <katterjohn () gmail com>
Date: Thu, 01 Mar 2007 13:40:57 -0600

The attached patch (/nmap-exp/kris SVN r4520) removes a few lines from
liblua/luaconf.h to stop a bunch of warnings that I'm getting:


$ make &>../output
$ cd ..
$ grep visibility output|head
lobject.h:365: warning: `visibility' attribute directive ignored
lobject.h:369: warning: `visibility' attribute directive ignored
lobject.h:370: warning: `visibility' attribute directive ignored
lobject.h:371: warning: `visibility' attribute directive ignored
lobject.h:372: warning: `visibility' attribute directive ignored
lobject.h:373: warning: `visibility' attribute directive ignored
lobject.h:375: warning: `visibility' attribute directive ignored
lobject.h:376: warning: `visibility' attribute directive ignored
lobject.h:377: warning: `visibility' attribute directive ignored
lapi.h:14: warning: `visibility' attribute directive ignored
$ grep visibility output|wc -l
   1352


Is anybody else getting all of this?  Any better ideas than removing
that whole little section?

I'm using gcc 3.2.2.

Thanks,
Kris Katterjohn
Index: liblua/luaconf.h
===================================================================
--- liblua/luaconf.h    (revision 4519)
+++ liblua/luaconf.h    (revision 4520)
@@ -162,19 +162,10 @@
 @* exported to outside modules.
 @@ LUAI_DATA is a mark for all extern (const) variables that are not to
 @* be exported to outside modules.
-** CHANGE them if you need to mark them in some special way. Elf/gcc
-** (versions 3.2 and later) mark them as "hidden" to optimize access
-** when Lua is compiled as a shared library.
 */
 #if defined(luaall_c)
 #define LUAI_FUNC      static
 #define LUAI_DATA      /* empty */
-
-#elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
-      defined(__ELF__)
-#define LUAI_FUNC      __attribute__((visibility("hidden"))) extern
-#define LUAI_DATA      LUAI_FUNC
-
 #else
 #define LUAI_FUNC      extern
 #define LUAI_DATA      extern

Attachment: signature.asc
Description: OpenPGP digital signature


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: