bug-gettext
[Top][All Lists]
Advanced

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

Re: [bug-gettext] [WARNING: SPOOFED E-MAIL--Non-Aerospace Sender] Re: Li


From: B. Scott Michel
Subject: Re: [bug-gettext] [WARNING: SPOOFED E-MAIL--Non-Aerospace Sender] Re: Linking problem using mingw-w64
Date: Fri, 09 Mar 2012 15:39:27 -0800
User-agent: Roundcube Webmail/0.7.1

Marcel, et al:

Attached is a patch that completes what looks like an attempt at addressing ELF DSOes and WinXX DLLs. Highlights of the patch:

- LIBINTL_DLL_EXPORTED renamed to LIBINTL_VISIBILITY
- less sed magic: If something is supposed to be visible or exported, it's explicitly marked so with LIBINTL_VISIBILITY in libgnuintl.in.h and libgnuintl.h - export.h renamed to intl_visibility.in.h, sed applied to intl_visibility.h to replace @HAVE_VISIBILITY@

Sorry, I cannot make my git repo visible to the external world and I cannot hack using github.com from this address.


-scooter

On 09.03.2012 13:05, B. Scott Michel wrote:

On 09.03.2012 03:39, Marcel Wysocki wrote:

can be fixed using this patch:


http://code.google.com/p/mingw-w64-dgn/source/browse/trunk/patch/gettext-0.18.x-w64.patch
[1] no idea if its a valid fix or just a workaround tho.

It looks like a reasonable workaround. There is a more fundamental
problem to address, if you've grep-ed your code for warnings. For
example, this kind of code generates a warning:

extern __dllimport int exit_failure;
int exit_failure = 1;

GCC 4.6.x and 4.7.x both expect consistency with declaration
attributes, despite the fact that the warnings are fairly harmless.
Unless a gettext maintainer says otherwise, I'm inclined to rework the
Makefile.am and header files so that the suggestions from the "GCC
visibility" pages are implemented properly. That is, using libintl as an
example:

- Change "DLL_VARIABLE" to something more meaningful, such as
"LIBINTL_VISIBILITY".

- config.h.in contains something like this:

#if HAVE_VISIBILITY && COMPILING_ON_WINDOWS_PLATFORM
# if BUILDING_LIBINTL
# define LIBINTL_VISIBILITY __declspec(dllexport)
# else
# define LIBINTL_VISIBILITY __declspec(dllimport)
# endif
#elif defined HAVE_VISIBILITY && BUILDING_LIBINTL
#define LIBINTL_VISIBILITY __attribute__((__visiblity__("default")))
#else
#define LIBINTL_VISIBILITY
#endif

- Eliminate the woe32dll "-export.c" files, since the declaration
attribute takes care of the problem.

- Introduce an install pre-hook that replaces "LIBINTL_VISIBLE" with
"__declspec(dllimport)" when the header files are installed on win32 and
win64.

Yes, I know it will probably break something on FreeBSD or Linux, but
the result will be a more robust code base and allow for future function
visibility modifications for ELF DSOs.

-scooter

"GCC visibility" page:

http://www.gnu.org/software/gnulib/manual/html_node/Exported-Symbols-of-Shared-Libraries.html

Attachment: intl-visibility.patch
Description: Binary data


reply via email to

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