bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gettext cvs


From: Bruno Haible
Subject: Re: gettext cvs
Date: Fri, 12 May 2006 14:35:14 +0200
User-agent: KMail/1.5

Charles Wilson wrote:
> (6) various:
>     progreloc.c: Use access() on cygwin
> 
>     write-mo.h: don't use DLL_VARIABLE (or any form of it) at all.  It's 
> not included by any file that goes into a DLL.  It's only included by 
> msgfmt.c and write-mo.c, both of which are direct sources for 
> msgfmt.exe.  Therefore, the symbols in write-mo.h should never be 
> declspec(anything).
> 
>     filters.h: Add C++ guards since apps on mingw/cygwin are compiled by 
> g++.

Thanks. I applied this without modifications.

> Change AM conditional from MINGW to WOE32GCC.  New AM conditional 
> WOE32GCC_SHLIBS.
> ...
> 
>   /* On Windows, variables that may be in a DLL must be marked specially.  */
> ! #if (defined _MSC_VER && defined _DLL) || ((defined __MINGW32__ || defined 
> __CYGWIN__) && defined DLL_EXPORT)
> ! /* However, note that we are actually using _DLL and DLL_EXPORT in a 
> non-standard way.
> !    These symbols are only defined if *THIS* target is a shared library.  
> However,
> !    we do not need to mark symbols with dllexport -- it's dllimport that is 
> a problem.
> !    For mingw/cygwin, it works like this: DLL_EXPORT is defined by libtool 
> whenever 
> !    it builds a PIC object.  It builds PIC objects when compiling objects 
> for a 
> !    DLL.  With some automake magic, we also define DLL_EXPORT when compiling 
> the
> !    program_SOURCES but only if we know we will be linking them to DLLs.  In 
> this
> !    way, we use DLL_EXPORT to indicate that *LINKED-TO* objects are DLLs, so 
> THEIR 
> !    symbols (not mine) should be decorated with dllimport.  It works 
> similarly with 
> !    the _DLL symbol and MSVC.
> !  */
>   # define DLL_VARIABLE __declspec (dllimport)
>   #else
>   # define DLL_VARIABLE
>   #endif

Thanks a lot for these seminal thoughts. I used these ideas
  - to make a conditional that tests whether --enable-shared is specified,
    regardless of whether currently compiling for the shared or the static
    library,
  - to use __declspec (dllimport) also when compiling non-library parts
    gettext-tools (including the testsuite),
but I did this with no modifications to source files, only to configure.ac
and Makefile.am.

More details in the other mail of this thread.

Bruno





reply via email to

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