Enhance FOO_EXPORT macro

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Sun May 6 16:12:20 BST 2007


Allen Winter schrieb:
> On Sunday 06 May 2007 10:43:01 am you wrote:
>> Allen Winter schrieb:
>>> On Friday 04 May 2007 8:19:22 am David Faure wrote:
>>>> On Friday 04 May 2007, Christian Ehrlicher wrote:
>>>>> It should be changed after alpha1 is ready, then also the export macro creator (afair someone wrote a small script for this) should be updated.
>>>> Yes, I wrote kdesdk/scripts/kde_generate_export_header for this.
>>>>
>>> I fixed kde_generate_export_header accordingly.
>>>
>> thx, what about the KDE_EXPORT macro? Any objections to define 
>> KDE_IMPORT to KDE_EXPORT on non win32?
>> This would simplify the export macro a little bit
>>
> You mean like this?
> 
I meant changing kdemacros.h.cmake to

...
#define KDE_EXPORT __attribute__ ((visibility("default")))
#define KDE_IMPORT __attribute__ ((visibility("default")))
...

Then the export macro can be

#ifndef SOLID_EXPORT
# if defined(MAKE_SOLID_LIB)
    /* We are building this library */
#  define SOLID_EXPORT KDE_EXPORT
# else
    /* We are using this library */
#  define SOLID_EXPORT KDE_IMPORT
# endif
#endif


Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070506/bb23449c/attachment.sig>


More information about the kde-core-devel mailing list