Bug 19143

Summary: Proper DLL_ENTRY definition
Product: FriBidi Reporter: Christophe GISQUET <christophe.gisquet>
Component: generalAssignee: Behdad Esfahbod <freedesktop>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: DLL_ENTRY for windows dynamic library

Description Christophe GISQUET 2008-12-17 13:46:55 UTC
Created attachment 21252 [details] [review]
DLL_ENTRY for windows dynamic library

For mingw and Visual Studio, typical compilers for the windows environment, there are "keywords" to declare:
- if a symbol should be exported in a shared library when building it: __declspec(dllexport)
- if the symbol comes from such a shared library: __declspec(dllimport)

Those of course are not to be used if the library is built as static. This is, I think, not properly handled by fribidi 0.19.1, contrary to, for instance, curl which I used as a basis for the attached patch.

It introduces 2 macro definitions that should be set by the build/configure system:
- FRIBIDI_STATICLIB: indicating whether the lib is static or dynamic (only used when macro defs insure that the target system is windows)
- BUILDING_FRIBIDI: again under windows, enable the addition of the proper "keyword" if the file is included during fribidi build or just during a regular compilation.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.